* DepndencyGraph: {Object} * key: conponentType, * value: { * successor: [conponentTypes...], * originalDeps: [conponentTypes...], * entryCount: {number} * }
(fullNameList)
| 18772 | * } |
| 18773 | */ |
| 18774 | function makeDepndencyGraph(fullNameList) { |
| 18775 | var graph = {}; |
| 18776 | var noEntryList = []; |
| 18777 | |
| 18778 | each$1(fullNameList, function (name) { |
| 18779 | |
| 18780 | var thisItem = createDependencyGraphItem(graph, name); |
| 18781 | var originalDeps = thisItem.originalDeps = dependencyGetter(name); |
| 18782 | |
| 18783 | var availableDeps = getAvailableDependencies(originalDeps, fullNameList); |
| 18784 | thisItem.entryCount = availableDeps.length; |
| 18785 | if (thisItem.entryCount === 0) { |
| 18786 | noEntryList.push(name); |
| 18787 | } |
| 18788 | |
| 18789 | each$1(availableDeps, function (dependentName) { |
| 18790 | if (indexOf(thisItem.predecessor, dependentName) < 0) { |
| 18791 | thisItem.predecessor.push(dependentName); |
| 18792 | } |
| 18793 | var thatItem = createDependencyGraphItem(graph, dependentName); |
| 18794 | if (indexOf(thatItem.successor, dependentName) < 0) { |
| 18795 | thatItem.successor.push(name); |
| 18796 | } |
| 18797 | }); |
| 18798 | }); |
| 18799 | |
| 18800 | return {graph: graph, noEntryList: noEntryList}; |
| 18801 | } |
| 18802 | |
| 18803 | function createDependencyGraphItem(graph, name) { |
| 18804 | if (!graph[name]) { |
no test coverage detected