Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /usr/share/nodejs/npm/lib/commands/ drwxr-xr-x | |
| Viewing file: Select action/file-type: const log = require('../utils/log-shim')
const pingUtil = require('../utils/ping.js')
const BaseCommand = require('../base-command.js')
class Ping extends BaseCommand {
static description = 'Ping npm registry'
static params = ['registry']
static name = 'ping'
async exec (args) {
log.notice('PING', this.npm.config.get('registry'))
const start = Date.now()
const details = await pingUtil({ ...this.npm.flatOptions, log })
const time = Date.now() - start
log.notice('PONG', `${time}ms`)
if (this.npm.config.get('json')) {
this.npm.output(JSON.stringify({
registry: this.npm.config.get('registry'),
time,
details,
}, null, 2))
} else if (Object.keys(details).length) {
log.notice('PONG', `${JSON.stringify(details, null, 2)}`)
}
}
}
module.exports = Ping
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.004 ]-- |