@cloudflare/deploy-helpers@0.8.0
Minor Changes
-
#15172
c68f9cbThanks @WillTaylorDev! - Add container support to worker previewsWorker previews now support containers through a new
previews.containersconfiguration block. Container configuration doesn't inherit, so declare containers explicitly in thepreviewsblock to enable them for previews. This mirrors howpreviews.durable_objectsworks today. Wrangler names each preview container application{worker_name}_{preview_slug}_{class_name}, normalising and shortening the result to what the API accepts. Either change appends a short digest of the composed name, so two names that would otherwise land on one stay distinct. An entry cannot set its ownname, because application names are unique to an account and a fixed name would collide between two previews of the same Worker. A Durable Object class is backed by at most one container application, so the validator rejects two entries that share aclass_name. Wrangler skips container applications bound to Durable Object classes that another Worker implements throughscript_name, because the implementing Worker owns its own container application. A binding is not required: a Durable Object declared throughmigrationsorexportsand reached only overctx.exportscan still back a container. Every entry must setclass_name. Apreviews.containersentry whoseclass_namematches no Durable Object class at all is rejected before the preview deployment is created, so a typo fails loudly instead of producing a preview with no container.Wrangler creates the container applications on
wrangler preview. Deleting a preview tears them down server side, sowrangler preview deletedoesn't remove them.Container build and deploy progress prints to stdout.
wrangler preview --jsonsuppresses wrangler's own output so it doesn't interleave with the payload, and warnings and errors still go to stderr. Docker's build output and the progress spinner write to stdout directly and bypass that suppression, so parse--jsonfrom a non interactive shell, where the spinner is skipped, and prefer a prebuiltimageover a Dockerfile. -
#15174
649f667Thanks @WillTaylorDev! - [private beta]: Create the parent Worker automatically whenwrangler previewtargets one that doesn't exist yetPreviews hang off a parent Worker, so running
wrangler previewbefore the Worker had ever been deployed failed with a raw API error naming the Preview endpoint. Wrangler now offers to create an empty parent Worker and then carries on creating the Preview. The parent uses the same workers.dev and Preview URL settings thatwrangler deploywould resolve, without applying routes or cron triggers. In non-interactive environments, Wrangler creates the Worker without asking.
Patch Changes
-
#15253
630048bThanks @emily-shen! - Refactor triggers deploy validation and dry-runMove more logic into the deploy-helpers package for easy reuse by
cf. -
#15284
39dcea6Thanks @emily-shen! - Move deploy output writing into shared deploy helpers -
Updated dependencies [
59872c4,c68f9cb,99a1f49,5ae9d5b,4b52975,ce9b151,5c10e39,39dcea6,99a1f49,99a1f49,30c2d47]:- miniflare@5.20260820.0-alpha
- @cloudflare/workers-utils@0.34.0
- @cloudflare/cli-shared-helpers@0.1.25