REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.99 KB
Close
/proc/self/root/opt/alt/alt-nodejs24/root/lib/node_modules/npm/node_modules/npm-registry-fetch/lib/errors.js
Text
Base64
'use strict' const { URL } = require('node:url') function packageName (href) { try { let basePath = new URL(href).pathname.slice(1) if (!basePath.match(/^-/)) { basePath = basePath.split('/') var index = basePath.indexOf('_rewrite') if (index === -1) { index = basePath.length - 1 } else { index++ } return decodeURIComponent(basePath[index]) } } catch { // this is ok } } class HttpErrorBase extends Error { constructor (method, res, body, spec) { super() this.name = this.constructor.name this.headers = typeof res.headers?.raw === 'function' ? res.headers.raw() : res.headers this.statusCode = res.status this.code = `E${res.status}` this.method = method this.uri = res.url this.body = body this.pkgid = spec ? spec.toString() : packageName(res.url) Error.captureStackTrace(this, this.constructor) } } class HttpErrorGeneral extends HttpErrorBase { constructor (method, res, body, spec) { super(method, res, body, spec) this.message = `${res.status} ${res.statusText} - ${ this.method.toUpperCase() } ${ this.spec || this.uri }${ (body && body.error) ? ' - ' + body.error : '' }` } } class HttpErrorAuthOTP extends HttpErrorBase { constructor (method, res, body, spec) { super(method, res, body, spec) this.message = 'OTP required for authentication' this.code = 'EOTP' } } class HttpErrorAuthIPAddress extends HttpErrorBase { constructor (method, res, body, spec) { super(method, res, body, spec) this.message = 'Login is not allowed from your IP address' this.code = 'EAUTHIP' } } class HttpErrorAuthUnknown extends HttpErrorBase { constructor (method, res, body, spec) { super(method, res, body, spec) this.message = 'Unable to authenticate, need: ' + res.headers.get('www-authenticate') } } module.exports = { HttpErrorBase, HttpErrorGeneral, HttpErrorAuthOTP, HttpErrorAuthIPAddress, HttpErrorAuthUnknown, }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
auth.js
5.25 KB
lrw-r--r--
2026-02-23 07:38:43
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
check-response.js
3.42 KB
lrw-r--r--
2026-02-23 07:38:43
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
default-opts.js
386 B
lrw-r--r--
2026-02-23 07:38:43
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
errors.js
1.99 KB
lrw-r--r--
2026-02-23 07:38:43
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
6.42 KB
lrw-r--r--
2026-02-23 07:38:43
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
json-stream.js
5.12 KB
lrw-r--r--
2026-02-23 07:38:43
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).