deps property

Map<String, Dep> get deps

Implementation

Map<String, Dep> get deps {
  final ds = <String, List<Set<String>>>{};
  _deps.forEach((key, vals) {
    final list = ds.putIfAbsent(key, () => [vals]);
    for (final dep in vals) {
      if (_deps.containsKey(dep)) {
        list.add(_deps[dep]!);
      }
    }
    list.forEach(vals.addAll);
  });
  final ret = <String, Dep>{};
  ds.forEach((key, value) {
    ret[key] = Dep(id: key, deps: value.reduce((v, e) => v..addAll(e)));
  });
  return ret;
}