(input)
| 152 | function execBackend(id: string, onExec: (command: string) => void): WorkspaceBackend { |
| 153 | const shell: import("@cloudflare/computer-rpc").ShellRPC = { |
| 154 | async exec(input) { |
| 155 | onExec(input.command); |
| 156 | const execId = input.id ?? `${id}-${Math.random().toString(36).slice(2)}`; |
| 157 | return { |
| 158 | id: execId, |
| 159 | events: new ReadableStream<import("@cloudflare/computer-rpc").ExecEvent>({ |
| 160 | start(c) { |
| 161 | c.enqueue({ id: execId, seq: 1, name: "exit", value: 0 }); |
| 162 | c.close(); |
| 163 | }, |
| 164 | }), |
| 165 | }; |
| 166 | }, |
| 167 | getExec: () => Promise.reject(new Error("not used")), |
| 168 | killExec: () => Promise.reject(new Error("not used")), |
| 169 | disposeExec: () => Promise.reject(new Error("not used")), |
nothing calls this directly
no test coverage detected