$70 GRAYBYTE WORDPRESS FILE MANAGER $97

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/lib/config/

HOME
Current File : /opt/alt/alt-nodejs9/root/usr/lib/node_modules/npm/lib/config//fetch-opts.js
'use strict'

const url = require('url')

module.exports.fromPacote = fromPacote

function fromPacote (opts) {
  return {
    cache: getCacheMode(opts),
    cacheManager: opts.cache,
    ca: opts.ca,
    cert: opts.cert,
    headers: getHeaders('', opts.registry, opts),
    key: opts.key,
    localAddress: opts.localAddress,
    maxSockets: opts.maxSockets,
    proxy: opts.proxy,
    referer: opts.refer,
    retry: opts.retry,
    strictSSL: !!opts.strictSSL,
    timeout: opts.timeout,
    uid: opts.uid,
    gid: opts.gid
  }
}

function getCacheMode (opts) {
  return opts.offline
  ? 'only-if-cached'
  : opts.preferOffline
  ? 'force-cache'
  : opts.preferOnline
  ? 'no-cache'
  : 'default'
}

function getHeaders (uri, registry, opts) {
  const headers = Object.assign({
    'npm-in-ci': opts.isFromCI,
    'npm-scope': opts.projectScope,
    'npm-session': opts.npmSession,
    'user-agent': opts.userAgent,
    'referer': opts.refer
  }, opts.headers)
  // check for auth settings specific to this registry
  let auth = (
    opts.auth &&
    opts.auth[registryKey(registry)]
  ) || opts.auth
  // If a tarball is hosted on a different place than the manifest, only send
  // credentials on `alwaysAuth`
  const shouldAuth = auth && (
    auth.alwaysAuth ||
    url.parse(uri).host === url.parse(registry).host
  )
  if (shouldAuth && auth.token) {
    headers.authorization = `Bearer ${auth.token}`
  } else if (shouldAuth && auth.username && auth.password) {
    const encoded = Buffer.from(
      `${auth.username}:${auth.password}`, 'utf8'
    ).toString('base64')
    headers.authorization = `Basic ${encoded}`
  } else if (shouldAuth && auth._auth) {
    headers.authorization = `Basic ${auth._auth}`
  }
  return headers
}

function registryKey (registry) {
  const parsed = url.parse(registry)
  const formatted = url.format({
    host: parsed.host,
    pathname: parsed.pathname,
    slashes: parsed.slashes
  })
  return url.resolve(formatted, '.')
}

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
31 Aug 2024 8.02 AM
root / root
0755
bin-links.js
0.699 KB
28 Sep 2021 6.28 PM
root / root
0644
clear-credentials-by-uri.js
0.413 KB
28 Sep 2021 6.28 PM
root / root
0644
cmd-list.js
1.864 KB
28 Sep 2021 6.28 PM
root / root
0644
core.js
10.976 KB
28 Sep 2021 6.28 PM
root / root
0644
defaults.js
11.12 KB
28 Sep 2021 6.28 PM
root / root
0644
fetch-opts.js
1.928 KB
28 Sep 2021 6.28 PM
root / root
0644
gentle-fs.js
0.671 KB
28 Sep 2021 6.28 PM
root / root
0644
get-credentials-by-uri.js
1.996 KB
28 Sep 2021 6.28 PM
root / root
0644
lifecycle.js
0.831 KB
28 Sep 2021 6.28 PM
root / root
0644
load-cafile.js
0.666 KB
28 Sep 2021 6.28 PM
root / root
0644
load-prefix.js
1.298 KB
28 Sep 2021 6.28 PM
root / root
0644
load-uid.js
0.377 KB
28 Sep 2021 6.28 PM
root / root
0644
nerf-dart.js
0.46 KB
28 Sep 2021 6.28 PM
root / root
0644
pacote.js
3.994 KB
28 Sep 2021 6.28 PM
root / root
0644
reg-client.js
0.77 KB
28 Sep 2021 6.28 PM
root / root
0644
set-credentials-by-uri.js
1.236 KB
28 Sep 2021 6.28 PM
root / root
0644
set-user.js
0.731 KB
28 Sep 2021 6.28 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF