Commit 4f0b374
authored
feat: improve container description and DSL generation for cloudflare wrangler sources #30
Enhanced the wrangler extractor with better metadata extraction, type
derivation, and DSL compatibility fixes.
## Description Extraction
- Add support for @description comment tags in wrangler.toml files
- Fix Windows line ending issue preventing @description extraction
- Improve default description format: use "Type: name" instead of verbose
technical details (Entry/Compatibility)
- Prioritize user-provided @description over auto-generated defaults
## Type Derivation
- Detect container type from wrangler.toml structure
- Containers with 'main' field → "Cloudflare Worker"
- Future-ready for Pages, Durable Objects detection
## Theme Styling
- Include container type as tag in DSL generation
- Enables Structurizr theme matching (e.g., Cloudflare Worker styling)
- Maintains backward compatibility with existing tags
## DSL Generation Fixes
- Fix newline handling in escapeString function
- Replace literal newlines with spaces (Structurizr DSL doesn't support \n)
- Collapse multiple spaces for cleaner output
- Resolves PlantUML export parse errors
These changes improve diagram clarity and enable proper visual styling
for Cloudflare Workers in generated architecture diagrams.
Written-by: Chris Lyons1 parent fb85252 commit 4f0b374
39 files changed
Lines changed: 311 additions & 161 deletions
File tree
- docs/architecture
- diagrams
- mermaid
- plantuml
- src
- extractors/builtin/basic-wrangler
- generators/builtin
- templates
- test
- extractors/builtin/basic-wrangler
- generators/builtin
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
36 | 54 | | |
37 | 55 | | |
38 | 56 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments