cookStale method
Cooks each of paths that isStale; the ones cooked, with what
failed by path.
Implementation
Future<(List<String>, Map<String, Object>)> cookStale(
Iterable<String> paths,
) async {
final cooked = <String>[];
final failed = <String, Object>{};
for (final path in paths) {
if (!isModel(path) || !isStale(path)) continue;
try {
await cook(path);
cooked.add(path);
} on Object catch (error) {
failed[path] = error;
}
}
return (cooked, failed);
}