MermaidConfig

abstract class MermaidConfig @Inject constructor(objects: ObjectFactory)(source)

Configures the graph export inside the mermaid { } block - focus and exclude filters that keep a large graph's Mermaid/DOT diagram readable.

aalekh {
mermaid {
focus(":feature:checkout") // keep :feature:checkout and its immediate neighbours
depth(2) // ...growing out 2 hops instead of the default 1
exclude(":test:**") // drop test-only modules from the diagram
}
}

With no focus/exclude declared the whole graph is exported, exactly as before. The filters drive aalekhMermaid; the diagram generators are unchanged - they simply receive a subset graph.

Constructors

Link copied to clipboard
@Inject
constructor(objects: ObjectFactory)

Functions

Link copied to clipboard
fun depth(hops: Int)

Number of dependency hops to grow the focus set by, in either direction. 0 keeps only the focused modules; 1 (default) adds their direct neighbours. Ignored when no focus is set.

Link copied to clipboard
fun exclude(vararg patterns: String)

Removes modules matching patterns from the diagram, applied after focus. Repeatable.

Link copied to clipboard
fun focus(vararg patterns: String)

Restricts the diagram to modules matching patterns plus their neighbourhood (see depth). Glob syntax matches the rest of Aalekh (*, **, e.g. ":feature:**"). Repeatable.