Closed JustinGrote closed 1 year ago
Sleet can't read v2 feeds and I'm not aware of an adapter for this.
Your best option would be to write a script that does it, similar to: https://www.frakkingsweet.com/downloading-all-nuget-packages/
In v2 there isn't a great way to discover all package ids on a feed apart from using search, so how you do this will depend on what search supports, and that can be different between servers and different hosts. You might try searching empty string or *
first and see if it will tell you all the packages available. Then use that in the example above.
@emgarten thanks, I ultimately wrote a nuget v3 -> v2 adapter using Cloudflare Workers: https://github.com/JustinGrote/PWSHGallery
@JustinGrote Wow, that looks slick! Thanks for sharing the link, I'll point others towards that solution. The v2 question comes up often for Sleet.
I'm looking to use sleet to take an existing v2 repository (the PowerShell Gallery) and make a v3 feed that points to the same packages. It's not really feasible to fetch all the nupkg files (though I can do this if absolutely necessary) and it would be more efficient to just read all the package info from the v2 feed. Is there an adapter or provider already for this? If not ,where should I start to prepare a "source" for nupkg info to generate the feed with?