PHP 8.2.30
Preview: check-ping.js Size: 397 B
/proc/self/root/proc/self/root/opt/alt/alt-nodejs8/root/lib/node_modules/npm/lib/doctor/check-ping.js

var log = require('npmlog')
var ping = require('../ping.js')

function checkPing (cb) {
  var tracker = log.newItem('checkPing', 1)
  tracker.info('checkPing', 'Pinging registry')
  ping({}, true, (err, pong) => {
    if (err && err.code && err.code.match(/^E\d{3}$/)) {
      return cb(null, [err.code.substr(1)])
    } else {
      cb(null, [200, 'ok'])
    }
  })
}

module.exports = checkPing

Directory Contents

Dirs: 0 × Files: 6

Name Size Perms Modified Actions
1.93 KB lrw-r--r-- 2021-09-28 10:29:11
Edit Download
397 B lrw-r--r-- 2021-09-28 10:29:11
Edit Download
300 B lrw-r--r-- 2021-09-28 10:29:11
Edit Download
800 B lrw-r--r-- 2021-09-28 10:29:11
Edit Download
444 B lrw-r--r-- 2021-09-28 10:29:11
Edit Download
929 B lrw-r--r-- 2021-09-28 10:29:11
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).