⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
lib
/
node_modules
/
npm
/
lib
/
utils
/
Edit File: audit-error.js
const log = require('./log-shim') // print an error or just nothing if the audit report has an error // this is called by the audit command, and by the reify-output util // prints a JSON version of the error if it's --json // returns 'true' if there was an error, false otherwise const auditError = (npm, report) => { if (!report || !report.error) { return false } if (npm.command !== 'audit') { return true } const { error } = report // ok, we care about it, then log.warn('audit', error.message) const { body: errBody } = error const body = Buffer.isBuffer(errBody) ? errBody.toString() : errBody if (npm.flatOptions.json) { npm.output(JSON.stringify({ message: error.message, method: error.method, uri: error.uri, headers: error.headers, statusCode: error.statusCode, body, }, null, 2)) } else { npm.output(body) } throw 'audit endpoint returned an error' } module.exports = auditError
Simpan