Skip to content

@emdash-cms/cloudflare@1.4.0

Choose a tag to compare

@emdashbot emdashbot released this 29 Oct 13:03
10beb8c

Patch Changes

  • #4186 d871288 Thanks @swissky! - Fixes the Cloudflare image endpoint (/_image for EmDash media URLs) holding the R2 object read open after it answers with 304 Not Modified, answers a HEAD request for a file it serves without transforming, or fails to transform an image.

  • #4281 45ceb7b Thanks @emdash-autofix! - Fixes sandboxed plugins with the email:send capability being unable to send mail on Cloudflare Workers. ctx.email.send() could reject with "Email is not configured" even though a host email provider was configured and the host's own emails were delivered.

  • #4278 42503f0 Thanks @swissky! - Fixes sandbox() turning off sandboxed plugins in projects that have a cloudflare.config.ts (the config file used by @astrojs/cloudflare 15). When that file exists in the project root, sandbox() now selects the Worker Loader runner without reading any Wrangler config and without requiring wrangler to be installed. Add the binding with LOADER: bindings.workerLoader() under worker.env. If it is missing, EmDash logs a warning when the Worker starts instead of during the build.

  • #4394 6be7263 Thanks @emdash-autofix! - Fixes sandboxed plugin ctx.taxonomies mutations (createTerm(), addEntryTerms(), and removeEntryTerms()), ctx.content.create(), versioned content actions (getVersioned(), publish(), unpublish(), schedule(), unschedule(), getTrashedVersioned(), and restore()), and ctx.comments.setStatus() on Cloudflare when requests run across multiple Worker isolates. Content creation consistently uses runtime validation and hooks and preserves translationOf links instead of falling back to a plain database insert.

    Runner-created invocations without a content-create callback now receive Content creation is not configured rather than a database insert that bypasses runtime behavior. createPluginTestHost() supplies a database-backed callback with content-handler validation so transport-level tests can continue creating content and linked translations without starting the full EmDash runtime. It preserves the transport host's support for data.slug and data.status.

    Await these operation promises before returning from a plugin route or hook. Their RPC connection now lasts only for that invocation; unlike the previous loopback binding, it cannot support work that outlives the invocation.

    Publication after-hooks remain deferred. Same-entry actions attempted while an after-hook is running can return CONTENT_ACTION_REENTRANT; faster callback routing can expose this overlap in tests that assumed hooks had already finished. In runtime-host tests, call await host.waitForDeferredTasks() after an action before inspecting its after-hook effects or starting another action on the same entry. This method waits for queued deferred runtime work, including work those tasks enqueue; it does not run future scheduled tasks or wait for arbitrary unawaited plugin operations.

  • Updated dependencies [064fbbf, 75030fc, ec973c0, ceaf9b6, 3d29980, 9d9fd82, 3ce9d36, 8da0792, c238da2, a6f4091, f197acf, 57abb5c, e1c4a87, bed3e42, 4409acb, 53acf71, 6be7263, 9e7cd3d, a16ab2c, 9201138, d1e25e0, 6c5d878, 56cb9da]:

    • emdash@1.4.0