SelectoMix.DomainDiagram (selecto_mix v0.4.6)

Renders Mermaid diagrams from Selecto domain inspection artifacts.

The diagram input is the selecto.domain_inspection JSON artifact emitted by mix selecto.domain.describe, keeping diagram generation decoupled from the original domain module and normalized domain internals.

Summary

Types

diagram_error()

@type diagram_error() ::
  {:read_failed, Path.t(), term()}
  | {:decode_failed, Path.t(), term()}
  | :invalid_inspection_artifact
  | {:invalid_inspection_format, term()}
  | {:unsupported_inspection_version, term()}
  | :missing_inspection
  | {:invalid_inspection, term()}

Functions

format_error(arg1)

@spec format_error(diagram_error()) :: String.t()

render(artifact)

@spec render(map()) :: String.t()

render_file(path)

@spec render_file(Path.t()) :: {:ok, String.t()} | {:error, diagram_error()}