UNPKG

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.

69 lines • 2.48 kB
import { AppScopedKeyTransformer } from './app-key-transformer'; import { AppAwareClientResolver } from '../client/app-aware-resolver'; import type { ConfigurationValue } from '../types'; export interface FallbackSource { name: string; priority: number; getData: (appId: string) => ConfigurationValue; isAvailable: (appId: string) => boolean; } export interface FallbackResult { success: boolean; data: ConfigurationValue; source: string; appId: string; sourcesAttempted: string[]; variablesFound: number; transformedKeys: number; resolutionStrategies: string[]; fallbackActivated: boolean; errors?: string[]; debug?: { environmentVariables: string[]; transformations: Array<{ env: string; azure: string; app: string; }>; resolutionAttempts: Array<{ key: string; strategy: string; success: boolean; }>; fallbackSources: Array<{ name: string; available: boolean; variableCount: number; }>; }; } export declare class BulletproofFallbackSystem { private keyTransformer; private clientResolver; private fallbackSources; private debugMode; constructor(keyTransformer?: AppScopedKeyTransformer, clientResolver?: AppAwareClientResolver); enableDebugMode(): void; private initializeDefaultFallbackSources; addFallbackSource(source: FallbackSource): void; getFallbackConfiguration(appId: string, includeDebugInfo?: boolean): Promise<FallbackResult>; getFallbackConfigurationValue(appId: string, requestedKey: string): Promise<{ success: boolean; value?: any; resolvedKey?: string; strategy?: string; source: string; fallbacksAttempted: string[]; }>; isFallbackAvailable(appId: string): boolean; private getAppEnvironmentVariables; private hasAppEnvironmentVariables; private getGlobalEnvironmentVariables; private getDefaultConfiguration; private transformSourceData; private applyResolutionStrategies; getDebugInfo(appId: string): any; } export declare const globalFallbackSystem: BulletproofFallbackSystem; export declare function createBulletproofFallbackSystem(keyTransformer?: AppScopedKeyTransformer, clientResolver?: AppAwareClientResolver): BulletproofFallbackSystem; //# sourceMappingURL=bulletproof-fallback-system.d.ts.map