![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/.nvm/versions/node/v20.18.0/lib/node_modules/npm/lib/commands/ |
const PackageUrlCmd = require('../package-url-cmd.js') class Bugs extends PackageUrlCmd { static description = 'Report bugs for a package in a web browser' static name = 'bugs' getUrl (spec, mani) { if (mani.bugs) { if (typeof mani.bugs === 'string') { return mani.bugs } if (typeof mani.bugs === 'object' && mani.bugs.url) { return mani.bugs.url } if (typeof mani.bugs === 'object' && mani.bugs.email) { return `mailto:${mani.bugs.email}` } } // try to get it from the repo, if possible const info = this.hostedFromMani(mani) const infoUrl = info?.bugs() if (infoUrl) { return infoUrl } // just send them to the website, hopefully that has some info! return `https://www.npmjs.com/package/${mani.name}` } } module.exports = Bugs