Skip to content

Refactor Cloudflare Workers integration and improve logging - #9

Merged
chihebnabil merged 2 commits into
mainfrom
fix/tanstack-event
Jun 29, 2026
Merged

Refactor Cloudflare Workers integration and improve logging#9
chihebnabil merged 2 commits into
mainfrom
fix/tanstack-event

Conversation

@chihebnabil

Copy link
Copy Markdown
Contributor

No description provided.

- Updated documentation to clarify the handling of `FLARELOG_API_KEY` in Cloudflare Workers, emphasizing the use of `cloudflare:workers` for env bindings.
- Refactored `auto-logger` to lazily resolve environment variables from `cloudflare:workers` and `process.env`, improving compatibility with various runtime configurations.
- Removed reliance on `getRequestEvent()` from `@tanstack/react-start`, aligning with the stable v1 API.
- Introduced ambient type definitions for `cloudflare:workers` to support TypeScript type checking without requiring external dependencies.
- Enhanced tests to simulate Cloudflare Workers environment bindings, ensuring accurate logging behavior and environment resolution.
- Improved status extraction logic in `tanstackStartMiddleware` to handle various response shapes, ensuring correct log level mapping based on HTTP status codes.
@github-actions

Copy link
Copy Markdown

Bundle Size Report

File Size (gzip)
frameworks/cf-workers.js 143B
frameworks/express.js 666B
frameworks/hono.js 686B
frameworks/next.js 1.1KiB
frameworks/react.js 777B
frameworks/tanstack-start.js 1.1KiB
frameworks/vercel.js 147B

Total dist size (raw): 892K

@chihebnabil
chihebnabil merged commit 50f0262 into main Jun 29, 2026
7 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