To save/shared team enterprise internet bandwidth, it would be a nice feature (like in other programming languages) that already downloaded public packages are stored on the local enterprise unpub server rather then downloaded from the internet again.
However it appears that the way dart pub works its not super straight-forward as the version of the package is not included in the initial query that requests all versions. This means that the upstream connection to get an updated list of versions is still required to provide to dart pub tool, but the urls of the supplied json will need to be changed to point back to the local enterprise unpub server for downloads to ensure download request go thru the local server.
The download api does contain the required version, so when a following download request is received, download/cache and serve the package archive back to the client.
To save/shared team enterprise internet bandwidth, it would be a nice feature (like in other programming languages) that already downloaded public packages are stored on the local enterprise unpub server rather then downloaded from the internet again.
However it appears that the way dart pub works its not super straight-forward as the version of the package is not included in the initial query that requests all versions. This means that the upstream connection to get an updated list of versions is still required to provide to dart pub tool, but the urls of the supplied json will need to be changed to point back to the local enterprise unpub server for downloads to ensure download request go thru the local server.
The download api does contain the required version, so when a following download request is received, download/cache and serve the package archive back to the client.