Repository navigation
@emdash-cms/cloudflare@1.6.0
Minor Changes
-
#4911
23800a0Thanks @swissky! - Caches EmDash image files for one year on sites with a compatible route-cache provider, such ascacheCloudflare(). Original files from/_emdash/api/media/file/and eligible resized variants from/_imageshare the tagemdash:media:<storageKey>. Replacing an image, or deleting one whose stored file is removed, purges that tag. Deletes from the admin media library and media picker, the MCPmedia_deletetool andctx.media.delete()in plugin routes are covered, subject to the purge limitations.Astro's
memoryCache()does not receive automatic media cache entries at any response size; page caching is unaffected. Other providers must preserve distinct source URLs and transform options in their cache keys and support conditional requests. Audio, video, partial responses and original-file URLs with query strings are not stored. Variants are eligible only when theirhrefis a plain EmDash media path or that path prefixed with the request's origin, without a nested query or fragment.Automatic variant caching and query normalization apply only to Astro's stock sharp service on Node and
@astrojs/cloudflare/image-service-workerdon Cloudflare. With these services,/_imageURLs for EmDash media redirect with a301when their outer query contains unknown or repeated parameters, uses a different parameter order or encodes values differently. This also applies without a cache provider. Stock-service URLs built by<Image>andgetImage()are unaffected. Custom image services retain their existing handling and parameters without these redirects or automatic variant caching.
Patch Changes
-
#4940
a570e5dThanks @khoinguyenpham04! - Updates@cloudflare/kumoto 2.19.0. These packages now require exactly@cloudflare/kumo@2.19.0, so sites and plugins that install Kumo themselves should upgrade to that version to match the admin's prebuilt styles. Updateemdashand the Forms, Field Kit, AI Moderation and AI Search plugins together, since their earlier releases require Kumo 2.15.0.In the admin, date pickers use Kumo's refreshed day and month buttons, and button labels are vertically centred.
Plugin admin pages built with Kumo may need changes for
Radio.Grouptests,DatePickerstyle overrides andDialogmaximum heights. Upgrade to Kumo 2.19 describes each change, and Match the admin's Kumo version explains how a plugin pins Kumo. -
#4968
e573224Thanks @emdash-autofix! - Fixes media usage tracking missing files linked by their/_emdash/api/media/file/URL. Used in now includes Portable Text paragraph link marks, HTML blockhrefandsrcattributes, and whole string or URL field values, including fields inside blocks and repeaters.Counts both root-relative URLs and full same-site URLs copied from the Media Library. Full URLs must match the site origin resolved from configuration or environment, the Site URL setting, or the setup URL when neither is set. The Site URL setting is used only for HTTPS or loopback HTTP addresses; for other HTTP sites, configure
siteUrlinstead (orEMDASH_SITE_URLon Node.js). External URLs and URLs embedded in plain text are not counted. Deleting media still requires reviewing its references first; usage tracking does not prevent deletion.Playground sessions now record their setup origin automatically, so full URLs from Copy URL are counted without setting Site URL manually.
Upgrade action
Existing entries are not re-indexed automatically. After upgrading, run
npx emdash media repair-usage --allagainst the upgraded instance (use--urlto select the site), or save the affected entries again. Alternatives are themedia_usage_repairMCP tool orPOST /_emdash/api/admin/media-usage/repair, both with{ "scope": "all" }. Until repair completes or the entries are saved again, coverage can still show as complete and a linked file can show No tracked references found. See the upgrade instructions for connection options and verification. -
#4787
acb8a0fThanks @khoinguyenpham04! - Fixes scheduled entries going live up to a minute after their scheduled time.On Cloudflare, each Cron Trigger run waits up to 70 seconds for upcoming entries and publishes each one at its scheduled time, so an entry scheduled about a minute or more ahead no longer depends on when the next trigger starts. Waiting uses no CPU time, but while entries are scheduled within that window a scheduled invocation stays open for up to about a minute, so consecutive invocations can overlap in Workers logs and metrics. Sites that use
createScheduledHandler()from@emdash-cms/cloudflare/workerget this automatically.On Node.js, the scheduler runs the publishing sweep at the start of every minute, so an entry scheduled for a whole minute, as the admin sets it, goes live at that minute. A schedule with seconds, which only the API and MCP can set, can still go live up to a minute late.
A scheduled publish that another scheduler run or an editor has already completed no longer runs
content:beforePublishhooks, so a hook cannot record a rejection for an entry that is already live.A custom Worker entry point that calls
runScheduledTasks()fromemdash/middlewarepublishes only entries that are already due. To wait for upcoming entries, pass the newpublishUpcomingWithinMsoption:await runScheduledTasks({ publishUpcomingWithinMs: 70 * 1000 });
-
#4866
f585c35Thanks @emdash-autofix! - Fixes registry and marketplace plugin routes intermittently returning404 Plugin route not foundon warm Cloudflare isolates after an install, update, or uninstall. Requests to/_emdash/api/plugins/*check for plugin-state changes before checking route permissions, without requiring a redeploy. Only newer generation-tagged snapshots are applied, so replica lag can delay a change but cannot restore older plugin code or permissions.Plugin route requests return
503 PLUGIN_SYNC_ERRORif state cannot be read or the requested plugin fails to load. Bundle and sandbox-load failures retry after a five-second backoff, or immediately when the plugin's stored state changes.On Durable Object SQL deployments, upgrade core and the Cloudflare adapter together so plugin state and its generation are committed atomically.
Durable Object SQL also executes existing atomic batches for content saves, menus, seeding and block-type updates as single primary transactions instead of separate statements.
-
Updated dependencies [
ac16583,45c5053,2bbc729,732867e,b4e77d5,6d0551b,438b2f9,e8a2286,6d0551b,01f717d,e573224,6d0551b,12226e5,8275da7,23800a0,43c901f,c2f56b4,b71f7b1,d682215,7c7f5a9,1b430ea,09a0a95,9f79ba3,395d56c,6b87682,acb8a0f,56bae1a,b105cad,40fe8b5,cfc80bf,f8cf63f,1bdb0d2,0e68d47,366fd9f,f585c35]:- emdash@1.6.0