-
Notifications
You must be signed in to change notification settings - Fork 147
Add adapters for Cloudflare D1 (binding & http) #717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…nt with class name
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #717 +/- ##
==========================================
+ Coverage 86.80% 86.85% +0.04%
==========================================
Files 100 102 +2
Lines 15991 16306 +315
Branches 3816 3831 +15
==========================================
+ Hits 13881 14162 +281
- Misses 2110 2144 +34 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Started my demo here: nerdfolio#1 |
…re wrangler; disable d1 transaction tests
I added tests for d1 using wrangler getPlatformProxy, removed h3 as peer dev, and made some minor fixes to make typescript happy for the Are we merge-ready? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks promising.
Do we need worker-configuration.d.ts
in source code ? Or it's generated at some point and we could git ignore it ?
Would be nice to add the doc for d1
& d1-http
(One page or One each, I don't know), similar to: https://github.com/remult/remult/edit/main/docs/docs/installation/database/duckdb.md
Thank you for all this & running tests 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand remult-d1-http
is not providing much, no ?
Or you have to have it with remult-d1
? I mean, you will use one or the other or both ?
I'm not sure what test to add to this http
binding.
Just to be sure, you are using this in your project (userland), so there is no timing pressure to have this in remult core, right ? We will make it, just, I would like to do it properly ;)
Thank you very much for your contributions 🎉
It would be nice to have this merged into remult so I don't have to maintain a local version. Chances are it will be only me that's using it for next next few weeks to workout kinks if any. Easier to do that if the code is merged imo, but your call. As for |
Hey Tai 👋, We are not that comfortable in publishing Thanks a lot. Side question, your code is also on Cloudflare ? Or just |
@taivo alternatively - if you have working tests for http that require a cloud account for it. you can store that account in an environment variable - and run the tests on your machine before you push. Later we'll add an environment variable on the CI to run these tests there - but I want to make sure that its covered and tested before we add this to the root of our public api |
No problem, guys. Give me a few days. I'll set up d1-http tests. Keep up the good work! |
Adapters for Cloudflare D1. Includes
createD1DataProvider
andcreateD1HttpDataProvider
to demonstrate usage.There is also a few minor type fixes and dependency updates to get
npm run build
to work (this is independent of the D1 additions).