REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.19 KB
Close
/opt/alt/alt-nodejs9/root/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/check-warning-header.js
Text
Base64
'use strict' const LRU = require('lru-cache') const WARNING_REGEXP = /^\s*(\d{3})\s+(\S+)\s+"(.*)"\s+"([^"]+)"/ const BAD_HOSTS = new LRU({ max: 50 }) module.exports = checkWarnings function checkWarnings (res, registry, opts) { if (res.headers.has('warning') && !BAD_HOSTS.has(registry)) { const warnings = {} res.headers.raw()['warning'].forEach(w => { const match = w.match(WARNING_REGEXP) if (match) { warnings[match[1]] = { code: match[1], host: match[2], message: match[3], date: new Date(match[4]) } } }) BAD_HOSTS.set(registry, true) if (warnings['199']) { if (warnings['199'].message.match(/ENOTFOUND/)) { opts.log.warn('registry', `Using stale data from ${registry} because the host is inaccessible -- are you offline?`) } else { opts.log.warn('registry', `Unexpected warning for ${registry}: ${warnings['199'].message}`) } } if (warnings['111']) { // 111 Revalidation failed -- we're using stale data opts.log.warn( 'registry', `Using stale package data from ${registry} due to a request error during revalidation.` ) } } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
check-warning-header.js
1.19 KB
lrw-r--r--
2021-09-28 11:28:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
fetch.js
3.11 KB
lrw-r--r--
2021-09-28 11:28:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.js
584 B
lrw-r--r--
2021-09-28 11:28:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
manifest.js
4.28 KB
lrw-r--r--
2021-09-28 11:28:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
pick-registry.js
360 B
lrw-r--r--
2021-09-28 11:28:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
registry-key.js
410 B
lrw-r--r--
2021-09-28 11:28:21
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
tarball.js
2.55 KB
lrw-r--r--
2021-09-28 11:28:21
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).