miniflare
miniflare copied to clipboard
π₯ Fully-local simulator for Cloudflare Workers. For the latest version, see https://github.com/cloudflare/workers-sdk/tree/main/packages/miniflare.
`bindings.d.ts` required to set `window` and `importScript` global to undefined in order to load libsodium wasm correctly ```ts export {}; declare global { const USERS: KVNamespace; var window: any; var...
When using the Node REPL programatically, a history file is not initialised by default. This requires calling the [`setupHistory`](https://nodejs.org/api/repl.html#replserversetuphistoryhistorypath-callback) function. We should also respect similar [environment variables](https://nodejs.org/api/repl.html#environment-variable-options) to Node.
"Some functionality can only be performed while handling a request" whenever running in a debugger
My project runs fine using a regular start/dev command. However, whenever a debugger from VSCode or WebStorm attaches itself to the process, all requests subequently fail with ``` GET /myurl...
For example, `0 3 L * FRI` is a valid expression and works with actual Worker. > https://developers.cloudflare.com/workers/platform/cron-triggers/#supported-cron-expressions But with `miniflare`, it throws `[mf:err] SchedulerError [ERR_INVALID_CRON]: Unable to parse CRON...
The `cf` object is only partially implemented. Miniflare supports `cacheKey`, `cacheTtl` and `cacheTtlByStatus`, but not `cacheEverything`. It would be great if this very useful option cached correctly!
If a key *exists* in the cache, Miniflare will always return the matching `Response` on `match()`. This is not always correct: we should be calling [`satisfiesWithoutRevalidation`](https://www.npmjs.com/package/http-cache-semantics#satisfieswithoutrevalidationnewrequest) from [`http-cache-semantics`](https://www.npmjs.com/package/http-cache-semantics) first. There...
When using this in my `wrangler.toml`: ```toml [[build.upload.rules]] type = "Data" globs = ["**/*.html"] ``` And this in my `worker.mjs`: ```js import HTML from "chat.html"; ``` `miniflare` runs fine. But...
Hi! Thanks for miniflare - life saver π I'm developing various image resizing APIs for our site, and have a tough time testing the functionality locally because the current behaviour...
When using Workers Site, `import manifestJSON from '__STATIC_CONTENT_MANIFEST'` imports a variable `manifestJSON`Β that contains the JSON manifest, encoded as string, which lists all files in the Site. Using Miniflare, that...