dart_inspect 1.0.2
dart_inspect: ^1.0.2 copied to clipboard
Dart source inspection tool and CLI for reporting imports, classes, and fields using the analyzer AST, with Markdown and programmatic support.
1.0.2 #
-
Added Mermaid output format support:
- CLI option
--mermaidto generate Mermaid class diagrams. DartInspectOptionsincludesmermaidflag with validation againstmarkdown.DartInspectReporterMermaidreporter generates MermaidclassDiagramoutput with classes, fields, and relationships.ReportInfosubclasses (DartClassFields,DartImportInfo,DartFileImports) implementtoMermaid()for Mermaid serialization.- CLI enforces mutually exclusive output formats:
--simple(default),--markdown,--mermaid. - README updated with Mermaid usage instructions, examples, and format notes.
- CLI option
-
Refactored reporters:
- Introduced abstract base class
DartInspectReporterfor output format implementations. DartInspectReporterSimpleandDartInspectReporterMarkdownrefactored to use the new base class.
- Introduced abstract base class
-
dart_inspect.dartCLI:- Simplified output logic by delegating to reporter classes.
- Added validation for mutually exclusive format options.
- Added Mermaid format support.
-
DartInspectOptions:- Added
mermaidboolean flag. - Updated
simplegetter to excludemermaidandmarkdown. - Added assertions to prevent incompatible options (
markdownandmermaid).
- Added
-
ReportInfoclasses:- Added
toMermaid()method to support Mermaid output. DartClassFields.toMermaid()outputs Mermaid class with fields.DartImportInfo.toMermaid()outputs Mermaid dependency edges with optional labels.DartFileImports.toMermaid()outputs Mermaid class node and import edges.
- Added
-
Updated
pubspec.yamldependencies:testto ^1.31.0dependency_validatorto ^5.0.5
1.0.1 #
bin/dart_inspect.dart:- Reduced Markdown output separator from 80 dashes to 3 dashes to save tokens.
1.0.0 #
- Initial version.