$46 GRAYBYTE WORDPRESS FILE MANAGER $21

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/alt-nodejs19/root/usr/lib/node_modules/npm/lib/utils/config/

HOME
Current File : /opt/alt/alt-nodejs19/root/usr/lib/node_modules/npm/lib/utils/config//index.js
const definitions = require('./definitions.js')

// use the defined flattening function, and copy over any scoped
// registries and registry-specific "nerfdart" configs verbatim
//
// TODO: make these getters so that we only have to make dirty
// the thing that changed, and then flatten the fields that
// could have changed when a config.set is called.
//
// TODO: move nerfdart auth stuff into a nested object that
// is only passed along to paths that end up calling npm-registry-fetch.
const flatten = (obj, flat = {}) => {
  for (const [key, val] of Object.entries(obj)) {
    const def = definitions[key]
    if (def && def.flatten) {
      def.flatten(key, obj, flat)
    } else if (/@.*:registry$/i.test(key) || /^\/\//.test(key)) {
      flat[key] = val
    }
  }

  // XXX make this the bin/npm-cli.js file explicitly instead
  // otherwise using npm programmatically is a bit of a pain.
  flat.npmBin = require.main ? require.main.filename
    : /* istanbul ignore next - not configurable property */ undefined
  flat.nodeBin = process.env.NODE || process.execPath

  // XXX should this be sha512?  is it even relevant?
  flat.hashAlgorithm = 'sha1'

  return flat
}

// aliases where they get expanded into a completely different thing
// these are NOT supported in the environment or npmrc files, only
// expanded on the CLI.
// TODO: when we switch off of nopt, use an arg parser that supports
// more reasonable aliasing and short opts right in the definitions set.
const shorthands = {
  'enjoy-by': ['--before'],
  d: ['--loglevel', 'info'],
  dd: ['--loglevel', 'verbose'],
  ddd: ['--loglevel', 'silly'],
  quiet: ['--loglevel', 'warn'],
  q: ['--loglevel', 'warn'],
  s: ['--loglevel', 'silent'],
  silent: ['--loglevel', 'silent'],
  verbose: ['--loglevel', 'verbose'],
  desc: ['--description'],
  help: ['--usage'],
  local: ['--no-global'],
  n: ['--no-yes'],
  no: ['--no-yes'],
  porcelain: ['--parseable'],
  readonly: ['--read-only'],
  reg: ['--registry'],
  iwr: ['--include-workspace-root'],
  ...Object.entries(definitions).reduce((acc, [key, { short = [] }]) => {
    // can be either an array or string
    for (const s of [].concat(short)) {
      acc[s] = [`--${key}`]
    }
    return acc
  }, {}),
}

module.exports = {
  get defaults () {
    // NB: 'default' is a reserved word
    return Object.entries(definitions).reduce((acc, [key, { default: d }]) => {
      acc[key] = d
      return acc
    }, {})
  },
  definitions,
  flatten,
  shorthands,
}


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.54 PM
root / root
0755
definition.js
6.356 KB
6 Dec 2023 6.07 PM
root / root
0644
definitions.js
63.146 KB
6 Dec 2023 6.07 PM
root / root
0644
index.js
2.435 KB
6 Dec 2023 6.07 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF