Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorForrest L Norvell <forrest@npmjs.com>2014-07-01 22:18:41 +0400
committerForrest L Norvell <forrest@npmjs.com>2014-07-01 22:18:41 +0400
commit43d44411ee7df91db093b0b84f37c19ef492f6e3 (patch)
treef6abf3542d5c64d89283171b8a7921e42034ebe6
parent7a8c067920f539cbb869448dffe0f89b8e1fadfb (diff)
parent1e099c556f230634c4de790be8662c6cdef2e38a (diff)
Merge branch 'v1.4'
Conflicts: package.json
-rw-r--r--lib/bugs.js2
-rw-r--r--lib/install.js2
-rw-r--r--lib/owner.js10
-rw-r--r--lib/search.js2
-rw-r--r--lib/star.js2
-rw-r--r--lib/unpublish.js2
-rw-r--r--lib/view.js2
-rw-r--r--node_modules/glob/glob.js6
-rw-r--r--node_modules/glob/package.json36
-rw-r--r--node_modules/glob/test/bash-results.json1
-rw-r--r--node_modules/glob/test/error-callback.js4
-rw-r--r--node_modules/glob/test/nocase-nomagic.js3
-rw-r--r--node_modules/nopt/lib/nopt.js2
-rw-r--r--node_modules/nopt/package.json8
-rw-r--r--node_modules/npmconf/config-defs.js26
-rw-r--r--node_modules/npmconf/lib/load-cafile.js3
-rw-r--r--node_modules/npmconf/npmconf.js2
-rw-r--r--node_modules/npmconf/package.json34
-rw-r--r--package.json6
19 files changed, 70 insertions, 83 deletions
diff --git a/lib/bugs.js b/lib/bugs.js
index 9584c326c..b3022bf2a 100644
--- a/lib/bugs.js
+++ b/lib/bugs.js
@@ -14,7 +14,7 @@ var npm = require("./npm.js")
bugs.completion = function (opts, cb) {
if (opts.conf.argv.remain.length > 2) return cb()
- var uri = url.resolve(npm.config.get("registry"), "/-/short")
+ var uri = url.resolve(npm.config.get("registry"), "-/short")
registry.get(uri, { timeout : 60000 }, function (er, list) {
return cb(null, list || [])
})
diff --git a/lib/install.js b/lib/install.js
index c1f923e66..8f20bc839 100644
--- a/lib/install.js
+++ b/lib/install.js
@@ -34,7 +34,7 @@ install.completion = function (opts, cb) {
// if it starts with https?://, then just give up, because it's a url
// for now, not yet implemented.
var registry = npm.registry
- , uri = url.resolve(npm.config.get("registry"), "/-/short")
+ , uri = url.resolve(npm.config.get("registry"), "-/short")
registry.get(uri, null, function (er, pkgs) {
if (er) return cb()
if (!opts.partialWord) return cb(null, pkgs)
diff --git a/lib/owner.js b/lib/owner.js
index 45ef8c833..34dbbc247 100644
--- a/lib/owner.js
+++ b/lib/owner.js
@@ -19,13 +19,13 @@ owner.completion = function (opts, cb) {
switch (argv[2]) {
case "ls":
if (argv.length > 3) return cb()
- uri = url.resolve(npm.config.get("registry"), "/-/short")
+ uri = url.resolve(npm.config.get("registry"), "-/short")
return registry.get(uri, null, cb)
case "rm":
if (argv.length > 3) {
theUser = encodeURIComponent(argv[3])
- uri = url.resolve(npm.config.get("registry"), "/-/by-user/"+theUser+"|"+un)
+ uri = url.resolve(npm.config.get("registry"), "-/by-user/"+theUser+"|"+un)
console.error(uri)
return registry.get(uri, null, function (er, d) {
if (er) return cb(er)
@@ -40,7 +40,7 @@ owner.completion = function (opts, cb) {
case "add":
if (argv.length > 3) {
theUser = encodeURIComponent(argv[3])
- uri = url.resolve(npm.config.get("registry"), "/-/by-user/"+theUser+"|"+un)
+ uri = url.resolve(npm.config.get("registry"), "-/by-user/"+theUser+"|"+un)
console.error(uri)
return registry.get(uri, null, function (er, d) {
console.error(uri, er || d)
@@ -54,7 +54,7 @@ owner.completion = function (opts, cb) {
})
}
// just list all users who aren't me.
- uri = url.resolve(npm.config.get("registry"), "/-/users")
+ uri = url.resolve(npm.config.get("registry"), "-/users")
return registry.get(uri, null, function (er, list) {
if (er) return cb()
return cb(null, Object.keys(list).filter(function (n) {
@@ -156,7 +156,7 @@ function rm (user, pkg, cb) {
function mutate (pkg, user, mutation, cb) {
if (user) {
- var uri = url.resolve(npm.config.get("registry"), "/-/user/org.couchdb.user:"+user)
+ var uri = url.resolve(npm.config.get("registry"), "-/user/org.couchdb.user:"+user)
registry.get(uri, null, mutate_)
} else {
mutate_(null, null)
diff --git a/lib/search.js b/lib/search.js
index 06907dfe4..e7892350c 100644
--- a/lib/search.js
+++ b/lib/search.js
@@ -63,7 +63,7 @@ function getFilteredData (staleness, args, notArgs, cb) {
follow : true,
staleOk : true
}
- var uri = url.resolve(npm.config.get("registry"), "/-/all")
+ var uri = url.resolve(npm.config.get("registry"), "-/all")
registry.get(uri, opts, function (er, data) {
if (er) return cb(er)
return cb(null, filter(data, args, notArgs))
diff --git a/lib/star.js b/lib/star.js
index bf68582ca..9c0b4ea9e 100644
--- a/lib/star.js
+++ b/lib/star.js
@@ -11,7 +11,7 @@ star.usage = "npm star <package> [pkg, pkg, ...]\n"
+ "npm unstar <package> [pkg, pkg, ...]"
star.completion = function (opts, cb) {
- var uri = url.resolve(npm.config.get("registry"), "/-/short")
+ var uri = url.resolve(npm.config.get("registry"), "-/short")
registry.get(uri, { timeout : 60000 }, function (er, list) {
return cb(null, list || [])
})
diff --git a/lib/unpublish.js b/lib/unpublish.js
index 64d022fe0..225c1c3c4 100644
--- a/lib/unpublish.js
+++ b/lib/unpublish.js
@@ -14,7 +14,7 @@ unpublish.completion = function (opts, cb) {
if (opts.conf.argv.remain.length >= 3) return cb()
var un = encodeURIComponent(npm.config.get("username"))
if (!un) return cb()
- var uri = url.resolve(npm.config.get("registry"), "/-/by-user/"+un)
+ var uri = url.resolve(npm.config.get("registry"), "-/by-user/"+un)
registry.get(uri, null, function (er, pkgs) {
// do a bit of filtering at this point, so that we don't need
// to fetch versions for more than one thing, but also don't
diff --git a/lib/view.js b/lib/view.js
index 4931caef7..33bf550dd 100644
--- a/lib/view.js
+++ b/lib/view.js
@@ -6,7 +6,7 @@ view.usage = "npm view pkg[@version] [<field>[.subfield]...]"
view.completion = function (opts, cb) {
var uri
if (opts.conf.argv.remain.length <= 2) {
- uri = url.resolve(npm.config.get("registry"), "/-/short")
+ uri = url.resolve(npm.config.get("registry"), "-/short")
return registry.get(uri, null, cb)
}
// have the package, get the fields.
diff --git a/node_modules/glob/glob.js b/node_modules/glob/glob.js
index b55ac8c09..36bbba84c 100644
--- a/node_modules/glob/glob.js
+++ b/node_modules/glob/glob.js
@@ -36,8 +36,10 @@
module.exports = glob
-var fs = require("fs")
-, minimatch = require("minimatch")
+var fs
+try { fs = require("graceful-fs") } catch (e) { fs = require("fs") }
+
+var minimatch = require("minimatch")
, Minimatch = minimatch.Minimatch
, inherits = require("inherits")
, EE = require("events").EventEmitter
diff --git a/node_modules/glob/package.json b/node_modules/glob/package.json
index 2e0b69603..f479f06eb 100644
--- a/node_modules/glob/package.json
+++ b/node_modules/glob/package.json
@@ -6,7 +6,7 @@
},
"name": "glob",
"description": "a little globber",
- "version": "4.0.2",
+ "version": "4.0.3",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
@@ -15,10 +15,14 @@
"engines": {
"node": "*"
},
+ "optionalDependencies": {
+ "graceful-fs": "^3.0.2"
+ },
"dependencies": {
"inherits": "2",
"minimatch": "^0.3.0",
- "once": "^1.3.0"
+ "once": "^1.3.0",
+ "graceful-fs": "^3.0.2"
},
"devDependencies": {
"tap": "~0.4.0",
@@ -30,30 +34,14 @@
"test-regen": "TEST_REGEN=1 node test/00-setup.js"
},
"license": "BSD",
- "gitHead": "4e85a5bcb2f28f82fa9836b6b2baba8af8e31e96",
+ "readme": "# Glob\n\nMatch files using the patterns the shell uses, like stars and stuff.\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options])\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array<String>} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array<String>} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n* `statCache` Collection of all the stat results the glob search\n performed.\n* `cache` Convenience object. Each field has the following possible\n values:\n * `false` - Path does not exist\n * `true` - Path exists\n * `1` - Path exists, and is not a directory\n * `2` - Path exists, and is a directory\n * `[file, entries, ...]` - Path exists, is a directory, and the\n array value is the results of `fs.readdir`\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `dot` Include `.dot` files in normal matches and `globstar` matches.\n Note that an explicit dot in a portion of the pattern will always\n match dot files.\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `cache` See `cache` property above. Pass in a previously generated\n cache object to save some fs calls.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not.\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the cache or statCache objects are reused between glob\ncalls.\n\nUsers are thus advised not to use a glob result as a guarantee of\nfilesystem state in the face of rapid changes. For the vast majority\nof operations, this is never a problem.\n",
+ "readmeFilename": "README.md",
+ "gitHead": "3e6881cb2c584f540c814476629b5bbdfccf36f2",
"bugs": {
"url": "https://github.com/isaacs/node-glob/issues"
},
"homepage": "https://github.com/isaacs/node-glob",
- "_id": "glob@4.0.2",
- "_shasum": "d57dbdf54984dd7635c8247d1f2ebde2e81f4ee1",
- "_from": "glob@latest",
- "_npmVersion": "1.4.13",
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- }
- ],
- "dist": {
- "shasum": "d57dbdf54984dd7635c8247d1f2ebde2e81f4ee1",
- "tarball": "http://registry.npmjs.org/glob/-/glob-4.0.2.tgz"
- },
- "directories": {},
- "_resolved": "https://registry.npmjs.org/glob/-/glob-4.0.2.tgz",
- "readme": "ERROR: No README data found!"
+ "_id": "glob@4.0.3",
+ "_shasum": "cb30c860359801cb7d56436976888fc4a09a35db",
+ "_from": "glob@latest"
}
diff --git a/node_modules/glob/test/bash-results.json b/node_modules/glob/test/bash-results.json
index 726d332e7..9b5796d6c 100644
--- a/node_modules/glob/test/bash-results.json
+++ b/node_modules/glob/test/bash-results.json
@@ -283,6 +283,7 @@
"{./*/*,/tmp/glob-test/*}": [
"./examples/g.js",
"./examples/usr-local.js",
+ "./node_modules/graceful-fs",
"./node_modules/inherits",
"./node_modules/minimatch",
"./node_modules/mkdirp",
diff --git a/node_modules/glob/test/error-callback.js b/node_modules/glob/test/error-callback.js
index 0b64aadf3..629eb2843 100644
--- a/node_modules/glob/test/error-callback.js
+++ b/node_modules/glob/test/error-callback.js
@@ -1,4 +1,6 @@
-var fs = require('fs')
+var fs
+try { fs = require('graceful-fs') } catch (e) { fs = require('fs') }
+var fs = require('graceful-fs')
var test = require('tap').test
var glob = require('../')
diff --git a/node_modules/glob/test/nocase-nomagic.js b/node_modules/glob/test/nocase-nomagic.js
index 162aaa1a6..5a29b0859 100644
--- a/node_modules/glob/test/nocase-nomagic.js
+++ b/node_modules/glob/test/nocase-nomagic.js
@@ -1,4 +1,5 @@
-var fs = require('fs');
+var fs
+try { fs = require('graceful-fs') } catch (e) { fs = require('fs') }
var test = require('tap').test;
var glob = require('../');
diff --git a/node_modules/nopt/lib/nopt.js b/node_modules/nopt/lib/nopt.js
index 223ebfe00..5309a00fc 100644
--- a/node_modules/nopt/lib/nopt.js
+++ b/node_modules/nopt/lib/nopt.js
@@ -126,6 +126,8 @@ function validateString (data, k, val) {
function validatePath (data, k, val) {
if (val === true) return false
+ if (val === null) return true
+
val = String(val)
var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\//
if (val.match(homePattern) && process.env.HOME) {
diff --git a/node_modules/nopt/package.json b/node_modules/nopt/package.json
index 67d10b87b..874f1128c 100644
--- a/node_modules/nopt/package.json
+++ b/node_modules/nopt/package.json
@@ -1,6 +1,6 @@
{
"name": "nopt",
- "version": "3.0.0",
+ "version": "3.0.1",
"description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.",
"author": {
"name": "Isaac Z. Schlueter",
@@ -30,12 +30,12 @@
},
"readme": "If you want to write an option parser, and have it be good, there are\ntwo ways to do it. The Right Way, and the Wrong Way.\n\nThe Wrong Way is to sit down and write an option parser. We've all done\nthat.\n\nThe Right Way is to write some complex configurable program with so many\noptions that you go half-insane just trying to manage them all, and put\nit off with duct-tape solutions until you see exactly to the core of the\nproblem, and finally snap and write an awesome option parser.\n\nIf you want to write an option parser, don't write an option parser.\nWrite a package manager, or a source control system, or a service\nrestarter, or an operating system. You probably won't end up with a\ngood one of those, but if you don't give up, and you are relentless and\ndiligent enough in your procrastination, you may just end up with a very\nnice option parser.\n\n## USAGE\n\n // my-program.js\n var nopt = require(\"nopt\")\n , Stream = require(\"stream\").Stream\n , path = require(\"path\")\n , knownOpts = { \"foo\" : [String, null]\n , \"bar\" : [Stream, Number]\n , \"baz\" : path\n , \"bloo\" : [ \"big\", \"medium\", \"small\" ]\n , \"flag\" : Boolean\n , \"pick\" : Boolean\n , \"many\" : [String, Array]\n }\n , shortHands = { \"foofoo\" : [\"--foo\", \"Mr. Foo\"]\n , \"b7\" : [\"--bar\", \"7\"]\n , \"m\" : [\"--bloo\", \"medium\"]\n , \"p\" : [\"--pick\"]\n , \"f\" : [\"--flag\"]\n }\n // everything is optional.\n // knownOpts and shorthands default to {}\n // arg list defaults to process.argv\n // slice defaults to 2\n , parsed = nopt(knownOpts, shortHands, process.argv, 2)\n console.log(parsed)\n\nThis would give you support for any of the following:\n\n```bash\n$ node my-program.js --foo \"blerp\" --no-flag\n{ \"foo\" : \"blerp\", \"flag\" : false }\n\n$ node my-program.js ---bar 7 --foo \"Mr. Hand\" --flag\n{ bar: 7, foo: \"Mr. Hand\", flag: true }\n\n$ node my-program.js --foo \"blerp\" -f -----p\n{ foo: \"blerp\", flag: true, pick: true }\n\n$ node my-program.js -fp --foofoo\n{ foo: \"Mr. Foo\", flag: true, pick: true }\n\n$ node my-program.js --foofoo -- -fp # -- stops the flag parsing.\n{ foo: \"Mr. Foo\", argv: { remain: [\"-fp\"] } }\n\n$ node my-program.js --blatzk -fp # unknown opts are ok.\n{ blatzk: true, flag: true, pick: true }\n\n$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value\n{ blatzk: 1000, flag: true, pick: true }\n\n$ node my-program.js --no-blatzk -fp # unless they start with \"no-\"\n{ blatzk: false, flag: true, pick: true }\n\n$ node my-program.js --baz b/a/z # known paths are resolved.\n{ baz: \"/Users/isaacs/b/a/z\" }\n\n# if Array is one of the types, then it can take many\n# values, and will always be an array. The other types provided\n# specify what types are allowed in the list.\n\n$ node my-program.js --many 1 --many null --many foo\n{ many: [\"1\", \"null\", \"foo\"] }\n\n$ node my-program.js --many foo\n{ many: [\"foo\"] }\n```\n\nRead the tests at the bottom of `lib/nopt.js` for more examples of\nwhat this puppy can do.\n\n## Types\n\nThe following types are supported, and defined on `nopt.typeDefs`\n\n* String: A normal string. No parsing is done.\n* path: A file system path. Gets resolved against cwd if not absolute.\n* url: A url. If it doesn't parse, it isn't accepted.\n* Number: Must be numeric.\n* Date: Must parse as a date. If it does, and `Date` is one of the options,\n then it will return a Date object, not a string.\n* Boolean: Must be either `true` or `false`. If an option is a boolean,\n then it does not need a value, and its presence will imply `true` as\n the value. To negate boolean flags, do `--no-whatever` or `--whatever\n false`\n* NaN: Means that the option is strictly not allowed. Any value will\n fail.\n* Stream: An object matching the \"Stream\" class in node. Valuable\n for use when validating programmatically. (npm uses this to let you\n supply any WriteStream on the `outfd` and `logfd` config options.)\n* Array: If `Array` is specified as one of the types, then the value\n will be parsed as a list of options. This means that multiple values\n can be specified, and that the value will always be an array.\n\nIf a type is an array of values not on this list, then those are\nconsidered valid values. For instance, in the example above, the\n`--bloo` option can only be one of `\"big\"`, `\"medium\"`, or `\"small\"`,\nand any other value will be rejected.\n\nWhen parsing unknown fields, `\"true\"`, `\"false\"`, and `\"null\"` will be\ninterpreted as their JavaScript equivalents.\n\nYou can also mix types and values, or multiple types, in a list. For\ninstance `{ blah: [Number, null] }` would allow a value to be set to\neither a Number or null. When types are ordered, this implies a\npreference, and the first type that can be used to properly interpret\nthe value will be used.\n\nTo define a new type, add it to `nopt.typeDefs`. Each item in that\nhash is an object with a `type` member and a `validate` method. The\n`type` member is an object that matches what goes in the type list. The\n`validate` method is a function that gets called with `validate(data,\nkey, val)`. Validate methods should assign `data[key]` to the valid\nvalue of `val` if it can be handled properly, or return boolean\n`false` if it cannot.\n\nYou can also call `nopt.clean(data, types, typeDefs)` to clean up a\nconfig object and remove its invalid properties.\n\n## Error Handling\n\nBy default, nopt outputs a warning to standard error when invalid\noptions are found. You can change this behavior by assigning a method\nto `nopt.invalidHandler`. This method will be called with\nthe offending `nopt.invalidHandler(key, val, types)`.\n\nIf no `nopt.invalidHandler` is assigned, then it will console.error\nits whining. If it is assigned to boolean `false` then the warning is\nsuppressed.\n\n## Abbreviations\n\nYes, they are supported. If you define options like this:\n\n```javascript\n{ \"foolhardyelephants\" : Boolean\n, \"pileofmonkeys\" : Boolean }\n```\n\nThen this will work:\n\n```bash\nnode program.js --foolhar --pil\nnode program.js --no-f --pileofmon\n# etc.\n```\n\n## Shorthands\n\nShorthands are a hash of shorter option names to a snippet of args that\nthey expand to.\n\nIf multiple one-character shorthands are all combined, and the\ncombination does not unambiguously match any other option or shorthand,\nthen they will be broken up into their constituent parts. For example:\n\n```json\n{ \"s\" : [\"--loglevel\", \"silent\"]\n, \"g\" : \"--global\"\n, \"f\" : \"--force\"\n, \"p\" : \"--parseable\"\n, \"l\" : \"--long\"\n}\n```\n\n```bash\nnpm ls -sgflp\n# just like doing this:\nnpm ls --loglevel silent --global --force --long --parseable\n```\n\n## The Rest of the args\n\nThe config object returned by nopt is given a special member called\n`argv`, which is an object with the following fields:\n\n* `remain`: The remaining args after all the parsing has occurred.\n* `original`: The args as they originally appeared.\n* `cooked`: The args after flags and shorthands are expanded.\n\n## Slicing\n\nNode programs are called with more or less the exact argv as it appears\nin C land, after the v8 and node-specific options have been plucked off.\nAs such, `argv[0]` is always `node` and `argv[1]` is always the\nJavaScript program being run.\n\nThat's usually not very useful to you. So they're sliced off by\ndefault. If you want them, then you can pass in `0` as the last\nargument, or any other number that you'd like to slice off the start of\nthe list.\n",
"readmeFilename": "README.md",
- "gitHead": "b08ea1db39ca91cb5db37bc1b2fcf07e16386094",
+ "gitHead": "4296f7aba7847c198fea2da594f9e1bec02817ec",
"bugs": {
"url": "https://github.com/isaacs/nopt/issues"
},
"homepage": "https://github.com/isaacs/nopt",
- "_id": "nopt@3.0.0",
- "_shasum": "4fcf4bf09123d5ee6b2f70214a4d95789b875c79",
+ "_id": "nopt@3.0.1",
+ "_shasum": "bce5c42446a3291f47622a370abbf158fbbacbfd",
"_from": "nopt@latest"
}
diff --git a/node_modules/npmconf/config-defs.js b/node_modules/npmconf/config-defs.js
index 02425a1da..66f4f1b47 100644
--- a/node_modules/npmconf/config-defs.js
+++ b/node_modules/npmconf/config-defs.js
@@ -213,7 +213,7 @@ Object.defineProperty(exports, "defaults", {get: function () {
, user : process.platform === "win32" ? 0 : "nobody"
, username : ""
, userconfig : path.resolve(home, ".npmrc")
- , umask: "022"
+ , umask: process.umask ? process.umask() : parseInt("022", 8)
, version : false
, versions : false
, viewer: process.platform === "win32" ? "browser" : "man"
@@ -266,16 +266,7 @@ exports.types =
, 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)
- }, [])
+ , "local-address" : getLocalAddresses()
, loglevel : ["silent","win","error","warn","http","info","verbose","silly"]
, logstream : Stream
, long : Boolean
@@ -327,6 +318,19 @@ exports.types =
, _password: String
}
+function getLocalAddresses() {
+ 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)
+ }, []).concat(undefined)
+}
+
exports.shorthands =
{ s : ["--loglevel", "silent"]
, d : ["--loglevel", "info"]
diff --git a/node_modules/npmconf/lib/load-cafile.js b/node_modules/npmconf/lib/load-cafile.js
index 402058bdd..b8c9fff23 100644
--- a/node_modules/npmconf/lib/load-cafile.js
+++ b/node_modules/npmconf/lib/load-cafile.js
@@ -3,6 +3,9 @@ module.exports = loadCAFile
var fs = require('fs')
function loadCAFile(cafilePath, cb) {
+ if (!cafilePath)
+ return process.nextTick(cb)
+
fs.readFile(cafilePath, 'utf8', afterCARead.bind(this))
function afterCARead(er, cadata) {
diff --git a/node_modules/npmconf/npmconf.js b/node_modules/npmconf/npmconf.js
index 398a532bf..248220a8f 100644
--- a/node_modules/npmconf/npmconf.js
+++ b/node_modules/npmconf/npmconf.js
@@ -429,4 +429,6 @@ function validate (cl) {
cl.list.forEach(function (conf, level) {
nopt.clean(conf, configDefs.types)
})
+
+ nopt.clean(cl.root, configDefs.types)
}
diff --git a/node_modules/npmconf/package.json b/node_modules/npmconf/package.json
index 4b0e28f9e..a0e1bbbd7 100644
--- a/node_modules/npmconf/package.json
+++ b/node_modules/npmconf/package.json
@@ -1,6 +1,6 @@
{
"name": "npmconf",
- "version": "1.1.2",
+ "version": "1.1.4",
"description": "The config thing npm uses",
"main": "npmconf.js",
"directories": {
@@ -11,7 +11,7 @@
"inherits": "~2.0.0",
"ini": "^1.2.0",
"mkdirp": "~0.3.3",
- "nopt": "2 || 3",
+ "nopt": "~3.0.1",
"once": "~1.3.0",
"osenv": "^0.1.0",
"semver": "2",
@@ -40,32 +40,14 @@
"url": "http://blog.izs.me"
},
"license": "BSD",
- "gitHead": "6649ff293d764a3343414a3906168c806668f974",
+ "readme": "# npmconf\n\nThe config thing npm uses\n\nIf you are interested in interacting with the config settings that npm\nuses, then use this module.\n\nHowever, if you are writing a new Node.js program, and want\nconfiguration functionality similar to what npm has, but for your\nown thing, then I'd recommend using [rc](https://github.com/dominictarr/rc),\nwhich is probably what you want.\n\nIf I were to do it all over again, that's what I'd do for npm. But,\nalas, there are many systems depending on many of the particulars of\nnpm's configuration setup, so it's not worth the cost of changing.\n\n## USAGE\n\n```javascript\nvar npmconf = require('npmconf')\n\n// pass in the cli options that you read from the cli\n// or whatever top-level configs you want npm to use for now.\nnpmconf.load({some:'configs'}, function (er, conf) {\n // do stuff with conf\n conf.get('some', 'cli') // 'configs'\n conf.get('username') // 'joebobwhatevers'\n conf.set('foo', 'bar', 'user')\n conf.save('user', function (er) {\n // foo = bar is now saved to ~/.npmrc or wherever\n })\n})\n```\n",
+ "readmeFilename": "README.md",
+ "gitHead": "3662624af0834159c35843fcf850469c09e0873c",
"bugs": {
"url": "https://github.com/isaacs/npmconf/issues"
},
"homepage": "https://github.com/isaacs/npmconf",
- "_id": "npmconf@1.1.2",
- "_shasum": "65d3775f77653786fb5a112e17df5272ff3955fd",
- "_from": "npmconf@1.1.2",
- "_npmVersion": "1.4.16",
- "_npmUser": {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- "maintainers": [
- {
- "name": "isaacs",
- "email": "i@izs.me"
- },
- {
- "name": "othiym23",
- "email": "ogd@aoaioxxysz.net"
- }
- ],
- "dist": {
- "shasum": "65d3775f77653786fb5a112e17df5272ff3955fd",
- "tarball": "http://registry.npmjs.org/npmconf/-/npmconf-1.1.2.tgz"
- },
- "_resolved": "https://registry.npmjs.org/npmconf/-/npmconf-1.1.2.tgz"
+ "_id": "npmconf@1.1.4",
+ "_shasum": "2ac5d080206d4bfb9abc01bd34f083f93ae1603c",
+ "_from": "npmconf@latest"
}
diff --git a/package.json b/package.json
index 6ea096388..4ef415aba 100644
--- a/package.json
+++ b/package.json
@@ -48,7 +48,7 @@
"fstream-npm": "~0.1.7",
"github-url-from-git": "1.1.1",
"github-url-from-username-repo": "~0.2.0",
- "glob": "~4.0.2",
+ "glob": "~4.0.3",
"graceful-fs": "~3.0.0",
"inflight": "~1.0.1",
"ini": "~1.2.0",
@@ -58,12 +58,12 @@
"minimatch": "~0.3.0",
"mkdirp": "~0.3.5",
"node-gyp": "~0.13.0",
- "nopt": "~3.0.0",
+ "nopt": "~3.0.1",
"npm-cache-filename": "~1.0.1",
"npm-install-checks": "~1.0.2",
"npm-registry-client": "~2.0.2",
"npm-user-validate": "~0.1.0",
- "npmconf": "~1.1.2",
+ "npmconf": "~1.1.4",
"npmlog": "~0.1.1",
"once": "~1.3.0",
"opener": "~1.3.0",