update
This commit is contained in:
7
package/lib/utils/ping.js
Normal file
7
package/lib/utils/ping.js
Normal file
@@ -0,0 +1,7 @@
|
||||
// ping the npm registry
|
||||
// used by the ping and doctor commands
|
||||
const fetch = require('npm-registry-fetch')
|
||||
module.exports = async (flatOptions) => {
|
||||
const res = await fetch('/-/ping?write=true', flatOptions)
|
||||
return res.json().catch(() => ({}))
|
||||
}
|
Reference in New Issue
Block a user