autoUpdateModeFromYaml function
Parses the auto_update yaml scalar (issue #1377). Absent →
AutoUpdateMode.notify (the default is never written, so an absent
key and an explicit "notify" are the same policy). Strict like every
scalar: anything but true, false or the "notify" string throws
ConfigException.
Implementation
AutoUpdateMode autoUpdateModeFromYaml(Object? node) => switch (node) {
null || 'notify' => AutoUpdateMode.notify,
true => AutoUpdateMode.on,
false => AutoUpdateMode.off,
_ => throw ConfigException(
'"auto_update" must be true, false, or "notify", got: $node',
),
};