diff options
Diffstat (limited to 'deps/npm/node_modules/npmconf/config-defs.js')
-rw-r--r-- | deps/npm/node_modules/npmconf/config-defs.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/deps/npm/node_modules/npmconf/config-defs.js b/deps/npm/node_modules/npmconf/config-defs.js index e53f2475c1..17bcf56d88 100644 --- a/deps/npm/node_modules/npmconf/config-defs.js +++ b/deps/npm/node_modules/npmconf/config-defs.js @@ -7,6 +7,7 @@ var path = require("path") , semver = require("semver") , stableFamily = semver.parse(process.version) , nopt = require("nopt") + , os = require('os') , osenv = require("osenv") try { @@ -235,6 +236,7 @@ Object.defineProperty(exports, "defaults", {get: function () { , globalignorefile : path.resolve( globalPrefix, "etc", "npmignore") , group : process.platform === "win32" ? 0 : process.env.SUDO_GID || (process.getgid && process.getgid()) + , heading: "npm" , ignore: "" , "init-module": path.resolve(home, '.npm-init.js') , "init.version" : "0.0.0" @@ -243,6 +245,7 @@ Object.defineProperty(exports, "defaults", {get: function () { , "init.author.url" : "" , json: false , link: false + , "local-address" : undefined , loglevel : "http" , logstream : process.stderr , long : false @@ -330,6 +333,7 @@ exports.types = , group : [Number, String] , "https-proxy" : [null, url] , "user-agent" : String + , "heading": String , ignore : String , "init-module": path , "init.version" : [null, semver] @@ -338,6 +342,18 @@ exports.types = , "init.author.url" : ["", url] , json: Boolean , link: Boolean + // local-address must be listed as an IP for a local network interface + // must be IPv4 due to node bug + , "local-address" : Object.keys(os.networkInterfaces()).map(function (nic) { + return os.networkInterfaces()[nic].filter(function (addr) { + return addr.family === "IPv4" + }) + .map(function (addr) { + return addr.address + }) + }).reduce(function (curr, next) { + return curr.concat(next) + }, []) , loglevel : ["silent","win","error","warn","http","info","verbose","silly"] , logstream : Stream , long : Boolean |