clone

a browser-first diagram editor with live svg previews, local drafts and encrypted, accountless sharing

main
diagramzip / renderers / edge / artifacts / dbml / dbml-provenance.md
dbml-provenance.md 1.4K source

DBML renderer provenance

The edge DBML adapter retains the parser, checker, and DOT renderer from @softwaretechnik/dbml-renderer 1.0.31. The package is published as CommonJS but its source/dependency graph includes mixed module formats, so the Worker artifact is rebuilt explicitly with the repository's pinned esbuild:

npm ci
npm run build:dbml

The build bundles toolchains/dbml/entry.ts as an ESM artifact after a fail-closed build-time transform removes the unused SVG/Viz branch and the upstream parser's console.debug of Zod errors. DBML requests call the upstream run(source, "dot") path, then the shared GraphViz-Wasm runtime renders SVG. No parser grammar was rewritten and no filesystem/network access is available at runtime. Every rebuild must reproduce the expected DOT output for the package's complete published example corpus before the script exits.

The original compatibility image used GraphViz 2.47.0. The edge family uses GraphViz 15.1.1, so layout and SVG details can differ while DBML language coverage remains provided by the upstream parser.