Skip to content

Add Cloudflare Workers rendering and an invoice starter - #45

Merged
krflol merged 8 commits into
mainfrom
fix/engine-2-5-29
Oct 21, 2026
Merged

krflol merged 8 commits into
mainfrom
fix/engine-2-5-29

Conversation

@krflol

@krflol krflol commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Cloudflare Workers can now import renderPdf from fullbleed/cloudflare. Wrangler bundles the pinned 2.5.29 engine and fonts; the renderer uses a fresh synchronous Wasm instance and supports HTML/CSS, components, assets and optional PNG previews. The existing Node and browser APIs retain their cancellation and isolation behavior.

The entry rejects unsupported timeout/abort/isolation options and bounds source and caller asset bytes. A complete invoice starter validates JSON, calculates integer-cent totals, returns private PDF attachments, and keeps public deployment URLs disabled. Its Northstar template and styling are editable.

Qualification is local workerd only. Hosted CPU/memory/startup behavior and free-plan suitability are explicitly unverified. Package version 0.8.0 keeps the engine dependency at 2.5.29.

Validation: 101 Node tests, 42 Python checks, all TypeScript surfaces, isolated tarball installation, and real workerd PDF/PNG comparisons with Node. Adapter and starter checks cover assets/fonts, styled components, long invoices, bounded input, errors and recovery; PDFs are independently read and previews visually reviewed. CI and the publish gate now require matching Windows/Linux Workers evidence alongside the existing Node/browser matrix.

@krflol
krflol merged commit 1d3d45d into main Oct 21, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant