feat(graph): add plantuml output format#528
Conversation
Add plantuml to azd app graph --output. It emits a PlantUML component diagram (@startuml/@enduml) with services as components, resources as databases, and dependency edges, matching the existing mermaid and dot renderers. Works with --output-file and --focus. Closes #525 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Website Preview Your PR preview is ready! 📎 Preview URL: https://jongio.github.io/azd-app/pr/528/ This preview will be automatically cleaned up when the PR is closed. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #528 +/- ##
==========================================
+ Coverage 60.77% 60.79% +0.02%
==========================================
Files 223 223
Lines 28527 28559 +32
==========================================
+ Hits 17337 17363 +26
- Misses 10010 10015 +5
- Partials 1180 1181 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
🚀 Test This PRA preview build ( 🌐 Website PreviewLive Preview: https://jongio.github.io/azd-app/pr/528/ One-Line Install (Recommended)PowerShell (Windows): iex "& { $(irm https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/install-pr.ps1) } -PrNumber 528 -Version 0.19.5-pr528"Bash (macOS/Linux): curl -fsSL https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/install-pr.sh | bash -s 528 0.19.5-pr528UninstallWhen you're done testing: PowerShell (Windows): iex "& { $(irm https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/uninstall-pr.ps1) } -PrNumber 528"Bash (macOS/Linux): curl -fsSL https://raw.githubusercontent.com/jongio/azd-app/main/cli/scripts/uninstall-pr.sh | bash -s 528Build Info:
What to Test: |
What
Adds
plantumlas an output format forazd app graph.azd app graph --output plantumlemits a PlantUML component diagram you can paste into docs or render with any PlantUML tool.Why
The command already produces Mermaid and Graphviz DOT. PlantUML is a common choice for architecture docs and is supported by many wikis and IDE plugins. This adds it alongside the existing diagram formats without changing any of them.
Details
plantumlvalue for--output(-o).@startuml/@enduml.component, resources render asdatabase, so the two are easy to tell apart.-->with sanitized aliases, reusing the same alias generator as the Mermaid renderer.titleline is emitted from the project name and omitted when the project is empty.--output-fileand--focus, same as the other formats.Tests
TestRenderGraphPlantUML,TestRenderGraphPlantUMLNoProject, andTestEscapePlantUMLLabelcover the rendered structure, the empty-project case, and label escaping.go build ./..., the commands package tests, andgolangci-lintall pass.Closes #525