[Resolved]Implement a module proxy protocol, just like Go #9612
Replies: 2 comments 2 replies
-
Import maps, which Deno already supports (https://deno.land/[email protected]/linking_to_external_code/import_maps#import-maps) allow a user to do exactly this and to take dependencies and redirect them elsewhere. Any other proxy and caching solution could be achieved wholly external to Deno, and Deno simply follows the rules of HTTP and HTTPS. A transparent b2b proxy could easily achieve what you are talking about with no changes to Deno. Also there are lots of CDNs that do processing and repackaging of modules, like skypack, and others. Ones that cached and rewrote the modules specifiers to be also ones the CDN hosted it quite possible and again would requite no changes to Deno. |
Beta Was this translation helpful? Give feedback.
-
Why?
Simply put, registries cannot be accessed anywhere, or be accessed in a fast speed.
Assume that there is a
mod.ts
in GitHub. What if a user in China (blocking GitHub User Contents domain) wants to access it? Or in a company that frobids outgoing connection?Don't we already have a CDN /
deno.land/x
? Yes, but a deno module has dependencies. If we use a CDN to access this module, what to do with its dependencies that cannot be accessed?But hey, in my opinion, Deno is like Go. Go has a module proxy protocol. Deno could have one too!
It would be cool to have a proxy that caches dependencies. This can help restricted developers get rid of unnecessary configurations about http proxy, and moreover, speed up development in some teams that shares a local network.
Beta Was this translation helpful? Give feedback.
All reactions