| 10 | import { WorkerJavaScriptBackend } from "@cloudflare/computer/backends/worker-javascript"; |
| 11 | |
| 12 | export class ContainerExample extends withWorkspace(class extends DurableObject<Env> {}, (self) => { |
| 13 | const { ctx, env } = self as unknown as { ctx: DurableObjectState; env: Env }; |
| 14 | return { |
| 15 | storage: ctx.storage as unknown as DurableObjectStorageLike, |
| 16 | waitUntil: ctx.waitUntil.bind(ctx), |
| 17 | backends: [new WorkerJavaScriptBackend({ loader: env.LOADER })], |
| 18 | mounts: { |
| 19 | "/workspace/r2": R2Bucket(env.Bucket), |
| 20 | }, |
| 21 | }; |
| 22 | }) {} |
| 23 | |
| 24 | interface ExecRequest { |
| 25 | source?: string; |
nothing calls this directly
no test coverage detected