Skip to content

Commit 4f0b374

Browse files
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 Lyons
1 parent fb85252 commit 4f0b374

39 files changed

Lines changed: 311 additions & 161 deletions

File tree

THIRD_PARTY_LICENSES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ This script:
6161

6262
---
6363

64-
**Last generated**: 2025-10-25
64+
**Last generated**: 2025-10-26

archlette.config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,30 @@ extractors:
2727
- use: extractors/builtin/basic-wrangler
2828
inputs:
2929
include:
30+
- '/users/chris/git/bond-math/ui/wrangler.toml'
3031
- '/users/chris/git/bond-math/iac/workers/daycount.toml'
3132
- '/users/chris/git/bond-math/iac/workers/gateway.toml'
3233
- '/users/chris/git/bond-math/iac/workers/metrics.toml'
3334
- '/users/chris/git/bond-math/iac/workers/pricing.toml'
3435
- '/users/chris/git/bond-math/iac/workers/valuation.toml'
3536

37+
- use: extractors/builtin/basic-node
38+
inputs:
39+
include:
40+
- '/users/chris/git/bond-math/ui/**/*.js'
41+
- '/users/chris/git/bond-math/ui/**/*.cjs'
42+
- '/users/chris/git/bond-math/ui/**/*.mjs'
43+
- '/users/chris/git/bond-math/ui/**/*.jsx'
44+
- '/users/chris/git/bond-math/ui/**/*.ts'
45+
- '/users/chris/git/bond-math/ui/**/*.tsx'
46+
exclude:
47+
- '**/node_modules/**'
48+
- '**/*.test.*'
49+
- '**/*.spec.*'
50+
- '**/test/**'
51+
- '**/tests/**'
52+
- '**/vitest.config.ts'
53+
3654
- use: extractors/builtin/basic-node
3755
inputs:
3856
include:

docs/architecture/README.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/architecture/aac-ir.json

Lines changed: 60 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)