Replies: 1 comment
-
This would be a great addition to denoflare proper, similar to the existing local memory R2 bucket implementation InMemoryR2Bucket which can be configured in local development with an R2 binding of If you submit a PR with a new class |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When I've run denoflare serve on my worker I noticed Key-Value store is not implemented locally:
I would need a mock KV for my tests so I'd like to try porting the mock implementation from edge-mock:
https://github.com/samuelcolvin/edge-mock/blob/11e6c03e3649d9c84cf1f1fad7bdabe9f86f9d18/src/kv_namespace.ts#L34
Does this sound like a good idea? Would this mock KV find an audience with the rest of Denoflare users?
My current idea is that the mock KV would be implemented as a part of a global this to be able to retain a reference to it between requests. Or maybe I could make it a part of some persistent Denoflare instance? For now I know I need to reuse typedefs
KVNamespace, KVListResult, KVListResultKey
fromcommon/cloudflare_workers_types.d.ts
Please do comment.
Beta Was this translation helpful? Give feedback.
All reactions