Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /usr/share/nodejs/npm/lib/utils/config/ drwxr-xr-x | |
| Viewing file: Select action/file-type: const flatten = require('./flatten.js')
const definitions = require('./definitions.js')
const describeAll = require('./describe-all.js')
// 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'],
}
for (const [key, { short }] of Object.entries(definitions)) {
if (!short) {
continue
}
// can be either an array or string
for (const s of [].concat(short)) {
shorthands[s] = [`--${key}`]
}
}
module.exports = {
get defaults () {
// NB: 'default' is a reserved word
return Object.entries(definitions).map(([key, { default: def }]) => {
return [key, def]
}).reduce((defaults, [key, def]) => {
defaults[key] = def
return defaults
}, {})
},
definitions,
flatten,
shorthands,
describeAll,
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0034 ]-- |