Releases: cloudflare/workers-sdk
[email protected]
Patch Changes
-
#1577
359d0ba3
Thanks @threepointone! - chore: update esbuild to 0.14.51 -
#1558
b43a7f98
Thanks @rozenmd! - chore: extract devProps parsing into own function -
#1438
0a9fe918
Thanks @caass! - Initial implementation ofwrangler generate
wrangler generate
andwrangler generate <name>
delegate towrangler init
.wrangler generate <name> <template>
delegates tocreate-cloudflare
Naming behavior is replicated from wrangler 1, and will auto-increment the
worker name based on pre-existing directories. -
#1534
d3ae16cf
Thanks @cameron-robey! - feat: publish full url onwrangler publish
for workers.dev workersWhen the url is printed out on
wrangler publish
, the full url is printed out so that it can be accessed from the terminal easily by doing cmd+click. Implemented only for workers.dev workers.Resolves #1530
-
#1552
e9307365
Thanks @Skye-31! - fix: invalid regular expression error (pages) -
#1576
f696ebb5
Thanks @petebacondarwin! - feat: add platform/os to usage metrics events -
#1576
f696ebb5
Thanks @petebacondarwin! - fix: rename pages metrics events to align better with the dashboard -
#1550
aca9c3e7
Thanks @cameron-robey! - feat: describe current permissions inwrangler whoami
Often users experience issues due to tokens not having the correct permissions associated with them (often due to new scopes being created for new products). With this, we print out a list of permissions associated with OAuth tokens with the
wrangler whoami
command to help them debug for OAuth tokens. We cannot access the permissions on an API key, so we direct the user to the location in the dashboard to achieve this.
We also cache the scopes of OAuth tokens alongside the access and refresh tokens in the .wrangler/config file to achieve this.Currently unable to implement #1371 - instead directs the user to the dashboard.
Resolves #1540 -
#1575
5b1f68ee
Thanks @JacobMGEvans! - feat: legacy "kv-namespace" not supported
In previous Wrangler 1, there was a legacy configuration that was considered a "bug" and removed.
Before it was removed, tutorials, templates, blogs, etc... had utlized that configuration property
to handle this in Wrangler 2 we will throw a blocking error that tell the user to utilize "kv_namespaces"resolves #1421
-
#1404
17f5b576
Thanks @threepointone! - feat: add cache control options toconfig.assets
This adds cache control options to
config.assets
. This is already supported by the backing library (@cloudflare/kv-asset-handler
) so we simply pass on the options at its callsite.Additionally, this adds a configuration field to serve an app in "single page app" mode, where a root index.html is served for all html/404 requests (also powered by the same library).
-
#1578
cf552192
Thanks @cameron-robey! - feat: source-map function namesFollowing on from #1535, using new functionality from esbuild v0.14.50 of generation of
names
field in generated sourcemaps, we output the original function name in the stack trace. -
#1503
ebc1aa57
Thanks @threepointone! - feat: zero config multiworker development (local mode)Preamble: Typically, a Worker has been the unit of a javascript project on our platform. Any logic that you need, you fit into one worker, ~ 1MB of javascript and bindings. If you wanted to deploy a larger application, you could define different workers on different routes. This is fine for microservice style architectures, but not all projects can be cleaved along the route boundaries; you lose out on sharing code and resources, and can still cross the size limit with heavy dependencies.
Service bindings provide a novel mechanism for composing multiple workers into a unified architecture. You could deploy shared code into a worker, and make requests to it from another worker. This lets you architect your code along functional boundaries, while also providing some relief to the 1MB size limit.
I propose a model for developing multiple bound workers in a single project.
Consider Worker A, at
workers/a.js
, with awrangler.toml
like so:name = 'A' [[services]] binding = 'Bee' service = 'B'
and content like so:
export default { fetch(req, env) { return env.Bee.fetch(req); } };
Consider Worker B, at
workers/b.js
, with awrangler.toml
like so:name = 'B'
and content like so:
export default { fetch(req, env) { return new Response("Hello World"); } };
So, a worker A, bound to B, that simply passes on the request to B.
Local mode:
Currently, when I run
wrangler dev --local
on A (or switch from remote to local mode during a dev session), and make requests to A, they'll fail because the bindings don't exist in local mode.What I'd like, is to be able to run
wrangler dev --local
on B as well, and have my dev instance of A make requests to the dev instance of B. When I'm happy with my changes, I'd simply deploy both workers (again, ideally as a batched publish).Proposal: A local dev registry for workers.
- Running
wrangler dev
on a machine should start up a local service registry (if there isn't one loaded already) as a server on a well known port. - Further, it should then "register" itself with the registry with metadata about itself; whether it's running in remote/local mode, the port and ip its dev server is listening on, and any additional configuration (eg: in remote mode, a couple of extra headers have to be added to every request made to the dev session, so we'd add that data into the registry as well.)
- Every worker that has service bindings configured, should intercept requests to said binding, and instead make a request to the locally running instance of the service. It could rewrite these requests as it pleases.
(In future PRs, we'll introduce a system for doing the same with remote mode dev, as well as mixed mode. )
- Running
-
#1551
1b54b54f
Thanks @threepointone! - internal: middleware for modifying worker behaviourThis adds an internal mechanism for applying multiple "middleware"/facades on to workers. This lets us add functionality during dev and/or publish, where we can modify requests or env, or other ideas. (See #1466 for actual usecases)
As part of this, I implemented a simple facade that formats errors in dev. To enable it you need to set an environment variable
FORMAT_WRANGLER_ERRORS=true
. This isn't a new feature we're shipping with wrangler, it's simply to demonstrate how to write middleware. We'll probably remove it in the future. -
#1486
c4e6f156
Thanks @JacobMGEvans! - feat: commands added for uploading and downloading objects from r2.
[email protected]
Patch Changes
-
#1500
0826f833
Thanks @cameron-robey! - fix: warn when using--no-bundle
with--minify
or--node-compat
Fixes #1491
-
#1523
e1e2ee5c
Thanks @threepointone! - fix: don't log version spam in testsCurrently in tests, we see a bunch of logspam from yargs about "version" being a reserved word, this patch removes that spam.
-
#1498
fe3fbd95
Thanks @cameron-robey! - feat: change version command to give update information
When running version command, we want to display update information if current version is not up to date. Achieved by replacing default output with the wrangler banner.
Previous behaviour (just outputting current version) reamins when !isTTY.
Version command changed from inbuilt .version() from yargs, to a regular command to allow for asynchronous behaviour.Implements #1492
-
#1431
a2e3a6b7
Thanks @Skye-31! - chore: Refactorwrangler pages dev
to use Wrangler-proper's own dev server.This:
- fixes some bugs (e.g. not proxying WebSockets correctly),
- presents a much nicer UI (with the slick keybinding controls),
- adds features that
pages dev
was missing (e.g.--local-protocol
), - and reduces the maintenance burden of
wrangler pages dev
going forward.
-
#1528
60bdc31a
Thanks @threepointone! - fix: prevent local mode restartIn dev, we inject a patch for
fetch()
to detect bad usages. This patch is copied into the destination directory before it's used. esbuild appears to have a bug where it thinks a dependency has changed so it restarts once in local mode. The fix here is to copy the file to inject into a separate temporary dir.Fixes #1515
-
#1502
be4ffde5
Thanks @threepointone! - polish: recommend using an account id when user details aren't available.When using an api token, sometimes the call to get a user's membership details fails with a 9109 error. In this scenario, a workaround to skip the membership check is to provide an account_id in wrangler.toml or via CLOUDFLARE_ACCOUNT_ID. This bit of polish adds this helpful tip into the error message.
-
#1499
7098b1ee
Thanks @cameron-robey! - fix: no feedback onwrangler kv:namespace delete
-
#1479
862f14e5
Thanks @threepointone! - fix: readprocess.env.NODE_ENV
correctly when building workerWe replace
process.env.NODE_ENV
in workers with the value of the environment variable. However, we have a bug where when we make an actual build of wrangler (which has NODE_ENV set as "production"), we were also replacing the expression where we'd replace it in a worker. The result was that all workers would haveprocess.env.NODE_ENV
set to production, no matter what the user had set. The fix here is to use a "dynamic" value for the expression so that our build system doesn't replace it.Fixes #1477
-
#1471
0953af8e
Thanks @JacobMGEvans! - ci: implement CodeCov Integration
CodeCov is used for analyzing code and tests to improve stability and maintainability. It does this by utilizing static code analysis
and testing output to provide insights into things that need improving, security concerns, missing test coverage of critical code, and more,
which can be missed even after exhaustive human review. -
#1516
e178d6fb
Thanks @threepointone! - polish: don't log an error message if wrangler dev startup is interrupted.When we quit wrangler dev, any inflight requests are cancelled. Any error handlers for those requests are ignored if the request was cancelled purposely. The check for this was missing for the prewarm request for a dev session, and this patch adds it so it dorsn't get logged to the terminal.
-
#1496
8eb91142
Thanks @threepointone! - fix: addfetch()
dev helper correctly for pnp style package managersIn #992, we added a dev-only helper that would warn when using
fetch()
in a manner that wouldn't work as expected (because of a bug we currently have in the runtime). We did this by injecting a file that would override usages offetch()
. When using pnp style package managers like yarn, this file can't be resolved correctly. So to fix that, we extract it into the temporary destination directory that we use to build the worker (much like a similar fix we did in #1154)Reported at #1320 (comment)
-
#1529
1a0ac8d0
Thanks @GregBrimble! - feat: Adds the--experimental-enable-local-persistence
option towrangler pages dev
Previously, this was implicitly enabled and stored things in a
.mf
directory. Now we move to be in line with whatwrangler dev
does, defaults disabled, and stores in awrangler-local-state
directory. -
#1514
9271680d
Thanks @threepointone! - feat: addconfig.inspector_port
This adds a configuration option for the inspector port used by the debugger in
wrangler dev
. This also includes a bug fix where we weren't passing on this configuration to local mode.
[email protected]
Patch Changes
-
#1482
9eb28ec
Thanks @petebacondarwin! - fix: do not ask the user for metrics permission if running in a CIFixes #1480
-
#1482
9eb28ec
Thanks @petebacondarwin! - feat: support controlling metrics gathering viaWRANGLER_SEND_METRICS
environment variableSetting the
WRANGLER_SEND_METRICS
environment variable will override any other metrics controls,
such as thesend_metrics
property in wrangler.toml and cached user preference.
[email protected]
Patch Changes
-
#1474
f602df7
Thanks @threepointone! - fix: enable debugger in local modeDuring a refactor, we missed enabling the inspector by default in local mode. We also broke the logic that detects the inspector url exposed by the local server. This patch passes the argument correctly, fixes the detection logic. Further, it also lets you disable the inspector altogether with
--inspect false
, if required (for both remote and local mode).Fixes #1436
-
#1470
01f49f1
Thanks @petebacondarwin! - fix: ensure that metrics user interactions do not break other UIThe new metrics usage capture may interact with the user if they have not yet set their metrics permission.
Sending metrics was being done concurrently with other commands, so there was a chance that the metrics UI broke the other command's UI.
Now we ensure that metrics UI will happen synchronously.
[email protected]
Patch Changes
-
#1410
52fb634
Thanks @petebacondarwin! - feat: add opt-in usage metrics gatheringThis change adds support in Wrangler for sending usage metrics to Cloudflare.
This is an opt-in only feature. We will ask the user for permission only once per device.
The user must grant permission, on a per device basis, before we send usage metrics to Cloudflare.
The permission can also be overridden on a per project basis by settingsend_metrics = false
in thewrangler.toml
.
If Wrangler is running in non-interactive mode (such as in a CI job) and the user has not already given permission
we will assume that we cannot send usage metrics.The aim of this feature is to help us learn what and how features of Wrangler (and also the Cloudflare dashboard)
are being used in order to improve the developer experience. -
#1457
de03f7f
Thanks @rozenmd! - fix: add r2Persist key to miniflare optionsCloses #1454
-
#1463
a7ae733
Thanks @threepointone! - fix: ensure that a helpful error message is shown when on unsupported versions of node.jsOur entrypoint for wrangler (
bin/wrangler.js
) needs to run in older versions of node and log a message to the user that they need to upgrade their version of node. Sometimes we use syntax in this entrypoint that doesn't run in older versions of node. crashing the script and failing to log the message. This fix adds a test in CI to make sure we don't regress on that behaviour (as well as fixing the current newer syntax usage)Fixes #1443
-
#1459
4e425c6
Thanks @sidharthachatterjee! - fix:wrangler pages publish
now more reliably retries an upload in case of a failureWhen
wrangler pages publish
is run, we make calls to an upload endpoint which could be rate limited and therefore fail. We currently retry those calls after a linear backoff. This change makes that backoff exponential which should reduce the likelihood of subsequent calls being rate limited.
[email protected]
Patch Changes
-
#1451
62649097
Thanks @WalshyDev! - Fixed an issue where Pages upload would OOM. This was caused by us loading all the file content into memory instead of only when required. -
#1375
e9e98721
Thanks @JacobMGEvans! - polish: Compliance with the XDG Base Directory Specification
Wrangler was creating a config file in the home directory of the operating system~/.wrangler
. The XDG path spec is a
standard for storing files, these changes include XDG pathing compliance for.wrangler/*
location and backwards compatibility with previous
~/.wrangler
locations.resolves #1053
-
#1449
ee6c421b
Thanks @alankemp! - Output additional information about uploaded scripts at WRANGLER_LOG=log level
[email protected]
Patch Changes
-
#1389
eab9542
Thanks @caass! - Remove delegation message when global wrangler delegates to a local installationA message used for debugging purposes was accidentally left in, and confused some
folks. Now it'll only appear whenWRANGLER_LOG
is set todebug
. -
#1447
16f9436
Thanks @threepointone! - feat: r2 support inwrangler dev --local
This adds support for r2 bindings in
wrangler dev --local
, powered by [email protected] via cloudflare/miniflare#289.Fixes #1066
-
#1406
0f35556
Thanks @rozenmd! - fix: use fork to let wrangler know miniflare is readyThis PR replaces our use of
spawn
in favour offork
to spawn miniflare in wrangler's dev function. This lets miniflare let wrangler know when we're ready to send requests.Closes #1408
-
#1442
f9efc04
Thanks @jrencz! - fix: add missingmetadata
option tokv:key put
Closes #1441
-
#999
238b546
Thanks @caass! - Include devtools in wrangler monorepoPreviously, wrangler relied on @threepointone's built-devtools. Now, these devtools are included in the wrangler repository.
-
#1424
8cf0008
Thanks @caass! - fix: Checkconfig.assets
when deciding whether to include a default entry point.An entry point isn't mandatory when using
--assets
, and we can use a default worker when doing so. This fix enables that same behaviour whenconfig.assets
is configured. -
#1448
0d462c0
Thanks @threepointone! - polish: setcheckjs: false
andjsx: "react"
in newly created projectsWhen we create a new project, it's annoying having to set jsx: "react" when that's the overwhelmingly default choice, our compiler is setup to do it automatically, and the tsc error message isn't helpful. So we set
jsx: "react"
in the generated tsconfig.Setting
checkJs: true
is also annoying because it's not a common choice. So we setcheckJs: false
in the generated tsconfig. -
#1450
172310d
Thanks @threepointone! - polish: tweak static assets facade to log only real errorsThis prevents the abundance of NotFoundErrors being unnecessaryily logged.
-
#1415
f3a8452
Thanks @caass! - Emit type declarations for wranglerThis is a first go-round of emitting type declarations alongside the bundled JS output,
which should make it easier to use wrangler as a library. -
#1433
1c1214f
Thanks @threepointone! - polish: adds an actionable message when a worker name isn't provided to tail/secretJust a better error message when a Worker name isn't available for
wrangler secret
orwrangler tail
.Closes #1380
-
#1427
3fa5041
Thanks @caass! - Checknpm_config_user_agent
to guess a user's package managerThe environment variable
npm_config_user_agent
can be used to guess the package manager
that was used to execute wrangler. It's imperfect (just like regular user agent sniffing!)
but the package managers we support all set this property:
[email protected]
Patch Changes
-
#992
ee6b413
Thanks @petebacondarwin! - fix: add warning tofetch()
calls that will change the requested portIn Workers published to the Edge (rather than previews) there is a bug where a custom port on a downstream fetch request is ignored, defaulting to the standard port.
For example,https://my.example.com:668
will actually send the request tohttps://my.example.com:443
.This does not happen when using
wrangler dev
(both in remote and local mode), but to ensure that developers are aware of it this change displays a runtime warning in the console when the bug is hit.Closes #1320
-
#1378
2579257
Thanks @rozenmd! - chore: fully deprecate thepreview
commandBefore, we would warn folks that
preview
was deprecated in favour ofdev
, but then randev
on their behalf.
To avoid maintaining effectively two versions of thedev
command, we're now just telling folks to rundev
. -
#1213
1bab3f6
Thanks @threepointone! - fix: passroutes
todev
sessionWe can pass routes when creating a
dev
session. The effect of this is when you visit a path that doesn't match the given routes, then it instead does a fetch from the deployed worker on that path (if any). We were previously passing*/*
, i.e, matching all routes in dev; this fix now passes configured routes instead. -
#1374
215c4f0
Thanks @threepointone! - feat: commands to manage worker namespacesThis adds commands to create, delete, list, and get info for "worker namespaces" (name to be bikeshed-ed). This is based on work by @aaronlisman in #1310.
-
#1403
9c6c3fb
Thanks @threepointone! - feat:config.no_bundle
as a configuration option to prevent bundlingAs a configuration parallel to
--no-bundle
(introduced in #1300 as--no-build
, renamed in #1399 to--no-bundle
), this introduces a configuration fieldno_bundle
to prevent bundling of the worker before it's published. It's inheritable, which means it can be defined inside environments as well. -
#1355
61c31a9
Thanks @williamhorning! - fix: Fallback to non-interactive mode on errorIf the terminal isn't a TTY, fallback to non-interactive mode instead of throwing an error. This makes it so users of Bash on Windows can pipe to wrangler without an error being thrown.
resolves #1303
-
#1337
1d778ae
Thanks @JacobMGEvans! - polish: bundle reporter was not printing during publish errorsThe reporter is now called before the publish API call, printing every time.
resolves #1328
-
#1393
b36ef43
Thanks @threepointone! - chore: enable node's experimental fetch flagWe'd previously had some funny behaviour with undici clashing with node's own fetch supporting classes, and had turned off node's fetch implementation. Recent updates to undici appear to have fixed the issue, so let's turn it back on.
Closes #834
-
#1335
49cf17e
Thanks @JacobMGEvans! - feat: resolve--assets
cli arg relative to current working directoryBefore we were resolving the Asset directory relative to the location of
wrangler.toml
at all times.
Now the--assets
cli arg is resolved relative to current working directory.resolves #1333
-
#1350
dee034b
Thanks @rozenmd! - feat: export an (unstable) function that folks can use in their own scripts to invoke wrangler's dev CLICloses #1350
-
#1342
6426625
Thanks @rozenmd! - polish: split dev function out of index.tsx -
#1401
6732d95
Thanks @threepointone! - fix: log pubsub beta usage warnings consistentlyThis fix makes sure the pubsub beta warnings are logged consistently, once per help menu, through the hierarchy of its command tree.
Fixes #1370
-
#1344
7ba19fe
Thanks @rozenmd! - polish: move init into its own file -
#1386
4112001
Thanks @rozenmd! - feat: implement fetch for wrangler's unstable_dev API, and write our first integration test.Prior to this PR, users of
unstable_dev
had to provide their own fetcher, and guess the address and port that the wrangler dev server was using.With this implementation, it's now possible to test wrangler, using just wrangler (and a test framework):
describe("worker", async () => { const worker = await wrangler.unstable_dev("src/index.ts"); const resp = await worker.fetch(); expect(resp).not.toBe(undefined); if (resp) { const text = await resp.text(); expect(text).toMatchInlineSnapshot(`"Hello World!"`); } await worker.stop(); }
-
#1399
1ab71a7
Thanks @threepointone! - fix: rename--no-build
to--no-bundle
This fix renames the
--no-build
cli arg to--no-bundle
.no-build
wasn't a great name because it would imply that we don't run custom builds specified under[build]
which isn't true. So we rename closer to what wrangler actually does, which is bundling the input. This also makes it clearer that it's a single file upload. -
#1278
8201733
Thanks @Maximo-Guk! - Throw error if user attempts to use config with pages -
#1398
ecfbb0c
Thanks @threepointone! - Added support for pubsub namespace (via @elithrar in #1314)This adds support for managing pubsub namespaces and brokers (https://developers.cloudflare.com/pub-sub/)
-
#1348
eb948b0
Thanks @threepointone! - polish: add an experimental warning if--assets
is usedWe already have a warning when
config.assets
is used, this adds it for the cli argument as well. -
#1326
12f2703
Thanks @timabb031! - fix: show console.error/console.warn logs when usingdev --local
.Prior to this change, logging with console.error/console.warn in a Worker wouldn't output anything to the console when running in local mode. This was happening because stderr data event handler was being removed after the
Debugger listening...
string was found.This change updates the stderr data event handler to forward on all events to
process.stderr
.Closes #1324
-
#1309 [
e5a6aca
](https://github.com/cloudflare/wran...
[email protected]
Patch Changes
-
#1272
f7d362e
Thanks @JacobMGEvans! - feat: print bundle size duringpublish
anddev
This logs the complete bundle size of the Worker (as well as when compressed) during
publish
anddev
.Via #405 (comment))
-
#1287
2072e27
Thanks @f5io! - fix: kv:key put/get binary fileAs raised in #1254, it was discovered that binary uploads were being mangled by wrangler 2, whereas they worked in wrangler 1. This is because they were read into a string by providing an explicit encoding of
utf-8
. This fix reads provided files into a nodeBuffer
that is then passed directly to the request.Subsequently #1273 was raised in relation to a similar issue with gets from wrangler 2. This was happening due to the downloaded file being converted to
utf-8
encoding as it was pushed throughconsole.log
. By leveragingprocess.stdout.write
we can push the fetchedArrayBuffer
to std out directly without inferring any specific encoding value. -
#1325
bcd066d
Thanks @sidharthachatterjee! - fix: Ensure Response is mutable in Pages functions -
#1265
e322475
Thanks @petebacondarwin! - fix: support all git versions forwrangler init
If
git
does not support the--initial-branch
argument then just fallback to the default initial branch name.We tried to be more clever about this but there are two many weird corner cases with different git versions on different architectures.
Now we do our best, with recent versions of git, to ensure that the branch is calledmain
but otherwise just make sure we don't crash.Fixes #1228
-
#1311
374655d
Thanks @JacobMGEvans! - feat: add--text
flag to decodekv:key get
response values as utf8 stringsPreviously, all kv values were being rendered directly as bytes to the stdout, which makes sense if the value is a binary blob that you are going to pipe into a file, but doesn't make sense if the value is a simple string.
resolves #1306
-
#1327
4880d54
Thanks @JacobMGEvans! - feat: resolve--site
cli arg relative to current working directoryBefore we were resolving the Site directory relative to the location of
wrangler.toml
at all times.
Now the--site
cli arg is resolved relative to current working directory.resolves #1243
-
#1270
7ed5e1a
Thanks @caass! - Delegate to a local install ofwrangler
if one exists.Users will frequently install
wrangler
globally to run commands likewrangler init
, but we also recommend pinning a specific version ofwrangler
in a project'spackage.json
. Now, when a user invokes a global install ofwrangler
, we'll check to see if they also have a local installation. If they do, we'll delegate to that version. -
#1289
0d6098c
Thanks @threepointone! - feat: entry point is not mandatory if--assets
is passedSince we use a facade worker with
--assets
, an entry point is not strictly necessary. This makes a common usecase of "deploy a bunch of static assets" extremely easy to start, as a one linernpx wrangler dev --assets path/to/folder
(and same withpublish
). -
#1293
ee57d77
Thanks @petebacondarwin! - fix: do not crash inwrangler dev
if user has multiple accountsWhen a user has multiple accounts we show a prompt to allow the user to select which they should use.
This was broken inwrangler dev
as we were trying to start a new ink.js app (to show the prompt)
from inside a running ink.js app (the UI forwrangler dev
).This fix refactors the
ChooseAccount
component so that it can be used directly within another component.Fixes #1258
-
#1299
0fd0c30
Thanks @threepointone! - polish: include a copy-pastable message when trying to publish without a compatibility date -
#1269
fea87cf
Thanks @petebacondarwin! - fix: do not consider ancestor files when initializing a project with a specified nameWhen initializing a new project (via
wrangler init
) we attempt to reuse files in the current
directory, or in an ancestor directory. In particular we look up the directory tree for
package.json and tsconfig.json and use those instead of creating new ones.Now we only do this if you do not specify a name for the new Worker. If you do specify a name,
we now only consider files in the directory where the Worker will be initialized.Fixes #859
-
#1321
8e2b92f
Thanks @GregBrimble! - fix: Correctly resolve directories for 'wrangler pages publish'Previously, attempting to publish a nested directory or the current directory would result in parsing mangled paths which broke deployments. This has now been fixed.
-
#1293
ee57d77
Thanks @petebacondarwin! - fix: do not hang waiting for account choice when in non-interactive modeThe previous tests for non-interactive only checked the stdin.isTTY, but
you can have scenarios where the stdin is interactive but the stdout is not.
For example when writing the output of akv:key get
command to a file.We now check that both stdin and stdout are interactive before trying to
interact with the user. -
#1275
35482da
Thanks @alankemp! - Add environment variable WRANGLER_LOG to set log level -
#1294
f6836b0
Thanks @threepointone! - fix: serve--assets
in dev + local modeA quick bugfix to make sure --assets/config.assets gets served correctly in
dev --local
. -
#1237
e1b8ac4
Thanks @threepointone! - feat:--assets
/config.assets
to serve a folder of static assetsThis adds support for defining
assets
inwrangler.toml
. You can configure it with a string path, or a{bucket, include, exclude}
object (much like[site]
). This also renames the--experimental-public
arg as--assets
.Via #1162