codesandbox / codesandbox-importers

All importers & exporters for CodeSandbox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create sandbox from input stream

gt3 opened this issue · comments

commented
fetch('./super.tar')
.then(response => response.body)
.then(body => body.pipeThrough(unpack).pipeTo(createSandbox))

This removes the overhead of writing to file system, by streaming in memory. It also adds flexibility to the API and performance gains.

Thanks for the excellent work @CompuIves and team. Kindly share your thoughts.

I really like this idea! Much better than downloading untarring etc.

commented

Alright, I'll try to cook something up by this weekend. It's mostly changing the contracts and the control flow of the existing methods to work with streams. Thanks for the input @CompuIves .