You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bh...@apache.org on 2014/03/27 16:08:20 UTC

[06/51] [partial] CB-6346 - Add node_modules to source control

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/mark.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/mark.js b/blackberry10/node_modules/plugman/node_modules/glob/test/mark.js
new file mode 100644
index 0000000..ed68a33
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/mark.js
@@ -0,0 +1,74 @@
+var test = require("tap").test
+var glob = require('../')
+process.chdir(__dirname)
+
+test("mark, no / on pattern", function (t) {
+  glob("a/*", {mark: true}, function (er, results) {
+    if (er)
+      throw er
+    var expect = [ 'a/abcdef/',
+                   'a/abcfed/',
+                   'a/b/',
+                   'a/bc/',
+                   'a/c/',
+                   'a/cb/' ]
+
+    if (process.platform !== "win32")
+      expect.push('a/symlink/')
+
+    t.same(results, expect)
+    t.end()
+  })
+})
+
+test("mark=false, no / on pattern", function (t) {
+  glob("a/*", function (er, results) {
+    if (er)
+      throw er
+    var expect = [ 'a/abcdef',
+                   'a/abcfed',
+                   'a/b',
+                   'a/bc',
+                   'a/c',
+                   'a/cb' ]
+
+    if (process.platform !== "win32")
+      expect.push('a/symlink')
+    t.same(results, expect)
+    t.end()
+  })
+})
+
+test("mark=true, / on pattern", function (t) {
+  glob("a/*/", {mark: true}, function (er, results) {
+    if (er)
+      throw er
+    var expect = [ 'a/abcdef/',
+                    'a/abcfed/',
+                    'a/b/',
+                    'a/bc/',
+                    'a/c/',
+                    'a/cb/' ]
+    if (process.platform !== "win32")
+      expect.push('a/symlink/')
+    t.same(results, expect)
+    t.end()
+  })
+})
+
+test("mark=false, / on pattern", function (t) {
+  glob("a/*/", function (er, results) {
+    if (er)
+      throw er
+    var expect = [ 'a/abcdef/',
+                   'a/abcfed/',
+                   'a/b/',
+                   'a/bc/',
+                   'a/c/',
+                   'a/cb/' ]
+    if (process.platform !== "win32")
+      expect.push('a/symlink/')
+    t.same(results, expect)
+    t.end()
+  })
+})

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/nocase-nomagic.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/nocase-nomagic.js b/blackberry10/node_modules/plugman/node_modules/glob/test/nocase-nomagic.js
new file mode 100644
index 0000000..2503f23
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/nocase-nomagic.js
@@ -0,0 +1,113 @@
+var fs = require('fs');
+var test = require('tap').test;
+var glob = require('../');
+
+test('mock fs', function(t) {
+  var stat = fs.stat
+  var statSync = fs.statSync
+  var readdir = fs.readdir
+  var readdirSync = fs.readdirSync
+
+  function fakeStat(path) {
+    var ret
+    switch (path.toLowerCase()) {
+      case '/tmp': case '/tmp/':
+        ret = { isDirectory: function() { return true } }
+        break
+      case '/tmp/a':
+        ret = { isDirectory: function() { return false } }
+        break
+    }
+    return ret
+  }
+
+  fs.stat = function(path, cb) {
+    var f = fakeStat(path);
+    if (f) {
+      process.nextTick(function() {
+        cb(null, f)
+      })
+    } else {
+      stat.call(fs, path, cb)
+    }
+  }
+
+  fs.statSync = function(path) {
+    return fakeStat(path) || statSync.call(fs, path)
+  }
+
+  function fakeReaddir(path) {
+    var ret
+    switch (path.toLowerCase()) {
+      case '/tmp': case '/tmp/':
+        ret = [ 'a', 'A' ]
+        break
+      case '/':
+        ret = ['tmp', 'tMp', 'tMP', 'TMP']
+    }
+    return ret
+  }
+
+  fs.readdir = function(path, cb) {
+    var f = fakeReaddir(path)
+    if (f)
+      process.nextTick(function() {
+        cb(null, f)
+      })
+    else
+      readdir.call(fs, path, cb)
+  }
+
+  fs.readdirSync = function(path) {
+    return fakeReaddir(path) || readdirSync.call(fs, path)
+  }
+
+  t.pass('mocked')
+  t.end()
+})
+
+test('nocase, nomagic', function(t) {
+  var n = 2
+  var want = [ '/TMP/A',
+               '/TMP/a',
+               '/tMP/A',
+               '/tMP/a',
+               '/tMp/A',
+               '/tMp/a',
+               '/tmp/A',
+               '/tmp/a' ]
+  glob('/tmp/a', { nocase: true }, function(er, res) {
+    if (er)
+      throw er
+    t.same(res.sort(), want)
+    if (--n === 0) t.end()
+  })
+  glob('/tmp/A', { nocase: true }, function(er, res) {
+    if (er)
+      throw er
+    t.same(res.sort(), want)
+    if (--n === 0) t.end()
+  })
+})
+
+test('nocase, with some magic', function(t) {
+  t.plan(2)
+  var want = [ '/TMP/A',
+               '/TMP/a',
+               '/tMP/A',
+               '/tMP/a',
+               '/tMp/A',
+               '/tMp/a',
+               '/tmp/A',
+               '/tmp/a' ]
+  glob('/tmp/*', { nocase: true }, function(er, res) {
+    if (er)
+      throw er
+    t.same(res.sort(), want)
+  })
+  glob('/tmp/*', { nocase: true }, function(er, res) {
+    if (er)
+      throw er
+    t.same(res.sort(), want)
+  })
+})

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/pause-resume.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/pause-resume.js b/blackberry10/node_modules/plugman/node_modules/glob/test/pause-resume.js
new file mode 100644
index 0000000..e1ffbab
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/pause-resume.js
@@ -0,0 +1,73 @@
+// show that no match events happen while paused.
+var tap = require("tap")
+, child_process = require("child_process")
+// just some gnarly pattern with lots of matches
+, pattern = "test/a/!(symlink)/**"
+, bashResults = require("./bash-results.json")
+, patterns = Object.keys(bashResults)
+, glob = require("../")
+, Glob = glob.Glob
+, path = require("path")
+
+// run from the root of the project
+// this is usually where you're at anyway, but be sure.
+process.chdir(path.resolve(__dirname, ".."))
+
+function alphasort (a, b) {
+  a = a.toLowerCase()
+  b = b.toLowerCase()
+  return a > b ? 1 : a < b ? -1 : 0
+}
+
+function cleanResults (m) {
+  // normalize discrepancies in ordering, duplication,
+  // and ending slashes.
+  return m.map(function (m) {
+    return m.replace(/\/+/g, "/").replace(/\/$/, "")
+  }).sort(alphasort).reduce(function (set, f) {
+    if (f !== set[set.length - 1]) set.push(f)
+    return set
+  }, []).sort(alphasort).map(function (f) {
+    // de-windows
+    return (process.platform !== 'win32') ? f
+           : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/')
+  })
+}
+
+var globResults = []
+tap.test("use a Glob object, and pause/resume it", function (t) {
+  var g = new Glob(pattern)
+  , paused = false
+  , res = []
+  , expect = bashResults[pattern]
+
+  g.on("pause", function () {
+    console.error("pause")
+  })
+
+  g.on("resume", function () {
+    console.error("resume")
+  })
+
+  g.on("match", function (m) {
+    t.notOk(g.paused, "must not be paused")
+    globResults.push(m)
+    g.pause()
+    t.ok(g.paused, "must be paused")
+    setTimeout(g.resume.bind(g), 10)
+  })
+
+  g.on("end", function (matches) {
+    t.pass("reached glob end")
+    globResults = cleanResults(globResults)
+    matches = cleanResults(matches)
+    t.deepEqual(matches, globResults,
+      "end event matches should be the same as match events")
+
+    t.deepEqual(matches, expect,
+      "glob matches should be the same as bash results")
+
+    t.end()
+  })
+})
+

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/root-nomount.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/root-nomount.js b/blackberry10/node_modules/plugman/node_modules/glob/test/root-nomount.js
new file mode 100644
index 0000000..3ac5979
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/root-nomount.js
@@ -0,0 +1,39 @@
+var tap = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+tap.test("changing root and searching for /b*/**", function (t) {
+  var glob = require('../')
+  var path = require('path')
+  t.test('.', function (t) {
+    glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) {
+      t.ifError(er)
+      t.like(matches, [])
+      t.end()
+    })
+  })
+
+  t.test('a', function (t) {
+    glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) {
+      t.ifError(er)
+      t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
+      t.end()
+    })
+  })
+
+  t.test('root=a, cwd=a/b', function (t) {
+    glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) {
+      t.ifError(er)
+      t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ])
+      t.end()
+    })
+  })
+
+  t.test('cd -', function (t) {
+    process.chdir(origCwd)
+    t.end()
+  })
+
+  t.end()
+})

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/root.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/root.js b/blackberry10/node_modules/plugman/node_modules/glob/test/root.js
new file mode 100644
index 0000000..95c23f9
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/root.js
@@ -0,0 +1,46 @@
+var t = require("tap")
+
+var origCwd = process.cwd()
+process.chdir(__dirname)
+
+var glob = require('../')
+var path = require('path')
+
+t.test('.', function (t) {
+  glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) {
+    t.ifError(er)
+    t.like(matches, [])
+    t.end()
+  })
+})
+
+
+t.test('a', function (t) {
+  console.error("root=" + path.resolve('a'))
+  glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) {
+    t.ifError(er)
+    var wanted = [
+        '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f'
+      ].map(function (m) {
+        return path.join(path.resolve('a'), m).replace(/\\/g, '/')
+      })
+
+    t.like(matches, wanted)
+    t.end()
+  })
+})
+
+t.test('root=a, cwd=a/b', function (t) {
+  glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) {
+    t.ifError(er)
+    t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) {
+      return path.join(path.resolve('a'), m).replace(/\\/g, '/')
+    }))
+    t.end()
+  })
+})
+
+t.test('cd -', function (t) {
+  process.chdir(origCwd)
+  t.end()
+})

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/stat.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/stat.js b/blackberry10/node_modules/plugman/node_modules/glob/test/stat.js
new file mode 100644
index 0000000..6291711
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/stat.js
@@ -0,0 +1,32 @@
+var glob = require('../')
+var test = require('tap').test
+var path = require('path')
+
+test('stat all the things', function(t) {
+  var g = new glob.Glob('a/*abc*/**', { stat: true, cwd: __dirname })
+  var matches = []
+  g.on('match', function(m) {
+    matches.push(m)
+  })
+  var stats = []
+  g.on('stat', function(m) {
+    stats.push(m)
+  })
+  g.on('end', function(eof) {
+    stats = stats.sort()
+    matches = matches.sort()
+    eof = eof.sort()
+    t.same(stats, matches)
+    t.same(eof, matches)
+    var cache = Object.keys(this.statCache)
+    t.same(cache.map(function (f) {
+      return path.relative(__dirname, f)
+    }).sort(), matches)
+
+    cache.forEach(function(c) {
+      t.equal(typeof this.statCache[c], 'object')
+    }, this)
+
+    t.end()
+  })
+})

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/glob/test/zz-cleanup.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/glob/test/zz-cleanup.js b/blackberry10/node_modules/plugman/node_modules/glob/test/zz-cleanup.js
new file mode 100644
index 0000000..e085f0f
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/glob/test/zz-cleanup.js
@@ -0,0 +1,11 @@
+// remove the fixtures
+var tap = require("tap")
+, rimraf = require("rimraf")
+, path = require("path")
+
+tap.test("cleanup fixtures", function (t) {
+  rimraf(path.resolve(__dirname, "a"), function (er) {
+    t.ifError(er, "removed")
+    t.end()
+  })
+})

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/ncallbacks/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/ncallbacks/README.md b/blackberry10/node_modules/plugman/node_modules/ncallbacks/README.md
new file mode 100644
index 0000000..f8284f6
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/ncallbacks/README.md
@@ -0,0 +1,17 @@
+# nCallbacks
+
+> function that executes n times
+
+This is a stupid flow control library. Here's how you can use it.
+
+    var end = nCallbacks(3, function (err, whatever) {
+        console.log('done now');
+    });
+
+    firstAsynchronousThing(end);
+    secondAsynchronousThing(end);
+    thirdAsynchronousThing(end);
+
+## LICENSE
+
+I don't care

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/ncallbacks/ncallbacks.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/ncallbacks/ncallbacks.js b/blackberry10/node_modules/plugman/node_modules/ncallbacks/ncallbacks.js
new file mode 100644
index 0000000..cd13ef4
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/ncallbacks/ncallbacks.js
@@ -0,0 +1,16 @@
+/*
+ *  stupid-simple "flow control"
+ */
+
+module.exports = function nCallbacks(count, callback) {
+    var n = count;
+    return function (err) {
+        if (err) callback(err)
+
+        if (n < 0) callback('called too many times')
+
+        --n
+
+        if (n == 0) callback(null)
+    }
+}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/ncallbacks/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/ncallbacks/package.json b/blackberry10/node_modules/plugman/node_modules/ncallbacks/package.json
new file mode 100644
index 0000000..2afdfd6
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/ncallbacks/package.json
@@ -0,0 +1,23 @@
+{
+  "author": {
+    "name": "Andrew Lunny",
+    "email": "alunny@gmail.com"
+  },
+  "name": "ncallbacks",
+  "description": "function that expires after n calls",
+  "version": "1.1.0",
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/alunny/ncallbacks.git"
+  },
+  "main": "ncallbacks.js",
+  "dependencies": {},
+  "devDependencies": {},
+  "readme": "# nCallbacks\n\n> function that executes n times\n\nThis is a stupid flow control library. Here's how you can use it.\n\n    var end = nCallbacks(3, function (err, whatever) {\n        console.log('done now');\n    });\n\n    firstAsynchronousThing(end);\n    secondAsynchronousThing(end);\n    thirdAsynchronousThing(end);\n\n## LICENSE\n\nI don't care\n",
+  "readmeFilename": "README.md",
+  "bugs": {
+    "url": "https://github.com/alunny/ncallbacks/issues"
+  },
+  "_id": "ncallbacks@1.1.0",
+  "_from": "ncallbacks@1.1.0"
+}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/.npmignore b/blackberry10/node_modules/plugman/node_modules/nopt/.npmignore
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/LICENSE b/blackberry10/node_modules/plugman/node_modules/nopt/LICENSE
new file mode 100644
index 0000000..05a4010
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/README.md b/blackberry10/node_modules/plugman/node_modules/nopt/README.md
new file mode 100644
index 0000000..eeddfd4
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/README.md
@@ -0,0 +1,208 @@
+If you want to write an option parser, and have it be good, there are
+two ways to do it.  The Right Way, and the Wrong Way.
+
+The Wrong Way is to sit down and write an option parser.  We've all done
+that.
+
+The Right Way is to write some complex configurable program with so many
+options that you go half-insane just trying to manage them all, and put
+it off with duct-tape solutions until you see exactly to the core of the
+problem, and finally snap and write an awesome option parser.
+
+If you want to write an option parser, don't write an option parser.
+Write a package manager, or a source control system, or a service
+restarter, or an operating system.  You probably won't end up with a
+good one of those, but if you don't give up, and you are relentless and
+diligent enough in your procrastination, you may just end up with a very
+nice option parser.
+
+## USAGE
+
+    // my-program.js
+    var nopt = require("nopt")
+      , Stream = require("stream").Stream
+      , path = require("path")
+      , knownOpts = { "foo" : [String, null]
+                    , "bar" : [Stream, Number]
+                    , "baz" : path
+                    , "bloo" : [ "big", "medium", "small" ]
+                    , "flag" : Boolean
+                    , "pick" : Boolean
+                    , "many" : [String, Array]
+                    }
+      , shortHands = { "foofoo" : ["--foo", "Mr. Foo"]
+                     , "b7" : ["--bar", "7"]
+                     , "m" : ["--bloo", "medium"]
+                     , "p" : ["--pick"]
+                     , "f" : ["--flag"]
+                     }
+                 // everything is optional.
+                 // knownOpts and shorthands default to {}
+                 // arg list defaults to process.argv
+                 // slice defaults to 2
+      , parsed = nopt(knownOpts, shortHands, process.argv, 2)
+    console.log(parsed)
+
+This would give you support for any of the following:
+
+```bash
+$ node my-program.js --foo "blerp" --no-flag
+{ "foo" : "blerp", "flag" : false }
+
+$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag
+{ bar: 7, foo: "Mr. Hand", flag: true }
+
+$ node my-program.js --foo "blerp" -f -----p
+{ foo: "blerp", flag: true, pick: true }
+
+$ node my-program.js -fp --foofoo
+{ foo: "Mr. Foo", flag: true, pick: true }
+
+$ node my-program.js --foofoo -- -fp  # -- stops the flag parsing.
+{ foo: "Mr. Foo", argv: { remain: ["-fp"] } }
+
+$ node my-program.js --blatzk 1000 -fp # unknown opts are ok.
+{ blatzk: 1000, flag: true, pick: true }
+
+$ node my-program.js --blatzk true -fp # but they need a value
+{ blatzk: true, flag: true, pick: true }
+
+$ node my-program.js --no-blatzk -fp # unless they start with "no-"
+{ blatzk: false, flag: true, pick: true }
+
+$ node my-program.js --baz b/a/z # known paths are resolved.
+{ baz: "/Users/isaacs/b/a/z" }
+
+# if Array is one of the types, then it can take many
+# values, and will always be an array.  The other types provided
+# specify what types are allowed in the list.
+
+$ node my-program.js --many 1 --many null --many foo
+{ many: ["1", "null", "foo"] }
+
+$ node my-program.js --many foo
+{ many: ["foo"] }
+```
+
+Read the tests at the bottom of `lib/nopt.js` for more examples of
+what this puppy can do.
+
+## Types
+
+The following types are supported, and defined on `nopt.typeDefs`
+
+* String: A normal string.  No parsing is done.
+* path: A file system path.  Gets resolved against cwd if not absolute.
+* url: A url.  If it doesn't parse, it isn't accepted.
+* Number: Must be numeric.
+* Date: Must parse as a date. If it does, and `Date` is one of the options,
+  then it will return a Date object, not a string.
+* Boolean: Must be either `true` or `false`.  If an option is a boolean,
+  then it does not need a value, and its presence will imply `true` as
+  the value.  To negate boolean flags, do `--no-whatever` or `--whatever
+  false`
+* NaN: Means that the option is strictly not allowed.  Any value will
+  fail.
+* Stream: An object matching the "Stream" class in node.  Valuable
+  for use when validating programmatically.  (npm uses this to let you
+  supply any WriteStream on the `outfd` and `logfd` config options.)
+* Array: If `Array` is specified as one of the types, then the value
+  will be parsed as a list of options.  This means that multiple values
+  can be specified, and that the value will always be an array.
+
+If a type is an array of values not on this list, then those are
+considered valid values.  For instance, in the example above, the
+`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`,
+and any other value will be rejected.
+
+When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be
+interpreted as their JavaScript equivalents, and numeric values will be
+interpreted as a number.
+
+You can also mix types and values, or multiple types, in a list.  For
+instance `{ blah: [Number, null] }` would allow a value to be set to
+either a Number or null.
+
+To define a new type, add it to `nopt.typeDefs`.  Each item in that
+hash is an object with a `type` member and a `validate` method.  The
+`type` member is an object that matches what goes in the type list.  The
+`validate` method is a function that gets called with `validate(data,
+key, val)`.  Validate methods should assign `data[key]` to the valid
+value of `val` if it can be handled properly, or return boolean
+`false` if it cannot.
+
+You can also call `nopt.clean(data, types, typeDefs)` to clean up a
+config object and remove its invalid properties.
+
+## Error Handling
+
+By default, nopt outputs a warning to standard error when invalid
+options are found.  You can change this behavior by assigning a method
+to `nopt.invalidHandler`.  This method will be called with
+the offending `nopt.invalidHandler(key, val, types)`.
+
+If no `nopt.invalidHandler` is assigned, then it will console.error
+its whining.  If it is assigned to boolean `false` then the warning is
+suppressed.
+
+## Abbreviations
+
+Yes, they are supported.  If you define options like this:
+
+```javascript
+{ "foolhardyelephants" : Boolean
+, "pileofmonkeys" : Boolean }
+```
+
+Then this will work:
+
+```bash
+node program.js --foolhar --pil
+node program.js --no-f --pileofmon
+# etc.
+```
+
+## Shorthands
+
+Shorthands are a hash of shorter option names to a snippet of args that
+they expand to.
+
+If multiple one-character shorthands are all combined, and the
+combination does not unambiguously match any other option or shorthand,
+then they will be broken up into their constituent parts.  For example:
+
+```json
+{ "s" : ["--loglevel", "silent"]
+, "g" : "--global"
+, "f" : "--force"
+, "p" : "--parseable"
+, "l" : "--long"
+}
+```
+
+```bash
+npm ls -sgflp
+# just like doing this:
+npm ls --loglevel silent --global --force --long --parseable
+```
+
+## The Rest of the args
+
+The config object returned by nopt is given a special member called
+`argv`, which is an object with the following fields:
+
+* `remain`: The remaining args after all the parsing has occurred.
+* `original`: The args as they originally appeared.
+* `cooked`: The args after flags and shorthands are expanded.
+
+## Slicing
+
+Node programs are called with more or less the exact argv as it appears
+in C land, after the v8 and node-specific options have been plucked off.
+As such, `argv[0]` is always `node` and `argv[1]` is always the
+JavaScript program being run.
+
+That's usually not very useful to you.  So they're sliced off by
+default.  If you want them, then you can pass in `0` as the last
+argument, or any other number that you'd like to slice off the start of
+the list.

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/bin/nopt.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/bin/nopt.js b/blackberry10/node_modules/plugman/node_modules/nopt/bin/nopt.js
new file mode 100755
index 0000000..df90c72
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/bin/nopt.js
@@ -0,0 +1,44 @@
+#!/usr/bin/env node
+var nopt = require("../lib/nopt")
+  , types = { num: Number
+            , bool: Boolean
+            , help: Boolean
+            , list: Array
+            , "num-list": [Number, Array]
+            , "str-list": [String, Array]
+            , "bool-list": [Boolean, Array]
+            , str: String }
+  , shorthands = { s: [ "--str", "astring" ]
+                 , b: [ "--bool" ]
+                 , nb: [ "--no-bool" ]
+                 , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ]
+                 , "?": ["--help"]
+                 , h: ["--help"]
+                 , H: ["--help"]
+                 , n: [ "--num", "125" ] }
+  , parsed = nopt( types
+                 , shorthands
+                 , process.argv
+                 , 2 )
+
+console.log("parsed", parsed)
+
+if (parsed.help) {
+  console.log("")
+  console.log("nopt cli tester")
+  console.log("")
+  console.log("types")
+  console.log(Object.keys(types).map(function M (t) {
+    var type = types[t]
+    if (Array.isArray(type)) {
+      return [t, type.map(function (type) { return type.name })]
+    }
+    return [t, type && type.name]
+  }).reduce(function (s, i) {
+    s[i[0]] = i[1]
+    return s
+  }, {}))
+  console.log("")
+  console.log("shorthands")
+  console.log(shorthands)
+}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/examples/my-program.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/examples/my-program.js b/blackberry10/node_modules/plugman/node_modules/nopt/examples/my-program.js
new file mode 100755
index 0000000..142447e
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/examples/my-program.js
@@ -0,0 +1,30 @@
+#!/usr/bin/env node
+
+//process.env.DEBUG_NOPT = 1
+
+// my-program.js
+var nopt = require("../lib/nopt")
+  , Stream = require("stream").Stream
+  , path = require("path")
+  , knownOpts = { "foo" : [String, null]
+                , "bar" : [Stream, Number]
+                , "baz" : path
+                , "bloo" : [ "big", "medium", "small" ]
+                , "flag" : Boolean
+                , "pick" : Boolean
+                }
+  , shortHands = { "foofoo" : ["--foo", "Mr. Foo"]
+                 , "b7" : ["--bar", "7"]
+                 , "m" : ["--bloo", "medium"]
+                 , "p" : ["--pick"]
+                 , "f" : ["--flag", "true"]
+                 , "g" : ["--flag"]
+                 , "s" : "--flag"
+                 }
+             // everything is optional.
+             // knownOpts and shorthands default to {}
+             // arg list defaults to process.argv
+             // slice defaults to 2
+  , parsed = nopt(knownOpts, shortHands, process.argv, 2)
+
+console.log("parsed =\n"+ require("util").inspect(parsed))

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/lib/nopt.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/lib/nopt.js b/blackberry10/node_modules/plugman/node_modules/nopt/lib/nopt.js
new file mode 100644
index 0000000..ff802da
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/lib/nopt.js
@@ -0,0 +1,552 @@
+// info about each config option.
+
+var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG
+  ? function () { console.error.apply(console, arguments) }
+  : function () {}
+
+var url = require("url")
+  , path = require("path")
+  , Stream = require("stream").Stream
+  , abbrev = require("abbrev")
+
+module.exports = exports = nopt
+exports.clean = clean
+
+exports.typeDefs =
+  { String  : { type: String,  validate: validateString  }
+  , Boolean : { type: Boolean, validate: validateBoolean }
+  , url     : { type: url,     validate: validateUrl     }
+  , Number  : { type: Number,  validate: validateNumber  }
+  , path    : { type: path,    validate: validatePath    }
+  , Stream  : { type: Stream,  validate: validateStream  }
+  , Date    : { type: Date,    validate: validateDate    }
+  }
+
+function nopt (types, shorthands, args, slice) {
+  args = args || process.argv
+  types = types || {}
+  shorthands = shorthands || {}
+  if (typeof slice !== "number") slice = 2
+
+  debug(types, shorthands, args, slice)
+
+  args = args.slice(slice)
+  var data = {}
+    , key
+    , remain = []
+    , cooked = args
+    , original = args.slice(0)
+
+  parse(args, data, remain, types, shorthands)
+  // now data is full
+  clean(data, types, exports.typeDefs)
+  data.argv = {remain:remain,cooked:cooked,original:original}
+  data.argv.toString = function () {
+    return this.original.map(JSON.stringify).join(" ")
+  }
+  return data
+}
+
+function clean (data, types, typeDefs) {
+  typeDefs = typeDefs || exports.typeDefs
+  var remove = {}
+    , typeDefault = [false, true, null, String, Number]
+
+  Object.keys(data).forEach(function (k) {
+    if (k === "argv") return
+    var val = data[k]
+      , isArray = Array.isArray(val)
+      , type = types[k]
+    if (!isArray) val = [val]
+    if (!type) type = typeDefault
+    if (type === Array) type = typeDefault.concat(Array)
+    if (!Array.isArray(type)) type = [type]
+
+    debug("val=%j", val)
+    debug("types=", type)
+    val = val.map(function (val) {
+      // if it's an unknown value, then parse false/true/null/numbers/dates
+      if (typeof val === "string") {
+        debug("string %j", val)
+        val = val.trim()
+        if ((val === "null" && ~type.indexOf(null))
+            || (val === "true" &&
+               (~type.indexOf(true) || ~type.indexOf(Boolean)))
+            || (val === "false" &&
+               (~type.indexOf(false) || ~type.indexOf(Boolean)))) {
+          val = JSON.parse(val)
+          debug("jsonable %j", val)
+        } else if (~type.indexOf(Number) && !isNaN(val)) {
+          debug("convert to number", val)
+          val = +val
+        } else if (~type.indexOf(Date) && !isNaN(Date.parse(val))) {
+          debug("convert to date", val)
+          val = new Date(val)
+        }
+      }
+
+      if (!types.hasOwnProperty(k)) {
+        return val
+      }
+
+      // allow `--no-blah` to set 'blah' to null if null is allowed
+      if (val === false && ~type.indexOf(null) &&
+          !(~type.indexOf(false) || ~type.indexOf(Boolean))) {
+        val = null
+      }
+
+      var d = {}
+      d[k] = val
+      debug("prevalidated val", d, val, types[k])
+      if (!validate(d, k, val, types[k], typeDefs)) {
+        if (exports.invalidHandler) {
+          exports.invalidHandler(k, val, types[k], data)
+        } else if (exports.invalidHandler !== false) {
+          debug("invalid: "+k+"="+val, types[k])
+        }
+        return remove
+      }
+      debug("validated val", d, val, types[k])
+      return d[k]
+    }).filter(function (val) { return val !== remove })
+
+    if (!val.length) delete data[k]
+    else if (isArray) {
+      debug(isArray, data[k], val)
+      data[k] = val
+    } else data[k] = val[0]
+
+    debug("k=%s val=%j", k, val, data[k])
+  })
+}
+
+function validateString (data, k, val) {
+  data[k] = String(val)
+}
+
+function validatePath (data, k, val) {
+  data[k] = path.resolve(String(val))
+  return true
+}
+
+function validateNumber (data, k, val) {
+  debug("validate Number %j %j %j", k, val, isNaN(val))
+  if (isNaN(val)) return false
+  data[k] = +val
+}
+
+function validateDate (data, k, val) {
+  debug("validate Date %j %j %j", k, val, Date.parse(val))
+  var s = Date.parse(val)
+  if (isNaN(s)) return false
+  data[k] = new Date(val)
+}
+
+function validateBoolean (data, k, val) {
+  if (val instanceof Boolean) val = val.valueOf()
+  else if (typeof val === "string") {
+    if (!isNaN(val)) val = !!(+val)
+    else if (val === "null" || val === "false") val = false
+    else val = true
+  } else val = !!val
+  data[k] = val
+}
+
+function validateUrl (data, k, val) {
+  val = url.parse(String(val))
+  if (!val.host) return false
+  data[k] = val.href
+}
+
+function validateStream (data, k, val) {
+  if (!(val instanceof Stream)) return false
+  data[k] = val
+}
+
+function validate (data, k, val, type, typeDefs) {
+  // arrays are lists of types.
+  if (Array.isArray(type)) {
+    for (var i = 0, l = type.length; i < l; i ++) {
+      if (type[i] === Array) continue
+      if (validate(data, k, val, type[i], typeDefs)) return true
+    }
+    delete data[k]
+    return false
+  }
+
+  // an array of anything?
+  if (type === Array) return true
+
+  // NaN is poisonous.  Means that something is not allowed.
+  if (type !== type) {
+    debug("Poison NaN", k, val, type)
+    delete data[k]
+    return false
+  }
+
+  // explicit list of values
+  if (val === type) {
+    debug("Explicitly allowed %j", val)
+    // if (isArray) (data[k] = data[k] || []).push(val)
+    // else data[k] = val
+    data[k] = val
+    return true
+  }
+
+  // now go through the list of typeDefs, validate against each one.
+  var ok = false
+    , types = Object.keys(typeDefs)
+  for (var i = 0, l = types.length; i < l; i ++) {
+    debug("test type %j %j %j", k, val, types[i])
+    var t = typeDefs[types[i]]
+    if (t && type === t.type) {
+      var d = {}
+      ok = false !== t.validate(d, k, val)
+      val = d[k]
+      if (ok) {
+        // if (isArray) (data[k] = data[k] || []).push(val)
+        // else data[k] = val
+        data[k] = val
+        break
+      }
+    }
+  }
+  debug("OK? %j (%j %j %j)", ok, k, val, types[i])
+
+  if (!ok) delete data[k]
+  return ok
+}
+
+function parse (args, data, remain, types, shorthands) {
+  debug("parse", args, data, remain)
+
+  var key = null
+    , abbrevs = abbrev(Object.keys(types))
+    , shortAbbr = abbrev(Object.keys(shorthands))
+
+  for (var i = 0; i < args.length; i ++) {
+    var arg = args[i]
+    debug("arg", arg)
+
+    if (arg.match(/^-{2,}$/)) {
+      // done with keys.
+      // the rest are args.
+      remain.push.apply(remain, args.slice(i + 1))
+      args[i] = "--"
+      break
+    }
+    if (arg.charAt(0) === "-") {
+      if (arg.indexOf("=") !== -1) {
+        var v = arg.split("=")
+        arg = v.shift()
+        v = v.join("=")
+        args.splice.apply(args, [i, 1].concat([arg, v]))
+      }
+      // see if it's a shorthand
+      // if so, splice and back up to re-parse it.
+      var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs)
+      debug("arg=%j shRes=%j", arg, shRes)
+      if (shRes) {
+        debug(arg, shRes)
+        args.splice.apply(args, [i, 1].concat(shRes))
+        if (arg !== shRes[0]) {
+          i --
+          continue
+        }
+      }
+      arg = arg.replace(/^-+/, "")
+      var no = false
+      while (arg.toLowerCase().indexOf("no-") === 0) {
+        no = !no
+        arg = arg.substr(3)
+      }
+
+      if (abbrevs[arg]) arg = abbrevs[arg]
+
+      var isArray = types[arg] === Array ||
+        Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1
+
+      var val
+        , la = args[i + 1]
+
+      var isBool = no ||
+        types[arg] === Boolean ||
+        Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 ||
+        (la === "false" &&
+         (types[arg] === null ||
+          Array.isArray(types[arg]) && ~types[arg].indexOf(null)))
+
+      if (isBool) {
+        // just set and move along
+        val = !no
+        // however, also support --bool true or --bool false
+        if (la === "true" || la === "false") {
+          val = JSON.parse(la)
+          la = null
+          if (no) val = !val
+          i ++
+        }
+
+        // also support "foo":[Boolean, "bar"] and "--foo bar"
+        if (Array.isArray(types[arg]) && la) {
+          if (~types[arg].indexOf(la)) {
+            // an explicit type
+            val = la
+            i ++
+          } else if ( la === "null" && ~types[arg].indexOf(null) ) {
+            // null allowed
+            val = null
+            i ++
+          } else if ( !la.match(/^-{2,}[^-]/) &&
+                      !isNaN(la) &&
+                      ~types[arg].indexOf(Number) ) {
+            // number
+            val = +la
+            i ++
+          } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) {
+            // string
+            val = la
+            i ++
+          }
+        }
+
+        if (isArray) (data[arg] = data[arg] || []).push(val)
+        else data[arg] = val
+
+        continue
+      }
+
+      if (la && la.match(/^-{2,}$/)) {
+        la = undefined
+        i --
+      }
+
+      val = la === undefined ? true : la
+      if (isArray) (data[arg] = data[arg] || []).push(val)
+      else data[arg] = val
+
+      i ++
+      continue
+    }
+    remain.push(arg)
+  }
+}
+
+function resolveShort (arg, shorthands, shortAbbr, abbrevs) {
+  // handle single-char shorthands glommed together, like
+  // npm ls -glp, but only if there is one dash, and only if
+  // all of the chars are single-char shorthands, and it's
+  // not a match to some other abbrev.
+  arg = arg.replace(/^-+/, '')
+  if (abbrevs[arg] && !shorthands[arg]) {
+    return null
+  }
+  if (shortAbbr[arg]) {
+    arg = shortAbbr[arg]
+  } else {
+    var singles = shorthands.___singles
+    if (!singles) {
+      singles = Object.keys(shorthands).filter(function (s) {
+        return s.length === 1
+      }).reduce(function (l,r) { l[r] = true ; return l }, {})
+      shorthands.___singles = singles
+    }
+    var chrs = arg.split("").filter(function (c) {
+      return singles[c]
+    })
+    if (chrs.join("") === arg) return chrs.map(function (c) {
+      return shorthands[c]
+    }).reduce(function (l, r) {
+      return l.concat(r)
+    }, [])
+  }
+
+  if (shorthands[arg] && !Array.isArray(shorthands[arg])) {
+    shorthands[arg] = shorthands[arg].split(/\s+/)
+  }
+  return shorthands[arg]
+}
+
+if (module === require.main) {
+var assert = require("assert")
+  , util = require("util")
+
+  , shorthands =
+    { s : ["--loglevel", "silent"]
+    , d : ["--loglevel", "info"]
+    , dd : ["--loglevel", "verbose"]
+    , ddd : ["--loglevel", "silly"]
+    , noreg : ["--no-registry"]
+    , reg : ["--registry"]
+    , "no-reg" : ["--no-registry"]
+    , silent : ["--loglevel", "silent"]
+    , verbose : ["--loglevel", "verbose"]
+    , h : ["--usage"]
+    , H : ["--usage"]
+    , "?" : ["--usage"]
+    , help : ["--usage"]
+    , v : ["--version"]
+    , f : ["--force"]
+    , desc : ["--description"]
+    , "no-desc" : ["--no-description"]
+    , "local" : ["--no-global"]
+    , l : ["--long"]
+    , p : ["--parseable"]
+    , porcelain : ["--parseable"]
+    , g : ["--global"]
+    }
+
+  , types =
+    { aoa: Array
+    , nullstream: [null, Stream]
+    , date: Date
+    , str: String
+    , browser : String
+    , cache : path
+    , color : ["always", Boolean]
+    , depth : Number
+    , description : Boolean
+    , dev : Boolean
+    , editor : path
+    , force : Boolean
+    , global : Boolean
+    , globalconfig : path
+    , group : [String, Number]
+    , gzipbin : String
+    , logfd : [Number, Stream]
+    , loglevel : ["silent","win","error","warn","info","verbose","silly"]
+    , long : Boolean
+    , "node-version" : [false, String]
+    , npaturl : url
+    , npat : Boolean
+    , "onload-script" : [false, String]
+    , outfd : [Number, Stream]
+    , parseable : Boolean
+    , pre: Boolean
+    , prefix: path
+    , proxy : url
+    , "rebuild-bundle" : Boolean
+    , registry : url
+    , searchopts : String
+    , searchexclude: [null, String]
+    , shell : path
+    , t: [Array, String]
+    , tag : String
+    , tar : String
+    , tmp : path
+    , "unsafe-perm" : Boolean
+    , usage : Boolean
+    , user : String
+    , username : String
+    , userconfig : path
+    , version : Boolean
+    , viewer: path
+    , _exit : Boolean
+    }
+
+; [["-v", {version:true}, []]
+  ,["---v", {version:true}, []]
+  ,["ls -s --no-reg connect -d",
+    {loglevel:"info",registry:null},["ls","connect"]]
+  ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]]
+  ,["ls --registry blargle", {}, ["ls"]]
+  ,["--no-registry", {registry:null}, []]
+  ,["--no-color true", {color:false}, []]
+  ,["--no-color false", {color:true}, []]
+  ,["--no-color", {color:false}, []]
+  ,["--color false", {color:false}, []]
+  ,["--color --logfd 7", {logfd:7,color:true}, []]
+  ,["--color=true", {color:true}, []]
+  ,["--logfd=10", {logfd:10}, []]
+  ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]]
+  ,["--tmp=tmp -tar=gtar",
+    {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]]
+  ,["--logfd x", {}, []]
+  ,["a -true -- -no-false", {true:true},["a","-no-false"]]
+  ,["a -no-false", {false:false},["a"]]
+  ,["a -no-no-true", {true:true}, ["a"]]
+  ,["a -no-no-no-false", {false:false}, ["a"]]
+  ,["---NO-no-No-no-no-no-nO-no-no"+
+    "-No-no-no-no-no-no-no-no-no"+
+    "-no-no-no-no-NO-NO-no-no-no-no-no-no"+
+    "-no-body-can-do-the-boogaloo-like-I-do"
+   ,{"body-can-do-the-boogaloo-like-I-do":false}, []]
+  ,["we are -no-strangers-to-love "+
+    "--you-know the-rules --and so-do-i "+
+    "---im-thinking-of=a-full-commitment "+
+    "--no-you-would-get-this-from-any-other-guy "+
+    "--no-gonna-give-you-up "+
+    "-no-gonna-let-you-down=true "+
+    "--no-no-gonna-run-around false "+
+    "--desert-you=false "+
+    "--make-you-cry false "+
+    "--no-tell-a-lie "+
+    "--no-no-and-hurt-you false"
+   ,{"strangers-to-love":false
+    ,"you-know":"the-rules"
+    ,"and":"so-do-i"
+    ,"you-would-get-this-from-any-other-guy":false
+    ,"gonna-give-you-up":false
+    ,"gonna-let-you-down":false
+    ,"gonna-run-around":false
+    ,"desert-you":false
+    ,"make-you-cry":false
+    ,"tell-a-lie":false
+    ,"and-hurt-you":false
+    },["we", "are"]]
+  ,["-t one -t two -t three"
+   ,{t: ["one", "two", "three"]}
+   ,[]]
+  ,["-t one -t null -t three four five null"
+   ,{t: ["one", "null", "three"]}
+   ,["four", "five", "null"]]
+  ,["-t foo"
+   ,{t:["foo"]}
+   ,[]]
+  ,["--no-t"
+   ,{t:["false"]}
+   ,[]]
+  ,["-no-no-t"
+   ,{t:["true"]}
+   ,[]]
+  ,["-aoa one -aoa null -aoa 100"
+   ,{aoa:["one", null, 100]}
+   ,[]]
+  ,["-str 100"
+   ,{str:"100"}
+   ,[]]
+  ,["--color always"
+   ,{color:"always"}
+   ,[]]
+  ,["--no-nullstream"
+   ,{nullstream:null}
+   ,[]]
+  ,["--nullstream false"
+   ,{nullstream:null}
+   ,[]]
+  ,["--notadate 2011-01-25"
+   ,{notadate: "2011-01-25"}
+   ,[]]
+  ,["--date 2011-01-25"
+   ,{date: new Date("2011-01-25")}
+   ,[]]
+  ].forEach(function (test) {
+    var argv = test[0].split(/\s+/)
+      , opts = test[1]
+      , rem = test[2]
+      , actual = nopt(types, shorthands, argv, 0)
+      , parsed = actual.argv
+    delete actual.argv
+    console.log(util.inspect(actual, false, 2, true), parsed.remain)
+    for (var i in opts) {
+      var e = JSON.stringify(opts[i])
+        , a = JSON.stringify(actual[i] === undefined ? null : actual[i])
+      if (e && typeof e === "object") {
+        assert.deepEqual(e, a)
+      } else {
+        assert.equal(e, a)
+      }
+    }
+    assert.deepEqual(rem, parsed.remain)
+  })
+}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/LICENSE b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/LICENSE
new file mode 100644
index 0000000..05a4010
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/LICENSE
@@ -0,0 +1,23 @@
+Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/README.md b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/README.md
new file mode 100644
index 0000000..99746fe
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/README.md
@@ -0,0 +1,23 @@
+# abbrev-js
+
+Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev).
+
+Usage:
+
+    var abbrev = require("abbrev");
+    abbrev("foo", "fool", "folding", "flop");
+    
+    // returns:
+    { fl: 'flop'
+    , flo: 'flop'
+    , flop: 'flop'
+    , fol: 'folding'
+    , fold: 'folding'
+    , foldi: 'folding'
+    , foldin: 'folding'
+    , folding: 'folding'
+    , foo: 'foo'
+    , fool: 'fool'
+    }
+
+This is handy for command-line scripts, or other cases where you want to be able to accept shorthands.

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/lib/abbrev.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/lib/abbrev.js b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/lib/abbrev.js
new file mode 100644
index 0000000..bee4132
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/lib/abbrev.js
@@ -0,0 +1,111 @@
+
+module.exports = exports = abbrev.abbrev = abbrev
+
+abbrev.monkeyPatch = monkeyPatch
+
+function monkeyPatch () {
+  Object.defineProperty(Array.prototype, 'abbrev', {
+    value: function () { return abbrev(this) },
+    enumerable: false, configurable: true, writable: true
+  })
+
+  Object.defineProperty(Object.prototype, 'abbrev', {
+    value: function () { return abbrev(Object.keys(this)) },
+    enumerable: false, configurable: true, writable: true
+  })
+}
+
+function abbrev (list) {
+  if (arguments.length !== 1 || !Array.isArray(list)) {
+    list = Array.prototype.slice.call(arguments, 0)
+  }
+  for (var i = 0, l = list.length, args = [] ; i < l ; i ++) {
+    args[i] = typeof list[i] === "string" ? list[i] : String(list[i])
+  }
+
+  // sort them lexicographically, so that they're next to their nearest kin
+  args = args.sort(lexSort)
+
+  // walk through each, seeing how much it has in common with the next and previous
+  var abbrevs = {}
+    , prev = ""
+  for (var i = 0, l = args.length ; i < l ; i ++) {
+    var current = args[i]
+      , next = args[i + 1] || ""
+      , nextMatches = true
+      , prevMatches = true
+    if (current === next) continue
+    for (var j = 0, cl = current.length ; j < cl ; j ++) {
+      var curChar = current.charAt(j)
+      nextMatches = nextMatches && curChar === next.charAt(j)
+      prevMatches = prevMatches && curChar === prev.charAt(j)
+      if (!nextMatches && !prevMatches) {
+        j ++
+        break
+      }
+    }
+    prev = current
+    if (j === cl) {
+      abbrevs[current] = current
+      continue
+    }
+    for (var a = current.substr(0, j) ; j <= cl ; j ++) {
+      abbrevs[a] = current
+      a += current.charAt(j)
+    }
+  }
+  return abbrevs
+}
+
+function lexSort (a, b) {
+  return a === b ? 0 : a > b ? 1 : -1
+}
+
+
+// tests
+if (module === require.main) {
+
+var assert = require("assert")
+var util = require("util")
+
+console.log("running tests")
+function test (list, expect) {
+  var actual = abbrev(list)
+  assert.deepEqual(actual, expect,
+    "abbrev("+util.inspect(list)+") === " + util.inspect(expect) + "\n"+
+    "actual: "+util.inspect(actual))
+  actual = abbrev.apply(exports, list)
+  assert.deepEqual(abbrev.apply(exports, list), expect,
+    "abbrev("+list.map(JSON.stringify).join(",")+") === " + util.inspect(expect) + "\n"+
+    "actual: "+util.inspect(actual))
+}
+
+test([ "ruby", "ruby", "rules", "rules", "rules" ],
+{ rub: 'ruby'
+, ruby: 'ruby'
+, rul: 'rules'
+, rule: 'rules'
+, rules: 'rules'
+})
+test(["fool", "foom", "pool", "pope"],
+{ fool: 'fool'
+, foom: 'foom'
+, poo: 'pool'
+, pool: 'pool'
+, pop: 'pope'
+, pope: 'pope'
+})
+test(["a", "ab", "abc", "abcd", "abcde", "acde"],
+{ a: 'a'
+, ab: 'ab'
+, abc: 'abc'
+, abcd: 'abcd'
+, abcde: 'abcde'
+, ac: 'acde'
+, acd: 'acde'
+, acde: 'acde'
+})
+
+console.log("pass")
+
+}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/package.json b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/package.json
new file mode 100644
index 0000000..55ed011
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/node_modules/abbrev/package.json
@@ -0,0 +1,28 @@
+{
+  "name": "abbrev",
+  "version": "1.0.4",
+  "description": "Like ruby's abbrev module, but in js",
+  "author": {
+    "name": "Isaac Z. Schlueter",
+    "email": "i@izs.me"
+  },
+  "main": "./lib/abbrev.js",
+  "scripts": {
+    "test": "node lib/abbrev.js"
+  },
+  "repository": {
+    "type": "git",
+    "url": "http://github.com/isaacs/abbrev-js"
+  },
+  "license": {
+    "type": "MIT",
+    "url": "https://github.com/isaacs/abbrev-js/raw/master/LICENSE"
+  },
+  "readme": "# abbrev-js\n\nJust like [ruby's Abbrev](http://apidock.com/ruby/Abbrev).\n\nUsage:\n\n    var abbrev = require(\"abbrev\");\n    abbrev(\"foo\", \"fool\", \"folding\", \"flop\");\n    \n    // returns:\n    { fl: 'flop'\n    , flo: 'flop'\n    , flop: 'flop'\n    , fol: 'folding'\n    , fold: 'folding'\n    , foldi: 'folding'\n    , foldin: 'folding'\n    , folding: 'folding'\n    , foo: 'foo'\n    , fool: 'fool'\n    }\n\nThis is handy for command-line scripts, or other cases where you want to be able to accept shorthands.\n",
+  "readmeFilename": "README.md",
+  "bugs": {
+    "url": "https://github.com/isaacs/abbrev-js/issues"
+  },
+  "_id": "abbrev@1.0.4",
+  "_from": "abbrev@1"
+}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/nopt/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/nopt/package.json b/blackberry10/node_modules/plugman/node_modules/nopt/package.json
new file mode 100644
index 0000000..078f928
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/nopt/package.json
@@ -0,0 +1,35 @@
+{
+  "name": "nopt",
+  "version": "1.0.10",
+  "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.",
+  "author": {
+    "name": "Isaac Z. Schlueter",
+    "email": "i@izs.me",
+    "url": "http://blog.izs.me/"
+  },
+  "main": "lib/nopt.js",
+  "scripts": {
+    "test": "node lib/nopt.js"
+  },
+  "repository": {
+    "type": "git",
+    "url": "http://github.com/isaacs/nopt"
+  },
+  "bin": {
+    "nopt": "./bin/nopt.js"
+  },
+  "license": {
+    "type": "MIT",
+    "url": "https://github.com/isaacs/nopt/raw/master/LICENSE"
+  },
+  "dependencies": {
+    "abbrev": "1"
+  },
+  "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\").Strea
 m\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 su
 pport 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 1000 -fp # unknown opts are ok.\n{ blatzk: 1000, flag: true, pick: true }\n\n$ node my-program.js --blatzk true -fp # but they need a value\n{ blatzk: true, 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 `--n
 o-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, and numeric values will be\ninterpreted as a number.\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.\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.i
 nvalidHandler` 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 --for
 ce --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",
+  "bugs": {
+    "url": "https://github.com/isaacs/nopt/issues"
+  },
+  "_id": "nopt@1.0.10",
+  "_from": "nopt@1.0.x"
+}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/osenv/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/osenv/LICENSE b/blackberry10/node_modules/plugman/node_modules/osenv/LICENSE
new file mode 100644
index 0000000..74489e2
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/osenv/LICENSE
@@ -0,0 +1,25 @@
+Copyright (c) Isaac Z. Schlueter
+All rights reserved.
+
+The BSD License
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/osenv/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/osenv/README.md b/blackberry10/node_modules/plugman/node_modules/osenv/README.md
new file mode 100644
index 0000000..08fd900
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/osenv/README.md
@@ -0,0 +1,63 @@
+# osenv
+
+Look up environment settings specific to different operating systems.
+
+## Usage
+
+```javascript
+var osenv = require('osenv')
+var path = osenv.path()
+var user = osenv.user()
+// etc.
+
+// Some things are not reliably in the env, and have a fallback command:
+var h = osenv.hostname(function (er, hostname) {
+  h = hostname
+})
+// This will still cause it to be memoized, so calling osenv.hostname()
+// is now an immediate operation.
+
+// You can always send a cb, which will get called in the nextTick
+// if it's been memoized, or wait for the fallback data if it wasn't
+// found in the environment.
+osenv.hostname(function (er, hostname) {
+  if (er) console.error('error looking up hostname')
+  else console.log('this machine calls itself %s', hostname)
+})
+```
+
+## osenv.hostname()
+
+The machine name.  Calls `hostname` if not found.
+
+## osenv.user()
+
+The currently logged-in user.  Calls `whoami` if not found.
+
+## osenv.prompt()
+
+Either PS1 on unix, or PROMPT on Windows.
+
+## osenv.tmpdir()
+
+The place where temporary files should be created.
+
+## osenv.home()
+
+No place like it.
+
+## osenv.path()
+
+An array of the places that the operating system will search for
+executables.
+
+## osenv.editor() 
+
+Return the executable name of the editor program.  This uses the EDITOR
+and VISUAL environment variables, and falls back to `vi` on Unix, or
+`notepad.exe` on Windows.
+
+## osenv.shell()
+
+The SHELL on Unix, which Windows calls the ComSpec.  Defaults to 'bash'
+or 'cmd'.

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/osenv/osenv.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/osenv/osenv.js b/blackberry10/node_modules/plugman/node_modules/osenv/osenv.js
new file mode 100644
index 0000000..e3367a7
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/osenv/osenv.js
@@ -0,0 +1,80 @@
+var isWindows = process.platform === 'win32'
+var windir = isWindows ? process.env.windir || 'C:\\Windows' : null
+var path = require('path')
+var exec = require('child_process').exec
+
+// looking up envs is a bit costly.
+// Also, sometimes we want to have a fallback
+// Pass in a callback to wait for the fallback on failures
+// After the first lookup, always returns the same thing.
+function memo (key, lookup, fallback) {
+  var fell = false
+  var falling = false
+  exports[key] = function (cb) {
+    var val = lookup()
+    if (!val && !fell && !falling && fallback) {
+      fell = true
+      falling = true
+      exec(fallback, function (er, output, stderr) {
+        falling = false
+        if (er) return // oh well, we tried
+        val = output.trim()
+      })
+    }
+    exports[key] = function (cb) {
+      if (cb) process.nextTick(cb.bind(null, null, val))
+      return val
+    }
+    if (cb && !falling) process.nextTick(cb.bind(null, null, val))
+    return val
+  }
+}
+
+memo('user', function () {
+  return ( isWindows
+         ? process.env.USERDOMAIN + '\\' + process.env.USERNAME
+         : process.env.USER
+         )
+}, 'whoami')
+
+memo('prompt', function () {
+  return isWindows ? process.env.PROMPT : process.env.PS1
+})
+
+memo('hostname', function () {
+  return isWindows ? process.env.COMPUTERNAME : process.env.HOSTNAME
+}, 'hostname')
+
+memo('tmpdir', function () {
+  var t = isWindows ? 'temp' : 'tmp'
+  return process.env.TMPDIR ||
+         process.env.TMP ||
+         process.env.TEMP ||
+         ( exports.home() ? path.resolve(exports.home(), t)
+         : isWindows ? path.resolve(windir, t)
+         : '/tmp'
+         )
+})
+
+memo('home', function () {
+  return ( isWindows ? process.env.USERPROFILE
+         : process.env.HOME
+         )
+})
+
+memo('path', function () {
+  return (process.env.PATH ||
+          process.env.Path ||
+          process.env.path).split(isWindows ? ';' : ':')
+})
+
+memo('editor', function () {
+  return process.env.EDITOR ||
+         process.env.VISUAL ||
+         (isWindows ? 'notepad.exe' : 'vi')
+})
+
+memo('shell', function () {
+  return isWindows ? process.env.ComSpec || 'cmd'
+         : process.env.SHELL || 'bash'
+})

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/osenv/package.json
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/osenv/package.json b/blackberry10/node_modules/plugman/node_modules/osenv/package.json
new file mode 100644
index 0000000..cf442b1
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/osenv/package.json
@@ -0,0 +1,42 @@
+{
+  "name": "osenv",
+  "version": "0.0.3",
+  "main": "osenv.js",
+  "directories": {
+    "test": "test"
+  },
+  "dependencies": {},
+  "devDependencies": {
+    "tap": "~0.2.5"
+  },
+  "scripts": {
+    "test": "tap test/*.js"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/isaacs/osenv"
+  },
+  "keywords": [
+    "environment",
+    "variable",
+    "home",
+    "tmpdir",
+    "path",
+    "prompt",
+    "ps1"
+  ],
+  "author": {
+    "name": "Isaac Z. Schlueter",
+    "email": "i@izs.me",
+    "url": "http://blog.izs.me/"
+  },
+  "license": "BSD",
+  "description": "Look up environment settings specific to different operating systems",
+  "readme": "# osenv\n\nLook up environment settings specific to different operating systems.\n\n## Usage\n\n```javascript\nvar osenv = require('osenv')\nvar path = osenv.path()\nvar user = osenv.user()\n// etc.\n\n// Some things are not reliably in the env, and have a fallback command:\nvar h = osenv.hostname(function (er, hostname) {\n  h = hostname\n})\n// This will still cause it to be memoized, so calling osenv.hostname()\n// is now an immediate operation.\n\n// You can always send a cb, which will get called in the nextTick\n// if it's been memoized, or wait for the fallback data if it wasn't\n// found in the environment.\nosenv.hostname(function (er, hostname) {\n  if (er) console.error('error looking up hostname')\n  else console.log('this machine calls itself %s', hostname)\n})\n```\n\n## osenv.hostname()\n\nThe machine name.  Calls `hostname` if not found.\n\n## osenv.user()\n\nThe currently logged-in user.  Calls `whoami` if not found.\n\n## osenv.prompt()\n\nEither PS1 o
 n unix, or PROMPT on Windows.\n\n## osenv.tmpdir()\n\nThe place where temporary files should be created.\n\n## osenv.home()\n\nNo place like it.\n\n## osenv.path()\n\nAn array of the places that the operating system will search for\nexecutables.\n\n## osenv.editor() \n\nReturn the executable name of the editor program.  This uses the EDITOR\nand VISUAL environment variables, and falls back to `vi` on Unix, or\n`notepad.exe` on Windows.\n\n## osenv.shell()\n\nThe SHELL on Unix, which Windows calls the ComSpec.  Defaults to 'bash'\nor 'cmd'.\n",
+  "readmeFilename": "README.md",
+  "bugs": {
+    "url": "https://github.com/isaacs/osenv/issues"
+  },
+  "_id": "osenv@0.0.3",
+  "_from": "osenv@0.0.x"
+}

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/osenv/test/unix.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/osenv/test/unix.js b/blackberry10/node_modules/plugman/node_modules/osenv/test/unix.js
new file mode 100644
index 0000000..b72eb0b
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/osenv/test/unix.js
@@ -0,0 +1,76 @@
+// only run this test on windows
+// pretending to be another platform is too hacky, since it breaks
+// how the underlying system looks up module paths and runs
+// child processes, and all that stuff is cached.
+if (process.platform === 'win32') {
+  console.log('TAP Version 13\n' +
+              '1..0\n' +
+              '# Skip unix tests, this is not unix\n')
+  return
+}
+var tap = require('tap')
+
+// like unix, but funny
+process.env.USER = 'sirUser'
+process.env.HOME = '/home/sirUser'
+process.env.HOSTNAME = 'my-machine'
+process.env.TMPDIR = '/tmpdir'
+process.env.TMP = '/tmp'
+process.env.TEMP = '/temp'
+process.env.PATH = '/opt/local/bin:/usr/local/bin:/usr/bin/:bin'
+process.env.PS1 = '(o_o) $ '
+process.env.EDITOR = 'edit'
+process.env.VISUAL = 'visualedit'
+process.env.SHELL = 'zsh'
+
+
+tap.test('basic unix sanity test', function (t) {
+  var osenv = require('../osenv.js')
+
+  t.equal(osenv.user(), process.env.USER)
+  t.equal(osenv.home(), process.env.HOME)
+  t.equal(osenv.hostname(), process.env.HOSTNAME)
+  t.same(osenv.path(), process.env.PATH.split(':'))
+  t.equal(osenv.prompt(), process.env.PS1)
+  t.equal(osenv.tmpdir(), process.env.TMPDIR)
+
+  // mildly evil, but it's for a test.
+  process.env.TMPDIR = ''
+  delete require.cache[require.resolve('../osenv.js')]
+  var osenv = require('../osenv.js')
+  t.equal(osenv.tmpdir(), process.env.TMP)
+
+  process.env.TMP = ''
+  delete require.cache[require.resolve('../osenv.js')]
+  var osenv = require('../osenv.js')
+  t.equal(osenv.tmpdir(), process.env.TEMP)
+
+  process.env.TEMP = ''
+  delete require.cache[require.resolve('../osenv.js')]
+  var osenv = require('../osenv.js')
+  t.equal(osenv.tmpdir(), '/home/sirUser/tmp')
+
+  delete require.cache[require.resolve('../osenv.js')]
+  var osenv = require('../osenv.js')
+  osenv.home = function () { return null }
+  t.equal(osenv.tmpdir(), '/tmp')
+
+  t.equal(osenv.editor(), 'edit')
+  process.env.EDITOR = ''
+  delete require.cache[require.resolve('../osenv.js')]
+  var osenv = require('../osenv.js')
+  t.equal(osenv.editor(), 'visualedit')
+
+  process.env.VISUAL = ''
+  delete require.cache[require.resolve('../osenv.js')]
+  var osenv = require('../osenv.js')
+  t.equal(osenv.editor(), 'vi')
+
+  t.equal(osenv.shell(), 'zsh')
+  process.env.SHELL = ''
+  delete require.cache[require.resolve('../osenv.js')]
+  var osenv = require('../osenv.js')
+  t.equal(osenv.shell(), 'bash')
+
+  t.end()
+})

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/osenv/test/windows.js
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/osenv/test/windows.js b/blackberry10/node_modules/plugman/node_modules/osenv/test/windows.js
new file mode 100644
index 0000000..dd3fe80
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/osenv/test/windows.js
@@ -0,0 +1,82 @@
+// only run this test on windows
+// pretending to be another platform is too hacky, since it breaks
+// how the underlying system looks up module paths and runs
+// child processes, and all that stuff is cached.
+if (process.platform !== 'win32') {
+  console.log('TAP Version 13\n' +
+              '1..0\n' +
+              '# Skip windows tests, this is not windows\n')
+  return
+}
+
+// load this before clubbing the platform name.
+var tap = require('tap')
+
+process.env.windir = 'C:\\windows'
+process.env.USERDOMAIN = 'some-domain'
+process.env.USERNAME = 'sirUser'
+process.env.USERPROFILE = 'C:\\Users\\sirUser'
+process.env.COMPUTERNAME = 'my-machine'
+process.env.TMPDIR = 'C:\\tmpdir'
+process.env.TMP = 'C:\\tmp'
+process.env.TEMP = 'C:\\temp'
+process.env.Path = 'C:\\Program Files\\;C:\\Binary Stuff\\bin'
+process.env.PROMPT = '(o_o) $ '
+process.env.EDITOR = 'edit'
+process.env.VISUAL = 'visualedit'
+process.env.ComSpec = 'some-com'
+
+tap.test('basic windows sanity test', function (t) {
+  var osenv = require('../osenv.js')
+
+  var osenv = require('../osenv.js')
+
+  t.equal(osenv.user(),
+          process.env.USERDOMAIN + '\\' + process.env.USERNAME)
+  t.equal(osenv.home(), process.env.USERPROFILE)
+  t.equal(osenv.hostname(), process.env.COMPUTERNAME)
+  t.same(osenv.path(), process.env.Path.split(';'))
+  t.equal(osenv.prompt(), process.env.PROMPT)
+  t.equal(osenv.tmpdir(), process.env.TMPDIR)
+
+  // mildly evil, but it's for a test.
+  process.env.TMPDIR = ''
+  delete require.cache[require.resolve('../osenv.js')]
+  var osenv = require('../osenv.js')
+  t.equal(osenv.tmpdir(), process.env.TMP)
+
+  process.env.TMP = ''
+  delete require.cache[require.resolve('../osenv.js')]
+  var osenv = require('../osenv.js')
+  t.equal(osenv.tmpdir(), process.env.TEMP)
+
+  process.env.TEMP = ''
+  delete require.cache[require.resolve('../osenv.js')]
+  var osenv = require('../osenv.js')
+  t.equal(osenv.tmpdir(), 'C:\\Users\\sirUser\\temp')
+
+  process.env.TEMP = ''
+  delete require.cache[require.resolve('../osenv.js')]
+  var osenv = require('../osenv.js')
+  osenv.home = function () { return null }
+  t.equal(osenv.tmpdir(), 'C:\\windows\\temp')
+
+  t.equal(osenv.editor(), 'edit')
+  process.env.EDITOR = ''
+  delete require.cache[require.resolve('../osenv.js')]
+  var osenv = require('../osenv.js')
+  t.equal(osenv.editor(), 'visualedit')
+
+  process.env.VISUAL = ''
+  delete require.cache[require.resolve('../osenv.js')]
+  var osenv = require('../osenv.js')
+  t.equal(osenv.editor(), 'notepad.exe')
+
+  t.equal(osenv.shell(), 'some-com')
+  process.env.ComSpec = ''
+  delete require.cache[require.resolve('../osenv.js')]
+  var osenv = require('../osenv.js')
+  t.equal(osenv.shell(), 'cmd')
+
+  t.end()
+})

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/.npmignore
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/.npmignore b/blackberry10/node_modules/plugman/node_modules/plist/.npmignore
new file mode 100644
index 0000000..9daa824
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/.npmignore
@@ -0,0 +1,2 @@
+.DS_Store
+node_modules

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/LICENSE
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/LICENSE b/blackberry10/node_modules/plugman/node_modules/plist/LICENSE
new file mode 100644
index 0000000..eae87d0
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2010-2011- Nathan Rajlich
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.

