blob: 7d574597798e1918be151a3a7ff003050fdde5b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
'use strict'
const log = require('npmlog')
module.exports = lifecycleOpts
function lifecycleOpts (opts) {
const objConfig = {}
for (const key of opts.keys()) {
const val = opts.get(key)
if (val != null) {
objConfig[key] = val
}
}
return {
config: objConfig,
scriptShell: opts.get('script-shell'),
force: opts.get('force'),
user: opts.get('user'),
group: opts.get('group'),
ignoreScripts: opts.get('ignore-scripts'),
ignorePrepublish: opts.get('ignore-prepublish'),
scriptsPrependNodePath: opts.get('scripts-prepend-node-path'),
unsafePerm: opts.get('unsafe-perm'),
log,
dir: opts.get('prefix'),
failOk: false,
production: opts.get('production')
}
}
|