UNPKG

@acontplus/ng-config

Version:

Angular configuration management library providing environment tokens, application settings, dependency injection patterns, and runtime configuration services for enterprise applications.

57 lines (48 loc) 1.42 kB
import { InjectionToken } from '@angular/core'; // src/lib/constants/auth.app.constants.ts const AUTH_API = { AUTH: 'auth/', }; const DEFAULT_CONFIG = { apiBaseUrl: '', apiTimeout: 30000, retryAttempts: 2, retryDelay: 1000, enableCorrelationTracking: true, enableRequestLogging: false, enableErrorLogging: true, enableToastNotifications: true, includeAuthToken: true, authTokenHeader: 'Authorization', enableMultiTenancy: true, tenantIdHeader: 'Tenant-Id', logLevel: 'info', enableConsoleLogging: true, customHeaders: {}, excludeUrls: [], excludeMethods: [], }; // src/lib/constants/index.ts const AUTH_TOKEN = new InjectionToken('AUTH_TOKEN_PROVIDER'); const CORE_CONFIG = new InjectionToken('CORE_CONFIG', { factory: () => DEFAULT_CONFIG, }); /** * @const ENVIRONMENT * Injection token for the environment interface to be provided by the applications. */ const ENVIRONMENT = new InjectionToken('ENVIRONMENT', { factory: () => ({ isProduction: false, apiBaseUrl: 'http://localhost:4200/api/', tokenKey: 'access_token', refreshTokenKey: 'refresh_token', clientId: 'angular-app', loginRoute: 'auth', }), }); /** * Generated bundle index. Do not edit. */ export { AUTH_API, AUTH_TOKEN, CORE_CONFIG, DEFAULT_CONFIG, ENVIRONMENT }; //# sourceMappingURL=acontplus-ng-config.mjs.map