http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/1139813c/blackberry10/node_modules/plugman/node_modules/plist/README.md
----------------------------------------------------------------------
diff --git a/blackberry10/node_modules/plugman/node_modules/plist/README.md b/blackberry10/node_modules/plugman/node_modules/plist/README.md
new file mode 100644
index 0000000..c329174
--- /dev/null
+++ b/blackberry10/node_modules/plugman/node_modules/plist/README.md
@@ -0,0 +1,62 @@
+# node-plist
+
+Provides facilities for reading and writing Mac OS X Plist (property list) files. These are often used in programming OS X and iOS applications, as well as the iTunes
+configuration XML file.
+
+Plist files represent stored programming "object"s. They are very similar
+to JSON. A valid Plist file is representable as a native JavaScript Object and vice-versa.
+
+## Tests
+`npm test`
+
+## Usage
+Parsing a plist from filename
+``` javascript
+var plist = require('plist');
+
+var obj = plist.parseFileSync('myPlist.plist');
+console.log(JSON.stringify(obj));
+```
+
+Parsing a plist from string payload
+``` javascript
+var plist = require('plist');
+
+var obj = plist.parseStringSync('<plist><string>Hello World!</string></plist>');
+console.log(obj);  // Hello World!
+```
+
+Given an existing JavaScript Object, you can turn it into an XML document that complies with the plist DTD
+
+``` javascript
+var plist = require('plist');
+
+console.log(plist.build({'foo' : 'bar'}).toString());
+```
+
+
+
+### Deprecated methods
+These functions work, but may be removed in a future release. version 0.4.x added Sync versions of these functions.
+
+Parsing a plist from filename
+``` javascript
+var plist = require('plist');
+
+plist.parseFile('myPlist.plist', function(err, obj) {
+  if (err) throw err;
+
+  console.log(JSON.stringify(obj));
+});
+```
+
+Parsing a plist from string payload
+``` javascript
+var plist = require('plist');
+
+plist.parseString('<plist><string>Hello World!</string></plist>', function(err, obj) {
+  if (err) throw err;
+
+  console.log(obj[0]);  // Hello World!
+});
+```