Patch Changes
-
#1184
4a10176
Thanks @timabb031! - polish: add cron trigger to wrangler.toml when new Scheduled Worker is createdWhen
wrangler init
is used to create a new Scheduled Worker a cron trigger (1 * * * *) will be added to wrangler.toml, but only if wrangler.toml is being created during init. If wrangler.toml exists prior to runningwrangler init
then wrangler.toml will remain unchanged even if the user selects the "Scheduled Handler" option. This is as per existing tests in init.test.ts that ensure wrangler.toml is never overwritten after agreeing to prompts. That can change if it needs to.
-
#1163
52c0bf0
Thanks @threepointone! - fix: only log available bindings once indev
Because we were calling
printBindings
during the render phase of<Dev/>
, we were logging the bindings multiple times (render can be called multiple times, and the interaction of Ink's stdout output intermingled with console is a bit weird). We could have put it into an effect, but I think a better solution here is to simply log it before we even start rendering<Dev/>
(so we could see the bindings even if Dev fails to load, for example).This also adds a fix that masks any overriden values so that we don't accidentally log potential secrets into the terminal.
-
#1153
40f20b2
Thanks @petebacondarwin! - fix:minify
andnode_compat
should be inheritedFixes #1150
- #1157
ea8f8d7
Thanks @sidharthachatterjee! - fix: Ignore .git when publishing a Pages project
-
#1171
de4e3c2
Thanks @petebacondarwin! - fix: link to the issue chooser in GitHubPreviously, when an error occurs, wrangler says:
If you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new.
Now, it links through to the issue template chooser which is more helpful.
Fixes #1169
-
#1154
5d6de58
Thanks @threepointone! - fix: extract Cloudflare_CA.pem to temp dir before using itWith package managers like yarn, the cloudflare cert won't be available on the filesystem as expected (since the module is inside a .zip file). This fix instead extracts the file out of the module, copies it to a temporary directory, and directs node to use that as the cert instead, preventing warnings like #1136.
Fixes #1136
-
#1166
08e3a49
Thanks @threepointone! - fix: warn on unexpected fields on migrationsThis adds a warning for unexpected fields on
[migrations]
config, reported in #1165. It also adds a test for incorrectrenamed_classes
in a migration.
- #1006
ee0c380
Thanks @danbulant! - feat: add pnpm support
6187f36
Thanks @petebacondarwin! - fix: backslash on manifest keys in windows
- #1158
e452a35
Thanks @sidharthachatterjee! - fix: Skip cfFetch if there are no functions during pages dev
-
#1122
c2d2f44
Thanks @petebacondarwin! - fix: display chained errors from the CF APIFor example if you have an invalid CF_API_TOKEN and try running
wrangler whoami
you now get the additional6111
error information:✘ [ERROR] A request to the Cloudflare API (/user) failed. Invalid request headers [code: 6003] - Invalid format for Authorization header [code: 6111]
- #1161
cec0657
Thanks @petebacondarwin! - refactor: add User-Agent to all CF API requests
-
#1152
b817136
Thanks @threepointone! - polish: Give a copy-paste config when[migrations]
are missingThis gives a slightly better message when migrations are missing for declared durable objcts. Specifically, it gives a copy-pastable section to add to wrangler.toml, and doesn't show the warning at all for invalid class names anymore.
Partially makes #1076 better.
-
#1141
a8c509a
Thanks @rozenmd! - fix: rename "publish" package.json script to "deploy"Renaming the default "publish" package.json script to "deploy" to avoid confusion with npm's publish command.
Closes #1121
-
#1175
e978986
Thanks @timabb031! - feature: allow user to select a handler template withwrangler init
This allows the user to choose which template they'd like to use when they are prompted to create a new worker.
The options are currently "None"/"Fetch Handler"/"Scheduled Handler".
Support for new handler types such asemail
can be added easily in future.
- #1122
c2d2f44
Thanks @petebacondarwin! - fix: improve error message when CF API responds with an error