react-azure-config
Version:
🚀 The Ultimate Multi-App Configuration Library! CRITICAL BUG FIXES: Prefixed environment keys no longer sent to Azure. Complete architectural redesign with bulletproof fallback system. Enterprise-grade Azure integration and monorepo support.
48 lines • 1.78 kB
TypeScript
import type { AuthenticationConfig } from '../types';
export interface NextAuthAzureMapping {
mappings: Record<string, string>;
appId?: string;
keyPrefix?: string;
}
export interface AzureEnvLoaderOptions {
endpoint?: string;
authentication?: AuthenticationConfig;
environment?: string;
appId?: string;
nextAuth?: NextAuthAzureMapping;
customMappings?: Record<string, string>;
throwOnError?: boolean;
cacheTtl?: number;
}
export declare class AzureEnvironmentLoader {
private client;
private appScopedProvider;
private options;
private lastLoaded;
constructor(options?: AzureEnvLoaderOptions);
private initializeClient;
private buildDefaultAuthentication;
loadToProcessEnv(): Promise<void>;
private applyMappings;
private getNestedValue;
refresh(): Promise<void>;
getConfiguration(): Promise<Record<string, any>>;
getConfigurationForApi(): Promise<{
success: boolean;
data?: Record<string, any>;
source: string;
error?: string;
}>;
private getEnvironmentFallback;
getConfigurationValue(key: string): Promise<{
success: boolean;
value?: any;
source: string;
error?: string;
}>;
}
export declare function loadAzureToProcessEnv(options?: AzureEnvLoaderOptions): Promise<void>;
export declare function createAppAzureLoader(appId: string, options?: Omit<AzureEnvLoaderOptions, 'appId'>): AzureEnvironmentLoader;
export declare function createAppAzureLoaderForApi(appId: string, options?: Omit<AzureEnvLoaderOptions, 'appId'>): AzureEnvironmentLoader;
export declare function createNextAuthAzureLoader(options?: AzureEnvLoaderOptions): AzureEnvironmentLoader;
//# sourceMappingURL=azure-env-loader.d.ts.map