github emdash-cms/emdash @emdash-cms/sandbox-workerd@0.9.8

one hour ago

Patch Changes

  • #4799 a689fd1 Thanks @emdash-autofix! - Fixes production workerd sandboxes outliving their Node.js host and holding plugin ports open. On Linux and macOS, sandboxes now stop when the host exits, including after SIGKILL when /bin/sh is available. SIGTERM and SIGINT preserve the host's default exit when no application handler is registered. With /bin/sh available, application handlers can drain plugin requests without sandbox resources holding the host open. On shell-less POSIX hosts, sandboxes stop immediately on either signal to avoid orphaning workerd if an application handler re-raises it; host SIGKILL cleanup remains unavailable.

    Cleanup also works when Node.js runs as PID 1, such as in Docker containers.

  • #4911 23800a0 Thanks @swissky! - Caches EmDash image files for one year on sites with a compatible route-cache provider, such as cacheCloudflare(). Original files from /_emdash/api/media/file/ and eligible resized variants from /_image share the tag emdash: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 MCP media_delete tool and ctx.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 their href is 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-workerd on Cloudflare. With these services, /_image URLs for EmDash media redirect with a 301 when 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> and getImage() are unaffected. Custom image services retain their existing handling and parameters without these redirects or automatic variant caching.

  • #4800 18d6422 Thanks @emdash-autofix! - Fixes wallTimeMs timeouts leaving runaway Node.js sandboxed plugin invocations executing after their callers fail. After a timeout, the runner probes the affected plugin's listener for up to 500 ms and force-stops and restarts workerd if the listener is unresponsive or the invocation remains unsettled for one additional wallTimeMs interval. This stops yielding loops and slow I/O that later enters a CPU loop, while responsive handlers that settle within the grace period leave other plugins' calls running. Restarts interrupt all in-flight plugin calls and reset their in-memory state because plugins share the process.

  • 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

Don't miss a new emdash release

NewReleases is sending notifications on new releases.