fsevents 1.0.12 → 1.0.14

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fsevents might be problematic. Click here for more details.

Files changed (514) hide show
  1. package/.npmignore +1 -3
  2. package/.travis.yml +6 -5
  3. package/build/.target.mk +49 -0
  4. package/build/Makefile +352 -0
  5. package/build/action_after_build.target.mk +32 -0
  6. package/build/binding.Makefile +6 -0
  7. package/build/fse.target.mk +169 -0
  8. package/build/gyp-mac-tool +612 -0
  9. package/lib/binding/Release/node-v11-darwin-x64/fse.node +0 -0
  10. package/lib/binding/Release/node-v46-darwin-x64/fse.node +0 -0
  11. package/lib/binding/Release/node-v47-darwin-x64/fse.node +0 -0
  12. package/node_modules/abbrev/package.json +82 -0
  13. package/node_modules/{lodash.repeat/LICENSE → ansi-regex/license} +5 -7
  14. package/node_modules/ansi-regex/package.json +20 -2
  15. package/node_modules/{lodash.padstart/LICENSE → ansi-styles/license} +5 -7
  16. package/node_modules/ansi-styles/package.json +21 -4
  17. package/node_modules/aproba/LICENSE +14 -0
  18. package/node_modules/aproba/README.md +59 -0
  19. package/node_modules/aproba/index.js +62 -0
  20. package/node_modules/aproba/package.json +88 -0
  21. package/node_modules/are-we-there-yet/package.json +21 -4
  22. package/node_modules/asn1/package.json +19 -1
  23. package/node_modules/assert-plus/package.json +21 -4
  24. package/node_modules/async/CHANGELOG.md +125 -0
  25. package/node_modules/async/LICENSE +19 -0
  26. package/node_modules/async/package.json +20 -2
  27. package/node_modules/aws-sign2/package.json +20 -2
  28. package/node_modules/aws4/aws4.js +1 -1
  29. package/node_modules/aws4/lru.js +96 -0
  30. package/node_modules/aws4/package.json +31 -16
  31. package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion → balanced-match}/.npmignore +2 -0
  32. package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match → balanced-match}/README.md +5 -3
  33. package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match → balanced-match}/index.js +9 -1
  34. package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match → balanced-match}/package.json +35 -13
  35. package/node_modules/bl/README.md +3 -3
  36. package/node_modules/bl/bl.js +54 -38
  37. package/node_modules/bl/node_modules/readable-stream/.npmignore +5 -0
  38. package/node_modules/bl/node_modules/readable-stream/.travis.yml +52 -0
  39. package/node_modules/bl/node_modules/readable-stream/LICENSE +18 -0
  40. package/node_modules/bl/node_modules/readable-stream/README.md +36 -0
  41. package/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  42. package/node_modules/bl/node_modules/readable-stream/duplex.js +1 -0
  43. package/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js +75 -0
  44. package/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js +26 -0
  45. package/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js +880 -0
  46. package/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js +180 -0
  47. package/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js +516 -0
  48. package/node_modules/bl/node_modules/readable-stream/package.json +105 -0
  49. package/node_modules/bl/node_modules/readable-stream/passthrough.js +1 -0
  50. package/node_modules/bl/node_modules/readable-stream/readable.js +12 -0
  51. package/node_modules/bl/node_modules/readable-stream/transform.js +1 -0
  52. package/node_modules/bl/node_modules/readable-stream/writable.js +1 -0
  53. package/node_modules/bl/package.json +39 -15
  54. package/node_modules/bl/test/test.js +71 -2
  55. package/node_modules/block-stream/package.json +37 -12
  56. package/node_modules/boom/package.json +20 -2
  57. package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion → brace-expansion}/package.json +34 -16
  58. package/node_modules/buffer-shims/index.js +108 -0
  59. package/node_modules/buffer-shims/license.md +19 -0
  60. package/node_modules/buffer-shims/package.json +77 -0
  61. package/node_modules/buffer-shims/readme.md +21 -0
  62. package/node_modules/caseless/package.json +20 -2
  63. package/node_modules/{lodash.pad/LICENSE → chalk/license} +5 -7
  64. package/node_modules/chalk/package.json +21 -4
  65. package/node_modules/code-point-at/index.js +33 -0
  66. package/node_modules/{lodash.padend/LICENSE → code-point-at/license} +5 -7
  67. package/node_modules/code-point-at/package.json +96 -0
  68. package/node_modules/code-point-at/readme.md +34 -0
  69. package/node_modules/combined-stream/package.json +20 -2
  70. package/node_modules/commander/History.md +261 -0
  71. package/node_modules/commander/LICENSE +22 -0
  72. package/node_modules/commander/package.json +20 -2
  73. package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/package.json +21 -3
  74. package/node_modules/console-control-strings/LICENSE +13 -0
  75. package/node_modules/console-control-strings/README.md +145 -0
  76. package/node_modules/console-control-strings/README.md~ +140 -0
  77. package/node_modules/console-control-strings/index.js +125 -0
  78. package/node_modules/console-control-strings/package.json +88 -0
  79. package/node_modules/core-util-is/package.json +21 -2
  80. package/node_modules/cryptiles/package.json +20 -2
  81. package/node_modules/dashdash/lib/dashdash.js +34 -1
  82. package/node_modules/dashdash/node_modules/assert-plus/package.json +21 -4
  83. package/node_modules/dashdash/package.json +29 -12
  84. package/node_modules/debug/package.json +20 -2
  85. package/node_modules/deep-extend/CHANGELOG.md +21 -0
  86. package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → deep-extend}/LICENSE +3 -1
  87. package/node_modules/deep-extend/package.json +21 -4
  88. package/node_modules/delayed-stream/package.json +20 -2
  89. package/node_modules/delegates/package.json +21 -4
  90. package/node_modules/ecc-jsbn/package.json +20 -2
  91. package/node_modules/escape-string-regexp/license +21 -0
  92. package/node_modules/escape-string-regexp/package.json +21 -4
  93. package/node_modules/extend/package.json +20 -2
  94. package/node_modules/extsprintf/package.json +20 -3
  95. package/node_modules/forever-agent/package.json +20 -2
  96. package/node_modules/form-data/package.json +21 -4
  97. package/node_modules/fs.realpath/LICENSE +43 -0
  98. package/node_modules/fs.realpath/README.md +33 -0
  99. package/node_modules/fs.realpath/index.js +66 -0
  100. package/node_modules/fs.realpath/old.js +303 -0
  101. package/node_modules/fs.realpath/package.json +86 -0
  102. package/node_modules/fstream/.travis.yml +4 -4
  103. package/node_modules/fstream/lib/collect.js +2 -0
  104. package/node_modules/fstream/package.json +37 -15
  105. package/node_modules/fstream-ignore/package.json +45 -17
  106. package/node_modules/gauge/CHANGELOG.md +131 -0
  107. package/node_modules/gauge/CHANGELOG.md~ +123 -0
  108. package/node_modules/gauge/README.md +317 -88
  109. package/node_modules/gauge/README.md~ +393 -0
  110. package/node_modules/gauge/base-theme.js +14 -0
  111. package/node_modules/gauge/error.js +24 -0
  112. package/node_modules/gauge/has-color.js +12 -0
  113. package/node_modules/gauge/index.js +226 -0
  114. package/node_modules/gauge/package.json +67 -21
  115. package/node_modules/gauge/plumbing.js +47 -0
  116. package/node_modules/gauge/process.js +3 -0
  117. package/node_modules/gauge/progress-bar.js +29 -219
  118. package/node_modules/gauge/render-template.js +181 -0
  119. package/node_modules/gauge/set-immediate.js +7 -0
  120. package/node_modules/gauge/set-interval.js +3 -0
  121. package/node_modules/gauge/spin.js +5 -0
  122. package/node_modules/gauge/template-item.js +73 -0
  123. package/node_modules/gauge/theme-set.js +115 -0
  124. package/node_modules/gauge/themes.js +54 -0
  125. package/node_modules/gauge/wide-truncate.js +25 -0
  126. package/node_modules/generate-function/package.json +20 -2
  127. package/node_modules/generate-object-property/package.json +20 -2
  128. package/node_modules/getpass/.npmignore +8 -0
  129. package/node_modules/getpass/.travis.yml +9 -0
  130. package/node_modules/getpass/LICENSE +18 -0
  131. package/node_modules/getpass/README.md +32 -0
  132. package/node_modules/getpass/lib/index.js +123 -0
  133. package/node_modules/getpass/node_modules/assert-plus/AUTHORS +6 -0
  134. package/node_modules/getpass/node_modules/assert-plus/CHANGES.md +14 -0
  135. package/node_modules/getpass/node_modules/assert-plus/README.md +162 -0
  136. package/node_modules/getpass/node_modules/assert-plus/assert.js +211 -0
  137. package/node_modules/getpass/node_modules/assert-plus/package.json +107 -0
  138. package/node_modules/getpass/package.json +82 -0
  139. package/node_modules/glob/changelog.md +67 -0
  140. package/node_modules/{rimraf/node_modules/glob → glob}/glob.js +2 -1
  141. package/node_modules/glob/package.json +103 -0
  142. package/node_modules/{rimraf/node_modules/glob → glob}/sync.js +2 -1
  143. package/node_modules/graceful-fs/LICENSE +15 -0
  144. package/node_modules/graceful-fs/README.md +82 -2
  145. package/node_modules/graceful-fs/package.json +30 -12
  146. package/node_modules/graceful-readlink/package.json +20 -2
  147. package/node_modules/har-validator/LICENSE +13 -0
  148. package/node_modules/har-validator/package.json +20 -2
  149. package/node_modules/has-ansi/license +21 -0
  150. package/node_modules/has-ansi/package.json +20 -2
  151. package/node_modules/has-color/index.js +32 -0
  152. package/node_modules/has-color/package.json +97 -0
  153. package/node_modules/has-color/readme.md +30 -0
  154. package/node_modules/has-unicode/index.js +3 -8
  155. package/node_modules/has-unicode/package.json +36 -12
  156. package/node_modules/hawk/package.json +20 -2
  157. package/node_modules/hoek/package.json +20 -2
  158. package/node_modules/http-signature/package.json +20 -2
  159. package/node_modules/inflight/package.json +97 -0
  160. package/node_modules/inherits/package.json +16 -9
  161. package/node_modules/ini/package.json +21 -4
  162. package/node_modules/is-fullwidth-code-point/index.js +46 -0
  163. package/node_modules/is-fullwidth-code-point/license +21 -0
  164. package/node_modules/is-fullwidth-code-point/package.json +100 -0
  165. package/node_modules/is-fullwidth-code-point/readme.md +39 -0
  166. package/node_modules/is-my-json-valid/package.json +21 -4
  167. package/node_modules/is-property/package.json +20 -2
  168. package/node_modules/is-typedarray/package.json +20 -2
  169. package/node_modules/isarray/package.json +21 -2
  170. package/node_modules/isstream/package.json +20 -2
  171. package/node_modules/jodid25519/package.json +19 -1
  172. package/node_modules/jsbn/package.json +19 -1
  173. package/node_modules/json-schema/package.json +20 -2
  174. package/node_modules/json-stringify-safe/package.json +20 -2
  175. package/node_modules/jsonpointer/package.json +19 -1
  176. package/node_modules/jsprim/CHANGES.md +5 -0
  177. package/node_modules/jsprim/README.md +13 -4
  178. package/node_modules/jsprim/lib/jsprim.js +12 -2
  179. package/node_modules/jsprim/package.json +33 -11
  180. package/node_modules/mime-db/HISTORY.md +21 -0
  181. package/node_modules/mime-db/db.json +53 -1
  182. package/node_modules/mime-db/package.json +36 -19
  183. package/node_modules/mime-types/HISTORY.md +6 -0
  184. package/node_modules/mime-types/package.json +33 -16
  185. package/node_modules/{fstream-ignore/node_modules/minimatch → minimatch}/README.md +2 -9
  186. package/node_modules/{fstream-ignore/node_modules/minimatch → minimatch}/minimatch.js +15 -3
  187. package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch → minimatch}/package.json +37 -14
  188. package/node_modules/mkdirp/package.json +10 -8
  189. package/node_modules/ms/History.md +66 -0
  190. package/node_modules/ms/package.json +19 -1
  191. package/node_modules/node-pre-gyp/CHANGELOG.md +21 -0
  192. package/node_modules/node-pre-gyp/appveyor.yml +2 -2
  193. package/node_modules/node-pre-gyp/lib/install.js +12 -2
  194. package/node_modules/node-pre-gyp/lib/testbinary.js +9 -9
  195. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +84 -0
  196. package/node_modules/node-pre-gyp/package.json +21 -31
  197. package/node_modules/node-uuid/package.json +20 -2
  198. package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/package.json +21 -3
  199. package/node_modules/npmlog/CHANGELOG.md +36 -0
  200. package/node_modules/npmlog/CHANGELOG.md~ +31 -0
  201. package/node_modules/npmlog/README.md +16 -1
  202. package/node_modules/npmlog/log.js +97 -50
  203. package/node_modules/npmlog/package.json +43 -17
  204. package/node_modules/number-is-nan/index.js +4 -0
  205. package/node_modules/number-is-nan/license +21 -0
  206. package/node_modules/number-is-nan/package.json +94 -0
  207. package/node_modules/number-is-nan/readme.md +30 -0
  208. package/node_modules/oauth-sign/package.json +36 -12
  209. package/node_modules/object-assign/index.js +83 -0
  210. package/node_modules/object-assign/license +21 -0
  211. package/node_modules/object-assign/package.json +106 -0
  212. package/node_modules/object-assign/readme.md +56 -0
  213. package/node_modules/once/package.json +22 -2
  214. package/node_modules/path-is-absolute/license +21 -0
  215. package/node_modules/{rimraf/node_modules/glob/node_modules/path-is-absolute → path-is-absolute}/package.json +22 -4
  216. package/node_modules/pinkie/license +21 -0
  217. package/node_modules/pinkie/package.json +21 -4
  218. package/node_modules/pinkie-promise/index.js +1 -1
  219. package/node_modules/pinkie-promise/license +21 -0
  220. package/node_modules/pinkie-promise/package.json +32 -10
  221. package/node_modules/process-nextick-args/index.js +31 -8
  222. package/node_modules/process-nextick-args/package.json +33 -10
  223. package/node_modules/qs/.eslintrc +5 -3
  224. package/node_modules/qs/.jscs.json +176 -0
  225. package/node_modules/qs/CHANGELOG.md +10 -0
  226. package/node_modules/qs/dist/qs.js +75 -63
  227. package/node_modules/qs/lib/parse.js +32 -29
  228. package/node_modules/qs/lib/stringify.js +37 -30
  229. package/node_modules/qs/lib/utils.js +6 -4
  230. package/node_modules/qs/package.json +41 -18
  231. package/node_modules/qs/test/parse.js +30 -0
  232. package/node_modules/qs/test/stringify.js +70 -0
  233. package/node_modules/rc/node_modules/minimist/package.json +20 -2
  234. package/node_modules/rc/package.json +21 -4
  235. package/node_modules/readable-stream/.npmignore +4 -1
  236. package/node_modules/readable-stream/.travis.yml +2 -0
  237. package/node_modules/readable-stream/README.md +2 -2
  238. package/node_modules/readable-stream/doc/stream.md +1772 -0
  239. package/node_modules/readable-stream/lib/_stream_readable.js +33 -20
  240. package/node_modules/readable-stream/lib/_stream_transform.js +3 -3
  241. package/node_modules/readable-stream/lib/_stream_writable.js +25 -15
  242. package/node_modules/readable-stream/package.json +44 -15
  243. package/node_modules/readable-stream/readable.js +4 -0
  244. package/node_modules/request/.eslintrc +1 -1
  245. package/node_modules/request/.travis.yml +9 -3
  246. package/node_modules/request/CHANGELOG.md +46 -8
  247. package/node_modules/request/CONTRIBUTING.md +41 -4
  248. package/node_modules/request/README.md +9 -6
  249. package/node_modules/request/codecov.yml +2 -0
  250. package/node_modules/request/index.js +6 -5
  251. package/node_modules/request/lib/helpers.js +3 -3
  252. package/node_modules/request/package.json +52 -30
  253. package/node_modules/request/request.js +58 -43
  254. package/node_modules/rimraf/package.json +33 -16
  255. package/node_modules/rimraf/rimraf.js +10 -2
  256. package/node_modules/semver/README.md +27 -8
  257. package/node_modules/semver/package.json +38 -12
  258. package/node_modules/semver/range.bnf +1 -1
  259. package/node_modules/semver/semver.js +7 -1
  260. package/node_modules/set-blocking/CHANGELOG.md +26 -0
  261. package/node_modules/set-blocking/LICENSE.txt +14 -0
  262. package/node_modules/set-blocking/README.md +31 -0
  263. package/node_modules/set-blocking/index.js +7 -0
  264. package/node_modules/set-blocking/package.json +98 -0
  265. package/node_modules/signal-exit/CHANGELOG.md +17 -0
  266. package/node_modules/signal-exit/LICENSE.txt +14 -0
  267. package/node_modules/signal-exit/README.md +40 -0
  268. package/node_modules/signal-exit/index.js +148 -0
  269. package/node_modules/signal-exit/package.json +98 -0
  270. package/node_modules/signal-exit/signals.js +52 -0
  271. package/node_modules/sntp/package.json +20 -2
  272. package/node_modules/sshpk/.travis.yml +3 -3
  273. package/node_modules/sshpk/README.md +26 -7
  274. package/node_modules/sshpk/bin/sshpk-conv +14 -2
  275. package/node_modules/sshpk/bin/sshpk-sign +16 -1
  276. package/node_modules/sshpk/lib/errors.js +14 -1
  277. package/node_modules/sshpk/lib/formats/auto.js +8 -8
  278. package/node_modules/sshpk/lib/formats/pem.js +39 -5
  279. package/node_modules/sshpk/lib/formats/pkcs1.js +4 -4
  280. package/node_modules/sshpk/lib/formats/pkcs8.js +4 -4
  281. package/node_modules/sshpk/lib/formats/rfc4253.js +2 -2
  282. package/node_modules/sshpk/lib/formats/ssh-private.js +3 -3
  283. package/node_modules/sshpk/lib/formats/ssh.js +2 -2
  284. package/node_modules/sshpk/lib/index.js +2 -1
  285. package/node_modules/sshpk/lib/key.js +20 -17
  286. package/node_modules/sshpk/lib/private-key.js +19 -12
  287. package/node_modules/sshpk/lib/utils.js +40 -1
  288. package/node_modules/sshpk/node_modules/assert-plus/AUTHORS +6 -0
  289. package/node_modules/sshpk/node_modules/assert-plus/CHANGES.md +14 -0
  290. package/node_modules/sshpk/node_modules/assert-plus/README.md +162 -0
  291. package/node_modules/sshpk/node_modules/assert-plus/assert.js +211 -0
  292. package/node_modules/sshpk/node_modules/assert-plus/package.json +107 -0
  293. package/node_modules/sshpk/package.json +48 -30
  294. package/node_modules/string-width/index.js +32 -0
  295. package/node_modules/string-width/license +21 -0
  296. package/node_modules/string-width/package.json +111 -0
  297. package/node_modules/string-width/readme.md +41 -0
  298. package/node_modules/string_decoder/package.json +21 -2
  299. package/node_modules/stringstream/package.json +20 -2
  300. package/node_modules/strip-ansi/license +21 -0
  301. package/node_modules/strip-ansi/package.json +24 -5
  302. package/node_modules/strip-json-comments/license +21 -0
  303. package/node_modules/strip-json-comments/package.json +20 -2
  304. package/node_modules/supports-color/license +21 -0
  305. package/node_modules/supports-color/package.json +20 -2
  306. package/node_modules/tar/package.json +20 -2
  307. package/node_modules/tar-pack/package.json +34 -17
  308. package/node_modules/tough-cookie/LICENSE +27 -0
  309. package/node_modules/tough-cookie/package.json +21 -4
  310. package/node_modules/tunnel-agent/package.json +35 -10
  311. package/node_modules/tweetnacl/CHANGELOG.md +0 -53
  312. package/node_modules/tweetnacl/README.md +42 -24
  313. package/node_modules/tweetnacl/nacl-fast.js +52 -22
  314. package/node_modules/tweetnacl/nacl-fast.min.js +2 -2
  315. package/node_modules/tweetnacl/nacl.js +51 -21
  316. package/node_modules/tweetnacl/nacl.min.js +1 -1
  317. package/node_modules/tweetnacl/package.json +56 -30
  318. package/node_modules/uid-number/package.json +21 -4
  319. package/node_modules/util-deprecate/package.json +21 -2
  320. package/node_modules/verror/package.json +20 -3
  321. package/node_modules/wide-align/.npmignore +5 -0
  322. package/node_modules/wide-align/LICENSE +14 -0
  323. package/node_modules/wide-align/README.md +47 -0
  324. package/node_modules/wide-align/align.js +65 -0
  325. package/node_modules/wide-align/package.json +85 -0
  326. package/node_modules/wide-align/test/align.js +37 -0
  327. package/node_modules/wrappy/package.json +44 -14
  328. package/node_modules/xtend/package.json +20 -2
  329. package/package.json +2 -2
  330. package/node_modules/ansi/.jshintrc +0 -4
  331. package/node_modules/ansi/History.md +0 -23
  332. package/node_modules/ansi/LICENSE +0 -24
  333. package/node_modules/ansi/README.md +0 -98
  334. package/node_modules/ansi/examples/beep/index.js +0 -16
  335. package/node_modules/ansi/examples/clear/index.js +0 -15
  336. package/node_modules/ansi/examples/cursorPosition.js +0 -32
  337. package/node_modules/ansi/examples/progress/index.js +0 -87
  338. package/node_modules/ansi/lib/ansi.js +0 -405
  339. package/node_modules/ansi/lib/newlines.js +0 -71
  340. package/node_modules/ansi/package.json +0 -69
  341. package/node_modules/aws4/node_modules/lru-cache/README.md +0 -142
  342. package/node_modules/aws4/node_modules/lru-cache/lib/lru-cache.js +0 -469
  343. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/README.md +0 -60
  344. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/map.js +0 -9
  345. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/package.json +0 -60
  346. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/pseudomap.js +0 -113
  347. package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/test/basic.js +0 -86
  348. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/.npmignore +0 -4
  349. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/.travis.yml +0 -7
  350. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/CONTRIBUTING.md +0 -4
  351. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/README.md +0 -204
  352. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/package.json +0 -60
  353. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/test/basic.js +0 -188
  354. package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/yallist.js +0 -360
  355. package/node_modules/aws4/node_modules/lru-cache/package.json +0 -78
  356. package/node_modules/block-stream/bench/block-stream-pause.js +0 -70
  357. package/node_modules/block-stream/bench/block-stream.js +0 -68
  358. package/node_modules/block-stream/bench/dropper-pause.js +0 -70
  359. package/node_modules/block-stream/bench/dropper.js +0 -68
  360. package/node_modules/block-stream/test/basic.js +0 -27
  361. package/node_modules/block-stream/test/nopad-thorough.js +0 -68
  362. package/node_modules/block-stream/test/nopad.js +0 -57
  363. package/node_modules/block-stream/test/pause-resume.js +0 -73
  364. package/node_modules/block-stream/test/thorough.js +0 -68
  365. package/node_modules/block-stream/test/two-stream.js +0 -59
  366. package/node_modules/fstream-ignore/.npmignore +0 -1
  367. package/node_modules/fstream-ignore/example/basic.js +0 -13
  368. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/.npmignore +0 -3
  369. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/example.js +0 -8
  370. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +0 -2
  371. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +0 -3
  372. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +0 -6
  373. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +0 -89
  374. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +0 -5
  375. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +0 -80
  376. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +0 -84
  377. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +0 -91
  378. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -86
  379. package/node_modules/fstream-ignore/node_modules/minimatch/package.json +0 -67
  380. package/node_modules/fstream-ignore/test/.ignore +0 -2
  381. package/node_modules/fstream-ignore/test/.npmignore +0 -1
  382. package/node_modules/fstream-ignore/test/00-setup.js +0 -71
  383. package/node_modules/fstream-ignore/test/basic.js +0 -28
  384. package/node_modules/fstream-ignore/test/common.js +0 -40
  385. package/node_modules/fstream-ignore/test/ignore-most.js +0 -41
  386. package/node_modules/fstream-ignore/test/nested-ignores.js +0 -51
  387. package/node_modules/fstream-ignore/test/read-file-order.js +0 -81
  388. package/node_modules/fstream-ignore/test/unignore-child.js +0 -38
  389. package/node_modules/fstream-ignore/test/zz-cleanup.js +0 -10
  390. package/node_modules/gauge/.npmignore +0 -32
  391. package/node_modules/gauge/example.png +0 -0
  392. package/node_modules/gauge/test/progress-bar.js +0 -176
  393. package/node_modules/has-unicode/.npmignore +0 -32
  394. package/node_modules/has-unicode/test/index.js +0 -26
  395. package/node_modules/lodash.pad/README.md +0 -18
  396. package/node_modules/lodash.pad/index.js +0 -296
  397. package/node_modules/lodash.pad/package.json +0 -91
  398. package/node_modules/lodash.padend/README.md +0 -18
  399. package/node_modules/lodash.padend/index.js +0 -285
  400. package/node_modules/lodash.padend/package.json +0 -91
  401. package/node_modules/lodash.padstart/README.md +0 -18
  402. package/node_modules/lodash.padstart/index.js +0 -285
  403. package/node_modules/lodash.padstart/package.json +0 -91
  404. package/node_modules/lodash.repeat/README.md +0 -18
  405. package/node_modules/lodash.repeat/index.js +0 -215
  406. package/node_modules/lodash.repeat/package.json +0 -92
  407. package/node_modules/lodash.tostring/LICENSE +0 -23
  408. package/node_modules/lodash.tostring/README.md +0 -18
  409. package/node_modules/lodash.tostring/index.js +0 -164
  410. package/node_modules/lodash.tostring/package.json +0 -91
  411. package/node_modules/node-pre-gyp/README.md +0 -570
  412. package/node_modules/node-pre-gyp/node_modules/nopt/.npmignore +0 -1
  413. package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/.npmignore +0 -4
  414. package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/.travis.yml +0 -5
  415. package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/CONTRIBUTING.md +0 -3
  416. package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/package.json +0 -56
  417. package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/test.js +0 -47
  418. package/node_modules/npmlog/.nyc_output/64996.json +0 -1
  419. package/node_modules/npmlog/.nyc_output/64998.json +0 -1
  420. package/node_modules/npmlog/.nyc_output/65000.json +0 -1
  421. package/node_modules/npmlog/.travis.yml +0 -14
  422. package/node_modules/npmlog/example.js +0 -39
  423. package/node_modules/npmlog/test/basic.js +0 -235
  424. package/node_modules/npmlog/test/progress.js +0 -131
  425. package/node_modules/oauth-sign/test.js +0 -89
  426. package/node_modules/qs/.npmignore +0 -18
  427. package/node_modules/qs/.travis.yml +0 -69
  428. package/node_modules/qs/README.md +0 -335
  429. package/node_modules/qs/bower.json +0 -22
  430. package/node_modules/qs/component.json +0 -15
  431. package/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc +0 -17
  432. package/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +0 -36
  433. package/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +0 -59
  434. package/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +0 -51
  435. package/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +0 -33
  436. package/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json +0 -68
  437. package/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js +0 -97
  438. package/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE +0 -16
  439. package/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md +0 -42
  440. package/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js +0 -1
  441. package/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js +0 -23
  442. package/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +0 -59
  443. package/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js +0 -25
  444. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md +0 -216
  445. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js +0 -912
  446. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -122
  447. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +0 -8
  448. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -191
  449. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +0 -2
  450. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +0 -3
  451. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md +0 -21
  452. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +0 -6
  453. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +0 -5
  454. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +0 -50
  455. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +0 -84
  456. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +0 -4
  457. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +0 -62
  458. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +0 -6
  459. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +0 -13
  460. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +0 -39
  461. package/node_modules/rimraf/node_modules/glob/node_modules/once/README.md +0 -51
  462. package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +0 -36
  463. package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +0 -59
  464. package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +0 -51
  465. package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +0 -33
  466. package/node_modules/rimraf/node_modules/glob/node_modules/once/once.js +0 -21
  467. package/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +0 -71
  468. package/node_modules/rimraf/node_modules/glob/package.json +0 -85
  469. package/node_modules/semver/.npmignore +0 -4
  470. package/node_modules/semver/.travis.yml +0 -5
  471. package/node_modules/semver/test/big-numbers.js +0 -31
  472. package/node_modules/semver/test/clean.js +0 -29
  473. package/node_modules/semver/test/gtr.js +0 -173
  474. package/node_modules/semver/test/index.js +0 -698
  475. package/node_modules/semver/test/ltr.js +0 -181
  476. package/node_modules/semver/test/major-minor-patch.js +0 -72
  477. package/node_modules/tunnel-agent/.jshintrc +0 -5
  478. package/node_modules/tweetnacl/COPYING.txt +0 -9
  479. package/node_modules/wrappy/test/basic.js +0 -51
  480. package/test/fsevents.js +0 -27
  481. package/test/function.js +0 -93
  482. /package/node_modules/{aws4/node_modules/lru-cache/node_modules/pseudomap → abbrev}/LICENSE +0 -0
  483. /package/node_modules/{node-pre-gyp/node_modules/nopt/node_modules/abbrev → abbrev}/README.md +0 -0
  484. /package/node_modules/{node-pre-gyp/node_modules/nopt/node_modules/abbrev → abbrev}/abbrev.js +0 -0
  485. /package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match → balanced-match}/LICENSE.md +0 -0
  486. /package/node_modules/{readable-stream → bl/node_modules/readable-stream}/.zuul.yml +0 -0
  487. /package/node_modules/{readable-stream → bl/node_modules/readable-stream}/doc/stream.markdown +0 -0
  488. /package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion → brace-expansion}/README.md +0 -0
  489. /package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion → brace-expansion}/index.js +0 -0
  490. /package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/.travis.yml +0 -0
  491. /package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/LICENSE +0 -0
  492. /package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/README.markdown +0 -0
  493. /package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/example/map.js +0 -0
  494. /package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/index.js +0 -0
  495. /package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/test/map.js +0 -0
  496. /package/node_modules/{aws4/node_modules/lru-cache/node_modules/yallist → glob}/LICENSE +0 -0
  497. /package/node_modules/{rimraf/node_modules/glob → glob}/README.md +0 -0
  498. /package/node_modules/{rimraf/node_modules/glob → glob}/common.js +0 -0
  499. /package/node_modules/{rimraf/node_modules/glob/node_modules/inflight → inflight}/LICENSE +0 -0
  500. /package/node_modules/{rimraf/node_modules/glob/node_modules/inflight → inflight}/README.md +0 -0
  501. /package/node_modules/{rimraf/node_modules/glob/node_modules/inflight → inflight}/inflight.js +0 -0
  502. /package/node_modules/{node-pre-gyp/node_modules/nopt → ini}/LICENSE +0 -0
  503. /package/node_modules/{node-pre-gyp/node_modules/nopt/node_modules/abbrev → minimatch}/LICENSE +0 -0
  504. /package/node_modules/{ansi → nopt}/.npmignore +0 -0
  505. /package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/.travis.yml +0 -0
  506. /package/node_modules/{rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy → nopt}/LICENSE +0 -0
  507. /package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/README.md +0 -0
  508. /package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/bin/nopt.js +0 -0
  509. /package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/examples/my-program.js +0 -0
  510. /package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/lib/nopt.js +0 -0
  511. /package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/test/basic.js +0 -0
  512. /package/node_modules/{rimraf/node_modules/glob/node_modules/once/node_modules/wrappy → once}/LICENSE +0 -0
  513. /package/node_modules/{rimraf/node_modules/glob/node_modules/path-is-absolute → path-is-absolute}/index.js +0 -0
  514. /package/node_modules/{rimraf/node_modules/glob/node_modules/path-is-absolute → path-is-absolute}/readme.md +0 -0
