Merge lp:~robru/cordova-cli/3.4-release into lp:cordova-cli

Proposed by Robert Bruce Park
Status: Merged
Approved by: Robert Bruce Park
Approved revision: 49
Merged at revision: 45
Proposed branch: lp:~robru/cordova-cli/3.4-release
Merge into: lp:cordova-cli
Diff against target: 19544 lines (+10808/-6917)
214 files modified
debian/changelog (+1/-2)
debian/control (+1/-1)
debian/rules (+3/-1)
node_modules/cordova/RELEASENOTES.md (+9/-1)
node_modules/cordova/_vendor/combined-stream/0.0.4/package.json (+2/-1)
node_modules/cordova/_vendor/commander/1.1.1/.npmignore (+0/-4)
node_modules/cordova/_vendor/commander/1.1.1/.travis.yml (+0/-4)
node_modules/cordova/_vendor/commander/1.1.1/History.md (+0/-152)
node_modules/cordova/_vendor/commander/1.1.1/Makefile (+0/-7)
node_modules/cordova/_vendor/commander/1.1.1/Readme.md (+0/-270)
node_modules/cordova/_vendor/commander/1.1.1/index.js (+0/-1131)
node_modules/cordova/_vendor/commander/1.1.1/package.json (+0/-40)
node_modules/cordova/_vendor/forever-agent/0.5.0/LICENSE (+0/-55)
node_modules/cordova/_vendor/forever-agent/0.5.0/README.md (+0/-4)
node_modules/cordova/_vendor/forever-agent/0.5.0/index.js (+0/-119)
node_modules/cordova/_vendor/forever-agent/0.5.0/package.json (+0/-27)
node_modules/cordova/_vendor/forever-agent/0.5.2/LICENSE (+55/-0)
node_modules/cordova/_vendor/forever-agent/0.5.2/README.md (+4/-0)
node_modules/cordova/_vendor/forever-agent/0.5.2/index.js (+119/-0)
node_modules/cordova/_vendor/forever-agent/0.5.2/package.json (+27/-0)
node_modules/cordova/_vendor/graceful-fs/2.0.1/.npmignore (+0/-1)
node_modules/cordova/_vendor/graceful-fs/2.0.1/LICENSE (+0/-27)
node_modules/cordova/_vendor/graceful-fs/2.0.1/README.md (+0/-26)
node_modules/cordova/_vendor/graceful-fs/2.0.1/graceful-fs.js (+0/-159)
node_modules/cordova/_vendor/graceful-fs/2.0.1/package.json (+0/-48)
node_modules/cordova/_vendor/graceful-fs/2.0.1/polyfills.js (+0/-228)
node_modules/cordova/_vendor/graceful-fs/2.0.1/test/open.js (+0/-39)
node_modules/cordova/_vendor/graceful-fs/2.0.2/.npmignore (+1/-0)
node_modules/cordova/_vendor/graceful-fs/2.0.2/LICENSE (+27/-0)
node_modules/cordova/_vendor/graceful-fs/2.0.2/README.md (+26/-0)
node_modules/cordova/_vendor/graceful-fs/2.0.2/graceful-fs.js (+161/-0)
node_modules/cordova/_vendor/graceful-fs/2.0.2/package.json (+48/-0)
node_modules/cordova/_vendor/graceful-fs/2.0.2/polyfills.js (+228/-0)
node_modules/cordova/_vendor/graceful-fs/2.0.2/test/open.js (+39/-0)
node_modules/cordova/_vendor/graceful-fs/2.0.2/test/readdir-sort.js (+21/-0)
node_modules/cordova/_vendor/http-signature/0.10.0/.dir-locals.el (+6/-0)
node_modules/cordova/_vendor/http-signature/0.10.0/.npmignore (+7/-0)
node_modules/cordova/_vendor/http-signature/0.10.0/LICENSE (+18/-0)
node_modules/cordova/_vendor/http-signature/0.10.0/README.md (+75/-0)
node_modules/cordova/_vendor/http-signature/0.10.0/http_signing.md (+296/-0)
node_modules/cordova/_vendor/http-signature/0.10.0/lib/index.js (+25/-0)
node_modules/cordova/_vendor/http-signature/0.10.0/lib/parser.js (+304/-0)
node_modules/cordova/_vendor/http-signature/0.10.0/lib/signer.js (+179/-0)
node_modules/cordova/_vendor/http-signature/0.10.0/lib/util.js (+249/-0)
node_modules/cordova/_vendor/http-signature/0.10.0/lib/verify.js (+42/-0)
node_modules/cordova/_vendor/http-signature/0.10.0/package.json (+35/-0)
node_modules/cordova/_vendor/keypress/0.1.0/README.md (+0/-101)
node_modules/cordova/_vendor/keypress/0.1.0/index.js (+0/-346)
node_modules/cordova/_vendor/keypress/0.1.0/package.json (+0/-31)
node_modules/cordova/_vendor/keypress/0.1.0/test.js (+0/-28)
node_modules/cordova/_vendor/minimist/0.0.5/.travis.yml (+0/-4)
node_modules/cordova/_vendor/minimist/0.0.5/LICENSE (+0/-18)
node_modules/cordova/_vendor/minimist/0.0.5/example/parse.js (+0/-2)
node_modules/cordova/_vendor/minimist/0.0.5/index.js (+0/-193)
node_modules/cordova/_vendor/minimist/0.0.5/package.json (+0/-50)
node_modules/cordova/_vendor/minimist/0.0.5/readme.markdown (+0/-73)
node_modules/cordova/_vendor/minimist/0.0.5/test/dash.js (+0/-24)
node_modules/cordova/_vendor/minimist/0.0.5/test/default_bool.js (+0/-20)
node_modules/cordova/_vendor/minimist/0.0.5/test/dotted.js (+0/-16)
node_modules/cordova/_vendor/minimist/0.0.5/test/long.js (+0/-31)
node_modules/cordova/_vendor/minimist/0.0.5/test/parse.js (+0/-297)
node_modules/cordova/_vendor/minimist/0.0.5/test/parse_modified.js (+0/-9)
node_modules/cordova/_vendor/minimist/0.0.5/test/short.js (+0/-85)
node_modules/cordova/_vendor/minimist/0.0.5/test/whitespace.js (+0/-8)
node_modules/cordova/_vendor/minimist/0.0.8/.travis.yml (+4/-0)
node_modules/cordova/_vendor/minimist/0.0.8/LICENSE (+18/-0)
node_modules/cordova/_vendor/minimist/0.0.8/example/parse.js (+2/-0)
node_modules/cordova/_vendor/minimist/0.0.8/index.js (+187/-0)
node_modules/cordova/_vendor/minimist/0.0.8/package.json (+50/-0)
node_modules/cordova/_vendor/minimist/0.0.8/readme.markdown (+73/-0)
node_modules/cordova/_vendor/minimist/0.0.8/test/dash.js (+24/-0)
node_modules/cordova/_vendor/minimist/0.0.8/test/default_bool.js (+20/-0)
node_modules/cordova/_vendor/minimist/0.0.8/test/dotted.js (+16/-0)
node_modules/cordova/_vendor/minimist/0.0.8/test/long.js (+31/-0)
node_modules/cordova/_vendor/minimist/0.0.8/test/parse.js (+318/-0)
node_modules/cordova/_vendor/minimist/0.0.8/test/parse_modified.js (+9/-0)
node_modules/cordova/_vendor/minimist/0.0.8/test/short.js (+67/-0)
node_modules/cordova/_vendor/minimist/0.0.8/test/whitespace.js (+8/-0)
node_modules/cordova/_vendor/nopt/2.1.2/.npmignore (+0/-1)
node_modules/cordova/_vendor/nopt/2.1.2/LICENSE (+0/-23)
node_modules/cordova/_vendor/nopt/2.1.2/README.md (+0/-210)
node_modules/cordova/_vendor/nopt/2.1.2/bin/nopt.js (+0/-51)
node_modules/cordova/_vendor/nopt/2.1.2/examples/my-program.js (+0/-30)
node_modules/cordova/_vendor/nopt/2.1.2/lib/nopt.js (+0/-612)
node_modules/cordova/_vendor/nopt/2.1.2/package.json (+0/-35)
node_modules/cordova/_vendor/nopt/2.2.0/.npmignore (+1/-0)
node_modules/cordova/_vendor/nopt/2.2.0/LICENSE (+23/-0)
node_modules/cordova/_vendor/nopt/2.2.0/README.md (+210/-0)
node_modules/cordova/_vendor/nopt/2.2.0/bin/nopt.js (+51/-0)
node_modules/cordova/_vendor/nopt/2.2.0/examples/my-program.js (+30/-0)
node_modules/cordova/_vendor/nopt/2.2.0/lib/nopt.js (+407/-0)
node_modules/cordova/_vendor/nopt/2.2.0/package.json (+38/-0)
node_modules/cordova/_vendor/nopt/2.2.0/test/basic.js (+235/-0)
node_modules/cordova/_vendor/npmconf/0.1.12/.npmignore (+0/-1)
node_modules/cordova/_vendor/npmconf/0.1.12/LICENSE (+0/-27)
node_modules/cordova/_vendor/npmconf/0.1.12/README.md (+0/-33)
node_modules/cordova/_vendor/npmconf/0.1.12/config-defs.js (+0/-353)
node_modules/cordova/_vendor/npmconf/0.1.12/npmconf.js (+0/-338)
node_modules/cordova/_vendor/npmconf/0.1.12/package.json (+0/-49)
node_modules/cordova/_vendor/npmconf/0.1.12/test/00-setup.js (+0/-27)
node_modules/cordova/_vendor/npmconf/0.1.12/test/basic.js (+0/-74)
node_modules/cordova/_vendor/npmconf/0.1.12/test/builtin.js (+0/-74)
node_modules/cordova/_vendor/npmconf/0.1.12/test/fixtures/builtin (+0/-1)
node_modules/cordova/_vendor/npmconf/0.1.12/test/fixtures/globalconfig (+0/-1)
node_modules/cordova/_vendor/npmconf/0.1.12/test/fixtures/userconfig (+0/-22)
node_modules/cordova/_vendor/npmconf/0.1.12/test/save.js (+0/-74)
node_modules/cordova/_vendor/npmconf/0.1.13/.npmignore (+1/-0)
node_modules/cordova/_vendor/npmconf/0.1.13/LICENSE (+27/-0)
node_modules/cordova/_vendor/npmconf/0.1.13/README.md (+33/-0)
node_modules/cordova/_vendor/npmconf/0.1.13/config-defs.js (+356/-0)
node_modules/cordova/_vendor/npmconf/0.1.13/npmconf.js (+338/-0)
node_modules/cordova/_vendor/npmconf/0.1.13/package.json (+49/-0)
node_modules/cordova/_vendor/npmconf/0.1.13/test/00-setup.js (+27/-0)
node_modules/cordova/_vendor/npmconf/0.1.13/test/basic.js (+74/-0)
node_modules/cordova/_vendor/npmconf/0.1.13/test/builtin.js (+74/-0)
node_modules/cordova/_vendor/npmconf/0.1.13/test/fixtures/builtin (+1/-0)
node_modules/cordova/_vendor/npmconf/0.1.13/test/fixtures/globalconfig (+1/-0)
node_modules/cordova/_vendor/npmconf/0.1.13/test/fixtures/userconfig (+22/-0)
node_modules/cordova/_vendor/npmconf/0.1.13/test/save.js (+74/-0)
node_modules/cordova/_vendor/plugman/0.19.1-dev/README.md (+27/-1)
node_modules/cordova/_vendor/plugman/0.19.1-dev/doc/base.js (+5/-0)
node_modules/cordova/_vendor/plugman/0.19.1-dev/doc/help.txt (+31/-0)
node_modules/cordova/_vendor/plugman/0.19.1-dev/doc/platforms/android/android.xml (+12/-0)
node_modules/cordova/_vendor/plugman/0.19.1-dev/doc/platforms/android/base.java (+32/-0)
node_modules/cordova/_vendor/plugman/0.19.1-dev/doc/platforms/ios/base.m (+28/-0)
node_modules/cordova/_vendor/plugman/0.19.1-dev/doc/platforms/ios/ios.xml (+9/-0)
node_modules/cordova/_vendor/plugman/0.19.1-dev/main.js (+2/-2)
node_modules/cordova/_vendor/plugman/0.19.1-dev/package.json (+4/-3)
node_modules/cordova/_vendor/plugman/0.19.1-dev/plugman.js (+42/-2)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/create.js (+81/-0)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/fetch.js (+1/-1)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/install.js (+48/-31)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/platform.js (+119/-0)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/platform_operation.js (+5/-0)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/platforms/android.js (+2/-2)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/platforms/ios.js (+24/-8)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/platforms/windows8.js (+30/-0)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/platforms/wp8.js (+30/-0)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/prepare.js (+1/-1)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/registry/registry.js (+80/-37)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/util/config-changes.js (+648/-422)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/util/csproj.js (+60/-50)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/util/plugins.js (+0/-15)
node_modules/cordova/_vendor/plugman/0.19.1-dev/src/util/w8jsproj.js (+53/-2)
node_modules/cordova/_vendor/request/2.22.0/LICENSE (+55/-0)
node_modules/cordova/_vendor/request/2.22.0/README.md (+344/-0)
node_modules/cordova/_vendor/request/2.22.0/index.js (+1377/-0)
node_modules/cordova/_vendor/request/2.22.0/package.json (+47/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/run.js (+40/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/server.js (+90/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/squid.conf (+77/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/ssl/ca/ca.cnf (+20/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/ssl/ca/ca.crt (+17/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/ssl/ca/ca.csr (+13/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/ssl/ca/ca.key (+18/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/ssl/ca/ca.srl (+1/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/ssl/ca/server.cnf (+19/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/ssl/ca/server.crt (+16/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/ssl/ca/server.csr (+11/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/ssl/ca/server.js (+28/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/ssl/ca/server.key (+9/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/ssl/npm-ca.crt (+16/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/ssl/test.crt (+15/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/ssl/test.key (+15/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-agentOptions.js (+23/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-basic-auth.js (+143/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-body.js (+122/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-defaults.js (+129/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-digest-auth.js (+69/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-emptyBody.js (+20/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-errors.js (+37/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-follow-all-303.js (+30/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-follow-all.js (+35/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-form.js (+79/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-hawk.js (+33/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-headers.js (+52/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-http-signature.js (+106/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-httpModule.js (+94/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-https-strict.js (+97/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-https.js (+87/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-localAddress.js (+15/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-oauth.js (+117/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-onelineproxy.js (+46/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-params.js (+93/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-piped-redirect.js (+42/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-pipes.js (+216/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-pool.js (+16/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-protocol-changing-redirect.js (+61/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-proxy.js (+39/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-qs.js (+42/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-redirect.js (+155/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-s3.js (+13/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-timeout.js (+87/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-toJSON.js (+14/-0)
node_modules/cordova/_vendor/request/2.22.0/tests/test-tunnel.js (+75/-0)
node_modules/cordova/_vendor/tar.gz/0.1.1/.npmignore (+0/-3)
node_modules/cordova/_vendor/tar.gz/0.1.1/Cakefile (+0/-75)
node_modules/cordova/_vendor/tar.gz/0.1.1/LICENSE (+0/-20)
node_modules/cordova/_vendor/tar.gz/0.1.1/README.md (+0/-103)
node_modules/cordova/_vendor/tar.gz/0.1.1/bin/targz (+0/-55)
node_modules/cordova/_vendor/tar.gz/0.1.1/example/example.coffee (+0/-10)
node_modules/cordova/_vendor/tar.gz/0.1.1/example/example.js (+0/-10)
node_modules/cordova/_vendor/tar.gz/0.1.1/lib/targz.js (+0/-82)
node_modules/cordova/_vendor/tar.gz/0.1.1/package.json (+0/-61)
node_modules/cordova/_vendor/tar.gz/0.1.1/src/targz.coffee (+0/-80)
node_modules/cordova/_vendor/tar.gz/0.1.1/test/compress/test.txt (+0/-47)
node_modules/cordova/doc/help.txt (+1/-0)
node_modules/cordova/package.json (+3/-3)
node_modules/cordova/platforms.js (+10/-10)
node_modules/cordova/src/cli.js (+0/-4)
node_modules/cordova/src/metadata/amazon_fireos_parser.js (+23/-57)
node_modules/cordova/src/metadata/android_parser.js (+35/-0)
node_modules/cordova/src/platform.js (+39/-0)
node_modules/cordova/templates/hooks-README.md (+1/-1)
To merge this branch: bzr merge lp:~robru/cordova-cli/3.4-release
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Cordova Ubuntu Team Pending
Review via email: mp+207736@code.launchpad.net

Commit message

Update to the Cordova 3.4 release.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-02-04 16:30:54 +0000
3+++ debian/changelog 2014-02-21 20:33:03 +0000
4@@ -1,7 +1,6 @@
5-cordova-cli (3.4-pre-0ubuntu1) UNRELEASED; urgency=low
6+cordova-cli (3.4-0ubuntu1) UNRELEASED; urgency=low
7
8 [ Robert Bruce Park ]
9 * Initial release.
10- * Automatic snapshot from revision 41 (bootstrap)
11
12 -- Robert Bruce Park <robert.park@canonical.com> Tue, 04 Feb 2014 15:54:38 +0000
13
14=== modified file 'debian/control'
15--- debian/control 2014-02-04 15:37:46 +0000
16+++ debian/control 2014-02-21 20:33:03 +0000
17@@ -1,6 +1,6 @@
18 Source: cordova-cli
19 Section: misc
20-Priority: extra
21+Priority: optional
22 Maintainer: Ubuntu Desktop Team <ubuntu-desktop@lists.ubuntu.com>
23 Build-Depends: bzr,
24 debhelper (>= 9),
25
26=== modified file 'debian/rules'
27--- debian/rules 2014-02-05 14:12:31 +0000
28+++ debian/rules 2014-02-21 20:33:03 +0000
29@@ -12,9 +12,10 @@
30 FIND := find debian/cordova-cli/
31
32 cordova-%:
33- git clone --depth=1 git://git.apache.org/cordova-$*.git
34+ git clone --depth=1 https://git-wip-us.apache.org/repos/asf/cordova-$*
35
36 node_modules: cordova-cli cordova-plugman
37+ cd cordova-cli && git fetch --tags && git checkout 3.4.0-0.1.0
38 npm install ./cordova-plugman/ ./cordova-cli/
39 rm -rf ./node_modules/cordova/node_modules/plugman/
40 mv ./node_modules/plugman/ ./node_modules/cordova/node_modules/
41@@ -30,6 +31,7 @@
42 override_dh_install:
43 dh_install --fail-missing
44 $(FIND) -name '*.sln' -delete
45+ $(FIND) -name '.gitmodules' -delete
46 $(FIND) -name '*[Ll][Ii][Cc][Ee][Nn][CcSs][Ee]*' -delete
47 $(FIND) -name 'examples' -type d -prune -exec rm -rf \{} \;
48 $(FIND) ! -path '*/bin/*' -type f -exec chmod -x \{} \;
49
50=== modified file 'node_modules/cordova/RELEASENOTES.md'
51--- node_modules/cordova/RELEASENOTES.md 2014-02-04 15:29:21 +0000
52+++ node_modules/cordova/RELEASENOTES.md 2014-02-21 20:33:03 +0000
53@@ -20,6 +20,15 @@
54 -->
55 # Cordova-cli Release Notes
56
57+## 3.4.0-0.1.0 (Feb 14, 2014)
58+* CB-5638 Clean-up: remove unreachable info case from function
59+* CB-5937 Add "platform check" command: Shows platforms that are out of date
60+* CB-5634 Minor refactoring + tests for Android's orientation preference.
61+* CB-5634 Set Android orientation from config.xml
62+* Upleveled amazon_fireos_parser. Making it at par with android_parser.js
63+* CB-5947 Throw when trying to create project inside custom www.
64+* CB-4153 Update help.txt about --source -> --copy-from
65+
66 ## 3.3.1-0.3.1 (Jan 31, 2014)
67 * CB-4153 Rename --source and --link flags to --copy-from and --link-to
68
69@@ -222,4 +231,3 @@
70
71 - Plugins are now installed serially across all installed platforms, rather than in parallel. This avoids race conditions in dependency installation. [CB-4184](https://issues.apache.org/jira/browse/CB-4184)
72 - (WP8) All files from project www dir are now copied into the binary, not the top-level www. This means merges and plugin assets are correctly handled.
73-
74
75=== modified file 'node_modules/cordova/_vendor/combined-stream/0.0.4/package.json'
76--- node_modules/cordova/_vendor/combined-stream/0.0.4/package.json 2013-12-12 20:49:30 +0000
77+++ node_modules/cordova/_vendor/combined-stream/0.0.4/package.json 2014-02-21 20:33:03 +0000
78@@ -28,5 +28,6 @@
79 "url": "https://github.com/felixge/node-combined-stream/issues"
80 },
81 "_id": "combined-stream@0.0.4",
82- "_from": "combined-stream@~0.0.4"
83+ "_from": "combined-stream@~0.0.4",
84+ "scripts": {}
85 }
86
87=== removed directory 'node_modules/cordova/_vendor/commander'
88=== removed directory 'node_modules/cordova/_vendor/commander/1.1.1'
89=== removed file 'node_modules/cordova/_vendor/commander/1.1.1/.npmignore'
90--- node_modules/cordova/_vendor/commander/1.1.1/.npmignore 2013-12-12 20:49:30 +0000
91+++ node_modules/cordova/_vendor/commander/1.1.1/.npmignore 1970-01-01 00:00:00 +0000
92@@ -1,4 +0,0 @@
93-support
94-test
95-examples
96-*.sock
97
98=== removed file 'node_modules/cordova/_vendor/commander/1.1.1/.travis.yml'
99--- node_modules/cordova/_vendor/commander/1.1.1/.travis.yml 2013-12-12 20:49:30 +0000
100+++ node_modules/cordova/_vendor/commander/1.1.1/.travis.yml 1970-01-01 00:00:00 +0000
101@@ -1,4 +0,0 @@
102-language: node_js
103-node_js:
104- - 0.4
105- - 0.6
106
107=== removed file 'node_modules/cordova/_vendor/commander/1.1.1/History.md'
108--- node_modules/cordova/_vendor/commander/1.1.1/History.md 2013-12-12 20:49:30 +0000
109+++ node_modules/cordova/_vendor/commander/1.1.1/History.md 1970-01-01 00:00:00 +0000
110@@ -1,152 +0,0 @@
111-
112-1.1.1 / 2012-11-20
113-==================
114-
115- * add more sub-command padding
116- * fix .usage() when args are present. Closes #106
117-
118-1.1.0 / 2012-11-16
119-==================
120-
121- * add git-style executable subcommand support. Closes #94
122-
123-1.0.5 / 2012-10-09
124-==================
125-
126- * fix `--name` clobbering. Closes #92
127- * fix examples/help. Closes #89
128-
129-1.0.4 / 2012-09-03
130-==================
131-
132- * add `outputHelp()` method.
133-
134-1.0.3 / 2012-08-30
135-==================
136-
137- * remove invalid .version() defaulting
138-
139-1.0.2 / 2012-08-24
140-==================
141-
142- * add `--foo=bar` support [arv]
143- * fix password on node 0.8.8. Make backward compatible with 0.6 [focusaurus]
144-
145-1.0.1 / 2012-08-03
146-==================
147-
148- * fix issue #56
149- * fix tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (i.e. process.stdin.setRawMode())
150-
151-1.0.0 / 2012-07-05
152-==================
153-
154- * add support for optional option descriptions
155- * add defaulting of `.version()` to package.json's version
156-
157-0.6.1 / 2012-06-01
158-==================
159-
160- * Added: append (yes or no) on confirmation
161- * Added: allow node.js v0.7.x
162-
163-0.6.0 / 2012-04-10
164-==================
165-
166- * Added `.prompt(obj, callback)` support. Closes #49
167- * Added default support to .choose(). Closes #41
168- * Fixed the choice example
169-
170-0.5.1 / 2011-12-20
171-==================
172-
173- * Fixed `password()` for recent nodes. Closes #36
174-
175-0.5.0 / 2011-12-04
176-==================
177-
178- * Added sub-command option support [itay]
179-
180-0.4.3 / 2011-12-04
181-==================
182-
183- * Fixed custom help ordering. Closes #32
184-
185-0.4.2 / 2011-11-24
186-==================
187-
188- * Added travis support
189- * Fixed: line-buffered input automatically trimmed. Closes #31
190-
191-0.4.1 / 2011-11-18
192-==================
193-
194- * Removed listening for "close" on --help
195-
196-0.4.0 / 2011-11-15
197-==================
198-
199- * Added support for `--`. Closes #24
200-
201-0.3.3 / 2011-11-14
202-==================
203-
204- * Fixed: wait for close event when writing help info [Jerry Hamlet]
205-
206-0.3.2 / 2011-11-01
207-==================
208-
209- * Fixed long flag definitions with values [felixge]
210-
211-0.3.1 / 2011-10-31
212-==================
213-
214- * Changed `--version` short flag to `-V` from `-v`
215- * Changed `.version()` so it's configurable [felixge]
216-
217-0.3.0 / 2011-10-31
218-==================
219-
220- * Added support for long flags only. Closes #18
221-
222-0.2.1 / 2011-10-24
223-==================
224-
225- * "node": ">= 0.4.x < 0.7.0". Closes #20
226-
227-0.2.0 / 2011-09-26
228-==================
229-
230- * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs]
231-
232-0.1.0 / 2011-08-24
233-==================
234-
235- * Added support for custom `--help` output
236-
237-0.0.5 / 2011-08-18
238-==================
239-
240- * Changed: when the user enters nothing prompt for password again
241- * Fixed issue with passwords beginning with numbers [NuckChorris]
242-
243-0.0.4 / 2011-08-15
244-==================
245-
246- * Fixed `Commander#args`
247-
248-0.0.3 / 2011-08-15
249-==================
250-
251- * Added default option value support
252-
253-0.0.2 / 2011-08-15
254-==================
255-
256- * Added mask support to `Command#password(str[, mask], fn)`
257- * Added `Command#password(str, fn)`
258-
259-0.0.1 / 2010-01-03
260-==================
261-
262- * Initial release
263
264=== removed file 'node_modules/cordova/_vendor/commander/1.1.1/Makefile'
265--- node_modules/cordova/_vendor/commander/1.1.1/Makefile 2013-12-12 20:49:30 +0000
266+++ node_modules/cordova/_vendor/commander/1.1.1/Makefile 1970-01-01 00:00:00 +0000
267@@ -1,7 +0,0 @@
268-
269-TESTS = $(shell find test/test.*.js)
270-
271-test:
272- @./test/run $(TESTS)
273-
274-.PHONY: test
275\ No newline at end of file
276
277=== removed file 'node_modules/cordova/_vendor/commander/1.1.1/Readme.md'
278--- node_modules/cordova/_vendor/commander/1.1.1/Readme.md 2013-12-12 20:49:30 +0000
279+++ node_modules/cordova/_vendor/commander/1.1.1/Readme.md 1970-01-01 00:00:00 +0000
280@@ -1,270 +0,0 @@
281-# Commander.js
282-
283- The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).
284-
285- [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js)
286-
287-## Installation
288-
289- $ npm install commander
290-
291-## Option parsing
292-
293- Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.
294-
295-```js
296-#!/usr/bin/env node
297-
298-/**
299- * Module dependencies.
300- */
301-
302-var program = require('commander');
303-
304-program
305- .version('0.0.1')
306- .option('-p, --peppers', 'Add peppers')
307- .option('-P, --pineapple', 'Add pineapple')
308- .option('-b, --bbq', 'Add bbq sauce')
309- .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')
310- .parse(process.argv);
311-
312-console.log('you ordered a pizza with:');
313-if (program.peppers) console.log(' - peppers');
314-if (program.pineapple) console.log(' - pineappe');
315-if (program.bbq) console.log(' - bbq');
316-console.log(' - %s cheese', program.cheese);
317-```
318-
319- Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc.
320-
321-## Automated --help
322-
323- The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:
324-
325-```
326- $ ./examples/pizza --help
327-
328- Usage: pizza [options]
329-
330- Options:
331-
332- -V, --version output the version number
333- -p, --peppers Add peppers
334- -P, --pineapple Add pineappe
335- -b, --bbq Add bbq sauce
336- -c, --cheese <type> Add the specified type of cheese [marble]
337- -h, --help output usage information
338-
339-```
340-
341-## Coercion
342-
343-```js
344-function range(val) {
345- return val.split('..').map(Number);
346-}
347-
348-function list(val) {
349- return val.split(',');
350-}
351-
352-program
353- .version('0.0.1')
354- .usage('[options] <file ...>')
355- .option('-i, --integer <n>', 'An integer argument', parseInt)
356- .option('-f, --float <n>', 'A float argument', parseFloat)
357- .option('-r, --range <a>..<b>', 'A range', range)
358- .option('-l, --list <items>', 'A list', list)
359- .option('-o, --optional [value]', 'An optional value')
360- .parse(process.argv);
361-
362-console.log(' int: %j', program.integer);
363-console.log(' float: %j', program.float);
364-console.log(' optional: %j', program.optional);
365-program.range = program.range || [];
366-console.log(' range: %j..%j', program.range[0], program.range[1]);
367-console.log(' list: %j', program.list);
368-console.log(' args: %j', program.args);
369-```
370-
371-## Custom help
372-
373- You can display arbitrary `-h, --help` information
374- by listening for "--help". Commander will automatically
375- exit once you are done so that the remainder of your program
376- does not execute causing undesired behaviours, for example
377- in the following executable "stuff" will not output when
378- `--help` is used.
379-
380-```js
381-#!/usr/bin/env node
382-
383-/**
384- * Module dependencies.
385- */
386-
387-var program = require('../');
388-
389-function list(val) {
390- return val.split(',').map(Number);
391-}
392-
393-program
394- .version('0.0.1')
395- .option('-f, --foo', 'enable some foo')
396- .option('-b, --bar', 'enable some bar')
397- .option('-B, --baz', 'enable some baz');
398-
399-// must be before .parse() since
400-// node's emit() is immediate
401-
402-program.on('--help', function(){
403- console.log(' Examples:');
404- console.log('');
405- console.log(' $ custom-help --help');
406- console.log(' $ custom-help -h');
407- console.log('');
408-});
409-
410-program.parse(process.argv);
411-
412-console.log('stuff');
413-```
414-
415-yielding the following help output:
416-
417-```
418-
419-Usage: custom-help [options]
420-
421-Options:
422-
423- -h, --help output usage information
424- -V, --version output the version number
425- -f, --foo enable some foo
426- -b, --bar enable some bar
427- -B, --baz enable some baz
428-
429-Examples:
430-
431- $ custom-help --help
432- $ custom-help -h
433-
434-```
435-
436-## .prompt(msg, fn)
437-
438- Single-line prompt:
439-
440-```js
441-program.prompt('name: ', function(name){
442- console.log('hi %s', name);
443-});
444-```
445-
446- Multi-line prompt:
447-
448-```js
449-program.prompt('description:', function(name){
450- console.log('hi %s', name);
451-});
452-```
453-
454- Coercion:
455-
456-```js
457-program.prompt('Age: ', Number, function(age){
458- console.log('age: %j', age);
459-});
460-```
461-
462-```js
463-program.prompt('Birthdate: ', Date, function(date){
464- console.log('date: %s', date);
465-});
466-```
467-
468-## .password(msg[, mask], fn)
469-
470-Prompt for password without echoing:
471-
472-```js
473-program.password('Password: ', function(pass){
474- console.log('got "%s"', pass);
475- process.stdin.destroy();
476-});
477-```
478-
479-Prompt for password with mask char "*":
480-
481-```js
482-program.password('Password: ', '*', function(pass){
483- console.log('got "%s"', pass);
484- process.stdin.destroy();
485-});
486-```
487-
488-## .confirm(msg, fn)
489-
490- Confirm with the given `msg`:
491-
492-```js
493-program.confirm('continue? ', function(ok){
494- console.log(' got %j', ok);
495-});
496-```
497-
498-## .choose(list, fn)
499-
500- Let the user choose from a `list`:
501-
502-```js
503-var list = ['tobi', 'loki', 'jane', 'manny', 'luna'];
504-
505-console.log('Choose the coolest pet:');
506-program.choose(list, function(i){
507- console.log('you chose %d "%s"', i, list[i]);
508-});
509-```
510-
511-## .outputHelp()
512-
513- Output help information without exiting.
514-
515-## .help()
516-
517- Output help information and exit immediately.
518-
519-## Links
520-
521- - [API documentation](http://visionmedia.github.com/commander.js/)
522- - [ascii tables](https://github.com/LearnBoost/cli-table)
523- - [progress bars](https://github.com/visionmedia/node-progress)
524- - [more progress bars](https://github.com/substack/node-multimeter)
525- - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)
526-
527-## License
528-
529-(The MIT License)
530-
531-Copyright (c) 2011 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
532-
533-Permission is hereby granted, free of charge, to any person obtaining
534-a copy of this software and associated documentation files (the
535-'Software'), to deal in the Software without restriction, including
536-without limitation the rights to use, copy, modify, merge, publish,
537-distribute, sublicense, and/or sell copies of the Software, and to
538-permit persons to whom the Software is furnished to do so, subject to
539-the following conditions:
540-
541-The above copyright notice and this permission notice shall be
542-included in all copies or substantial portions of the Software.
543-
544-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
545-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
546-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
547-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
548-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
549-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
550-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
551\ No newline at end of file
552
553=== removed symlink 'node_modules/cordova/_vendor/commander/1.1.1/_vendor'
554=== target was u'../..'
555=== removed file 'node_modules/cordova/_vendor/commander/1.1.1/index.js'
556--- node_modules/cordova/_vendor/commander/1.1.1/index.js 2013-12-12 20:49:30 +0000
557+++ node_modules/cordova/_vendor/commander/1.1.1/index.js 1970-01-01 00:00:00 +0000
558@@ -1,1131 +0,0 @@
559-/*!
560- * commander
561- * Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
562- * MIT Licensed
563- */
564-
565-/**
566- * Module dependencies.
567- */
568-
569-var EventEmitter = require('events').EventEmitter
570- , spawn = require('child_process').spawn
571- , keypress = require('keypress')
572- , fs = require('fs')
573- , exists = fs.existsSync
574- , path = require('path')
575- , tty = require('tty')
576- , dirname = path.dirname
577- , basename = path.basename;
578-
579-/**
580- * Expose the root command.
581- */
582-
583-exports = module.exports = new Command;
584-
585-/**
586- * Expose `Command`.
587- */
588-
589-exports.Command = Command;
590-
591-/**
592- * Expose `Option`.
593- */
594-
595-exports.Option = Option;
596-
597-/**
598- * Initialize a new `Option` with the given `flags` and `description`.
599- *
600- * @param {String} flags
601- * @param {String} description
602- * @api public
603- */
604-
605-function Option(flags, description) {
606- this.flags = flags;
607- this.required = ~flags.indexOf('<');
608- this.optional = ~flags.indexOf('[');
609- this.bool = !~flags.indexOf('-no-');
610- flags = flags.split(/[ ,|]+/);
611- if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift();
612- this.long = flags.shift();
613- this.description = description || '';
614-}
615-
616-/**
617- * Return option name.
618- *
619- * @return {String}
620- * @api private
621- */
622-
623-Option.prototype.name = function(){
624- return this.long
625- .replace('--', '')
626- .replace('no-', '');
627-};
628-
629-/**
630- * Check if `arg` matches the short or long flag.
631- *
632- * @param {String} arg
633- * @return {Boolean}
634- * @api private
635- */
636-
637-Option.prototype.is = function(arg){
638- return arg == this.short
639- || arg == this.long;
640-};
641-
642-/**
643- * Initialize a new `Command`.
644- *
645- * @param {String} name
646- * @api public
647- */
648-
649-function Command(name) {
650- this.commands = [];
651- this.options = [];
652- this._args = [];
653- this._name = name;
654-}
655-
656-/**
657- * Inherit from `EventEmitter.prototype`.
658- */
659-
660-Command.prototype.__proto__ = EventEmitter.prototype;
661-
662-/**
663- * Add command `name`.
664- *
665- * The `.action()` callback is invoked when the
666- * command `name` is specified via __ARGV__,
667- * and the remaining arguments are applied to the
668- * function for access.
669- *
670- * When the `name` is "*" an un-matched command
671- * will be passed as the first arg, followed by
672- * the rest of __ARGV__ remaining.
673- *
674- * Examples:
675- *
676- * program
677- * .version('0.0.1')
678- * .option('-C, --chdir <path>', 'change the working directory')
679- * .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf')
680- * .option('-T, --no-tests', 'ignore test hook')
681- *
682- * program
683- * .command('setup')
684- * .description('run remote setup commands')
685- * .action(function(){
686- * console.log('setup');
687- * });
688- *
689- * program
690- * .command('exec <cmd>')
691- * .description('run the given remote command')
692- * .action(function(cmd){
693- * console.log('exec "%s"', cmd);
694- * });
695- *
696- * program
697- * .command('*')
698- * .description('deploy the given env')
699- * .action(function(env){
700- * console.log('deploying "%s"', env);
701- * });
702- *
703- * program.parse(process.argv);
704- *
705- * @param {String} name
706- * @param {String} [desc]
707- * @return {Command} the new command
708- * @api public
709- */
710-
711-Command.prototype.command = function(name, desc){
712- var args = name.split(/ +/);
713- var cmd = new Command(args.shift());
714- if (desc) cmd.description(desc);
715- if (desc) this.executables = true;
716- this.commands.push(cmd);
717- cmd.parseExpectedArgs(args);
718- cmd.parent = this;
719- if (desc) return this;
720- return cmd;
721-};
722-
723-/**
724- * Add an implicit `help [cmd]` subcommand
725- * which invokes `--help` for the given command.
726- *
727- * @api private
728- */
729-
730-Command.prototype.addImplicitHelpCommand = function() {
731- this.command('help [cmd]', 'display help for [cmd]');
732-};
733-
734-/**
735- * Parse expected `args`.
736- *
737- * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`.
738- *
739- * @param {Array} args
740- * @return {Command} for chaining
741- * @api public
742- */
743-
744-Command.prototype.parseExpectedArgs = function(args){
745- if (!args.length) return;
746- var self = this;
747- args.forEach(function(arg){
748- switch (arg[0]) {
749- case '<':
750- self._args.push({ required: true, name: arg.slice(1, -1) });
751- break;
752- case '[':
753- self._args.push({ required: false, name: arg.slice(1, -1) });
754- break;
755- }
756- });
757- return this;
758-};
759-
760-/**
761- * Register callback `fn` for the command.
762- *
763- * Examples:
764- *
765- * program
766- * .command('help')
767- * .description('display verbose help')
768- * .action(function(){
769- * // output help here
770- * });
771- *
772- * @param {Function} fn
773- * @return {Command} for chaining
774- * @api public
775- */
776-
777-Command.prototype.action = function(fn){
778- var self = this;
779- this.parent.on(this._name, function(args, unknown){
780- // Parse any so-far unknown options
781- unknown = unknown || [];
782- var parsed = self.parseOptions(unknown);
783-
784- // Output help if necessary
785- outputHelpIfNecessary(self, parsed.unknown);
786-
787- // If there are still any unknown options, then we simply
788- // die, unless someone asked for help, in which case we give it
789- // to them, and then we die.
790- if (parsed.unknown.length > 0) {
791- self.unknownOption(parsed.unknown[0]);
792- }
793-
794- // Leftover arguments need to be pushed back. Fixes issue #56
795- if (parsed.args.length) args = parsed.args.concat(args);
796-
797- self._args.forEach(function(arg, i){
798- if (arg.required && null == args[i]) {
799- self.missingArgument(arg.name);
800- }
801- });
802-
803- // Always append ourselves to the end of the arguments,
804- // to make sure we match the number of arguments the user
805- // expects
806- if (self._args.length) {
807- args[self._args.length] = self;
808- } else {
809- args.push(self);
810- }
811-
812- fn.apply(this, args);
813- });
814- return this;
815-};
816-
817-/**
818- * Define option with `flags`, `description` and optional
819- * coercion `fn`.
820- *
821- * The `flags` string should contain both the short and long flags,
822- * separated by comma, a pipe or space. The following are all valid
823- * all will output this way when `--help` is used.
824- *
825- * "-p, --pepper"
826- * "-p|--pepper"
827- * "-p --pepper"
828- *
829- * Examples:
830- *
831- * // simple boolean defaulting to false
832- * program.option('-p, --pepper', 'add pepper');
833- *
834- * --pepper
835- * program.pepper
836- * // => Boolean
837- *
838- * // simple boolean defaulting to false
839- * program.option('-C, --no-cheese', 'remove cheese');
840- *
841- * program.cheese
842- * // => true
843- *
844- * --no-cheese
845- * program.cheese
846- * // => true
847- *
848- * // required argument
849- * program.option('-C, --chdir <path>', 'change the working directory');
850- *
851- * --chdir /tmp
852- * program.chdir
853- * // => "/tmp"
854- *
855- * // optional argument
856- * program.option('-c, --cheese [type]', 'add cheese [marble]');
857- *
858- * @param {String} flags
859- * @param {String} description
860- * @param {Function|Mixed} fn or default
861- * @param {Mixed} defaultValue
862- * @return {Command} for chaining
863- * @api public
864- */
865-
866-Command.prototype.option = function(flags, description, fn, defaultValue){
867- var self = this
868- , option = new Option(flags, description)
869- , oname = option.name()
870- , name = camelcase(oname);
871-
872- // default as 3rd arg
873- if ('function' != typeof fn) defaultValue = fn, fn = null;
874-
875- // preassign default value only for --no-*, [optional], or <required>
876- if (false == option.bool || option.optional || option.required) {
877- // when --no-* we make sure default is true
878- if (false == option.bool) defaultValue = true;
879- // preassign only if we have a default
880- if (undefined !== defaultValue) self[name] = defaultValue;
881- }
882-
883- // register the option
884- this.options.push(option);
885-
886- // when it's passed assign the value
887- // and conditionally invoke the callback
888- this.on(oname, function(val){
889- // coercion
890- if (null != val && fn) val = fn(val);
891-
892- // unassigned or bool
893- if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) {
894- // if no value, bool true, and we have a default, then use it!
895- if (null == val) {
896- self[name] = option.bool
897- ? defaultValue || true
898- : false;
899- } else {
900- self[name] = val;
901- }
902- } else if (null !== val) {
903- // reassign
904- self[name] = val;
905- }
906- });
907-
908- return this;
909-};
910-
911-/**
912- * Parse `argv`, settings options and invoking commands when defined.
913- *
914- * @param {Array} argv
915- * @return {Command} for chaining
916- * @api public
917- */
918-
919-Command.prototype.parse = function(argv){
920- // implicit help
921- if (this.executables) this.addImplicitHelpCommand();
922-
923- // store raw args
924- this.rawArgs = argv;
925-
926- // guess name
927- this._name = this._name || basename(argv[1]);
928-
929- // process argv
930- var parsed = this.parseOptions(this.normalize(argv.slice(2)));
931- var args = this.args = parsed.args;
932-
933- // executable sub-commands, skip .parseArgs()
934- if (this.executables) return this.executeSubCommand(argv, args, parsed.unknown);
935-
936- return this.parseArgs(this.args, parsed.unknown);
937-};
938-
939-/**
940- * Execute a sub-command executable.
941- *
942- * @param {Array} argv
943- * @param {Array} args
944- * @param {Array} unknown
945- * @api private
946- */
947-
948-Command.prototype.executeSubCommand = function(argv, args, unknown) {
949- args = args.concat(unknown);
950-
951- if (!args.length) this.help();
952- if ('help' == args[0] && 1 == args.length) this.help();
953-
954- // <cmd> --help
955- if ('help' == args[0]) {
956- args[0] = args[1];
957- args[1] = '--help';
958- }
959-
960- // executable
961- var dir = dirname(argv[1]);
962- var bin = basename(argv[1]) + '-' + args[0];
963-
964- // check for ./<bin> first
965- var local = path.join(dir, bin);
966- if (exists(local)) bin = local;
967-
968- // run it
969- args = args.slice(1);
970- var proc = spawn(bin, args, { stdio: 'inherit', customFds: [0, 1, 2] });
971- proc.on('exit', function(code){
972- if (code == 127) {
973- console.error('\n %s(1) does not exist\n', bin);
974- }
975- });
976-};
977-
978-/**
979- * Normalize `args`, splitting joined short flags. For example
980- * the arg "-abc" is equivalent to "-a -b -c".
981- * This also normalizes equal sign and splits "--abc=def" into "--abc def".
982- *
983- * @param {Array} args
984- * @return {Array}
985- * @api private
986- */
987-
988-Command.prototype.normalize = function(args){
989- var ret = []
990- , arg
991- , index;
992-
993- for (var i = 0, len = args.length; i < len; ++i) {
994- arg = args[i];
995- if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) {
996- arg.slice(1).split('').forEach(function(c){
997- ret.push('-' + c);
998- });
999- } else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) {
1000- ret.push(arg.slice(0, index), arg.slice(index + 1));
1001- } else {
1002- ret.push(arg);
1003- }
1004- }
1005-
1006- return ret;
1007-};
1008-
1009-/**
1010- * Parse command `args`.
1011- *
1012- * When listener(s) are available those
1013- * callbacks are invoked, otherwise the "*"
1014- * event is emitted and those actions are invoked.
1015- *
1016- * @param {Array} args
1017- * @return {Command} for chaining
1018- * @api private
1019- */
1020-
1021-Command.prototype.parseArgs = function(args, unknown){
1022- var cmds = this.commands
1023- , len = cmds.length
1024- , name;
1025-
1026- if (args.length) {
1027- name = args[0];
1028- if (this.listeners(name).length) {
1029- this.emit(args.shift(), args, unknown);
1030- } else {
1031- this.emit('*', args);
1032- }
1033- } else {
1034- outputHelpIfNecessary(this, unknown);
1035-
1036- // If there were no args and we have unknown options,
1037- // then they are extraneous and we need to error.
1038- if (unknown.length > 0) {
1039- this.unknownOption(unknown[0]);
1040- }
1041- }
1042-
1043- return this;
1044-};
1045-
1046-/**
1047- * Return an option matching `arg` if any.
1048- *
1049- * @param {String} arg
1050- * @return {Option}
1051- * @api private
1052- */
1053-
1054-Command.prototype.optionFor = function(arg){
1055- for (var i = 0, len = this.options.length; i < len; ++i) {
1056- if (this.options[i].is(arg)) {
1057- return this.options[i];
1058- }
1059- }
1060-};
1061-
1062-/**
1063- * Parse options from `argv` returning `argv`
1064- * void of these options.
1065- *
1066- * @param {Array} argv
1067- * @return {Array}
1068- * @api public
1069- */
1070-
1071-Command.prototype.parseOptions = function(argv){
1072- var args = []
1073- , len = argv.length
1074- , literal
1075- , option
1076- , arg;
1077-
1078- var unknownOptions = [];
1079-
1080- // parse options
1081- for (var i = 0; i < len; ++i) {
1082- arg = argv[i];
1083-
1084- // literal args after --
1085- if ('--' == arg) {
1086- literal = true;
1087- continue;
1088- }
1089-
1090- if (literal) {
1091- args.push(arg);
1092- continue;
1093- }
1094-
1095- // find matching Option
1096- option = this.optionFor(arg);
1097-
1098- // option is defined
1099- if (option) {
1100- // requires arg
1101- if (option.required) {
1102- arg = argv[++i];
1103- if (null == arg) return this.optionMissingArgument(option);
1104- if ('-' == arg[0]) return this.optionMissingArgument(option, arg);
1105- this.emit(option.name(), arg);
1106- // optional arg
1107- } else if (option.optional) {
1108- arg = argv[i+1];
1109- if (null == arg || '-' == arg[0]) {
1110- arg = null;
1111- } else {
1112- ++i;
1113- }
1114- this.emit(option.name(), arg);
1115- // bool
1116- } else {
1117- this.emit(option.name());
1118- }
1119- continue;
1120- }
1121-
1122- // looks like an option
1123- if (arg.length > 1 && '-' == arg[0]) {
1124- unknownOptions.push(arg);
1125-
1126- // If the next argument looks like it might be
1127- // an argument for this option, we pass it on.
1128- // If it isn't, then it'll simply be ignored
1129- if (argv[i+1] && '-' != argv[i+1][0]) {
1130- unknownOptions.push(argv[++i]);
1131- }
1132- continue;
1133- }
1134-
1135- // arg
1136- args.push(arg);
1137- }
1138-
1139- return { args: args, unknown: unknownOptions };
1140-};
1141-
1142-/**
1143- * Argument `name` is missing.
1144- *
1145- * @param {String} name
1146- * @api private
1147- */
1148-
1149-Command.prototype.missingArgument = function(name){
1150- console.error();
1151- console.error(" error: missing required argument `%s'", name);
1152- console.error();
1153- process.exit(1);
1154-};
1155-
1156-/**
1157- * `Option` is missing an argument, but received `flag` or nothing.
1158- *
1159- * @param {String} option
1160- * @param {String} flag
1161- * @api private
1162- */
1163-
1164-Command.prototype.optionMissingArgument = function(option, flag){
1165- console.error();
1166- if (flag) {
1167- console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag);
1168- } else {
1169- console.error(" error: option `%s' argument missing", option.flags);
1170- }
1171- console.error();
1172- process.exit(1);
1173-};
1174-
1175-/**
1176- * Unknown option `flag`.
1177- *
1178- * @param {String} flag
1179- * @api private
1180- */
1181-
1182-Command.prototype.unknownOption = function(flag){
1183- console.error();
1184- console.error(" error: unknown option `%s'", flag);
1185- console.error();
1186- process.exit(1);
1187-};
1188-
1189-
1190-/**
1191- * Set the program version to `str`.
1192- *
1193- * This method auto-registers the "-V, --version" flag
1194- * which will print the version number when passed.
1195- *
1196- * @param {String} str
1197- * @param {String} flags
1198- * @return {Command} for chaining
1199- * @api public
1200- */
1201-
1202-Command.prototype.version = function(str, flags){
1203- if (0 == arguments.length) return this._version;
1204- this._version = str;
1205- flags = flags || '-V, --version';
1206- this.option(flags, 'output the version number');
1207- this.on('version', function(){
1208- console.log(str);
1209- process.exit(0);
1210- });
1211- return this;
1212-};
1213-
1214-/**
1215- * Set the description `str`.
1216- *
1217- * @param {String} str
1218- * @return {String|Command}
1219- * @api public
1220- */
1221-
1222-Command.prototype.description = function(str){
1223- if (0 == arguments.length) return this._description;
1224- this._description = str;
1225- return this;
1226-};
1227-
1228-/**
1229- * Set / get the command usage `str`.
1230- *
1231- * @param {String} str
1232- * @return {String|Command}
1233- * @api public
1234- */
1235-
1236-Command.prototype.usage = function(str){
1237- var args = this._args.map(function(arg){
1238- return arg.required
1239- ? '<' + arg.name + '>'
1240- : '[' + arg.name + ']';
1241- });
1242-
1243- var usage = '[options'
1244- + (this.commands.length ? '] [command' : '')
1245- + ']'
1246- + (this._args.length ? ' ' + args : '');
1247-
1248- if (0 == arguments.length) return this._usage || usage;
1249- this._usage = str;
1250-
1251- return this;
1252-};
1253-
1254-/**
1255- * Return the largest option length.
1256- *
1257- * @return {Number}
1258- * @api private
1259- */
1260-
1261-Command.prototype.largestOptionLength = function(){
1262- return this.options.reduce(function(max, option){
1263- return Math.max(max, option.flags.length);
1264- }, 0);
1265-};
1266-
1267-/**
1268- * Return help for options.
1269- *
1270- * @return {String}
1271- * @api private
1272- */
1273-
1274-Command.prototype.optionHelp = function(){
1275- var width = this.largestOptionLength();
1276-
1277- // Prepend the help information
1278- return [pad('-h, --help', width) + ' ' + 'output usage information']
1279- .concat(this.options.map(function(option){
1280- return pad(option.flags, width)
1281- + ' ' + option.description;
1282- }))
1283- .join('\n');
1284-};
1285-
1286-/**
1287- * Return command help documentation.
1288- *
1289- * @return {String}
1290- * @api private
1291- */
1292-
1293-Command.prototype.commandHelp = function(){
1294- if (!this.commands.length) return '';
1295- return [
1296- ''
1297- , ' Commands:'
1298- , ''
1299- , this.commands.map(function(cmd){
1300- var args = cmd._args.map(function(arg){
1301- return arg.required
1302- ? '<' + arg.name + '>'
1303- : '[' + arg.name + ']';
1304- }).join(' ');
1305-
1306- return pad(cmd._name
1307- + (cmd.options.length
1308- ? ' [options]'
1309- : '') + ' ' + args, 22)
1310- + (cmd.description()
1311- ? ' ' + cmd.description()
1312- : '');
1313- }).join('\n').replace(/^/gm, ' ')
1314- , ''
1315- ].join('\n');
1316-};
1317-
1318-/**
1319- * Return program help documentation.
1320- *
1321- * @return {String}
1322- * @api private
1323- */
1324-
1325-Command.prototype.helpInformation = function(){
1326- return [
1327- ''
1328- , ' Usage: ' + this._name + ' ' + this.usage()
1329- , '' + this.commandHelp()
1330- , ' Options:'
1331- , ''
1332- , '' + this.optionHelp().replace(/^/gm, ' ')
1333- , ''
1334- , ''
1335- ].join('\n');
1336-};
1337-
1338-/**
1339- * Prompt for a `Number`.
1340- *
1341- * @param {String} str
1342- * @param {Function} fn
1343- * @api private
1344- */
1345-
1346-Command.prototype.promptForNumber = function(str, fn){
1347- var self = this;
1348- this.promptSingleLine(str, function parseNumber(val){
1349- val = Number(val);
1350- if (isNaN(val)) return self.promptSingleLine(str + '(must be a number) ', parseNumber);
1351- fn(val);
1352- });
1353-};
1354-
1355-/**
1356- * Prompt for a `Date`.
1357- *
1358- * @param {String} str
1359- * @param {Function} fn
1360- * @api private
1361- */
1362-
1363-Command.prototype.promptForDate = function(str, fn){
1364- var self = this;
1365- this.promptSingleLine(str, function parseDate(val){
1366- val = new Date(val);
1367- if (isNaN(val.getTime())) return self.promptSingleLine(str + '(must be a date) ', parseDate);
1368- fn(val);
1369- });
1370-};
1371-
1372-/**
1373- * Single-line prompt.
1374- *
1375- * @param {String} str
1376- * @param {Function} fn
1377- * @api private
1378- */
1379-
1380-Command.prototype.promptSingleLine = function(str, fn){
1381- if ('function' == typeof arguments[2]) {
1382- return this['promptFor' + (fn.name || fn)](str, arguments[2]);
1383- }
1384-
1385- process.stdout.write(str);
1386- process.stdin.setEncoding('utf8');
1387- process.stdin.once('data', function(val){
1388- fn(val.trim());
1389- }).resume();
1390-};
1391-
1392-/**
1393- * Multi-line prompt.
1394- *
1395- * @param {String} str
1396- * @param {Function} fn
1397- * @api private
1398- */
1399-
1400-Command.prototype.promptMultiLine = function(str, fn){
1401- var buf = [];
1402- console.log(str);
1403- process.stdin.setEncoding('utf8');
1404- process.stdin.on('data', function(val){
1405- if ('\n' == val || '\r\n' == val) {
1406- process.stdin.removeAllListeners('data');
1407- fn(buf.join('\n'));
1408- } else {
1409- buf.push(val.trimRight());
1410- }
1411- }).resume();
1412-};
1413-
1414-/**
1415- * Prompt `str` and callback `fn(val)`
1416- *
1417- * Commander supports single-line and multi-line prompts.
1418- * To issue a single-line prompt simply add white-space
1419- * to the end of `str`, something like "name: ", whereas
1420- * for a multi-line prompt omit this "description:".
1421- *
1422- *
1423- * Examples:
1424- *
1425- * program.prompt('Username: ', function(name){
1426- * console.log('hi %s', name);
1427- * });
1428- *
1429- * program.prompt('Description:', function(desc){
1430- * console.log('description was "%s"', desc.trim());
1431- * });
1432- *
1433- * @param {String|Object} str
1434- * @param {Function} fn
1435- * @api public
1436- */
1437-
1438-Command.prototype.prompt = function(str, fn){
1439- var self = this;
1440-
1441- if ('string' == typeof str) {
1442- if (/ $/.test(str)) return this.promptSingleLine.apply(this, arguments);
1443- this.promptMultiLine(str, fn);
1444- } else {
1445- var keys = Object.keys(str)
1446- , obj = {};
1447-
1448- function next() {
1449- var key = keys.shift()
1450- , label = str[key];
1451-
1452- if (!key) return fn(obj);
1453- self.prompt(label, function(val){
1454- obj[key] = val;
1455- next();
1456- });
1457- }
1458-
1459- next();
1460- }
1461-};
1462-
1463-/**
1464- * Prompt for password with `str`, `mask` char and callback `fn(val)`.
1465- *
1466- * The mask string defaults to '', aka no output is
1467- * written while typing, you may want to use "*" etc.
1468- *
1469- * Examples:
1470- *
1471- * program.password('Password: ', function(pass){
1472- * console.log('got "%s"', pass);
1473- * process.stdin.destroy();
1474- * });
1475- *
1476- * program.password('Password: ', '*', function(pass){
1477- * console.log('got "%s"', pass);
1478- * process.stdin.destroy();
1479- * });
1480- *
1481- * @param {String} str
1482- * @param {String} mask
1483- * @param {Function} fn
1484- * @api public
1485- */
1486-
1487-Command.prototype.password = function(str, mask, fn){
1488- var self = this
1489- , buf = '';
1490-
1491- // default mask
1492- if ('function' == typeof mask) {
1493- fn = mask;
1494- mask = '';
1495- }
1496-
1497- keypress(process.stdin);
1498-
1499- function setRawMode(mode) {
1500- if (process.stdin.setRawMode) {
1501- process.stdin.setRawMode(mode);
1502- } else {
1503- tty.setRawMode(mode);
1504- }
1505- };
1506- setRawMode(true);
1507- process.stdout.write(str);
1508-
1509- // keypress
1510- process.stdin.on('keypress', function(c, key){
1511- if (key && 'enter' == key.name) {
1512- console.log();
1513- process.stdin.pause();
1514- process.stdin.removeAllListeners('keypress');
1515- setRawMode(false);
1516- if (!buf.trim().length) return self.password(str, mask, fn);
1517- fn(buf);
1518- return;
1519- }
1520-
1521- if (key && key.ctrl && 'c' == key.name) {
1522- console.log('%s', buf);
1523- process.exit();
1524- }
1525-
1526- process.stdout.write(mask);
1527- buf += c;
1528- }).resume();
1529-};
1530-
1531-/**
1532- * Confirmation prompt with `str` and callback `fn(bool)`
1533- *
1534- * Examples:
1535- *
1536- * program.confirm('continue? ', function(ok){
1537- * console.log(' got %j', ok);
1538- * process.stdin.destroy();
1539- * });
1540- *
1541- * @param {String} str
1542- * @param {Function} fn
1543- * @api public
1544- */
1545-
1546-
1547-Command.prototype.confirm = function(str, fn, verbose){
1548- var self = this;
1549- this.prompt(str, function(ok){
1550- if (!ok.trim()) {
1551- if (!verbose) str += '(yes or no) ';
1552- return self.confirm(str, fn, true);
1553- }
1554- fn(parseBool(ok));
1555- });
1556-};
1557-
1558-/**
1559- * Choice prompt with `list` of items and callback `fn(index, item)`
1560- *
1561- * Examples:
1562- *
1563- * var list = ['tobi', 'loki', 'jane', 'manny', 'luna'];
1564- *
1565- * console.log('Choose the coolest pet:');
1566- * program.choose(list, function(i){
1567- * console.log('you chose %d "%s"', i, list[i]);
1568- * process.stdin.destroy();
1569- * });
1570- *
1571- * @param {Array} list
1572- * @param {Number|Function} index or fn
1573- * @param {Function} fn
1574- * @api public
1575- */
1576-
1577-Command.prototype.choose = function(list, index, fn){
1578- var self = this
1579- , hasDefault = 'number' == typeof index;
1580-
1581- if (!hasDefault) {
1582- fn = index;
1583- index = null;
1584- }
1585-
1586- list.forEach(function(item, i){
1587- if (hasDefault && i == index) {
1588- console.log('* %d) %s', i + 1, item);
1589- } else {
1590- console.log(' %d) %s', i + 1, item);
1591- }
1592- });
1593-
1594- function again() {
1595- self.prompt(' : ', function(val){
1596- val = parseInt(val, 10) - 1;
1597- if (hasDefault && isNaN(val)) val = index;
1598-
1599- if (null == list[val]) {
1600- again();
1601- } else {
1602- fn(val, list[val]);
1603- }
1604- });
1605- }
1606-
1607- again();
1608-};
1609-
1610-
1611-/**
1612- * Output help information for this command
1613- *
1614- * @api public
1615- */
1616-
1617-Command.prototype.outputHelp = function(){
1618- process.stdout.write(this.helpInformation());
1619- this.emit('--help');
1620-};
1621-
1622-/**
1623- * Output help information and exit.
1624- *
1625- * @api public
1626- */
1627-
1628-Command.prototype.help = function(){
1629- this.outputHelp();
1630- process.exit();
1631-};
1632-
1633-/**
1634- * Camel-case the given `flag`
1635- *
1636- * @param {String} flag
1637- * @return {String}
1638- * @api private
1639- */
1640-
1641-function camelcase(flag) {
1642- return flag.split('-').reduce(function(str, word){
1643- return str + word[0].toUpperCase() + word.slice(1);
1644- });
1645-}
1646-
1647-/**
1648- * Parse a boolean `str`.
1649- *
1650- * @param {String} str
1651- * @return {Boolean}
1652- * @api private
1653- */
1654-
1655-function parseBool(str) {
1656- return /^y|yes|ok|true$/i.test(str);
1657-}
1658-
1659-/**
1660- * Pad `str` to `width`.
1661- *
1662- * @param {String} str
1663- * @param {Number} width
1664- * @return {String}
1665- * @api private
1666- */
1667-
1668-function pad(str, width) {
1669- var len = Math.max(0, width - str.length);
1670- return str + Array(len + 1).join(' ');
1671-}
1672-
1673-/**
1674- * Output help information if necessary
1675- *
1676- * @param {Command} command to output help for
1677- * @param {Array} array of options to search for -h or --help
1678- * @api private
1679- */
1680-
1681-function outputHelpIfNecessary(cmd, options) {
1682- options = options || [];
1683- for (var i = 0; i < options.length; i++) {
1684- if (options[i] == '--help' || options[i] == '-h') {
1685- cmd.outputHelp();
1686- process.exit(0);
1687- }
1688- }
1689-}
1690
1691=== removed directory 'node_modules/cordova/_vendor/commander/1.1.1/node_modules'
1692=== removed symlink 'node_modules/cordova/_vendor/commander/1.1.1/node_modules/keypress'
1693=== target was u'../_vendor/keypress/0.1.0'
1694=== removed file 'node_modules/cordova/_vendor/commander/1.1.1/package.json'
1695--- node_modules/cordova/_vendor/commander/1.1.1/package.json 2013-12-12 20:49:30 +0000
1696+++ node_modules/cordova/_vendor/commander/1.1.1/package.json 1970-01-01 00:00:00 +0000
1697@@ -1,40 +0,0 @@
1698-{
1699- "name": "commander",
1700- "version": "1.1.1",
1701- "description": "the complete solution for node.js command-line programs",
1702- "keywords": [
1703- "command",
1704- "option",
1705- "parser",
1706- "prompt",
1707- "stdin"
1708- ],
1709- "author": {
1710- "name": "TJ Holowaychuk",
1711- "email": "tj@vision-media.ca"
1712- },
1713- "repository": {
1714- "type": "git",
1715- "url": "https://github.com/visionmedia/commander.js.git"
1716- },
1717- "dependencies": {
1718- "keypress": "0.1.x"
1719- },
1720- "devDependencies": {
1721- "should": ">= 0.0.1"
1722- },
1723- "scripts": {
1724- "test": "make test"
1725- },
1726- "main": "index",
1727- "engines": {
1728- "node": ">= 0.6.x"
1729- },
1730- "readme": "# Commander.js\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).\n\n [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js)\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\n Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-p, --peppers', 'Add peppers')\n .option('-P, --pineapple', 'Add pineapple')\n .option('-b, --bbq', 'Add bbq sauce')\n .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza with:');\nif (program.peppers) console.log(' - peppers');\nif (program.pineapple) console.log(' - pineappe');\nif (program.bbq) console.log(' - bbq');\nconsole.log(' - %s cheese', program.cheese);\n```\n\n Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as \"--template-engine\" are camel-cased, becoming `program.templateEngine` etc.\n\n## Automated --help\n\n The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:\n\n``` \n $ ./examples/pizza --help\n\n Usage: pizza [options]\n\n Options:\n\n -V, --version output the version number\n -p, --peppers Add peppers\n -P, --pineapple Add pineappe\n -b, --bbq Add bbq sauce\n -c, --cheese <type> Add the specified type of cheese [marble]\n -h, --help output usage information\n\n```\n\n## Coercion\n\n```js\nfunction range(val) {\n return val.split('..').map(Number);\n}\n\nfunction list(val) {\n return val.split(',');\n}\n\nprogram\n .version('0.0.1')\n .usage('[options] <file ...>')\n .option('-i, --integer <n>', 'An integer argument', parseInt)\n .option('-f, --float <n>', 'A float argument', parseFloat)\n .option('-r, --range <a>..<b>', 'A range', range)\n .option('-l, --list <items>', 'A list', list)\n .option('-o, --optional [value]', 'An optional value')\n .parse(process.argv);\n\nconsole.log(' int: %j', program.integer);\nconsole.log(' float: %j', program.float);\nconsole.log(' optional: %j', program.optional);\nprogram.range = program.range || [];\nconsole.log(' range: %j..%j', program.range[0], program.range[1]);\nconsole.log(' list: %j', program.list);\nconsole.log(' args: %j', program.args);\n```\n\n## Custom help\n\n You can display arbitrary `-h, --help` information\n by listening for \"--help\". Commander will automatically\n exit once you are done so that the remainder of your program\n does not execute causing undesired behaviours, for example\n in the following executable \"stuff\" will not output when\n `--help` is used.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('../');\n\nfunction list(val) {\n return val.split(',').map(Number);\n}\n\nprogram\n .version('0.0.1')\n .option('-f, --foo', 'enable some foo')\n .option('-b, --bar', 'enable some bar')\n .option('-B, --baz', 'enable some baz');\n\n// must be before .parse() since\n// node's emit() is immediate\n\nprogram.on('--help', function(){\n console.log(' Examples:');\n console.log('');\n console.log(' $ custom-help --help');\n console.log(' $ custom-help -h');\n console.log('');\n});\n\nprogram.parse(process.argv);\n\nconsole.log('stuff');\n```\n\nyielding the following help output:\n\n```\n\nUsage: custom-help [options]\n\nOptions:\n\n -h, --help output usage information\n -V, --version output the version number\n -f, --foo enable some foo\n -b, --bar enable some bar\n -B, --baz enable some baz\n\nExamples:\n\n $ custom-help --help\n $ custom-help -h\n\n```\n\n## .prompt(msg, fn)\n\n Single-line prompt:\n\n```js\nprogram.prompt('name: ', function(name){\n console.log('hi %s', name);\n});\n```\n\n Multi-line prompt:\n\n```js\nprogram.prompt('description:', function(name){\n console.log('hi %s', name);\n});\n```\n\n Coercion:\n\n```js\nprogram.prompt('Age: ', Number, function(age){\n console.log('age: %j', age);\n});\n```\n\n```js\nprogram.prompt('Birthdate: ', Date, function(date){\n console.log('date: %s', date);\n});\n```\n\n## .password(msg[, mask], fn)\n\nPrompt for password without echoing:\n\n```js\nprogram.password('Password: ', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\nPrompt for password with mask char \"*\":\n\n```js\nprogram.password('Password: ', '*', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\n## .confirm(msg, fn)\n\n Confirm with the given `msg`:\n\n```js\nprogram.confirm('continue? ', function(ok){\n console.log(' got %j', ok);\n});\n```\n\n## .choose(list, fn)\n\n Let the user choose from a `list`:\n\n```js\nvar list = ['tobi', 'loki', 'jane', 'manny', 'luna'];\n\nconsole.log('Choose the coolest pet:');\nprogram.choose(list, function(i){\n console.log('you chose %d \"%s\"', i, list[i]);\n});\n```\n\n## .outputHelp()\n\n Output help information without exiting.\n\n## .help()\n\n Output help information and exit immediately.\n\n## Links\n\n - [API documentation](http://visionmedia.github.com/commander.js/)\n - [ascii tables](https://github.com/LearnBoost/cli-table)\n - [progress bars](https://github.com/visionmedia/node-progress)\n - [more progress bars](https://github.com/substack/node-multimeter)\n - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk &lt;tj@vision-media.ca&gt;\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
1731- "readmeFilename": "Readme.md",
1732- "bugs": {
1733- "url": "https://github.com/visionmedia/commander.js/issues"
1734- },
1735- "_id": "commander@1.1.1",
1736- "_from": "commander@1.1.x"
1737-}
1738
1739=== removed directory 'node_modules/cordova/_vendor/forever-agent/0.5.0'
1740=== removed file 'node_modules/cordova/_vendor/forever-agent/0.5.0/LICENSE'
1741--- node_modules/cordova/_vendor/forever-agent/0.5.0/LICENSE 2013-12-12 20:49:30 +0000
1742+++ node_modules/cordova/_vendor/forever-agent/0.5.0/LICENSE 1970-01-01 00:00:00 +0000
1743@@ -1,55 +0,0 @@
1744-Apache License
1745-
1746-Version 2.0, January 2004
1747-
1748-http://www.apache.org/licenses/
1749-
1750-TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1751-
1752-1. Definitions.
1753-
1754-"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
1755-
1756-"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
1757-
1758-"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
1759-
1760-"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
1761-
1762-"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
1763-
1764-"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
1765-
1766-"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
1767-
1768-"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
1769-
1770-"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
1771-
1772-"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
1773-
1774-2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
1775-
1776-3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
1777-
1778-4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
1779-
1780-You must give any other recipients of the Work or Derivative Works a copy of this License; and
1781-
1782-You must cause any modified files to carry prominent notices stating that You changed the files; and
1783-
1784-You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
1785-
1786-If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
1787-
1788-5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
1789-
1790-6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
1791-
1792-7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
1793-
1794-8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
1795-
1796-9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
1797-
1798-END OF TERMS AND CONDITIONS
1799\ No newline at end of file
1800
1801=== removed file 'node_modules/cordova/_vendor/forever-agent/0.5.0/README.md'
1802--- node_modules/cordova/_vendor/forever-agent/0.5.0/README.md 2013-12-12 20:49:30 +0000
1803+++ node_modules/cordova/_vendor/forever-agent/0.5.0/README.md 1970-01-01 00:00:00 +0000
1804@@ -1,4 +0,0 @@
1805-forever-agent
1806-=============
1807-
1808-HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.
1809
1810=== removed symlink 'node_modules/cordova/_vendor/forever-agent/0.5.0/_vendor'
1811=== target was u'../..'
1812=== removed file 'node_modules/cordova/_vendor/forever-agent/0.5.0/index.js'
1813--- node_modules/cordova/_vendor/forever-agent/0.5.0/index.js 2013-12-12 20:49:30 +0000
1814+++ node_modules/cordova/_vendor/forever-agent/0.5.0/index.js 1970-01-01 00:00:00 +0000
1815@@ -1,119 +0,0 @@
1816-module.exports = ForeverAgent
1817-ForeverAgent.SSL = ForeverAgentSSL
1818-
1819-var util = require('util')
1820- , Agent = require('http').Agent
1821- , net = require('net')
1822- , tls = require('tls')
1823- , AgentSSL = require('https').Agent
1824-
1825-function ForeverAgent(options) {
1826- var self = this
1827- self.options = options || {}
1828- self.requests = {}
1829- self.sockets = {}
1830- self.freeSockets = {}
1831- self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets
1832- self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets
1833- self.on('free', function(socket, host, port) {
1834- var name = host + ':' + port
1835- if (self.requests[name] && self.requests[name].length) {
1836- self.requests[name].shift().onSocket(socket)
1837- } else if (self.sockets[name].length < self.minSockets) {
1838- if (!self.freeSockets[name]) self.freeSockets[name] = []
1839- self.freeSockets[name].push(socket)
1840-
1841- // if an error happens while we don't use the socket anyway, meh, throw the socket away
1842- function onIdleError() {
1843- socket.destroy()
1844- }
1845- socket._onIdleError = onIdleError
1846- socket.on('error', onIdleError)
1847- } else {
1848- // If there are no pending requests just destroy the
1849- // socket and it will get removed from the pool. This
1850- // gets us out of timeout issues and allows us to
1851- // default to Connection:keep-alive.
1852- socket.destroy()
1853- }
1854- })
1855-
1856-}
1857-util.inherits(ForeverAgent, Agent)
1858-
1859-ForeverAgent.defaultMinSockets = 5
1860-
1861-
1862-ForeverAgent.prototype.createConnection = net.createConnection
1863-ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest
1864-ForeverAgent.prototype.addRequest = function(req, host, port) {
1865- var name = host + ':' + port
1866- if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) {
1867- var idleSocket = this.freeSockets[name].pop()
1868- idleSocket.removeListener('error', idleSocket._onIdleError)
1869- delete idleSocket._onIdleError
1870- req._reusedSocket = true
1871- req.onSocket(idleSocket)
1872- } else {
1873- this.addRequestNoreuse(req, host, port)
1874- }
1875-}
1876-
1877-ForeverAgent.prototype.removeSocket = function(s, name, host, port) {
1878- if (this.sockets[name]) {
1879- var index = this.sockets[name].indexOf(s)
1880- if (index !== -1) {
1881- this.sockets[name].splice(index, 1)
1882- }
1883- } else if (this.sockets[name] && this.sockets[name].length === 0) {
1884- // don't leak
1885- delete this.sockets[name]
1886- delete this.requests[name]
1887- }
1888-
1889- if (this.freeSockets[name]) {
1890- var index = this.freeSockets[name].indexOf(s)
1891- if (index !== -1) {
1892- this.freeSockets[name].splice(index, 1)
1893- if (this.freeSockets[name].length === 0) {
1894- delete this.freeSockets[name]
1895- }
1896- }
1897- }
1898-
1899- if (this.requests[name] && this.requests[name].length) {
1900- // If we have pending requests and a socket gets closed a new one
1901- // needs to be created to take over in the pool for the one that closed.
1902- this.createSocket(name, host, port).emit('free')
1903- }
1904-}
1905-
1906-function ForeverAgentSSL (options) {
1907- ForeverAgent.call(this, options)
1908-}
1909-util.inherits(ForeverAgentSSL, ForeverAgent)
1910-
1911-ForeverAgentSSL.prototype.createConnection = createConnectionSSL
1912-ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest
1913-
1914-function createConnectionSSL (port, host, options) {
1915- if (typeof port === 'object') {
1916- options = port;
1917- } else if (typeof host === 'object') {
1918- options = host;
1919- } else if (typeof options === 'object') {
1920- options = options;
1921- } else {
1922- options = {};
1923- }
1924-
1925- if (typeof port === 'number') {
1926- options.port = port;
1927- }
1928-
1929- if (typeof host === 'string') {
1930- options.host = host;
1931- }
1932-
1933- return tls.connect(options);
1934-}
1935
1936=== removed file 'node_modules/cordova/_vendor/forever-agent/0.5.0/package.json'
1937--- node_modules/cordova/_vendor/forever-agent/0.5.0/package.json 2013-12-12 20:49:30 +0000
1938+++ node_modules/cordova/_vendor/forever-agent/0.5.0/package.json 1970-01-01 00:00:00 +0000
1939@@ -1,27 +0,0 @@
1940-{
1941- "author": {
1942- "name": "Mikeal Rogers",
1943- "email": "mikeal.rogers@gmail.com",
1944- "url": "http://www.futurealoof.com"
1945- },
1946- "name": "forever-agent",
1947- "description": "HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.",
1948- "version": "0.5.0",
1949- "repository": {
1950- "url": "https://github.com/mikeal/forever-agent"
1951- },
1952- "main": "index.js",
1953- "dependencies": {},
1954- "devDependencies": {},
1955- "optionalDependencies": {},
1956- "engines": {
1957- "node": "*"
1958- },
1959- "readme": "forever-agent\n=============\n\nHTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.\n",
1960- "readmeFilename": "README.md",
1961- "bugs": {
1962- "url": "https://github.com/mikeal/forever-agent/issues"
1963- },
1964- "_id": "forever-agent@0.5.0",
1965- "_from": "forever-agent@~0.5.0"
1966-}
1967
1968=== added directory 'node_modules/cordova/_vendor/forever-agent/0.5.2'
1969=== added file 'node_modules/cordova/_vendor/forever-agent/0.5.2/LICENSE'
1970--- node_modules/cordova/_vendor/forever-agent/0.5.2/LICENSE 1970-01-01 00:00:00 +0000
1971+++ node_modules/cordova/_vendor/forever-agent/0.5.2/LICENSE 2014-02-21 20:33:03 +0000
1972@@ -0,0 +1,55 @@
1973+Apache License
1974+
1975+Version 2.0, January 2004
1976+
1977+http://www.apache.org/licenses/
1978+
1979+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1980+
1981+1. Definitions.
1982+
1983+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
1984+
1985+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
1986+
1987+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
1988+
1989+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
1990+
1991+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
1992+
1993+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
1994+
1995+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
1996+
1997+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
1998+
1999+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
2000+
2001+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2002+
2003+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
2004+
2005+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
2006+
2007+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
2008+
2009+You must give any other recipients of the Work or Derivative Works a copy of this License; and
2010+
2011+You must cause any modified files to carry prominent notices stating that You changed the files; and
2012+
2013+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
2014+
2015+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
2016+
2017+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
2018+
2019+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
2020+
2021+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
2022+
2023+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
2024+
2025+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
2026+
2027+END OF TERMS AND CONDITIONS
2028\ No newline at end of file
2029
2030=== added file 'node_modules/cordova/_vendor/forever-agent/0.5.2/README.md'
2031--- node_modules/cordova/_vendor/forever-agent/0.5.2/README.md 1970-01-01 00:00:00 +0000
2032+++ node_modules/cordova/_vendor/forever-agent/0.5.2/README.md 2014-02-21 20:33:03 +0000
2033@@ -0,0 +1,4 @@
2034+forever-agent
2035+=============
2036+
2037+HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.
2038
2039=== added symlink 'node_modules/cordova/_vendor/forever-agent/0.5.2/_vendor'
2040=== target is u'../..'
2041=== added file 'node_modules/cordova/_vendor/forever-agent/0.5.2/index.js'
2042--- node_modules/cordova/_vendor/forever-agent/0.5.2/index.js 1970-01-01 00:00:00 +0000
2043+++ node_modules/cordova/_vendor/forever-agent/0.5.2/index.js 2014-02-21 20:33:03 +0000
2044@@ -0,0 +1,119 @@
2045+module.exports = ForeverAgent
2046+ForeverAgent.SSL = ForeverAgentSSL
2047+
2048+var util = require('util')
2049+ , Agent = require('http').Agent
2050+ , net = require('net')
2051+ , tls = require('tls')
2052+ , AgentSSL = require('https').Agent
2053+
2054+function ForeverAgent(options) {
2055+ var self = this
2056+ self.options = options || {}
2057+ self.requests = {}
2058+ self.sockets = {}
2059+ self.freeSockets = {}
2060+ self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets
2061+ self.minSockets = self.options.minSockets || ForeverAgent.defaultMinSockets
2062+ self.on('free', function(socket, host, port) {
2063+ var name = host + ':' + port
2064+ if (self.requests[name] && self.requests[name].length) {
2065+ self.requests[name].shift().onSocket(socket)
2066+ } else if (self.sockets[name].length < self.minSockets) {
2067+ if (!self.freeSockets[name]) self.freeSockets[name] = []
2068+ self.freeSockets[name].push(socket)
2069+
2070+ // if an error happens while we don't use the socket anyway, meh, throw the socket away
2071+ var onIdleError = function() {
2072+ socket.destroy()
2073+ }
2074+ socket._onIdleError = onIdleError
2075+ socket.on('error', onIdleError)
2076+ } else {
2077+ // If there are no pending requests just destroy the
2078+ // socket and it will get removed from the pool. This
2079+ // gets us out of timeout issues and allows us to
2080+ // default to Connection:keep-alive.
2081+ socket.destroy()
2082+ }
2083+ })
2084+
2085+}
2086+util.inherits(ForeverAgent, Agent)
2087+
2088+ForeverAgent.defaultMinSockets = 5
2089+
2090+
2091+ForeverAgent.prototype.createConnection = net.createConnection
2092+ForeverAgent.prototype.addRequestNoreuse = Agent.prototype.addRequest
2093+ForeverAgent.prototype.addRequest = function(req, host, port) {
2094+ var name = host + ':' + port
2095+ if (this.freeSockets[name] && this.freeSockets[name].length > 0 && !req.useChunkedEncodingByDefault) {
2096+ var idleSocket = this.freeSockets[name].pop()
2097+ idleSocket.removeListener('error', idleSocket._onIdleError)
2098+ delete idleSocket._onIdleError
2099+ req._reusedSocket = true
2100+ req.onSocket(idleSocket)
2101+ } else {
2102+ this.addRequestNoreuse(req, host, port)
2103+ }
2104+}
2105+
2106+ForeverAgent.prototype.removeSocket = function(s, name, host, port) {
2107+ if (this.sockets[name]) {
2108+ var index = this.sockets[name].indexOf(s)
2109+ if (index !== -1) {
2110+ this.sockets[name].splice(index, 1)
2111+ }
2112+ } else if (this.sockets[name] && this.sockets[name].length === 0) {
2113+ // don't leak
2114+ delete this.sockets[name]
2115+ delete this.requests[name]
2116+ }
2117+
2118+ if (this.freeSockets[name]) {
2119+ var index = this.freeSockets[name].indexOf(s)
2120+ if (index !== -1) {
2121+ this.freeSockets[name].splice(index, 1)
2122+ if (this.freeSockets[name].length === 0) {
2123+ delete this.freeSockets[name]
2124+ }
2125+ }
2126+ }
2127+
2128+ if (this.requests[name] && this.requests[name].length) {
2129+ // If we have pending requests and a socket gets closed a new one
2130+ // needs to be created to take over in the pool for the one that closed.
2131+ this.createSocket(name, host, port).emit('free')
2132+ }
2133+}
2134+
2135+function ForeverAgentSSL (options) {
2136+ ForeverAgent.call(this, options)
2137+}
2138+util.inherits(ForeverAgentSSL, ForeverAgent)
2139+
2140+ForeverAgentSSL.prototype.createConnection = createConnectionSSL
2141+ForeverAgentSSL.prototype.addRequestNoreuse = AgentSSL.prototype.addRequest
2142+
2143+function createConnectionSSL (port, host, options) {
2144+ if (typeof port === 'object') {
2145+ options = port;
2146+ } else if (typeof host === 'object') {
2147+ options = host;
2148+ } else if (typeof options === 'object') {
2149+ options = options;
2150+ } else {
2151+ options = {};
2152+ }
2153+
2154+ if (typeof port === 'number') {
2155+ options.port = port;
2156+ }
2157+
2158+ if (typeof host === 'string') {
2159+ options.host = host;
2160+ }
2161+
2162+ return tls.connect(options);
2163+}
2164
2165=== added file 'node_modules/cordova/_vendor/forever-agent/0.5.2/package.json'
2166--- node_modules/cordova/_vendor/forever-agent/0.5.2/package.json 1970-01-01 00:00:00 +0000
2167+++ node_modules/cordova/_vendor/forever-agent/0.5.2/package.json 2014-02-21 20:33:03 +0000
2168@@ -0,0 +1,27 @@
2169+{
2170+ "author": {
2171+ "name": "Mikeal Rogers",
2172+ "email": "mikeal.rogers@gmail.com",
2173+ "url": "http://www.futurealoof.com"
2174+ },
2175+ "name": "forever-agent",
2176+ "description": "HTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.",
2177+ "version": "0.5.2",
2178+ "repository": {
2179+ "url": "https://github.com/mikeal/forever-agent"
2180+ },
2181+ "main": "index.js",
2182+ "dependencies": {},
2183+ "devDependencies": {},
2184+ "optionalDependencies": {},
2185+ "engines": {
2186+ "node": "*"
2187+ },
2188+ "readme": "forever-agent\n=============\n\nHTTP Agent that keeps socket connections alive between keep-alive requests. Formerly part of mikeal/request, now a standalone module.\n",
2189+ "readmeFilename": "README.md",
2190+ "bugs": {
2191+ "url": "https://github.com/mikeal/forever-agent/issues"
2192+ },
2193+ "_id": "forever-agent@0.5.2",
2194+ "_from": "forever-agent@~0.5.0"
2195+}
2196
2197=== modified symlink 'node_modules/cordova/_vendor/fstream/0.1.25/node_modules/graceful-fs'
2198=== target changed u'../_vendor/graceful-fs/2.0.1' => u'../_vendor/graceful-fs/2.0.2'
2199=== removed directory 'node_modules/cordova/_vendor/graceful-fs/2.0.1'
2200=== removed file 'node_modules/cordova/_vendor/graceful-fs/2.0.1/.npmignore'
2201--- node_modules/cordova/_vendor/graceful-fs/2.0.1/.npmignore 2013-12-12 20:49:30 +0000
2202+++ node_modules/cordova/_vendor/graceful-fs/2.0.1/.npmignore 1970-01-01 00:00:00 +0000
2203@@ -1,1 +0,0 @@
2204-node_modules/
2205
2206=== removed file 'node_modules/cordova/_vendor/graceful-fs/2.0.1/LICENSE'
2207--- node_modules/cordova/_vendor/graceful-fs/2.0.1/LICENSE 2013-12-12 20:49:30 +0000
2208+++ node_modules/cordova/_vendor/graceful-fs/2.0.1/LICENSE 1970-01-01 00:00:00 +0000
2209@@ -1,27 +0,0 @@
2210-Copyright (c) Isaac Z. Schlueter ("Author")
2211-All rights reserved.
2212-
2213-The BSD License
2214-
2215-Redistribution and use in source and binary forms, with or without
2216-modification, are permitted provided that the following conditions
2217-are met:
2218-
2219-1. Redistributions of source code must retain the above copyright
2220- notice, this list of conditions and the following disclaimer.
2221-
2222-2. Redistributions in binary form must reproduce the above copyright
2223- notice, this list of conditions and the following disclaimer in the
2224- documentation and/or other materials provided with the distribution.
2225-
2226-THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2227-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2228-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2229-PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
2230-BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2231-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2232-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
2233-BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
2234-WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
2235-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
2236-IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2237
2238=== removed file 'node_modules/cordova/_vendor/graceful-fs/2.0.1/README.md'
2239--- node_modules/cordova/_vendor/graceful-fs/2.0.1/README.md 2013-12-12 20:49:30 +0000
2240+++ node_modules/cordova/_vendor/graceful-fs/2.0.1/README.md 1970-01-01 00:00:00 +0000
2241@@ -1,26 +0,0 @@
2242-# graceful-fs
2243-
2244-graceful-fs functions as a drop-in replacement for the fs module,
2245-making various improvements.
2246-
2247-The improvements are meant to normalize behavior across different
2248-platforms and environments, and to make filesystem access more
2249-resilient to errors.
2250-
2251-## Improvements over fs module
2252-
2253-graceful-fs:
2254-
2255-* Queues up `open` and `readdir` calls, and retries them once
2256- something closes if there is an EMFILE error from too many file
2257- descriptors.
2258-* fixes `lchmod` for Node versions prior to 0.6.2.
2259-* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
2260-* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
2261- `lchown` if the user isn't root.
2262-* makes `lchmod` and `lchown` become noops, if not available.
2263-* retries reading a file if `read` results in EAGAIN error.
2264-
2265-On Windows, it retries renaming a file for up to one second if `EACCESS`
2266-or `EPERM` error occurs, likely because antivirus software has locked
2267-the directory.
2268
2269=== removed symlink 'node_modules/cordova/_vendor/graceful-fs/2.0.1/_vendor'
2270=== target was u'../..'
2271=== removed file 'node_modules/cordova/_vendor/graceful-fs/2.0.1/graceful-fs.js'
2272--- node_modules/cordova/_vendor/graceful-fs/2.0.1/graceful-fs.js 2013-12-12 20:49:30 +0000
2273+++ node_modules/cordova/_vendor/graceful-fs/2.0.1/graceful-fs.js 1970-01-01 00:00:00 +0000
2274@@ -1,159 +0,0 @@
2275-// Monkey-patching the fs module.
2276-// It's ugly, but there is simply no other way to do this.
2277-var fs = module.exports = require('fs')
2278-
2279-var assert = require('assert')
2280-
2281-// fix up some busted stuff, mostly on windows and old nodes
2282-require('./polyfills.js')
2283-
2284-// The EMFILE enqueuing stuff
2285-
2286-var util = require('util')
2287-
2288-function noop () {}
2289-
2290-var debug = noop
2291-var util = require('util')
2292-if (util.debuglog)
2293- debug = util.debuglog('gfs')
2294-else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || ''))
2295- debug = function() {
2296- var m = util.format.apply(util, arguments)
2297- m = 'GFS: ' + m.split(/\n/).join('\nGFS: ')
2298- console.error(m)
2299- }
2300-
2301-if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) {
2302- process.on('exit', function() {
2303- debug('fds', fds)
2304- debug(queue)
2305- assert.equal(queue.length, 0)
2306- })
2307-}
2308-
2309-
2310-var originalOpen = fs.open
2311-fs.open = open
2312-
2313-function open(path, flags, mode, cb) {
2314- if (typeof mode === "function") cb = mode, mode = null
2315- if (typeof cb !== "function") cb = noop
2316- new OpenReq(path, flags, mode, cb)
2317-}
2318-
2319-function OpenReq(path, flags, mode, cb) {
2320- this.path = path
2321- this.flags = flags
2322- this.mode = mode
2323- this.cb = cb
2324- Req.call(this)
2325-}
2326-
2327-util.inherits(OpenReq, Req)
2328-
2329-OpenReq.prototype.process = function() {
2330- originalOpen.call(fs, this.path, this.flags, this.mode, this.done)
2331-}
2332-
2333-var fds = {}
2334-OpenReq.prototype.done = function(er, fd) {
2335- debug('open done', er, fd)
2336- if (fd)
2337- fds['fd' + fd] = this.path
2338- Req.prototype.done.call(this, er, fd)
2339-}
2340-
2341-
2342-var originalReaddir = fs.readdir
2343-fs.readdir = readdir
2344-
2345-function readdir(path, cb) {
2346- if (typeof cb !== "function") cb = noop
2347- new ReaddirReq(path, cb)
2348-}
2349-
2350-function ReaddirReq(path, cb) {
2351- this.path = path
2352- this.cb = cb
2353- Req.call(this)
2354-}
2355-
2356-util.inherits(ReaddirReq, Req)
2357-
2358-ReaddirReq.prototype.process = function() {
2359- originalReaddir.call(fs, this.path, this.done)
2360-}
2361-
2362-ReaddirReq.prototype.done = function(er, files) {
2363- Req.prototype.done.call(this, er, files)
2364- onclose()
2365-}
2366-
2367-
2368-var originalClose = fs.close
2369-fs.close = close
2370-
2371-function close (fd, cb) {
2372- debug('close', fd)
2373- if (typeof cb !== "function") cb = noop
2374- delete fds['fd' + fd]
2375- originalClose.call(fs, fd, function(er) {
2376- onclose()
2377- cb(er)
2378- })
2379-}
2380-
2381-
2382-var originalCloseSync = fs.closeSync
2383-fs.closeSync = closeSync
2384-
2385-function closeSync (fd) {
2386- try {
2387- return originalCloseSync(fd)
2388- } finally {
2389- onclose()
2390- }
2391-}
2392-
2393-
2394-// Req class
2395-function Req () {
2396- // start processing
2397- this.done = this.done.bind(this)
2398- this.failures = 0
2399- this.process()
2400-}
2401-
2402-Req.prototype.done = function (er, result) {
2403- var tryAgain = false
2404- if (er) {
2405- var code = er.code
2406- var tryAgain = code === "EMFILE"
2407- if (process.platform === "win32")
2408- tryAgain = tryAgain || code === "OK"
2409- }
2410-
2411- if (tryAgain) {
2412- this.failures ++
2413- enqueue(this)
2414- } else {
2415- var cb = this.cb
2416- cb(er, result)
2417- }
2418-}
2419-
2420-var queue = []
2421-
2422-function enqueue(req) {
2423- queue.push(req)
2424- debug('enqueue %d %s', queue.length, req.constructor.name, req)
2425-}
2426-
2427-function onclose() {
2428- var req = queue.shift()
2429- if (req) {
2430- debug('process', req.constructor.name, req)
2431- req.process()
2432- }
2433-}
2434
2435=== removed file 'node_modules/cordova/_vendor/graceful-fs/2.0.1/package.json'
2436--- node_modules/cordova/_vendor/graceful-fs/2.0.1/package.json 2013-12-12 20:49:30 +0000
2437+++ node_modules/cordova/_vendor/graceful-fs/2.0.1/package.json 1970-01-01 00:00:00 +0000
2438@@ -1,48 +0,0 @@
2439-{
2440- "author": {
2441- "name": "Isaac Z. Schlueter",
2442- "email": "i@izs.me",
2443- "url": "http://blog.izs.me"
2444- },
2445- "name": "graceful-fs",
2446- "description": "A drop-in replacement for fs, making various improvements.",
2447- "version": "2.0.1",
2448- "repository": {
2449- "type": "git",
2450- "url": "git://github.com/isaacs/node-graceful-fs.git"
2451- },
2452- "main": "graceful-fs.js",
2453- "engines": {
2454- "node": ">=0.4.0"
2455- },
2456- "directories": {
2457- "test": "test"
2458- },
2459- "scripts": {
2460- "test": "tap test/*.js"
2461- },
2462- "keywords": [
2463- "fs",
2464- "module",
2465- "reading",
2466- "retry",
2467- "retries",
2468- "queue",
2469- "error",
2470- "errors",
2471- "handling",
2472- "EMFILE",
2473- "EAGAIN",
2474- "EINVAL",
2475- "EPERM",
2476- "EACCESS"
2477- ],
2478- "license": "BSD",
2479- "readme": "# graceful-fs\n\ngraceful-fs functions as a drop-in replacement for the fs module,\nmaking various improvements.\n\nThe improvements are meant to normalize behavior across different\nplatforms and environments, and to make filesystem access more\nresilient to errors.\n\n## Improvements over fs module\n\ngraceful-fs:\n\n* Queues up `open` and `readdir` calls, and retries them once\n something closes if there is an EMFILE error from too many file\n descriptors.\n* fixes `lchmod` for Node versions prior to 0.6.2.\n* implements `fs.lutimes` if possible. Otherwise it becomes a noop.\n* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or\n `lchown` if the user isn't root.\n* makes `lchmod` and `lchown` become noops, if not available.\n* retries reading a file if `read` results in EAGAIN error.\n\nOn Windows, it retries renaming a file for up to one second if `EACCESS`\nor `EPERM` error occurs, likely because antivirus software has locked\nthe directory.\n",
2480- "readmeFilename": "README.md",
2481- "bugs": {
2482- "url": "https://github.com/isaacs/node-graceful-fs/issues"
2483- },
2484- "_id": "graceful-fs@2.0.1",
2485- "_from": "graceful-fs@~2.0.0"
2486-}
2487
2488=== removed file 'node_modules/cordova/_vendor/graceful-fs/2.0.1/polyfills.js'
2489--- node_modules/cordova/_vendor/graceful-fs/2.0.1/polyfills.js 2013-12-12 20:49:30 +0000
2490+++ node_modules/cordova/_vendor/graceful-fs/2.0.1/polyfills.js 1970-01-01 00:00:00 +0000
2491@@ -1,228 +0,0 @@
2492-var fs = require('fs')
2493-var constants = require('constants')
2494-
2495-var origCwd = process.cwd
2496-var cwd = null
2497-process.cwd = function() {
2498- if (!cwd)
2499- cwd = origCwd.call(process)
2500- return cwd
2501-}
2502-var chdir = process.chdir
2503-process.chdir = function(d) {
2504- cwd = null
2505- chdir.call(process, d)
2506-}
2507-
2508-// (re-)implement some things that are known busted or missing.
2509-
2510-// lchmod, broken prior to 0.6.2
2511-// back-port the fix here.
2512-if (constants.hasOwnProperty('O_SYMLINK') &&
2513- process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
2514- fs.lchmod = function (path, mode, callback) {
2515- callback = callback || noop
2516- fs.open( path
2517- , constants.O_WRONLY | constants.O_SYMLINK
2518- , mode
2519- , function (err, fd) {
2520- if (err) {
2521- callback(err)
2522- return
2523- }
2524- // prefer to return the chmod error, if one occurs,
2525- // but still try to close, and report closing errors if they occur.
2526- fs.fchmod(fd, mode, function (err) {
2527- fs.close(fd, function(err2) {
2528- callback(err || err2)
2529- })
2530- })
2531- })
2532- }
2533-
2534- fs.lchmodSync = function (path, mode) {
2535- var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
2536-
2537- // prefer to return the chmod error, if one occurs,
2538- // but still try to close, and report closing errors if they occur.
2539- var err, err2
2540- try {
2541- var ret = fs.fchmodSync(fd, mode)
2542- } catch (er) {
2543- err = er
2544- }
2545- try {
2546- fs.closeSync(fd)
2547- } catch (er) {
2548- err2 = er
2549- }
2550- if (err || err2) throw (err || err2)
2551- return ret
2552- }
2553-}
2554-
2555-
2556-// lutimes implementation, or no-op
2557-if (!fs.lutimes) {
2558- if (constants.hasOwnProperty("O_SYMLINK")) {
2559- fs.lutimes = function (path, at, mt, cb) {
2560- fs.open(path, constants.O_SYMLINK, function (er, fd) {
2561- cb = cb || noop
2562- if (er) return cb(er)
2563- fs.futimes(fd, at, mt, function (er) {
2564- fs.close(fd, function (er2) {
2565- return cb(er || er2)
2566- })
2567- })
2568- })
2569- }
2570-
2571- fs.lutimesSync = function (path, at, mt) {
2572- var fd = fs.openSync(path, constants.O_SYMLINK)
2573- , err
2574- , err2
2575- , ret
2576-
2577- try {
2578- var ret = fs.futimesSync(fd, at, mt)
2579- } catch (er) {
2580- err = er
2581- }
2582- try {
2583- fs.closeSync(fd)
2584- } catch (er) {
2585- err2 = er
2586- }
2587- if (err || err2) throw (err || err2)
2588- return ret
2589- }
2590-
2591- } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
2592- // maybe utimensat will be bound soonish?
2593- fs.lutimes = function (path, at, mt, cb) {
2594- fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
2595- }
2596-
2597- fs.lutimesSync = function (path, at, mt) {
2598- return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
2599- }
2600-
2601- } else {
2602- fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
2603- fs.lutimesSync = function () {}
2604- }
2605-}
2606-
2607-
2608-// https://github.com/isaacs/node-graceful-fs/issues/4
2609-// Chown should not fail on einval or eperm if non-root.
2610-
2611-fs.chown = chownFix(fs.chown)
2612-fs.fchown = chownFix(fs.fchown)
2613-fs.lchown = chownFix(fs.lchown)
2614-
2615-fs.chownSync = chownFixSync(fs.chownSync)
2616-fs.fchownSync = chownFixSync(fs.fchownSync)
2617-fs.lchownSync = chownFixSync(fs.lchownSync)
2618-
2619-function chownFix (orig) {
2620- if (!orig) return orig
2621- return function (target, uid, gid, cb) {
2622- return orig.call(fs, target, uid, gid, function (er, res) {
2623- if (chownErOk(er)) er = null
2624- cb(er, res)
2625- })
2626- }
2627-}
2628-
2629-function chownFixSync (orig) {
2630- if (!orig) return orig
2631- return function (target, uid, gid) {
2632- try {
2633- return orig.call(fs, target, uid, gid)
2634- } catch (er) {
2635- if (!chownErOk(er)) throw er
2636- }
2637- }
2638-}
2639-
2640-function chownErOk (er) {
2641- // if there's no getuid, or if getuid() is something other than 0,
2642- // and the error is EINVAL or EPERM, then just ignore it.
2643- // This specific case is a silent failure in cp, install, tar,
2644- // and most other unix tools that manage permissions.
2645- // When running as root, or if other types of errors are encountered,
2646- // then it's strict.
2647- if (!er || (!process.getuid || process.getuid() !== 0)
2648- && (er.code === "EINVAL" || er.code === "EPERM")) return true
2649-}
2650-
2651-
2652-// if lchmod/lchown do not exist, then make them no-ops
2653-if (!fs.lchmod) {
2654- fs.lchmod = function (path, mode, cb) {
2655- process.nextTick(cb)
2656- }
2657- fs.lchmodSync = function () {}
2658-}
2659-if (!fs.lchown) {
2660- fs.lchown = function (path, uid, gid, cb) {
2661- process.nextTick(cb)
2662- }
2663- fs.lchownSync = function () {}
2664-}
2665-
2666-
2667-
2668-// on Windows, A/V software can lock the directory, causing this
2669-// to fail with an EACCES or EPERM if the directory contains newly
2670-// created files. Try again on failure, for up to 1 second.
2671-if (process.platform === "win32") {
2672- var rename_ = fs.rename
2673- fs.rename = function rename (from, to, cb) {
2674- var start = Date.now()
2675- rename_(from, to, function CB (er) {
2676- if (er
2677- && (er.code === "EACCES" || er.code === "EPERM")
2678- && Date.now() - start < 1000) {
2679- return rename_(from, to, CB)
2680- }
2681- cb(er)
2682- })
2683- }
2684-}
2685-
2686-
2687-// if read() returns EAGAIN, then just try it again.
2688-var read = fs.read
2689-fs.read = function (fd, buffer, offset, length, position, callback_) {
2690- var callback
2691- if (callback_ && typeof callback_ === 'function') {
2692- var eagCounter = 0
2693- callback = function (er, _, __) {
2694- if (er && er.code === 'EAGAIN' && eagCounter < 10) {
2695- eagCounter ++
2696- return read.call(fs, fd, buffer, offset, length, position, callback)
2697- }
2698- callback_.apply(this, arguments)
2699- }
2700- }
2701- return read.call(fs, fd, buffer, offset, length, position, callback)
2702-}
2703-
2704-var readSync = fs.readSync
2705-fs.readSync = function (fd, buffer, offset, length, position) {
2706- var eagCounter = 0
2707- while (true) {
2708- try {
2709- return readSync.call(fs, fd, buffer, offset, length, position)
2710- } catch (er) {
2711- if (er.code === 'EAGAIN' && eagCounter < 10) {
2712- eagCounter ++
2713- continue
2714- }
2715- throw er
2716- }
2717- }
2718-}
2719-
2720
2721=== removed directory 'node_modules/cordova/_vendor/graceful-fs/2.0.1/test'
2722=== removed file 'node_modules/cordova/_vendor/graceful-fs/2.0.1/test/open.js'
2723--- node_modules/cordova/_vendor/graceful-fs/2.0.1/test/open.js 2013-12-12 20:49:30 +0000
2724+++ node_modules/cordova/_vendor/graceful-fs/2.0.1/test/open.js 1970-01-01 00:00:00 +0000
2725@@ -1,39 +0,0 @@
2726-var test = require('tap').test
2727-var fs = require('../graceful-fs.js')
2728-
2729-test('graceful fs is monkeypatched fs', function (t) {
2730- t.equal(fs, require('fs'))
2731- t.end()
2732-})
2733-
2734-test('open an existing file works', function (t) {
2735- var fd = fs.openSync(__filename, 'r')
2736- fs.closeSync(fd)
2737- fs.open(__filename, 'r', function (er, fd) {
2738- if (er) throw er
2739- fs.close(fd, function (er) {
2740- if (er) throw er
2741- t.pass('works')
2742- t.end()
2743- })
2744- })
2745-})
2746-
2747-test('open a non-existing file throws', function (t) {
2748- var er
2749- try {
2750- var fd = fs.openSync('this file does not exist', 'r')
2751- } catch (x) {
2752- er = x
2753- }
2754- t.ok(er, 'should throw')
2755- t.notOk(fd, 'should not get an fd')
2756- t.equal(er.code, 'ENOENT')
2757-
2758- fs.open('neither does this file', 'r', function (er, fd) {
2759- t.ok(er, 'should throw')
2760- t.notOk(fd, 'should not get an fd')
2761- t.equal(er.code, 'ENOENT')
2762- t.end()
2763- })
2764-})
2765
2766=== added directory 'node_modules/cordova/_vendor/graceful-fs/2.0.2'
2767=== added file 'node_modules/cordova/_vendor/graceful-fs/2.0.2/.npmignore'
2768--- node_modules/cordova/_vendor/graceful-fs/2.0.2/.npmignore 1970-01-01 00:00:00 +0000
2769+++ node_modules/cordova/_vendor/graceful-fs/2.0.2/.npmignore 2014-02-21 20:33:03 +0000
2770@@ -0,0 +1,1 @@
2771+node_modules/
2772
2773=== added file 'node_modules/cordova/_vendor/graceful-fs/2.0.2/LICENSE'
2774--- node_modules/cordova/_vendor/graceful-fs/2.0.2/LICENSE 1970-01-01 00:00:00 +0000
2775+++ node_modules/cordova/_vendor/graceful-fs/2.0.2/LICENSE 2014-02-21 20:33:03 +0000
2776@@ -0,0 +1,27 @@
2777+Copyright (c) Isaac Z. Schlueter ("Author")
2778+All rights reserved.
2779+
2780+The BSD License
2781+
2782+Redistribution and use in source and binary forms, with or without
2783+modification, are permitted provided that the following conditions
2784+are met:
2785+
2786+1. Redistributions of source code must retain the above copyright
2787+ notice, this list of conditions and the following disclaimer.
2788+
2789+2. Redistributions in binary form must reproduce the above copyright
2790+ notice, this list of conditions and the following disclaimer in the
2791+ documentation and/or other materials provided with the distribution.
2792+
2793+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
2794+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2795+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
2796+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
2797+BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2798+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2799+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
2800+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
2801+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
2802+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
2803+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2804
2805=== added file 'node_modules/cordova/_vendor/graceful-fs/2.0.2/README.md'
2806--- node_modules/cordova/_vendor/graceful-fs/2.0.2/README.md 1970-01-01 00:00:00 +0000
2807+++ node_modules/cordova/_vendor/graceful-fs/2.0.2/README.md 2014-02-21 20:33:03 +0000
2808@@ -0,0 +1,26 @@
2809+# graceful-fs
2810+
2811+graceful-fs functions as a drop-in replacement for the fs module,
2812+making various improvements.
2813+
2814+The improvements are meant to normalize behavior across different
2815+platforms and environments, and to make filesystem access more
2816+resilient to errors.
2817+
2818+## Improvements over fs module
2819+
2820+graceful-fs:
2821+
2822+* Queues up `open` and `readdir` calls, and retries them once
2823+ something closes if there is an EMFILE error from too many file
2824+ descriptors.
2825+* fixes `lchmod` for Node versions prior to 0.6.2.
2826+* implements `fs.lutimes` if possible. Otherwise it becomes a noop.
2827+* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or
2828+ `lchown` if the user isn't root.
2829+* makes `lchmod` and `lchown` become noops, if not available.
2830+* retries reading a file if `read` results in EAGAIN error.
2831+
2832+On Windows, it retries renaming a file for up to one second if `EACCESS`
2833+or `EPERM` error occurs, likely because antivirus software has locked
2834+the directory.
2835
2836=== added symlink 'node_modules/cordova/_vendor/graceful-fs/2.0.2/_vendor'
2837=== target is u'../..'
2838=== added file 'node_modules/cordova/_vendor/graceful-fs/2.0.2/graceful-fs.js'
2839--- node_modules/cordova/_vendor/graceful-fs/2.0.2/graceful-fs.js 1970-01-01 00:00:00 +0000
2840+++ node_modules/cordova/_vendor/graceful-fs/2.0.2/graceful-fs.js 2014-02-21 20:33:03 +0000
2841@@ -0,0 +1,161 @@
2842+// Monkey-patching the fs module.
2843+// It's ugly, but there is simply no other way to do this.
2844+var fs = module.exports = require('fs')
2845+
2846+var assert = require('assert')
2847+
2848+// fix up some busted stuff, mostly on windows and old nodes
2849+require('./polyfills.js')
2850+
2851+// The EMFILE enqueuing stuff
2852+
2853+var util = require('util')
2854+
2855+function noop () {}
2856+
2857+var debug = noop
2858+var util = require('util')
2859+if (util.debuglog)
2860+ debug = util.debuglog('gfs')
2861+else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || ''))
2862+ debug = function() {
2863+ var m = util.format.apply(util, arguments)
2864+ m = 'GFS: ' + m.split(/\n/).join('\nGFS: ')
2865+ console.error(m)
2866+ }
2867+
2868+if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) {
2869+ process.on('exit', function() {
2870+ debug('fds', fds)
2871+ debug(queue)
2872+ assert.equal(queue.length, 0)
2873+ })
2874+}
2875+
2876+
2877+var originalOpen = fs.open
2878+fs.open = open
2879+
2880+function open(path, flags, mode, cb) {
2881+ if (typeof mode === "function") cb = mode, mode = null
2882+ if (typeof cb !== "function") cb = noop
2883+ new OpenReq(path, flags, mode, cb)
2884+}
2885+
2886+function OpenReq(path, flags, mode, cb) {
2887+ this.path = path
2888+ this.flags = flags
2889+ this.mode = mode
2890+ this.cb = cb
2891+ Req.call(this)
2892+}
2893+
2894+util.inherits(OpenReq, Req)
2895+
2896+OpenReq.prototype.process = function() {
2897+ originalOpen.call(fs, this.path, this.flags, this.mode, this.done)
2898+}
2899+
2900+var fds = {}
2901+OpenReq.prototype.done = function(er, fd) {
2902+ debug('open done', er, fd)
2903+ if (fd)
2904+ fds['fd' + fd] = this.path
2905+ Req.prototype.done.call(this, er, fd)
2906+}
2907+
2908+
2909+var originalReaddir = fs.readdir
2910+fs.readdir = readdir
2911+
2912+function readdir(path, cb) {
2913+ if (typeof cb !== "function") cb = noop
2914+ new ReaddirReq(path, cb)
2915+}
2916+
2917+function ReaddirReq(path, cb) {
2918+ this.path = path
2919+ this.cb = cb
2920+ Req.call(this)
2921+}
2922+
2923+util.inherits(ReaddirReq, Req)
2924+
2925+ReaddirReq.prototype.process = function() {
2926+ originalReaddir.call(fs, this.path, this.done)
2927+}
2928+
2929+ReaddirReq.prototype.done = function(er, files) {
2930+ if (files && files.sort)
2931+ files = files.sort()
2932+ Req.prototype.done.call(this, er, files)
2933+ onclose()
2934+}
2935+
2936+
2937+var originalClose = fs.close
2938+fs.close = close
2939+
2940+function close (fd, cb) {
2941+ debug('close', fd)
2942+ if (typeof cb !== "function") cb = noop
2943+ delete fds['fd' + fd]
2944+ originalClose.call(fs, fd, function(er) {
2945+ onclose()
2946+ cb(er)
2947+ })
2948+}
2949+
2950+
2951+var originalCloseSync = fs.closeSync
2952+fs.closeSync = closeSync
2953+
2954+function closeSync (fd) {
2955+ try {
2956+ return originalCloseSync(fd)
2957+ } finally {
2958+ onclose()
2959+ }
2960+}
2961+
2962+
2963+// Req class
2964+function Req () {
2965+ // start processing
2966+ this.done = this.done.bind(this)
2967+ this.failures = 0
2968+ this.process()
2969+}
2970+
2971+Req.prototype.done = function (er, result) {
2972+ var tryAgain = false
2973+ if (er) {
2974+ var code = er.code
2975+ var tryAgain = code === "EMFILE"
2976+ if (process.platform === "win32")
2977+ tryAgain = tryAgain || code === "OK"
2978+ }
2979+
2980+ if (tryAgain) {
2981+ this.failures ++
2982+ enqueue(this)
2983+ } else {
2984+ var cb = this.cb
2985+ cb(er, result)
2986+ }
2987+}
2988+
2989+var queue = []
2990+
2991+function enqueue(req) {
2992+ queue.push(req)
2993+ debug('enqueue %d %s', queue.length, req.constructor.name, req)
2994+}
2995+
2996+function onclose() {
2997+ var req = queue.shift()
2998+ if (req) {
2999+ debug('process', req.constructor.name, req)
3000+ req.process()
3001+ }
3002+}
3003
3004=== added file 'node_modules/cordova/_vendor/graceful-fs/2.0.2/package.json'
3005--- node_modules/cordova/_vendor/graceful-fs/2.0.2/package.json 1970-01-01 00:00:00 +0000
3006+++ node_modules/cordova/_vendor/graceful-fs/2.0.2/package.json 2014-02-21 20:33:03 +0000
3007@@ -0,0 +1,48 @@
3008+{
3009+ "author": {
3010+ "name": "Isaac Z. Schlueter",
3011+ "email": "i@izs.me",
3012+ "url": "http://blog.izs.me"
3013+ },
3014+ "name": "graceful-fs",
3015+ "description": "A drop-in replacement for fs, making various improvements.",
3016+ "version": "2.0.2",
3017+ "repository": {
3018+ "type": "git",
3019+ "url": "git://github.com/isaacs/node-graceful-fs.git"
3020+ },
3021+ "main": "graceful-fs.js",
3022+ "engines": {
3023+ "node": ">=0.4.0"
3024+ },
3025+ "directories": {
3026+ "test": "test"
3027+ },
3028+ "scripts": {
3029+ "test": "tap test/*.js"
3030+ },
3031+ "keywords": [
3032+ "fs",
3033+ "module",
3034+ "reading",
3035+ "retry",
3036+ "retries",
3037+ "queue",
3038+ "error",
3039+ "errors",
3040+ "handling",
3041+ "EMFILE",
3042+ "EAGAIN",
3043+ "EINVAL",
3044+ "EPERM",
3045+ "EACCESS"
3046+ ],
3047+ "license": "BSD",
3048+ "readme": "# graceful-fs\n\ngraceful-fs functions as a drop-in replacement for the fs module,\nmaking various improvements.\n\nThe improvements are meant to normalize behavior across different\nplatforms and environments, and to make filesystem access more\nresilient to errors.\n\n## Improvements over fs module\n\ngraceful-fs:\n\n* Queues up `open` and `readdir` calls, and retries them once\n something closes if there is an EMFILE error from too many file\n descriptors.\n* fixes `lchmod` for Node versions prior to 0.6.2.\n* implements `fs.lutimes` if possible. Otherwise it becomes a noop.\n* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or\n `lchown` if the user isn't root.\n* makes `lchmod` and `lchown` become noops, if not available.\n* retries reading a file if `read` results in EAGAIN error.\n\nOn Windows, it retries renaming a file for up to one second if `EACCESS`\nor `EPERM` error occurs, likely because antivirus software has locked\nthe directory.\n",
3049+ "readmeFilename": "README.md",
3050+ "bugs": {
3051+ "url": "https://github.com/isaacs/node-graceful-fs/issues"
3052+ },
3053+ "_id": "graceful-fs@2.0.2",
3054+ "_from": "graceful-fs@~2.0.0"
3055+}
3056
3057=== added file 'node_modules/cordova/_vendor/graceful-fs/2.0.2/polyfills.js'
3058--- node_modules/cordova/_vendor/graceful-fs/2.0.2/polyfills.js 1970-01-01 00:00:00 +0000
3059+++ node_modules/cordova/_vendor/graceful-fs/2.0.2/polyfills.js 2014-02-21 20:33:03 +0000
3060@@ -0,0 +1,228 @@
3061+var fs = require('fs')
3062+var constants = require('constants')
3063+
3064+var origCwd = process.cwd
3065+var cwd = null
3066+process.cwd = function() {
3067+ if (!cwd)
3068+ cwd = origCwd.call(process)
3069+ return cwd
3070+}
3071+var chdir = process.chdir
3072+process.chdir = function(d) {
3073+ cwd = null
3074+ chdir.call(process, d)
3075+}
3076+
3077+// (re-)implement some things that are known busted or missing.
3078+
3079+// lchmod, broken prior to 0.6.2
3080+// back-port the fix here.
3081+if (constants.hasOwnProperty('O_SYMLINK') &&
3082+ process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
3083+ fs.lchmod = function (path, mode, callback) {
3084+ callback = callback || noop
3085+ fs.open( path
3086+ , constants.O_WRONLY | constants.O_SYMLINK
3087+ , mode
3088+ , function (err, fd) {
3089+ if (err) {
3090+ callback(err)
3091+ return
3092+ }
3093+ // prefer to return the chmod error, if one occurs,
3094+ // but still try to close, and report closing errors if they occur.
3095+ fs.fchmod(fd, mode, function (err) {
3096+ fs.close(fd, function(err2) {
3097+ callback(err || err2)
3098+ })
3099+ })
3100+ })
3101+ }
3102+
3103+ fs.lchmodSync = function (path, mode) {
3104+ var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode)
3105+
3106+ // prefer to return the chmod error, if one occurs,
3107+ // but still try to close, and report closing errors if they occur.
3108+ var err, err2
3109+ try {
3110+ var ret = fs.fchmodSync(fd, mode)
3111+ } catch (er) {
3112+ err = er
3113+ }
3114+ try {
3115+ fs.closeSync(fd)
3116+ } catch (er) {
3117+ err2 = er
3118+ }
3119+ if (err || err2) throw (err || err2)
3120+ return ret
3121+ }
3122+}
3123+
3124+
3125+// lutimes implementation, or no-op
3126+if (!fs.lutimes) {
3127+ if (constants.hasOwnProperty("O_SYMLINK")) {
3128+ fs.lutimes = function (path, at, mt, cb) {
3129+ fs.open(path, constants.O_SYMLINK, function (er, fd) {
3130+ cb = cb || noop
3131+ if (er) return cb(er)
3132+ fs.futimes(fd, at, mt, function (er) {
3133+ fs.close(fd, function (er2) {
3134+ return cb(er || er2)
3135+ })
3136+ })
3137+ })
3138+ }
3139+
3140+ fs.lutimesSync = function (path, at, mt) {
3141+ var fd = fs.openSync(path, constants.O_SYMLINK)
3142+ , err
3143+ , err2
3144+ , ret
3145+
3146+ try {
3147+ var ret = fs.futimesSync(fd, at, mt)
3148+ } catch (er) {
3149+ err = er
3150+ }
3151+ try {
3152+ fs.closeSync(fd)
3153+ } catch (er) {
3154+ err2 = er
3155+ }
3156+ if (err || err2) throw (err || err2)
3157+ return ret
3158+ }
3159+
3160+ } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) {
3161+ // maybe utimensat will be bound soonish?
3162+ fs.lutimes = function (path, at, mt, cb) {
3163+ fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb)
3164+ }
3165+
3166+ fs.lutimesSync = function (path, at, mt) {
3167+ return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW)
3168+ }
3169+
3170+ } else {
3171+ fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) }
3172+ fs.lutimesSync = function () {}
3173+ }
3174+}
3175+
3176+
3177+// https://github.com/isaacs/node-graceful-fs/issues/4
3178+// Chown should not fail on einval or eperm if non-root.
3179+
3180+fs.chown = chownFix(fs.chown)
3181+fs.fchown = chownFix(fs.fchown)
3182+fs.lchown = chownFix(fs.lchown)
3183+
3184+fs.chownSync = chownFixSync(fs.chownSync)
3185+fs.fchownSync = chownFixSync(fs.fchownSync)
3186+fs.lchownSync = chownFixSync(fs.lchownSync)
3187+
3188+function chownFix (orig) {
3189+ if (!orig) return orig
3190+ return function (target, uid, gid, cb) {
3191+ return orig.call(fs, target, uid, gid, function (er, res) {
3192+ if (chownErOk(er)) er = null
3193+ cb(er, res)
3194+ })
3195+ }
3196+}
3197+
3198+function chownFixSync (orig) {
3199+ if (!orig) return orig
3200+ return function (target, uid, gid) {
3201+ try {
3202+ return orig.call(fs, target, uid, gid)
3203+ } catch (er) {
3204+ if (!chownErOk(er)) throw er
3205+ }
3206+ }
3207+}
3208+
3209+function chownErOk (er) {
3210+ // if there's no getuid, or if getuid() is something other than 0,
3211+ // and the error is EINVAL or EPERM, then just ignore it.
3212+ // This specific case is a silent failure in cp, install, tar,
3213+ // and most other unix tools that manage permissions.
3214+ // When running as root, or if other types of errors are encountered,
3215+ // then it's strict.
3216+ if (!er || (!process.getuid || process.getuid() !== 0)
3217+ && (er.code === "EINVAL" || er.code === "EPERM")) return true
3218+}
3219+
3220+
3221+// if lchmod/lchown do not exist, then make them no-ops
3222+if (!fs.lchmod) {
3223+ fs.lchmod = function (path, mode, cb) {
3224+ process.nextTick(cb)
3225+ }
3226+ fs.lchmodSync = function () {}
3227+}
3228+if (!fs.lchown) {
3229+ fs.lchown = function (path, uid, gid, cb) {
3230+ process.nextTick(cb)
3231+ }
3232+ fs.lchownSync = function () {}
3233+}
3234+
3235+
3236+
3237+// on Windows, A/V software can lock the directory, causing this
3238+// to fail with an EACCES or EPERM if the directory contains newly
3239+// created files. Try again on failure, for up to 1 second.
3240+if (process.platform === "win32") {
3241+ var rename_ = fs.rename
3242+ fs.rename = function rename (from, to, cb) {
3243+ var start = Date.now()
3244+ rename_(from, to, function CB (er) {
3245+ if (er
3246+ && (er.code === "EACCES" || er.code === "EPERM")
3247+ && Date.now() - start < 1000) {
3248+ return rename_(from, to, CB)
3249+ }
3250+ cb(er)
3251+ })
3252+ }
3253+}
3254+
3255+
3256+// if read() returns EAGAIN, then just try it again.
3257+var read = fs.read
3258+fs.read = function (fd, buffer, offset, length, position, callback_) {
3259+ var callback
3260+ if (callback_ && typeof callback_ === 'function') {
3261+ var eagCounter = 0
3262+ callback = function (er, _, __) {
3263+ if (er && er.code === 'EAGAIN' && eagCounter < 10) {
3264+ eagCounter ++
3265+ return read.call(fs, fd, buffer, offset, length, position, callback)
3266+ }
3267+ callback_.apply(this, arguments)
3268+ }
3269+ }
3270+ return read.call(fs, fd, buffer, offset, length, position, callback)
3271+}
3272+
3273+var readSync = fs.readSync
3274+fs.readSync = function (fd, buffer, offset, length, position) {
3275+ var eagCounter = 0
3276+ while (true) {
3277+ try {
3278+ return readSync.call(fs, fd, buffer, offset, length, position)
3279+ } catch (er) {
3280+ if (er.code === 'EAGAIN' && eagCounter < 10) {
3281+ eagCounter ++
3282+ continue
3283+ }
3284+ throw er
3285+ }
3286+ }
3287+}
3288+
3289
3290=== added directory 'node_modules/cordova/_vendor/graceful-fs/2.0.2/test'
3291=== added file 'node_modules/cordova/_vendor/graceful-fs/2.0.2/test/open.js'
3292--- node_modules/cordova/_vendor/graceful-fs/2.0.2/test/open.js 1970-01-01 00:00:00 +0000
3293+++ node_modules/cordova/_vendor/graceful-fs/2.0.2/test/open.js 2014-02-21 20:33:03 +0000
3294@@ -0,0 +1,39 @@
3295+var test = require('tap').test
3296+var fs = require('../graceful-fs.js')
3297+
3298+test('graceful fs is monkeypatched fs', function (t) {
3299+ t.equal(fs, require('fs'))
3300+ t.end()
3301+})
3302+
3303+test('open an existing file works', function (t) {
3304+ var fd = fs.openSync(__filename, 'r')
3305+ fs.closeSync(fd)
3306+ fs.open(__filename, 'r', function (er, fd) {
3307+ if (er) throw er
3308+ fs.close(fd, function (er) {
3309+ if (er) throw er
3310+ t.pass('works')
3311+ t.end()
3312+ })
3313+ })
3314+})
3315+
3316+test('open a non-existing file throws', function (t) {
3317+ var er
3318+ try {
3319+ var fd = fs.openSync('this file does not exist', 'r')
3320+ } catch (x) {
3321+ er = x
3322+ }
3323+ t.ok(er, 'should throw')
3324+ t.notOk(fd, 'should not get an fd')
3325+ t.equal(er.code, 'ENOENT')
3326+
3327+ fs.open('neither does this file', 'r', function (er, fd) {
3328+ t.ok(er, 'should throw')
3329+ t.notOk(fd, 'should not get an fd')
3330+ t.equal(er.code, 'ENOENT')
3331+ t.end()
3332+ })
3333+})
3334
3335=== added file 'node_modules/cordova/_vendor/graceful-fs/2.0.2/test/readdir-sort.js'
3336--- node_modules/cordova/_vendor/graceful-fs/2.0.2/test/readdir-sort.js 1970-01-01 00:00:00 +0000
3337+++ node_modules/cordova/_vendor/graceful-fs/2.0.2/test/readdir-sort.js 2014-02-21 20:33:03 +0000
3338@@ -0,0 +1,21 @@
3339+var test = require("tap").test
3340+var fs = require("fs")
3341+
3342+var readdir = fs.readdir
3343+fs.readdir = function(path, cb) {
3344+ process.nextTick(function() {
3345+ cb(null, ["b", "z", "a"])
3346+ })
3347+}
3348+
3349+var g = require("../")
3350+
3351+test("readdir reorder", function (t) {
3352+ g.readdir("whatevers", function (er, files) {
3353+ if (er)
3354+ throw er
3355+ console.error(files)
3356+ t.same(files, [ "a", "b", "z" ])
3357+ t.end()
3358+ })
3359+})
3360
3361=== added directory 'node_modules/cordova/_vendor/http-signature/0.10.0'
3362=== added file 'node_modules/cordova/_vendor/http-signature/0.10.0/.dir-locals.el'
3363--- node_modules/cordova/_vendor/http-signature/0.10.0/.dir-locals.el 1970-01-01 00:00:00 +0000
3364+++ node_modules/cordova/_vendor/http-signature/0.10.0/.dir-locals.el 2014-02-21 20:33:03 +0000
3365@@ -0,0 +1,6 @@
3366+((nil . ((indent-tabs-mode . nil)
3367+ (tab-width . 8)
3368+ (fill-column . 80)))
3369+ (js-mode . ((js-indent-level . 2)
3370+ (indent-tabs-mode . nil)
3371+ )))
3372\ No newline at end of file
3373
3374=== added file 'node_modules/cordova/_vendor/http-signature/0.10.0/.npmignore'
3375--- node_modules/cordova/_vendor/http-signature/0.10.0/.npmignore 1970-01-01 00:00:00 +0000
3376+++ node_modules/cordova/_vendor/http-signature/0.10.0/.npmignore 2014-02-21 20:33:03 +0000
3377@@ -0,0 +1,7 @@
3378+.gitmodules
3379+deps
3380+docs
3381+Makefile
3382+node_modules
3383+test
3384+tools
3385\ No newline at end of file
3386
3387=== added file 'node_modules/cordova/_vendor/http-signature/0.10.0/LICENSE'
3388--- node_modules/cordova/_vendor/http-signature/0.10.0/LICENSE 1970-01-01 00:00:00 +0000
3389+++ node_modules/cordova/_vendor/http-signature/0.10.0/LICENSE 2014-02-21 20:33:03 +0000
3390@@ -0,0 +1,18 @@
3391+Copyright Joyent, Inc. All rights reserved.
3392+Permission is hereby granted, free of charge, to any person obtaining a copy
3393+of this software and associated documentation files (the "Software"), to
3394+deal in the Software without restriction, including without limitation the
3395+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
3396+sell copies of the Software, and to permit persons to whom the Software is
3397+furnished to do so, subject to the following conditions:
3398+
3399+The above copyright notice and this permission notice shall be included in
3400+all copies or substantial portions of the Software.
3401+
3402+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
3403+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
3404+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
3405+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
3406+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
3407+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
3408+IN THE SOFTWARE.
3409
3410=== added file 'node_modules/cordova/_vendor/http-signature/0.10.0/README.md'
3411--- node_modules/cordova/_vendor/http-signature/0.10.0/README.md 1970-01-01 00:00:00 +0000
3412+++ node_modules/cordova/_vendor/http-signature/0.10.0/README.md 2014-02-21 20:33:03 +0000
3413@@ -0,0 +1,75 @@
3414+# node-http-signature
3415+
3416+node-http-signature is a node.js library that has client and server components
3417+for Joyent's [HTTP Signature Scheme](http_signing.md).
3418+
3419+## Usage
3420+
3421+Note the example below signs a request with the same key/cert used to start an
3422+HTTP server. This is almost certainly not what you actaully want, but is just
3423+used to illustrate the API calls; you will need to provide your own key
3424+management in addition to this library.
3425+
3426+### Client
3427+
3428+ var fs = require('fs');
3429+ var https = require('https');
3430+ var httpSignature = require('http-signature');
3431+
3432+ var key = fs.readFileSync('./key.pem', 'ascii');
3433+
3434+ var options = {
3435+ host: 'localhost',
3436+ port: 8443,
3437+ path: '/',
3438+ method: 'GET',
3439+ headers: {}
3440+ };
3441+
3442+ // Adds a 'Date' header in, signs it, and adds the
3443+ // 'Authorization' header in.
3444+ var req = https.request(options, function(res) {
3445+ console.log(res.statusCode);
3446+ });
3447+
3448+
3449+ httpSignature.sign(req, {
3450+ key: key,
3451+ keyId: './cert.pem'
3452+ });
3453+
3454+ req.end();
3455+
3456+### Server
3457+
3458+ var fs = require('fs');
3459+ var https = require('https');
3460+ var httpSignature = require('http-signature');
3461+
3462+ var options = {
3463+ key: fs.readFileSync('./key.pem'),
3464+ cert: fs.readFileSync('./cert.pem')
3465+ };
3466+
3467+ https.createServer(options, function (req, res) {
3468+ var rc = 200;
3469+ var parsed = httpSignature.parseRequest(req);
3470+ var pub = fs.readFileSync(parsed.keyId, 'ascii');
3471+ if (!httpSignature.verifySignature(parsed, pub))
3472+ rc = 401;
3473+
3474+ res.writeHead(rc);
3475+ res.end();
3476+ }).listen(8443);
3477+
3478+## Installation
3479+
3480+ npm install http-signature
3481+
3482+## License
3483+
3484+MIT.
3485+
3486+## Bugs
3487+
3488+See <https://github.com/joyent/node-http-signature/issues>.
3489
3490=== added symlink 'node_modules/cordova/_vendor/http-signature/0.10.0/_vendor'
3491=== target is u'../..'
3492=== added file 'node_modules/cordova/_vendor/http-signature/0.10.0/http_signing.md'
3493--- node_modules/cordova/_vendor/http-signature/0.10.0/http_signing.md 1970-01-01 00:00:00 +0000
3494+++ node_modules/cordova/_vendor/http-signature/0.10.0/http_signing.md 2014-02-21 20:33:03 +0000
3495@@ -0,0 +1,296 @@
3496+# Abstract
3497+
3498+This document describes a way to add origin authentication, message integrity,
3499+and replay resistance to HTTP REST requests. It is intended to be used over
3500+the HTTPS protocol.
3501+
3502+# Copyright Notice
3503+
3504+Copyright (c) 2011 Joyent, Inc. and the persons identified as document authors.
3505+All rights reserved.
3506+
3507+Code Components extracted from this document must include MIT License text.
3508+
3509+# Introduction
3510+
3511+This protocol is intended to provide a standard way for clients to sign HTTP
3512+requests. RFC2617 (HTTP Authentication) defines Basic and Digest authentication
3513+mechanisms, and RFC5246 (TLS 1.2) defines client-auth, both of which are widely
3514+employed on the Internet today. However, it is common place that the burdens of
3515+PKI prevent web service operators from deploying that methodoloy, and so many
3516+fall back to Basic authentication, which has poor security characteristics.
3517+
3518+Additionally, OAuth provides a fully-specified alternative for authorization
3519+of web service requests, but is not (always) ideal for machine to machine
3520+communication, as the key acquisition steps (generally) imply a fixed
3521+infrastructure that may not make sense to a service provider (e.g., symmetric
3522+keys).
3523+
3524+Several web service providers have invented their own schemes for signing
3525+HTTP requests, but to date, none have been placed in the public domain as a
3526+standard. This document serves that purpose. There are no techniques in this
3527+proposal that are novel beyond previous art, however, this aims to be a simple
3528+mechanism for signing these requests.
3529+
3530+# Signature Authentication Scheme
3531+
3532+The "signature" authentication scheme is based on the model that the client must
3533+authenticate itself with a digital signature produced by either a private
3534+asymmetric key (e.g., RSA) or a shared symmetric key (e.g., HMAC). The scheme
3535+is parameterized enough such that it is not bound to any particular key type or
3536+signing algorithm. However, it does explicitly assume that clients can send an
3537+HTTP `Date` header.
3538+
3539+## Authorization Header
3540+
3541+The client is expected to send an Authorization header (as defined in RFC 2617)
3542+with the following parameterization:
3543+
3544+ credentials := "Signature" params
3545+ params := 1#(keyId | algorithm | [headers] | [ext] | signature)
3546+ digitalSignature := plain-string
3547+
3548+ keyId := "keyId" "=" <"> plain-string <">
3549+ algorithm := "algorithm" "=" <"> plain-string <">
3550+ headers := "headers" "=" <"> 1#headers-value <">
3551+ ext := "ext" "=" <"> plain-string <">
3552+ signature := "signature" "=" <"> plain-string <">
3553+
3554+ headers-value := plain-string
3555+ plain-string = 1*( %x20-21 / %x23-5B / %x5D-7E )
3556+
3557+### Signature Parameters
3558+
3559+#### keyId
3560+
3561+REQUIRED. The `keyId` field is an opaque string that the server can use to look
3562+up the component they need to validate the signature. It could be an SSH key
3563+fingerprint, an LDAP DN, etc. Management of keys and assignment of `keyId` is
3564+out of scope for this document.
3565+
3566+#### algorithm
3567+
3568+REQUIRED. The `algorithm` parameter is used if the client and server agree on a
3569+non-standard digital signature algorithm. The full list of supported signature
3570+mechanisms is listed below.
3571+
3572+#### headers
3573+
3574+OPTIONAL. The `headers` parameter is used to specify the list of HTTP headers
3575+used to sign the request. If specified, it should be a quoted list of HTTP
3576+header names, separated by a single space character. By default, only one
3577+HTTP header is signed, which is the `Date` header. Note that the list MUST be
3578+specified in the order the values are concatenated together during signing. To
3579+include the HTTP request line in the signature calculation, use the special
3580+`request-line` value. While this is overloading the definition of `headers` in
3581+HTTP linguism, the request-line is defined in RFC 2616, and as the outlier from
3582+headers in useful signature calculation, it is deemed simpler to simply use
3583+`request-line` than to add a separate parameter for it.
3584+
3585+#### extensions
3586+
3587+OPTIONAL. The `extensions` parameter is used to include additional information
3588+which is covered by the request. The content and format of the string is out of
3589+scope for this document, and expected to be specified by implementors.
3590+
3591+#### signature
3592+
3593+REQUIRED. The `signature` parameter is a `Base64` encoded digital signature
3594+generated by the client. The client uses the `algorithm` and `headers` request
3595+parameters to form a canonicalized `signing string`. This `signing string` is
3596+then signed with the key associated with `keyId` and the algorithm
3597+corresponding to `algorithm`. The `signature` parameter is then set to the
3598+`Base64` encoding of the signature.
3599+
3600+### Signing String Composition
3601+
3602+In order to generate the string that is signed with a key, the client MUST take
3603+the values of each HTTP header specified by `headers` in the order they appear.
3604+
3605+1. If the header name is not `request-line` then append the lowercased header
3606+ name followed with an ASCII colon `:` and an ASCII space ` `.
3607+2. If the header name is `request-line` then appened the HTTP request line,
3608+ otherwise append the header value.
3609+3. If value is not the last value then append an ASCII newline `\n`. The string
3610+ MUST NOT include a trailing ASCII newline.
3611+
3612+# Example Requests
3613+
3614+All requests refer to the following request (body ommitted):
3615+
3616+ POST /foo HTTP/1.1
3617+ Host: example.org
3618+ Date: Tue, 07 Jun 2011 20:51:35 GMT
3619+ Content-Type: application/json
3620+ Content-MD5: h0auK8hnYJKmHTLhKtMTkQ==
3621+ Content-Length: 123
3622+
3623+The "rsa-key-1" keyId refers to a private key known to the client and a public
3624+key known to the server. The "hmac-key-1" keyId refers to key known to the
3625+client and server.
3626+
3627+## Default parameterization
3628+
3629+The authorization header and signature would be generated as:
3630+
3631+ Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",signature="Base64(RSA-SHA256(signing string))"
3632+
3633+The client would compose the signing string as:
3634+
3635+ date: Tue, 07 Jun 2011 20:51:35 GMT
3636+
3637+## Header List
3638+
3639+The authorization header and signature would be generated as:
3640+
3641+ Authorization: Signature keyId="rsa-key-1",algorithm="rsa-sha256",headers="request-line date content-type content-md5",signature="Base64(RSA-SHA256(signing string))"
3642+
3643+The client would compose the signing string as (`+ "\n"` inserted for
3644+readability):
3645+
3646+ POST /foo HTTP/1.1 + "\n"
3647+ date: Tue, 07 Jun 2011 20:51:35 GMT + "\n"
3648+ content-type: application/json + "\n"
3649+ content-md5: h0auK8hnYJKmHTLhKtMTkQ==
3650+
3651+## Algorithm
3652+
3653+The authorization header and signature would be generated as:
3654+
3655+ Authorization: Signature keyId="hmac-key-1",algorithm="hmac-sha1",signature="Base64(HMAC-SHA1(signing string))"
3656+
3657+The client would compose the signing string as:
3658+
3659+ date: Tue, 07 Jun 2011 20:51:35 GMT
3660+
3661+# Signing Algorithms
3662+
3663+Currently supported algorithm names are:
3664+
3665+* rsa-sha1
3666+* rsa-sha256
3667+* rsa-sha512
3668+* dsa-sha1
3669+* hmac-sha1
3670+* hmac-sha256
3671+* hmac-sha512
3672+
3673+# Security Considerations
3674+
3675+## Default Parameters
3676+
3677+Note the default parameterization of the `Signature` scheme is only safe if all
3678+requests are carried over a secure transport (i.e., TLS). Sending the default
3679+scheme over a non-secure transport will leave the request vulnerable to
3680+spoofing, tampering, replay/repudiaton, and integrity violations (if using the
3681+STRIDE threat-modeling methodology).
3682+
3683+## Insecure Transports
3684+
3685+If sending the request over plain HTTP, service providers SHOULD require clients
3686+to sign ALL HTTP headers, and the `request-line`. Additionally, service
3687+providers SHOULD require `Content-MD5` calculations to be performed to ensure
3688+against any tampering from clients.
3689+
3690+## Nonces
3691+
3692+Nonces are out of scope for this document simply because many service providers
3693+fail to implement them correctly, or do not adopt security specfiications
3694+because of the infrastructure complexity. Given the `header` parameterization,
3695+a service provider is fully enabled to add nonce semantics into this scheme by
3696+using something like an `x-request-nonce` header, and ensuring it is signed
3697+with the `Date` header.
3698+
3699+## Clock Skew
3700+
3701+As the default scheme is to sign the `Date` header, service providers SHOULD
3702+protect against logged replay attacks by enforcing a clock skew. The server
3703+SHOULD be synchronized with NTP, and the recommendation in this specification
3704+is to allow 300s of clock skew (in either direction).
3705+
3706+## Required Headers to Sign
3707+
3708+It is out of scope for this document to dictate what headers a service provider
3709+will want to enforce, but service providers SHOULD at minimum include the
3710+`Date` header.
3711+
3712+# References
3713+
3714+## Normative References
3715+
3716+* [RFC2616] Hypertext Transfer Protocol -- HTTP/1.1
3717+* [RFC2617] HTTP Authentication: Basic and Digest Access Authentication
3718+* [RFC5246] The Transport Layer Security (TLS) Protocol Version 1.2
3719+
3720+## Informative References
3721+
3722+ Name: Mark Cavage (editor)
3723+ Company: Joyent, Inc.
3724+ Email: mark.cavage@joyent.com
3725+ URI: http://www.joyent.com
3726+
3727+# Appendix A - Test Values
3728+
3729+The following test data uses the RSA (2048b) keys, which we will refer
3730+to as `keyId=Test` in the following samples:
3731+
3732+ -----BEGIN PUBLIC KEY-----
3733+ MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCFENGw33yGihy92pDjZQhl0C3
3734+ 6rPJj+CvfSC8+q28hxA161QFNUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6
3735+ Z4UMR7EOcpfdUE9Hf3m/hs+FUR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJw
3736+ oYi+1hqp1fIekaxsyQIDAQAB
3737+ -----END PUBLIC KEY-----
3738+
3739+ -----BEGIN RSA PRIVATE KEY-----
3740+ MIICXgIBAAKBgQDCFENGw33yGihy92pDjZQhl0C36rPJj+CvfSC8+q28hxA161QF
3741+ NUd13wuCTUcq0Qd2qsBe/2hFyc2DCJJg0h1L78+6Z4UMR7EOcpfdUE9Hf3m/hs+F
3742+ UR45uBJeDK1HSFHD8bHKD6kv8FPGfJTotc+2xjJwoYi+1hqp1fIekaxsyQIDAQAB
3743+ AoGBAJR8ZkCUvx5kzv+utdl7T5MnordT1TvoXXJGXK7ZZ+UuvMNUCdN2QPc4sBiA
3744+ QWvLw1cSKt5DsKZ8UETpYPy8pPYnnDEz2dDYiaew9+xEpubyeW2oH4Zx71wqBtOK
3745+ kqwrXa/pzdpiucRRjk6vE6YY7EBBs/g7uanVpGibOVAEsqH1AkEA7DkjVH28WDUg
3746+ f1nqvfn2Kj6CT7nIcE3jGJsZZ7zlZmBmHFDONMLUrXR/Zm3pR5m0tCmBqa5RK95u
3747+ 412jt1dPIwJBANJT3v8pnkth48bQo/fKel6uEYyboRtA5/uHuHkZ6FQF7OUkGogc
3748+ mSJluOdc5t6hI1VsLn0QZEjQZMEOWr+wKSMCQQCC4kXJEsHAve77oP6HtG/IiEn7
3749+ kpyUXRNvFsDE0czpJJBvL/aRFUJxuRK91jhjC68sA7NsKMGg5OXb5I5Jj36xAkEA
3750+ gIT7aFOYBFwGgQAQkWNKLvySgKbAZRTeLBacpHMuQdl1DfdntvAyqpAZ0lY0RKmW
3751+ G6aFKaqQfOXKCyWoUiVknQJAXrlgySFci/2ueKlIE1QqIiLSZ8V8OlpFLRnb1pzI
3752+ 7U1yQXnTAEFYM560yJlzUpOb1V4cScGd365tiSMvxLOvTA==
3753+ -----END RSA PRIVATE KEY-----
3754+
3755+And all examples use this request:
3756+
3757+ POST /foo?param=value&pet=dog HTTP/1.1
3758+ Host: example.com
3759+ Date: Thu, 05 Jan 2012 21:31:40 GMT
3760+ Content-Type: application/json
3761+ Content-MD5: Sd/dVLAcvNLSq16eXua5uQ==
3762+ Content-Length: 18
3763+
3764+ {"hello": "world"}
3765+
3766+### Default
3767+
3768+The string to sign would be:
3769+
3770+ date: Thu, 05 Jan 2012 21:31:40 GMT
3771+
3772+The Authorization header would be:
3773+
3774+ Authorization: Signature keyId="Test",algorithm="rsa-sha256",signature="JldXnt8W9t643M2Sce10gqCh/+E7QIYLiI+bSjnFBGCti7s+mPPvOjVb72sbd1FjeOUwPTDpKbrQQORrm+xBYfAwCxF3LBSSzORvyJ5nRFCFxfJ3nlQD6Kdxhw8wrVZX5nSem4A/W3C8qH5uhFTRwF4ruRjh+ENHWuovPgO/HGQ="
3775+
3776+### All Headers
3777+
3778+Parameterized to include all headers, the string to sign would be (`+ "\n"`
3779+inserted for readability):
3780+
3781+ POST /foo?param=value&pet=dog HTTP/1.1 + "\n"
3782+ host: example.com + "\n"
3783+ date: Thu, 05 Jan 2012 21:31:40 GMT + "\n"
3784+ content-type: application/json + "\n"
3785+ content-md5: Sd/dVLAcvNLSq16eXua5uQ== + "\n"
3786+ content-length: 18
3787+
3788+The Authorization header would be:
3789+
3790+ Authorization: Signature keyId="Test",algorithm="rsa-sha256",headers="request-line host date content-type content-md5 content-length",signature="Gm7W/r+e90REDpWytALMrft4MqZxCmslOTOvwJX17ViEBA5E65QqvWI0vIH3l/vSsGiaMVmuUgzYsJLYMLcm5dGrv1+a+0fCoUdVKPZWHyImQEqpLkopVwqEH67LVECFBqFTAKlQgBn676zrfXQbb+b/VebAsNUtvQMe6cTjnDY="
3791+
3792
3793=== added directory 'node_modules/cordova/_vendor/http-signature/0.10.0/lib'
3794=== added file 'node_modules/cordova/_vendor/http-signature/0.10.0/lib/index.js'
3795--- node_modules/cordova/_vendor/http-signature/0.10.0/lib/index.js 1970-01-01 00:00:00 +0000
3796+++ node_modules/cordova/_vendor/http-signature/0.10.0/lib/index.js 2014-02-21 20:33:03 +0000
3797@@ -0,0 +1,25 @@
3798+// Copyright 2011 Joyent, Inc. All rights reserved.
3799+
3800+var parser = require('./parser');
3801+var signer = require('./signer');
3802+var verify = require('./verify');
3803+var util = require('./util');
3804+
3805+
3806+
3807+///--- API
3808+
3809+module.exports = {
3810+
3811+ parse: parser.parseRequest,
3812+ parseRequest: parser.parseRequest,
3813+
3814+ sign: signer.signRequest,
3815+ signRequest: signer.signRequest,
3816+
3817+ sshKeyToPEM: util.sshKeyToPEM,
3818+ sshKeyFingerprint: util.fingerprint,
3819+
3820+ verify: verify.verifySignature,
3821+ verifySignature: verify.verifySignature
3822+};
3823
3824=== added file 'node_modules/cordova/_vendor/http-signature/0.10.0/lib/parser.js'
3825--- node_modules/cordova/_vendor/http-signature/0.10.0/lib/parser.js 1970-01-01 00:00:00 +0000
3826+++ node_modules/cordova/_vendor/http-signature/0.10.0/lib/parser.js 2014-02-21 20:33:03 +0000
3827@@ -0,0 +1,304 @@
3828+// Copyright 2012 Joyent, Inc. All rights reserved.
3829+
3830+var assert = require('assert-plus');
3831+var util = require('util');
3832+
3833+
3834+
3835+///--- Globals
3836+
3837+var Algorithms = {
3838+ 'rsa-sha1': true,
3839+ 'rsa-sha256': true,
3840+ 'rsa-sha512': true,
3841+ 'dsa-sha1': true,
3842+ 'hmac-sha1': true,
3843+ 'hmac-sha256': true,
3844+ 'hmac-sha512': true
3845+};
3846+
3847+var State = {
3848+ New: 0,
3849+ Params: 1
3850+};
3851+
3852+var ParamsState = {
3853+ Name: 0,
3854+ Quote: 1,
3855+ Value: 2,
3856+ Comma: 3
3857+};
3858+
3859+
3860+
3861+///--- Specific Errors
3862+
3863+function HttpSignatureError(message, caller) {
3864+ if (Error.captureStackTrace)
3865+ Error.captureStackTrace(this, caller || HttpSignatureError);
3866+
3867+ this.message = message;
3868+ this.name = caller.name;
3869+}
3870+util.inherits(HttpSignatureError, Error);
3871+
3872+function ExpiredRequestError(message) {
3873+ HttpSignatureError.call(this, message, ExpiredRequestError);
3874+}
3875+util.inherits(ExpiredRequestError, HttpSignatureError);
3876+
3877+
3878+function InvalidHeaderError(message) {
3879+ HttpSignatureError.call(this, message, InvalidHeaderError);
3880+}
3881+util.inherits(InvalidHeaderError, HttpSignatureError);
3882+
3883+
3884+function InvalidParamsError(message) {
3885+ HttpSignatureError.call(this, message, InvalidParamsError);
3886+}
3887+util.inherits(InvalidParamsError, HttpSignatureError);
3888+
3889+
3890+function MissingHeaderError(message) {
3891+ HttpSignatureError.call(this, message, MissingHeaderError);
3892+}
3893+util.inherits(MissingHeaderError, HttpSignatureError);
3894+
3895+
3896+
3897+///--- Exported API
3898+
3899+module.exports = {
3900+
3901+ /**
3902+ * Parses the 'Authorization' header out of an http.ServerRequest object.
3903+ *
3904+ * Note that this API will fully validate the Authorization header, and throw
3905+ * on any error. It will not however check the signature, or the keyId format
3906+ * as those are specific to your environment. You can use the options object
3907+ * to pass in extra constraints.
3908+ *
3909+ * As a response object you can expect this:
3910+ *
3911+ * {
3912+ * "scheme": "Signature",
3913+ * "params": {
3914+ * "keyId": "foo",
3915+ * "algorithm": "rsa-sha256",
3916+ * "headers": [
3917+ * "date" or "x-date",
3918+ * "content-md5"
3919+ * ],
3920+ * "signature": "base64"
3921+ * },
3922+ * "signingString": "ready to be passed to crypto.verify()"
3923+ * }
3924+ *
3925+ * @param {Object} request an http.ServerRequest.
3926+ * @param {Object} options an optional options object with:
3927+ * - clockSkew: allowed clock skew in seconds (default 300).
3928+ * - headers: required header names (def: date or x-date)
3929+ * - algorithms: algorithms to support (default: all).
3930+ * @return {Object} parsed out object (see above).
3931+ * @throws {TypeError} on invalid input.
3932+ * @throws {InvalidHeaderError} on an invalid Authorization header error.
3933+ * @throws {InvalidParamsError} if the params in the scheme are invalid.
3934+ * @throws {MissingHeaderError} if the params indicate a header not present,
3935+ * either in the request headers from the params,
3936+ * or not in the params from a required header
3937+ * in options.
3938+ * @throws {ExpiredRequestError} if the value of date or x-date exceeds skew.
3939+ */
3940+ parseRequest: function parseRequest(request, options) {
3941+ assert.object(request, 'request');
3942+ assert.object(request.headers, 'request.headers');
3943+ if (options === undefined) {
3944+ options = {};
3945+ }
3946+ if (options.headers === undefined) {
3947+ options.headers = [request.headers['x-date'] ? 'x-date' : 'date'];
3948+ }
3949+ assert.object(options, 'options');
3950+ assert.arrayOfString(options.headers, 'options.headers');
3951+ assert.optionalNumber(options.clockSkew, 'options.clockSkew');
3952+
3953+ if (!request.headers.authorization)
3954+ throw new MissingHeaderError('no authorization header present in ' +
3955+ 'the request');
3956+
3957+ options.clockSkew = options.clockSkew || 300;
3958+
3959+
3960+ var i = 0;
3961+ var state = State.New;
3962+ var substate = ParamsState.Name;
3963+ var tmpName = '';
3964+ var tmpValue = '';
3965+
3966+ var parsed = {
3967+ scheme: '',
3968+ params: {},
3969+ signingString: '',
3970+
3971+ get algorithm() {
3972+ return this.params.algorithm.toUpperCase();
3973+ },
3974+
3975+ get keyId() {
3976+ return this.params.keyId;
3977+ }
3978+
3979+ };
3980+
3981+ var authz = request.headers.authorization;
3982+ for (i = 0; i < authz.length; i++) {
3983+ var c = authz.charAt(i);
3984+
3985+ switch (Number(state)) {
3986+
3987+ case State.New:
3988+ if (c !== ' ') parsed.scheme += c;
3989+ else state = State.Params;
3990+ break;
3991+
3992+ case State.Params:
3993+ switch (Number(substate)) {
3994+
3995+ case ParamsState.Name:
3996+ var code = c.charCodeAt(0);
3997+ // restricted name of A-Z / a-z
3998+ if ((code >= 0x41 && code <= 0x5a) || // A-Z
3999+ (code >= 0x61 && code <= 0x7a)) { // a-z
4000+ tmpName += c;
4001+ } else if (c === '=') {
4002+ if (tmpName.length === 0)
4003+ throw new InvalidHeaderError('bad param format');
4004+ substate = ParamsState.Quote;
4005+ } else {
4006+ throw new InvalidHeaderError('bad param format');
4007+ }
4008+ break;
4009+
4010+ case ParamsState.Quote:
4011+ if (c === '"') {
4012+ tmpValue = '';
4013+ substate = ParamsState.Value;
4014+ } else {
4015+ throw new InvalidHeaderError('bad param format');
4016+ }
4017+ break;
4018+
4019+ case ParamsState.Value:
4020+ if (c === '"') {
4021+ parsed.params[tmpName] = tmpValue;
4022+ substate = ParamsState.Comma;
4023+ } else {
4024+ tmpValue += c;
4025+ }
4026+ break;
4027+
4028+ case ParamsState.Comma:
4029+ if (c === ',') {
4030+ tmpName = '';
4031+ substate = ParamsState.Name;
4032+ } else {
4033+ throw new InvalidHeaderError('bad param format');
4034+ }
4035+ break;
4036+
4037+ default:
4038+ throw new Error('Invalid substate');
4039+ }
4040+ break;
4041+
4042+ default:
4043+ throw new Error('Invalid substate');
4044+ }
4045+
4046+ }
4047+
4048+ if (!parsed.params.headers || parsed.params.headers === '') {
4049+ if (request.headers['x-date']) {
4050+ parsed.params.headers = ['x-date'];
4051+ } else {
4052+ parsed.params.headers = ['date'];
4053+ }
4054+ } else {
4055+ parsed.params.headers = parsed.params.headers.split(' ');
4056+ }
4057+
4058+ // Minimally validate the parsed object
4059+ if (!parsed.scheme || parsed.scheme !== 'Signature')
4060+ throw new InvalidHeaderError('scheme was not "Signature"');
4061+
4062+ if (!parsed.params.keyId)
4063+ throw new InvalidHeaderError('keyId was not specified');
4064+
4065+ if (!parsed.params.algorithm)
4066+ throw new InvalidHeaderError('algorithm was not specified');
4067+
4068+ if (!parsed.params.signature)
4069+ throw new InvalidHeaderError('signature was not specified');
4070+
4071+ // Check the algorithm against the official list
4072+ parsed.params.algorithm = parsed.params.algorithm.toLowerCase();
4073+ if (!Algorithms[parsed.params.algorithm])
4074+ throw new InvalidParamsError(parsed.params.algorithm +
4075+ ' is not supported');
4076+
4077+ // Build the signingString
4078+ for (i = 0; i < parsed.params.headers.length; i++) {
4079+ var h = parsed.params.headers[i].toLowerCase();
4080+ parsed.params.headers[i] = h;
4081+
4082+ if (h !== 'request-line') {
4083+ var value = request.headers[h];
4084+ if (!value)
4085+ throw new MissingHeaderError(h + ' was not in the request');
4086+ parsed.signingString += h + ': ' + value;
4087+ } else {
4088+ parsed.signingString +=
4089+ request.method + ' ' + request.url + ' HTTP/' + request.httpVersion;
4090+ }
4091+
4092+ if ((i + 1) < parsed.params.headers.length)
4093+ parsed.signingString += '\n';
4094+ }
4095+
4096+ // Check against the constraints
4097+ var date;
4098+ if (request.headers.date || request.headers['x-date']) {
4099+ if (request.headers['x-date']) {
4100+ date = new Date(request.headers['x-date']);
4101+ } else {
4102+ date = new Date(request.headers.date);
4103+ }
4104+ var now = new Date();
4105+ var skew = Math.abs(now.getTime() - date.getTime());
4106+
4107+ if (skew > options.clockSkew * 1000) {
4108+ throw new ExpiredRequestError('clock skew of ' +
4109+ (skew / 1000) +
4110+ 's was greater than ' +
4111+ options.clockSkew + 's');
4112+ }
4113+ }
4114+
4115+ options.headers.forEach(function (hdr) {
4116+ // Remember that we already checked any headers in the params
4117+ // were in the request, so if this passes we're good.
4118+ if (parsed.params.headers.indexOf(hdr) < 0)
4119+ throw new MissingHeaderError(hdr + ' was not a signed header');
4120+ });
4121+
4122+ if (options.algorithms) {
4123+ if (options.algorithms.indexOf(parsed.params.algorithm) === -1)
4124+ throw new InvalidParamsError(parsed.params.algorithm +
4125+ ' is not a supported algorithm');
4126+ }
4127+
4128+ return parsed;
4129+ }
4130+
4131+};
4132
4133=== added file 'node_modules/cordova/_vendor/http-signature/0.10.0/lib/signer.js'
4134--- node_modules/cordova/_vendor/http-signature/0.10.0/lib/signer.js 1970-01-01 00:00:00 +0000
4135+++ node_modules/cordova/_vendor/http-signature/0.10.0/lib/signer.js 2014-02-21 20:33:03 +0000
4136@@ -0,0 +1,179 @@
4137+// Copyright 2012 Joyent, Inc. All rights reserved.
4138+
4139+var assert = require('assert-plus');
4140+var crypto = require('crypto');
4141+var http = require('http');
4142+
4143+var sprintf = require('util').format;
4144+
4145+
4146+
4147+///--- Globals
4148+
4149+var Algorithms = {
4150+ 'rsa-sha1': true,
4151+ 'rsa-sha256': true,
4152+ 'rsa-sha512': true,
4153+ 'dsa-sha1': true,
4154+ 'hmac-sha1': true,
4155+ 'hmac-sha256': true,
4156+ 'hmac-sha512': true
4157+};
4158+
4159+var Authorization =
4160+ 'Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"';
4161+
4162+
4163+
4164+///--- Specific Errors
4165+
4166+function MissingHeaderError(message) {
4167+ this.name = 'MissingHeaderError';
4168+ this.message = message;
4169+ this.stack = (new Error()).stack;
4170+}
4171+MissingHeaderError.prototype = new Error();
4172+
4173+
4174+function InvalidAlgorithmError(message) {
4175+ this.name = 'InvalidAlgorithmError';
4176+ this.message = message;
4177+ this.stack = (new Error()).stack;
4178+}
4179+InvalidAlgorithmError.prototype = new Error();
4180+
4181+
4182+
4183+///--- Internal Functions
4184+
4185+function _pad(val) {
4186+ if (parseInt(val, 10) < 10) {
4187+ val = '0' + val;
4188+ }
4189+ return val;
4190+}
4191+
4192+
4193+function _rfc1123() {
4194+ var date = new Date();
4195+
4196+ var months = ['Jan',
4197+ 'Feb',
4198+ 'Mar',
4199+ 'Apr',
4200+ 'May',
4201+ 'Jun',
4202+ 'Jul',
4203+ 'Aug',
4204+ 'Sep',
4205+ 'Oct',
4206+ 'Nov',
4207+ 'Dec'];
4208+ var days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
4209+ return days[date.getUTCDay()] + ', ' +
4210+ _pad(date.getUTCDate()) + ' ' +
4211+ months[date.getUTCMonth()] + ' ' +
4212+ date.getUTCFullYear() + ' ' +
4213+ _pad(date.getUTCHours()) + ':' +
4214+ _pad(date.getUTCMinutes()) + ':' +
4215+ _pad(date.getUTCSeconds()) +
4216+ ' GMT';
4217+}
4218+
4219+
4220+
4221+///--- Exported API
4222+
4223+module.exports = {
4224+
4225+ /**
4226+ * Adds an 'Authorization' header to an http.ClientRequest object.
4227+ *
4228+ * Note that this API will add a Date header if it's not already set. Any
4229+ * other headers in the options.headers array MUST be present, or this
4230+ * will throw.
4231+ *
4232+ * You shouldn't need to check the return type; it's just there if you want
4233+ * to be pedantic.
4234+ *
4235+ * @param {Object} request an instance of http.ClientRequest.
4236+ * @param {Object} options signing parameters object:
4237+ * - {String} keyId required.
4238+ * - {String} key required (either a PEM or HMAC key).
4239+ * - {Array} headers optional; defaults to ['date'].
4240+ * - {String} algorithm optional; defaults to 'rsa-sha256'.
4241+ * - {String} httpVersion optional; defaults to '1.1'.
4242+ * @return {Boolean} true if Authorization (and optionally Date) were added.
4243+ * @throws {TypeError} on bad parameter types (input).
4244+ * @throws {InvalidAlgorithmError} if algorithm was bad.
4245+ * @throws {MissingHeaderError} if a header to be signed was specified but
4246+ * was not present.
4247+ */
4248+ signRequest: function signRequest(request, options) {
4249+ assert.object(request, 'request');
4250+ assert.object(options, 'options');
4251+ assert.optionalString(options.algorithm, 'options.algorithm');
4252+ assert.string(options.keyId, 'options.keyId');
4253+ assert.optionalArrayOfString(options.headers, 'options.headers');
4254+ assert.optionalString(options.httpVersion, 'options.httpVersion');
4255+
4256+ if (!request.getHeader('Date'))
4257+ request.setHeader('Date', _rfc1123());
4258+ if (!options.headers)
4259+ options.headers = ['date'];
4260+ if (!options.algorithm)
4261+ options.algorithm = 'rsa-sha256';
4262+ if (!options.httpVersion)
4263+ options.httpVersion = '1.1';
4264+
4265+ options.algorithm = options.algorithm.toLowerCase();
4266+
4267+ if (!Algorithms[options.algorithm])
4268+ throw new InvalidAlgorithmError(options.algorithm + ' is not supported');
4269+
4270+ var i;
4271+ var stringToSign = '';
4272+ for (i = 0; i < options.headers.length; i++) {
4273+ if (typeof (options.headers[i]) !== 'string')
4274+ throw new TypeError('options.headers must be an array of Strings');
4275+
4276+ var h = options.headers[i].toLowerCase();
4277+
4278+ if (h !== 'request-line') {
4279+ var value = request.getHeader(h);
4280+ if (!value) {
4281+ throw new MissingHeaderError(h + ' was not in the request');
4282+ }
4283+ stringToSign += h + ': ' + value;
4284+ } else {
4285+ value =
4286+ stringToSign +=
4287+ request.method + ' ' + request.path + ' HTTP/' + options.httpVersion;
4288+ }
4289+
4290+ if ((i + 1) < options.headers.length)
4291+ stringToSign += '\n';
4292+ }
4293+
4294+ var alg = options.algorithm.match(/(hmac|rsa)-(\w+)/);
4295+ var signature;
4296+ if (alg[1] === 'hmac') {
4297+ var hmac = crypto.createHmac(alg[2].toUpperCase(), options.key);
4298+ hmac.update(stringToSign);
4299+ signature = hmac.digest('base64');
4300+ } else {
4301+ var signer = crypto.createSign(options.algorithm.toUpperCase());
4302+ signer.update(stringToSign);
4303+ signature = signer.sign(options.key, 'base64');
4304+ }
4305+
4306+ request.setHeader('Authorization', sprintf(Authorization,
4307+ options.keyId,
4308+ options.algorithm,
4309+ options.headers.join(' '),
4310+ signature));
4311+
4312+ return true;
4313+ }
4314+
4315+};
4316
4317=== added file 'node_modules/cordova/_vendor/http-signature/0.10.0/lib/util.js'
4318--- node_modules/cordova/_vendor/http-signature/0.10.0/lib/util.js 1970-01-01 00:00:00 +0000
4319+++ node_modules/cordova/_vendor/http-signature/0.10.0/lib/util.js 2014-02-21 20:33:03 +0000
4320@@ -0,0 +1,249 @@
4321+// Copyright 2012 Joyent, Inc. All rights reserved.
4322+
4323+var assert = require('assert-plus');
4324+var crypto = require('crypto');
4325+
4326+var asn1 = require('asn1');
4327+var ctype = require('ctype');
4328+
4329+
4330+
4331+///--- Helpers
4332+
4333+function readNext(buffer, offset) {
4334+ var len = ctype.ruint32(buffer, 'big', offset);
4335+ offset += 4;
4336+
4337+ var newOffset = offset + len;
4338+
4339+ return {
4340+ data: buffer.slice(offset, newOffset),
4341+ offset: newOffset
4342+ };
4343+}
4344+
4345+
4346+function writeInt(writer, buffer) {
4347+ writer.writeByte(0x02); // ASN1.Integer
4348+ writer.writeLength(buffer.length);
4349+
4350+ for (var i = 0; i < buffer.length; i++)
4351+ writer.writeByte(buffer[i]);
4352+
4353+ return writer;
4354+}
4355+
4356+
4357+function rsaToPEM(key) {
4358+ var buffer;
4359+ var der;
4360+ var exponent;
4361+ var i;
4362+ var modulus;
4363+ var newKey = '';
4364+ var offset = 0;
4365+ var type;
4366+ var tmp;
4367+
4368+ try {
4369+ buffer = new Buffer(key.split(' ')[1], 'base64');
4370+
4371+ tmp = readNext(buffer, offset);
4372+ type = tmp.data.toString();
4373+ offset = tmp.offset;
4374+
4375+ if (type !== 'ssh-rsa')
4376+ throw new Error('Invalid ssh key type: ' + type);
4377+
4378+ tmp = readNext(buffer, offset);
4379+ exponent = tmp.data;
4380+ offset = tmp.offset;
4381+
4382+ tmp = readNext(buffer, offset);
4383+ modulus = tmp.data;
4384+ } catch (e) {
4385+ throw new Error('Invalid ssh key: ' + key);
4386+ }
4387+
4388+ // DER is a subset of BER
4389+ der = new asn1.BerWriter();
4390+
4391+ der.startSequence();
4392+
4393+ der.startSequence();
4394+ der.writeOID('1.2.840.113549.1.1.1');
4395+ der.writeNull();
4396+ der.endSequence();
4397+
4398+ der.startSequence(0x03); // bit string
4399+ der.writeByte(0x00);
4400+
4401+ // Actual key
4402+ der.startSequence();
4403+ writeInt(der, modulus);
4404+ writeInt(der, exponent);
4405+ der.endSequence();
4406+
4407+ // bit string
4408+ der.endSequence();
4409+
4410+ der.endSequence();
4411+
4412+ tmp = der.buffer.toString('base64');
4413+ for (i = 0; i < tmp.length; i++) {
4414+ if ((i % 64) === 0)
4415+ newKey += '\n';
4416+ newKey += tmp.charAt(i);
4417+ }
4418+
4419+ if (!/\\n$/.test(newKey))
4420+ newKey += '\n';
4421+
4422+ return '-----BEGIN PUBLIC KEY-----' + newKey + '-----END PUBLIC KEY-----\n';
4423+}
4424+
4425+
4426+function dsaToPEM(key) {
4427+ var buffer;
4428+ var offset = 0;
4429+ var tmp;
4430+ var der;
4431+ var newKey = '';
4432+
4433+ var type;
4434+ var p;
4435+ var q;
4436+ var g;
4437+ var y;
4438+
4439+ try {
4440+ buffer = new Buffer(key.split(' ')[1], 'base64');
4441+
4442+ tmp = readNext(buffer, offset);
4443+ type = tmp.data.toString();
4444+ offset = tmp.offset;
4445+
4446+ /* JSSTYLED */
4447+ if (!/^ssh-ds[as].*/.test(type))
4448+ throw new Error('Invalid ssh key type: ' + type);
4449+
4450+ tmp = readNext(buffer, offset);
4451+ p = tmp.data;
4452+ offset = tmp.offset;
4453+
4454+ tmp = readNext(buffer, offset);
4455+ q = tmp.data;
4456+ offset = tmp.offset;
4457+
4458+ tmp = readNext(buffer, offset);
4459+ g = tmp.data;
4460+ offset = tmp.offset;
4461+
4462+ tmp = readNext(buffer, offset);
4463+ y = tmp.data;
4464+ } catch (e) {
4465+ console.log(e.stack);
4466+ throw new Error('Invalid ssh key: ' + key);
4467+ }
4468+
4469+ // DER is a subset of BER
4470+ der = new asn1.BerWriter();
4471+
4472+ der.startSequence();
4473+
4474+ der.startSequence();
4475+ der.writeOID('1.2.840.10040.4.1');
4476+
4477+ der.startSequence();
4478+ writeInt(der, p);
4479+ writeInt(der, q);
4480+ writeInt(der, g);
4481+ der.endSequence();
4482+
4483+ der.endSequence();
4484+
4485+ der.startSequence(0x03); // bit string
4486+ der.writeByte(0x00);
4487+ writeInt(der, y);
4488+ der.endSequence();
4489+
4490+ der.endSequence();
4491+
4492+ tmp = der.buffer.toString('base64');
4493+ for (var i = 0; i < tmp.length; i++) {
4494+ if ((i % 64) === 0)
4495+ newKey += '\n';
4496+ newKey += tmp.charAt(i);
4497+ }
4498+
4499+ if (!/\\n$/.test(newKey))
4500+ newKey += '\n';
4501+
4502+ return '-----BEGIN PUBLIC KEY-----' + newKey + '-----END PUBLIC KEY-----\n';
4503+}
4504+
4505+
4506+///--- API
4507+
4508+module.exports = {
4509+
4510+ /**
4511+ * Converts an OpenSSH public key (rsa only) to a PKCS#8 PEM file.
4512+ *
4513+ * The intent of this module is to interoperate with OpenSSL only,
4514+ * specifically the node crypto module's `verify` method.
4515+ *
4516+ * @param {String} key an OpenSSH public key.
4517+ * @return {String} PEM encoded form of the RSA public key.
4518+ * @throws {TypeError} on bad input.
4519+ * @throws {Error} on invalid ssh key formatted data.
4520+ */
4521+ sshKeyToPEM: function sshKeyToPEM(key) {
4522+ assert.string(key, 'ssh_key');
4523+
4524+ /* JSSTYLED */
4525+ if (/^ssh-rsa.*/.test(key))
4526+ return rsaToPEM(key);
4527+
4528+ /* JSSTYLED */
4529+ if (/^ssh-ds[as].*/.test(key))
4530+ return dsaToPEM(key);
4531+
4532+ throw new Error('Only RSA and DSA public keys are allowed');
4533+ },
4534+
4535+
4536+ /**
4537+ * Generates an OpenSSH fingerprint from an ssh public key.
4538+ *
4539+ * @param {String} key an OpenSSH public key.
4540+ * @return {String} key fingerprint.
4541+ * @throws {TypeError} on bad input.
4542+ * @throws {Error} if what you passed doesn't look like an ssh public key.
4543+ */
4544+ fingerprint: function fingerprint(key) {
4545+ assert.string(key, 'ssh_key');
4546+
4547+ var pieces = key.split(' ');
4548+ if (!pieces || !pieces.length || pieces.length < 2)
4549+ throw new Error('invalid ssh key');
4550+
4551+ var data = new Buffer(pieces[1], 'base64');
4552+
4553+ var hash = crypto.createHash('md5');
4554+ hash.update(data);
4555+ var digest = hash.digest('hex');
4556+
4557+ var fp = '';
4558+ for (var i = 0; i < digest.length; i++) {
4559+ if (i && i % 2 === 0)
4560+ fp += ':';
4561+
4562+ fp += digest[i];
4563+ }
4564+
4565+ return fp;
4566+ }
4567+
4568+
4569+};
4570
4571=== added file 'node_modules/cordova/_vendor/http-signature/0.10.0/lib/verify.js'
4572--- node_modules/cordova/_vendor/http-signature/0.10.0/lib/verify.js 1970-01-01 00:00:00 +0000
4573+++ node_modules/cordova/_vendor/http-signature/0.10.0/lib/verify.js 2014-02-21 20:33:03 +0000
4574@@ -0,0 +1,42 @@
4575+// Copyright 2011 Joyent, Inc. All rights reserved.
4576+
4577+var assert = require('assert-plus');
4578+var crypto = require('crypto');
4579+
4580+
4581+
4582+///--- Exported API
4583+
4584+module.exports = {
4585+
4586+ /**
4587+ * Simply wraps up the node crypto operations for you, and returns
4588+ * true or false. You are expected to pass in an object that was
4589+ * returned from `parse()`.
4590+ *
4591+ * @param {Object} parsedSignature the object you got from `parse`.
4592+ * @param {String} key either an RSA private key PEM or HMAC secret.
4593+ * @return {Boolean} true if valid, false otherwise.
4594+ * @throws {TypeError} if you pass in bad arguments.
4595+ */
4596+ verifySignature: function verifySignature(parsedSignature, key) {
4597+ assert.object(parsedSignature, 'parsedSignature');
4598+ assert.string(key, 'key');
4599+
4600+ var alg = parsedSignature.algorithm.match(/(HMAC|RSA|DSA)-(\w+)/);
4601+ if (!alg || alg.length !== 3)
4602+ throw new TypeError('parsedSignature: unsupported algorithm ' +
4603+ parsedSignature.algorithm);
4604+
4605+ if (alg[1] === 'HMAC') {
4606+ var hmac = crypto.createHmac(alg[2].toUpperCase(), key);
4607+ hmac.update(parsedSignature.signingString);
4608+ return (hmac.digest('base64') === parsedSignature.params.signature);
4609+ } else {
4610+ var verify = crypto.createVerify(alg[0]);
4611+ verify.update(parsedSignature.signingString);
4612+ return verify.verify(key, parsedSignature.params.signature, 'base64');
4613+ }
4614+ }
4615+
4616+};
4617
4618=== added directory 'node_modules/cordova/_vendor/http-signature/0.10.0/node_modules'
4619=== added symlink 'node_modules/cordova/_vendor/http-signature/0.10.0/node_modules/asn1'
4620=== target is u'../_vendor/asn1/0.1.11'
4621=== added symlink 'node_modules/cordova/_vendor/http-signature/0.10.0/node_modules/assert-plus'
4622=== target is u'../_vendor/assert-plus/0.1.2'
4623=== added symlink 'node_modules/cordova/_vendor/http-signature/0.10.0/node_modules/ctype'
4624=== target is u'../_vendor/ctype/0.5.2'
4625=== added file 'node_modules/cordova/_vendor/http-signature/0.10.0/package.json'
4626--- node_modules/cordova/_vendor/http-signature/0.10.0/package.json 1970-01-01 00:00:00 +0000
4627+++ node_modules/cordova/_vendor/http-signature/0.10.0/package.json 2014-02-21 20:33:03 +0000
4628@@ -0,0 +1,35 @@
4629+{
4630+ "author": {
4631+ "name": "Joyent, Inc"
4632+ },
4633+ "name": "http-signature",
4634+ "description": "Reference implementation of Joyent's HTTP Signature Scheme",
4635+ "version": "0.10.0",
4636+ "repository": {
4637+ "type": "git",
4638+ "url": "git://github.com/joyent/node-http-signature.git"
4639+ },
4640+ "engines": {
4641+ "node": ">=0.8"
4642+ },
4643+ "main": "lib/index.js",
4644+ "scripts": {
4645+ "test": "./node_modules/.bin/tap tst/*.js"
4646+ },
4647+ "dependencies": {
4648+ "assert-plus": "0.1.2",
4649+ "asn1": "0.1.11",
4650+ "ctype": "0.5.2"
4651+ },
4652+ "devDependencies": {
4653+ "node-uuid": "1.4.0",
4654+ "tap": "0.4.2"
4655+ },
4656+ "readme": "# node-http-signature\n\nnode-http-signature is a node.js library that has client and server components\nfor Joyent's [HTTP Signature Scheme](http_signing.md).\n\n## Usage\n\nNote the example below signs a request with the same key/cert used to start an\nHTTP server. This is almost certainly not what you actaully want, but is just\nused to illustrate the API calls; you will need to provide your own key\nmanagement in addition to this library.\n\n### Client\n\n var fs = require('fs');\n var https = require('https');\n var httpSignature = require('http-signature');\n\n var key = fs.readFileSync('./key.pem', 'ascii');\n\n var options = {\n host: 'localhost',\n port: 8443,\n path: '/',\n method: 'GET',\n headers: {}\n };\n\n // Adds a 'Date' header in, signs it, and adds the\n // 'Authorization' header in.\n var req = https.request(options, function(res) {\n console.log(res.statusCode);\n });\n\n\n httpSignature.sign(req, {\n key: key,\n keyId: './cert.pem'\n });\n\n req.end();\n\n### Server\n\n var fs = require('fs');\n var https = require('https');\n var httpSignature = require('http-signature');\n\n var options = {\n key: fs.readFileSync('./key.pem'),\n cert: fs.readFileSync('./cert.pem')\n };\n\n https.createServer(options, function (req, res) {\n var rc = 200;\n var parsed = httpSignature.parseRequest(req);\n var pub = fs.readFileSync(parsed.keyId, 'ascii');\n if (!httpSignature.verifySignature(parsed, pub))\n rc = 401;\n\n res.writeHead(rc);\n res.end();\n }).listen(8443);\n\n## Installation\n\n npm install http-signature\n\n## License\n\nMIT.\n\n## Bugs\n\nSee <https://github.com/joyent/node-http-signature/issues>.\n",
4657+ "readmeFilename": "README.md",
4658+ "bugs": {
4659+ "url": "https://github.com/joyent/node-http-signature/issues"
4660+ },
4661+ "_id": "http-signature@0.10.0",
4662+ "_from": "http-signature@~0.10.0"
4663+}
4664
4665=== removed directory 'node_modules/cordova/_vendor/keypress'
4666=== removed directory 'node_modules/cordova/_vendor/keypress/0.1.0'
4667=== removed file 'node_modules/cordova/_vendor/keypress/0.1.0/README.md'
4668--- node_modules/cordova/_vendor/keypress/0.1.0/README.md 2013-12-12 20:49:30 +0000
4669+++ node_modules/cordova/_vendor/keypress/0.1.0/README.md 1970-01-01 00:00:00 +0000
4670@@ -1,101 +0,0 @@
4671-keypress
4672-========
4673-### Make any Node ReadableStream emit "keypress" events
4674-
4675-
4676-Previous to Node `v0.8.x`, there was an undocumented `"keypress"` event that
4677-`process.stdin` would emit when it was a TTY. Some people discovered this hidden
4678-gem, and started using it in their own code.
4679-
4680-Now in Node `v0.8.x`, this `"keypress"` event does not get emitted by default,
4681-but rather only when it is being used in conjuction with the `readline` (or by
4682-extension, the `repl`) module.
4683-
4684-This module is the exact logic from the node `v0.8.x` releases ripped out into its
4685-own module.
4686-
4687-__Bonus:__ Now with mouse support!
4688-
4689-Installation
4690-------------
4691-
4692-Install with `npm`:
4693-
4694-``` bash
4695-$ npm install keypress
4696-```
4697-
4698-Or add it to the `"dependencies"` section of your _package.json_ file.
4699-
4700-
4701-Example
4702--------
4703-
4704-#### Listening for "keypress" events
4705-
4706-``` js
4707-var keypress = require('keypress');
4708-
4709-// make `process.stdin` begin emitting "keypress" events
4710-keypress(process.stdin);
4711-
4712-// listen for the "keypress" event
4713-process.stdin.on('keypress', function (ch, key) {
4714- console.log('got "keypress"', key);
4715- if (key && key.ctrl && key.name == 'c') {
4716- process.stdin.pause();
4717- }
4718-});
4719-
4720-process.stdin.setRawMode(true);
4721-process.stdin.resume();
4722-```
4723-
4724-#### Listening for "mousepress" events
4725-
4726-``` js
4727-var keypress = require('keypress');
4728-
4729-// make `process.stdin` begin emitting "mousepress" (and "keypress") events
4730-keypress(process.stdin);
4731-
4732-// you must enable the mouse events before they will begin firing
4733-keypress.enableMouse(process.stdout);
4734-
4735-process.stdin.on('mousepress', function (info) {
4736- console.log('got "mousepress" event at %d x %d', info.x, info.y);
4737-});
4738-
4739-process.on('exit', function () {
4740- // disable mouse on exit, so that the state
4741- // is back to normal for the terminal
4742- keypress.disableMouse(process.stdout);
4743-});
4744-```
4745-
4746-
4747-License
4748--------
4749-
4750-(The MIT License)
4751-
4752-Copyright (c) 2012 Nathan Rajlich &lt;nathan@tootallnate.net&gt;
4753-
4754-Permission is hereby granted, free of charge, to any person obtaining
4755-a copy of this software and associated documentation files (the
4756-'Software'), to deal in the Software without restriction, including
4757-without limitation the rights to use, copy, modify, merge, publish,
4758-distribute, sublicense, and/or sell copies of the Software, and to
4759-permit persons to whom the Software is furnished to do so, subject to
4760-the following conditions:
4761-
4762-The above copyright notice and this permission notice shall be
4763-included in all copies or substantial portions of the Software.
4764-
4765-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
4766-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
4767-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
4768-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
4769-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
4770-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
4771-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4772
4773=== removed symlink 'node_modules/cordova/_vendor/keypress/0.1.0/_vendor'
4774=== target was u'../..'
4775=== removed file 'node_modules/cordova/_vendor/keypress/0.1.0/index.js'
4776--- node_modules/cordova/_vendor/keypress/0.1.0/index.js 2013-12-12 20:49:30 +0000
4777+++ node_modules/cordova/_vendor/keypress/0.1.0/index.js 1970-01-01 00:00:00 +0000
4778@@ -1,346 +0,0 @@
4779-
4780-/**
4781- * This module offers the internal "keypress" functionality from node-core's
4782- * `readline` module, for your own programs and modules to use.
4783- *
4784- * Usage:
4785- *
4786- * require('keypress')(process.stdin);
4787- *
4788- * process.stdin.on('keypress', function (ch, key) {
4789- * console.log(ch, key);
4790- * if (key.ctrl && key.name == 'c') {
4791- * process.stdin.pause();
4792- * }
4793- * });
4794- * proces.stdin.resume();
4795- */
4796-var exports = module.exports = keypress;
4797-
4798-exports.enableMouse = function (stream) {
4799- stream.write('\x1b' +'[?1000h')
4800-}
4801-
4802-exports.disableMouse = function (stream) {
4803- stream.write('\x1b' +'[?1000l')
4804-}
4805-
4806-
4807-/**
4808- * accepts a readable Stream instance and makes it emit "keypress" events
4809- */
4810-
4811-function keypress(stream) {
4812- if (isEmittingKeypress(stream)) return;
4813- stream._emitKeypress = true;
4814-
4815- function onData(b) {
4816- if (stream.listeners('keypress').length > 0) {
4817- emitKey(stream, b);
4818- } else {
4819- // Nobody's watching anyway
4820- stream.removeListener('data', onData);
4821- stream.on('newListener', onNewListener);
4822- }
4823- }
4824-
4825- function onNewListener(event) {
4826- if (event == 'keypress') {
4827- stream.on('data', onData);
4828- stream.removeListener('newListener', onNewListener);
4829- }
4830- }
4831-
4832- if (stream.listeners('keypress').length > 0) {
4833- stream.on('data', onData);
4834- } else {
4835- stream.on('newListener', onNewListener);
4836- }
4837-}
4838-
4839-/**
4840- * Returns `true` if the stream is already emitting "keypress" events.
4841- * `false` otherwise.
4842- */
4843-
4844-function isEmittingKeypress(stream) {
4845- var rtn = stream._emitKeypress;
4846- if (!rtn) {
4847- // hack: check for the v0.6.x "data" event
4848- stream.listeners('data').forEach(function (l) {
4849- if (l.name == 'onData' && /emitKey/.test(l.toString())) {
4850- rtn = true;
4851- stream._emitKeypress = true;
4852- }
4853- });
4854- }
4855- if (!rtn) {
4856- // hack: check for the v0.6.x "newListener" event
4857- stream.listeners('newListener').forEach(function (l) {
4858- if (l.name == 'onNewListener' && /keypress/.test(l.toString())) {
4859- rtn = true;
4860- stream._emitKeypress = true;
4861- }
4862- });
4863- }
4864- return rtn;
4865-}
4866-
4867-
4868-/*
4869- Some patterns seen in terminal key escape codes, derived from combos seen
4870- at http://www.midnight-commander.org/browser/lib/tty/key.c
4871-
4872- ESC letter
4873- ESC [ letter
4874- ESC [ modifier letter
4875- ESC [ 1 ; modifier letter
4876- ESC [ num char
4877- ESC [ num ; modifier char
4878- ESC O letter
4879- ESC O modifier letter
4880- ESC O 1 ; modifier letter
4881- ESC N letter
4882- ESC [ [ num ; modifier char
4883- ESC [ [ 1 ; modifier letter
4884- ESC ESC [ num char
4885- ESC ESC O letter
4886-
4887- - char is usually ~ but $ and ^ also happen with rxvt
4888- - modifier is 1 +
4889- (shift * 1) +
4890- (left_alt * 2) +
4891- (ctrl * 4) +
4892- (right_alt * 8)
4893- - two leading ESCs apparently mean the same as one leading ESC
4894-*/
4895-
4896-// Regexes used for ansi escape code splitting
4897-var metaKeyCodeRe = /^(?:\x1b)([a-zA-Z0-9])$/;
4898-var functionKeyCodeRe =
4899- /^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/;
4900-
4901-function emitKey(stream, s) {
4902- var ch,
4903- key = {
4904- name: undefined,
4905- ctrl: false,
4906- meta: false,
4907- shift: false
4908- },
4909- parts;
4910-
4911- if (Buffer.isBuffer(s)) {
4912- if (s[0] > 127 && s[1] === undefined) {
4913- s[0] -= 128;
4914- s = '\x1b' + s.toString(stream.encoding || 'utf-8');
4915- } else {
4916- s = s.toString(stream.encoding || 'utf-8');
4917- }
4918- }
4919-
4920- key.sequence = s;
4921-
4922- if (s === '\r' || s === '\n') {
4923- // enter
4924- key.name = 'enter';
4925-
4926- } else if (s === '\t') {
4927- // tab
4928- key.name = 'tab';
4929-
4930- } else if (s === '\b' || s === '\x7f' ||
4931- s === '\x1b\x7f' || s === '\x1b\b') {
4932- // backspace or ctrl+h
4933- key.name = 'backspace';
4934- key.meta = (s.charAt(0) === '\x1b');
4935-
4936- } else if (s === '\x1b' || s === '\x1b\x1b') {
4937- // escape key
4938- key.name = 'escape';
4939- key.meta = (s.length === 2);
4940-
4941- } else if (s === ' ' || s === '\x1b ') {
4942- key.name = 'space';
4943- key.meta = (s.length === 2);
4944-
4945- } else if (s <= '\x1a') {
4946- // ctrl+letter
4947- key.name = String.fromCharCode(s.charCodeAt(0) + 'a'.charCodeAt(0) - 1);
4948- key.ctrl = true;
4949-
4950- } else if (s.length === 1 && s >= 'a' && s <= 'z') {
4951- // lowercase letter
4952- key.name = s;
4953-
4954- } else if (s.length === 1 && s >= 'A' && s <= 'Z') {
4955- // shift+letter
4956- key.name = s.toLowerCase();
4957- key.shift = true;
4958-
4959- } else if (parts = metaKeyCodeRe.exec(s)) {
4960- // meta+character key
4961- key.name = parts[1].toLowerCase();
4962- key.meta = true;
4963- key.shift = /^[A-Z]$/.test(parts[1]);
4964-
4965- } else if (parts = functionKeyCodeRe.exec(s)) {
4966- // ansi escape sequence
4967-
4968- // reassemble the key code leaving out leading \x1b's,
4969- // the modifier key bitflag and any meaningless "1;" sequence
4970- var code = (parts[1] || '') + (parts[2] || '') +
4971- (parts[4] || '') + (parts[6] || ''),
4972- modifier = (parts[3] || parts[5] || 1) - 1;
4973-
4974- // Parse the key modifier
4975- key.ctrl = !!(modifier & 4);
4976- key.meta = !!(modifier & 10);
4977- key.shift = !!(modifier & 1);
4978- key.code = code;
4979-
4980- // Parse the key itself
4981- switch (code) {
4982- /* xterm/gnome ESC O letter */
4983- case 'OP': key.name = 'f1'; break;
4984- case 'OQ': key.name = 'f2'; break;
4985- case 'OR': key.name = 'f3'; break;
4986- case 'OS': key.name = 'f4'; break;
4987-
4988- /* xterm/rxvt ESC [ number ~ */
4989- case '[11~': key.name = 'f1'; break;
4990- case '[12~': key.name = 'f2'; break;
4991- case '[13~': key.name = 'f3'; break;
4992- case '[14~': key.name = 'f4'; break;
4993-
4994- /* from Cygwin and used in libuv */
4995- case '[[A': key.name = 'f1'; break;
4996- case '[[B': key.name = 'f2'; break;
4997- case '[[C': key.name = 'f3'; break;
4998- case '[[D': key.name = 'f4'; break;
4999- case '[[E': key.name = 'f5'; break;
5000-
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches