Software: Apache. PHP/7.3.33 uname -a: Linux web25.us.cloudlogin.co 5.10.237-xeon-hst #1 SMP Mon May 5 15:10:04 UTC 2025 x86_64 uid=233359(alpastrology) gid=888(tty) groups=888(tty),33(tape) Safe-mode: OFF (not secure) /usr/lib/node_modules/npm/lib/ drwxr-xr-x |
Viewing file: Select action/file-type: 'use strict' const BB = require('bluebird') const npmConfig = require('./config/figgy-config.js') const fetch = require('libnpm/fetch') const log = require('npmlog') const output = require('./utils/output.js') const whoami = require('./whoami.js') stars.usage = 'npm stars [<user>]' module.exports = stars function stars ([user], cb) { const opts = npmConfig() return BB.try(() => { return (user ? BB.resolve(user) : whoami([], true, () => {})).then(usr => { return fetch.json('/-/_view/starredByUser', opts.concat({ query: {key: `"${usr}"`} // WHY. WHY THE ""?! })) }).then(data => data.rows).then(stars => { if (stars.length === 0) { log.warn('stars', 'user has not starred any packages.') } else { stars.forEach(s => output(s.value)) } }) }).catch(err => { if (err.code === 'ENEEDAUTH') { throw Object.assign(new Error("'npm stars' on your own user account requires auth"), { code: 'ENEEDAUTH' }) } else { throw err } }).nodeify(cb) } |
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.033 ]-- |