dt-app
Version:
The Dynatrace App Toolkit is a tool you can use from your command line to create, develop, and deploy apps on your Dynatrace environment.
40 lines (39 loc) • 1.77 kB
TypeScript
import { type ValidationLevel } from '../../../utils/config/validate-wave-config';
import type { CliFlagOptions, CliOptions, ResolvedCliOptions } from '../../../utils/config/cli-options';
import type { AppFunctionsBuildPlatform } from '../../../build/build-functions';
export declare const globalConfigModule: {
/**
* Initialize the config module: validate inputs, merge options, run post-merge
* enrichment, and freeze the result.
* Can only be called once. Subsequent calls will throw an error.
* After calling, retrieve the config via {@link getConfig}.
* @throws Error if already initialized
*/
init(argsConfig: Partial<CliFlagOptions & {
appFunctionsBuildPlatform: AppFunctionsBuildPlatform;
}>, fileConfig: CliOptions, envConfig?: Record<string, string | undefined>, validationLevel?: ValidationLevel, isDev?: boolean, beforeConfigFreeze?: (options: ResolvedCliOptions) => Promise<ResolvedCliOptions>): Promise<void>;
/**
* Get the stored config.
* @returns The immutable config object
* @throws Error if not yet initialized
*/
getConfig(): Readonly<ResolvedCliOptions>;
/**
* Check if the config module has been initialized.
* @returns True if initialized, false otherwise
*/
isInitialized(): boolean;
/**
* Invalidate the config module state in runtime.
* Subsequent getConfig() calls will require re-initialization via init().
*/
invalidate(): void;
};
/**
* Recursively freezes an object and all its nested properties.
* This ensures deep immutability across the entire object tree.
*
* @param obj - The object to deep freeze
* @returns The deeply frozen readonly object
*/
export declare function deepFreeze<T>(obj: T): Readonly<T>;