gitea/routers/api/packages
Wayne Starr 49a4464160
Allow for resolution of NPM registry paths that match upstream (#21568)
This PR fixes issue #21567 allowing for package tarball URLs to match
the upstream registry (and GitLab/JFrog Artifactory URLs). It uses a
regex to parse the filename (which contains the NPM version) and does a
fuzzy search to pull it out. The regex was built/expanded from
http://json.schemastore.org/package,
https://github.com/Masterminds/semver, and
https://docs.npmjs.com/cli/v6/using-npm/semver and is testable here:
https://regex101.com/r/OydBJq/5

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-10-24 21:50:22 +08:00
..
composer Replace ServeStream with ServeContent (#20903) 2022-08-25 12:05:21 -04:00
conan Add generic set type (#21408) 2022-10-12 13:18:26 +08:00
container Add GET and DELETE endpoints for Docker blob uploads (#21367) 2022-10-07 23:30:59 +08:00
generic Replace ServeStream with ServeContent (#20903) 2022-08-25 12:05:21 -04:00
helm Replace ServeStream with ServeContent (#20903) 2022-08-25 12:05:21 -04:00
helper Add Package Registry (#16510) 2022-03-30 16:42:47 +08:00
maven Replace ServeStream with ServeContent (#20903) 2022-08-25 12:05:21 -04:00
npm Allow for resolution of NPM registry paths that match upstream (#21568) 2022-10-24 21:50:22 +08:00
nuget Enforce grouped NuGet search results (#21442) 2022-10-17 01:18:09 +08:00
pub Replace ServeStream with ServeContent (#20903) 2022-08-25 12:05:21 -04:00
pypi Allow uppercase ASCII alphabet in PyPI package names (#21095) 2022-09-07 21:18:51 +01:00
rubygems Replace ServeStream with ServeContent (#20903) 2022-08-25 12:05:21 -04:00
vagrant Add support for Vagrant packages (#20930) 2022-08-29 15:04:45 +08:00
api.go Allow for resolution of NPM registry paths that match upstream (#21568) 2022-10-24 21:50:22 +08:00