Commit Detail
Commit 6bef3cb
Add a mechanism by which JS-RPC requests can inject an internal module. If `JsRpcSessionCustomEventImpl` is constructed with a `wrapperModule` is specified, then it is the name of a builtin internal module. When an RPC is delivered, instead of delivering to the Durable Object directly, the wrapper module is given a chance to wrap the object, and that is called instead. The wrapper module's default export must be a function which takes the DO instance as its parameter and returns a new object to use in its place. This is intended to allow a privileged caller to call a Durable Object and inject some code to perform introspection on behalf of the owner, without requiring a new version of the app code to be deployed. For now, there is no way to activate this in workerd itself. This feature will be used by the internal codebase.
Files changed
2 files changed~2 modified