0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-17 23:45:29 -05:00

chore: display all versions on sidebar

remove hidden metadata
This commit is contained in:
Juan Picado @jotadeveloper 2018-06-12 08:17:27 +02:00
parent b334f29cf4
commit 82e457b7ed
No known key found for this signature in database
GPG key ID: 18AC54485952D158

View file

@ -86,12 +86,11 @@ function addPackageWebApi(route: Router, storage: IStorageHandler, auth: IAuth)
req,
callback: function(err: Error, info: $SidebarPackage) {
if (_.isNil(err)) {
const sideBarInfo: any = _.clone(info);
let sideBarInfo: any = _.clone(info);
sideBarInfo.latest = info.versions[info[DIST_TAGS].latest];
info = deleteProperties(['readme', 'versions'], sideBarInfo);
info = addGravatarSupport(sideBarInfo);
next(info);
sideBarInfo = deleteProperties(['readme', '_attachments', '_rev', 'name'], sideBarInfo);
sideBarInfo = addGravatarSupport(sideBarInfo);
next(sideBarInfo);
} else {
res.status(404);
res.end();