import type { RunContextSettings, RunResult } from 'yeoman-test'; import { RunContext, YeomanTest } from 'yeoman-test'; import type Environment from 'yeoman-environment'; import type { BaseEnvironmentOptions, GetGeneratorConstructor, BaseGenerator as YeomanGenerator } from '@yeoman/types'; import type { EmptyObject } from 'type-fest'; import type { JHipsterGeneratorOptions } from '../../generators/base/api.js'; import type CoreGenerator from '../../generators/base-core/generator.js'; import type { ApplicationConfiguration } from '../types/application/yo-rc.js'; import type { Entity } from '../types/base/entity.js'; import type { CliCommand } from '../../cli/types.js'; type GeneratorTestType = YeomanGenerator; type GeneratorTestOptions = JHipsterGeneratorOptions; type WithJHipsterGenerators = { useDefaultMocks?: boolean; actualGeneratorsList?: string[]; useMock?: (ns: string) => boolean; }; type RunJHipster = WithJHipsterGenerators & { useEnvironmentBuilder?: boolean; }; type JHipsterRunResult = Omit, 'env'> & { env: Environment; sourceCallsArg: Record; composedMockedGenerators: string[]; createJHipster: (ns: string, options?: WithJHipsterGenerators) => JHipsterRunContext; }; type HelpersDefaults = { blueprint?: string; blueprintPackagePath?: string; entrypointGenerator?: string; }; declare const runResult: JHipsterRunResult; export { runResult, runResult as result }; export declare const resetDefaults: () => void; export declare const defineDefaults: (defaults?: { mockFactory?: any; accumulateMockArgs?: (mock: Record) => Record; } & HelpersDefaults) => Promise; export declare const createJHipsterConfigFiles: (configuration: Record, entities?: Entity[]) => Record; export type FakeBlueprintOptions = { packageJson?: any; generator?: string | string[]; generatorContent?: string; files?: Record; }; export declare const createBlueprintFiles: (blueprintPackage: string, { packageJson, generator, generatorContent, files }?: FakeBlueprintOptions) => { [x: string]: any; }; declare class JHipsterRunContext extends RunContext { sharedSource: Record; private sharedData; private sharedApplication; private sharedControl; private workspaceApplications; private commonWorkspacesConfig; private generateApplicationsSet; withOptions(options: Partial & Record>): this; withJHipsterConfig(configuration?: Readonly>, entities?: Entity[]): this; withSkipWritingPriorities(): this; withWorkspacesCommonConfig(commonWorkspacesConfig: Record): this; withWorkspaceApplicationAtFolder(workspaceFolder: string, configuration: Record, entities?: Entity[]): this; withWorkspaceApplication(configuration: Record, entities?: Entity[]): this; withWorkspacesSamples(...appNames: string[]): this; withGenerateWorkspaceApplications(generateWorkspaces?: boolean): this; withJHipsterLookup(): this; withBlueprintConfig(config: Record): this; withConfiguredBlueprint(): this; withParentBlueprintLookup(lookups?: string[]): this; withFakeTestBlueprint(blueprintPackage: string, { packageJson, generator }?: FakeBlueprintOptions): this; withMockedSource(options?: { except?: string[]; }): this; withControl(sharedControl: Record): this; withSharedApplication(sharedApplication: Record): this; withMockedNodeDependencies(): this; withMockedJHipsterGenerators(options?: string[] | { except?: string[]; filter?: (string: any) => boolean; }): this; withJHipsterGenerators(options?: WithJHipsterGenerators): this; withGradleBuildTool(): this; private withSharedData; run(): Promise>; } declare class JHipsterTest extends YeomanTest { constructor(); run = YeomanGenerator>(GeneratorOrNamespace: string | GetGeneratorConstructor, settings?: RunContextSettings | undefined, envOptions?: (BaseEnvironmentOptions & { createEnv?: any; }) | undefined): JHipsterRunContext; runJHipster(jhipsterGenerator: string, settings?: RunContextSettings | undefined, envOptions?: BaseEnvironmentOptions | undefined): JHipsterRunContext; runJHipster(jhipsterGenerator: string, options?: RunJHipster): JHipsterRunContext; runCli(command: string | string[], options?: { commands?: Record; useEnvironmentBuilder?: boolean; entrypointGenerator?: string; }): JHipsterRunContext; runJHipsterInApplication(jhipsterGenerator: string, settings?: RunContextSettings | undefined, envOptions?: BaseEnvironmentOptions | undefined): JHipsterRunContext; runJDL(jdl: string, settings?: RunContextSettings | undefined, envOptions?: BaseEnvironmentOptions | undefined): JHipsterRunContext; runJDLInApplication(jdl: string, settings?: RunContextSettings | undefined, envOptions?: BaseEnvironmentOptions | undefined): JHipsterRunContext; runTestBlueprintGenerator(): JHipsterRunContext; create = YeomanGenerator>(GeneratorOrNamespace: string | GetGeneratorConstructor, settings?: RunContextSettings | undefined, envOptions?: BaseEnvironmentOptions | undefined): JHipsterRunContext; createJHipster(jhipsterGenerator: string, settings?: RunContextSettings | undefined, envOptions?: BaseEnvironmentOptions | undefined): JHipsterRunContext; generateDeploymentWorkspaces(commonConfig?: Record): JHipsterRunContext; } export declare function createTestHelpers(options?: any): JHipsterTest; export declare const basicHelpers: JHipsterTest; export declare const defaultHelpers: JHipsterTest; export declare const skipPrettierHelpers: JHipsterTest; export declare const dryRunHelpers: JHipsterTest;