Patch Changes
-
1fdcfe3: Subfolder Relative Pathing Fix issue #147
The filename from args didn't handle relative paths passed in from users with scripts in subfolders.
To handle the subfolder pathing a path.relative using cwd() to user input filepath to the filepath variable passed into Dev -
0330ecf: Adds the Content-Type header when serving assets with
wrangler pages dev
. It guesses the mime-type based on the asset's file extension. -
eaf40e8: Improve the error message for bad
kv:namespace delete
commands -
562d3ad: chore: enable eslint's no-shadow rule
-
9cef492: Adds the logic of @cloudflare/pages-functions-compiler directly into wrangler. This generates a Worker from a folder of functions.
Also adds support for sourcemaps and automatically watching dependents to trigger a re-build.
-
3426c13: fix: prevent
useWorker
's inifinite restarts duringdev
-
e9a1820: Upgrade
miniflare
to2.0.0-rc.5
-
7156e39: Pass bindings correctly to miniflare/child_process.spawn in
dev
, to prevent miniflare from erroring out on startup -
ce2d7d1: Add experimental support for worker-to-worker service bindings. This introduces a new field in configuration
experimental_services
, and serialises it when creating and uploading a worker definition. This is highly experimental, and doesn't work withwrangler dev
yet. -
072566f: Fixed KV getNamespaceId preview flag bug
-
5856807: Improve validation message for
kv:namespace create
Previously, if the user passed multiple positional arguments (which is invalid)
the error message would suggest that these should be grouped in quotes.
But this is also wrong, since a namespace binding name must not contain spaces. -
34ad323: Refactor the way we convert configurations for bindings all the way through to the API where we upload a worker definition. This commit preserves the configuration structure (mostly) until the point we serialise it for the API. This prevents the way we use duck typing to detect a binding type when uploading, makes the types a bit simpler, and makes it easier to add other types of bindings in the future (notably, the upcoming service bindings.)