UNPKG

webpods

Version:

Append-only log service with OAuth authentication

82 lines 1.99 kB
/** * Configuration loader with environment variable resolution * * Loads configuration from config.json and resolves environment variable references. * Supports: * - $VAR_NAME - replaced with environment variable value * - $VAR_NAME || default - uses environment variable or default value if not set */ export interface OAuthProviderConfig { id: string; clientId: string; clientSecret: string; issuer?: string; authUrl?: string; tokenUrl?: string; userinfoUrl?: string; emailUrl?: string; scope: string; callbackUrl?: string; userIdField: string; emailField: string; nameField: string; } export interface OAuthConfig { providers: OAuthProviderConfig[]; defaultProvider?: string; } export interface PublicConfig { protocol: string; hostname: string; port: number; host: string; origin: string; isSecure: boolean; } export interface ServerConfig { host: string; port: number; publicUrl: string; corsOrigin: string; maxPayloadSize: string; public?: PublicConfig; } export interface DatabaseConfig { host: string; port: number; database: string; user: string; password: string; } export interface AuthConfig { jwtSecret: string; jwtExpiry: string; sessionSecret: string; } export interface RateLimitsConfig { writes: number; reads: number; podCreate: number; streamCreate: number; } export interface AppConfig { oauth: OAuthConfig; server: ServerConfig; database: DatabaseConfig; auth: AuthConfig; rateLimits: RateLimitsConfig; rootPod?: string; } /** * Load configuration from file */ export declare function loadConfig(configPath?: string): AppConfig; /** * Get the current configuration (loads on first call) */ export declare function getConfig(): AppConfig; /** * Reset configuration (mainly for testing) */ export declare function resetConfig(): void; //# sourceMappingURL=config-loader.d.ts.map