(frame: ExecFrame)
| 68 | } |
| 69 | |
| 70 | function eventOf(frame: ExecFrame): WorkspaceExecEvent<ExecEncoding> { |
| 71 | if (frame.name === "exit") { |
| 72 | return { id: frame.id, seq: frame.seq, name: "exit", value: frame.value }; |
| 73 | } |
| 74 | const value = frame.enc === "utf8" ? frame.value : fromBase64(frame.value); |
| 75 | return { |
| 76 | id: frame.id, |
| 77 | seq: frame.seq, |
| 78 | name: frame.name, |
| 79 | value, |
| 80 | } as WorkspaceExecEvent<ExecEncoding>; |
| 81 | } |
| 82 | |
| 83 | const encoder = new TextEncoder(); |
| 84 |
no test coverage detected