import { isRegistryModule } from "@cdktn/provider-generator"; import * as rosetta from "jsii-rosetta"; import { attributeNameToCdktfName } from "./generation"; import { replaceCsharpImports, replaceGoImports, replaceJavaImports, replacePythonImports } from "./jsii-rosetta-workarounds"; import { ProviderSchema } from "@cdktn/commons"; export declare const CODE_MARKER = "// define resources here"; export declare function getParsedHcl(hcl: string): Promise<{ data?: Record[]>> | undefined; import?: { to: string; id: string; provider?: any; }[] | undefined; locals?: Record[] | undefined; module?: Record | undefined; output?: Record | undefined; provider?: Record[]> | undefined; resource?: Record[]>> | undefined; terraform?: { required_version?: string | undefined; required_providers?: Record[] | undefined; backend?: Record[]> | undefined; }[] | undefined; variable?: Record | undefined; }>; export declare function parseProviderRequirements(hcl: string): Promise>; export declare function convertToTypescript(hcl: string, providerSchema: ProviderSchema, codeContainer: string): Promise<{ all: string; imports: string; code: string; providers: string[]; modules: string[]; stats: { numberOfModules: number; numberOfProviders: number; resources: Record>; data: Record>; convertedLines: number; }; }>; declare const translators: { python: { visitor: () => rosetta.PythonVisitor; postTranslationMutation: typeof replacePythonImports; }; java: { visitor: () => rosetta.JavaVisitor; postTranslationMutation: typeof replaceJavaImports; }; csharp: { visitor: () => rosetta.CSharpVisitor; postTranslationMutation: typeof replaceCsharpImports; }; go: { visitor: () => rosetta.GoVisitor; postTranslationMutation: typeof replaceGoImports; }; }; type ConvertOptions = { /** * The language to convert to */ language: keyof typeof translators | "typescript"; /** * The provider schema to use for conversion */ providerSchema: ProviderSchema; /** * The base class to extend from. Defaults to `constructs.Construct` */ codeContainer?: string; /** * Whether to throw an error if the translation fails * Defaults to false */ throwOnTranslationError?: boolean; }; export declare function convert(hcl: string, { language, providerSchema, throwOnTranslationError, codeContainer, }: ConvertOptions): Promise<{ all: string; imports: string; code: string; stats: { language: "typescript" | "python" | "java" | "csharp" | "go"; numberOfModules: number; numberOfProviders: number; resources: Record>; data: Record>; convertedLines: number; }; providers: string[]; modules: string[]; }>; export declare function getTerraformConfigFromDir(importPath: string): string; type CdktfJson = Record & { terraformProviders: any[]; terraformModules: any[]; }; export declare function convertProject(combinedHcl: string, { language, providerSchema }: ConvertOptions): Promise<{ code: (inputMainFile: string) => string; cdktfJson: (inputCdktfJson: CdktfJson) => { [x: string]: unknown; terraformProviders: any[]; terraformModules: any[]; }; stats: { language: "typescript" | "python" | "java" | "csharp" | "go"; numberOfModules: number; numberOfProviders: number; resources: Record>; data: Record>; convertedLines: number; }; }>; export { isRegistryModule, attributeNameToCdktfName }; //# sourceMappingURL=index.d.ts.map