/** * Copyright (c) HashiCorp, Inc. * SPDX-License-Identifier: MPL-2.0 */ export declare enum Language { TYPESCRIPT = "typescript", PYTHON = "python", CSHARP = "csharp", JAVA = "java", GO = "go" } export declare const LANGUAGES: Language[]; export interface TypeScriptLanguageOptions { /** * Suffix to append to relative imports. * Defaults to "" (CommonJS). * Use ".js" or ".ts" for ESM-compatible imports. */ readonly importExtension?: string; } export type PythonLanguageOptions = Record; export type CSharpLanguageOptions = Record; export type JavaLanguageOptions = Record; export type GoLanguageOptions = Record; export type LanguageOptions = TypeScriptLanguageOptions | PythonLanguageOptions | CSharpLanguageOptions | JavaLanguageOptions | GoLanguageOptions; export declare const CONFIG_DEFAULTS: { output: string; codeMakerOutput: string; }; export interface TerraformDependencyConstraint { readonly name: string; readonly source: string; readonly version?: string; readonly fqn: string; readonly namespace?: string; } export declare function isLocalModule(source: string): boolean; export declare class TerraformModuleConstraint implements TerraformDependencyConstraint { readonly name: string; readonly source: string; readonly localSourceAbsolutePath?: string; readonly fqn: string; readonly version?: string; readonly namespace?: string; constructor(item: TerraformDependencyConstraint | string); get className(): string; get fileName(): string; private parseDependencyConstraint; } export declare class TerraformProviderConstraint implements TerraformDependencyConstraint { readonly name: string; readonly source: string; readonly version?: string; readonly fqn: string; readonly namespace?: string; constructor(item: Omit | string); private parseDependencyConstraint; } import { DEFAULT_TARGET_VERSIONS, TerraformTargetVersions } from "cdktn/lib/validations"; export { DEFAULT_TARGET_VERSIONS }; export type { TerraformTargetVersions }; interface ConfigBase { readonly app?: string; readonly output: string; readonly codeMakerOutput: string; terraformProviders?: TerraformProviderConstraint[]; terraformModules?: TerraformModuleConstraint[]; readonly context?: { [key: string]: any; }; readonly targetVersions?: TerraformTargetVersions; /** * When true, commands that execute the Terraform-compatible CLI (diff, * deploy, destroy) verify that the installed binary satisfies the declared * `targetVersions` before running it. */ readonly validateInstalledBinary?: boolean; } /** * Validates the shape of a `targetVersions` declaration; returns a list of * human-readable problems (empty when valid). */ export declare function validateTargetVersions(targetVersions: unknown): string[]; /** * Language-specific code generation options, discriminated by `language`. * Only TypeScript currently has tunable options; all other languages * accept an empty `languageOptions` object as a future extension point. */ export type Config = ConfigBase & ({ readonly language?: Language.TYPESCRIPT; readonly languageOptions?: TypeScriptLanguageOptions; } | { readonly language: Language.PYTHON; readonly languageOptions?: PythonLanguageOptions; } | { readonly language: Language.CSHARP; readonly languageOptions?: CSharpLanguageOptions; } | { readonly language: Language.JAVA; readonly languageOptions?: JavaLanguageOptions; } | { readonly language: Language.GO; readonly languageOptions?: GoLanguageOptions; }); export declare const parseConfig: (configJSON?: string) => Config; export declare function readConfigSync(configFile?: string): Config; export declare function shouldCheckCodeMakerOutput(config: Config): boolean; export declare function logTimespan(message: string): () => void; //# sourceMappingURL=config.d.ts.map