Minor Changes
- #426
02ed8baThanks @BenjaminPrice! - Adds workerd-based plugin sandboxing for Node.js deployments.- emdash: Adds
isHealthy()toSandboxRunnerinterface,SandboxUnavailableErrorclass,sandbox: falseconfig option,mediaStoragefield onSandboxOptions, and exportscreateHttpAccess/createUnrestrictedHttpAccess/PluginStorageRepository/UserRepository/OptionsRepositoryfor platform adapters. - @emdash-cms/cloudflare: Implements
isHealthy()onCloudflareSandboxRunner. FixesstorageQuery()andstorageCount()to honorwhere,orderBy, andcursoroptions (previously ignored, causing infinite pagination loops and incorrect filtered counts). AddsstorageConfigtoPluginBridgePropssoPluginStorageRepositorycan use declared indexes. - @emdash-cms/sandbox-workerd: New package.
WorkerdSandboxRunnerfor production (workerd child process + capnp config + authenticated HTTP backing service) andMiniflareDevRunnerfor development.
- emdash: Adds
Patch Changes
-
#1144
c50c3b2Thanks @ascorbic! - Aligns thekyselypeer dependency with the rest of the monorepo (>=0.29.0) and switches the dev/peer references to the workspace catalog so all packages bump in lockstep going forward. -
#1147
20c87feThanks @ascorbic! - Tightens the workerd sandbox internals so the package now lints and type-checks cleanly.- Bridge call bodies are validated with predicate-backed
require*/optional*helpers instead of uncheckedascasts. A misbehaving plugin that sends a malformed JSON-RPC body now gets a clear "Parameter X must be Y" error rather than triggering a downstream type confusion. - Content table access (
ec_*collections) is centralised behind a typedasContentDb()helper. Known tables (users,media,_plugin_storage) drop theiras keyof Databasecasts entirely. - HTTP
initmarshalling validates each field at the bridge boundary, including form-data parts. - The backing service uses a typed
HttpErrorclass for status-bearing errors and validates incoming chunks/body shape defensively. getPluginStorageConfig()returns the realPluginStorageConfigshape from the manifest instead ofRecord<string, unknown>.WorkerdSandboxedPluginnow implements the correctSandboxedPluginInstanceinterface (the oldSandboxedPluginsymbol did not exist).- Adds a
typecheckscript (tsgo --noEmit) so the package participates inpnpm typecheckgoing forward.
No runtime behaviour changes.
- Bridge call bodies are validated with predicate-backed
-
Updated dependencies [
02ed8ba,11b3001,fae97ee,88f544d,9a30607,d0ff94b]:- emdash@0.15.0