ConfigParser class

A parser for YAML configuration files used in the distribution process.

The ConfigParser class is responsible for parsing YAML configuration files, converting them into structured objects, and providing access to tasks, environments, and arguments defined in the configuration. It handles variable substitution and validates required configuration fields.

Constructors

ConfigParser({required List<Task> tasks, required Map<String, dynamic>? arguments, required Map<String, dynamic> environments, required ArgResults? globalResults, required Variables variables, List<NotificationConfig> notifications = const [], Map<String, dynamic> ai = const {}, Map<String, dynamic> changelog = const {}, String output = "distribution"})
Creates a new ConfigParser instance.

Properties

ai Map<String, dynamic>
Raw ai: mapping, or an empty map when the section is absent.
final
arguments Map<String, dynamic>?
The raw arguments: mapping, when the configuration declares one.
final
changelog Map<String, dynamic>
Raw changelog: mapping, or an empty map when the section is absent.
final
environments Map<String, dynamic>
The environment variables used in the configuration
getter/setter pair
globalResults → ArgResults?
Global command line argument results from the CLI parser
final
hashCode int
The hash code for this object.
no setterinherited
notifications List<NotificationConfig>
Notifications delivered once the whole run has finished.
final
output String
The output directory for distribution files
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tasks List<Task>
The list of tasks defined in the configuration
getter/setter pair
variables Variables
Variable resolver bound to environments, reused by consumers that need to expand placeholders after parsing (notifications, validation).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

distributeYaml(String path, ArgResults? globalResults) Future<ConfigParser>
Creates a ConfigParser instance by parsing a YAML file.
readRawYaml(File file) Map<String, dynamic>
Reads a YAML file as a mutable JSON-compatible map.