* refactor(Nexus): move server and queryOpt from route to query params * tests: fix nexus auth test * chore: satiate prettier
22 lines
561 B
JavaScript
22 lines
561 B
JavaScript
'use strict'
|
|
|
|
const { redirector } = require('..')
|
|
|
|
module.exports = [
|
|
redirector({
|
|
category: 'version',
|
|
route: {
|
|
base: 'nexus',
|
|
pattern:
|
|
':repo(r|s|[^/]+)/:scheme(http|https)/:hostAndPath+/:groupId/:artifactId([^/:]+?):queryOpt(:.+?)?',
|
|
},
|
|
transformPath: ({ repo, groupId, artifactId }) =>
|
|
`/nexus/${repo}/${groupId}/${artifactId}`,
|
|
transformQueryParams: ({ scheme, hostAndPath, queryOpt }) => ({
|
|
server: `${scheme}://${hostAndPath}`,
|
|
queryOpt,
|
|
}),
|
|
dateAdded: new Date('2019-07-26'),
|
|
}),
|
|
]
|