Skip to main content
Version: 1.x

Function: loadConfig()

loadConfig(options?): Promise<Readonly<{ ai?: { anthropicApiKey?: string; apiKey?: string; apiVersion?: string; deployment?: string; endpoint?: string; maxTokens?: number; model?: string; provider: "openai" | "azure-openai" | "anthropic"; temperature: number; }; auth?: { baseUrl?: string; client: string; language: string; password?: string; strategy: "custom" | "btp-saml" | "basic" | "office365"; username?: string; }; captureFailureArtifacts: boolean; controlDiscoveryTimeout: number; controlTreeCapture?: { enabled: boolean; maxControls: number; maxDepth: number; }; defaultMatchSubclasses: boolean; discoveryStrategies: ("direct-id" | "recordreplay" | "registry")[]; ignoreAutoWaitUrls: string[]; interactionStrategy: "ui5-native" | "dom-first" | "opa5"; logLevel: "error" | "debug" | "warn" | "info" | "verbose"; odataTracing?: { enabled: boolean; urlPatterns: string[]; }; opa5?: { autoWait: boolean; debug: boolean; interactionTimeout: number; }; preferVisibleControls: boolean; selectors?: { defaultTimeout: number; preferVisibleControls: boolean; skipStabilityWait: boolean; }; skipStabilityWait: boolean; telemetry?: { batchTimeout: number; connectionString?: string; endpoint?: string; exporter: "otlp" | "azure-monitor" | "jaeger"; maxQueueSize: number; metrics: boolean; openTelemetry: boolean; protocol: "http" | "grpc"; resourceAttributes: Record<string, string>; serviceName: string; }; ui5WaitTimeout: number; }>>

Loads, validates, and freezes Praman configuration.

Parameters

options?

LoadConfigOptions

Optional inline overrides.

Returns

Promise<Readonly<{ ai?: { anthropicApiKey?: string; apiKey?: string; apiVersion?: string; deployment?: string; endpoint?: string; maxTokens?: number; model?: string; provider: "openai" | "azure-openai" | "anthropic"; temperature: number; }; auth?: { baseUrl?: string; client: string; language: string; password?: string; strategy: "custom" | "btp-saml" | "basic" | "office365"; username?: string; }; captureFailureArtifacts: boolean; controlDiscoveryTimeout: number; controlTreeCapture?: { enabled: boolean; maxControls: number; maxDepth: number; }; defaultMatchSubclasses: boolean; discoveryStrategies: ("direct-id" | "recordreplay" | "registry")[]; ignoreAutoWaitUrls: string[]; interactionStrategy: "ui5-native" | "dom-first" | "opa5"; logLevel: "error" | "debug" | "warn" | "info" | "verbose"; odataTracing?: { enabled: boolean; urlPatterns: string[]; }; opa5?: { autoWait: boolean; debug: boolean; interactionTimeout: number; }; preferVisibleControls: boolean; selectors?: { defaultTimeout: number; preferVisibleControls: boolean; skipStabilityWait: boolean; }; skipStabilityWait: boolean; telemetry?: { batchTimeout: number; connectionString?: string; endpoint?: string; exporter: "otlp" | "azure-monitor" | "jaeger"; maxQueueSize: number; metrics: boolean; openTelemetry: boolean; protocol: "http" | "grpc"; resourceAttributes: Record<string, string>; serviceName: string; }; ui5WaitTimeout: number; }>>

Frozen, validated PramanConfig with all defaults applied.

Guarantee

Returns a frozen, validated PramanConfig with all defaults applied via Zod schema.

Example

const config = await loadConfig({ overrides: { logLevel: 'debug' } });