tgz support
adds support for .tar.gz files from arbitrary urls
Would be very helpful for supporting Stainless packages in Val Town 👍
specifically preview versions, which we upload as tarballs to our own servers
I've found that val town doesn't acquire types for any val town sdk's actually via esm.sh but yes for npm, but I'm not sure why. (To be fair our type acquisition is super janky, so it might not be worth designing around too much.)
@stainless-em thanks, this is great! do you think we can remove the package name in the tgz path? like:
- https://esm.sh/tgz/preact@https%3A%2F%2Fregistry.yarnpkg.com%2Fpreact%2F-%2Fpreact-10.26.6.tgz
+ https://esm.sh/tgz/https%3A%2F%2Fregistry.yarnpkg.com%2Fpreact%2F-%2Fpreact-10.26.6.tgz
I've found that val town doesn't acquire types for any val town sdk's actually via esm.sh but yes for npm, but I'm not sure why. (To be fair our type acquisition is super janky, so it might not be worth designing around too much.)
@stevekrouse i will look into it, can you please provide a code smaple for testing? Thanks🙏
do you think we can remove the package name in the tgz path?
Possibly, I tried that first actually. But then the PkgName in the EsmPath would need to be empty I think? Because there's no way to know what it is until the tarball is downloaded? idk
Possibly, I tried that first actually. But then the PkgName in the EsmPath would need to be empty I think? Because there's no way to know what it is until the tarball is downloaded? idk
makes sense, can you please check the CI? i'm love to the merge this after the CI passing. Thanks!
tbc i think having the pkgname in the url is bad but i'm not familiar enough with how esm.sh is structured to know how to get rid of it 😅
how is this pr evolving ?