forgejo/routers
Wayne Starr 995ae06a6e
Allow for resolution of NPM registry paths that match upstream () ()
Backport ()

This PR fixes issue  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-11-09 14:00:09 +08:00
..
api Allow for resolution of NPM registry paths that match upstream () () 2022-11-09 14:00:09 +08:00
common Rework raw file http header logic () () 2022-07-30 18:37:02 +02:00
install Add Cache-Control header to html and api responses, add no-transform () () 2022-07-23 11:58:58 +01:00
private Add migrate repo archiver and packages storage support on command line () () 2022-08-18 09:27:56 +08:00
utils A better go code formatter, and now make fmt can run in Windows () 2021-11-17 20:34:35 +08:00
web Added check for disabled Packages () () 2022-10-27 12:34:32 +08:00
init.go Sync git hooks when config file path changed () () 2022-10-30 11:16:09 +08:00