@thinkeloquent/core-configure
Version:
Entity configuration management with deep merging, validation, and entity definitions
46 lines • 1.89 kB
TypeScript
/**
* @module @thinkeloquent/core-configure
* @description Entity configuration management with deep merging, validation, and entity definitions
*
* Features:
* - Layered configuration with source priority (default < filesystem < control_plane < runtime)
* - Deep merge strategies (override, merge, extend)
* - Entity definition registry
* - Zod schema validation
* - Configuration caching
* - Result<T,E> error handling
*
* @example
* ```typescript
* import { EntityConfigurationManager, ConfigSource } from '@thinkeloquent/core-configure';
*
* const manager = new EntityConfigurationManager({
* defaultMergeStrategy: MergeStrategy.MERGE,
* enableValidation: true,
* enableCaching: true,
* });
*
* // Set configuration from filesystem
* manager.setConfig('tenant-1', 'tenant', {
* plugins: ['auth', 'logging'],
* settings: { theme: 'dark' }
* }, ConfigSource.FILESYSTEM);
*
* // Override with runtime config
* manager.setConfig('tenant-1', 'tenant', {
* settings: { apiKey: 'secret' }
* }, ConfigSource.RUNTIME);
*
* // Get merged configuration
* const configResult = manager.getConfig('tenant-1', 'tenant');
* if (configResult.isOk()) {
* console.log(configResult.value);
* // { plugins: ['auth', 'logging'], settings: { theme: 'dark', apiKey: 'secret' } }
* }
* ```
*/
export { EntityConfigurationManager } from './configuration-manager.js';
export { EntityDefinitionRegistry } from './entity-definitions.js';
export { mergeConfigs, mergeLayers, getDefaultMergeOptions } from './merge-strategies.js';
export { MergeStrategy, ConfigSource, type EntityDefinition, type EntityConfig, type ConfigLayer, type MergeOptions, type ConfigurationManagerOptions, type ValidationResult, type ConfigMetadata, EntityDefinitionSchema, EntityConfigSchema, ConfigurationManagerOptionsSchema, } from './types.js';
//# sourceMappingURL=index.d.ts.map