diff options
Diffstat (limited to 'deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js')
-rw-r--r-- | deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js b/deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js new file mode 100644 index 0000000000..7d57459779 --- /dev/null +++ b/deps/npm/node_modules/libcipm/lib/config/lifecycle-opts.js @@ -0,0 +1,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') + } +} |