Patch Changes
-
#2074
b08ab1e5
Thanks @JacobMGEvans! - The type command aggregates bindings and custom module rules from config, then generates a DTS file for both service workers'declare global { ... }
or module workers'interface Env { ... }
Custom module rules generate
declare module
s based on the module type (Text
,Data
orCompiledWasm
).
Module Example Outputs:CompiledWasm
declare module "**/*.wasm" { const value: WebAssembly.Module; export default value; }
Data
declare module "**/*.webp" { const value: ArrayBuffer; export default value; }
Text
declare module "**/*.text" { const value: string; export default value; }
-
#2065
14c44588
Thanks @CarmenPopoviciu! - fix(pages):wrangler pages dev
matches routing rules in_routes.json
too looselyCurrently, the logic by which we transform routing rules in
_routes.json
to
regular expressions, so we can performpathname
matching & routing when we
runwrangler pages dev
, is too permissive, and leads to serving incorrect
assets for certain url paths.For example, a routing rule such as
/foo
will incorrectly match pathname
/bar/foo
. Similarly, pathname/foo
will be incorrectly matched by the
/
routing rule.
This commit fixes our routing rule to pathname matching logic and brings
wrangler pages dev
on par with routing in deployed Pages projects. -
#2098
2a81caee
Thanks @threepointone! - feat: delete site/assets namespace when a worker is deletedThis patch deletes any site/asset kv namespaces associated with a worker when
wrangler delete
is used. It finds the namespace associated with a worker by using the names it would have otherwise used, and deletes it. It also does the same for the preview namespace that's used withwrangler dev
. -
#2091
9491d86f
Thanks @JacobMGEvans! - Wrangler deployments command
Added support for the deployments command, which allows you to list the last ten deployments for a given script.The information will include:
- Version ID
- Version number
- Author email
- Latest deploy
- Created on
resolves #2089
-
#2068
2c1fd9d2
Thanks @mrbbot! - Fixed issue where information and warning messages from Miniflare were being
discarded when usingwrangler dev --local
. Logs from Miniflare will now be
coloured too, if the terminal supports this.