graph_export
library
Constants
mermaidEdgeLimit
→ const int
Mermaid's default maxEdges: past it, GitHub renders an error box instead
of a diagram.
reportSchemaVersion
→ const int
Version of the document reportJson builds. Bumped only when a field
changes meaning or goes away; a new field is not a new version.
Functions
drawnEdges (ImportGraph graph , Iterable <String > nodes )
→ int
How many edges toMermaid would draw for the same nodes — for warning
before a diagram crosses mermaidEdgeLimit .
ranked (Map <String , int > counts , {required Set <String > scope , int top = 10 })
→ List <MapEntry <String , int > >
The top highest counts among the files in scope, highest first and by
path within a tie, leaving out zeroes — the "most imported" and "imports
the most" lists, shared by the text report and the JSON so the two cannot
disagree.
reportJson (ImportGraph graph , {required String packageName , required Iterable <String > files , required List <List <String > > cycles , required Iterable <String > unreachable , int featureDepth = 1 , int top = 10 , Map <String , Object ? > ? dependencies })
→ Map <String , Object ? >
Everything --report knows, as a JSON-ready map.
toDot (ImportGraph graph , {required Iterable <String > nodes , Set <String > unreachable = const {} , int featureDepth = 1 , List <List <String > > ? cycles })
→ String
graph in Graphviz DOT, for dot -Tsvg: the same drawing as toMermaid ,
without a size limit, with features as clusters.
toMermaid (ImportGraph graph , {required Iterable <String > nodes , Set <String > unreachable = const {} , int featureDepth = 1 , List <List <String > > ? cycles })
→ String
graph as a Mermaid flowchart — the form GitHub draws inline in a README,
an issue or a pull request.