π 1.11.0
-
Features
-
New configuration method with
wrangler login
- jspspike, pull/1471wrangler login
allows you to authenticate Wrangler to use your Cloudflare user credentials without hunting down an API token in the Cloudflare dashboard. It's straightforward! Just runwrangler login
, enter your credentials, and you're off to the races. -
wrangler dev
now runs on the same machines as your production code - EverlastingBugstopper avidal jwheels, pull/1085When running
wrangler dev
as an authenticated user, your requests will now run on the same servers that Cloudflare Workers run on in production. This means that what you see is what you get.wrangler dev
should behave exactly like production, though we still recommend deploying to a staging website before going to production in order to ensure your changes are safe. This change means you get access to things likerequest.cf
, the Cache API, and any Cloudflare settings you've applied in the dashboard while developing your Workers. -
wrangler dev
now supports redirects - jspspike, issue/1508 pull/1512When an HTTP response status code is between 300 and 399, the server lets the client know that the data they're looking for isn't here anymore, and the client should issue another separate request to the endpoint denoted in the
Location
header of the response. Before, if you were developing withwrangler dev
onexample.com
, and your Worker issued a redirect fromhttps://example.com/oldurl
tohttps://example.com/newurl
, that's what would be in theLocation
header. This meant that whatever client you were using would then issue their second request to the public Internet rather than thewrangler dev
server running on your local machine. With this release, theLocation
header would now be rewritten tohttp://127.0.0.1:8787/newurl
, preventing your client from redirecting you away from the Worker you're trying to develop. -
Add
--config
flag to all commmands to override the defaultwrangler.toml
configuration file path - luanraithz, issue/1064 pull/1350All commands that read from a configuration file can now use a different configuration file path if the
--config
flag is specified. The commands affected are:kv:namespace
,kv:key
,kv:bulk
,route
,secret
,build
,preview
,dev
,publish
,subdomain
, andtail
. -
wrangler dev
configuration options for HTTP protocol - jspspike, issue/1204 pull/1485wrangler dev
now takes two additional configuration flags:--upstream-protocol
and--local-protocol
. Both of these take a value of eitherhttp
orhttps
.--upstream-protocol
determines what protocol the request going to your preview worker is (previously this was only controlled with the--host
flag) - this flag defaults tohttps
.--local-protocol
determines what protocolwrangler dev
listens for and defaults tohttp
. Ifhttps
is chosen, a self-signed certificate will be auto-generated for the dev server. -
wrangler dev
can be configured inwrangler.toml
- jspspike, issue/1282 pull/1477Any flag taken by
wrangler dev
(except--host
) can now be configured in the[dev]
section of yourwrangler.toml
. This allows different developers on the same project to share and persist settings for their local development environment. -
Check if
rustc
is installed before building a Rust project - ObsidianMinor, issue/487 pull/1461 -
Improve
preview_id
error message - EverlastingBugstopper, issue/1458 pull/1465When a
preview_id
is needed, the error message directs the user to add it to theirwrangler.toml
. -
Prevent
wrangler preview
andwrangler dev
for a Workers Site if there is no authenticated user - jspspike, issue/1138 pull/1447
-
-
Fixes
-
Fix
wrangler route
commands that take an--env
flag - jspspike, issue/1216 pull/1448Before, if you passed an environment to a
wrangler route
command, it wouldn't work properly due to some mishandling of the arguments in the way we used our command line argument parser. This is now fixed andwrangler route
commands work as expected. -
Open browser as child process - jspspike, issue/516 pull/1495
When running
wrangler preview
, the browser is now opened as a child process. This fixes an issue on Linux where Wrangler would start the browser and then hang waiting for the browser to exit before it begins watching for changes. -
Direct cloudflared output with
wrangler tail
to/dev/null
- jspspike, issue/1432 pull/1450
-
-
Maintenance
-
Workers Unlimited is now Workers Bundled - EverlastingBugstopper, issue/1466 pull/1467
-
Replace
assert
with==
in tests withassert_eq
- sudheesh001, pull/1455 -
Various typo fixes - sudheesh001 jbampton, pull/1423 pull/1427 pull/1428 pull/1429 pull/1431 pull/1443 pull/1454
-
Removed unreachable code in
main.rs
- luanraithz, pull/1444
-