v1.1.0
Added
-
Driver Isolation: Implemented
KfgDriver.clone(). Now, each instance ofKfgclones its driver in the constructor, ensuring that the data cache (this.driver.data) is independent and does not suffer unwanted overwrites between different configurations. -
Data Injection: Added the
inject(data)method inKfgandKfgDriver. Allows injecting and merging raw data directly into the configuration object, bypassing the standard column flow. -
Lifecycle Management:
-
Kfg.reload(options?): New method to reload configurations from disk/environment, preserving or updating options from the last load. -
Kfg.schematic(path): Semantic shortcut forconf(), returning the schema definition for a specific path. -
KfgFS Improvements:
-
KfgFS.create(id, data?): Method to physically create new configuration files, allowing initial data to be passed. -
KfgFS.exist(id): Method to check the existence of a configuration file by ID. -
Regression Tests: Added new test suites to cover the functionalities of
inject,clone,reload, and file management inKfgFS.
Fixed
-
Resolution of Recursive Defaults: Complete refactoring of
buildDefaultObjectinsrc/utils/schema.ts. Now the system uses the TypeBox pipeline (Value.Default) to generate default objects, correctly resolving the priority between defaults of parent and child nodes (Deep Merging of defaults). -
Partial Data Validation: Fixed a bug in
KfgDriver.validate()where validation failed when receiving partial driver objects. Now, the schema's default values are applied before the TypeBox requirement check.
Refactoring
- Complete internal conversion of
SchemaDefinitionto native TypeBox schemas during default value generation processes, ensuring technical consistency throughout the project.
Full Changelog: v1.0.0...v1.1.0