@@ -37,7 +37,7 @@ function initParams(uri, options, callback) {
37
37
  extend(params, uri)
38
38
  }
39
39
 
40
- params.callback = callback
40
+ params.callback = callback || params.callback
41
41
  return params
42
42
  }
43
43
 
@@ -56,7 +56,7 @@ function request (uri, options, callback) {
56
56
  }
57
57
 
58
58
  function verbFunc (verb) {
59
- var method = verb === 'del' ? 'DELETE' : verb.toUpperCase()
59
+ var method = verb.toUpperCase()
60
60
  return function (uri, options, callback) {
61
61
  var params = initParams(uri, options, callback)
62
62
  params.method = method
@@ -70,7 +70,8 @@ request.head = verbFunc('head')
70
70
  request.post = verbFunc('post')
71
71
  request.put = verbFunc('put')
72
72
  request.patch = verbFunc('patch')
73
- request.del = verbFunc('del')
73
+ request.del = verbFunc('delete')
74
+ request['delete'] = verbFunc('delete')
74
75
 
75
76
  request.jar = function (store) {
76
77
  return cookies.jar(store)
@@ -91,7 +92,7 @@ function wrapRequestMethod (method, options, requester, verb) {
91
92
  target.pool = params.pool || options.pool
92
93
 
93
94
  if (verb) {
94
- target.method = (verb === 'del' ? 'DELETE' : verb.toUpperCase())
95
+ target.method = verb.toUpperCase()
95
96
  }
96
97
 
97
98
  if (isFunction(requester)) {
@@ -114,7 +115,7 @@ request.defaults = function (options, requester) {
114
115
 
115
116
  var defaults = wrapRequestMethod(self, options, requester)
116
117
 
117
- var verbs = ['get', 'head', 'post', 'put', 'patch', 'del']
118
+ var verbs = ['get', 'head', 'post', 'put', 'patch', 'del', 'delete']
118
119
  verbs.forEach(function(verb) {
119
120
  defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb)
120
121
  })
@@ -24,12 +24,12 @@ function paramsHaveRequestBody(params) {
24
24
  )
25
25
  }
26
26
 
27
- function safeStringify (obj) {
27
+ function safeStringify (obj, replacer) {
28
28
  var ret
29
29
  try {
30
- ret = JSON.stringify(obj)
30
+ ret = JSON.stringify(obj, replacer)
31
31
  } catch (e) {
32
- ret = jsonSafeStringify(obj)
32
+ ret = jsonSafeStringify(obj, replacer)
33
33
  }
34
34
  return ret
35
35
  }
@@ -1,20 +1,42 @@
1
1
  {
2
- "_from": "request@2.x",
3
- "_id": "request@2.69.0",
2
+ "_args": [
3
+ [
4
+ "request@2.x",
5
+ "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp"
6
+ ]
7
+ ],
8
+ "_from": "request@>=2.0.0 <3.0.0",
9
+ "_id": "request@2.73.0",
10
+ "_inCache": true,
11
+ "_installable": true,
4
12
  "_location": "/request",
5
- "_nodeVersion": "4.1.2",
13
+ "_nodeVersion": "6.2.2",
14
+ "_npmOperationalInternal": {
15
+ "host": "packages-12-west.internal.npmjs.com",
16
+ "tmp": "tmp/request-2.73.0.tgz_1468050202545_0.40326908184215426"
17
+ },
6
18
  "_npmUser": {
7
- "email": "mikeal.rogers@gmail.com",
8
- "name": "mikeal"
19
+ "email": "simeonvelichkov@gmail.com",
20
+ "name": "simov"
9
21
  },
10
- "_npmVersion": "2.14.4",
22
+ "_npmVersion": "2.15.6",
11
23
  "_phantomChildren": {},
24
+ "_requested": {
25
+ "name": "request",
26
+ "raw": "request@2.x",
27
+ "rawSpec": "2.x",
28
+ "scope": null,
29
+ "spec": ">=2.0.0 <3.0.0",
30
+ "type": "range"
31
+ },
12
32
  "_requiredBy": [
13
33
  "/node-pre-gyp"
14
34
  ],
15
- "_resolved": "https://registry.npmjs.org/request/-/request-2.69.0.tgz",
16
- "_shasum": "cf91d2e000752b1217155c005241911991a2346a",
35
+ "_resolved": "https://registry.npmjs.org/request/-/request-2.73.0.tgz",
36
+ "_shasum": "5f78a9fde4370abc8ff6479d7a84a71a14b878a2",
17
37
  "_shrinkwrap": null,
38
+ "_spec": "request@2.x",
39
+ "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp",
18
40
  "author": {
19
41
  "email": "mikeal.rogers@gmail.com",
20
42
  "name": "Mikeal Rogers"
@@ -25,57 +47,58 @@
25
47
  "dependencies": {
26
48
  "aws-sign2": "~0.6.0",
27
49
  "aws4": "^1.2.1",
28
- "bl": "~1.0.0",
50
+ "bl": "~1.1.2",
29
51
  "caseless": "~0.11.0",
30
52
  "combined-stream": "~1.0.5",
31
53
  "extend": "~3.0.0",
32
54
  "forever-agent": "~0.6.1",
33
- "form-data": "~1.0.0-rc3",
55
+ "form-data": "~1.0.0-rc4",
34
56
  "har-validator": "~2.0.6",
35
- "hawk": "~3.1.0",
57
+ "hawk": "~3.1.3",
36
58
  "http-signature": "~1.1.0",
37
59
  "is-typedarray": "~1.0.0",
38
60
  "isstream": "~0.1.2",
39
61
  "json-stringify-safe": "~5.0.1",
40
62
  "mime-types": "~2.1.7",
41
63
  "node-uuid": "~1.4.7",
42
- "oauth-sign": "~0.8.0",
43
- "qs": "~6.0.2",
64
+ "oauth-sign": "~0.8.1",
65
+ "qs": "~6.2.0",
44
66
  "stringstream": "~0.0.4",
45
67
  "tough-cookie": "~2.2.0",
46
68
  "tunnel-agent": "~0.4.1"
47
69
  },
48
70
  "description": "Simplified HTTP request client.",
49
71
  "devDependencies": {
50
- "bluebird": "^3.0.2",
51
- "browserify": "^13.0.0",
52
- "browserify-istanbul": "^0.1.5",
72
+ "bluebird": "^3.2.1",
73
+ "browserify": "^13.0.1",
74
+ "browserify-istanbul": "^2.0.0",
53
75
  "buffer-equal": "^1.0.0",
54
- "codecov.io": "^0.1.6",
76
+ "codecov": "^1.0.1",
55
77
  "coveralls": "^2.11.4",
56
- "eslint": "1.10.3",
78
+ "eslint": "^2.5.3",
57
79
  "function-bind": "^1.0.2",
58
80
  "istanbul": "^0.4.0",
59
- "karma": "^0.13.10",
60
- "karma-browserify": "^4.4.0",
61
- "karma-cli": "^0.1.1",
62
- "karma-coverage": "^0.5.3",
63
- "karma-phantomjs-launcher": "^0.1.4",
81
+ "karma": "^1.1.1",
82
+ "karma-browserify": "^5.0.1",
83
+ "karma-cli": "^1.0.0",
84
+ "karma-coverage": "^1.0.0",
85
+ "karma-phantomjs-launcher": "^1.0.0",
64
86
  "karma-tap": "^1.0.3",
87
+ "phantomjs-prebuilt": "^2.1.3",
65
88
  "rimraf": "^2.2.8",
66
89
  "server-destroy": "^1.0.1",
67
- "tape": "^4.2.0",
90
+ "tape": "^4.6.0",
68
91
  "taper": "^0.4.0"
69
92
  },
70
93
  "directories": {},
71
94
  "dist": {
72
- "shasum": "cf91d2e000752b1217155c005241911991a2346a",
73
- "tarball": "http://registry.npmjs.org/request/-/request-2.69.0.tgz"
95
+ "shasum": "5f78a9fde4370abc8ff6479d7a84a71a14b878a2",
96
+ "tarball": "https://registry.npmjs.org/request/-/request-2.73.0.tgz"
74
97
  },
75
98
  "engines": {
76
99
  "node": ">=0.8.0"
77
100
  },
78
- "gitHead": "1c2fb40c74efb4f706f350a78dbd5e58fe913af3",
101
+ "gitHead": "fa46be421b165c737c93672a8f920245cfb090a2",
79
102
  "homepage": "https://github.com/request/request#readme",
80
103
  "license": "Apache-2.0",
81
104
  "main": "index.js",
@@ -99,8 +122,7 @@
99
122
  ],
100
123
  "name": "request",
101
124
  "optionalDependencies": {},
102
- "readme": "\n# Request - Simplified HTTP client\n\n[![npm package](https://nodei.co/npm/request.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/request/)\n\n[![Build status](https://img.shields.io/travis/request/request.svg?style=flat-square)](https://travis-ci.org/request/request)\n[![Coverage](https://img.shields.io/codecov/c/github/request/request.svg?style=flat-square)](https://codecov.io/github/request/request?branch=master)\n[![Coverage](https://img.shields.io/coveralls/request/request.svg?style=flat-square)](https://coveralls.io/r/request/request)\n[![Dependency Status](https://img.shields.io/david/request/request.svg?style=flat-square)](https://david-dm.org/request/request)\n[![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat-square)](https://gitter.im/request/request?utm_source=badge)\n\n\n## Super simple to use\n\nRequest is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.\n\n```js\nvar request = require('request');\nrequest('http://www.google.com', function (error, response, body) {\n if (!error && response.statusCode == 200) {\n console.log(body) // Show the HTML for the Google homepage.\n }\n})\n```\n\n\n## Table of contents\n\n- [Streaming](#streaming)\n- [Forms](#forms)\n- [HTTP Authentication](#http-authentication)\n- [Custom HTTP Headers](#custom-http-headers)\n- [OAuth Signing](#oauth-signing)\n- [Proxies](#proxies)\n- [Unix Domain Sockets](#unix-domain-sockets)\n- [TLS/SSL Protocol](#tlsssl-protocol)\n- [Support for HAR 1.2](#support-for-har-12)\n- [**All Available Options**](#requestoptions-callback)\n\nRequest also offers [convenience methods](#convenience-methods) like\n`request.defaults` and `request.post`, and there are\nlots of [usage examples](#examples) and several\n[debugging techniques](#debugging).\n\n\n---\n\n\n## Streaming\n\nYou can stream any response to a file stream.\n\n```js\nrequest('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))\n```\n\nYou can also stream a file to a PUT or POST request. This method will also check the file extension against a mapping of file extensions to content-types (in this case `application/json`) and use the proper `content-type` in the PUT request (if the headers don’t already provide one).\n\n```js\nfs.createReadStream('file.json').pipe(request.put('http://mysite.com/obj.json'))\n```\n\nRequest can also `pipe` to itself. When doing so, `content-type` and `content-length` are preserved in the PUT headers.\n\n```js\nrequest.get('http://google.com/img.png').pipe(request.put('http://mysite.com/img.png'))\n```\n\nRequest emits a \"response\" event when a response is received. The `response` argument will be an instance of [http.IncomingMessage](http://nodejs.org/api/http.html#http_http_incomingmessage).\n\n```js\nrequest\n .get('http://google.com/img.png')\n .on('response', function(response) {\n console.log(response.statusCode) // 200\n console.log(response.headers['content-type']) // 'image/png'\n })\n .pipe(request.put('http://mysite.com/img.png'))\n```\n\nTo easily handle errors when streaming requests, listen to the `error` event before piping:\n\n```js\nrequest\n .get('http://mysite.com/doodle.png')\n .on('error', function(err) {\n console.log(err)\n })\n .pipe(fs.createWriteStream('doodle.png'))\n```\n\nNow let’s get fancy.\n\n```js\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n if (req.method === 'PUT') {\n req.pipe(request.put('http://mysite.com/doodle.png'))\n } else if (req.method === 'GET' || req.method === 'HEAD') {\n request.get('http://mysite.com/doodle.png').pipe(resp)\n }\n }\n})\n```\n\nYou can also `pipe()` from `http.ServerRequest` instances, as well as to `http.ServerResponse` instances. The HTTP method, headers, and entity-body data will be sent. Which means that, if you don't really care about security, you can do:\n\n```js\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n var x = request('http://mysite.com/doodle.png')\n req.pipe(x)\n x.pipe(resp)\n }\n})\n```\n\nAnd since `pipe()` returns the destination stream in ≥ Node 0.5.x you can do one line proxying. :)\n\n```js\nreq.pipe(request('http://mysite.com/doodle.png')).pipe(resp)\n```\n\nAlso, none of this new functionality conflicts with requests previous features, it just expands them.\n\n```js\nvar r = request.defaults({'proxy':'http://localproxy.com'})\n\nhttp.createServer(function (req, resp) {\n if (req.url === '/doodle.png') {\n r.get('http://google.com/doodle.png').pipe(resp)\n }\n})\n```\n\nYou can still use intermediate proxies, the requests will still follow HTTP forwards, etc.\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## Forms\n\n`request` supports `application/x-www-form-urlencoded` and `multipart/form-data` form uploads. For `multipart/related` refer to the `multipart` API.\n\n\n#### application/x-www-form-urlencoded (URL-Encoded Forms)\n\nURL-encoded forms are simple.\n\n```js\nrequest.post('http://service.com/upload', {form:{key:'value'}})\n// or\nrequest.post('http://service.com/upload').form({key:'value'})\n// or\nrequest.post({url:'http://service.com/upload', form: {key:'value'}}, function(err,httpResponse,body){ /* ... */ })\n```\n\n\n#### multipart/form-data (Multipart Form Uploads)\n\nFor `multipart/form-data` we use the [form-data](https://github.com/form-data/form-data) library by [@felixge](https://github.com/felixge). For the most cases, you can pass your upload form data via the `formData` option.\n\n\n```js\nvar formData = {\n // Pass a simple key-value pair\n my_field: 'my_value',\n // Pass data via Buffers\n my_buffer: new Buffer([1, 2, 3]),\n // Pass data via Streams\n my_file: fs.createReadStream(__dirname + '/unicycle.jpg'),\n // Pass multiple values /w an Array\n attachments: [\n fs.createReadStream(__dirname + '/attachment1.jpg'),\n fs.createReadStream(__dirname + '/attachment2.jpg')\n ],\n // Pass optional meta-data with an 'options' object with style: {value: DATA, options: OPTIONS}\n // Use case: for some types of streams, you'll need to provide \"file\"-related information manually.\n // See the `form-data` README for more information about options: https://github.com/form-data/form-data\n custom_file: {\n value: fs.createReadStream('/dev/urandom'),\n options: {\n filename: 'topsecret.jpg',\n contentType: 'image/jpg'\n }\n }\n};\nrequest.post({url:'http://service.com/upload', formData: formData}, function optionalCallback(err, httpResponse, body) {\n if (err) {\n return console.error('upload failed:', err);\n }\n console.log('Upload successful! Server responded with:', body);\n});\n```\n\nFor advanced cases, you can access the form-data object itself via `r.form()`. This can be modified until the request is fired on the next cycle of the event-loop. (Note that this calling `form()` will clear the currently set form data for that request.)\n\n```js\n// NOTE: Advanced use-case, for normal use see 'formData' usage above\nvar r = request.post('http://service.com/upload', function optionalCallback(err, httpResponse, body) {...})\nvar form = r.form();\nform.append('my_field', 'my_value');\nform.append('my_buffer', new Buffer([1, 2, 3]));\nform.append('custom_file', fs.createReadStream(__dirname + '/unicycle.jpg'), {filename: 'unicycle.jpg'});\n```\nSee the [form-data README](https://github.com/form-data/form-data) for more information & examples.\n\n\n#### multipart/related\n\nSome variations in different HTTP implementations require a newline/CRLF before, after, or both before and after the boundary of a `multipart/related` request (using the multipart option). This has been observed in the .NET WebAPI version 4.0. You can turn on a boundary preambleCRLF or postamble by passing them as `true` to your request options.\n\n```js\n request({\n method: 'PUT',\n preambleCRLF: true,\n postambleCRLF: true,\n uri: 'http://service.com/upload',\n multipart: [\n {\n 'content-type': 'application/json',\n body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n },\n { body: 'I am an attachment' },\n { body: fs.createReadStream('image.png') }\n ],\n // alternatively pass an object containing additional options\n multipart: {\n chunked: false,\n data: [\n {\n 'content-type': 'application/json',\n body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n },\n { body: 'I am an attachment' }\n ]\n }\n },\n function (error, response, body) {\n if (error) {\n return console.error('upload failed:', error);\n }\n console.log('Upload successful! Server responded with:', body);\n })\n```\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## HTTP Authentication\n\n```js\nrequest.get('http://some.server.com/').auth('username', 'password', false);\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'user': 'username',\n 'pass': 'password',\n 'sendImmediately': false\n }\n});\n// or\nrequest.get('http://some.server.com/').auth(null, null, true, 'bearerToken');\n// or\nrequest.get('http://some.server.com/', {\n 'auth': {\n 'bearer': 'bearerToken'\n }\n});\n```\n\nIf passed as an option, `auth` should be a hash containing values:\n\n- `user` || `username`\n- `pass` || `password`\n- `sendImmediately` (optional)\n- `bearer` (optional)\n\nThe method form takes parameters\n`auth(username, password, sendImmediately, bearer)`.\n\n`sendImmediately` defaults to `true`, which causes a basic or bearer\nauthentication header to be sent. If `sendImmediately` is `false`, then\n`request` will retry with a proper authentication header after receiving a\n`401` response from the server (which must contain a `WWW-Authenticate` header\nindicating the required authentication method).\n\nNote that you can also specify basic authentication using the URL itself, as\ndetailed in [RFC 1738](http://www.ietf.org/rfc/rfc1738.txt). Simply pass the\n`user:password` before the host with an `@` sign:\n\n```js\nvar username = 'username',\n password = 'password',\n url = 'http://' + username + ':' + password + '@some.server.com';\n\nrequest({url: url}, function (error, response, body) {\n // Do more stuff with 'body' here\n});\n```\n\nDigest authentication is supported, but it only works with `sendImmediately`\nset to `false`; otherwise `request` will send basic authentication on the\ninitial request, which will probably cause the request to fail.\n\nBearer authentication is supported, and is activated when the `bearer` value is\navailable. The value may be either a `String` or a `Function` returning a\n`String`. Using a function to supply the bearer token is particularly useful if\nused in conjunction with `defaults` to allow a single function to supply the\nlast known token at the time of sending a request, or to compute one on the fly.\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## Custom HTTP Headers\n\nHTTP Headers, such as `User-Agent`, can be set in the `options` object.\nIn the example below, we call the github API to find out the number\nof stars and forks for the request repository. This requires a\ncustom `User-Agent` header as well as https.\n\n```js\nvar request = require('request');\n\nvar options = {\n url: 'https://api.github.com/repos/request/request',\n headers: {\n 'User-Agent': 'request'\n }\n};\n\nfunction callback(error, response, body) {\n if (!error && response.statusCode == 200) {\n var info = JSON.parse(body);\n console.log(info.stargazers_count + \" Stars\");\n console.log(info.forks_count + \" Forks\");\n }\n}\n\nrequest(options, callback);\n```\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## OAuth Signing\n\n[OAuth version 1.0](https://tools.ietf.org/html/rfc5849) is supported. The\ndefault signing algorithm is\n[HMAC-SHA1](https://tools.ietf.org/html/rfc5849#section-3.4.2):\n\n```js\n// OAuth1.0 - 3-legged server side flow (Twitter example)\n// step 1\nvar qs = require('querystring')\n , oauth =\n { callback: 'http://mysite.com/callback/'\n , consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n }\n , url = 'https://api.twitter.com/oauth/request_token'\n ;\nrequest.post({url:url, oauth:oauth}, function (e, r, body) {\n // Ideally, you would take the body in the response\n // and construct a URL that a user clicks on (like a sign in button).\n // The verifier is only available in the response after a user has\n // verified with twitter that they are authorizing your app.\n\n // step 2\n var req_data = qs.parse(body)\n var uri = 'https://api.twitter.com/oauth/authenticate'\n + '?' + qs.stringify({oauth_token: req_data.oauth_token})\n // redirect the user to the authorize uri\n\n // step 3\n // after the user is redirected back to your server\n var auth_data = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: auth_data.oauth_token\n , token_secret: req_data.oauth_token_secret\n , verifier: auth_data.oauth_verifier\n }\n , url = 'https://api.twitter.com/oauth/access_token'\n ;\n request.post({url:url, oauth:oauth}, function (e, r, body) {\n // ready to make signed requests on behalf of the user\n var perm_data = qs.parse(body)\n , oauth =\n { consumer_key: CONSUMER_KEY\n , consumer_secret: CONSUMER_SECRET\n , token: perm_data.oauth_token\n , token_secret: perm_data.oauth_token_secret\n }\n , url = 'https://api.twitter.com/1.1/users/show.json'\n , qs =\n { screen_name: perm_data.screen_name\n , user_id: perm_data.user_id\n }\n ;\n request.get({url:url, oauth:oauth, qs:qs, json:true}, function (e, r, user) {\n console.log(user)\n })\n })\n})\n```\n\nFor [RSA-SHA1 signing](https://tools.ietf.org/html/rfc5849#section-3.4.3), make\nthe following changes to the OAuth options object:\n* Pass `signature_method : 'RSA-SHA1'`\n* Instead of `consumer_secret`, specify a `private_key` string in\n [PEM format](http://how2ssl.com/articles/working_with_pem_files/)\n\nFor [PLAINTEXT signing](http://oauth.net/core/1.0/#anchor22), make\nthe following changes to the OAuth options object:\n* Pass `signature_method : 'PLAINTEXT'`\n\nTo send OAuth parameters via query params or in a post body as described in The\n[Consumer Request Parameters](http://oauth.net/core/1.0/#consumer_req_param)\nsection of the oauth1 spec:\n* Pass `transport_method : 'query'` or `transport_method : 'body'` in the OAuth\n options object.\n* `transport_method` defaults to `'header'`\n\nTo use [Request Body Hash](https://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html) you can either\n* Manually generate the body hash and pass it as a string `body_hash: '...'`\n* Automatically generate the body hash by passing `body_hash: true`\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## Proxies\n\nIf you specify a `proxy` option, then the request (and any subsequent\nredirects) will be sent via a connection to the proxy server.\n\nIf your endpoint is an `https` url, and you are using a proxy, then\nrequest will send a `CONNECT` request to the proxy server *first*, and\nthen use the supplied connection to connect to the endpoint.\n\nThat is, first it will make a request like:\n\n```\nHTTP/1.1 CONNECT endpoint-server.com:80\nHost: proxy-server.com\nUser-Agent: whatever user agent you specify\n```\n\nand then the proxy server make a TCP connection to `endpoint-server`\non port `80`, and return a response that looks like:\n\n```\nHTTP/1.1 200 OK\n```\n\nAt this point, the connection is left open, and the client is\ncommunicating directly with the `endpoint-server.com` machine.\n\nSee [the wikipedia page on HTTP Tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel)\nfor more information.\n\nBy default, when proxying `http` traffic, request will simply make a\nstandard proxied `http` request. This is done by making the `url`\nsection of the initial line of the request a fully qualified url to\nthe endpoint.\n\nFor example, it will make a single request that looks like:\n\n```\nHTTP/1.1 GET http://endpoint-server.com/some-url\nHost: proxy-server.com\nOther-Headers: all go here\n\nrequest body or whatever\n```\n\nBecause a pure \"http over http\" tunnel offers no additional security\nor other features, it is generally simpler to go with a\nstraightforward HTTP proxy in this case. However, if you would like\nto force a tunneling proxy, you may set the `tunnel` option to `true`.\n\nYou can also make a standard proxied `http` request by explicitly setting\n`tunnel : false`, but **note that this will allow the proxy to see the traffic\nto/from the destination server**.\n\nIf you are using a tunneling proxy, you may set the\n`proxyHeaderWhiteList` to share certain headers with the proxy.\n\nYou can also set the `proxyHeaderExclusiveList` to share certain\nheaders only with the proxy and not with destination host.\n\nBy default, this set is:\n\n```\naccept\naccept-charset\naccept-encoding\naccept-language\naccept-ranges\ncache-control\ncontent-encoding\ncontent-language\ncontent-length\ncontent-location\ncontent-md5\ncontent-range\ncontent-type\nconnection\ndate\nexpect\nmax-forwards\npragma\nproxy-authorization\nreferer\nte\ntransfer-encoding\nuser-agent\nvia\n```\n\nNote that, when using a tunneling proxy, the `proxy-authorization`\nheader and any headers from custom `proxyHeaderExclusiveList` are\n*never* sent to the endpoint server, but only to the proxy server.\n\n\n### Controlling proxy behaviour using environment variables\n\nThe following environment variables are respected by `request`:\n\n * `HTTP_PROXY` / `http_proxy`\n * `HTTPS_PROXY` / `https_proxy`\n * `NO_PROXY` / `no_proxy`\n\nWhen `HTTP_PROXY` / `http_proxy` are set, they will be used to proxy non-SSL requests that do not have an explicit `proxy` configuration option present. Similarly, `HTTPS_PROXY` / `https_proxy` will be respected for SSL requests that do not have an explicit `proxy` configuration option. It is valid to define a proxy in one of the environment variables, but then override it for a specific request, using the `proxy` configuration option. Furthermore, the `proxy` configuration option can be explicitly set to false / null to opt out of proxying altogether for that request.\n\n`request` is also aware of the `NO_PROXY`/`no_proxy` environment variables. These variables provide a granular way to opt out of proxying, on a per-host basis. It should contain a comma separated list of hosts to opt out of proxying. It is also possible to opt of proxying when a particular destination port is used. Finally, the variable may be set to `*` to opt out of the implicit proxy configuration of the other environment variables.\n\nHere's some examples of valid `no_proxy` values:\n\n * `google.com` - don't proxy HTTP/HTTPS requests to Google.\n * `google.com:443` - don't proxy HTTPS requests to Google, but *do* proxy HTTP requests to Google.\n * `google.com:443, yahoo.com:80` - don't proxy HTTPS requests to Google, and don't proxy HTTP requests to Yahoo!\n * `*` - ignore `https_proxy`/`http_proxy` environment variables altogether.\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## UNIX Domain Sockets\n\n`request` supports making requests to [UNIX Domain Sockets](https://en.wikipedia.org/wiki/Unix_domain_socket). To make one, use the following URL scheme:\n\n```js\n/* Pattern */ 'http://unix:SOCKET:PATH'\n/* Example */ request.get('http://unix:/absolute/path/to/unix.socket:/request/path')\n```\n\nNote: The `SOCKET` path is assumed to be absolute to the root of the host file system.\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## TLS/SSL Protocol\n\nTLS/SSL Protocol options, such as `cert`, `key` and `passphrase`, can be\nset directly in `options` object, in the `agentOptions` property of the `options` object, or even in `https.globalAgent.options`. Keep in mind that, although `agentOptions` allows for a slightly wider range of configurations, the recommended way is via `options` object directly, as using `agentOptions` or `https.globalAgent.options` would not be applied in the same way in proxied environments (as data travels through a TLS connection instead of an http/https agent).\n\n```js\nvar fs = require('fs')\n , path = require('path')\n , certFile = path.resolve(__dirname, 'ssl/client.crt')\n , keyFile = path.resolve(__dirname, 'ssl/client.key')\n , caFile = path.resolve(__dirname, 'ssl/ca.cert.pem')\n , request = require('request');\n\nvar options = {\n url: 'https://api.some-server.com/',\n cert: fs.readFileSync(certFile),\n key: fs.readFileSync(keyFile),\n passphrase: 'password',\n ca: fs.readFileSync(caFile)\n }\n};\n\nrequest.get(options);\n```\n\n### Using `options.agentOptions`\n\nIn the example below, we call an API requires client side SSL certificate\n(in PEM format) with passphrase protected private key (in PEM format) and disable the SSLv3 protocol:\n\n```js\nvar fs = require('fs')\n , path = require('path')\n , certFile = path.resolve(__dirname, 'ssl/client.crt')\n , keyFile = path.resolve(__dirname, 'ssl/client.key')\n , request = require('request');\n\nvar options = {\n url: 'https://api.some-server.com/',\n agentOptions: {\n cert: fs.readFileSync(certFile),\n key: fs.readFileSync(keyFile),\n // Or use `pfx` property replacing `cert` and `key` when using private key, certificate and CA certs in PFX or PKCS12 format:\n // pfx: fs.readFileSync(pfxFilePath),\n passphrase: 'password',\n securityOptions: 'SSL_OP_NO_SSLv3'\n }\n};\n\nrequest.get(options);\n```\n\nIt is able to force using SSLv3 only by specifying `secureProtocol`:\n\n```js\nrequest.get({\n url: 'https://api.some-server.com/',\n agentOptions: {\n secureProtocol: 'SSLv3_method'\n }\n});\n```\n\nIt is possible to accept other certificates than those signed by generally allowed Certificate Authorities (CAs).\nThis can be useful, for example, when using self-signed certificates.\nTo require a different root certificate, you can specify the signing CA by adding the contents of the CA's certificate file to the `agentOptions`.\nThe certificate the domain presents must be signed by the root certificate specified:\n\n```js\nrequest.get({\n url: 'https://api.some-server.com/',\n agentOptions: {\n ca: fs.readFileSync('ca.cert.pem')\n }\n});\n```\n\n[back to top](#table-of-contents)\n\n\n---\n\n## Support for HAR 1.2\n\nThe `options.har` property will override the values: `url`, `method`, `qs`, `headers`, `form`, `formData`, `body`, `json`, as well as construct multipart data and read files from disk when `request.postData.params[].fileName` is present without a matching `value`.\n\na validation step will check if the HAR Request format matches the latest spec (v1.2) and will skip parsing if not matching.\n\n```js\n var request = require('request')\n request({\n // will be ignored\n method: 'GET',\n uri: 'http://www.google.com',\n\n // HTTP Archive Request Object\n har: {\n url: 'http://www.mockbin.com/har',\n method: 'POST',\n headers: [\n {\n name: 'content-type',\n value: 'application/x-www-form-urlencoded'\n }\n ],\n postData: {\n mimeType: 'application/x-www-form-urlencoded',\n params: [\n {\n name: 'foo',\n value: 'bar'\n },\n {\n name: 'hello',\n value: 'world'\n }\n ]\n }\n }\n })\n\n // a POST request will be sent to http://www.mockbin.com\n // with body an application/x-www-form-urlencoded body:\n // foo=bar&hello=world\n```\n\n[back to top](#table-of-contents)\n\n\n---\n\n## request(options, callback)\n\nThe first argument can be either a `url` or an `options` object. The only required option is `uri`; all others are optional.\n\n- `uri` || `url` - fully qualified uri or a parsed url object from `url.parse()`\n- `baseUrl` - fully qualified uri string used as the base url. Most useful with `request.defaults`, for example when you want to do many requests to the same domain. If `baseUrl` is `https://example.com/api/`, then requesting `/end/point?test=true` will fetch `https://example.com/api/end/point?test=true`. When `baseUrl` is given, `uri` must also be a string.\n- `method` - http method (default: `\"GET\"`)\n- `headers` - http headers (default: `{}`)\n\n---\n\n- `qs` - object containing querystring values to be appended to the `uri`\n- `qsParseOptions` - object containing options to pass to the [qs.parse](https://github.com/hapijs/qs#parsing-objects) method. Alternatively pass options to the [querystring.parse](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_parse_str_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`\n- `qsStringifyOptions` - object containing options to pass to the [qs.stringify](https://github.com/hapijs/qs#stringifying) method. Alternatively pass options to the [querystring.stringify](https://nodejs.org/docs/v0.12.0/api/querystring.html#querystring_querystring_stringify_obj_sep_eq_options) method using this format `{sep:';', eq:':', options:{}}`. For example, to change the way arrays are converted to query strings using the `qs` module pass the `arrayFormat` option with one of `indices|brackets|repeat`\n- `useQuerystring` - If true, use `querystring` to stringify and parse\n querystrings, otherwise use `qs` (default: `false`). Set this option to\n `true` if you need arrays to be serialized as `foo=bar&foo=baz` instead of the\n default `foo[0]=bar&foo[1]=baz`.\n\n---\n\n- `body` - entity body for PATCH, POST and PUT requests. Must be a `Buffer` or `String`, unless `json` is `true`. If `json` is `true`, then `body` must be a JSON-serializable object.\n- `form` - when passed an object or a querystring, this sets `body` to a querystring representation of value, and adds `Content-type: application/x-www-form-urlencoded` header. When passed no options, a `FormData` instance is returned (and is piped to request). See \"Forms\" section above.\n- `formData` - Data to pass for a `multipart/form-data` request. See\n [Forms](#forms) section above.\n- `multipart` - array of objects which contain their own headers and `body`\n attributes. Sends a `multipart/related` request. See [Forms](#forms) section\n above.\n - Alternatively you can pass in an object `{chunked: false, data: []}` where\n `chunked` is used to specify whether the request is sent in\n [chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding)\n In non-chunked requests, data items with body streams are not allowed.\n- `preambleCRLF` - append a newline/CRLF before the boundary of your `multipart/form-data` request.\n- `postambleCRLF` - append a newline/CRLF at the end of the boundary of your `multipart/form-data` request.\n- `json` - sets `body` to JSON representation of value and adds `Content-type: application/json` header. Additionally, parses the response body as JSON.\n- `jsonReviver` - a [reviver function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse) that will be passed to `JSON.parse()` when parsing a JSON response body.\n\n---\n\n- `auth` - A hash containing values `user` || `username`, `pass` || `password`, and `sendImmediately` (optional). See documentation above.\n- `oauth` - Options for OAuth HMAC-SHA1 signing. See documentation above.\n- `hawk` - Options for [Hawk signing](https://github.com/hueniverse/hawk). The `credentials` key must contain the necessary signing info, [see hawk docs for details](https://github.com/hueniverse/hawk#usage-example).\n- `aws` - `object` containing AWS signing information. Should have the properties `key`, `secret`. Also requires the property `bucket`, unless you’re specifying your `bucket` as part of the path, or the request doesn’t use a bucket (i.e. GET Services). If you want to use AWS sign version 4 use the parameter `sign_version` with value `4` otherwise the default is version 2. **Note:** you need to `npm install aws4` first.\n- `httpSignature` - Options for the [HTTP Signature Scheme](https://github.com/joyent/node-http-signature/blob/master/http_signing.md) using [Joyent's library](https://github.com/joyent/node-http-signature). The `keyId` and `key` properties must be specified. See the docs for other options.\n\n---\n\n- `followRedirect` - follow HTTP 3xx responses as redirects (default: `true`). This property can also be implemented as function which gets `response` object as a single argument and should return `true` if redirects should continue or `false` otherwise.\n- `followAllRedirects` - follow non-GET HTTP 3xx responses as redirects (default: `false`)\n- `maxRedirects` - the maximum number of redirects to follow (default: `10`)\n- `removeRefererHeader` - removes the referer header when a redirect happens (default: `false`). **Note:** if true, referer header set in the initial request is preserved during redirect chain.\n\n---\n\n- `encoding` - Encoding to be used on `setEncoding` of response data. If `null`, the `body` is returned as a `Buffer`. Anything else **(including the default value of `undefined`)** will be passed as the [encoding](http://nodejs.org/api/buffer.html#buffer_buffer) parameter to `toString()` (meaning this is effectively `utf8` by default). (**Note:** if you expect binary data, you should set `encoding: null`.)\n- `gzip` - If `true`, add an `Accept-Encoding` header to request compressed content encodings from the server (if not already present) and decode supported content encodings in the response. **Note:** Automatic decoding of the response content is performed on the body data returned through `request` (both through the `request` stream and passed to the callback function) but is not performed on the `response` stream (available from the `response` event) which is the unmodified `http.IncomingMessage` object which may contain compressed data. See example below.\n- `jar` - If `true`, remember cookies for future use (or define your custom cookie jar; see examples section)\n\n---\n\n- `agent` - `http(s).Agent` instance to use\n- `agentClass` - alternatively specify your agent's class name\n- `agentOptions` - and pass its options. **Note:** for HTTPS see [tls API doc for TLS/SSL options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback) and the [documentation above](#using-optionsagentoptions).\n- `forever` - set to `true` to use the [forever-agent](https://github.com/request/forever-agent) **Note:** Defaults to `http(s).Agent({keepAlive:true})` in node 0.12+\n- `pool` - An object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as your options allow for it). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool. **Note:** `pool` is used only when the `agent` option is not specified.\n - A `maxSockets` property can also be provided on the `pool` object to set the max number of sockets for all agents created (ex: `pool: {maxSockets: Infinity}`).\n - Note that if you are sending multiple requests in a loop and creating\n multiple new `pool` objects, `maxSockets` will not work as intended. To\n work around this, either use [`request.defaults`](#requestdefaultsoptions)\n with your pool options or create the pool object with the `maxSockets`\n property outside of the loop.\n- `timeout` - Integer containing the number of milliseconds to wait for a\nserver to send response headers (and start the response body) before aborting\nthe request. Note that if the underlying TCP connection cannot be established,\nthe OS-wide TCP connection timeout will overrule the `timeout` option ([the\ndefault in Linux can be anywhere from 20-120 seconds][linux-timeout]).\n\n[linux-timeout]: http://www.sekuda.com/overriding_the_default_linux_kernel_20_second_tcp_socket_connect_timeout\n\n---\n\n- `localAddress` - Local interface to bind for network connections.\n- `proxy` - An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the `url` parameter (by embedding the auth info in the `uri`)\n- `strictSSL` - If `true`, requires SSL certificates be valid. **Note:** to use your own certificate authority, you need to specify an agent that was created with that CA as an option.\n- `tunnel` - controls the behavior of\n [HTTP `CONNECT` tunneling](https://en.wikipedia.org/wiki/HTTP_tunnel#HTTP_CONNECT_tunneling)\n as follows:\n - `undefined` (default) - `true` if the destination is `https`, `false` otherwise\n - `true` - always tunnel to the destination by making a `CONNECT` request to\n the proxy\n - `false` - request the destination as a `GET` request.\n- `proxyHeaderWhiteList` - A whitelist of headers to send to a\n tunneling proxy.\n- `proxyHeaderExclusiveList` - A whitelist of headers to send\n exclusively to a tunneling proxy and not to destination.\n\n---\n\n- `time` - If `true`, the request-response cycle (including all redirects) is timed at millisecond resolution, and the result provided on the response's `elapsedTime` property.\n- `har` - A [HAR 1.2 Request Object](http://www.softwareishard.com/blog/har-12-spec/#request), will be processed from HAR format into options overwriting matching values *(see the [HAR 1.2 section](#support-for-har-1.2) for details)*\n\nThe callback argument gets 3 arguments:\n\n1. An `error` when applicable (usually from [`http.ClientRequest`](http://nodejs.org/api/http.html#http_class_http_clientrequest) object)\n2. An [`http.IncomingMessage`](http://nodejs.org/api/http.html#http_http_incomingmessage) object\n3. The third is the `response` body (`String` or `Buffer`, or JSON object if the `json` option is supplied)\n\n[back to top](#table-of-contents)\n\n\n---\n\n## Convenience methods\n\nThere are also shorthand methods for different HTTP METHODs and some other conveniences.\n\n\n### request.defaults(options)\n\nThis method **returns a wrapper** around the normal request API that defaults\nto whatever options you pass to it.\n\n**Note:** `request.defaults()` **does not** modify the global request API;\ninstead, it **returns a wrapper** that has your default settings applied to it.\n\n**Note:** You can call `.defaults()` on the wrapper that is returned from\n`request.defaults` to add/override defaults that were previously defaulted.\n\nFor example:\n```js\n//requests using baseRequest() will set the 'x-token' header\nvar baseRequest = request.defaults({\n headers: {'x-token': 'my-token'}\n})\n\n//requests using specialRequest() will include the 'x-token' header set in\n//baseRequest and will also include the 'special' header\nvar specialRequest = baseRequest.defaults({\n headers: {special: 'special value'}\n})\n```\n\n### request.put\n\nSame as `request()`, but defaults to `method: \"PUT\"`.\n\n```js\nrequest.put(url)\n```\n\n### request.patch\n\nSame as `request()`, but defaults to `method: \"PATCH\"`.\n\n```js\nrequest.patch(url)\n```\n\n### request.post\n\nSame as `request()`, but defaults to `method: \"POST\"`.\n\n```js\nrequest.post(url)\n```\n\n### request.head\n\nSame as `request()`, but defaults to `method: \"HEAD\"`.\n\n```js\nrequest.head(url)\n```\n\n### request.del\n\nSame as `request()`, but defaults to `method: \"DELETE\"`.\n\n```js\nrequest.del(url)\n```\n\n### request.get\n\nSame as `request()` (for uniformity).\n\n```js\nrequest.get(url)\n```\n### request.cookie\n\nFunction that creates a new cookie.\n\n```js\nrequest.cookie('key1=value1')\n```\n### request.jar()\n\nFunction that creates a new cookie jar.\n\n```js\nrequest.jar()\n```\n\n[back to top](#table-of-contents)\n\n\n---\n\n\n## Debugging\n\nThere are at least three ways to debug the operation of `request`:\n\n1. Launch the node process like `NODE_DEBUG=request node script.js`\n (`lib,request,otherlib` works too).\n\n2. Set `require('request').debug = true` at any time (this does the same thing\n as #1).\n\n3. Use the [request-debug module](https://github.com/request/request-debug) to\n view request and response headers and bodies.\n\n[back to top](#table-of-contents)\n\n\n---\n\n## Timeouts\n\nMost requests to external servers should have a timeout attached, in case the\nserver is not responding in a timely manner. Without a timeout, your code may\nhave a socket open/consume resources for minutes or more.\n\nThere are two main types of timeouts: **connection timeouts** and **read\ntimeouts**. A connect timeout occurs if the timeout is hit while your client is\nattempting to establish a connection to a remote machine (corresponding to the\n[connect() call][connect] on the socket). A read timeout occurs any time the\nserver is too slow to send back a part of the response.\n\nThese two situations have widely different implications for what went wrong\nwith the request, so it's useful to be able to distinguish them. You can detect\ntimeout errors by checking `err.code` for an 'ETIMEDOUT' value. Further, you\ncan detect whether the timeout was a connection timeout by checking if the\n`err.connect` property is set to `true`.\n\n```js\nrequest.get('http://10.255.255.1', {timeout: 1500}, function(err) {\n console.log(err.code === 'ETIMEDOUT');\n // Set to `true` if the timeout was a connection timeout, `false` or\n // `undefined` otherwise.\n console.log(err.connect === true);\n process.exit(0);\n});\n```\n\n[connect]: http://linux.die.net/man/2/connect\n\n## Examples:\n\n```js\n var request = require('request')\n , rand = Math.floor(Math.random()*100000000).toString()\n ;\n request(\n { method: 'PUT'\n , uri: 'http://mikeal.iriscouch.com/testjs/' + rand\n , multipart:\n [ { 'content-type': 'application/json'\n , body: JSON.stringify({foo: 'bar', _attachments: {'message.txt': {follows: true, length: 18, 'content_type': 'text/plain' }}})\n }\n , { body: 'I am an attachment' }\n ]\n }\n , function (error, response, body) {\n if(response.statusCode == 201){\n console.log('document saved as: http://mikeal.iriscouch.com/testjs/'+ rand)\n } else {\n console.log('error: '+ response.statusCode)\n console.log(body)\n }\n }\n )\n```\n\nFor backwards-compatibility, response compression is not supported by default.\nTo accept gzip-compressed responses, set the `gzip` option to `true`. Note\nthat the body data passed through `request` is automatically decompressed\nwhile the response object is unmodified and will contain compressed data if\nthe server sent a compressed response.\n\n```js\n var request = require('request')\n request(\n { method: 'GET'\n , uri: 'http://www.google.com'\n , gzip: true\n }\n , function (error, response, body) {\n // body is the decompressed response body\n console.log('server encoded the data as: ' + (response.headers['content-encoding'] || 'identity'))\n console.log('the decoded data is: ' + body)\n }\n ).on('data', function(data) {\n // decompressed data as it is received\n console.log('decoded chunk: ' + data)\n })\n .on('response', function(response) {\n // unmodified http.IncomingMessage object\n response.on('data', function(data) {\n // compressed data as it is received\n console.log('received ' + data.length + ' bytes of compressed data')\n })\n })\n```\n\nCookies are disabled by default (else, they would be used in subsequent requests). To enable cookies, set `jar` to `true` (either in `defaults` or `options`).\n\n```js\nvar request = request.defaults({jar: true})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie jar (instead of `request`’s global cookie jar), set `jar` to an instance of `request.jar()` (either in `defaults` or `options`)\n\n```js\nvar j = request.jar()\nvar request = request.defaults({jar:j})\nrequest('http://www.google.com', function () {\n request('http://images.google.com')\n})\n```\n\nOR\n\n```js\nvar j = request.jar();\nvar cookie = request.cookie('key1=value1');\nvar url = 'http://www.google.com';\nj.setCookie(cookie, url);\nrequest({url: url, jar: j}, function () {\n request('http://images.google.com')\n})\n```\n\nTo use a custom cookie store (such as a\n[`FileCookieStore`](https://github.com/mitsuru/tough-cookie-filestore)\nwhich supports saving to and restoring from JSON files), pass it as a parameter\nto `request.jar()`:\n\n```js\nvar FileCookieStore = require('tough-cookie-filestore');\n// NOTE - currently the 'cookies.json' file must already exist!\nvar j = request.jar(new FileCookieStore('cookies.json'));\nrequest = request.defaults({ jar : j })\nrequest('http://www.google.com', function() {\n request('http://images.google.com')\n})\n```\n\nThe cookie store must be a\n[`tough-cookie`](https://github.com/SalesforceEng/tough-cookie)\nstore and it must support synchronous operations; see the\n[`CookieStore` API docs](https://github.com/SalesforceEng/tough-cookie#cookiestore-api)\nfor details.\n\nTo inspect your cookie jar after a request:\n\n```js\nvar j = request.jar()\nrequest({url: 'http://www.google.com', jar: j}, function () {\n var cookie_string = j.getCookieString(url); // \"key1=value1; key2=value2; ...\"\n var cookies = j.getCookies(url);\n // [{key: 'key1', value: 'value1', domain: \"www.google.com\", ...}, ...]\n})\n```\n\n[back to top](#table-of-contents)\n",
103
- "readmeFilename": "README.md",
125
+ "readme": "ERROR: No README data found!",
104
126
  "repository": {
105
127
  "type": "git",
106
128
  "url": "git+https://github.com/request/request.git"
@@ -118,5 +140,5 @@
118
140
  "util",
119
141
  "utility"
120
142
  ],
121
- "version": "2.69.0"
143
+ "version": "2.73.0"
122
144
  }
@@ -9,6 +9,7 @@ var http = require('http')
9
9
  , bl = require('bl')
10
10
  , hawk = require('hawk')
11
11
  , aws2 = require('aws-sign2')
12
+ , aws4 = require('aws4')
12
13
  , httpSignature = require('http-signature')
13
14
  , mime = require('mime-types')
14
15
  , stringstream = require('stringstream')
@@ -16,6 +17,7 @@ var http = require('http')
16
17
  , ForeverAgent = require('forever-agent')
17
18
  , FormData = require('form-data')
18
19
  , extend = require('extend')
20
+ , isstream = require('isstream')
19
21
  , isTypedArray = require('is-typedarray').strict
20
22
  , helpers = require('./lib/helpers')
21
23
  , cookies = require('./lib/cookies')
@@ -69,20 +71,6 @@ function filterOutReservedFunctions(reserved, options) {
69
71
 
70
72
  }
71
73
 
72
- // Function for properly handling a connection error
73
- function connectionErrorHandler(error) {
74
- var socket = this
75
- if (socket.res) {
76
- if (socket.res.request) {
77
- socket.res.request.emit('error', error)
78
- } else {
79
- socket.res.emit('error', error)
80
- }
81
- } else {
82
- socket._httpMessage.emit('error', error)
83
- }
84
- }
85
-
86
74
  // Return a simpler request object to allow serialization
87
75
  function requestToJSON() {
88
76
  var self = this
@@ -334,7 +322,7 @@ Request.prototype.init = function (options) {
334
322
  var formData = options.formData
335
323
  var requestForm = self.form()
336
324
  var appendFormValue = function (key, value) {
337
- if (value.hasOwnProperty('value') && value.hasOwnProperty('options')) {
325
+ if (value && value.hasOwnProperty('value') && value.hasOwnProperty('options')) {
338
326
  requestForm.append(key, value.value, value.options)
339
327
  } else {
340
328
  requestForm.append(key, value)
@@ -398,7 +386,7 @@ Request.prototype.init = function (options) {
398
386
  }
399
387
 
400
388
  if (self.gzip && !self.hasHeader('accept-encoding')) {
401
- self.setHeader('accept-encoding', 'gzip')
389
+ self.setHeader('accept-encoding', 'gzip, deflate')
402
390
  }
403
391
 
404
392
  if (self.uri.auth && !self.hasHeader('authorization')) {
@@ -452,7 +440,7 @@ Request.prototype.init = function (options) {
452
440
  }
453
441
  }
454
442
  }
455
- if (self.body) {
443
+ if (self.body && !isstream(self.body)) {
456
444
  setContentLength()
457
445
  }
458
446
 
@@ -552,15 +540,19 @@ Request.prototype.init = function (options) {
552
540
  self._multipart.body.pipe(self)
553
541
  }
554
542
  if (self.body) {
555
- setContentLength()
556
- if (Array.isArray(self.body)) {
557
- self.body.forEach(function (part) {
558
- self.write(part)
559
- })
543
+ if (isstream(self.body)) {
544
+ self.body.pipe(self)
560
545
  } else {
561
- self.write(self.body)
546
+ setContentLength()
547
+ if (Array.isArray(self.body)) {
548
+ self.body.forEach(function (part) {
549
+ self.write(part)
550
+ })
551
+ } else {
552
+ self.write(self.body)
553
+ }
554
+ self.end()
562
555
  }
563
- self.end()
564
556
  } else if (self.requestBodyStream) {
565
557
  console.warn('options.requestBodyStream is deprecated, please pass the request object to stream.pipe.')
566
558
  self.requestBodyStream.pipe(self)
@@ -744,7 +736,12 @@ Request.prototype.start = function () {
744
736
 
745
737
  debug('make request', self.uri.href)
746
738
 
747
- self.req = self.httpModule.request(reqOptions)
739
+ try {
740
+ self.req = self.httpModule.request(reqOptions)
741
+ } catch (err) {
742
+ self.emit('error', err)
743
+ return
744
+ }
748
745
 
749
746
  if (self.timing) {
750
747
  self.startTime = new Date().getTime()
@@ -794,11 +791,6 @@ Request.prototype.start = function () {
794
791
  self.emit('socket', socket)
795
792
  })
796
793
 
797
- self.on('end', function() {
798
- if ( self.req.connection ) {
799
- self.req.connection.removeListener('error', connectionErrorHandler)
800
- }
801
- })
802
794
  self.emit('request', self.req)
803
795
  }
804
796
 
@@ -833,11 +825,6 @@ Request.prototype.onRequestResponse = function (response) {
833
825
  debug('response end', self.uri.href, response.statusCode, response.headers)
834
826
  })
835
827
 
836
- // The check on response.connection is a workaround for browserify.
837
- if (response.connection && response.connection.listeners('error').indexOf(connectionErrorHandler) === -1) {
838
- response.connection.setMaxListeners(0)
839
- response.connection.once('error', connectionErrorHandler)
840
- }
841
828
  if (self._aborted) {
842
829
  debug('aborted', self.uri.href)
843
830
  response.resume()
@@ -910,14 +897,29 @@ Request.prototype.onRequestResponse = function (response) {
910
897
  self._ended = true
911
898
  })
912
899
 
900
+ var noBody = function (code) {
901
+ return (
902
+ self.method === 'HEAD'
903
+ // Informational
904
+ || (code >= 100 && code < 200)
905
+ // No Content
906
+ || code === 204
907
+ // Not Modified
908
+ || code === 304
909
+ )
910
+ }
911
+
913
912
  var responseContent
914
- if (self.gzip) {
913
+ if (self.gzip && !noBody(response.statusCode)) {
915
914
  var contentEncoding = response.headers['content-encoding'] || 'identity'
916
915
  contentEncoding = contentEncoding.trim().toLowerCase()
917
916
 
918
917
  if (contentEncoding === 'gzip') {
919
918
  responseContent = zlib.createGunzip()
920
919
  response.pipe(responseContent)
920
+ } else if (contentEncoding === 'deflate') {
921
+ responseContent = zlib.createInflate()
922
+ response.pipe(responseContent)
921
923
  } else {
922
924
  // Since previous versions didn't check for Content-Encoding header,
923
925
  // ignore any invalid values to preserve backwards-compatibility
@@ -1001,6 +1003,9 @@ Request.prototype.readResponseBody = function (response) {
1001
1003
  debug('end event', self.uri.href)
1002
1004
  if (self._aborted) {
1003
1005
  debug('aborted', self.uri.href)
1006
+ // `buffer` is defined in the parent scope and used in a closure it exists for the life of the request.
1007
+ // This can lead to leaky behavior if the user retains a reference to the request object.
1008
+ buffer.destroy()
1004
1009
  return
1005
1010
  }
1006
1011
 
@@ -1013,6 +1018,9 @@ Request.prototype.readResponseBody = function (response) {
1013
1018
  } else {
1014
1019
  response.body = buffer.toString(self.encoding)
1015
1020
  }
1021
+ // `buffer` is defined in the parent scope and used in a closure it exists for the life of the Request.
1022
+ // This can lead to leaky behavior if the user retains a reference to the request object.
1023
+ buffer.destroy()
1016
1024
  } else if (strings.length) {
1017
1025
  // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation.
1018
1026
  // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse().
@@ -1157,11 +1165,15 @@ Request.prototype.json = function (val) {
1157
1165
  self.setHeader('accept', 'application/json')
1158
1166
  }
1159
1167
 
1168
+ if (typeof self.jsonReplacer === 'function') {
1169
+ self._jsonReplacer = self.jsonReplacer
1170
+ }
1171
+
1160
1172
  self._json = true
1161
1173
  if (typeof val === 'boolean') {
1162
1174
  if (self.body !== undefined) {
1163
1175
  if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) {
1164
- self.body = safeStringify(self.body)
1176
+ self.body = safeStringify(self.body, self._jsonReplacer)
1165
1177
  } else {
1166
1178
  self.body = self._qs.rfc3986(self.body)
1167
1179
  }
@@ -1170,7 +1182,7 @@ Request.prototype.json = function (val) {
1170
1182
  }
1171
1183
  }
1172
1184
  } else {
1173
- self.body = safeStringify(val)
1185
+ self.body = safeStringify(val, self._jsonReplacer)
1174
1186
  if (!self.hasHeader('content-type')) {
1175
1187
  self.setHeader('content-type', 'application/json')
1176
1188
  }
@@ -1229,10 +1241,9 @@ Request.prototype.aws = function (opts, now) {
1229
1241
  self._aws = opts
1230
1242
  return self
1231
1243
  }
1232
-
1244
+
1233
1245
  if (opts.sign_version == 4 || opts.sign_version == '4') {
1234
- var aws4 = require('aws4')
1235
- // use aws4
1246
+ // use aws4
1236
1247
  var options = {
1237
1248
  host: self.uri.host,
1238
1249
  path: self.uri.path,
@@ -1368,7 +1379,9 @@ Request.prototype.write = function () {
1368
1379
  if (!self._started) {
1369
1380
  self.start()
1370
1381
  }
1371
- return self.req.write.apply(self.req, arguments)
1382
+ if (self.req) {
1383
+ return self.req.write.apply(self.req, arguments)
1384
+ }
1372
1385
  }
1373
1386
  Request.prototype.end = function (chunk) {
1374
1387
  var self = this
@@ -1380,7 +1393,9 @@ Request.prototype.end = function (chunk) {
1380
1393
  if (!self._started) {
1381
1394
  self.start()
1382
1395
  }
1383
- self.req.end()
1396
+ if (self.req) {
1397
+ self.req.end()
1398
+ }
1384
1399
  }
1385
1400
  Request.prototype.pause = function () {
1386
1401
  var self = this
@@ -1,26 +1,44 @@
1
1
  {
2
- "_from": "rimraf@~2.5.0",
3
- "_id": "rimraf@2.5.2",
2
+ "_args": [
3
+ [
4
+ "rimraf@~2.5.0",
5
+ "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp"
6
+ ]
7
+ ],
8
+ "_from": "rimraf@>=2.5.0 <2.6.0",
9
+ "_id": "rimraf@2.5.3",
10
+ "_inCache": true,
11
+ "_installable": true,
4
12
  "_location": "/rimraf",
5
- "_nodeVersion": "5.6.0",
13
+ "_nodeVersion": "4.4.4",
6
14
  "_npmOperationalInternal": {
7
- "host": "packages-6-west.internal.npmjs.com",
8
- "tmp": "tmp/rimraf-2.5.2.tgz_1455346499772_0.9326622514054179"
15
+ "host": "packages-16-east.internal.npmjs.com",
16
+ "tmp": "tmp/rimraf-2.5.3.tgz_1467582915019_0.6380921453237534"
9
17
  },
10
18
  "_npmUser": {
11
19
  "email": "i@izs.me",
12
20
  "name": "isaacs"
13
21
  },
14
- "_npmVersion": "3.7.0",
22
+ "_npmVersion": "3.10.2",
15
23
  "_phantomChildren": {},
24
+ "_requested": {
25
+ "name": "rimraf",
26
+ "raw": "rimraf@~2.5.0",
27
+ "rawSpec": "~2.5.0",
28
+ "scope": null,
29
+ "spec": ">=2.5.0 <2.6.0",
30
+ "type": "range"
31
+ },
16
32
  "_requiredBy": [
17
33
  "/fstream",
18
34
  "/node-pre-gyp",
19
35
  "/tar-pack"
20
36
  ],
21
- "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.2.tgz",
22
- "_shasum": "62ba947fa4c0b4363839aefecd4f0fbad6059726",
37
+ "_resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.3.tgz",
38
+ "_shasum": "6e5efdda4aa2f03417f6b2a574aec29f4b652705",
23
39
  "_shrinkwrap": null,
40
+ "_spec": "rimraf@~2.5.0",
41
+ "_where": "/Users/eshanker/Code/fsevents/node_modules/node-pre-gyp",
24
42
  "author": {
25
43
  "email": "i@izs.me",
26
44
  "name": "Isaac Z. Schlueter",
@@ -33,17 +51,17 @@
33
51
  "url": "https://github.com/isaacs/rimraf/issues"
34
52
  },
35
53
  "dependencies": {
36
- "glob": "^7.0.0"
54
+ "glob": "^7.0.5"
37
55
  },
38
56
  "description": "A deep deletion module for node (like `rm -rf`)",
39
57
  "devDependencies": {
40
58
  "mkdirp": "^0.5.1",
41
- "tap": "^5.1.1"
59
+ "tap": "^6.1.1"
42
60
  },
43
61
  "directories": {},
44
62
  "dist": {
45
- "shasum": "62ba947fa4c0b4363839aefecd4f0fbad6059726",
46
- "tarball": "http://registry.npmjs.org/rimraf/-/rimraf-2.5.2.tgz"
63
+ "shasum": "6e5efdda4aa2f03417f6b2a574aec29f4b652705",
64
+ "tarball": "https://registry.npmjs.org/rimraf/-/rimraf-2.5.3.tgz"
47
65
  },
48
66
  "files": [
49
67
  "LICENSE",
@@ -51,7 +69,7 @@
51
69
  "bin.js",
52
70
  "rimraf.js"
53
71
  ],
54
- "gitHead": "f414f87021f88d004ac487eebc8d07ce6a152721",
72
+ "gitHead": "7263a784e8f08d94dd6caf6ee934fceb525a6f3d",
55
73
  "homepage": "https://github.com/isaacs/rimraf#readme",
56
74
  "license": "ISC",
57
75
  "main": "rimraf.js",
@@ -63,8 +81,7 @@
63
81
  ],
64
82
  "name": "rimraf",
65
83
  "optionalDependencies": {},
66
- "readme": "[![Build Status](https://travis-ci.org/isaacs/rimraf.svg?branch=master)](https://travis-ci.org/isaacs/rimraf) [![Dependency Status](https://david-dm.org/isaacs/rimraf.svg)](https://david-dm.org/isaacs/rimraf) [![devDependency Status](https://david-dm.org/isaacs/rimraf/dev-status.svg)](https://david-dm.org/isaacs/rimraf#info=devDependencies)\n\nThe [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, [opts], callback)`\n\nThe first parameter will be interpreted as a globbing pattern for files. If you\nwant to disable globbing you can do so with `opts.disableGlob` (defaults to\n`false`). This might be handy, for instance, if you have filenames that contain\nglobbing wildcard characters.\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up, adding 100ms of wait\n between each attempt. The default `maxBusyTries` is 3.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n* `EMFILE` - Since `readdir` requires opening a file descriptor, it's\n possible to hit `EMFILE` if too many file descriptors are in use.\n In the sync case, there's nothing to be done for this. But in the\n async case, rimraf will gradually back off with timeouts up to\n `opts.emfileWait` ms, which defaults to 1000.\n\n## options\n\n* unlink, chmod, stat, lstat, rmdir, readdir,\n unlinkSync, chmodSync, statSync, lstatSync, rmdirSync, readdirSync\n\n In order to use a custom file system library, you can override\n specific fs functions on the options object.\n\n If any of these functions are present on the options object, then\n the supplied function will be used instead of the default fs\n method.\n\n Sync methods are only relevant for `rimraf.sync()`, of course.\n\n For example:\n\n ```javascript\n var myCustomFS = require('some-custom-fs')\n\n rimraf('some-thing', myCustomFS, callback)\n ```\n\n* maxBusyTries\n\n If an `EBUSY`, `ENOTEMPTY`, or `EPERM` error code is encountered\n on Windows systems, then rimraf will retry with a linear backoff\n wait of 100ms longer on each try. The default maxBusyTries is 3.\n\n Only relevant for async usage.\n\n* emfileWait\n\n If an `EMFILE` error is encountered, then rimraf will retry\n repeatedly with a linear backoff of 1ms longer on each try, until\n the timeout counter hits this max. The default limit is 1000.\n\n If you repeatedly encounter `EMFILE` errors, then consider using\n [graceful-fs](http://npm.im/graceful-fs) in your program.\n\n Only relevant for async usage.\n\n* glob\n\n Set to `false` to disable [glob](http://npm.im/glob) pattern\n matching.\n\n Set to an object to pass options to the glob module. The default\n glob options are `{ nosort: true, silent: true }`.\n\n Glob version 6 is used in this module.\n\n Relevant for both sync and async usage.\n\n* disableGlob\n\n Set to any non-falsey value to disable globbing entirely.\n (Equivalent to setting `glob: false`.)\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf <path> [<path> ...]` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n",
67
- "readmeFilename": "README.md",
84
+ "readme": "ERROR: No README data found!",
68
85
  "repository": {
69
86
  "type": "git",
70
87
  "url": "git://github.com/isaacs/rimraf.git"
@@ -72,5 +89,5 @@
72
89
  "scripts": {
73
90
  "test": "tap test/*.js"
74
91
  },
75
- "version": "2.5.2"
92
+ "version": "2.5.3"
76
93
  }