aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/lib/config
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/config')
-rw-r--r--deps/npm/lib/config/cmd-list.js2
-rw-r--r--deps/npm/lib/config/defaults.js12
-rw-r--r--deps/npm/lib/config/lifecycle.js30
3 files changed, 42 insertions, 2 deletions
diff --git a/deps/npm/lib/config/cmd-list.js b/deps/npm/lib/config/cmd-list.js
index f2d5fab17d..49c445a4f0 100644
--- a/deps/npm/lib/config/cmd-list.js
+++ b/deps/npm/lib/config/cmd-list.js
@@ -74,6 +74,8 @@ var cmdList = [
'team',
'deprecate',
'shrinkwrap',
+ 'token',
+ 'profile',
'help',
'help-search',
diff --git a/deps/npm/lib/config/defaults.js b/deps/npm/lib/config/defaults.js
index 93bac84a61..35617fd638 100644
--- a/deps/npm/lib/config/defaults.js
+++ b/deps/npm/lib/config/defaults.js
@@ -128,6 +128,8 @@ Object.defineProperty(exports, 'defaults', {get: function () {
cert: null,
+ cidr: null,
+
color: true,
depth: Infinity,
description: true,
@@ -144,6 +146,7 @@ Object.defineProperty(exports, 'defaults', {get: function () {
git: 'git',
'git-tag-version': true,
+ 'commit-hooks': true,
global: false,
globalconfig: path.resolve(globalPrefix, 'etc', 'npmrc'),
@@ -178,6 +181,7 @@ Object.defineProperty(exports, 'defaults', {get: function () {
'onload-script': false,
only: null,
optional: true,
+ otp: null,
'package-lock': true,
parseable: false,
'prefer-offline': false,
@@ -185,13 +189,13 @@ Object.defineProperty(exports, 'defaults', {get: function () {
prefix: globalPrefix,
production: process.env.NODE_ENV === 'production',
'progress': !process.env.TRAVIS && !process.env.CI,
- 'proprietary-attribs': true,
proxy: null,
'https-proxy': null,
'user-agent': 'npm/{npm-version} ' +
'node/{node-version} ' +
'{platform} ' +
'{arch}',
+ 'read-only': false,
'rebuild-bundle': true,
registry: 'https://registry.npmjs.org/',
rollback: true,
@@ -257,6 +261,7 @@ exports.types = {
'cache-max': Number,
'cache-min': Number,
cert: [null, String],
+ cidr: [null, String, Array],
color: ['always', Boolean],
depth: Number,
description: Boolean,
@@ -271,6 +276,7 @@ exports.types = {
'fetch-retry-maxtimeout': Number,
git: String,
'git-tag-version': Boolean,
+ 'commit-hooks': Boolean,
global: Boolean,
globalconfig: path,
'global-style': Boolean,
@@ -308,14 +314,15 @@ exports.types = {
only: [null, 'dev', 'development', 'prod', 'production'],
optional: Boolean,
'package-lock': Boolean,
+ otp: Number,
parseable: Boolean,
'prefer-offline': Boolean,
'prefer-online': Boolean,
prefix: path,
production: Boolean,
progress: Boolean,
- 'proprietary-attribs': Boolean,
proxy: [null, false, url], // allow proxy to be disabled explicitly
+ 'read-only': Boolean,
'rebuild-bundle': Boolean,
registry: [null, url],
rollback: Boolean,
@@ -405,6 +412,7 @@ exports.shorthands = {
m: ['--message'],
p: ['--parseable'],
porcelain: ['--parseable'],
+ readonly: ['--read-only'],
g: ['--global'],
S: ['--save'],
D: ['--save-dev'],
diff --git a/deps/npm/lib/config/lifecycle.js b/deps/npm/lib/config/lifecycle.js
new file mode 100644
index 0000000000..5fca93939d
--- /dev/null
+++ b/deps/npm/lib/config/lifecycle.js
@@ -0,0 +1,30 @@
+'use strict'
+
+const npm = require('../npm.js')
+const log = require('npmlog')
+
+module.exports = lifecycleOpts
+
+let opts
+
+function lifecycleOpts (moreOpts) {
+ if (!opts) {
+ opts = {
+ config: npm.config.snapshot,
+ dir: npm.dir,
+ failOk: false,
+ force: npm.config.get('force'),
+ group: npm.config.get('group'),
+ ignorePrepublish: npm.config.get('ignore-prepublish'),
+ ignoreScripts: npm.config.get('ignore-scripts'),
+ log: log,
+ production: npm.config.get('production'),
+ scriptShell: npm.config.get('script-shell'),
+ scriptsPrependNodePath: npm.config.get('scripts-prepend-node-path'),
+ unsafePerm: npm.config.get('unsafe-perm'),
+ user: npm.config.get('user')
+ }
+ }
+
+ return moreOpts ? Object.assign({}, opts, moreOpts) : opts
+}