Browse Source

Add the correct demo app

Adam Rensel 9 years ago
parent
commit
b05888e79d
100 changed files with 1825 additions and 1465 deletions
  1. 3 0
      .gitignore
  2. 1 1
      app/js/app.js
  3. BIN
      database.sqlite
  4. 0 0
      node_modules/bcrypt/build/Makefile
  5. 0 0
      node_modules/bcrypt/build/Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt.o.d
  6. 0 0
      node_modules/bcrypt/build/Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt_node.o.d
  7. 0 0
      node_modules/bcrypt/build/Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d
  8. BIN
      node_modules/bcrypt/build/Release/bcrypt_lib.node
  9. BIN
      node_modules/bcrypt/build/Release/obj.target/bcrypt_lib/src/bcrypt.o
  10. BIN
      node_modules/bcrypt/build/Release/obj.target/bcrypt_lib/src/bcrypt_node.o
  11. BIN
      node_modules/bcrypt/build/Release/obj.target/bcrypt_lib/src/blowfish.o
  12. 6 6
      node_modules/bcrypt/build/bcrypt_lib.target.mk
  13. 16 17
      node_modules/bcrypt/build/config.gypi
  14. 0 4
      node_modules/bcrypt/node_modules/bindings/package.json
  15. 0 0
      node_modules/bcrypt/package.json
  16. 72 1
      node_modules/body-parser/HISTORY.md
  17. 1 1
      node_modules/body-parser/LICENSE
  18. 204 56
      node_modules/body-parser/README.md
  19. 10 0
      node_modules/body-parser/index.js
  20. 22 13
      node_modules/body-parser/lib/read.js
  21. 66 10
      node_modules/body-parser/lib/types/json.js
  22. 36 4
      node_modules/body-parser/lib/types/raw.js
  23. 53 6
      node_modules/body-parser/lib/types/text.js
  24. 78 24
      node_modules/body-parser/lib/types/urlencoded.js
  25. 0 0
      node_modules/body-parser/node_modules/bytes/package.json
  26. 1 2
      node_modules/body-parser/node_modules/depd/package.json
  27. 1 0
      node_modules/body-parser/node_modules/iconv-lite/.npmignore
  28. 3 3
      node_modules/body-parser/node_modules/iconv-lite/.travis.yml
  29. 23 0
      node_modules/body-parser/node_modules/iconv-lite/Changelog.md
  30. 10 3
      node_modules/body-parser/node_modules/iconv-lite/README.md
  31. 0 54
      node_modules/body-parser/node_modules/iconv-lite/README.md~
  32. 6 3
      node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-codec.js
  33. 3 3
      node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-data.js
  34. 2 1
      node_modules/body-parser/node_modules/iconv-lite/encodings/index.js
  35. 6 6
      node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data.js
  36. 10 24
      node_modules/body-parser/node_modules/iconv-lite/package.json
  37. 0 22
      node_modules/body-parser/node_modules/media-typer/HISTORY.md
  38. 0 22
      node_modules/body-parser/node_modules/media-typer/LICENSE
  39. 0 81
      node_modules/body-parser/node_modules/media-typer/README.md
  40. 0 270
      node_modules/body-parser/node_modules/media-typer/index.js
  41. 0 57
      node_modules/body-parser/node_modules/media-typer/package.json
  42. 10 0
      node_modules/body-parser/node_modules/on-finished/HISTORY.md
  43. 28 9
      node_modules/body-parser/node_modules/on-finished/README.md
  44. 75 11
      node_modules/body-parser/node_modules/on-finished/index.js
  45. 22 22
      node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/LICENSE
  46. 80 63
      node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/README.md
  47. 68 60
      node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/index.js
  48. 3 4
      node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/package.json
  49. 7 8
      node_modules/body-parser/node_modules/on-finished/package.json
  50. 21 0
      node_modules/body-parser/node_modules/qs/CHANGELOG.md
  51. 4 4
      node_modules/body-parser/node_modules/qs/Makefile
  52. 10 1
      node_modules/body-parser/node_modules/qs/README.md
  53. 1 1
      node_modules/body-parser/node_modules/qs/index.js
  54. 1 0
      node_modules/body-parser/node_modules/qs/lib/parse.js
  55. 28 9
      node_modules/body-parser/node_modules/qs/lib/stringify.js
  56. 27 34
      node_modules/body-parser/node_modules/qs/lib/utils.js
  57. 12 14
      node_modules/body-parser/node_modules/qs/package.json
  58. 42 20
      node_modules/body-parser/node_modules/qs/test/parse.js
  59. 44 4
      node_modules/body-parser/node_modules/qs/test/stringify.js
  60. 0 3
      node_modules/body-parser/node_modules/raw-body/.npmignore
  61. 18 0
      node_modules/body-parser/node_modules/raw-body/HISTORY.md
  62. 18 26
      node_modules/body-parser/node_modules/raw-body/README.md
  63. 13 7
      node_modules/body-parser/node_modules/raw-body/package.json
  64. 43 0
      node_modules/body-parser/node_modules/type-is/HISTORY.md
  65. 19 2
      node_modules/body-parser/node_modules/type-is/README.md
  66. 39 41
      node_modules/body-parser/node_modules/type-is/index.js
  67. 46 0
      node_modules/body-parser/node_modules/type-is/node_modules/mime-types/HISTORY.md
  68. 23 19
      node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md
  69. 152 180
      node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json
  70. 34 20
      node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json
  71. 9 6
      node_modules/body-parser/node_modules/type-is/node_modules/mime-types/package.json
  72. 5 6
      node_modules/body-parser/node_modules/type-is/package.json
  73. 14 14
      node_modules/body-parser/package.json
  74. 0 0
      node_modules/bower/node_modules/abbrev/package.json
  75. 1 4
      node_modules/bower/node_modules/archy/package.json
  76. 0 0
      node_modules/bower/node_modules/bower-config/node_modules/graceful-fs/package.json
  77. 0 0
      node_modules/bower/node_modules/bower-config/node_modules/optimist/node_modules/minimist/package.json
  78. 0 19
      node_modules/bower/node_modules/bower-config/node_modules/optimist/node_modules/wordwrap/package.json
  79. 0 0
      node_modules/bower/node_modules/bower-config/node_modules/optimist/package.json
  80. 0 14
      node_modules/bower/node_modules/bower-config/node_modules/osenv/package.json
  81. 0 0
      node_modules/bower/node_modules/bower-config/package.json
  82. 0 0
      node_modules/bower/node_modules/bower-endpoint-parser/package.json
  83. 0 0
      node_modules/bower/node_modules/bower-json/node_modules/deep-extend/package.json
  84. 0 0
      node_modules/bower/node_modules/bower-json/node_modules/graceful-fs/package.json
  85. 0 0
      node_modules/bower/node_modules/bower-json/node_modules/intersect/package.json
  86. 0 0
      node_modules/bower/node_modules/bower-json/package.json
  87. 0 0
      node_modules/bower/node_modules/bower-logger/package.json
  88. 4 4
      node_modules/bower/node_modules/bower-registry-client/.travis.yml
  89. 6 12
      node_modules/bower/node_modules/bower-registry-client/Gruntfile.js
  90. 9 4
      node_modules/bower/node_modules/bower-registry-client/README.md
  91. 2 2
      node_modules/bower/node_modules/bower-registry-client/lib/register.js
  92. 2 2
      node_modules/bower/node_modules/bower-registry-client/lib/unregister.js
  93. 0 0
      node_modules/bower/node_modules/bower-registry-client/node_modules/async/package.json
  94. 0 0
      node_modules/bower/node_modules/bower-registry-client/node_modules/graceful-fs/package.json
  95. 0 0
      node_modules/bower/node_modules/bower-registry-client/node_modules/lru-cache/package.json
  96. 0 20
      node_modules/bower/node_modules/bower-registry-client/node_modules/mkdirp/package.json
  97. 0 0
      node_modules/bower/node_modules/bower-registry-client/node_modules/request-replay/package.json
  98. 1 0
      node_modules/bower/node_modules/bower-registry-client/node_modules/request/.npmignore
  99. 129 7
      node_modules/bower/node_modules/bower-registry-client/node_modules/request/README.md
  100. 122 95
      node_modules/bower/node_modules/bower-registry-client/node_modules/request/index.js

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+/node_modules
+npm-debug.log
+.DS_Store

+ 1 - 1
app/js/app.js

@@ -1,5 +1,5 @@
 // Declare app level module which depends on ngRoute
 // Declare app level module which depends on ngRoute
-angular.module('NoteWrangler', ['ngRoute', 'ngResource'])
+angular.module('NoteWrangler', ['ngRoute', 'ngResource', 'Gravatar'])
 .config(function($gravatarProvider){
 .config(function($gravatarProvider){
   $gravatarProvider.setSize(100);
   $gravatarProvider.setSize(100);
 });
 });

BIN
database.sqlite


File diff suppressed because it is too large
+ 0 - 0
node_modules/bcrypt/build/Makefile


File diff suppressed because it is too large
+ 0 - 0
node_modules/bcrypt/build/Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt.o.d


File diff suppressed because it is too large
+ 0 - 0
node_modules/bcrypt/build/Release/.deps/Release/obj.target/bcrypt_lib/src/bcrypt_node.o.d


File diff suppressed because it is too large
+ 0 - 0
node_modules/bcrypt/build/Release/.deps/Release/obj.target/bcrypt_lib/src/blowfish.o.d


BIN
node_modules/bcrypt/build/Release/bcrypt_lib.node


BIN
node_modules/bcrypt/build/Release/obj.target/bcrypt_lib/src/bcrypt.o


BIN
node_modules/bcrypt/build/Release/obj.target/bcrypt_lib/src/bcrypt_node.o


BIN
node_modules/bcrypt/build/Release/obj.target/bcrypt_lib/src/blowfish.o


+ 6 - 6
node_modules/bcrypt/build/bcrypt_lib.target.mk

@@ -39,9 +39,9 @@ CFLAGS_OBJC_Debug :=
 CFLAGS_OBJCC_Debug :=
 CFLAGS_OBJCC_Debug :=
 
 
 INCS_Debug := \
 INCS_Debug := \
-	-I/Users/alyssanicoll/.node-gyp/0.10.28/src \
-	-I/Users/alyssanicoll/.node-gyp/0.10.28/deps/uv/include \
-	-I/Users/alyssanicoll/.node-gyp/0.10.28/deps/v8/include
+	-I/Users/adamrensel/.node-gyp/0.10.28/src \
+	-I/Users/adamrensel/.node-gyp/0.10.28/deps/uv/include \
+	-I/Users/adamrensel/.node-gyp/0.10.28/deps/v8/include
 
 
 DEFS_Release := \
 DEFS_Release := \
 	'-D_DARWIN_USE_64_BIT_INODE=1' \
 	'-D_DARWIN_USE_64_BIT_INODE=1' \
@@ -78,9 +78,9 @@ CFLAGS_OBJC_Release :=
 CFLAGS_OBJCC_Release :=
 CFLAGS_OBJCC_Release :=
 
 
 INCS_Release := \
 INCS_Release := \
-	-I/Users/alyssanicoll/.node-gyp/0.10.28/src \
-	-I/Users/alyssanicoll/.node-gyp/0.10.28/deps/uv/include \
-	-I/Users/alyssanicoll/.node-gyp/0.10.28/deps/v8/include
+	-I/Users/adamrensel/.node-gyp/0.10.28/src \
+	-I/Users/adamrensel/.node-gyp/0.10.28/deps/uv/include \
+	-I/Users/adamrensel/.node-gyp/0.10.28/deps/v8/include
 
 
 OBJS := \
 OBJS := \
 	$(obj).target/$(TARGET)/src/blowfish.o \
 	$(obj).target/$(TARGET)/src/blowfish.o \

+ 16 - 17
node_modules/bcrypt/build/config.gypi

@@ -10,8 +10,8 @@
   "variables": {
   "variables": {
     "clang": 1,
     "clang": 1,
     "host_arch": "x64",
     "host_arch": "x64",
-    "node_install_npm": "false",
-    "node_prefix": "/usr/local/Cellar/node/0.10.28",
+    "node_install_npm": "true",
+    "node_prefix": "/",
     "node_shared_cares": "false",
     "node_shared_cares": "false",
     "node_shared_http_parser": "false",
     "node_shared_http_parser": "false",
     "node_shared_libuv": "false",
     "node_shared_libuv": "false",
@@ -28,8 +28,8 @@
     "target_arch": "x64",
     "target_arch": "x64",
     "v8_enable_gdbjit": 0,
     "v8_enable_gdbjit": 0,
     "v8_no_strict_aliasing": 1,
     "v8_no_strict_aliasing": 1,
-    "v8_use_snapshot": "true",
-    "nodedir": "/Users/alyssanicoll/.node-gyp/0.10.28",
+    "v8_use_snapshot": "false",
+    "nodedir": "/Users/adamrensel/.node-gyp/0.10.28",
     "copy_dev_lib": "true",
     "copy_dev_lib": "true",
     "standalone_static_library": 1,
     "standalone_static_library": 1,
     "save_dev": "",
     "save_dev": "",
@@ -37,12 +37,12 @@
     "viewer": "man",
     "viewer": "man",
     "rollback": "true",
     "rollback": "true",
     "usage": "",
     "usage": "",
-    "globalignorefile": "/usr/local/etc/npmignore",
+    "globalignorefile": "/Users/adamrensel/.nvm/v0.10.28/etc/npmignore",
     "init_author_url": "",
     "init_author_url": "",
     "shell": "/bin/zsh",
     "shell": "/bin/zsh",
     "parseable": "",
     "parseable": "",
     "shrinkwrap": "true",
     "shrinkwrap": "true",
-    "email": "",
+    "email": "adamrensel@codeschool.com",
     "init_license": "ISC",
     "init_license": "ISC",
     "cache_max": "Infinity",
     "cache_max": "Infinity",
     "init_author_email": "",
     "init_author_email": "",
@@ -57,9 +57,8 @@
     "key": "",
     "key": "",
     "message": "%s",
     "message": "%s",
     "versions": "",
     "versions": "",
-    "globalconfig": "/usr/local/etc/npmrc",
+    "globalconfig": "/Users/adamrensel/.nvm/v0.10.28/etc/npmrc",
     "always_auth": "",
     "always_auth": "",
-    "spin": "true",
     "cache_lock_retries": "10",
     "cache_lock_retries": "10",
     "heading": "npm",
     "heading": "npm",
     "fetch_retry_mintimeout": "10000",
     "fetch_retry_mintimeout": "10000",
@@ -68,16 +67,16 @@
     "description": "true",
     "description": "true",
     "engine_strict": "",
     "engine_strict": "",
     "https_proxy": "",
     "https_proxy": "",
-    "init_module": "/Users/alyssanicoll/.npm-init.js",
-    "userconfig": "/Users/alyssanicoll/.npmrc",
+    "init_module": "/Users/adamrensel/.npm-init.js",
+    "userconfig": "/Users/adamrensel/.npmrc",
     "node_version": "v0.10.28",
     "node_version": "v0.10.28",
-    "user": "",
-    "editor": "vi",
+    "user": "501",
+    "editor": "vim",
     "save": "",
     "save": "",
     "tag": "latest",
     "tag": "latest",
     "global": "",
     "global": "",
+    "username": "renz45",
     "optional": "true",
     "optional": "true",
-    "username": "",
     "bin_links": "true",
     "bin_links": "true",
     "force": "",
     "force": "",
     "searchopts": "",
     "searchopts": "",
@@ -96,11 +95,11 @@
     "cache_lock_stale": "60000",
     "cache_lock_stale": "60000",
     "version": "",
     "version": "",
     "cache_min": "10",
     "cache_min": "10",
-    "cache": "/Users/alyssanicoll/.npm",
+    "cache": "/Users/adamrensel/.npm",
     "searchexclude": "",
     "searchexclude": "",
     "color": "true",
     "color": "true",
     "save_optional": "",
     "save_optional": "",
-    "user_agent": "npm/1.4.16 node/v0.10.28 darwin x64",
+    "user_agent": "npm/1.4.9 node/v0.10.28 darwin x64",
     "ignore_scripts": "",
     "ignore_scripts": "",
     "cache_lock_wait": "10000",
     "cache_lock_wait": "10000",
     "production": "",
     "production": "",
@@ -109,9 +108,9 @@
     "git": "git",
     "git": "git",
     "init_author_name": "",
     "init_author_name": "",
     "onload_script": "",
     "onload_script": "",
-    "tmp": "/var/folders/35/3p9vp7_d1zz79cymrp7q_k5m0000gp/T/",
+    "tmp": "/var/folders/xx/5grzz6112497lx9mzk4msbg80000gn/T/",
     "unsafe_perm": "true",
     "unsafe_perm": "true",
     "link": "",
     "link": "",
-    "prefix": "/usr/local"
+    "prefix": "/Users/adamrensel/.nvm/v0.10.28"
   }
   }
 }
 }

File diff suppressed because it is too large
+ 0 - 4
node_modules/bcrypt/node_modules/bindings/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bcrypt/package.json


+ 72 - 1
node_modules/body-parser/HISTORY.md

@@ -1,3 +1,74 @@
+1.12.0 / 2015-02-13
+===================
+
+  * add `debug` messages
+  * accept a function for the `type` option
+  * use `content-type` to parse `Content-Type` headers
+  * deps: iconv-lite@0.4.7
+    - Gracefully support enumerables on `Object.prototype`
+  * deps: raw-body@1.3.3
+    - deps: iconv-lite@0.4.7
+  * deps: type-is@~1.6.0
+    - fix argument reassignment
+    - fix false-positives in `hasBody` `Transfer-Encoding` check
+    - support wildcard for both type and subtype (`*/*`)
+    - deps: mime-types@~2.0.9
+
+1.11.0 / 2015-01-30
+===================
+
+  * make internal `extended: true` depth limit infinity
+  * deps: type-is@~1.5.6
+    - deps: mime-types@~2.0.8
+
+1.10.2 / 2015-01-20
+===================
+
+  * deps: iconv-lite@0.4.6
+    - Fix rare aliases of single-byte encodings
+  * deps: raw-body@1.3.2
+    - deps: iconv-lite@0.4.6
+
+1.10.1 / 2015-01-01
+===================
+
+  * deps: on-finished@~2.2.0
+  * deps: type-is@~1.5.5
+    - deps: mime-types@~2.0.7
+
+1.10.0 / 2014-12-02
+===================
+
+  * make internal `extended: true` array limit dynamic
+
+1.9.3 / 2014-11-21
+==================
+
+  * deps: iconv-lite@0.4.5
+    - Fix Windows-31J and X-SJIS encoding support
+  * deps: qs@2.3.3
+    - Fix `arrayLimit` behavior
+  * deps: raw-body@1.3.1
+    - deps: iconv-lite@0.4.5
+  * deps: type-is@~1.5.3
+    - deps: mime-types@~2.0.3
+
+1.9.2 / 2014-10-27
+==================
+
+  * deps: qs@2.3.2
+    - Fix parsing of mixed objects and values
+
+1.9.1 / 2014-10-22
+==================
+
+  * deps: on-finished@~2.1.1
+    - Fix handling of pipelined requests
+  * deps: qs@2.3.0
+    - Fix parsing of mixed implicit and explicit arrays
+  * deps: type-is@~1.5.2
+    - deps: mime-types@~2.0.2
+
 1.9.0 / 2014-09-24
 1.9.0 / 2014-09-24
 ==================
 ==================
 
 
@@ -45,7 +116,7 @@
 
 
   * add `parameterLimit` option to `urlencoded` parser
   * add `parameterLimit` option to `urlencoded` parser
   * change `urlencoded` extended array limit to 100
   * change `urlencoded` extended array limit to 100
-  * respond with 415 when over `parameterLimit` in `urlencoded`
+  * respond with 413 when over `parameterLimit` in `urlencoded`
 
 
 1.6.7 / 2014-08-29
 1.6.7 / 2014-08-29
 ==================
 ==================

+ 1 - 1
node_modules/body-parser/LICENSE

@@ -1,7 +1,7 @@
 (The MIT License)
 (The MIT License)
 
 
 Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
 Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
-Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>
+Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
 
 
 Permission is hereby granted, free of charge, to any person obtaining
 Permission is hereby granted, free of charge, to any person obtaining
 a copy of this software and associated documentation files (the
 a copy of this software and associated documentation files (the

+ 204 - 56
node_modules/body-parser/README.md

@@ -8,12 +8,23 @@
 
 
 Node.js body parsing middleware.
 Node.js body parsing middleware.
 
 
-This does not handle multipart bodies, due to their complex and typically large nature. For multipart bodies, you may be interested in the following modules:
+_This does not handle multipart bodies_, due to their complex and typically
+large nature. For multipart bodies, you may be interested in the following
+modules:
 
 
-- [busboy](https://www.npmjs.org/package/busboy#readme) and [connect-busboy](https://www.npmjs.org/package/connect-busboy#readme)
-- [multiparty](https://www.npmjs.org/package/multiparty#readme) and [connect-multiparty](https://www.npmjs.org/package/connect-multiparty#readme)
-- [formidable](https://www.npmjs.org/package/formidable#readme)
-- [multer](https://www.npmjs.org/package/multer#readme)
+  * [busboy](https://www.npmjs.org/package/busboy#readme) and
+    [connect-busboy](https://www.npmjs.org/package/connect-busboy#readme)
+  * [multiparty](https://www.npmjs.org/package/multiparty#readme) and
+    [connect-multiparty](https://www.npmjs.org/package/connect-multiparty#readme)
+  * [formidable](https://www.npmjs.org/package/formidable#readme)
+  * [multer](https://www.npmjs.org/package/multer#readme)
+
+This module provides the following parsers:
+
+  * [JSON body parser](#bodyparserjsonoptions)
+  * [Raw body parser](#bodyparserrawoptions)
+  * [Text body parser](#bodyparsertextoptions)
+  * [URL-encoded form body parser](#bodyparserurlencodedoptions)
 
 
 Other body parsers you might be interested in:
 Other body parsers you might be interested in:
 
 
@@ -34,84 +45,218 @@ var bodyParser = require('body-parser')
 
 
 ### bodyParser.json(options)
 ### bodyParser.json(options)
 
 
-Returns middleware that only parses `json`. This parser accepts any Unicode encoding of the body and supports automatic inflation of `gzip` and `deflate` encodings.
+Returns middleware that only parses `json`. This parser accepts any Unicode
+encoding of the body and supports automatic inflation of `gzip` and `deflate`
+encodings.
+
+A new `body` object containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`).
+
+#### Options
+
+The `json` function takes an option `options` object that may contain any of
+the following keys:
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
+
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
 
 
-The options are:
+##### reviver
 
 
-- `strict` - only parse objects and arrays. (default: `true`)
-- `inflate` - if deflated bodies will be inflated. (default: `true`)
-- `limit` - maximum request body size. (default: `<100kb>`)
-- `reviver` - passed to `JSON.parse()`
-- `type` - request content-type to parse (default: `json`)
-- `verify` - function to verify body content
+The `reviver` option is passed directly to `JSON.parse` as the second
+argument. You can find more information on this argument
+[in the MDN documentation about JSON.parse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter).
 
 
-The `type` argument is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme) library. This can be an extension name (like `json`), a mime type (like `application/json`), or a mime time with a wildcard (like `*/json`).
+##### strict
 
 
-The `verify` argument, if supplied, is called as `verify(req, res, buf, encoding)`, where `buf` is a `Buffer` of the raw request body and `encoding` is the encoding of the request. The parsing can be aborted by throwing an error.
+When set to `true`, will only accept arrays and objects; when `false` will
+accept anything `JSON.parse` accepts. Defaults to `true`.
 
 
-The `reviver` argument is passed directly to `JSON.parse` as the second argument. You can find more information on this argument [in the MDN documentation about JSON.parse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse#Example.3A_Using_the_reviver_parameter).
+##### type
+
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a function or a string. If a string, `type` option
+is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme)
+library and this can be an extension name (like `json`), a mime type (like
+`application/json`), or a mime time with a wildcard (like `*/*` or `*/json`).
+If a function, the `type` option is called as `fn(req)` and the request is
+parsed if it returns a truthy value. Defaults to `json`.
+
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
 
 
 ### bodyParser.raw(options)
 ### bodyParser.raw(options)
 
 
-Returns middleware that parses all bodies as a `Buffer`. This parser supports automatic inflation of `gzip` and `deflate` encodings.
+Returns middleware that parses all bodies as a `Buffer`. This parser
+supports automatic inflation of `gzip` and `deflate` encodings.
+
+A new `body` object containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`). This will be a `Buffer` object
+of the body.
+
+#### Options
+
+The `raw` function takes an option `options` object that may contain any of
+the following keys:
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
 
 
-The options are:
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
 
 
-- `inflate` - if deflated bodies will be inflated. (default: `true`)
-- `limit` - maximum request body size. (default: `<100kb>`)
-- `type` - request content-type to parse (default: `application/octet-stream`)
-- `verify` - function to verify body content
+##### type
 
 
-The `type` argument is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme) library. This can be an extension name (like `bin`), a mime type (like `application/octet-stream`), or a mime time with a wildcard (like `application/*`).
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a function or a string. If a string, `type` option
+is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme)
+library and this can be an extension name (like `bin`), a mime type (like
+`application/octet-stream`), or a mime time with a wildcard (like `*/*` or
+`application/*`). If a function, the `type` option is called as `fn(req)`
+and the request is parsed if it returns a truthy value. Defaults to
+`application/octet-stream`.
 
 
-The `verify` argument, if supplied, is called as `verify(req, res, buf, encoding)`, where `buf` is a `Buffer` of the raw request body and `encoding` is the encoding of the request. The parsing can be aborted by throwing an error.
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
 
 
 ### bodyParser.text(options)
 ### bodyParser.text(options)
 
 
-Returns middleware that parses all bodies as a string. This parser supports automatic inflation of `gzip` and `deflate` encodings.
+Returns middleware that parses all bodies as a string. This parser supports
+automatic inflation of `gzip` and `deflate` encodings.
+
+A new `body` string containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`). This will be a string of the
+body.
+
+#### Options
+
+The `text` function takes an option `options` object that may contain any of
+the following keys:
+
+##### defaultCharset
+
+Specify the default character set for the text content if the charset is not
+specified in the `Content-Type` header of the request. Defaults to `utf-8`.
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
+
+##### limit
 
 
-The options are:
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
 
 
-- `defaultCharset` - the default charset to parse as, if not specified in content-type. (default: `utf-8`)
-- `inflate` - if deflated bodies will be inflated. (default: `true`)
-- `limit` - maximum request body size. (default: `<100kb>`)
-- `type` - request content-type to parse (default: `text/plain`)
-- `verify` - function to verify body content
+##### type
 
 
-The `type` argument is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme) library. This can be an extension name (like `txt`), a mime type (like `text/plain`), or a mime time with a wildcard (like `text/*`).
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a function or a string. If a string, `type` option
+is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme)
+library and this can be an extension name (like `txt`), a mime type (like
+`text/plain`), or a mime time with a wildcard (like `*/*` or `text/*`).
+If a function, the `type` option is called as `fn(req)` and the request is
+parsed if it returns a truthy value. Defaults to `text/plain`.
 
 
-The `verify` argument, if supplied, is called as `verify(req, res, buf, encoding)`, where `buf` is a `Buffer` of the raw request body and `encoding` is the encoding of the request. The parsing can be aborted by throwing an error.
+##### verify
+
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
 
 
 ### bodyParser.urlencoded(options)
 ### bodyParser.urlencoded(options)
 
 
-Returns middleware that only parses `urlencoded` bodies. This parser accepts only UTF-8 encoding of the body and supports automatic inflation of `gzip` and `deflate` encodings.
+Returns middleware that only parses `urlencoded` bodies. This parser accepts
+only UTF-8 encoding of the body and supports automatic inflation of `gzip`
+and `deflate` encodings.
+
+A new `body` object containing the parsed data is populated on the `request`
+object after the middleware (i.e. `req.body`). This object will contain
+key-value pairs, where the value can be a string or array (when `extended` is
+`false`), or any type (when `extended` is `true`).
+
+#### Options
+
+The `urlencoded` function takes an option `options` object that may contain
+any of the following keys:
+
+##### extended
+
+The `extended` option allows to choose between parsing the URL-encoded data
+with the `querystring` library (when `false`) or the `qs` library (when
+`true`). The "extended" syntax allows for rich objects and arrays to be
+encoded into the URL-encoded format, allowing for a JSON-like experience
+with URL-encoded. For more information, please
+[see the qs library](https://www.npmjs.org/package/qs#readme).
+
+Defaults to `true`, but using the default has been deprecated. Please
+research into the difference between `qs` and `querystring` and choose the
+appropriate setting.
+
+##### inflate
+
+When set to `true`, then deflated (compressed) bodies will be inflated; when
+`false`, deflated bodies are rejected. Defaults to `true`.
 
 
-The options are:
+##### limit
 
 
-- `extended` - parse extended syntax with the [qs](https://www.npmjs.org/package/qs#readme) module. (default: `true`)
-- `inflate` - if deflated bodies will be inflated. (default: `true`)
-- `limit` - maximum request body size. (default: `<100kb>`)
-- `parameterLimit` - maximum number of parameters. (default: `1000`)
-- `type` - request content-type to parse (default: `urlencoded`)
-- `verify` - function to verify body content
+Controls the maximum request body size. If this is a number, then the value
+specifies the number of bytes; if it is a string, the value is passed to the
+[bytes](https://www.npmjs.com/package/bytes) library for parsing. Defaults
+to `'100kb'`.
 
 
-The `extended` argument allows to choose between parsing the urlencoded data with the `querystring` library (when `false`) or the `qs` library (when `true`). The "extended" syntax allows for rich objects and arrays to be encoded into the urlencoded format, allowing for a JSON-like experience with urlencoded. For more information, please [see the qs library](https://www.npmjs.org/package/qs#readme).
+##### parameterLimit
 
 
-The `parameterLimit` argument controls the maximum number of parameters that are allowed in the urlencoded data. If a request contains more parameters than this value, a 415 will be returned to the client.
+The `parameterLimit` option controls the maximum number of parameters that
+are allowed in the URL-encoded data. If a request contains more parameters
+than this value, a 413 will be returned to the client. Defaults to `1000`.
 
 
-The `type` argument is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme) library. This can be an extension name (like `urlencoded`), a mime type (like `application/x-www-form-urlencoded`), or a mime time with a wildcard (like `*/x-www-form-urlencoded`).
+##### type
 
 
-The `verify` argument, if supplied, is called as `verify(req, res, buf, encoding)`, where `buf` is a `Buffer` of the raw request body and `encoding` is the encoding of the request. The parsing can be aborted by throwing an error.
+The `type` option is used to determine what media type the middleware will
+parse. This option can be a function or a string. If a string, `type` option
+is passed directly to the [type-is](https://www.npmjs.org/package/type-is#readme)
+library and this can be an extension name (like `urlencoded`), a mime type (like
+`application/x-www-form-urlencoded`), or a mime time with a wildcard (like
+`*/x-www-form-urlencoded`). If a function, the `type` option is called as
+`fn(req)` and the request is parsed if it returns a truthy value. Defaults
+to `urlencoded`.
 
 
-### req.body
+##### verify
 
 
-A new `body` object containing the parsed data is populated on the `request` object after the middleware.
+The `verify` option, if supplied, is called as `verify(req, res, buf, encoding)`,
+where `buf` is a `Buffer` of the raw request body and `encoding` is the
+encoding of the request. The parsing can be aborted by throwing an error.
 
 
 ## Examples
 ## Examples
 
 
 ### express/connect top-level generic
 ### express/connect top-level generic
 
 
-This example demonstrates adding a generic JSON and urlencoded parser as a top-level middleware, which will parse the bodies of all incoming requests. This is the simplest setup.
+This example demonstrates adding a generic JSON and URL-encoded parser as a
+top-level middleware, which will parse the bodies of all incoming requests.
+This is the simplest setup.
 
 
 ```js
 ```js
 var express = require('express')
 var express = require('express')
@@ -134,7 +279,9 @@ app.use(function (req, res) {
 
 
 ### express route-specific
 ### express route-specific
 
 
-This example demonstrates adding body parsers specifically to the routes that need them. In general, this is the most recommend way to use body-parser with express.
+This example demonstrates adding body parsers specifically to the routes that
+need them. In general, this is the most recommend way to use body-parser with
+express.
 
 
 ```js
 ```js
 var express = require('express')
 var express = require('express')
@@ -151,7 +298,7 @@ var urlencodedParser = bodyParser.urlencoded({ extended: false })
 // POST /login gets urlencoded bodies
 // POST /login gets urlencoded bodies
 app.post('/login', urlencodedParser, function (req, res) {
 app.post('/login', urlencodedParser, function (req, res) {
   if (!req.body) return res.sendStatus(400)
   if (!req.body) return res.sendStatus(400)
-  res.send('welcome, ' + res.body.username)
+  res.send('welcome, ' + req.body.username)
 })
 })
 
 
 // POST /api/users gets JSON bodies
 // POST /api/users gets JSON bodies
@@ -163,7 +310,8 @@ app.post('/api/users', jsonParser, function (req, res) {
 
 
 ### change content-type for parsers
 ### change content-type for parsers
 
 
-All the parsers accept a `type` option which allows you to change the `Content-Type` that the middleware will parse.
+All the parsers accept a `type` option which allows you to change the
+`Content-Type` that the middleware will parse.
 
 
 ```js
 ```js
 // parse various different custom JSON types as JSON
 // parse various different custom JSON types as JSON
@@ -180,13 +328,13 @@ app.use(bodyParser.text({ type: 'text/html' }))
 
 
 [MIT](LICENSE)
 [MIT](LICENSE)
 
 
-[npm-image]: https://img.shields.io/npm/v/body-parser.svg?style=flat
+[npm-image]: https://img.shields.io/npm/v/body-parser.svg
 [npm-url]: https://npmjs.org/package/body-parser
 [npm-url]: https://npmjs.org/package/body-parser
-[travis-image]: https://img.shields.io/travis/expressjs/body-parser.svg?style=flat
+[travis-image]: https://img.shields.io/travis/expressjs/body-parser/master.svg
 [travis-url]: https://travis-ci.org/expressjs/body-parser
 [travis-url]: https://travis-ci.org/expressjs/body-parser
-[coveralls-image]: https://img.shields.io/coveralls/expressjs/body-parser.svg?style=flat
+[coveralls-image]: https://img.shields.io/coveralls/expressjs/body-parser/master.svg
 [coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master
 [coveralls-url]: https://coveralls.io/r/expressjs/body-parser?branch=master
-[downloads-image]: https://img.shields.io/npm/dm/body-parser.svg?style=flat
+[downloads-image]: https://img.shields.io/npm/dm/body-parser.svg
 [downloads-url]: https://npmjs.org/package/body-parser
 [downloads-url]: https://npmjs.org/package/body-parser
-[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
 [gratipay-url]: https://www.gratipay.com/dougwilson/
 [gratipay-url]: https://www.gratipay.com/dougwilson/

+ 10 - 0
node_modules/body-parser/index.js

@@ -12,8 +12,18 @@ var deprecate = require('depd')('body-parser')
 var fs = require('fs')
 var fs = require('fs')
 var path = require('path')
 var path = require('path')
 
 
+/**
+ * @typedef Parsers
+ * @type {function}
+ * @property {function} json
+ * @property {function} raw
+ * @property {function} text
+ * @property {function} urlencoded
+ */
+
 /**
 /**
  * Module exports.
  * Module exports.
+ * @type {Parsers}
  */
  */
 
 
 exports = module.exports = deprecate.function(bodyParser,
 exports = module.exports = deprecate.function(bodyParser,

+ 22 - 13
node_modules/body-parser/lib/read.js

@@ -1,6 +1,6 @@
 /*!
 /*!
  * body-parser
  * body-parser
- * Copyright(c) 2014 Douglas Christopher Wilson
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
  * MIT Licensed
  * MIT Licensed
  */
  */
 
 
@@ -11,7 +11,6 @@
 var getBody = require('raw-body')
 var getBody = require('raw-body')
 var iconv = require('iconv-lite')
 var iconv = require('iconv-lite')
 var onFinished = require('on-finished')
 var onFinished = require('on-finished')
-var typer = require('media-typer')
 var zlib = require('zlib')
 var zlib = require('zlib')
 
 
 /**
 /**
@@ -27,39 +26,42 @@ module.exports = read
  * @param {object} res
  * @param {object} res
  * @param {function} next
  * @param {function} next
  * @param {function} parse
  * @param {function} parse
- * @param {object} options
+ * @param {function} debug
+ * @param {object} [options]
  * @api private
  * @api private
  */
  */
 
 
-function read(req, res, next, parse, options) {
+function read(req, res, next, parse, debug, options) {
   var length
   var length
   var stream
   var stream
 
 
   // flag as parsed
   // flag as parsed
   req._body = true
   req._body = true
 
 
+  var opts = options || {}
+
   try {
   try {
-    stream = contentstream(req, options.inflate)
+    stream = contentstream(req, debug, opts.inflate)
     length = stream.length
     length = stream.length
     delete stream.length
     delete stream.length
   } catch (err) {
   } catch (err) {
     return next(err)
     return next(err)
   }
   }
 
 
-  options = options || {}
-  options.length = length
+  opts.length = length
 
 
-  var encoding = options.encoding !== null
-    ? options.encoding || 'utf-8'
+  var encoding = opts.encoding !== null
+    ? opts.encoding || 'utf-8'
     : null
     : null
-  var verify = options.verify
+  var verify = opts.verify
 
 
-  options.encoding = verify
+  opts.encoding = verify
     ? null
     ? null
     : encoding
     : encoding
 
 
   // read body
   // read body
-  getBody(stream, options, function (err, body) {
+  debug('read body')
+  getBody(stream, opts, function (err, body) {
     if (err) {
     if (err) {
       if (!err.status) {
       if (!err.status) {
         err.status = 400
         err.status = 400
@@ -83,6 +85,7 @@ function read(req, res, next, parse, options) {
     // verify
     // verify
     if (verify) {
     if (verify) {
       try {
       try {
+        debug('verify body')
         verify(req, res, body, encoding)
         verify(req, res, body, encoding)
       } catch (err) {
       } catch (err) {
         if (!err.status) err.status = 403
         if (!err.status) err.status = 403
@@ -92,6 +95,7 @@ function read(req, res, next, parse, options) {
 
 
     // parse
     // parse
     try {
     try {
+      debug('parse body')
       body = typeof body !== 'string' && encoding !== null
       body = typeof body !== 'string' && encoding !== null
         ? iconv.decode(body, encoding)
         ? iconv.decode(body, encoding)
         : body
         : body
@@ -112,17 +116,20 @@ function read(req, res, next, parse, options) {
  * Get the content stream of the request.
  * Get the content stream of the request.
  *
  *
  * @param {object} req
  * @param {object} req
+ * @param {function} debug
  * @param {boolean} [inflate=true]
  * @param {boolean} [inflate=true]
  * @return {object}
  * @return {object}
  * @api private
  * @api private
  */
  */
 
 
-function contentstream(req, inflate) {
+function contentstream(req, debug, inflate) {
   var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase()
   var encoding = (req.headers['content-encoding'] || 'identity').toLowerCase()
   var err
   var err
   var length = req.headers['content-length']
   var length = req.headers['content-length']
   var stream
   var stream
 
 
+  debug('content-encoding "%s"', encoding)
+
   if (inflate === false && encoding !== 'identity') {
   if (inflate === false && encoding !== 'identity') {
     err = new Error('content encoding unsupported')
     err = new Error('content encoding unsupported')
     err.status = 415
     err.status = 415
@@ -132,10 +139,12 @@ function contentstream(req, inflate) {
   switch (encoding) {
   switch (encoding) {
     case 'deflate':
     case 'deflate':
       stream = zlib.createInflate()
       stream = zlib.createInflate()
+      debug('inflate body')
       req.pipe(stream)
       req.pipe(stream)
       break
       break
     case 'gzip':
     case 'gzip':
       stream = zlib.createGunzip()
       stream = zlib.createGunzip()
+      debug('gunzip body')
       req.pipe(stream)
       req.pipe(stream)
       break
       break
     case 'identity':
     case 'identity':

+ 66 - 10
node_modules/body-parser/lib/types/json.js

@@ -1,7 +1,7 @@
 /*!
 /*!
  * body-parser
  * body-parser
  * Copyright(c) 2014 Jonathan Ong
  * Copyright(c) 2014 Jonathan Ong
- * Copyright(c) 2014 Douglas Christopher Wilson
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
  * MIT Licensed
  * MIT Licensed
  */
  */
 
 
@@ -10,8 +10,9 @@
  */
  */
 
 
 var bytes = require('bytes')
 var bytes = require('bytes')
+var contentType = require('content-type')
+var debug = require('debug')('body-parser:json')
 var read = require('../read')
 var read = require('../read')
-var typer = require('media-typer')
 var typeis = require('type-is')
 var typeis = require('type-is')
 
 
 /**
 /**
@@ -22,9 +23,17 @@ module.exports = json
 
 
 /**
 /**
  * RegExp to match the first non-space in a string.
  * RegExp to match the first non-space in a string.
+ *
+ * Allowed whitespace is defined in RFC 7159:
+ *
+ *    ws = *(
+ *            %x20 /              ; Space
+ *            %x09 /              ; Horizontal tab
+ *            %x0A /              ; Line feed or New line
+ *            %x0D )              ; Carriage return
  */
  */
 
 
-var firstcharRegExp = /^\s*(.)/
+var firstcharRegExp = /^[\x20\x09\x0a\x0d]*(.)/
 
 
 /**
 /**
  * Create a middleware to parse JSON bodies.
  * Create a middleware to parse JSON bodies.
@@ -50,6 +59,11 @@ function json(options) {
     throw new TypeError('option verify must be function')
     throw new TypeError('option verify must be function')
   }
   }
 
 
+  // create the appropriate type checking function
+  var shouldParse = typeof type !== 'function'
+    ? typeChecker(type)
+    : type
+
   function parse(body) {
   function parse(body) {
     if (body.length === 0) {
     if (body.length === 0) {
       // special-case empty json body, as it's a common client-side mistake
       // special-case empty json body, as it's a common client-side mistake
@@ -61,31 +75,45 @@ function json(options) {
       var first = firstchar(body)
       var first = firstchar(body)
 
 
       if (first !== '{' && first !== '[') {
       if (first !== '{' && first !== '[') {
+        debug('strict violation')
         throw new Error('invalid json')
         throw new Error('invalid json')
       }
       }
     }
     }
 
 
+    debug('parse json')
     return JSON.parse(body, reviver)
     return JSON.parse(body, reviver)
   }
   }
 
 
   return function jsonParser(req, res, next) {
   return function jsonParser(req, res, next) {
-    if (req._body) return next()
+    if (req._body) {
+      return debug('body already parsed'), next()
+    }
+
     req.body = req.body || {}
     req.body = req.body || {}
 
 
-    if (!typeis(req, type)) return next()
+    // skip requests without bodies
+    if (!typeis.hasBody(req)) {
+      return debug('skip empty body'), next()
+    }
+
+    debug('content-type %s', JSON.stringify(req.headers['content-type']))
+
+    // determine if request should be parsed
+    if (!shouldParse(req)) {
+      return debug('skip parsing'), next()
+    }
 
 
-    // RFC 7159 sec 8.1
-    var charset = (typer.parse(req).parameters.charset || 'utf-8').toLowerCase()
+    // assert charset per RFC 7159 sec 8.1
+    var charset = getCharset(req) || 'utf-8'
     if (charset.substr(0, 4) !== 'utf-') {
     if (charset.substr(0, 4) !== 'utf-') {
       var err = new Error('unsupported charset "' + charset.toUpperCase() + '"')
       var err = new Error('unsupported charset "' + charset.toUpperCase() + '"')
       err.charset = charset
       err.charset = charset
       err.status = 415
       err.status = 415
-      next(err)
-      return
+      return debug('invalid charset'), next(err)
     }
     }
 
 
     // read
     // read
-    read(req, res, next, parse, {
+    read(req, res, next, parse, debug, {
       encoding: charset,
       encoding: charset,
       inflate: inflate,
       inflate: inflate,
       limit: limit,
       limit: limit,
@@ -107,3 +135,31 @@ function firstchar(str) {
   var match = firstcharRegExp.exec(str)
   var match = firstcharRegExp.exec(str)
   return match ? match[1] : ''
   return match ? match[1] : ''
 }
 }
+
+/**
+ * Get the charset of a request.
+ *
+ * @param {object} req
+ * @api private
+ */
+
+function getCharset(req) {
+  try {
+    return contentType.parse(req).parameters.charset.toLowerCase()
+  } catch (e) {
+    return undefined
+  }
+}
+
+/**
+ * Get the simple type checker.
+ *
+ * @param {string} type
+ * @return {function}
+ */
+
+function typeChecker(type) {
+  return function checkType(req) {
+    return Boolean(typeis(req, type))
+  }
+}

+ 36 - 4
node_modules/body-parser/lib/types/raw.js

@@ -1,6 +1,6 @@
 /*!
 /*!
  * body-parser
  * body-parser
- * Copyright(c) 2014 Douglas Christopher Wilson
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
  * MIT Licensed
  * MIT Licensed
  */
  */
 
 
@@ -9,6 +9,7 @@
  */
  */
 
 
 var bytes = require('bytes')
 var bytes = require('bytes')
+var debug = require('debug')('body-parser:raw')
 var read = require('../read')
 var read = require('../read')
 var typeis = require('type-is')
 var typeis = require('type-is')
 
 
@@ -40,18 +41,36 @@ function raw(options) {
     throw new TypeError('option verify must be function')
     throw new TypeError('option verify must be function')
   }
   }
 
 
+  // create the appropriate type checking function
+  var shouldParse = typeof type !== 'function'
+    ? typeChecker(type)
+    : type
+
   function parse(buf) {
   function parse(buf) {
     return buf
     return buf
   }
   }
 
 
   return function rawParser(req, res, next) {
   return function rawParser(req, res, next) {
-    if (req._body) return next()
+    if (req._body) {
+      return debug('body already parsed'), next()
+    }
+
     req.body = req.body || {}
     req.body = req.body || {}
 
 
-    if (!typeis(req, type)) return next()
+    // skip requests without bodies
+    if (!typeis.hasBody(req)) {
+      return debug('skip empty body'), next()
+    }
+
+    debug('content-type %s', JSON.stringify(req.headers['content-type']))
+
+    // determine if request should be parsed
+    if (!shouldParse(req)) {
+      return debug('skip parsing'), next()
+    }
 
 
     // read
     // read
-    read(req, res, next, parse, {
+    read(req, res, next, parse, debug, {
       encoding: null,
       encoding: null,
       inflate: inflate,
       inflate: inflate,
       limit: limit,
       limit: limit,
@@ -59,3 +78,16 @@ function raw(options) {
     })
     })
   }
   }
 }
 }
+
+/**
+ * Get the simple type checker.
+ *
+ * @param {string} type
+ * @return {function}
+ */
+
+function typeChecker(type) {
+  return function checkType(req) {
+    return Boolean(typeis(req, type))
+  }
+}

+ 53 - 6
node_modules/body-parser/lib/types/text.js

@@ -1,6 +1,6 @@
 /*!
 /*!
  * body-parser
  * body-parser
- * Copyright(c) 2014 Douglas Christopher Wilson
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
  * MIT Licensed
  * MIT Licensed
  */
  */
 
 
@@ -9,9 +9,10 @@
  */
  */
 
 
 var bytes = require('bytes')
 var bytes = require('bytes')
+var contentType = require('content-type')
+var debug = require('debug')('body-parser:text')
 var read = require('../read')
 var read = require('../read')
 var typeis = require('type-is')
 var typeis = require('type-is')
-var typer = require('media-typer')
 
 
 /**
 /**
  * Module exports.
  * Module exports.
@@ -42,21 +43,39 @@ function text(options) {
     throw new TypeError('option verify must be function')
     throw new TypeError('option verify must be function')
   }
   }
 
 
+  // create the appropriate type checking function
+  var shouldParse = typeof type !== 'function'
+    ? typeChecker(type)
+    : type
+
   function parse(buf) {
   function parse(buf) {
     return buf
     return buf
   }
   }
 
 
   return function textParser(req, res, next) {
   return function textParser(req, res, next) {
-    if (req._body) return next()
+    if (req._body) {
+      return debug('body already parsed'), next()
+    }
+
     req.body = req.body || {}
     req.body = req.body || {}
 
 
-    if (!typeis(req, type)) return next()
+    // skip requests without bodies
+    if (!typeis.hasBody(req)) {
+      return debug('skip empty body'), next()
+    }
+
+    debug('content-type %s', JSON.stringify(req.headers['content-type']))
+
+    // determine if request should be parsed
+    if (!shouldParse(req)) {
+      return debug('skip parsing'), next()
+    }
 
 
     // get charset
     // get charset
-    var charset = typer.parse(req).parameters.charset || defaultCharset
+    var charset = getCharset(req) || defaultCharset
 
 
     // read
     // read
-    read(req, res, next, parse, {
+    read(req, res, next, parse, debug, {
       encoding: charset,
       encoding: charset,
       inflate: inflate,
       inflate: inflate,
       limit: limit,
       limit: limit,
@@ -64,3 +83,31 @@ function text(options) {
     })
     })
   }
   }
 }
 }
+
+/**
+ * Get the charset of a request.
+ *
+ * @param {object} req
+ * @api private
+ */
+
+function getCharset(req) {
+  try {
+    return contentType.parse(req).parameters.charset.toLowerCase()
+  } catch (e) {
+    return undefined
+  }
+}
+
+/**
+ * Get the simple type checker.
+ *
+ * @param {string} type
+ * @return {function}
+ */
+
+function typeChecker(type) {
+  return function checkType(req) {
+    return Boolean(typeis(req, type))
+  }
+}

+ 78 - 24
node_modules/body-parser/lib/types/urlencoded.js

@@ -1,7 +1,7 @@
 /*!
 /*!
  * body-parser
  * body-parser
  * Copyright(c) 2014 Jonathan Ong
  * Copyright(c) 2014 Jonathan Ong
- * Copyright(c) 2014 Douglas Christopher Wilson
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
  * MIT Licensed
  * MIT Licensed
  */
  */
 
 
@@ -10,9 +10,10 @@
  */
  */
 
 
 var bytes = require('bytes')
 var bytes = require('bytes')
+var contentType = require('content-type')
+var debug = require('debug')('body-parser:urlencoded')
 var deprecate = require('depd')('body-parser')
 var deprecate = require('depd')('body-parser')
 var read = require('../read')
 var read = require('../read')
-var typer = require('media-typer')
 var typeis = require('type-is')
 var typeis = require('type-is')
 
 
 /**
 /**
@@ -55,10 +56,16 @@ function urlencoded(options){
     throw new TypeError('option verify must be function')
     throw new TypeError('option verify must be function')
   }
   }
 
 
+  // create the appropriate query parser
   var queryparse = extended
   var queryparse = extended
     ? extendedparser(options)
     ? extendedparser(options)
     : simpleparser(options)
     : simpleparser(options)
 
 
+  // create the appropriate type checking function
+  var shouldParse = typeof type !== 'function'
+    ? typeChecker(type)
+    : type
+
   function parse(body) {
   function parse(body) {
     return body.length
     return body.length
       ? queryparse(body)
       ? queryparse(body)
@@ -66,22 +73,36 @@ function urlencoded(options){
   }
   }
 
 
   return function urlencodedParser(req, res, next) {
   return function urlencodedParser(req, res, next) {
-    if (req._body) return next();
+    if (req._body) {
+      return debug('body already parsed'), next()
+    }
+
     req.body = req.body || {}
     req.body = req.body || {}
 
 
-    if (!typeis(req, type)) return next();
+    // skip requests without bodies
+    if (!typeis.hasBody(req)) {
+      return debug('skip empty body'), next()
+    }
+
+    debug('content-type %s', JSON.stringify(req.headers['content-type']))
+
+    // determine if request should be parsed
+    if (!shouldParse(req)) {
+      return debug('skip parsing'), next()
+    }
 
 
-    var charset = (typer.parse(req).parameters.charset || 'utf-8').toLowerCase()
+    // assert charset
+    var charset = getCharset(req) || 'utf-8'
     if (charset !== 'utf-8') {
     if (charset !== 'utf-8') {
       var err = new Error('unsupported charset "' + charset.toUpperCase() + '"')
       var err = new Error('unsupported charset "' + charset.toUpperCase() + '"')
       err.charset = charset
       err.charset = charset
       err.status = 415
       err.status = 415
-      next(err)
-      return
+      return debug('invalid charset'), next(err)
     }
     }
 
 
     // read
     // read
-    read(req, res, next, parse, {
+    read(req, res, next, parse, debug, {
+      debug: debug,
       encoding: charset,
       encoding: charset,
       inflate: inflate,
       inflate: inflate,
       limit: limit,
       limit: limit,
@@ -110,35 +131,51 @@ function extendedparser(options) {
     parameterLimit = parameterLimit | 0
     parameterLimit = parameterLimit | 0
   }
   }
 
 
-  var opts = {
-    arrayLimit: 100,
-    parameterLimit: parameterLimit
-  }
-
   return function queryparse(body) {
   return function queryparse(body) {
-    if (overlimit(body, parameterLimit)) {
+    var paramCount = parameterCount(body, parameterLimit)
+
+    if (paramCount === undefined) {
       var err = new Error('too many parameters')
       var err = new Error('too many parameters')
       err.status = 413
       err.status = 413
+      debug('too many parameters')
       throw err
       throw err
     }
     }
 
 
-    return parse(body, opts)
+    var arrayLimit = Math.max(100, paramCount)
+
+    debug('parse extended urlencoding')
+    return parse(body, {
+      arrayLimit: arrayLimit,
+      depth: Infinity,
+      parameterLimit: parameterLimit
+    })
   }
   }
 }
 }
 
 
 /**
 /**
- * Determine if the parameter count is over the limit.
+ * Get the charset of a request.
  *
  *
- * @param {string} body
- * @param {number} limit
+ * @param {object} req
  * @api private
  * @api private
  */
  */
 
 
-function overlimit(body, limit) {
-  if (limit === Infinity) {
-    return false
+function getCharset(req) {
+  try {
+    return contentType.parse(req).parameters.charset.toLowerCase()
+  } catch (e) {
+    return undefined
   }
   }
+}
 
 
+/**
+ * Count the number of parameters, stopping once limit reached
+ *
+ * @param {string} body
+ * @param {number} limit
+ * @api private
+ */
+
+function parameterCount(body, limit) {
   var count = 0
   var count = 0
   var index = 0
   var index = 0
 
 
@@ -147,11 +184,11 @@ function overlimit(body, limit) {
     index++
     index++
 
 
     if (count === limit) {
     if (count === limit) {
-      return true
+      return undefined
     }
     }
   }
   }
 
 
-  return false
+  return count
 }
 }
 
 
 /**
 /**
@@ -196,12 +233,29 @@ function simpleparser(options) {
   }
   }
 
 
   return function queryparse(body) {
   return function queryparse(body) {
-    if (overlimit(body, parameterLimit)) {
+    var paramCount = parameterCount(body, parameterLimit)
+
+    if (paramCount === undefined) {
       var err = new Error('too many parameters')
       var err = new Error('too many parameters')
       err.status = 413
       err.status = 413
+      debug('too many parameters')
       throw err
       throw err
     }
     }
 
 
+    debug('parse urlencoding')
     return parse(body, undefined, undefined, {maxKeys: parameterLimit})
     return parse(body, undefined, undefined, {maxKeys: parameterLimit})
   }
   }
 }
 }
+
+/**
+ * Get the simple type checker.
+ *
+ * @param {string} type
+ * @return {function}
+ */
+
+function typeChecker(type) {
+  return function checkType(req) {
+    return Boolean(typeis(req, type))
+  }
+}

File diff suppressed because it is too large
+ 0 - 0
node_modules/body-parser/node_modules/bytes/package.json


File diff suppressed because it is too large
+ 1 - 2
node_modules/body-parser/node_modules/depd/package.json


+ 1 - 0
node_modules/body-parser/node_modules/iconv-lite/.npmignore

@@ -3,3 +3,4 @@
 generation
 generation
 test
 test
 wiki
 wiki
+coverage

+ 3 - 3
node_modules/body-parser/node_modules/iconv-lite/.travis.yml

@@ -1,5 +1,5 @@
  language: node_js
  language: node_js
  node_js:
  node_js:
-   - 0.8
-   - 0.10
-   - 0.11
+   #- "0.8"
+   - "0.10"
+   - "0.11"

+ 23 - 0
node_modules/body-parser/node_modules/iconv-lite/Changelog.md

@@ -1,17 +1,40 @@
 
 
+# 0.4.7 / 2015-02-05
+
+ * stop official support of Node.js v0.8. Should still work, but no guarantees.
+   reason: Packages needed for testing are hard to get on Travis CI.
+ * work in environment where Object.prototype is monkey patched with enumerable 
+   props (#89).
+
+
+# 0.4.6 / 2015-01-12
+ 
+ * fix rare aliases of single-byte encodings (thanks @mscdex)
+ * double the timeout for dbcs tests to make them less flaky on travis
+
+
+# 0.4.5 / 2014-11-20
+
+ * fix windows-31j and x-sjis encoding support (@nleush)
+ * minor fix: undefined variable reference when internal error happens
+
+
 # 0.4.4 / 2014-07-16
 # 0.4.4 / 2014-07-16
 
 
  * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3)
  * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3)
  * fixed streaming base64 encoding
  * fixed streaming base64 encoding
 
 
+
 # 0.4.3 / 2014-06-14
 # 0.4.3 / 2014-06-14
 
 
  * added encodings UTF-16BE and UTF-16 with BOM
  * added encodings UTF-16BE and UTF-16 with BOM
 
 
+
 # 0.4.2 / 2014-06-12
 # 0.4.2 / 2014-06-12
 
 
  * don't throw exception if `extendNodeEncodings()` is called more than once
  * don't throw exception if `extendNodeEncodings()` is called more than once
 
 
+
 # 0.4.1 / 2014-06-11
 # 0.4.1 / 2014-06-11
 
 
  * codepage 808 added
  * codepage 808 added

+ 10 - 3
node_modules/body-parser/node_modules/iconv-lite/README.md

@@ -3,7 +3,8 @@
 <!-- [![Build Status](https://secure.travis-ci.org/ashtuchkin/iconv-lite.png?branch=master)](http://travis-ci.org/ashtuchkin/iconv-lite) -->
 <!-- [![Build Status](https://secure.travis-ci.org/ashtuchkin/iconv-lite.png?branch=master)](http://travis-ci.org/ashtuchkin/iconv-lite) -->
 
 
  * Doesn't need native code compilation. Works on Windows and in sandboxed environments like [Cloud9](http://c9.io).
  * Doesn't need native code compilation. Works on Windows and in sandboxed environments like [Cloud9](http://c9.io).
- * Used in popular projects like [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others.
+ * Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser), 
+   [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others.
  * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison).
  * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison).
  * Intuitive encode/decode API
  * Intuitive encode/decode API
  * Streaming support for Node v0.10+
  * Streaming support for Node v0.10+
@@ -118,7 +119,9 @@ Note: your results may vary, so please always check on your hardware.
 ## Notes
 ## Notes
 
 
 When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding).  
 When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding).  
-Untranslatable characters are set to � or ?. No transliteration is currently supported.
+Untranslatable characters are set to � or ?. No transliteration is currently supported.  
+Uses BOM to determine endianness, but doesn't remove it. Use ['strip-bom' module](https://github.com/sindresorhus/strip-bom).  
+Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77).  
 
 
 ## Testing
 ## Testing
 
 
@@ -130,8 +133,12 @@ $ npm test
     
     
 $ # To view performance:
 $ # To view performance:
 $ node test/performance.js
 $ node test/performance.js
+
+$ # To view test coverage:
+$ npm run coverage
+$ open coverage/lcov-report/index.html
 ```
 ```
 
 
 ## Adoption
 ## Adoption
 [![NPM](https://nodei.co/npm-dl/iconv-lite.png)](https://nodei.co/npm/iconv-lite/)
 [![NPM](https://nodei.co/npm-dl/iconv-lite.png)](https://nodei.co/npm/iconv-lite/)
-
+[![Codeship Status for ashtuchkin/iconv-lite](https://www.codeship.io/projects/81670840-fa72-0131-4520-4a01a6c01acc/status)](https://www.codeship.io/projects/29053)

+ 0 - 54
node_modules/body-parser/node_modules/iconv-lite/README.md~

@@ -1,54 +0,0 @@
-iconv-lite - native javascript conversion between character encodings.
-======================================================================
-
-## Usage
-
-    var iconv = require('iconv-lite');
-    
-    // Convert from an encoded buffer to string.
-    str = iconv.fromEncoding(buf, 'win-1251');
-    // Or
-    str = iconv.decode(buf, 'win-1251');
-    
-    // Convert from string to an encoded buffer.
-    buf = iconv.toEncoding("Sample input string", 'win-1251');
-    // Or
-    buf = iconv.encode("Sample input string", 'win-1251');
-
-## Supported encodings
-
-Currently only a small part of encodings supported:
-
-*   All node.js native encodings: 'utf8', 'ucs2', 'ascii', 'binary', 'base64'.
-*   'latin1'
-*   Cyrillic encodings: 'windows-1251', 'koi8-r', 'iso 8859-5'.
-
-Other encodings are easy to add, see the source. Please, participate.
-
-
-## Encoding/decoding speed
-
-Comparison with iconv module (1000 times 256kb, on Core i5/2.5 GHz).
-
-    Operation\module            iconv       iconv-lite (this)
-    toEncoding('win1251')       19.57 mb/s  49.04 mb/s
-    fromEncoding('win1251')     16.39 mb/s  24.11 mb/s
-
-
-## Notes
-
-This module is JavaScript-only, thus can be used in a sandboxed environment like [Cloud9](http://c9.io).
-
-Untranslatable characters are set to '?'. No transliteration is currently supported, pull requests are welcome.
-
-## Testing
-
-    npm install --dev iconv-lite
-    vows
-
-## TODO
-
-*   Support streaming character conversion, something like util.pipe(req, iconv.fromEncodingStream('latin1')).
-*   Add more encodings.
-*   Add transliteration (best fit char).
-*   Add tests and correct support of variable-byte encodings (currently work is delegated to node).

+ 6 - 3
node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-codec.js

@@ -80,8 +80,11 @@ function DBCSCodec(options) {
     this._fillEncodeTable(0, 0, skipEncodeChars);
     this._fillEncodeTable(0, 0, skipEncodeChars);
 
 
     // Add more encoding pairs when needed.
     // Add more encoding pairs when needed.
-    for (var uChar in options.encodeAdd || {})
-        this._setEncodeChar(uChar.charCodeAt(0), options.encodeAdd[uChar]);
+    if (options.encodeAdd) {
+        for (var uChar in options.encodeAdd)
+            if (Object.prototype.hasOwnProperty.call(options.encodeAdd, uChar))
+                this._setEncodeChar(uChar.charCodeAt(0), options.encodeAdd[uChar]);
+    }
 
 
     this.defCharSB  = this.encodeTable[0][options.iconv.defaultCharSingleByte.charCodeAt(0)];
     this.defCharSB  = this.encodeTable[0][options.iconv.defaultCharSingleByte.charCodeAt(0)];
     if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?'];
     if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?'];
@@ -503,7 +506,7 @@ function decoderDBCSWrite(buf) {
             uCode = seq[seq.length-1];
             uCode = seq[seq.length-1];
         }
         }
         else
         else
-            throw new Error("Unknown table value when decoding: " + val);
+            throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte);
 
 
         // Write the character to buffer, handling higher planes using surrogate pair.
         // Write the character to buffer, handling higher planes using surrogate pair.
         if (uCode > 0xFFFF) { 
         if (uCode > 0xFFFF) { 

+ 3 - 3
node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-data.js

@@ -47,8 +47,8 @@ module.exports = {
     'csshiftjis': 'shiftjis',
     'csshiftjis': 'shiftjis',
     'mskanji': 'shiftjis',
     'mskanji': 'shiftjis',
     'sjis': 'shiftjis',
     'sjis': 'shiftjis',
-    'windows-31j': 'shiftjis',
-    'x-sjis': 'shiftjis',
+    'windows31j': 'shiftjis',
+    'xsjis': 'shiftjis',
     'windows932': 'shiftjis',
     'windows932': 'shiftjis',
     '932': 'shiftjis',
     '932': 'shiftjis',
     'cp932': 'shiftjis',
     'cp932': 'shiftjis',
@@ -165,4 +165,4 @@ module.exports = {
     'csbig5': 'big5hkscs',
     'csbig5': 'big5hkscs',
     'xxbig5': 'big5hkscs',
     'xxbig5': 'big5hkscs',
 
 
-};
+};

+ 2 - 1
node_modules/body-parser/node_modules/iconv-lite/encodings/index.js

@@ -16,5 +16,6 @@ var modules = [
 for (var i = 0; i < modules.length; i++) {
 for (var i = 0; i < modules.length; i++) {
     var module = modules[i];
     var module = modules[i];
     for (var enc in module)
     for (var enc in module)
-        exports[enc] = module[enc];
+        if (Object.prototype.hasOwnProperty.call(module, enc))
+            exports[enc] = module[enc];
 }
 }

+ 6 - 6
node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data.js

@@ -19,15 +19,15 @@ module.exports = {
     // Aliases of generated encodings.
     // Aliases of generated encodings.
     "ascii8bit": "ascii",
     "ascii8bit": "ascii",
     "usascii": "ascii",
     "usascii": "ascii",
-    "ansix3.4": "ascii",
-    "ansix3.41968": "ascii",
-    "ansix3.41986": "ascii",
+    "ansix34": "ascii",
+    "ansix341968": "ascii",
+    "ansix341986": "ascii",
     "csascii": "ascii",
     "csascii": "ascii",
     "cp367": "ascii",
     "cp367": "ascii",
     "ibm367": "ascii",
     "ibm367": "ascii",
     "isoir6": "ascii",
     "isoir6": "ascii",
     "iso646us": "ascii",
     "iso646us": "ascii",
-    "iso646.irv": "ascii",
+    "iso646irv": "ascii",
     "us": "ascii",
     "us": "ascii",
 
 
     "latin1": "iso88591",
     "latin1": "iso88591",
@@ -110,8 +110,8 @@ module.exports = {
     "isoceltic": "iso885914",
     "isoceltic": "iso885914",
 
 
     "tis6200": "tis620",
     "tis6200": "tis620",
-    "tis620.25291": "tis620",
-    "tis620.25330": "tis620",
+    "tis62025291": "tis620",
+    "tis62025330": "tis620",
 
 
     "10000": "macroman",
     "10000": "macroman",
     "10006": "macgreek",
     "10006": "macgreek",

File diff suppressed because it is too large
+ 10 - 24
node_modules/body-parser/node_modules/iconv-lite/package.json


+ 0 - 22
node_modules/body-parser/node_modules/media-typer/HISTORY.md

@@ -1,22 +0,0 @@
-0.3.0 / 2014-09-07
-==================
-
-  * Support Node.js 0.6
-  * Throw error when parameter format invalid on parse
-
-0.2.0 / 2014-06-18
-==================
-
-  * Add `typer.format()` to format media types
-
-0.1.0 / 2014-06-17
-==================
-
-  * Accept `req` as argument to `parse`
-  * Accept `res` as argument to `parse`
-  * Parse media type with extra LWS between type and first parameter
-
-0.0.0 / 2014-06-13
-==================
-
-  * Initial implementation

+ 0 - 22
node_modules/body-parser/node_modules/media-typer/LICENSE

@@ -1,22 +0,0 @@
-(The MIT License)
-
-Copyright (c) 2014 Douglas Christopher Wilson
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 0 - 81
node_modules/body-parser/node_modules/media-typer/README.md

@@ -1,81 +0,0 @@
-# media-typer
-
-[![NPM Version][npm-image]][npm-url]
-[![NPM Downloads][downloads-image]][downloads-url]
-[![Node.js Version][node-version-image]][node-version-url]
-[![Build Status][travis-image]][travis-url]
-[![Test Coverage][coveralls-image]][coveralls-url]
-
-Simple RFC 6838 media type parser
-
-## Installation
-
-```sh
-$ npm install media-typer
-```
-
-## API
-
-```js
-var typer = require('media-typer')
-```
-
-### typer.parse(string)
-
-```js
-var obj = typer.parse('image/svg+xml; charset=utf-8')
-```
-
-Parse a media type string. This will return an object with the following
-properties (examples are shown for the string `'image/svg+xml; charset=utf-8'`):
-
- - `type`: The type of the media type (always lower case). Example: `'image'`
-
- - `subtype`: The subtype of the media type (always lower case). Example: `'svg'`
-
- - `suffix`: The suffix of the media type (always lower case). Example: `'xml'`
-
- - `parameters`: An object of the parameters in the media type (name of parameter always lower case). Example: `{charset: 'utf-8'}`
-
-### typer.parse(req)
-
-```js
-var obj = typer.parse(req)
-```
-
-Parse the `content-type` header from the given `req`. Short-cut for
-`typer.parse(req.headers['content-type'])`.
-
-### typer.parse(res)
-
-```js
-var obj = typer.parse(res)
-```
-
-Parse the `content-type` header set on the given `res`. Short-cut for
-`typer.parse(res.getHeader('content-type'))`.
-
-### typer.format(obj)
-
-```js
-var obj = typer.format({type: 'image', subtype: 'svg', suffix: 'xml'})
-```
-
-Format an object into a media type string. This will return a string of the
-mime type for the given object. For the properties of the object, see the
-documentation for `typer.parse(string)`.
-
-## License
-
-[MIT](LICENSE)
-
-[npm-image]: https://img.shields.io/npm/v/media-typer.svg?style=flat
-[npm-url]: https://npmjs.org/package/media-typer
-[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
-[node-version-url]: http://nodejs.org/download/
-[travis-image]: https://img.shields.io/travis/jshttp/media-typer.svg?style=flat
-[travis-url]: https://travis-ci.org/jshttp/media-typer
-[coveralls-image]: https://img.shields.io/coveralls/jshttp/media-typer.svg?style=flat
-[coveralls-url]: https://coveralls.io/r/jshttp/media-typer
-[downloads-image]: https://img.shields.io/npm/dm/media-typer.svg?style=flat
-[downloads-url]: https://npmjs.org/package/media-typer

+ 0 - 270
node_modules/body-parser/node_modules/media-typer/index.js

@@ -1,270 +0,0 @@
-/*!
- * media-typer
- * Copyright(c) 2014 Douglas Christopher Wilson
- * MIT Licensed
- */
-
-/**
- * RegExp to match *( ";" parameter ) in RFC 2616 sec 3.7
- *
- * parameter     = token "=" ( token | quoted-string )
- * token         = 1*<any CHAR except CTLs or separators>
- * separators    = "(" | ")" | "<" | ">" | "@"
- *               | "," | ";" | ":" | "\" | <">
- *               | "/" | "[" | "]" | "?" | "="
- *               | "{" | "}" | SP | HT
- * quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
- * qdtext        = <any TEXT except <">>
- * quoted-pair   = "\" CHAR
- * CHAR          = <any US-ASCII character (octets 0 - 127)>
- * TEXT          = <any OCTET except CTLs, but including LWS>
- * LWS           = [CRLF] 1*( SP | HT )
- * CRLF          = CR LF
- * CR            = <US-ASCII CR, carriage return (13)>
- * LF            = <US-ASCII LF, linefeed (10)>
- * SP            = <US-ASCII SP, space (32)>
- * SHT           = <US-ASCII HT, horizontal-tab (9)>
- * CTL           = <any US-ASCII control character (octets 0 - 31) and DEL (127)>
- * OCTET         = <any 8-bit sequence of data>
- */
-var paramRegExp = /; *([!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) *= *("(?:[ !\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u0020-\u007e])*"|[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+) */g;
-var textRegExp = /^[\u0020-\u007e\u0080-\u00ff]+$/
-var tokenRegExp = /^[!#$%&'\*\+\-\.0-9A-Z\^_`a-z\|~]+$/
-
-/**
- * RegExp to match quoted-pair in RFC 2616
- *
- * quoted-pair = "\" CHAR
- * CHAR        = <any US-ASCII character (octets 0 - 127)>
- */
-var qescRegExp = /\\([\u0000-\u007f])/g;
-
-/**
- * RegExp to match chars that must be quoted-pair in RFC 2616
- */
-var quoteRegExp = /([\\"])/g;
-
-/**
- * RegExp to match type in RFC 6838
- *
- * type-name = restricted-name
- * subtype-name = restricted-name
- * restricted-name = restricted-name-first *126restricted-name-chars
- * restricted-name-first  = ALPHA / DIGIT
- * restricted-name-chars  = ALPHA / DIGIT / "!" / "#" /
- *                          "$" / "&" / "-" / "^" / "_"
- * restricted-name-chars =/ "." ; Characters before first dot always
- *                              ; specify a facet name
- * restricted-name-chars =/ "+" ; Characters after last plus always
- *                              ; specify a structured syntax suffix
- * ALPHA =  %x41-5A / %x61-7A   ; A-Z / a-z
- * DIGIT =  %x30-39             ; 0-9
- */
-var subtypeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/
-var typeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/
-var typeRegExp = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;
-
-/**
- * Module exports.
- */
-
-exports.format = format
-exports.parse = parse
-
-/**
- * Format object to media type.
- *
- * @param {object} obj
- * @return {string}
- * @api public
- */
-
-function format(obj) {
-  if (!obj || typeof obj !== 'object') {
-    throw new TypeError('argument obj is required')
-  }
-
-  var parameters = obj.parameters
-  var subtype = obj.subtype
-  var suffix = obj.suffix
-  var type = obj.type
-
-  if (!type || !typeNameRegExp.test(type)) {
-    throw new TypeError('invalid type')
-  }
-
-  if (!subtype || !subtypeNameRegExp.test(subtype)) {
-    throw new TypeError('invalid subtype')
-  }
-
-  // format as type/subtype
-  var string = type + '/' + subtype
-
-  // append +suffix
-  if (suffix) {
-    if (!typeNameRegExp.test(suffix)) {
-      throw new TypeError('invalid suffix')
-    }
-
-    string += '+' + suffix
-  }
-
-  // append parameters
-  if (parameters && typeof parameters === 'object') {
-    var param
-    var params = Object.keys(parameters).sort()
-
-    for (var i = 0; i < params.length; i++) {
-      param = params[i]
-
-      if (!tokenRegExp.test(param)) {
-        throw new TypeError('invalid parameter name')
-      }
-
-      string += '; ' + param + '=' + qstring(parameters[param])
-    }
-  }
-
-  return string
-}
-
-/**
- * Parse media type to object.
- *
- * @param {string|object} string
- * @return {Object}
- * @api public
- */
-
-function parse(string) {
-  if (!string) {
-    throw new TypeError('argument string is required')
-  }
-
-  // support req/res-like objects as argument
-  if (typeof string === 'object') {
-    string = getcontenttype(string)
-  }
-
-  if (typeof string !== 'string') {
-    throw new TypeError('argument string is required to be a string')
-  }
-
-  var index = string.indexOf(';')
-  var type = index !== -1
-    ? string.substr(0, index)
-    : string
-
-  var key
-  var match
-  var obj = splitType(type)
-  var params = {}
-  var value
-
-  paramRegExp.lastIndex = index
-
-  while (match = paramRegExp.exec(string)) {
-    if (match.index !== index) {
-      throw new TypeError('invalid parameter format')
-    }
-
-    index += match[0].length
-    key = match[1].toLowerCase()
-    value = match[2]
-
-    if (value[0] === '"') {
-      // remove quotes and escapes
-      value = value
-        .substr(1, value.length - 2)
-        .replace(qescRegExp, '$1')
-    }
-
-    params[key] = value
-  }
-
-  if (index !== -1 && index !== string.length) {
-    throw new TypeError('invalid parameter format')
-  }
-
-  obj.parameters = params
-
-  return obj
-}
-
-/**
- * Get content-type from req/res objects.
- *
- * @param {object}
- * @return {Object}
- * @api private
- */
-
-function getcontenttype(obj) {
-  if (typeof obj.getHeader === 'function') {
-    // res-like
-    return obj.getHeader('content-type')
-  }
-
-  if (typeof obj.headers === 'object') {
-    // req-like
-    return obj.headers && obj.headers['content-type']
-  }
-}
-
-/**
- * Quote a string if necessary.
- *
- * @param {string} val
- * @return {string}
- * @api private
- */
-
-function qstring(val) {
-  var str = String(val)
-
-  // no need to quote tokens
-  if (tokenRegExp.test(str)) {
-    return str
-  }
-
-  if (str.length > 0 && !textRegExp.test(str)) {
-    throw new TypeError('invalid parameter value')
-  }
-
-  return '"' + str.replace(quoteRegExp, '\\$1') + '"'
-}
-
-/**
- * Simply "type/subtype+siffx" into parts.
- *
- * @param {string} string
- * @return {Object}
- * @api private
- */
-
-function splitType(string) {
-  var match = typeRegExp.exec(string.toLowerCase())
-
-  if (!match) {
-    throw new TypeError('invalid media type')
-  }
-
-  var type = match[1]
-  var subtype = match[2]
-  var suffix
-
-  // suffix after last +
-  var index = subtype.lastIndexOf('+')
-  if (index !== -1) {
-    suffix = subtype.substr(index + 1)
-    subtype = subtype.substr(0, index)
-  }
-
-  var obj = {
-    type: type,
-    subtype: subtype,
-    suffix: suffix
-  }
-
-  return obj
-}

+ 0 - 57
node_modules/body-parser/node_modules/media-typer/package.json

@@ -1,57 +0,0 @@
-{
-  "name": "media-typer",
-  "description": "Simple RFC 6838 media type parser and formatter",
-  "version": "0.3.0",
-  "author": {
-    "name": "Douglas Christopher Wilson",
-    "email": "doug@somethingdoug.com"
-  },
-  "license": "MIT",
-  "repository": {
-    "type": "git",
-    "url": "https://github.com/jshttp/media-typer"
-  },
-  "devDependencies": {
-    "istanbul": "0.3.2",
-    "mocha": "~1.21.4",
-    "should": "~4.0.4"
-  },
-  "files": [
-    "LICENSE",
-    "HISTORY.md",
-    "index.js"
-  ],
-  "engines": {
-    "node": ">= 0.6"
-  },
-  "scripts": {
-    "test": "mocha --reporter spec --check-leaks --bail test/",
-    "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
-    "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
-  },
-  "gitHead": "d49d41ffd0bb5a0655fa44a59df2ec0bfc835b16",
-  "bugs": {
-    "url": "https://github.com/jshttp/media-typer/issues"
-  },
-  "homepage": "https://github.com/jshttp/media-typer",
-  "_id": "media-typer@0.3.0",
-  "_shasum": "8710d7af0aa626f8fffa1ce00168545263255748",
-  "_from": "media-typer@0.3.0",
-  "_npmVersion": "1.4.21",
-  "_npmUser": {
-    "name": "dougwilson",
-    "email": "doug@somethingdoug.com"
-  },
-  "maintainers": [
-    {
-      "name": "dougwilson",
-      "email": "doug@somethingdoug.com"
-    }
-  ],
-  "dist": {
-    "shasum": "8710d7af0aa626f8fffa1ce00168545263255748",
-    "tarball": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
-  },
-  "directories": {},
-  "_resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz"
-}

+ 10 - 0
node_modules/body-parser/node_modules/on-finished/HISTORY.md

@@ -1,3 +1,13 @@
+2.2.0 / 2014-12-22
+==================
+
+  * Add message object to callback arguments
+
+2.1.1 / 2014-10-22
+==================
+
+  * Fix handling of pipelined requests
+
 2.1.0 / 2014-08-16
 2.1.0 / 2014-08-16
 ==================
 ==================
 
 

+ 28 - 9
node_modules/body-parser/node_modules/on-finished/README.md

@@ -1,9 +1,10 @@
 # on-finished
 # on-finished
 
 
-[![NPM Version](http://img.shields.io/npm/v/on-finished.svg?style=flat)](https://www.npmjs.org/package/on-finished)
-[![Node.js Version](http://img.shields.io/badge/node.js->=_0.8-brightgreen.svg?style=flat)](http://nodejs.org/download/)
-[![Build Status](http://img.shields.io/travis/jshttp/on-finished.svg?style=flat)](https://travis-ci.org/jshttp/on-finished)
-[![Coverage Status](https://img.shields.io/coveralls/jshttp/on-finished.svg?style=flat)](https://coveralls.io/r/jshttp/on-finished)
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
 
 
 Execute a callback when a request closes, finishes, or errors.
 Execute a callback when a request closes, finishes, or errors.
 
 
@@ -23,14 +24,18 @@ var onFinished = require('on-finished')
 
 
 Attach a listener to listen for the response to finish. The listener will
 Attach a listener to listen for the response to finish. The listener will
 be invoked only once when the response finished. If the response finished
 be invoked only once when the response finished. If the response finished
-to to an error, the first argument will contain the error.
+to to an error, the first argument will contain the error. If the response
+has already finished, the listener will be invoked.
 
 
 Listening to the end of a response would be used to close things associated
 Listening to the end of a response would be used to close things associated
 with the response, like open files.
 with the response, like open files.
 
 
+Listener is invoked as `listener(err, res)`.
+
 ```js
 ```js
-onFinished(res, function (err) {
+onFinished(res, function (err, res) {
   // clean up open fds, etc.
   // clean up open fds, etc.
+  // err contains the error is request error'd
 })
 })
 ```
 ```
 
 
@@ -38,11 +43,14 @@ onFinished(res, function (err) {
 
 
 Attach a listener to listen for the request to finish. The listener will
 Attach a listener to listen for the request to finish. The listener will
 be invoked only once when the request finished. If the request finished
 be invoked only once when the request finished. If the request finished
-to to an error, the first argument will contain the error.
+to to an error, the first argument will contain the error. If the request
+has already finished, the listener will be invoked.
 
 
 Listening to the end of a request would be used to know when to continue
 Listening to the end of a request would be used to know when to continue
 after reading the data.
 after reading the data.
 
 
+Listener is invoked as `listener(err, req)`.
+
 ```js
 ```js
 var data = ''
 var data = ''
 
 
@@ -51,7 +59,7 @@ res.on('data', function (str) {
   data += str
   data += str
 })
 })
 
 
-onFinished(req, function (err) {
+onFinished(req, function (err, req) {
   // data is read unless there is err
   // data is read unless there is err
 })
 })
 ```
 ```
@@ -74,7 +82,7 @@ once the response finishes.
 ```js
 ```js
 var destroy = require('destroy')
 var destroy = require('destroy')
 var http = require('http')
 var http = require('http')
-var onFinished = require('finished')
+var onFinished = require('on-finished')
 
 
 http.createServer(function onRequest(req, res) {
 http.createServer(function onRequest(req, res) {
   var stream = fs.createReadStream('package.json')
   var stream = fs.createReadStream('package.json')
@@ -88,3 +96,14 @@ http.createServer(function onRequest(req, res) {
 ## License
 ## License
 
 
 [MIT](LICENSE)
 [MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/on-finished.svg?style=flat
+[npm-url]: https://npmjs.org/package/on-finished
+[node-version-image]: https://img.shields.io/node/v/on-finished.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/on-finished.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/on-finished
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/on-finished.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/on-finished?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/on-finished.svg?style=flat
+[downloads-url]: https://npmjs.org/package/on-finished

+ 75 - 11
node_modules/body-parser/node_modules/on-finished/index.js

@@ -39,7 +39,7 @@ var defer = typeof setImmediate === 'function'
 
 
 function onFinished(msg, listener) {
 function onFinished(msg, listener) {
   if (isFinished(msg) !== false) {
   if (isFinished(msg) !== false) {
-    defer(listener)
+    defer(listener, null, msg)
     return msg
     return msg
   }
   }
 
 
@@ -50,7 +50,7 @@ function onFinished(msg, listener) {
 }
 }
 
 
 /**
 /**
- * Determine is message is already finished.
+ * Determine if message is already finished.
  *
  *
  * @param {object} msg
  * @param {object} msg
  * @return {boolean}
  * @return {boolean}
@@ -62,7 +62,7 @@ function isFinished(msg) {
 
 
   if (typeof msg.finished === 'boolean') {
   if (typeof msg.finished === 'boolean') {
     // OutgoingMessage
     // OutgoingMessage
-    return Boolean(!socket || msg.finished || !socket.writable)
+    return Boolean(msg.finished || (socket && !socket.writable))
   }
   }
 
 
   if (typeof msg.complete === 'boolean') {
   if (typeof msg.complete === 'boolean') {
@@ -74,6 +74,56 @@ function isFinished(msg) {
   return undefined
   return undefined
 }
 }
 
 
+/**
+ * Attach a finished listener to the message.
+ *
+ * @param {object} msg
+ * @param {function} callback
+ * @private
+ */
+
+function attachFinishedListener(msg, callback) {
+  var eeMsg
+  var eeSocket
+  var finished = false
+
+  function onFinish(error) {
+    eeMsg.cancel()
+    eeSocket.cancel()
+
+    finished = true
+    callback(error)
+  }
+
+  // finished on first message event
+  eeMsg = eeSocket = first([[msg, 'end', 'finish']], onFinish)
+
+  function onSocket(socket) {
+    // remove listener
+    msg.removeListener('socket', onSocket)
+
+    if (finished) return
+    if (eeMsg !== eeSocket) return
+
+    // finished on first socket event
+    eeSocket = first([[socket, 'error', 'close']], onFinish)
+  }
+
+  if (msg.socket) {
+    // socket already assigned
+    onSocket(msg.socket)
+    return
+  }
+
+  // wait for socket to be assigned
+  msg.on('socket', onSocket)
+
+  if (msg.socket === undefined) {
+    // node.js 0.8 patch
+    patchAssignSocket(msg, onSocket)
+  }
+}
+
 /**
 /**
  * Attach the listener to the message.
  * Attach the listener to the message.
  *
  *
@@ -84,17 +134,11 @@ function isFinished(msg) {
 
 
 function attachListener(msg, listener) {
 function attachListener(msg, listener) {
   var attached = msg.__onFinished
   var attached = msg.__onFinished
-  var socket = msg.socket
 
 
   // create a private single listener with queue
   // create a private single listener with queue
   if (!attached || !attached.queue) {
   if (!attached || !attached.queue) {
     attached = msg.__onFinished = createListener(msg)
     attached = msg.__onFinished = createListener(msg)
-
-    // finished on first event
-    first([
-      [socket, 'error', 'close'],
-      [msg, 'end', 'finish'],
-    ], attached)
+    attachFinishedListener(msg, attached)
   }
   }
 
 
   attached.queue.push(listener)
   attached.queue.push(listener)
@@ -117,7 +161,7 @@ function createListener(msg) {
     listener.queue = null
     listener.queue = null
 
 
     for (var i = 0; i < queue.length; i++) {
     for (var i = 0; i < queue.length; i++) {
-      queue[i](err)
+      queue[i](err, msg)
     }
     }
   }
   }
 
 
@@ -125,3 +169,23 @@ function createListener(msg) {
 
 
   return listener
   return listener
 }
 }
+
+/**
+ * Patch ServerResponse.prototype.assignSocket for node.js 0.8.
+ *
+ * @param {ServerResponse} res
+ * @param {function} callback
+ * @private
+ */
+
+function patchAssignSocket(res, callback) {
+  var assignSocket = res.assignSocket
+
+  if (typeof assignSocket !== 'function') return
+
+  // res.on('socket', callback) is broken in 0.8
+  res.assignSocket = function _assignSocket(socket) {
+    assignSocket.call(this, socket)
+    callback(socket)
+  }
+}

+ 22 - 22
node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/LICENSE

@@ -1,22 +1,22 @@
-
-The MIT License (MIT)
-
-Copyright (c) 2014 Jonathan Ong me@jongleberry.com
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+
+The MIT License (MIT)
+
+Copyright (c) 2014 Jonathan Ong me@jongleberry.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

+ 80 - 63
node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/README.md

@@ -1,63 +1,80 @@
-# EE First
-
-[![NPM version][npm-image]][npm-url]
-[![Build status][travis-image]][travis-url]
-[![Test coverage][coveralls-image]][coveralls-url]
-[![License][license-image]][license-url]
-[![Downloads][downloads-image]][downloads-url]
-[![Gittip][gittip-image]][gittip-url]
-
-Get the first event in a set of event emitters and event pairs,
-then clean up after itself.
-
-## Install
-
-```sh
-$ npm install ee-first
-```
-
-## API
-
-```js
-var first = require('ee-first')
-```
-
-### first(arr, listener)
-
-Invoke `listener` on the first event from the list specified in `arr`. `arr` is
-an array of arrays, with each array in the format `[ee, ...event]`. `listener`
-will be called only once, the first time any of the given events are emitted. If
-`error` is one of the listened events, then if that fires first, the `listener`
-will be given the `err` argument.
-
-The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the
-first argument emitted from an `error` event, if applicable; `ee` is the event
-emitter that fired; `event` is the string event name that fired; and `args` is an
-array of the arguments that were emitted on the event.
-
-```js
-var ee1 = new EventEmitter()
-var ee2 = new EventEmitter()
-
-first([
-  [ee1, 'close', 'end', 'error'],
-  [ee2, 'error']
-], function (err, ee, event, args) {
-  // listener invoked
-})
-```
-
-[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square
-[npm-url]: https://npmjs.org/package/ee-first
-[github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square
-[github-url]: https://github.com/jonathanong/ee-first/tags
-[travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square
-[travis-url]: https://travis-ci.org/jonathanong/ee-first
-[coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square
-[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master
-[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square
-[license-url]: LICENSE.md
-[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square
-[downloads-url]: https://npmjs.org/package/ee-first
-[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
-[gittip-url]: https://www.gittip.com/jonathanong/
+# EE First
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Get the first event in a set of event emitters and event pairs,
+then clean up after itself.
+
+## Install
+
+```sh
+$ npm install ee-first
+```
+
+## API
+
+```js
+var first = require('ee-first')
+```
+
+### first(arr, listener)
+
+Invoke `listener` on the first event from the list specified in `arr`. `arr` is
+an array of arrays, with each array in the format `[ee, ...event]`. `listener`
+will be called only once, the first time any of the given events are emitted. If
+`error` is one of the listened events, then if that fires first, the `listener`
+will be given the `err` argument.
+
+The `listener` is invoked as `listener(err, ee, event, args)`, where `err` is the
+first argument emitted from an `error` event, if applicable; `ee` is the event
+emitter that fired; `event` is the string event name that fired; and `args` is an
+array of the arguments that were emitted on the event.
+
+```js
+var ee1 = new EventEmitter()
+var ee2 = new EventEmitter()
+
+first([
+  [ee1, 'close', 'end', 'error'],
+  [ee2, 'error']
+], function (err, ee, event, args) {
+  // listener invoked
+})
+```
+
+#### .cancel()
+
+The group of listeners can be cancelled before being invoked and have all the event
+listeners removed from the underlying event emitters.
+
+```js
+var thunk = first([
+  [ee1, 'close', 'end', 'error'],
+  [ee2, 'error']
+], function (err, ee, event, args) {
+  // listener invoked
+})
+
+// cancel and clean up
+thunk.cancel()
+```
+
+[npm-image]: https://img.shields.io/npm/v/ee-first.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/ee-first
+[github-tag]: http://img.shields.io/github/tag/jonathanong/ee-first.svg?style=flat-square
+[github-url]: https://github.com/jonathanong/ee-first/tags
+[travis-image]: https://img.shields.io/travis/jonathanong/ee-first.svg?style=flat-square
+[travis-url]: https://travis-ci.org/jonathanong/ee-first
+[coveralls-image]: https://img.shields.io/coveralls/jonathanong/ee-first.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/jonathanong/ee-first?branch=master
+[license-image]: http://img.shields.io/npm/l/ee-first.svg?style=flat-square
+[license-url]: LICENSE.md
+[downloads-image]: http://img.shields.io/npm/dm/ee-first.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/ee-first
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
+[gittip-url]: https://www.gittip.com/jonathanong/

+ 68 - 60
node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/index.js

@@ -1,60 +1,68 @@
-
-module.exports = function first(stuff, done) {
-  if (!Array.isArray(stuff))
-    throw new TypeError('arg must be an array of [ee, events...] arrays')
-
-  var cleanups = []
-
-  for (var i = 0; i < stuff.length; i++) {
-    var arr = stuff[i]
-
-    if (!Array.isArray(arr) || arr.length < 2)
-      throw new TypeError('each array member must be [ee, events...]')
-
-    var ee = arr[0]
-
-    for (var j = 1; j < arr.length; j++) {
-      var event = arr[j]
-      var fn = listener(event, cleanup)
-
-      // listen to the event
-      ee.on(event, fn)
-      // push this listener to the list of cleanups
-      cleanups.push({
-        ee: ee,
-        event: event,
-        fn: fn,
-      })
-    }
-  }
-
-  return function (fn) {
-    done = fn
-  }
-
-  function cleanup() {
-    var x
-    for (var i = 0; i < cleanups.length; i++) {
-      x = cleanups[i]
-      x.ee.removeListener(x.event, x.fn)
-    }
-    done.apply(null, arguments)
-  }
-}
-
-function listener(event, done) {
-  return function onevent(arg1) {
-    var args = new Array(arguments.length)
-    var ee = this
-    var err = event === 'error'
-      ? arg1
-      : null
-
-    // copy args to prevent arguments escaping scope
-    for (var i = 0; i < args.length; i++) {
-      args[i] = arguments[i]
-    }
-
-    done(err, ee, event, args)
-  }
-}
+
+module.exports = function first(stuff, done) {
+  if (!Array.isArray(stuff))
+    throw new TypeError('arg must be an array of [ee, events...] arrays')
+
+  var cleanups = []
+
+  for (var i = 0; i < stuff.length; i++) {
+    var arr = stuff[i]
+
+    if (!Array.isArray(arr) || arr.length < 2)
+      throw new TypeError('each array member must be [ee, events...]')
+
+    var ee = arr[0]
+
+    for (var j = 1; j < arr.length; j++) {
+      var event = arr[j]
+      var fn = listener(event, callback)
+
+      // listen to the event
+      ee.on(event, fn)
+      // push this listener to the list of cleanups
+      cleanups.push({
+        ee: ee,
+        event: event,
+        fn: fn,
+      })
+    }
+  }
+
+  function callback() {
+    cleanup()
+    done.apply(null, arguments)
+  }
+
+  function cleanup() {
+    var x
+    for (var i = 0; i < cleanups.length; i++) {
+      x = cleanups[i]
+      x.ee.removeListener(x.event, x.fn)
+    }
+  }
+
+  function thunk(fn) {
+    done = fn
+  }
+
+  thunk.cancel = cleanup
+
+  return thunk
+}
+
+function listener(event, done) {
+  return function onevent(arg1) {
+    var args = new Array(arguments.length)
+    var ee = this
+    var err = event === 'error'
+      ? arg1
+      : null
+
+    // copy args to prevent arguments escaping scope
+    for (var i = 0; i < args.length; i++) {
+      args[i] = arguments[i]
+    }
+
+    done(err, ee, event, args)
+  }
+}

File diff suppressed because it is too large
+ 3 - 4
node_modules/body-parser/node_modules/on-finished/node_modules/ee-first/package.json


File diff suppressed because it is too large
+ 7 - 8
node_modules/body-parser/node_modules/on-finished/package.json


+ 21 - 0
node_modules/body-parser/node_modules/qs/CHANGELOG.md

@@ -1,4 +1,25 @@
 
 
+## [**2.3.3**](https://github.com/hapijs/qs/issues?milestone=18&state=open)
+- [**#59**](https://github.com/hapijs/qs/issues/59) make sure array indexes are &gt;= 0, closes #57
+- [**#58**](https://github.com/hapijs/qs/issues/58) make qs usable for browser loader
+
+## [**2.3.2**](https://github.com/hapijs/qs/issues?milestone=17&state=closed)
+- [**#55**](https://github.com/hapijs/qs/issues/55) allow merging a string into an object
+
+## [**2.3.1**](https://github.com/hapijs/qs/issues?milestone=16&state=closed)
+- [**#52**](https://github.com/hapijs/qs/issues/52) Return &quot;undefined&quot; and &quot;false&quot; instead of throwing &quot;TypeError&quot;.
+
+## [**2.3.0**](https://github.com/hapijs/qs/issues?milestone=15&state=closed)
+- [**#50**](https://github.com/hapijs/qs/issues/50) add option to omit array indices, closes #46
+
+## [**2.2.5**](https://github.com/hapijs/qs/issues?milestone=14&state=closed)
+- [**#39**](https://github.com/hapijs/qs/issues/39) Is there an alternative to Buffer.isBuffer?
+- [**#49**](https://github.com/hapijs/qs/issues/49) refactor utils.merge, fixes #45
+- [**#41**](https://github.com/hapijs/qs/issues/41) avoid browserifying Buffer, for #39
+
+## [**2.2.4**](https://github.com/hapijs/qs/issues?milestone=13&state=closed)
+- [**#38**](https://github.com/hapijs/qs/issues/38) how to handle object keys beginning with a number
+
 ## [**2.2.3**](https://github.com/hapijs/qs/issues?milestone=12&state=closed)
 ## [**2.2.3**](https://github.com/hapijs/qs/issues?milestone=12&state=closed)
 - [**#37**](https://github.com/hapijs/qs/issues/37) parser discards first empty value in array
 - [**#37**](https://github.com/hapijs/qs/issues/37) parser discards first empty value in array
 - [**#36**](https://github.com/hapijs/qs/issues/36) Update to lab 4.x
 - [**#36**](https://github.com/hapijs/qs/issues/36) Update to lab 4.x

+ 4 - 4
node_modules/body-parser/node_modules/qs/Makefile

@@ -1,8 +1,8 @@
 test:
 test:
-	@node node_modules/lab/bin/lab
+	@node node_modules/lab/bin/lab -a code -L
 test-cov:
 test-cov:
-	@node node_modules/lab/bin/lab -t 100
+	@node node_modules/lab/bin/lab -a code -t 100 -L
 test-cov-html:
 test-cov-html:
-	@node node_modules/lab/bin/lab -r html -o coverage.html
+	@node node_modules/lab/bin/lab -a code -L -r html -o coverage.html
 
 
-.PHONY: test test-cov test-cov-html
+.PHONY: test test-cov test-cov-html

+ 10 - 1
node_modules/body-parser/node_modules/qs/README.md

@@ -153,6 +153,8 @@ Qs.parse('a[1]=b', { arrayLimit: 0 });
 // { a: { '1': 'b' } }
 // { a: { '1': 'b' } }
 ```
 ```
 
 
+To disable array parsing entirely, set `arrayLimit` to `-1`.
+
 If you mix notations, **qs** will merge the two items into an object:
 If you mix notations, **qs** will merge the two items into an object:
 
 
 ```javascript
 ```javascript
@@ -184,13 +186,20 @@ Qs.stringify({ a: { b: 'c' } });
 
 
 Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage.
 Examples beyond this point will be shown as though the output is not URI encoded for clarity. Please note that the return values in these cases *will* be URI encoded during real usage.
 
 
-When arrays are stringified, they are always given explicit indices:
+When arrays are stringified, by default they are given explicit indices:
 
 
 ```javascript
 ```javascript
 Qs.stringify({ a: ['b', 'c', 'd'] });
 Qs.stringify({ a: ['b', 'c', 'd'] });
 // 'a[0]=b&a[1]=c&a[2]=d'
 // 'a[0]=b&a[1]=c&a[2]=d'
 ```
 ```
 
 
+You may override this by setting the `indices` option to `false`:
+
+```javascript
+Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false });
+// 'a=b&a=c&a=d'
+```
+
 Empty strings and null values will omit the value, but the equals sign (=) remains in place:
 Empty strings and null values will omit the value, but the equals sign (=) remains in place:
 
 
 ```javascript
 ```javascript

+ 1 - 1
node_modules/body-parser/node_modules/qs/index.js

@@ -1 +1 @@
-module.exports = require('./lib');
+module.exports = require('./lib/');

+ 1 - 0
node_modules/body-parser/node_modules/qs/lib/parse.js

@@ -62,6 +62,7 @@ internals.parseObject = function (chain, val, options) {
         if (!isNaN(index) &&
         if (!isNaN(index) &&
             root !== cleanRoot &&
             root !== cleanRoot &&
             indexString === cleanRoot &&
             indexString === cleanRoot &&
+            index >= 0 &&
             index <= options.arrayLimit) {
             index <= options.arrayLimit) {
 
 
             obj = [];
             obj = [];

+ 28 - 9
node_modules/body-parser/node_modules/qs/lib/stringify.js

@@ -6,11 +6,12 @@ var Utils = require('./utils');
 // Declare internals
 // Declare internals
 
 
 var internals = {
 var internals = {
-    delimiter: '&'
+    delimiter: '&',
+    indices: true
 };
 };
 
 
 
 
-internals.stringify = function (obj, prefix) {
+internals.stringify = function (obj, prefix, options) {
 
 
     if (Utils.isBuffer(obj)) {
     if (Utils.isBuffer(obj)) {
         obj = obj.toString();
         obj = obj.toString();
@@ -31,9 +32,20 @@ internals.stringify = function (obj, prefix) {
 
 
     var values = [];
     var values = [];
 
 
-    for (var key in obj) {
-        if (obj.hasOwnProperty(key)) {
-            values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']'));
+    if (typeof obj === 'undefined') {
+        return values;
+    }
+
+    var objKeys = Object.keys(obj);
+    for (var i = 0, il = objKeys.length; i < il; ++i) {
+        var key = objKeys[i];
+        if (!options.indices &&
+            Array.isArray(obj)) {
+
+            values = values.concat(internals.stringify(obj[key], prefix, options));
+        }
+        else {
+            values = values.concat(internals.stringify(obj[key], prefix + '[' + key + ']', options));
         }
         }
     }
     }
 
 
@@ -45,13 +57,20 @@ module.exports = function (obj, options) {
 
 
     options = options || {};
     options = options || {};
     var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;
     var delimiter = typeof options.delimiter === 'undefined' ? internals.delimiter : options.delimiter;
+    options.indices = typeof options.indices === 'boolean' ? options.indices : internals.indices;
 
 
     var keys = [];
     var keys = [];
 
 
-    for (var key in obj) {
-        if (obj.hasOwnProperty(key)) {
-            keys = keys.concat(internals.stringify(obj[key], key));
-        }
+    if (typeof obj !== 'object' ||
+        obj === null) {
+
+        return '';
+    }
+
+    var objKeys = Object.keys(obj);
+    for (var i = 0, il = objKeys.length; i < il; ++i) {
+        var key = objKeys[i];
+        keys = keys.concat(internals.stringify(obj[key], key, options));
     }
     }
 
 
     return keys.join(delimiter);
     return keys.join(delimiter);

+ 27 - 34
node_modules/body-parser/node_modules/qs/lib/utils.js

@@ -26,29 +26,26 @@ exports.merge = function (target, source) {
         return target;
         return target;
     }
     }
 
 
-    if (Array.isArray(source)) {
-        for (var i = 0, il = source.length; i < il; ++i) {
-            if (typeof source[i] !== 'undefined') {
-                if (typeof target[i] === 'object') {
-                    target[i] = exports.merge(target[i], source[i]);
-                }
-                else {
-                    target[i] = source[i];
-                }
-            }
+    if (typeof source !== 'object') {
+        if (Array.isArray(target)) {
+            target.push(source);
+        }
+        else {
+            target[source] = true;
         }
         }
 
 
         return target;
         return target;
     }
     }
 
 
-    if (Array.isArray(target)) {
-        if (typeof source !== 'object') {
-            target.push(source);
-            return target;
-        }
-        else {
-            target = exports.arrayToObject(target);
-        }
+    if (typeof target !== 'object') {
+        target = [target].concat(source);
+        return target;
+    }
+
+    if (Array.isArray(target) &&
+        !Array.isArray(source)) {
+
+        target = exports.arrayToObject(target);
     }
     }
 
 
     var keys = Object.keys(source);
     var keys = Object.keys(source);
@@ -56,18 +53,11 @@ exports.merge = function (target, source) {
         var key = keys[k];
         var key = keys[k];
         var value = source[key];
         var value = source[key];
 
 
-        if (value &&
-            typeof value === 'object') {
-
-            if (!target[key]) {
-                target[key] = value;
-            }
-            else {
-                target[key] = exports.merge(target[key], value);
-            }
+        if (!target[key]) {
+            target[key] = value;
         }
         }
         else {
         else {
-            target[key] = value;
+            target[key] = exports.merge(target[key], value);
         }
         }
     }
     }
 
 
@@ -104,7 +94,7 @@ exports.compact = function (obj, refs) {
     if (Array.isArray(obj)) {
     if (Array.isArray(obj)) {
         var compacted = [];
         var compacted = [];
 
 
-        for (var i = 0, l = obj.length; i < l; ++i) {
+        for (var i = 0, il = obj.length; i < il; ++i) {
             if (typeof obj[i] !== 'undefined') {
             if (typeof obj[i] !== 'undefined') {
                 compacted.push(obj[i]);
                 compacted.push(obj[i]);
             }
             }
@@ -114,7 +104,7 @@ exports.compact = function (obj, refs) {
     }
     }
 
 
     var keys = Object.keys(obj);
     var keys = Object.keys(obj);
-    for (var i = 0, il = keys.length; i < il; ++i) {
+    for (i = 0, il = keys.length; i < il; ++i) {
         var key = keys[i];
         var key = keys[i];
         obj[key] = exports.compact(obj[key], refs);
         obj[key] = exports.compact(obj[key], refs);
     }
     }
@@ -130,10 +120,13 @@ exports.isRegExp = function (obj) {
 
 
 exports.isBuffer = function (obj) {
 exports.isBuffer = function (obj) {
 
 
-    if (typeof Buffer !== 'undefined') {
-        return Buffer.isBuffer(obj);
-    }
-    else {
+    if (obj === null ||
+        typeof obj === 'undefined') {
+
         return false;
         return false;
     }
     }
+
+    return !!(obj.constructor &&
+        obj.constructor.isBuffer &&
+        obj.constructor.isBuffer(obj));
 };
 };

File diff suppressed because it is too large
+ 12 - 14
node_modules/body-parser/node_modules/qs/package.json


+ 42 - 20
node_modules/body-parser/node_modules/qs/test/parse.js

@@ -1,5 +1,7 @@
+/* eslint no-extend-native:0 */
 // Load modules
 // Load modules
 
 
+var Code = require('code');
 var Lab = require('lab');
 var Lab = require('lab');
 var Qs = require('../');
 var Qs = require('../');
 
 
@@ -12,14 +14,12 @@ var internals = {};
 // Test shortcuts
 // Test shortcuts
 
 
 var lab = exports.lab = Lab.script();
 var lab = exports.lab = Lab.script();
-var expect = Lab.expect;
-var before = lab.before;
-var after = lab.after;
+var expect = Code.expect;
 var describe = lab.experiment;
 var describe = lab.experiment;
 var it = lab.test;
 var it = lab.test;
 
 
 
 
-describe('#parse', function () {
+describe('parse()', function () {
 
 
     it('parses a simple string', function (done) {
     it('parses a simple string', function (done) {
 
 
@@ -82,6 +82,17 @@ describe('#parse', function () {
         done();
         done();
     });
     });
 
 
+    it('parses a mix of simple and explicit arrays', function (done) {
+
+        expect(Qs.parse('a=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] });
+        expect(Qs.parse('a[]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+        expect(Qs.parse('a[0]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+        expect(Qs.parse('a=b&a[0]=c')).to.deep.equal({ a: ['b', 'c'] });
+        expect(Qs.parse('a[1]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+        expect(Qs.parse('a=b&a[1]=c')).to.deep.equal({ a: ['b', 'c'] });
+        done();
+    });
+
     it('parses a nested array', function (done) {
     it('parses a nested array', function (done) {
 
 
         expect(Qs.parse('a[b][]=c&a[b][]=d')).to.deep.equal({ a: { b: ['c', 'd'] } });
         expect(Qs.parse('a[b][]=c&a[b][]=d')).to.deep.equal({ a: { b: ['c', 'd'] } });
@@ -149,6 +160,12 @@ describe('#parse', function () {
         done();
         done();
     });
     });
 
 
+    it('can add keys to objects', function (done) {
+
+        expect(Qs.parse('a[b]=c&a=d')).to.deep.equal({ a: { b: 'c', d: true } });
+        done();
+    });
+
     it('correctly prunes undefined values when converting an array to an object', function (done) {
     it('correctly prunes undefined values when converting an array to an object', function (done) {
 
 
         expect(Qs.parse('a[2]=b&a[99999999]=c')).to.deep.equal({ a: { '2': 'b', '99999999': 'c' } });
         expect(Qs.parse('a[2]=b&a[99999999]=c')).to.deep.equal({ a: { '2': 'b', '99999999': 'c' } });
@@ -287,6 +304,8 @@ describe('#parse', function () {
 
 
     it('allows overriding array limit', function (done) {
     it('allows overriding array limit', function (done) {
 
 
+        expect(Qs.parse('a[0]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '0': 'b' } });
+        expect(Qs.parse('a[-1]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '-1': 'b' } });
         expect(Qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 })).to.deep.equal({ a: { '0': 'b', '1': 'c' } });
         expect(Qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 })).to.deep.equal({ a: { '0': 'b', '1': 'c' } });
         done();
         done();
     });
     });
@@ -294,14 +313,14 @@ describe('#parse', function () {
     it('parses an object', function (done) {
     it('parses an object', function (done) {
 
 
         var input = {
         var input = {
-            "user[name]": {"pop[bob]": 3},
-            "user[email]": null
+            'user[name]': {'pop[bob]': 3},
+            'user[email]': null
         };
         };
 
 
         var expected = {
         var expected = {
-            "user": {
-                "name": {"pop[bob]": 3},
-                "email": null
+            'user': {
+                'name': {'pop[bob]': 3},
+                'email': null
             }
             }
         };
         };
 
 
@@ -314,14 +333,14 @@ describe('#parse', function () {
     it('parses an object and not child values', function (done) {
     it('parses an object and not child values', function (done) {
 
 
         var input = {
         var input = {
-            "user[name]": {"pop[bob]": { "test": 3 }},
-            "user[email]": null
+            'user[name]': {'pop[bob]': { 'test': 3 }},
+            'user[email]': null
         };
         };
 
 
         var expected = {
         var expected = {
-            "user": {
-                "name": {"pop[bob]": { "test": 3 }},
-                "email": null
+            'user': {
+                'name': {'pop[bob]': { 'test': 3 }},
+                'email': null
             }
             }
         };
         };
 
 
@@ -335,8 +354,9 @@ describe('#parse', function () {
 
 
         var tempBuffer = global.Buffer;
         var tempBuffer = global.Buffer;
         delete global.Buffer;
         delete global.Buffer;
-        expect(Qs.parse('a=b&c=d')).to.deep.equal({ a: 'b', c: 'd' });
+        var result = Qs.parse('a=b&c=d');
         global.Buffer = tempBuffer;
         global.Buffer = tempBuffer;
+        expect(result).to.deep.equal({ a: 'b', c: 'd' });
         done();
         done();
     });
     });
 
 
@@ -356,10 +376,10 @@ describe('#parse', function () {
         expect(function () {
         expect(function () {
 
 
             parsed = Qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a });
             parsed = Qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a });
-        }).to.not.throw(Error);
+        }).to.not.throw();
 
 
-        expect(parsed).to.have.key('foo');
-        expect(parsed.foo).to.have.keys('bar', 'baz');
+        expect(parsed).to.contain('foo');
+        expect(parsed.foo).to.contain('bar', 'baz');
         expect(parsed.foo.bar).to.equal('baz');
         expect(parsed.foo.bar).to.equal('baz');
         expect(parsed.foo.baz).to.deep.equal(a);
         expect(parsed.foo.baz).to.deep.equal(a);
         done();
         done();
@@ -369,9 +389,11 @@ describe('#parse', function () {
 
 
         var a = Object.create(null);
         var a = Object.create(null);
         a.b = 'c';
         a.b = 'c';
-        
+
         expect(Qs.parse(a)).to.deep.equal({ b: 'c' });
         expect(Qs.parse(a)).to.deep.equal({ b: 'c' });
-        expect(Qs.parse({ a: a })).to.deep.equal({ a: { b: 'c' } });
+        var result = Qs.parse({ a: a });
+        expect(result).to.contain('a');
+        expect(result.a).to.deep.equal(a);
         done();
         done();
     });
     });
 
 

+ 44 - 4
node_modules/body-parser/node_modules/qs/test/stringify.js

@@ -1,5 +1,7 @@
+/* eslint no-extend-native:0 */
 // Load modules
 // Load modules
 
 
+var Code = require('code');
 var Lab = require('lab');
 var Lab = require('lab');
 var Qs = require('../');
 var Qs = require('../');
 
 
@@ -12,14 +14,12 @@ var internals = {};
 // Test shortcuts
 // Test shortcuts
 
 
 var lab = exports.lab = Lab.script();
 var lab = exports.lab = Lab.script();
-var expect = Lab.expect;
-var before = lab.before;
-var after = lab.after;
+var expect = Code.expect;
 var describe = lab.experiment;
 var describe = lab.experiment;
 var it = lab.test;
 var it = lab.test;
 
 
 
 
-describe('#stringify', function () {
+describe('stringify()', function () {
 
 
     it('stringifies a querystring object', function (done) {
     it('stringifies a querystring object', function (done) {
 
 
@@ -42,6 +42,12 @@ describe('#stringify', function () {
         done();
         done();
     });
     });
 
 
+    it('omits array indices when asked', function (done) {
+
+        expect(Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false })).to.equal('a=b&a=c&a=d');
+        done();
+    });
+
     it('stringifies a nested array value', function (done) {
     it('stringifies a nested array value', function (done) {
 
 
         expect(Qs.stringify({ a: { b: ['c', 'd'] } })).to.equal('a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
         expect(Qs.stringify({ a: { b: ['c', 'd'] } })).to.equal('a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
@@ -55,6 +61,12 @@ describe('#stringify', function () {
         done();
         done();
     });
     });
 
 
+    it('does not omit object keys when indices = false', function (done) {
+
+        expect(Qs.stringify({ a: [{ b: 'c' }] }, { indices: false })).to.equal('a%5Bb%5D=c');
+        done();
+    });
+
     it('stringifies a complicated object', function (done) {
     it('stringifies a complicated object', function (done) {
 
 
         expect(Qs.stringify({ a: { b: 'c', d: 'e' } })).to.equal('a%5Bb%5D=c&a%5Bd%5D=e');
         expect(Qs.stringify({ a: { b: 'c', d: 'e' } })).to.equal('a%5Bb%5D=c&a%5Bd%5D=e');
@@ -70,6 +82,34 @@ describe('#stringify', function () {
         done();
         done();
     });
     });
 
 
+    it('stringifies an empty object', function (done) {
+
+        var obj = Object.create(null);
+        obj.a = 'b';
+        expect(Qs.stringify(obj)).to.equal('a=b');
+        done();
+    });
+
+    it('returns an empty string for invalid input', function (done) {
+
+        expect(Qs.stringify(undefined)).to.equal('');
+        expect(Qs.stringify(false)).to.equal('');
+        expect(Qs.stringify(null)).to.equal('');
+        expect(Qs.stringify('')).to.equal('');
+        done();
+    });
+
+    it('stringifies an object with an empty object as a child', function (done) {
+
+        var obj = {
+            a: Object.create(null)
+        };
+
+        obj.a.b = 'c';
+        expect(Qs.stringify(obj)).to.equal('a%5Bb%5D=c');
+        done();
+    });
+
     it('drops keys with a value of undefined', function (done) {
     it('drops keys with a value of undefined', function (done) {
 
 
         expect(Qs.stringify({ a: undefined })).to.equal('');
         expect(Qs.stringify({ a: undefined })).to.equal('');

+ 0 - 3
node_modules/body-parser/node_modules/raw-body/.npmignore

@@ -1,3 +0,0 @@
-coverage/
-test/
-.travis.yml

+ 18 - 0
node_modules/body-parser/node_modules/raw-body/HISTORY.md

@@ -1,3 +1,21 @@
+1.3.3 / 2015-02-08
+==================
+
+  * deps: iconv-lite@0.4.7
+    - Gracefully support enumerables on `Object.prototype`
+
+1.3.2 / 2015-01-20
+==================
+
+  * deps: iconv-lite@0.4.6
+    - Fix rare aliases of single-byte encodings
+
+1.3.1 / 2014-11-21
+==================
+
+  * deps: iconv-lite@0.4.5
+    - Fix Windows-31J and X-SJIS encoding support
+
 1.3.0 / 2014-07-20
 1.3.0 / 2014-07-20
 ==================
 ==================
 
 

+ 18 - 26
node_modules/body-parser/node_modules/raw-body/README.md

@@ -1,8 +1,11 @@
 # raw-body
 # raw-body
 
 
-[![NPM version](https://badge.fury.io/js/raw-body.svg)](http://badge.fury.io/js/raw-body)
-[![Build Status](https://travis-ci.org/stream-utils/raw-body.svg?branch=master)](https://travis-ci.org/stream-utils/raw-body)
-[![Coverage Status](https://img.shields.io/coveralls/stream-utils/raw-body.svg?branch=master)](https://coveralls.io/r/stream-utils/raw-body)
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![Dependency Status][david-image]][david-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
 
 
 Gets the entire buffer of a stream either as a `Buffer` or a string.
 Gets the entire buffer of a stream either as a `Buffer` or a string.
 Validates the stream's length against an expected length and maximum limit.
 Validates the stream's length against an expected length and maximum limit.
@@ -78,26 +81,15 @@ and you are responsible for correctly disposing the stream.
 For HTTP requests, no handling is required if you send a response.
 For HTTP requests, no handling is required if you send a response.
 For streams that use file descriptors, you should `stream.destroy()` or `stream.close()` to prevent leaks.
 For streams that use file descriptors, you should `stream.destroy()` or `stream.close()` to prevent leaks.
 
 
-## License
-
-The MIT License (MIT)
-
-Copyright (c) 2013 Jonathan Ong me@jongleberry.com
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+[npm-image]: https://img.shields.io/npm/v/raw-body.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/raw-body
+[travis-image]: https://img.shields.io/travis/stream-utils/raw-body.svg?style=flat-square
+[travis-url]: https://travis-ci.org/stream-utils/raw-body
+[coveralls-image]: https://img.shields.io/coveralls/stream-utils/raw-body.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/stream-utils/raw-body
+[david-image]: http://img.shields.io/david/stream-utils/raw-body.svg?style=flat-square
+[david-url]: https://david-dm.org/stream-utils/raw-body
+[license-image]: http://img.shields.io/npm/l/raw-body.svg?style=flat-square
+[license-url]: LICENSE
+[downloads-image]: http://img.shields.io/npm/dm/raw-body.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/raw-body

File diff suppressed because it is too large
+ 13 - 7
node_modules/body-parser/node_modules/raw-body/package.json


+ 43 - 0
node_modules/body-parser/node_modules/type-is/HISTORY.md

@@ -1,3 +1,46 @@
+1.6.0 / 2015-02-12
+==================
+
+  * fix false-positives in `hasBody` `Transfer-Encoding` check
+  * support wildcard for both type and subtype (`*/*`)
+
+1.5.7 / 2015-02-09
+==================
+
+  * fix argument reassignment
+  * deps: mime-types@~2.0.9
+    - Add new mime types
+
+1.5.6 / 2015-01-29
+==================
+
+  * deps: mime-types@~2.0.8
+    - Add new mime types
+
+1.5.5 / 2014-12-30
+==================
+
+  * deps: mime-types@~2.0.7
+    - Add new mime types
+    - Fix missing extensions
+    - Fix various invalid MIME type entries
+    - Remove example template MIME types
+    - deps: mime-db@~1.5.0
+
+1.5.4 / 2014-12-10
+==================
+
+  * deps: mime-types@~2.0.4
+    - Add new mime types
+    - deps: mime-db@~1.3.0
+
+1.5.3 / 2014-11-09
+==================
+
+  * deps: mime-types@~2.0.3
+    - Add new mime types
+    - deps: mime-db@~1.2.0
+
 1.5.2 / 2014-09-28
 1.5.2 / 2014-09-28
 ==================
 ==================
 
 

+ 19 - 2
node_modules/body-parser/node_modules/type-is/README.md

@@ -41,15 +41,32 @@ is(req, ['application/json']) // 'application/json'
 is(req, ['html']) // false
 is(req, ['html']) // false
 ```
 ```
 
 
-#### Each type can be:
+### type = is.is(mediaType, types)
+
+`mediaType` is the [media type](https://tools.ietf.org/html/rfc6838) string. `types` is an array of types.
+
+```js
+var mediaType = 'application/json'
+
+is.is(mediaType, ['json'])             // 'json'
+is.is(mediaType, ['html', 'json'])     // 'json'
+is.is(mediaType, ['application/*'])    // 'application/json'
+is.is(mediaType, ['application/json']) // 'application/json'
+
+is.is(mediaType, ['html']) // false
+```
+
+### Each type can be:
 
 
 - An extension name such as `json`. This name will be returned if matched.
 - An extension name such as `json`. This name will be returned if matched.
 - A mime type such as `application/json`.
 - A mime type such as `application/json`.
-- A mime type with a wildcard such as `*/json` or `application/*`. The full mime type will be returned if matched
+- A mime type with a wildcard such as `*/*` or `*/json` or `application/*`. The full mime type will be returned if matched.
 - A suffix such as `+json`. This can be combined with a wildcard such as `*/vnd+json` or `application/*+json`. The full mime type will be returned if matched.
 - A suffix such as `+json`. This can be combined with a wildcard such as `*/vnd+json` or `application/*+json`. The full mime type will be returned if matched.
 
 
 `false` will be returned if no type matches.
 `false` will be returned if no type matches.
 
 
+`null` will be returned if the request does not have a body.
+
 ## Examples
 ## Examples
 
 
 #### Example body parser
 #### Example body parser

+ 39 - 41
node_modules/body-parser/node_modules/type-is/index.js

@@ -27,10 +27,10 @@ function typeis(value, types_) {
   var types = types_
   var types = types_
 
 
   // remove parameters and normalize
   // remove parameters and normalize
-  value = typenormalize(value)
+  var val = typenormalize(value)
 
 
   // no type or invalid
   // no type or invalid
-  if (!value) {
+  if (!val) {
     return false
     return false
   }
   }
 
 
@@ -43,13 +43,15 @@ function typeis(value, types_) {
   }
   }
 
 
   // no types, return the content type
   // no types, return the content type
-  if (!types || !types.length) return value;
+  if (!types || !types.length) {
+    return val
+  }
 
 
   var type
   var type
   for (i = 0; i < types.length; i++) {
   for (i = 0; i < types.length; i++) {
-    if (mimeMatch(normalize(type = types[i]), value)) {
+    if (mimeMatch(normalize(type = types[i]), val)) {
       return type[0] === '+' || ~type.indexOf('*')
       return type[0] === '+' || ~type.indexOf('*')
-        ? value
+        ? val
         : type
         : type
     }
     }
   }
   }
@@ -70,9 +72,8 @@ function typeis(value, types_) {
  */
  */
 
 
 function hasbody(req) {
 function hasbody(req) {
-  var headers = req.headers;
-  if ('transfer-encoding' in headers) return true;
-  return !isNaN(headers['content-length']);
+  return req.headers['transfer-encoding'] !== undefined
+    || !isNaN(req.headers['content-length'])
 }
 }
 
 
 /**
 /**
@@ -141,15 +142,22 @@ function typeofrequest(req, types_) {
 
 
 function normalize(type) {
 function normalize(type) {
   switch (type) {
   switch (type) {
-    case 'urlencoded': return 'application/x-www-form-urlencoded';
+    case 'urlencoded':
+      type = 'application/x-www-form-urlencoded'
+      break
     case 'multipart':
     case 'multipart':
-      type = 'multipart/*';
-      break;
+      type = 'multipart/*'
+      break
+  }
+
+  if (type[0] === '+') {
+    // "+json" -> "*/*+json" expando
+    type = '*/*' + type
   }
   }
 
 
-  return type[0] === '+' || ~type.indexOf('/')
-    ? type
-    : mime.lookup(type)
+  return type.indexOf('/') === -1
+    ? mime.lookup(type)
+    : type
 }
 }
 
 
 /**
 /**
@@ -169,42 +177,32 @@ function mimeMatch(expected, actual) {
     return false
     return false
   }
   }
 
 
-  // exact match
-  if (expected === actual) {
-    return true
-  }
-
-  actual = actual.split('/');
+  // split types
+  var actualParts = actual.split('/')
+  var expectedParts = expected.split('/')
 
 
-  if (expected[0] === '+') {
-    // support +suffix
-    return Boolean(actual[1])
-      && expected.length <= actual[1].length
-      && expected === actual[1].substr(0 - expected.length)
+  // invalid format
+  if (actualParts.length !== 2 || expectedParts.length !== 2) {
+    return false
   }
   }
 
 
-  if (!~expected.indexOf('*')) return false;
-
-  expected = expected.split('/');
-
-  if (expected[0] === '*') {
-    // support */yyy
-    return expected[1] === actual[1]
+  // validate type
+  if (expectedParts[0] !== '*' && expectedParts[0] !== actualParts[0]) {
+    return false
   }
   }
 
 
-  if (expected[1] === '*') {
-    // support xxx/*
-    return expected[0] === actual[0]
+  // validate suffix wildcard
+  if (expectedParts[1].substr(0, 2) === '*+') {
+    return expectedParts[1].length <= actualParts[1].length + 1
+      && expectedParts[1].substr(1) === actualParts[1].substr(1 - expectedParts[1].length)
   }
   }
 
 
-  if (expected[1][0] === '*' && expected[1][1] === '+') {
-    // support xxx/*+zzz
-    return expected[0] === actual[0]
-      && expected[1].length <= actual[1].length + 1
-      && expected[1].substr(1) === actual[1].substr(1 - expected[1].length)
+  // validate subtype
+  if (expectedParts[1] !== '*' && expectedParts[1] !== actualParts[1]) {
+    return false
   }
   }
 
 
-  return false
+  return true
 }
 }
 
 
 /**
 /**

+ 46 - 0
node_modules/body-parser/node_modules/type-is/node_modules/mime-types/HISTORY.md

@@ -1,3 +1,49 @@
+2.0.9 / 2015-02-09
+==================
+
+  * deps: mime-db@~1.7.0
+    - Add new mime types
+    - Community extensions ownership transferred from `node-mime`
+
+2.0.8 / 2015-01-29
+==================
+
+  * deps: mime-db@~1.6.0
+    - Add new mime types
+
+2.0.7 / 2014-12-30
+==================
+
+  * deps: mime-db@~1.5.0
+    - Add new mime types
+    - Fix various invalid MIME type entries
+
+2.0.6 / 2014-12-30
+==================
+
+  * deps: mime-db@~1.4.0
+    - Add new mime types
+    - Fix various invalid MIME type entries
+    - Remove example template MIME types
+
+2.0.5 / 2014-12-29
+==================
+
+  * deps: mime-db@~1.3.1
+    - Fix missing extensions
+
+2.0.4 / 2014-12-10
+==================
+
+  * deps: mime-db@~1.3.0
+    - Add new mime types
+
+2.0.3 / 2014-11-09
+==================
+
+  * deps: mime-db@~1.2.0
+    - Add new mime types
+
 2.0.2 / 2014-09-28
 2.0.2 / 2014-09-28
 ==================
 ==================
 
 

+ 23 - 19
node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/README.md

@@ -7,24 +7,17 @@
 [![Coverage Status][coveralls-image]][coveralls-url]
 [![Coverage Status][coveralls-image]][coveralls-url]
 
 
 This is a database of all mime types.
 This is a database of all mime types.
-It consistents of a single, public JSON file and does not include any logic,
-allowing it to remain as unopinionated as possible with an API.
+It consists of a single, public JSON file and does not include any logic,
+allowing it to remain as un-opinionated as possible with an API.
 It aggregates data from the following sources:
 It aggregates data from the following sources:
 
 
 - http://www.iana.org/assignments/media-types/media-types.xhtml
 - http://www.iana.org/assignments/media-types/media-types.xhtml
 - http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
 - http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
 
 
-## Usage
+## Installation
 
 
 ```bash
 ```bash
-npm i mime-db
-```
-
-```js
-var db = require('mime-db');
-
-// grab data on .js files
-var data = db['application/javascript'];
+npm install mime-db
 ```
 ```
 
 
 If you're crazy enough to use this in the browser,
 If you're crazy enough to use this in the browser,
@@ -34,6 +27,15 @@ you can just grab the JSON file:
 https://cdn.rawgit.com/jshttp/mime-db/master/db.json
 https://cdn.rawgit.com/jshttp/mime-db/master/db.json
 ```
 ```
 
 
+## Usage
+
+```js
+var db = require('mime-db');
+
+// grab data on .js files
+var data = db['application/javascript'];
+```
+
 ## Data Structure
 ## Data Structure
 
 
 The JSON file is a map lookup for lowercased mime types.
 The JSON file is a map lookup for lowercased mime types.
@@ -49,18 +51,20 @@ Each mime type has the following properties:
 
 
 If unknown, every property could be `undefined`.
 If unknown, every property could be `undefined`.
 
 
-## Repository Structure
-
-- `scripts` - these are scripts to run to build the database
-- `src/` - this is a folder of files created from remote sources like Apache and IANA
-- `lib/` - this is a folder of our own custom sources and db, which will be merged into `db.json`
-- `db.json` - the final built JSON file for end-user usage
-
 ## Contributing
 ## Contributing
 
 
-To edit the database, only make PRs against files in the `lib/` folder.
+To edit the database, only make PRs against `src/custom.json` or
+`src/custom-suffix.json`.
+
 To update the build, run `npm run update`.
 To update the build, run `npm run update`.
 
 
+## Adding Custom Media Types
+
+The best way to get new media types included in this library is to register
+them with the IANA. The community registration procedure is outlined in
+[RFC 6838 section 5](http://tools.ietf.org/html/rfc6838#section-5). Types
+registered with the IANA are automatically pulled into this library.
+
 [npm-version-image]: https://img.shields.io/npm/v/mime-db.svg?style=flat
 [npm-version-image]: https://img.shields.io/npm/v/mime-db.svg?style=flat
 [npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg?style=flat
 [npm-downloads-image]: https://img.shields.io/npm/dm/mime-db.svg?style=flat
 [npm-url]: https://npmjs.org/package/mime-db
 [npm-url]: https://npmjs.org/package/mime-db

+ 152 - 180
node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/db.json

@@ -8,6 +8,9 @@
   "application/3gpp-ims+xml": {
   "application/3gpp-ims+xml": {
     "source": "iana"
     "source": "iana"
   },
   },
+  "application/a2l": {
+    "source": "iana"
+  },
   "application/activemessage": {
   "application/activemessage": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -51,6 +54,9 @@
     "source": "iana",
     "source": "iana",
     "compressible": true
     "compressible": true
   },
   },
+  "application/aml": {
+    "source": "iana"
+  },
   "application/andrew-inset": {
   "application/andrew-inset": {
     "source": "iana",
     "source": "iana",
     "extensions": ["ez"]
     "extensions": ["ez"]
@@ -65,6 +71,9 @@
   "application/atf": {
   "application/atf": {
     "source": "iana"
     "source": "iana"
   },
   },
+  "application/atfx": {
+    "source": "iana"
+  },
   "application/atom+xml": {
   "application/atom+xml": {
     "source": "iana",
     "source": "iana",
     "compressible": true,
     "compressible": true,
@@ -84,6 +93,9 @@
     "source": "iana",
     "source": "iana",
     "extensions": ["atomsvc"]
     "extensions": ["atomsvc"]
   },
   },
+  "application/atxml": {
+    "source": "iana"
+  },
   "application/auth-policy+xml": {
   "application/auth-policy+xml": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -119,6 +131,9 @@
     "source": "iana",
     "source": "iana",
     "extensions": ["ccxml"]
     "extensions": ["ccxml"]
   },
   },
+  "application/cdfx+xml": {
+    "source": "iana"
+  },
   "application/cdmi-capability": {
   "application/cdmi-capability": {
     "source": "iana",
     "source": "iana",
     "extensions": ["cdmia"]
     "extensions": ["cdmia"]
@@ -139,6 +154,9 @@
     "source": "iana",
     "source": "iana",
     "extensions": ["cdmiq"]
     "extensions": ["cdmiq"]
   },
   },
+  "application/cea": {
+    "source": "iana"
+  },
   "application/cea-2018+xml": {
   "application/cea-2018+xml": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -212,6 +230,12 @@
   "application/dicom": {
   "application/dicom": {
     "source": "iana"
     "source": "iana"
   },
   },
+  "application/dii": {
+    "source": "iana"
+  },
+  "application/dit": {
+    "source": "iana"
+  },
   "application/dns": {
   "application/dns": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -263,15 +287,12 @@
     "source": "iana"
     "source": "iana"
   },
   },
   "application/epub+zip": {
   "application/epub+zip": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["epub"]
     "extensions": ["epub"]
   },
   },
   "application/eshop": {
   "application/eshop": {
     "source": "iana"
     "source": "iana"
   },
   },
-  "application/example": {
-    "source": "iana"
-  },
   "application/exi": {
   "application/exi": {
     "source": "iana",
     "source": "iana",
     "extensions": ["exi"]
     "extensions": ["exi"]
@@ -407,6 +428,13 @@
     "compressible": true,
     "compressible": true,
     "extensions": ["js"]
     "extensions": ["js"]
   },
   },
+  "application/jose": {
+    "source": "iana"
+  },
+  "application/jose+json": {
+    "source": "iana",
+    "compressible": true
+  },
   "application/jrd+json": {
   "application/jrd+json": {
     "source": "iana",
     "source": "iana",
     "compressible": true
     "compressible": true
@@ -421,11 +449,28 @@
     "source": "iana",
     "source": "iana",
     "compressible": true
     "compressible": true
   },
   },
+  "application/json-seq": {
+    "source": "iana"
+  },
+  "application/json5": {
+    "extensions": ["json5"]
+  },
   "application/jsonml+json": {
   "application/jsonml+json": {
     "source": "apache",
     "source": "apache",
     "compressible": true,
     "compressible": true,
     "extensions": ["jsonml"]
     "extensions": ["jsonml"]
   },
   },
+  "application/jwk+json": {
+    "source": "iana",
+    "compressible": true
+  },
+  "application/jwk-set+json": {
+    "source": "iana",
+    "compressible": true
+  },
+  "application/jwt": {
+    "source": "iana"
+  },
   "application/kpml-request+xml": {
   "application/kpml-request+xml": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -449,6 +494,9 @@
   "application/lostsync+xml": {
   "application/lostsync+xml": {
     "source": "iana"
     "source": "iana"
   },
   },
+  "application/lxf": {
+    "source": "iana"
+  },
   "application/mac-binhex40": {
   "application/mac-binhex40": {
     "source": "iana",
     "source": "iana",
     "extensions": ["hqx"]
     "extensions": ["hqx"]
@@ -520,12 +568,9 @@
     "source": "iana"
     "source": "iana"
   },
   },
   "application/mbox": {
   "application/mbox": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["mbox"]
     "extensions": ["mbox"]
   },
   },
-  "application/mbox+xml": {
-    "source": "iana"
-  },
   "application/media-policy-dataset+xml": {
   "application/media-policy-dataset+xml": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -552,6 +597,9 @@
     "source": "iana",
     "source": "iana",
     "extensions": ["mets"]
     "extensions": ["mets"]
   },
   },
+  "application/mf4": {
+    "source": "iana"
+  },
   "application/mikey": {
   "application/mikey": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -631,7 +679,7 @@
     "source": "iana"
     "source": "iana"
   },
   },
   "application/ocsp-response": {
   "application/ocsp-response": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "application/octet-stream": {
   "application/octet-stream": {
     "source": "iana",
     "source": "iana",
@@ -662,9 +710,6 @@
     "source": "apache",
     "source": "apache",
     "extensions": ["onetoc","onetoc2","onetmp","onepkg"]
     "extensions": ["onetoc","onetoc2","onetmp","onepkg"]
   },
   },
-  "application/oscp-response": {
-    "source": "iana"
-  },
   "application/oxps": {
   "application/oxps": {
     "source": "iana",
     "source": "iana",
     "extensions": ["oxps"]
     "extensions": ["oxps"]
@@ -792,6 +837,10 @@
   "application/raptorfec": {
   "application/raptorfec": {
     "source": "iana"
     "source": "iana"
   },
   },
+  "application/rdap+json": {
+    "source": "iana",
+    "compressible": true
+  },
   "application/rdf+xml": {
   "application/rdf+xml": {
     "source": "iana",
     "source": "iana",
     "compressible": true,
     "compressible": true,
@@ -1085,30 +1134,6 @@
   "application/vividence.scriptfile": {
   "application/vividence.scriptfile": {
     "source": "apache"
     "source": "apache"
   },
   },
-  "application/vnd-acucobol": {
-    "source": "iana"
-  },
-  "application/vnd-curl": {
-    "source": "iana"
-  },
-  "application/vnd-dart": {
-    "source": "iana"
-  },
-  "application/vnd-dxr": {
-    "source": "iana"
-  },
-  "application/vnd-fdf": {
-    "source": "iana"
-  },
-  "application/vnd-mif": {
-    "source": "iana"
-  },
-  "application/vnd-sema": {
-    "source": "iana"
-  },
-  "application/vnd-wap-wmlc": {
-    "source": "iana"
-  },
   "application/vnd.3gpp.bsf+xml": {
   "application/vnd.3gpp.bsf+xml": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -1150,7 +1175,7 @@
     "extensions": ["imp"]
     "extensions": ["imp"]
   },
   },
   "application/vnd.acucobol": {
   "application/vnd.acucobol": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["acu"]
     "extensions": ["acu"]
   },
   },
   "application/vnd.acucorp": {
   "application/vnd.acucorp": {
@@ -1161,7 +1186,7 @@
     "source": "apache",
     "source": "apache",
     "extensions": ["air"]
     "extensions": ["air"]
   },
   },
-  "application/vnd.adobe.flash-movie": {
+  "application/vnd.adobe.flash.movie": {
     "source": "iana"
     "source": "iana"
   },
   },
   "application/vnd.adobe.formscentral.fcdt": {
   "application/vnd.adobe.formscentral.fcdt": {
@@ -1236,6 +1261,12 @@
   "application/vnd.apache.thrift.binary": {
   "application/vnd.apache.thrift.binary": {
     "source": "iana"
     "source": "iana"
   },
   },
+  "application/vnd.apache.thrift.compact": {
+    "source": "iana"
+  },
+  "application/vnd.apache.thrift.json": {
+    "source": "iana"
+  },
   "application/vnd.api+json": {
   "application/vnd.api+json": {
     "source": "iana",
     "source": "iana",
     "compressible": true
     "compressible": true
@@ -1347,6 +1378,9 @@
     "source": "iana",
     "source": "iana",
     "extensions": ["c11amz"]
     "extensions": ["c11amz"]
   },
   },
+  "application/vnd.coffeescript": {
+    "source": "iana"
+  },
   "application/vnd.collection+json": {
   "application/vnd.collection+json": {
     "source": "iana",
     "source": "iana",
     "compressible": true
     "compressible": true
@@ -1422,7 +1456,7 @@
     "source": "iana"
     "source": "iana"
   },
   },
   "application/vnd.curl": {
   "application/vnd.curl": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "application/vnd.curl.car": {
   "application/vnd.curl.car": {
     "source": "apache",
     "source": "apache",
@@ -1439,7 +1473,7 @@
     "source": "iana"
     "source": "iana"
   },
   },
   "application/vnd.dart": {
   "application/vnd.dart": {
-    "source": "apache",
+    "source": "iana",
     "compressible": true,
     "compressible": true,
     "extensions": ["dart"]
     "extensions": ["dart"]
   },
   },
@@ -1450,9 +1484,6 @@
   "application/vnd.debian.binary-package": {
   "application/vnd.debian.binary-package": {
     "source": "iana"
     "source": "iana"
   },
   },
-  "application/vnd.dece-zip": {
-    "source": "iana"
-  },
   "application/vnd.dece.data": {
   "application/vnd.dece.data": {
     "source": "iana",
     "source": "iana",
     "extensions": ["uvf","uvvf","uvd","uvvd"]
     "extensions": ["uvf","uvvf","uvd","uvvd"]
@@ -1466,7 +1497,7 @@
     "extensions": ["uvx","uvvx"]
     "extensions": ["uvx","uvvx"]
   },
   },
   "application/vnd.dece.zip": {
   "application/vnd.dece.zip": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["uvz","uvvz"]
     "extensions": ["uvz","uvvz"]
   },
   },
   "application/vnd.denovo.fcselayout-link": {
   "application/vnd.denovo.fcselayout-link": {
@@ -1580,14 +1611,11 @@
     "source": "iana"
     "source": "iana"
   },
   },
   "application/vnd.dvb.service": {
   "application/vnd.dvb.service": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["svc"]
     "extensions": ["svc"]
   },
   },
-  "application/vnd.dvb_service": {
-    "source": "iana"
-  },
   "application/vnd.dxr": {
   "application/vnd.dxr": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "application/vnd.dynageo": {
   "application/vnd.dynageo": {
     "source": "iana",
     "source": "iana",
@@ -1628,6 +1656,9 @@
     "source": "iana",
     "source": "iana",
     "extensions": ["nml"]
     "extensions": ["nml"]
   },
   },
+  "application/vnd.enphase.envoy": {
+    "source": "iana"
+  },
   "application/vnd.eprints.data+xml": {
   "application/vnd.eprints.data+xml": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -1739,7 +1770,7 @@
     "source": "iana"
     "source": "iana"
   },
   },
   "application/vnd.fdf": {
   "application/vnd.fdf": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["fdf"]
     "extensions": ["fdf"]
   },
   },
   "application/vnd.fdsn.mseed": {
   "application/vnd.fdsn.mseed": {
@@ -1869,6 +1900,9 @@
     "source": "iana",
     "source": "iana",
     "extensions": ["g3w"]
     "extensions": ["g3w"]
   },
   },
+  "application/vnd.gerber": {
+    "source": "iana"
+  },
   "application/vnd.globalplatform.card-content-mgt": {
   "application/vnd.globalplatform.card-content-mgt": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -1889,6 +1923,12 @@
     "compressible": false,
     "compressible": false,
     "extensions": ["kmz"]
     "extensions": ["kmz"]
   },
   },
+  "application/vnd.gov.sk.e-form+xml": {
+    "source": "iana"
+  },
+  "application/vnd.gov.sk.e-form+zip": {
+    "source": "iana"
+  },
   "application/vnd.grafeq": {
   "application/vnd.grafeq": {
     "source": "iana",
     "source": "iana",
     "extensions": ["gqf","gqs"]
     "extensions": ["gqf","gqs"]
@@ -2025,6 +2065,15 @@
     "source": "iana",
     "source": "iana",
     "extensions": ["ivu"]
     "extensions": ["ivu"]
   },
   },
+  "application/vnd.ims.imsccv1p1": {
+    "source": "iana"
+  },
+  "application/vnd.ims.imsccv1p2": {
+    "source": "iana"
+  },
+  "application/vnd.ims.imsccv1p3": {
+    "source": "iana"
+  },
   "application/vnd.ims.lis.v2.result+json": {
   "application/vnd.ims.lis.v2.result+json": {
     "source": "iana",
     "source": "iana",
     "compressible": true
     "compressible": true
@@ -2315,15 +2364,12 @@
     "source": "iana",
     "source": "iana",
     "extensions": ["mfm"]
     "extensions": ["mfm"]
   },
   },
-  "application/vnd.micrografx-igx": {
-    "source": "iana"
-  },
   "application/vnd.micrografx.flo": {
   "application/vnd.micrografx.flo": {
     "source": "iana",
     "source": "iana",
     "extensions": ["flo"]
     "extensions": ["flo"]
   },
   },
   "application/vnd.micrografx.igx": {
   "application/vnd.micrografx.igx": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["igx"]
     "extensions": ["igx"]
   },
   },
   "application/vnd.miele+json": {
   "application/vnd.miele+json": {
@@ -2331,7 +2377,7 @@
     "compressible": true
     "compressible": true
   },
   },
   "application/vnd.mif": {
   "application/vnd.mif": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["mif"]
     "extensions": ["mif"]
   },
   },
   "application/vnd.minisoft-hp3000-save": {
   "application/vnd.minisoft-hp3000-save": {
@@ -2556,6 +2602,9 @@
     "compressible": false,
     "compressible": false,
     "extensions": ["xps"]
     "extensions": ["xps"]
   },
   },
+  "application/vnd.msa-disk-image": {
+    "source": "iana"
+  },
   "application/vnd.mseq": {
   "application/vnd.mseq": {
     "source": "iana",
     "source": "iana",
     "extensions": ["mseq"]
     "extensions": ["mseq"]
@@ -3183,6 +3232,10 @@
   "application/vnd.openxmlformats-package.relationships+xml": {
   "application/vnd.openxmlformats-package.relationships+xml": {
     "source": "iana"
     "source": "iana"
   },
   },
+  "application/vnd.oracle.resource+json": {
+    "source": "iana",
+    "compressible": true
+  },
   "application/vnd.orange.indata": {
   "application/vnd.orange.indata": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -3292,7 +3345,7 @@
     "extensions": ["ptid"]
     "extensions": ["ptid"]
   },
   },
   "application/vnd.pwg-multiplexed": {
   "application/vnd.pwg-multiplexed": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "application/vnd.pwg-xhtml-print+xml": {
   "application/vnd.pwg-xhtml-print+xml": {
     "source": "iana"
     "source": "iana"
@@ -3415,24 +3468,6 @@
   "application/vnd.scribus": {
   "application/vnd.scribus": {
     "source": "iana"
     "source": "iana"
   },
   },
-  "application/vnd.sealed-doc": {
-    "source": "iana"
-  },
-  "application/vnd.sealed-eml": {
-    "source": "iana"
-  },
-  "application/vnd.sealed-mht": {
-    "source": "iana"
-  },
-  "application/vnd.sealed-ppt": {
-    "source": "iana"
-  },
-  "application/vnd.sealed-tiff": {
-    "source": "iana"
-  },
-  "application/vnd.sealed-xls": {
-    "source": "iana"
-  },
   "application/vnd.sealed.3df": {
   "application/vnd.sealed.3df": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -3440,44 +3475,38 @@
     "source": "iana"
     "source": "iana"
   },
   },
   "application/vnd.sealed.doc": {
   "application/vnd.sealed.doc": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "application/vnd.sealed.eml": {
   "application/vnd.sealed.eml": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "application/vnd.sealed.mht": {
   "application/vnd.sealed.mht": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "application/vnd.sealed.net": {
   "application/vnd.sealed.net": {
     "source": "iana"
     "source": "iana"
   },
   },
   "application/vnd.sealed.ppt": {
   "application/vnd.sealed.ppt": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "application/vnd.sealed.tiff": {
   "application/vnd.sealed.tiff": {
-    "source": "apache"
-  },
-  "application/vnd.sealed.xls": {
-    "source": "apache"
-  },
-  "application/vnd.sealedmedia.softseal-html": {
     "source": "iana"
     "source": "iana"
   },
   },
-  "application/vnd.sealedmedia.softseal-pdf": {
+  "application/vnd.sealed.xls": {
     "source": "iana"
     "source": "iana"
   },
   },
   "application/vnd.sealedmedia.softseal.html": {
   "application/vnd.sealedmedia.softseal.html": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "application/vnd.sealedmedia.softseal.pdf": {
   "application/vnd.sealedmedia.softseal.pdf": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "application/vnd.seemail": {
   "application/vnd.seemail": {
     "source": "iana",
     "source": "iana",
     "extensions": ["see"]
     "extensions": ["see"]
   },
   },
   "application/vnd.sema": {
   "application/vnd.sema": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["sema"]
     "extensions": ["sema"]
   },
   },
   "application/vnd.semd": {
   "application/vnd.semd": {
@@ -3681,6 +3710,9 @@
     "source": "iana",
     "source": "iana",
     "extensions": ["pcap","cap","dmp"]
     "extensions": ["pcap","cap","dmp"]
   },
   },
+  "application/vnd.tmd.mediaflex.api+xml": {
+    "source": "iana"
+  },
   "application/vnd.tmobile-livetv": {
   "application/vnd.tmobile-livetv": {
     "source": "iana",
     "source": "iana",
     "extensions": ["tmo"]
     "extensions": ["tmo"]
@@ -3796,24 +3828,18 @@
     "source": "iana",
     "source": "iana",
     "extensions": ["vsf"]
     "extensions": ["vsf"]
   },
   },
-  "application/vnd.wap-slc": {
-    "source": "iana"
-  },
-  "application/vnd.wap-wbxml": {
-    "source": "iana"
-  },
   "application/vnd.wap.sic": {
   "application/vnd.wap.sic": {
     "source": "iana"
     "source": "iana"
   },
   },
   "application/vnd.wap.slc": {
   "application/vnd.wap.slc": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "application/vnd.wap.wbxml": {
   "application/vnd.wap.wbxml": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["wbxml"]
     "extensions": ["wbxml"]
   },
   },
   "application/vnd.wap.wmlc": {
   "application/vnd.wap.wmlc": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["wmlc"]
     "extensions": ["wmlc"]
   },
   },
   "application/vnd.wap.wmlscriptc": {
   "application/vnd.wap.wmlscriptc": {
@@ -3965,9 +3991,6 @@
   "application/vq-rtcpxr": {
   "application/vq-rtcpxr": {
     "source": "iana"
     "source": "iana"
   },
   },
-  "application/vwg-multiplexed": {
-    "source": "iana"
-  },
   "application/watcherinfo+xml": {
   "application/watcherinfo+xml": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -4447,11 +4470,9 @@
     "compressible": true,
     "compressible": true,
     "extensions": ["webapp"]
     "extensions": ["webapp"]
   },
   },
-  "application/x-www-form-urlencode": {
-    "compressible": false
-  },
   "application/x-www-form-urlencoded": {
   "application/x-www-form-urlencoded": {
-    "source": "iana"
+    "source": "iana",
+    "compressible": true
   },
   },
   "application/x-x509-ca-cert": {
   "application/x-x509-ca-cert": {
     "source": "apache",
     "source": "apache",
@@ -4710,23 +4731,17 @@
   "audio/evrcwb1": {
   "audio/evrcwb1": {
     "source": "iana"
     "source": "iana"
   },
   },
-  "audio/example": {
-    "source": "iana"
-  },
   "audio/fwdred": {
   "audio/fwdred": {
     "source": "iana"
     "source": "iana"
   },
   },
   "audio/g719": {
   "audio/g719": {
     "source": "iana"
     "source": "iana"
   },
   },
-  "audio/g721": {
-    "source": "iana"
-  },
   "audio/g722": {
   "audio/g722": {
     "source": "iana"
     "source": "iana"
   },
   },
   "audio/g7221": {
   "audio/g7221": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "audio/g723": {
   "audio/g723": {
     "source": "iana"
     "source": "iana"
@@ -5040,11 +5055,8 @@
   "audio/vnd.rn-realaudio": {
   "audio/vnd.rn-realaudio": {
     "compressible": false
     "compressible": false
   },
   },
-  "audio/vnd.sealedmedia.softseal-mpeg": {
-    "source": "iana"
-  },
   "audio/vnd.sealedmedia.softseal.mpeg": {
   "audio/vnd.sealedmedia.softseal.mpeg": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "audio/vnd.vmx.cvsd": {
   "audio/vnd.vmx.cvsd": {
     "source": "iana"
     "source": "iana"
@@ -5157,9 +5169,6 @@
     "source": "iana",
     "source": "iana",
     "extensions": ["cgm"]
     "extensions": ["cgm"]
   },
   },
-  "image/example": {
-    "source": "iana"
-  },
   "image/fits": {
   "image/fits": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -5235,15 +5244,6 @@
   "image/tiff-fx": {
   "image/tiff-fx": {
     "source": "iana"
     "source": "iana"
   },
   },
-  "image/vnd-djvu": {
-    "source": "iana"
-  },
-  "image/vnd-svf": {
-    "source": "iana"
-  },
-  "image/vnd-wap-wbmp": {
-    "source": "iana"
-  },
   "image/vnd.adobe.photoshop": {
   "image/vnd.adobe.photoshop": {
     "source": "iana",
     "source": "iana",
     "compressible": true,
     "compressible": true,
@@ -5260,7 +5260,7 @@
     "extensions": ["uvi","uvvi","uvg","uvvg"]
     "extensions": ["uvi","uvvi","uvg","uvvg"]
   },
   },
   "image/vnd.djvu": {
   "image/vnd.djvu": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["djvu","djv"]
     "extensions": ["djvu","djv"]
   },
   },
   "image/vnd.dvb.subtitle": {
   "image/vnd.dvb.subtitle": {
@@ -5319,26 +5319,17 @@
   "image/vnd.radiance": {
   "image/vnd.radiance": {
     "source": "iana"
     "source": "iana"
   },
   },
-  "image/vnd.sealed-png": {
-    "source": "iana"
-  },
   "image/vnd.sealed.png": {
   "image/vnd.sealed.png": {
-    "source": "apache"
-  },
-  "image/vnd.sealedmedia.softseal-gif": {
-    "source": "iana"
-  },
-  "image/vnd.sealedmedia.softseal-jpg": {
     "source": "iana"
     "source": "iana"
   },
   },
   "image/vnd.sealedmedia.softseal.gif": {
   "image/vnd.sealedmedia.softseal.gif": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "image/vnd.sealedmedia.softseal.jpg": {
   "image/vnd.sealedmedia.softseal.jpg": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "image/vnd.svf": {
   "image/vnd.svf": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "image/vnd.tencent.tap": {
   "image/vnd.tencent.tap": {
     "source": "iana"
     "source": "iana"
@@ -5347,7 +5338,7 @@
     "source": "iana"
     "source": "iana"
   },
   },
   "image/vnd.wap.wbmp": {
   "image/vnd.wap.wbmp": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["wbmp"]
     "extensions": ["wbmp"]
   },
   },
   "image/vnd.xiff": {
   "image/vnd.xiff": {
@@ -5439,9 +5430,6 @@
   "message/disposition-notification": {
   "message/disposition-notification": {
     "source": "iana"
     "source": "iana"
   },
   },
-  "message/example": {
-    "source": "iana"
-  },
   "message/external-body": {
   "message/external-body": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -5498,10 +5486,6 @@
   "message/vnd.wfa.wsc": {
   "message/vnd.wfa.wsc": {
     "source": "iana"
     "source": "iana"
   },
   },
-  "model/example": {
-    "source": "iana",
-    "compressible": false
-  },
   "model/iges": {
   "model/iges": {
     "source": "iana",
     "source": "iana",
     "compressible": false,
     "compressible": false,
@@ -5512,15 +5496,12 @@
     "compressible": false,
     "compressible": false,
     "extensions": ["msh","mesh","silo"]
     "extensions": ["msh","mesh","silo"]
   },
   },
-  "model/vnd-dwf": {
-    "source": "iana"
-  },
   "model/vnd.collada+xml": {
   "model/vnd.collada+xml": {
     "source": "iana",
     "source": "iana",
     "extensions": ["dae"]
     "extensions": ["dae"]
   },
   },
   "model/vnd.dwf": {
   "model/vnd.dwf": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["dwf"]
     "extensions": ["dwf"]
   },
   },
   "model/vnd.flatland.3dml": {
   "model/vnd.flatland.3dml": {
@@ -5531,10 +5512,10 @@
     "extensions": ["gdl"]
     "extensions": ["gdl"]
   },
   },
   "model/vnd.gs-gdl": {
   "model/vnd.gs-gdl": {
-    "source": "iana"
+    "source": "apache"
   },
   },
   "model/vnd.gs.gdl": {
   "model/vnd.gs.gdl": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "model/vnd.gtw": {
   "model/vnd.gtw": {
     "source": "iana",
     "source": "iana",
@@ -5550,17 +5531,11 @@
   "model/vnd.opengex": {
   "model/vnd.opengex": {
     "source": "iana"
     "source": "iana"
   },
   },
-  "model/vnd.parasolid.transmit-binary": {
-    "source": "iana"
-  },
-  "model/vnd.parasolid.transmit-text": {
-    "source": "iana"
-  },
   "model/vnd.parasolid.transmit.binary": {
   "model/vnd.parasolid.transmit.binary": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "model/vnd.parasolid.transmit.text": {
   "model/vnd.parasolid.transmit.text": {
-    "source": "apache"
+    "source": "iana"
   },
   },
   "model/vnd.valve.source.compiled-map": {
   "model/vnd.valve.source.compiled-map": {
     "source": "iana"
     "source": "iana"
@@ -5612,9 +5587,6 @@
     "source": "iana",
     "source": "iana",
     "compressible": false
     "compressible": false
   },
   },
-  "multipart/example": {
-    "source": "iana"
-  },
   "multipart/form-data": {
   "multipart/form-data": {
     "source": "iana",
     "source": "iana",
     "compressible": false
     "compressible": false
@@ -5677,6 +5649,9 @@
     "compressible": true,
     "compressible": true,
     "extensions": ["csv"]
     "extensions": ["csv"]
   },
   },
+  "text/csv-schema": {
+    "source": "iana"
+  },
   "text/directory": {
   "text/directory": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -5692,15 +5667,15 @@
   "text/enriched": {
   "text/enriched": {
     "source": "iana"
     "source": "iana"
   },
   },
-  "text/example": {
-    "source": "iana"
-  },
   "text/fwdred": {
   "text/fwdred": {
     "source": "iana"
     "source": "iana"
   },
   },
   "text/grammar-ref-list": {
   "text/grammar-ref-list": {
     "source": "iana"
     "source": "iana"
   },
   },
+  "text/hjson": {
+    "extensions": ["hjson"]
+  },
   "text/html": {
   "text/html": {
     "source": "iana",
     "source": "iana",
     "compressible": true,
     "compressible": true,
@@ -5723,6 +5698,9 @@
   "text/less": {
   "text/less": {
     "extensions": ["less"]
     "extensions": ["less"]
   },
   },
+  "text/markdown": {
+    "source": "iana"
+  },
   "text/mizar": {
   "text/mizar": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -5814,17 +5792,14 @@
     "compressible": true,
     "compressible": true,
     "extensions": ["vcard"]
     "extensions": ["vcard"]
   },
   },
-  "text/vnd-a": {
-    "source": "iana"
-  },
-  "text/vnd-curl": {
+  "text/vnd.a": {
     "source": "iana"
     "source": "iana"
   },
   },
   "text/vnd.abc": {
   "text/vnd.abc": {
     "source": "iana"
     "source": "iana"
   },
   },
   "text/vnd.curl": {
   "text/vnd.curl": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["curl"]
     "extensions": ["curl"]
   },
   },
   "text/vnd.curl.dcurl": {
   "text/vnd.curl.dcurl": {
@@ -5903,9 +5878,6 @@
   "text/vnd.trolltech.linguist": {
   "text/vnd.trolltech.linguist": {
     "source": "iana"
     "source": "iana"
   },
   },
-  "text/vnd.wap-wml": {
-    "source": "iana"
-  },
   "text/vnd.wap.si": {
   "text/vnd.wap.si": {
     "source": "iana"
     "source": "iana"
   },
   },
@@ -5913,7 +5885,7 @@
     "source": "iana"
     "source": "iana"
   },
   },
   "text/vnd.wap.wml": {
   "text/vnd.wap.wml": {
-    "source": "apache",
+    "source": "iana",
     "extensions": ["wml"]
     "extensions": ["wml"]
   },
   },
   "text/vnd.wap.wmlscript": {
   "text/vnd.wap.wmlscript": {
@@ -6005,6 +5977,9 @@
   "text/xml-external-parsed-entity": {
   "text/xml-external-parsed-entity": {
     "source": "iana"
     "source": "iana"
   },
   },
+  "text/yaml": {
+    "extensions": ["yaml","yml"]
+  },
   "video/1d-interleaved-parityfec": {
   "video/1d-interleaved-parityfec": {
     "source": "apache"
     "source": "apache"
   },
   },
@@ -6031,9 +6006,6 @@
   "video/dv": {
   "video/dv": {
     "source": "apache"
     "source": "apache"
   },
   },
-  "video/example": {
-    "source": "apache"
-  },
   "video/h261": {
   "video/h261": {
     "source": "apache",
     "source": "apache",
     "extensions": ["h261"]
     "extensions": ["h261"]

File diff suppressed because it is too large
+ 34 - 20
node_modules/body-parser/node_modules/type-is/node_modules/mime-types/node_modules/mime-db/package.json


File diff suppressed because it is too large
+ 9 - 6
node_modules/body-parser/node_modules/type-is/node_modules/mime-types/package.json


File diff suppressed because it is too large
+ 5 - 6
node_modules/body-parser/node_modules/type-is/package.json


File diff suppressed because it is too large
+ 14 - 14
node_modules/body-parser/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/abbrev/package.json


File diff suppressed because it is too large
+ 1 - 4
node_modules/bower/node_modules/archy/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/bower-config/node_modules/graceful-fs/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/bower-config/node_modules/optimist/node_modules/minimist/package.json


File diff suppressed because it is too large
+ 0 - 19
node_modules/bower/node_modules/bower-config/node_modules/optimist/node_modules/wordwrap/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/bower-config/node_modules/optimist/package.json


File diff suppressed because it is too large
+ 0 - 14
node_modules/bower/node_modules/bower-config/node_modules/osenv/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/bower-config/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/bower-endpoint-parser/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/bower-json/node_modules/deep-extend/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/bower-json/node_modules/graceful-fs/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/bower-json/node_modules/intersect/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/bower-json/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/bower-logger/package.json


+ 4 - 4
node_modules/bower/node_modules/bower-registry-client/.travis.yml

@@ -1,6 +1,6 @@
-before_script:
-  - npm install -g grunt-cli
+sudo: false
 language: node_js
 language: node_js
 node_js:
 node_js:
-  - "0.10"
-  - "0.8"
+  - 'iojs'
+  - '0.12'
+  - '0.10'

+ 6 - 12
node_modules/bower/node_modules/bower-registry-client/Gruntfile.js

@@ -1,14 +1,10 @@
+'use strict';
 module.exports = function (grunt) {
 module.exports = function (grunt) {
-
-    'use strict';
-
     grunt.loadNpmTasks('grunt-contrib-jshint');
     grunt.loadNpmTasks('grunt-contrib-jshint');
     grunt.loadNpmTasks('grunt-contrib-watch');
     grunt.loadNpmTasks('grunt-contrib-watch');
     grunt.loadNpmTasks('grunt-simple-mocha');
     grunt.loadNpmTasks('grunt-simple-mocha');
 
 
-    // Project configuration.
     grunt.initConfig({
     grunt.initConfig({
-
         jshint: {
         jshint: {
             files: [
             files: [
                 'Gruntfile.js',
                 'Gruntfile.js',
@@ -19,12 +15,14 @@ module.exports = function (grunt) {
                 jshintrc: '.jshintrc'
                 jshintrc: '.jshintrc'
             }
             }
         },
         },
-
         simplemocha: {
         simplemocha: {
             options: {
             options: {
-                reporter: 'spec'
+                reporter: 'spec',
+                timeout: 20000
+            },
+            full: {
+                src: ['test/runner.js']
             },
             },
-            full: { src: ['test/runner.js'] },
             short: {
             short: {
                 options: {
                 options: {
                     reporter: 'dot'
                     reporter: 'dot'
@@ -38,16 +36,12 @@ module.exports = function (grunt) {
                 src: ['test/runner.js']
                 src: ['test/runner.js']
             }
             }
         },
         },
-
-
         watch: {
         watch: {
             files: ['<%= jshint.files %>'],
             files: ['<%= jshint.files %>'],
             tasks: ['jshint', 'simplemocha:short']
             tasks: ['jshint', 'simplemocha:short']
         }
         }
-
     });
     });
 
 
-    // Default task.
     grunt.registerTask('test', ['simplemocha:full']);
     grunt.registerTask('test', ['simplemocha:full']);
     grunt.registerTask('default', ['jshint', 'test']);
     grunt.registerTask('default', ['jshint', 'test']);
 };
 };

+ 9 - 4
node_modules/bower/node_modules/bower-registry-client/README.md

@@ -1,12 +1,18 @@
-# bower-registry-client [![Build Status](https://secure.travis-ci.org/bower/registry-client.png?branch=master)](http://travis-ci.org/bower/registry-client)
+# bower-registry-client [![Build Status](https://travis-ci.org/bower/registry-client.png?branch=master)](https://travis-ci.org/bower/registry-client)
 
 
-This module allows you to easily interact with the Bower server API.
+> Provides easy interaction with the Bower registry
+
+
+## Install
+
+```
+$ npm install --save bower-registry-client
+```
 
 
 
 
 ## Usage
 ## Usage
 
 
 ```js
 ```js
-
 var RegistryClient = require('bower-registry-client');
 var RegistryClient = require('bower-registry-client');
 var registry = new RegistryClient(options, logger);
 var registry = new RegistryClient(options, logger);
 ```
 ```
@@ -142,7 +148,6 @@ RegistryClient.clearRuntimeCache();
 ```
 ```
 
 
 
 
-
 ## License
 ## License
 
 
 Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).
 Released under the [MIT License](http://www.opensource.org/licenses/mit-license.php).

+ 2 - 2
node_modules/bower/node_modules/bower-registry-client/lib/register.js

@@ -35,7 +35,7 @@ function register(name, url, callback) {
         }
         }
 
 
         // Duplicate
         // Duplicate
-        if (response.statusCode === 406) {
+        if (response.statusCode === 403) {
             return callback(createError('Duplicate package', 'EDUPLICATE'));
             return callback(createError('Duplicate package', 'EDUPLICATE'));
         }
         }
 
 
@@ -46,7 +46,7 @@ function register(name, url, callback) {
 
 
         // Everything other than 201 is unknown
         // Everything other than 201 is unknown
         if (response.statusCode !== 201) {
         if (response.statusCode !== 201) {
-            return callback(createError('Unknown error: ' + response.statusCode, 'EUNKNOWN'));
+            return callback(createError('Unknown error: ' + response.statusCode + ' - ' + response.body, 'EUNKNOWN'));
         }
         }
 
 
         callback(null, {
         callback(null, {

+ 2 - 2
node_modules/bower/node_modules/bower-registry-client/lib/unregister.js

@@ -31,12 +31,12 @@ function unregister(name, callback) {
 
 
         // Forbidden
         // Forbidden
         if (response.statusCode === 403) {
         if (response.statusCode === 403) {
-            return callback(createError('Not authorized', 'EFORBIDDEN'));
+            return callback(createError(response.body, 'EFORBIDDEN'));
         }
         }
 
 
         // Everything other than 204 is unknown
         // Everything other than 204 is unknown
         if (response.statusCode !== 204) {
         if (response.statusCode !== 204) {
-            return callback(createError('Unknown error: ' + response.statusCode + ', ' + response.body, 'EUNKNOWN'));
+            return callback(createError(response.body, 'EUNKNOWN'));
         }
         }
 
 
         callback(null, {
         callback(null, {

File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/bower-registry-client/node_modules/async/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/bower-registry-client/node_modules/graceful-fs/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/bower-registry-client/node_modules/lru-cache/package.json


File diff suppressed because it is too large
+ 0 - 20
node_modules/bower/node_modules/bower-registry-client/node_modules/mkdirp/package.json


File diff suppressed because it is too large
+ 0 - 0
node_modules/bower/node_modules/bower-registry-client/node_modules/request-replay/package.json


+ 1 - 0
node_modules/bower/node_modules/bower-registry-client/node_modules/request/.npmignore

@@ -1 +1,2 @@
+tests
 node_modules
 node_modules

File diff suppressed because it is too large
+ 129 - 7
node_modules/bower/node_modules/bower-registry-client/node_modules/request/README.md


+ 122 - 95
node_modules/bower/node_modules/bower-registry-client/node_modules/request/index.js

@@ -12,138 +12,165 @@
 //    See the License for the specific language governing permissions and
 //    See the License for the specific language governing permissions and
 //    limitations under the License.
 //    limitations under the License.
 
 
-var Cookie = require('cookie-jar')
-  , CookieJar = Cookie.Jar
-  , cookieJar = new CookieJar
+'use strict'
 
 
-  , copy = require('./lib/copy')
-  , Request = require('./request')
-  ;
+var extend                = require('util')._extend
+  , cookies               = require('./lib/cookies')
+  , helpers               = require('./lib/helpers')
 
 
+var isFunction            = helpers.isFunction
+  , constructObject       = helpers.constructObject
+  , filterForCallback     = helpers.filterForCallback
+  , constructOptionsFrom  = helpers.constructOptionsFrom
+  , paramsHaveRequestBody = helpers.paramsHaveRequestBody
 
 
 
 
 // organize params for patch, post, put, head, del
 // organize params for patch, post, put, head, del
 function initParams(uri, options, callback) {
 function initParams(uri, options, callback) {
-  if ((typeof options === 'function') && !callback) callback = options
-  if (options && typeof options === 'object') {
-    options.uri = uri
-  } else if (typeof uri === 'string') {
-    options = {uri:uri}
-  } else {
-    options = uri
-    uri = options.uri
-  }
-  return { uri: uri, options: options, callback: callback }
+  callback = filterForCallback([options, callback])
+  options = constructOptionsFrom(uri, options)
+
+  return constructObject()
+    .extend({callback: callback})
+    .extend({options: options})
+    .extend({uri: options.uri})
+    .done()
 }
 }
 
 
 function request (uri, options, callback) {
 function request (uri, options, callback) {
-  if (typeof uri === 'undefined') throw new Error('undefined is not a valid uri or options object.')
-  if ((typeof options === 'function') && !callback) callback = options
-  if (options && typeof options === 'object') {
-    options.uri = uri
-  } else if (typeof uri === 'string') {
-    options = {uri:uri}
-  } else {
-    options = uri
+  if (typeof uri === 'undefined') {
+    throw new Error('undefined is not a valid uri or options object.')
   }
   }
 
 
-  options = copy(options)
+  var params = initParams(uri, options, callback)
+  options = params.options
+  options.callback = params.callback
+  options.uri = params.uri
 
 
-  if (callback) options.callback = callback
-  var r = new Request(options)
-  return r
+  return new request.Request(options)
 }
 }
 
 
-module.exports = request
-
-request.Request = Request;
+function requester(params) {
+  if(typeof params.options._requester === 'function') {
+    return params.options._requester
+  }
+  return request
+}
 
 
-request.debug = process.env.NODE_DEBUG && /request/.test(process.env.NODE_DEBUG)
+request.get = function (uri, options, callback) {
+  var params = initParams(uri, options, callback)
+  params.options.method = 'GET'
+  return requester(params)(params.uri || null, params.options, params.callback)
+}
 
 
-request.initParams = initParams
+request.head = function (uri, options, callback) {
+  var params = initParams(uri, options, callback)
+  params.options.method = 'HEAD'
 
 
-request.defaults = function (options, requester) {
-  var def = function (method) {
-    var d = function (uri, opts, callback) {
-      var params = initParams(uri, opts, callback)
-      for (var i in options) {
-        if (params.options[i] === undefined) params.options[i] = options[i]
-      }
-      if(typeof requester === 'function') {
-        if(method === request) {
-          method = requester
-        } else {
-          params.options._requester = requester
-        }
-      }
-      return method(params.options, params.callback)
-    }
-    return d
+  if (paramsHaveRequestBody(params)) {
+    throw new Error('HTTP HEAD requests MUST NOT include a request body.')
   }
   }
-  var de = def(request)
-  de.get = def(request.get)
-  de.patch = def(request.patch)
-  de.post = def(request.post)
-  de.put = def(request.put)
-  de.head = def(request.head)
-  de.del = def(request.del)
-  de.cookie = def(request.cookie)
-  de.jar = request.jar
-  return de
-}
 
 
-request.forever = function (agentOptions, optionsArg) {
-  var options = {}
-  if (optionsArg) {
-    for (option in optionsArg) {
-      options[option] = optionsArg[option]
-    }
-  }
-  if (agentOptions) options.agentOptions = agentOptions
-  options.forever = true
-  return request.defaults(options)
+  return requester(params)(params.uri || null, params.options, params.callback)
 }
 }
 
 
-request.get = request
 request.post = function (uri, options, callback) {
 request.post = function (uri, options, callback) {
   var params = initParams(uri, options, callback)
   var params = initParams(uri, options, callback)
   params.options.method = 'POST'
   params.options.method = 'POST'
-  return request(params.uri || null, params.options, params.callback)
+  return requester(params)(params.uri || null, params.options, params.callback)
 }
 }
+
 request.put = function (uri, options, callback) {
 request.put = function (uri, options, callback) {
   var params = initParams(uri, options, callback)
   var params = initParams(uri, options, callback)
   params.options.method = 'PUT'
   params.options.method = 'PUT'
-  return request(params.uri || null, params.options, params.callback)
+  return requester(params)(params.uri || null, params.options, params.callback)
 }
 }
+
 request.patch = function (uri, options, callback) {
 request.patch = function (uri, options, callback) {
   var params = initParams(uri, options, callback)
   var params = initParams(uri, options, callback)
   params.options.method = 'PATCH'
   params.options.method = 'PATCH'
-  return request(params.uri || null, params.options, params.callback)
-}
-request.head = function (uri, options, callback) {
-  var params = initParams(uri, options, callback)
-  params.options.method = 'HEAD'
-  if (params.options.body ||
-      params.options.requestBodyStream ||
-      (params.options.json && typeof params.options.json !== 'boolean') ||
-      params.options.multipart) {
-    throw new Error("HTTP HEAD requests MUST NOT include a request body.")
-  }
-  return request(params.uri || null, params.options, params.callback)
+  return requester(params)(params.uri || null, params.options, params.callback)
 }
 }
+
 request.del = function (uri, options, callback) {
 request.del = function (uri, options, callback) {
   var params = initParams(uri, options, callback)
   var params = initParams(uri, options, callback)
   params.options.method = 'DELETE'
   params.options.method = 'DELETE'
-  if(typeof params.options._requester === 'function') {
-    request = params.options._requester
-  }
-  return request(params.uri || null, params.options, params.callback)
+  return requester(params)(params.uri || null, params.options, params.callback)
 }
 }
-request.jar = function () {
-  return new CookieJar
+
+request.jar = function (store) {
+  return cookies.jar(store)
 }
 }
+
 request.cookie = function (str) {
 request.cookie = function (str) {
-  if (str && str.uri) str = str.uri
-  if (typeof str !== 'string') throw new Error("The cookie function only accepts STRING as param")
-  return new Cookie(str)
+  return cookies.parse(str)
+}
+
+request.defaults = function (options, requester) {
+  var self = this
+  var wrap = function (method) {
+    var headerlessOptions = function (options) {
+      options = extend({}, options)
+      delete options.headers
+      return options
+    }
+
+    var getHeaders = function (params, options) {
+      return constructObject()
+        .extend(options.headers)
+        .extend(params.options.headers)
+        .done()
+    }
+
+    return function (uri, opts, callback) {
+      var params = initParams(uri, opts, callback)
+      params.options = extend(headerlessOptions(options), params.options)
+
+      if (options.headers) {
+        params.options.headers = getHeaders(params, options)
+      }
+
+      if (isFunction(requester)) {
+        if (method === self) {
+          method = requester
+        } else {
+          params.options._requester = requester
+        }
+      }
+
+      return method(params.options, params.callback)
+    }
+  }
+
+  var defaults      = wrap(self)
+  defaults.get      = wrap(self.get)
+  defaults.patch    = wrap(self.patch)
+  defaults.post     = wrap(self.post)
+  defaults.put      = wrap(self.put)
+  defaults.head     = wrap(self.head)
+  defaults.del      = wrap(self.del)
+  defaults.cookie   = wrap(self.cookie)
+  defaults.jar      = self.jar
+  defaults.defaults = self.defaults
+  return defaults
+}
+
+request.forever = function (agentOptions, optionsArg) {
+  var options = constructObject()
+  if (optionsArg) {
+    options.extend(optionsArg)
+  }
+  if (agentOptions) {
+    options.agentOptions = agentOptions
+  }
+
+  options.extend({forever: true})
+  return request.defaults(options.done())
 }
 }
+
+// Exports
+
+module.exports = request
+request.Request = require('./request')
+request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG)
+request.initParams = initParams

Some files were not shown because too many files changed in this diff