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.

48 lines • 1.8 kB
import type { ConfigurationValue } from '../types'; import type { AzureEnvLoaderOptions } from './azure-env-loader'; export interface ApiRouteHandlerOptions extends Omit<AzureEnvLoaderOptions, 'appId'> { appId: string; enableLocalFallback?: boolean; variableMappings?: Record<string, string[]>; includeDebugInfo?: boolean; } export interface ApiConfigResponse { success: boolean; data?: ConfigurationValue; config?: ConfigurationValue; source: string; timestamp: number; appId?: string; debug?: { sourcesUsed: string[]; fallbackActivated: boolean; variableCount: number; errors?: string[]; }; error?: string; } export declare class ApiRouteConfigHandler { private appScopedProvider; private azureLoader; private options; private debugInfo; constructor(options: ApiRouteHandlerOptions); getConfiguration(): Promise<ApiConfigResponse>; getConfigurationValue(key: string): Promise<ApiConfigResponse>; private tryAppScopedConfiguration; private tryAzureLoaderConfiguration; private getEnvironmentFallbackConfiguration; private transformEnvironmentKey; private transformAzureConfigFormat; private getNestedValue; private buildSuccessResponse; private buildErrorResponse; private resetDebugInfo; refreshConfiguration(): Promise<void>; getDebugInfo(): Promise<any>; private hasAppSpecificEnvironmentVars; } export declare function createAppConfigHandler(options: ApiRouteHandlerOptions): ApiRouteConfigHandler; export declare function createAppAzureLoader(options: ApiRouteHandlerOptions): ApiRouteConfigHandler; export { createAppAzureLoader as createAppAzureLoaderLegacy } from './azure-env-loader'; //# sourceMappingURL=api-route-helpers.d.ts.map