|
|
|
|
@@ -1,7 +1,34 @@
|
|
|
|
|
classDiagram
|
|
|
|
|
namespace Presentation {
|
|
|
|
|
class Cli
|
|
|
|
|
class Command
|
|
|
|
|
namespace Domain {
|
|
|
|
|
class OutputConfig
|
|
|
|
|
class DiagramLevel
|
|
|
|
|
class RenderOutput
|
|
|
|
|
class RenderedFile
|
|
|
|
|
class SourceFile
|
|
|
|
|
class ModuleName
|
|
|
|
|
class ModuleAssignment
|
|
|
|
|
class Language
|
|
|
|
|
class FilePath
|
|
|
|
|
class RelationshipKind
|
|
|
|
|
class Visibility
|
|
|
|
|
class CodeElementKind
|
|
|
|
|
class RuleKind
|
|
|
|
|
class RuleViolation
|
|
|
|
|
class BoundaryRule
|
|
|
|
|
class AnalysisConfig
|
|
|
|
|
class AnalysisResult
|
|
|
|
|
class AnalysisWarning
|
|
|
|
|
class Relationship
|
|
|
|
|
class CodeElement
|
|
|
|
|
class FileDiscovery
|
|
|
|
|
class ConfigLoader
|
|
|
|
|
class ProjectAnalyzer
|
|
|
|
|
class OutputWriter
|
|
|
|
|
class DiagramRenderer
|
|
|
|
|
class SourceAnalyzer
|
|
|
|
|
class NormalizedGraph
|
|
|
|
|
class CodeGraph
|
|
|
|
|
class DomainError
|
|
|
|
|
}
|
|
|
|
|
namespace Adapters {
|
|
|
|
|
class MermaidRenderer
|
|
|
|
|
@@ -36,158 +63,21 @@ classDiagram
|
|
|
|
|
class MemberToml
|
|
|
|
|
class PackageSection
|
|
|
|
|
}
|
|
|
|
|
namespace Domain {
|
|
|
|
|
class OutputConfig
|
|
|
|
|
class DiagramLevel
|
|
|
|
|
class RenderOutput
|
|
|
|
|
class RenderedFile
|
|
|
|
|
class SourceFile
|
|
|
|
|
class ModuleName
|
|
|
|
|
class ModuleAssignment
|
|
|
|
|
class Language
|
|
|
|
|
class FilePath
|
|
|
|
|
class RelationshipKind
|
|
|
|
|
class Visibility
|
|
|
|
|
class CodeElementKind
|
|
|
|
|
class RuleKind
|
|
|
|
|
class RuleViolation
|
|
|
|
|
class BoundaryRule
|
|
|
|
|
class AnalysisConfig
|
|
|
|
|
class AnalysisResult
|
|
|
|
|
class AnalysisWarning
|
|
|
|
|
class Relationship
|
|
|
|
|
class CodeElement
|
|
|
|
|
class FileDiscovery
|
|
|
|
|
class ConfigLoader
|
|
|
|
|
class ProjectAnalyzer
|
|
|
|
|
class OutputWriter
|
|
|
|
|
class DiagramRenderer
|
|
|
|
|
class SourceAnalyzer
|
|
|
|
|
class NormalizedGraph
|
|
|
|
|
class CodeGraph
|
|
|
|
|
class DomainError
|
|
|
|
|
namespace Presentation {
|
|
|
|
|
class Cli
|
|
|
|
|
class Command
|
|
|
|
|
}
|
|
|
|
|
namespace Application {
|
|
|
|
|
class AnalyzeCodebase
|
|
|
|
|
class AnalyzeCodebaseResult
|
|
|
|
|
class BuildCodeGraphResult
|
|
|
|
|
class BuildCodeGraph
|
|
|
|
|
class DiffResult
|
|
|
|
|
class DiffDiagram
|
|
|
|
|
class CheckFreshness
|
|
|
|
|
class GenerateDiagramResult
|
|
|
|
|
class GenerateDiagram
|
|
|
|
|
}
|
|
|
|
|
Cli : command Option
|
|
|
|
|
Cli : path PathBuf
|
|
|
|
|
Cli : level String
|
|
|
|
|
Cli : format String
|
|
|
|
|
Cli : output Option
|
|
|
|
|
Cli : config Option
|
|
|
|
|
Cli : scope Option
|
|
|
|
|
Cli : exclude Vec
|
|
|
|
|
Cli : include_tests bool
|
|
|
|
|
Cli : no_weights bool
|
|
|
|
|
Cli : watch bool
|
|
|
|
|
Cli : since Option
|
|
|
|
|
Cli : split_by_module bool
|
|
|
|
|
Cli : strict bool
|
|
|
|
|
Cli : check bool
|
|
|
|
|
Cli : verbose u8
|
|
|
|
|
MermaidRenderer : level DiagramLevel
|
|
|
|
|
MermaidRenderer : show_weights bool
|
|
|
|
|
MermaidRenderer : +new() -] Self
|
|
|
|
|
MermaidRenderer : +with_level(level DiagramLevel) -] Self
|
|
|
|
|
MermaidRenderer : +with_weights(show bool) -] Self
|
|
|
|
|
MermaidRenderer : -display_name(qualified str) -] str
|
|
|
|
|
MermaidRenderer : -format_element_name(element CodeElement) -] String
|
|
|
|
|
MermaidRenderer : -format_visibility(visibility Visibility) -] static str
|
|
|
|
|
MermaidRenderer : -render_class_diagram(graph CodeGraph) -] String
|
|
|
|
|
MermaidRenderer : -push_class_lines(lines mut Vec[String], deferred mut Vec[String], element CodeElement, indent str, in_namespace bool)
|
|
|
|
|
MermaidRenderer : -render_module_flowchart(graph CodeGraph) -] String
|
|
|
|
|
MermaidRenderer : -render_project_flowchart(graph CodeGraph) -] String
|
|
|
|
|
MermaidRenderer : -sanitize_id(name str) -] String
|
|
|
|
|
AsciiRenderer : +new() -] Self
|
|
|
|
|
AsciiRenderer : -format_kind(element CodeElement) -] static str
|
|
|
|
|
PythonProjectAnalyzer : +new() -] Self
|
|
|
|
|
<<private>> ProjectSection
|
|
|
|
|
ProjectSection : name Option
|
|
|
|
|
ProjectSection : dependencies Vec
|
|
|
|
|
<<private>> PoetrySection
|
|
|
|
|
PoetrySection : name Option
|
|
|
|
|
PoetrySection : dependencies HashMap
|
|
|
|
|
<<private>> ToolSection
|
|
|
|
|
ToolSection : poetry PoetrySection
|
|
|
|
|
<<private>> PyprojectToml
|
|
|
|
|
PyprojectToml : project Option
|
|
|
|
|
PyprojectToml : tool ToolSection
|
|
|
|
|
WalkdirDiscovery : +new() -] Self
|
|
|
|
|
WalkdirDiscovery : -detect_language(path Path) -] Option[Language]
|
|
|
|
|
WalkdirDiscovery : -is_excluded(path Path, root Path, excludes [String]) -] bool
|
|
|
|
|
ExtractionContext : elements Vec
|
|
|
|
|
ExtractionContext : relationships Vec
|
|
|
|
|
ExtractionContext : warnings Vec
|
|
|
|
|
ExtractionContext : local_types HashSet
|
|
|
|
|
ExtractionContext : file_path FilePath
|
|
|
|
|
ExtractionContext : +new(file_path FilePath) -] Self
|
|
|
|
|
ExtractionContext : +add_element(element CodeElement)
|
|
|
|
|
ExtractionContext : +add_relationship(rel Relationship)
|
|
|
|
|
ExtractionContext : +add_warning(file_path FilePath, line usize, message str)
|
|
|
|
|
ExtractionContext : +file_path() -] FilePath
|
|
|
|
|
ExtractionContext : +into_result() -] Result[AnalysisResult, DomainError]
|
|
|
|
|
TreeSitterAnalyzer : rust RustExtractor
|
|
|
|
|
TreeSitterAnalyzer : python PythonExtractor
|
|
|
|
|
TreeSitterAnalyzer : +new() -] Self
|
|
|
|
|
TreeSitterAnalyzer : -extractor_for(language Language) -] Option[dyn LanguageExtractor]
|
|
|
|
|
FileOutputWriter : output_path OutputPath
|
|
|
|
|
FileOutputWriter : +new(output_dir PathBuf) -] Self
|
|
|
|
|
FileOutputWriter : +single_file(path PathBuf) -] Self
|
|
|
|
|
<<private>> OutputPath
|
|
|
|
|
StdoutOutputWriter : +new() -] Self
|
|
|
|
|
<<private>> RawRules
|
|
|
|
|
RawRules : allow Vec
|
|
|
|
|
RawRules : deny Vec
|
|
|
|
|
<<private>> RawConfig
|
|
|
|
|
RawConfig : analysis RawAnalysis
|
|
|
|
|
RawConfig : output RawOutput
|
|
|
|
|
RawConfig : modules HashMap
|
|
|
|
|
RawConfig : rules RawRules
|
|
|
|
|
<<private>> RawAnalysis
|
|
|
|
|
RawAnalysis : exclude Vec
|
|
|
|
|
RawAnalysis : level Option
|
|
|
|
|
<<private>> RawOutput
|
|
|
|
|
RawOutput : format Option
|
|
|
|
|
RawOutput : path Option
|
|
|
|
|
RawOutput : split_by_module bool
|
|
|
|
|
TomlConfigLoader : raw RawConfig
|
|
|
|
|
TomlConfigLoader : +from_path(path Path) -] Result[Self, DomainError]
|
|
|
|
|
TomlConfigLoader : -parse_level(level Option[String]) -] DiagramLevel
|
|
|
|
|
D2Renderer : level DiagramLevel
|
|
|
|
|
D2Renderer : +new() -] Self
|
|
|
|
|
D2Renderer : +with_level(level DiagramLevel) -] Self
|
|
|
|
|
HtmlRenderer : +new() -] Self
|
|
|
|
|
<<private>> GraphData
|
|
|
|
|
GraphData : nodes Vec
|
|
|
|
|
GraphData : edges Vec
|
|
|
|
|
<<private>> NodeData
|
|
|
|
|
NodeData : id String
|
|
|
|
|
NodeData : label String
|
|
|
|
|
NodeData : module String
|
|
|
|
|
NodeData : kind String
|
|
|
|
|
NodeData : fields Vec
|
|
|
|
|
NodeData : methods Vec
|
|
|
|
|
<<private>> EdgeData
|
|
|
|
|
EdgeData : source String
|
|
|
|
|
EdgeData : target String
|
|
|
|
|
EdgeData : kind String
|
|
|
|
|
CargoWorkspaceAnalyzer : +new() -] Self
|
|
|
|
|
<<private>> WorkspaceToml
|
|
|
|
|
WorkspaceToml : workspace Option
|
|
|
|
|
<<private>> WorkspaceSection
|
|
|
|
|
WorkspaceSection : members Vec
|
|
|
|
|
<<private>> MemberToml
|
|
|
|
|
MemberToml : package Option
|
|
|
|
|
MemberToml : dependencies HashMap
|
|
|
|
|
<<private>> PackageSection
|
|
|
|
|
PackageSection : name String
|
|
|
|
|
OutputConfig : split_by_module bool
|
|
|
|
|
OutputConfig : output_path Option
|
|
|
|
|
OutputConfig : +with_split_by_module(split bool) -] Self
|
|
|
|
|
@@ -336,6 +226,118 @@ classDiagram
|
|
|
|
|
CodeGraph : +subgraph_by_module(module ModuleName) -] CodeGraph
|
|
|
|
|
CodeGraph : +merge_project_edges(project_graph CodeGraph)
|
|
|
|
|
CodeGraph : +module_edges() -] HashMap[(String, String), usize]
|
|
|
|
|
MermaidRenderer : level DiagramLevel
|
|
|
|
|
MermaidRenderer : show_weights bool
|
|
|
|
|
MermaidRenderer : +new() -] Self
|
|
|
|
|
MermaidRenderer : +with_level(level DiagramLevel) -] Self
|
|
|
|
|
MermaidRenderer : +with_weights(show bool) -] Self
|
|
|
|
|
MermaidRenderer : -display_name(qualified str) -] str
|
|
|
|
|
MermaidRenderer : -format_element_name(element CodeElement) -] String
|
|
|
|
|
MermaidRenderer : -format_visibility(visibility Visibility) -] static str
|
|
|
|
|
MermaidRenderer : -render_class_diagram(graph CodeGraph) -] String
|
|
|
|
|
MermaidRenderer : -push_class_lines(lines mut Vec[String], deferred mut Vec[String], element CodeElement, indent str, in_namespace bool)
|
|
|
|
|
MermaidRenderer : -render_module_flowchart(graph CodeGraph) -] String
|
|
|
|
|
MermaidRenderer : -render_project_flowchart(graph CodeGraph) -] String
|
|
|
|
|
MermaidRenderer : -sanitize_id(name str) -] String
|
|
|
|
|
AsciiRenderer : +new() -] Self
|
|
|
|
|
AsciiRenderer : -format_kind(element CodeElement) -] static str
|
|
|
|
|
PythonProjectAnalyzer : +new() -] Self
|
|
|
|
|
<<private>> ProjectSection
|
|
|
|
|
ProjectSection : name Option
|
|
|
|
|
ProjectSection : dependencies Vec
|
|
|
|
|
<<private>> PoetrySection
|
|
|
|
|
PoetrySection : name Option
|
|
|
|
|
PoetrySection : dependencies HashMap
|
|
|
|
|
<<private>> ToolSection
|
|
|
|
|
ToolSection : poetry PoetrySection
|
|
|
|
|
<<private>> PyprojectToml
|
|
|
|
|
PyprojectToml : project Option
|
|
|
|
|
PyprojectToml : tool ToolSection
|
|
|
|
|
WalkdirDiscovery : +new() -] Self
|
|
|
|
|
WalkdirDiscovery : -detect_language(path Path) -] Option[Language]
|
|
|
|
|
WalkdirDiscovery : -is_excluded(path Path, root Path, excludes [String]) -] bool
|
|
|
|
|
ExtractionContext : elements Vec
|
|
|
|
|
ExtractionContext : relationships Vec
|
|
|
|
|
ExtractionContext : warnings Vec
|
|
|
|
|
ExtractionContext : local_types HashSet
|
|
|
|
|
ExtractionContext : file_path FilePath
|
|
|
|
|
ExtractionContext : +new(file_path FilePath) -] Self
|
|
|
|
|
ExtractionContext : +add_element(element CodeElement)
|
|
|
|
|
ExtractionContext : +add_relationship(rel Relationship)
|
|
|
|
|
ExtractionContext : +add_warning(file_path FilePath, line usize, message str)
|
|
|
|
|
ExtractionContext : +file_path() -] FilePath
|
|
|
|
|
ExtractionContext : +into_result() -] Result[AnalysisResult, DomainError]
|
|
|
|
|
TreeSitterAnalyzer : rust RustExtractor
|
|
|
|
|
TreeSitterAnalyzer : python PythonExtractor
|
|
|
|
|
TreeSitterAnalyzer : +new() -] Self
|
|
|
|
|
TreeSitterAnalyzer : -extractor_for(language Language) -] Option[dyn LanguageExtractor]
|
|
|
|
|
FileOutputWriter : output_path OutputPath
|
|
|
|
|
FileOutputWriter : +new(output_dir PathBuf) -] Self
|
|
|
|
|
FileOutputWriter : +single_file(path PathBuf) -] Self
|
|
|
|
|
<<private>> OutputPath
|
|
|
|
|
StdoutOutputWriter : +new() -] Self
|
|
|
|
|
<<private>> RawRules
|
|
|
|
|
RawRules : allow Vec
|
|
|
|
|
RawRules : deny Vec
|
|
|
|
|
<<private>> RawConfig
|
|
|
|
|
RawConfig : analysis RawAnalysis
|
|
|
|
|
RawConfig : output RawOutput
|
|
|
|
|
RawConfig : modules HashMap
|
|
|
|
|
RawConfig : rules RawRules
|
|
|
|
|
<<private>> RawAnalysis
|
|
|
|
|
RawAnalysis : exclude Vec
|
|
|
|
|
RawAnalysis : level Option
|
|
|
|
|
<<private>> RawOutput
|
|
|
|
|
RawOutput : format Option
|
|
|
|
|
RawOutput : path Option
|
|
|
|
|
RawOutput : split_by_module bool
|
|
|
|
|
TomlConfigLoader : raw RawConfig
|
|
|
|
|
TomlConfigLoader : +from_path(path Path) -] Result[Self, DomainError]
|
|
|
|
|
TomlConfigLoader : -parse_level(level Option[String]) -] DiagramLevel
|
|
|
|
|
D2Renderer : level DiagramLevel
|
|
|
|
|
D2Renderer : +new() -] Self
|
|
|
|
|
D2Renderer : +with_level(level DiagramLevel) -] Self
|
|
|
|
|
HtmlRenderer : +new() -] Self
|
|
|
|
|
<<private>> GraphData
|
|
|
|
|
GraphData : nodes Vec
|
|
|
|
|
GraphData : edges Vec
|
|
|
|
|
<<private>> NodeData
|
|
|
|
|
NodeData : id String
|
|
|
|
|
NodeData : label String
|
|
|
|
|
NodeData : module String
|
|
|
|
|
NodeData : kind String
|
|
|
|
|
NodeData : fields Vec
|
|
|
|
|
NodeData : methods Vec
|
|
|
|
|
<<private>> EdgeData
|
|
|
|
|
EdgeData : source String
|
|
|
|
|
EdgeData : target String
|
|
|
|
|
EdgeData : kind String
|
|
|
|
|
CargoWorkspaceAnalyzer : +new() -] Self
|
|
|
|
|
<<private>> WorkspaceToml
|
|
|
|
|
WorkspaceToml : workspace Option
|
|
|
|
|
<<private>> WorkspaceSection
|
|
|
|
|
WorkspaceSection : members Vec
|
|
|
|
|
<<private>> MemberToml
|
|
|
|
|
MemberToml : package Option
|
|
|
|
|
MemberToml : dependencies HashMap
|
|
|
|
|
<<private>> PackageSection
|
|
|
|
|
PackageSection : name String
|
|
|
|
|
Cli : command Option
|
|
|
|
|
Cli : path PathBuf
|
|
|
|
|
Cli : level String
|
|
|
|
|
Cli : format String
|
|
|
|
|
Cli : output Option
|
|
|
|
|
Cli : config Option
|
|
|
|
|
Cli : scope Option
|
|
|
|
|
Cli : exclude Vec
|
|
|
|
|
Cli : include_tests bool
|
|
|
|
|
Cli : no_weights bool
|
|
|
|
|
Cli : watch bool
|
|
|
|
|
Cli : since Option
|
|
|
|
|
Cli : split_by_module bool
|
|
|
|
|
Cli : strict bool
|
|
|
|
|
Cli : check bool
|
|
|
|
|
Cli : verbose u8
|
|
|
|
|
AnalyzeCodebase : file_discovery F
|
|
|
|
|
AnalyzeCodebase : source_analyzer S
|
|
|
|
|
AnalyzeCodebase : +new(file_discovery F, source_analyzer S) -] Self
|
|
|
|
|
@@ -344,16 +346,22 @@ classDiagram
|
|
|
|
|
AnalyzeCodebaseResult : warnings Vec
|
|
|
|
|
AnalyzeCodebaseResult : +graph() -] NormalizedGraph
|
|
|
|
|
AnalyzeCodebaseResult : +warnings() -] [AnalysisWarning]
|
|
|
|
|
BuildCodeGraphResult : graph NormalizedGraph
|
|
|
|
|
BuildCodeGraphResult : warnings Vec
|
|
|
|
|
BuildCodeGraph : discovery F
|
|
|
|
|
BuildCodeGraph : source_analyzer S
|
|
|
|
|
BuildCodeGraph : project_analyzer Option
|
|
|
|
|
BuildCodeGraph : +execute(root Path, config AnalysisConfig, level DiagramLevel) -] Result[BuildCodeGraphResult, DomainError]
|
|
|
|
|
DiffResult : added Vec
|
|
|
|
|
DiffResult : removed Vec
|
|
|
|
|
DiffResult : +is_empty() -] bool
|
|
|
|
|
DiffDiagram : graph a NormalizedGraph
|
|
|
|
|
DiffDiagram : renderer a dyn DiagramRenderer
|
|
|
|
|
DiffDiagram : existing_path a std path Path
|
|
|
|
|
DiffDiagram : existing_content a str
|
|
|
|
|
DiffDiagram : +execute() -] Result[DiffResult, DomainError]
|
|
|
|
|
CheckFreshness : graph a NormalizedGraph
|
|
|
|
|
CheckFreshness : renderer a dyn DiagramRenderer
|
|
|
|
|
CheckFreshness : existing_path a std path Path
|
|
|
|
|
CheckFreshness : existing_content a str
|
|
|
|
|
CheckFreshness : +execute() -] Result[bool, DomainError]
|
|
|
|
|
GenerateDiagramResult : violations Vec
|
|
|
|
|
GenerateDiagramResult : output RenderOutput
|
|
|
|
|
@@ -362,10 +370,7 @@ classDiagram
|
|
|
|
|
GenerateDiagram : allow_rules Vec
|
|
|
|
|
GenerateDiagram : deny_rules Vec
|
|
|
|
|
GenerateDiagram : split_by_module bool
|
|
|
|
|
GenerateDiagram : format_ext String
|
|
|
|
|
GenerateDiagram : output_dir Option
|
|
|
|
|
GenerateDiagram : +execute() -] Result[(), DomainError]
|
|
|
|
|
GenerateDiagram : +check_violations_only() -] Vec[String]
|
|
|
|
|
GenerateDiagram : +execute() -] Result[GenerateDiagramResult, DomainError]
|
|
|
|
|
SourceFile --> FilePath
|
|
|
|
|
SourceFile --> Language
|
|
|
|
|
RuleViolation --> RuleKind
|
|
|
|
|
@@ -401,5 +406,6 @@ classDiagram
|
|
|
|
|
HtmlRenderer <|-- DiagramRenderer
|
|
|
|
|
CargoWorkspaceAnalyzer <|-- ProjectAnalyzer
|
|
|
|
|
AnalyzeCodebaseResult --> NormalizedGraph
|
|
|
|
|
BuildCodeGraphResult --> NormalizedGraph
|
|
|
|
|
GenerateDiagramResult --> RenderOutput
|
|
|
|
|
GenerateDiagram --> NormalizedGraph
|