(outputSandboxPath: string)
| 141 | } |
| 142 | |
| 143 | function shouldReadSandboxPathAsBase64(outputSandboxPath: string): boolean { |
| 144 | const ext = outputSandboxPath.slice(outputSandboxPath.lastIndexOf('.')).toLowerCase() |
| 145 | const binaryExts = new Set([ |
| 146 | '.png', |
| 147 | '.jpg', |
| 148 | '.jpeg', |
| 149 | '.gif', |
| 150 | '.webp', |
| 151 | '.pdf', |
| 152 | '.zip', |
| 153 | '.mp3', |
| 154 | '.mp4', |
| 155 | '.docx', |
| 156 | '.pptx', |
| 157 | '.xlsx', |
| 158 | ]) |
| 159 | return binaryExts.has(ext) |
| 160 | } |
| 161 | |
| 162 | async function readSandboxOutputFile( |
| 163 | sandbox: E2BSandbox, |
no outgoing calls
no test coverage detected