discloud_config 2.3.0
discloud_config: ^2.3.0 copied to clipboard
A configuration file handler to use with Discloud host
CHANGELOG #
2.3.0 #
- Refactor: Decoupled
DiscloudConfigfromDiscloudConfigParser, now the parser is passed as a dependency. - Feat: Added
DiscloudConfig.fromFileSystemEventto create aDiscloudConfigfrom aFileSystemEvent. - Feat: Added
toFileSystemEntity()extension forFileSystemEvent. - Fix: Removed
json_serializableand manual parsing ofDiscloudConfigData. - Fix: The
savemethod no longer has an assertion againstautoSave.
2.2.0 #
- Feat: option to disable autosave added
- Fix: ensure recursive creation of configuration file and improve file event handling
2.1.1 #
- Fix export of
DiscloudConfigDataextension
2.1.0 #
DiscloudConfigDataextension createdDiscloudConfigData.APTnow usesIterableinsteadListconverter
2.0.1 #
- Fix config file watching
2.0.0 #
BREAKING CHANGES #
DiscloudConfigConstructor: The public constructor that allowed passing file content (lines) has been removed to enforce a more robust, non-blocking asynchronous pattern. Instantiation now relies on factories and an asynchronousrefresh()method.watch()Method Return Type: Thewatch()method now returns aStream<DiscloudConfigData?>(a stream that can contain nulls) instead ofStream<DiscloudConfigData>to handle cases where the file is deleted or a read error occurs.DiscloudConfigDataRefactoring: TheDiscloudConfigDataclass is now an immutable class managed byfreezed. This changes the object's fundamental structure and requires using the new.copyWith()method for updates.
Features #
- Improved Linting: Added new linting rules for better code quality and consistency.
freezedIntegration:DiscloudConfigDatanow uses thefreezedpackage, providing immutability and helper methods likecopyWith.
Fixes #
- Asynchronous Initialization: Replaced synchronous file I/O in constructors with a fully asynchronous pattern to prevent blocking.
1.0.9 #
- fix: Correct filter in
listDiscloudConfigFiles
1.0.8 #
- feat: add more apts to DiscloudApt enum
1.0.7 #
- Smarter Parsing: We've made improvements to how the configuration files are read and parsed, making it more efficient and flexible.
- Optimized Comment Handling: The way we manage inline comments has been optimized for better performance.
- Enhanced Documentation: The documentation for various parts of the library has been significantly improved for better clarity and detail.
1.0.6 #
- Improved Reliability: We've enhanced how the configuration file paths are handled, making it more reliable across different operating systems.
- New Refresh Feature: You can now reload your
discloud.configfile on the fly using the newrefresh()method, ensuring your application always has the latest settings. - Better Performance: The file watching process is now more efficient.
1.0.5 #
- New Utility: Added a new utility file for searching files.
1.0.4 #
- Documentation & Structure Enhancements: We've made the documentation clearer and improved the organization of configuration-related classes.
- Improved Error Handling: Better error management and a more streamlined process for listing configuration files.
- Discord Link Fixed: The Discord invite link in the README has been corrected.
1.0.3 #
- Avoid parsing empty config file contents at instance start
- Replace
ExceptionforArgumentErroronDiscloudConfig.fromPath
1.0.2 #
Parserrenamed toDiscloudConfigParser- Using
stringinterpolation insteadList#joinonDiscloudConfigParser#stringifymethod
1.0.1 #
- fix utils exports
1.0.0 #
- Initial release