fsevents 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (216) hide show
  1. package/node_modules/are-we-there-yet/LICENSE +5 -0
  2. package/node_modules/are-we-there-yet/README.md +2 -1
  3. package/node_modules/are-we-there-yet/README.md~ +183 -0
  4. package/node_modules/are-we-there-yet/package.json +10 -9
  5. package/node_modules/async/README.md +14 -10
  6. package/node_modules/async/dist/async.js +22 -18
  7. package/node_modules/async/dist/async.min.js +1 -1
  8. package/node_modules/async/lib/async.js +22 -18
  9. package/node_modules/async/package.json +11 -10
  10. package/node_modules/core-util-is/package.json +2 -1
  11. package/node_modules/dashdash/README.md +6 -3
  12. package/node_modules/dashdash/lib/dashdash.js +10 -1
  13. package/node_modules/dashdash/package.json +9 -8
  14. package/node_modules/escape-string-regexp/index.js +1 -1
  15. package/node_modules/escape-string-regexp/package.json +17 -15
  16. package/node_modules/escape-string-regexp/readme.md +4 -4
  17. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +9 -0
  18. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +42 -30
  19. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +9 -9
  20. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +28 -0
  21. package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json +11 -11
  22. package/node_modules/graceful-fs/package.json +2 -3
  23. package/node_modules/isarray/package.json +2 -1
  24. package/node_modules/mime-db/HISTORY.md +32 -0
  25. package/node_modules/mime-db/README.md +1 -1
  26. package/node_modules/mime-db/db.json +78 -0
  27. package/node_modules/mime-db/package.json +15 -14
  28. package/node_modules/mime-types/HISTORY.md +12 -0
  29. package/node_modules/mime-types/package.json +11 -10
  30. package/node_modules/node-pre-gyp/CHANGELOG.md +8 -0
  31. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +32 -0
  32. package/node_modules/node-pre-gyp/package.json +8 -8
  33. package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/.travis.yml +6 -1
  34. package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/index.js +8 -1
  35. package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/package.json +13 -12
  36. package/node_modules/rc/lib/utils.js +1 -1
  37. package/node_modules/rc/package.json +11 -10
  38. package/node_modules/readable-stream/README.md +27 -6
  39. package/node_modules/{bl/node_modules/readable-stream → readable-stream}/doc/stream.markdown +608 -574
  40. package/node_modules/readable-stream/lib/_stream_duplex.js +18 -25
  41. package/node_modules/readable-stream/lib/_stream_passthrough.js +2 -21
  42. package/node_modules/readable-stream/lib/_stream_readable.js +117 -93
  43. package/node_modules/readable-stream/lib/_stream_transform.js +15 -27
  44. package/node_modules/readable-stream/lib/_stream_writable.js +140 -88
  45. package/node_modules/readable-stream/package.json +33 -25
  46. package/node_modules/readable-stream/readable.js +6 -1
  47. package/node_modules/rimraf/README.md +58 -0
  48. package/node_modules/rimraf/node_modules/glob/README.md +27 -45
  49. package/node_modules/rimraf/node_modules/glob/common.js +7 -26
  50. package/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +1 -1
  51. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +9 -0
  52. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +42 -30
  53. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +9 -9
  54. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +28 -0
  55. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +11 -11
  56. package/node_modules/rimraf/node_modules/glob/package.json +11 -10
  57. package/node_modules/rimraf/package.json +12 -11
  58. package/node_modules/rimraf/rimraf.js +7 -5
  59. package/node_modules/sshpk/bin/sshpk-conv +1 -1
  60. package/node_modules/sshpk/lib/dhe.js +1 -2
  61. package/node_modules/sshpk/lib/ssh-buffer.js +2 -1
  62. package/node_modules/sshpk/package.json +13 -11
  63. package/node_modules/string_decoder/package.json +2 -1
  64. package/node_modules/tar-pack/index.js +1 -2
  65. package/node_modules/tar-pack/node_modules/rimraf/LICENSE +12 -20
  66. package/node_modules/tar-pack/node_modules/rimraf/README.md +17 -4
  67. package/node_modules/tar-pack/node_modules/rimraf/bin.js +11 -4
  68. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/README.md +359 -0
  69. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/common.js +226 -0
  70. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/glob.js +752 -0
  71. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc +17 -0
  72. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/LICENSE +15 -0
  73. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/README.md +37 -0
  74. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js +44 -0
  75. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/LICENSE +15 -0
  76. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +36 -0
  77. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +58 -0
  78. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +51 -0
  79. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +33 -0
  80. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json +67 -0
  81. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js +97 -0
  82. package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/package.json +3 -3
  83. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md +216 -0
  84. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js +912 -0
  85. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +3 -0
  86. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +122 -0
  87. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
  88. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
  89. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
  90. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +3 -0
  91. package/node_modules/tar-pack/node_modules/{readable-stream/node_modules/isarray/README.md → rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md} +0 -33
  92. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
  93. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +89 -0
  94. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
  95. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +50 -0
  96. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +79 -0
  97. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +84 -0
  98. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +4 -0
  99. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
  100. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
  101. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
  102. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
  103. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +90 -0
  104. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
  105. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +81 -0
  106. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +66 -0
  107. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/README.md +51 -0
  108. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/LICENSE +15 -0
  109. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
  110. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +58 -0
  111. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
  112. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
  113. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/once.js +21 -0
  114. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +70 -0
  115. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/index.js +20 -0
  116. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json +78 -0
  117. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/readme.md +51 -0
  118. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/package.json +79 -0
  119. package/node_modules/tar-pack/node_modules/rimraf/node_modules/glob/sync.js +460 -0
  120. package/node_modules/tar-pack/node_modules/rimraf/package.json +28 -40
  121. package/node_modules/tar-pack/node_modules/rimraf/rimraf.js +138 -53
  122. package/node_modules/tar-pack/package.json +21 -11
  123. package/node_modules/tunnel-agent/index.js +2 -0
  124. package/node_modules/tunnel-agent/package.json +10 -9
  125. package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/package.json +3 -2
  126. package/node_modules/verror/package.json +3 -2
  127. package/package.json +2 -2
  128. package/CHANGELOG.md +0 -16
  129. package/node_modules/bl/node_modules/readable-stream/.npmignore +0 -5
  130. package/node_modules/bl/node_modules/readable-stream/LICENSE +0 -18
  131. package/node_modules/bl/node_modules/readable-stream/README.md +0 -36
  132. package/node_modules/bl/node_modules/readable-stream/duplex.js +0 -1
  133. package/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js +0 -82
  134. package/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js +0 -27
  135. package/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js +0 -973
  136. package/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js +0 -197
  137. package/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js +0 -527
  138. package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/LICENSE +0 -19
  139. package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/README.md +0 -3
  140. package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/float.patch +0 -604
  141. package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +0 -107
  142. package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json +0 -67
  143. package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js +0 -68
  144. package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/README.md +0 -54
  145. package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/build/build.js +0 -209
  146. package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/component.json +0 -19
  147. package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/index.js +0 -3
  148. package/node_modules/bl/node_modules/readable-stream/node_modules/isarray/package.json +0 -59
  149. package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/.npmignore +0 -2
  150. package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/LICENSE +0 -20
  151. package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/README.md +0 -7
  152. package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/index.js +0 -221
  153. package/node_modules/bl/node_modules/readable-stream/node_modules/string_decoder/package.json +0 -60
  154. package/node_modules/bl/node_modules/readable-stream/package.json +0 -82
  155. package/node_modules/bl/node_modules/readable-stream/passthrough.js +0 -1
  156. package/node_modules/bl/node_modules/readable-stream/readable.js +0 -12
  157. package/node_modules/bl/node_modules/readable-stream/transform.js +0 -1
  158. package/node_modules/bl/node_modules/readable-stream/writable.js +0 -1
  159. package/node_modules/node-pre-gyp/LICENSE +0 -27
  160. package/node_modules/readable-stream/float.patch +0 -923
  161. package/node_modules/tar-pack/node_modules/readable-stream/.npmignore +0 -5
  162. package/node_modules/tar-pack/node_modules/readable-stream/LICENSE +0 -18
  163. package/node_modules/tar-pack/node_modules/readable-stream/README.md +0 -15
  164. package/node_modules/tar-pack/node_modules/readable-stream/duplex.js +0 -1
  165. package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_duplex.js +0 -89
  166. package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_passthrough.js +0 -46
  167. package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_readable.js +0 -982
  168. package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_transform.js +0 -210
  169. package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_writable.js +0 -386
  170. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/LICENSE +0 -19
  171. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/README.md +0 -3
  172. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/float.patch +0 -604
  173. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +0 -107
  174. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/package.json +0 -67
  175. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/test.js +0 -68
  176. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/LICENSE +0 -16
  177. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/README.md +0 -42
  178. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/inherits.js +0 -1
  179. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/inherits_browser.js +0 -23
  180. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/package.json +0 -58
  181. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/test.js +0 -25
  182. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/build/build.js +0 -209
  183. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/component.json +0 -19
  184. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/index.js +0 -3
  185. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/isarray/package.json +0 -59
  186. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/.npmignore +0 -2
  187. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/LICENSE +0 -20
  188. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/README.md +0 -7
  189. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/index.js +0 -221
  190. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/string_decoder/package.json +0 -60
  191. package/node_modules/tar-pack/node_modules/readable-stream/package.json +0 -76
  192. package/node_modules/tar-pack/node_modules/readable-stream/passthrough.js +0 -1
  193. package/node_modules/tar-pack/node_modules/readable-stream/readable.js +0 -8
  194. package/node_modules/tar-pack/node_modules/readable-stream/transform.js +0 -1
  195. package/node_modules/tar-pack/node_modules/readable-stream/writable.js +0 -1
  196. package/node_modules/tar-pack/node_modules/rimraf/AUTHORS +0 -6
  197. package/node_modules/tar-pack/node_modules/rimraf/test/run.sh +0 -16
  198. package/node_modules/tar-pack/node_modules/rimraf/test/setup.sh +0 -47
  199. package/node_modules/tar-pack/node_modules/rimraf/test/test-async.js +0 -5
  200. package/node_modules/tar-pack/node_modules/rimraf/test/test-sync.js +0 -3
  201. /package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/license.md +0 -0
  202. /package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/readme.md +0 -0
  203. /package/node_modules/{bl/node_modules/readable-stream/node_modules/process-nextick-args → process-nextick-args}/test.js +0 -0
  204. /package/node_modules/{bl/node_modules/readable-stream → readable-stream}/.travis.yml +0 -0
  205. /package/node_modules/{bl/node_modules/readable-stream → readable-stream}/.zuul.yml +0 -0
  206. /package/node_modules/{bl/node_modules/readable-stream → readable-stream}/doc/wg-meetings/2015-01-30.md +0 -0
  207. /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/LICENSE +0 -0
  208. /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/README.md +0 -0
  209. /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/inherits.js +0 -0
  210. /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/inherits_browser.js +0 -0
  211. /package/node_modules/{bl/node_modules/readable-stream → tar-pack/node_modules/rimraf/node_modules/glob}/node_modules/inherits/test.js +0 -0
  212. /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/History.md +0 -0
  213. /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/LICENSE +0 -0
  214. /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/README.md +0 -0
  215. /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/browser.js +0 -0
  216. /package/node_modules/{bl/node_modules/readable-stream/node_modules/util-deprecate → util-deprecate}/node.js +0 -0
@@ -1,210 +0,0 @@
1
- // Copyright Joyent, Inc. and other Node contributors.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a
4
- // copy of this software and associated documentation files (the
5
- // "Software"), to deal in the Software without restriction, including
6
- // without limitation the rights to use, copy, modify, merge, publish,
7
- // distribute, sublicense, and/or sell copies of the Software, and to permit
8
- // persons to whom the Software is furnished to do so, subject to the
9
- // following conditions:
10
- //
11
- // The above copyright notice and this permission notice shall be included
12
- // in all copies or substantial portions of the Software.
13
- //
14
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
17
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
21
-
22
-
23
- // a transform stream is a readable/writable stream where you do
24
- // something with the data. Sometimes it's called a "filter",
25
- // but that's not a great name for it, since that implies a thing where
26
- // some bits pass through, and others are simply ignored. (That would
27
- // be a valid example of a transform, of course.)
28
- //
29
- // While the output is causally related to the input, it's not a
30
- // necessarily symmetric or synchronous transformation. For example,
31
- // a zlib stream might take multiple plain-text writes(), and then
32
- // emit a single compressed chunk some time in the future.
33
- //
34
- // Here's how this works:
35
- //
36
- // The Transform stream has all the aspects of the readable and writable
37
- // stream classes. When you write(chunk), that calls _write(chunk,cb)
38
- // internally, and returns false if there's a lot of pending writes
39
- // buffered up. When you call read(), that calls _read(n) until
40
- // there's enough pending readable data buffered up.
41
- //
42
- // In a transform stream, the written data is placed in a buffer. When
43
- // _read(n) is called, it transforms the queued up data, calling the
44
- // buffered _write cb's as it consumes chunks. If consuming a single
45
- // written chunk would result in multiple output chunks, then the first
46
- // outputted bit calls the readcb, and subsequent chunks just go into
47
- // the read buffer, and will cause it to emit 'readable' if necessary.
48
- //
49
- // This way, back-pressure is actually determined by the reading side,
50
- // since _read has to be called to start processing a new chunk. However,
51
- // a pathological inflate type of transform can cause excessive buffering
52
- // here. For example, imagine a stream where every byte of input is
53
- // interpreted as an integer from 0-255, and then results in that many
54
- // bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
55
- // 1kb of data being output. In this case, you could write a very small
56
- // amount of input, and end up with a very large amount of output. In
57
- // such a pathological inflating mechanism, there'd be no way to tell
58
- // the system to stop doing the transform. A single 4MB write could
59
- // cause the system to run out of memory.
60
- //
61
- // However, even in such a pathological case, only a single written chunk
62
- // would be consumed, and then the rest would wait (un-transformed) until
63
- // the results of the previous transformed chunk were consumed.
64
-
65
- module.exports = Transform;
66
-
67
- var Duplex = require('./_stream_duplex');
68
-
69
- /*<replacement>*/
70
- var util = require('core-util-is');
71
- util.inherits = require('inherits');
72
- /*</replacement>*/
73
-
74
- util.inherits(Transform, Duplex);
75
-
76
-
77
- function TransformState(options, stream) {
78
- this.afterTransform = function(er, data) {
79
- return afterTransform(stream, er, data);
80
- };
81
-
82
- this.needTransform = false;
83
- this.transforming = false;
84
- this.writecb = null;
85
- this.writechunk = null;
86
- }
87
-
88
- function afterTransform(stream, er, data) {
89
- var ts = stream._transformState;
90
- ts.transforming = false;
91
-
92
- var cb = ts.writecb;
93
-
94
- if (!cb)
95
- return stream.emit('error', new Error('no writecb in Transform class'));
96
-
97
- ts.writechunk = null;
98
- ts.writecb = null;
99
-
100
- if (data !== null && data !== undefined)
101
- stream.push(data);
102
-
103
- if (cb)
104
- cb(er);
105
-
106
- var rs = stream._readableState;
107
- rs.reading = false;
108
- if (rs.needReadable || rs.length < rs.highWaterMark) {
109
- stream._read(rs.highWaterMark);
110
- }
111
- }
112
-
113
-
114
- function Transform(options) {
115
- if (!(this instanceof Transform))
116
- return new Transform(options);
117
-
118
- Duplex.call(this, options);
119
-
120
- var ts = this._transformState = new TransformState(options, this);
121
-
122
- // when the writable side finishes, then flush out anything remaining.
123
- var stream = this;
124
-
125
- // start out asking for a readable event once data is transformed.
126
- this._readableState.needReadable = true;
127
-
128
- // we have implemented the _read method, and done the other things
129
- // that Readable wants before the first _read call, so unset the
130
- // sync guard flag.
131
- this._readableState.sync = false;
132
-
133
- this.once('finish', function() {
134
- if ('function' === typeof this._flush)
135
- this._flush(function(er) {
136
- done(stream, er);
137
- });
138
- else
139
- done(stream);
140
- });
141
- }
142
-
143
- Transform.prototype.push = function(chunk, encoding) {
144
- this._transformState.needTransform = false;
145
- return Duplex.prototype.push.call(this, chunk, encoding);
146
- };
147
-
148
- // This is the part where you do stuff!
149
- // override this function in implementation classes.
150
- // 'chunk' is an input chunk.
151
- //
152
- // Call `push(newChunk)` to pass along transformed output
153
- // to the readable side. You may call 'push' zero or more times.
154
- //
155
- // Call `cb(err)` when you are done with this chunk. If you pass
156
- // an error, then that'll put the hurt on the whole operation. If you
157
- // never call cb(), then you'll never get another chunk.
158
- Transform.prototype._transform = function(chunk, encoding, cb) {
159
- throw new Error('not implemented');
160
- };
161
-
162
- Transform.prototype._write = function(chunk, encoding, cb) {
163
- var ts = this._transformState;
164
- ts.writecb = cb;
165
- ts.writechunk = chunk;
166
- ts.writeencoding = encoding;
167
- if (!ts.transforming) {
168
- var rs = this._readableState;
169
- if (ts.needTransform ||
170
- rs.needReadable ||
171
- rs.length < rs.highWaterMark)
172
- this._read(rs.highWaterMark);
173
- }
174
- };
175
-
176
- // Doesn't matter what the args are here.
177
- // _transform does all the work.
178
- // That we got here means that the readable side wants more data.
179
- Transform.prototype._read = function(n) {
180
- var ts = this._transformState;
181
-
182
- if (ts.writechunk !== null && ts.writecb && !ts.transforming) {
183
- ts.transforming = true;
184
- this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
185
- } else {
186
- // mark that we need a transform, so that any data that comes in
187
- // will get processed, now that we've asked for it.
188
- ts.needTransform = true;
189
- }
190
- };
191
-
192
-
193
- function done(stream, er) {
194
- if (er)
195
- return stream.emit('error', er);
196
-
197
- // if there's nothing in the write buffer, then that means
198
- // that nothing more will ever be provided
199
- var ws = stream._writableState;
200
- var rs = stream._readableState;
201
- var ts = stream._transformState;
202
-
203
- if (ws.length)
204
- throw new Error('calling transform done when ws.length != 0');
205
-
206
- if (ts.transforming)
207
- throw new Error('calling transform done when still transforming');
208
-
209
- return stream.push(null);
210
- }
@@ -1,386 +0,0 @@
1
- // Copyright Joyent, Inc. and other Node contributors.
2
- //
3
- // Permission is hereby granted, free of charge, to any person obtaining a
4
- // copy of this software and associated documentation files (the
5
- // "Software"), to deal in the Software without restriction, including
6
- // without limitation the rights to use, copy, modify, merge, publish,
7
- // distribute, sublicense, and/or sell copies of the Software, and to permit
8
- // persons to whom the Software is furnished to do so, subject to the
9
- // following conditions:
10
- //
11
- // The above copyright notice and this permission notice shall be included
12
- // in all copies or substantial portions of the Software.
13
- //
14
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
17
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
21
-
22
- // A bit simpler than readable streams.
23
- // Implement an async ._write(chunk, cb), and it'll handle all
24
- // the drain event emission and buffering.
25
-
26
- module.exports = Writable;
27
-
28
- /*<replacement>*/
29
- var Buffer = require('buffer').Buffer;
30
- /*</replacement>*/
31
-
32
- Writable.WritableState = WritableState;
33
-
34
-
35
- /*<replacement>*/
36
- var util = require('core-util-is');
37
- util.inherits = require('inherits');
38
- /*</replacement>*/
39
-
40
- var Stream = require('stream');
41
-
42
- util.inherits(Writable, Stream);
43
-
44
- function WriteReq(chunk, encoding, cb) {
45
- this.chunk = chunk;
46
- this.encoding = encoding;
47
- this.callback = cb;
48
- }
49
-
50
- function WritableState(options, stream) {
51
- options = options || {};
52
-
53
- // the point at which write() starts returning false
54
- // Note: 0 is a valid value, means that we always return false if
55
- // the entire buffer is not flushed immediately on write()
56
- var hwm = options.highWaterMark;
57
- this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024;
58
-
59
- // object stream flag to indicate whether or not this stream
60
- // contains buffers or objects.
61
- this.objectMode = !!options.objectMode;
62
-
63
- // cast to ints.
64
- this.highWaterMark = ~~this.highWaterMark;
65
-
66
- this.needDrain = false;
67
- // at the start of calling end()
68
- this.ending = false;
69
- // when end() has been called, and returned
70
- this.ended = false;
71
- // when 'finish' is emitted
72
- this.finished = false;
73
-
74
- // should we decode strings into buffers before passing to _write?
75
- // this is here so that some node-core streams can optimize string
76
- // handling at a lower level.
77
- var noDecode = options.decodeStrings === false;
78
- this.decodeStrings = !noDecode;
79
-
80
- // Crypto is kind of old and crusty. Historically, its default string
81
- // encoding is 'binary' so we have to make this configurable.
82
- // Everything else in the universe uses 'utf8', though.
83
- this.defaultEncoding = options.defaultEncoding || 'utf8';
84
-
85
- // not an actual buffer we keep track of, but a measurement
86
- // of how much we're waiting to get pushed to some underlying
87
- // socket or file.
88
- this.length = 0;
89
-
90
- // a flag to see when we're in the middle of a write.
91
- this.writing = false;
92
-
93
- // a flag to be able to tell if the onwrite cb is called immediately,
94
- // or on a later tick. We set this to true at first, becuase any
95
- // actions that shouldn't happen until "later" should generally also
96
- // not happen before the first write call.
97
- this.sync = true;
98
-
99
- // a flag to know if we're processing previously buffered items, which
100
- // may call the _write() callback in the same tick, so that we don't
101
- // end up in an overlapped onwrite situation.
102
- this.bufferProcessing = false;
103
-
104
- // the callback that's passed to _write(chunk,cb)
105
- this.onwrite = function(er) {
106
- onwrite(stream, er);
107
- };
108
-
109
- // the callback that the user supplies to write(chunk,encoding,cb)
110
- this.writecb = null;
111
-
112
- // the amount that is being written when _write is called.
113
- this.writelen = 0;
114
-
115
- this.buffer = [];
116
-
117
- // True if the error was already emitted and should not be thrown again
118
- this.errorEmitted = false;
119
- }
120
-
121
- function Writable(options) {
122
- var Duplex = require('./_stream_duplex');
123
-
124
- // Writable ctor is applied to Duplexes, though they're not
125
- // instanceof Writable, they're instanceof Readable.
126
- if (!(this instanceof Writable) && !(this instanceof Duplex))
127
- return new Writable(options);
128
-
129
- this._writableState = new WritableState(options, this);
130
-
131
- // legacy.
132
- this.writable = true;
133
-
134
- Stream.call(this);
135
- }
136
-
137
- // Otherwise people can pipe Writable streams, which is just wrong.
138
- Writable.prototype.pipe = function() {
139
- this.emit('error', new Error('Cannot pipe. Not readable.'));
140
- };
141
-
142
-
143
- function writeAfterEnd(stream, state, cb) {
144
- var er = new Error('write after end');
145
- // TODO: defer error events consistently everywhere, not just the cb
146
- stream.emit('error', er);
147
- process.nextTick(function() {
148
- cb(er);
149
- });
150
- }
151
-
152
- // If we get something that is not a buffer, string, null, or undefined,
153
- // and we're not in objectMode, then that's an error.
154
- // Otherwise stream chunks are all considered to be of length=1, and the
155
- // watermarks determine how many objects to keep in the buffer, rather than
156
- // how many bytes or characters.
157
- function validChunk(stream, state, chunk, cb) {
158
- var valid = true;
159
- if (!Buffer.isBuffer(chunk) &&
160
- 'string' !== typeof chunk &&
161
- chunk !== null &&
162
- chunk !== undefined &&
163
- !state.objectMode) {
164
- var er = new TypeError('Invalid non-string/buffer chunk');
165
- stream.emit('error', er);
166
- process.nextTick(function() {
167
- cb(er);
168
- });
169
- valid = false;
170
- }
171
- return valid;
172
- }
173
-
174
- Writable.prototype.write = function(chunk, encoding, cb) {
175
- var state = this._writableState;
176
- var ret = false;
177
-
178
- if (typeof encoding === 'function') {
179
- cb = encoding;
180
- encoding = null;
181
- }
182
-
183
- if (Buffer.isBuffer(chunk))
184
- encoding = 'buffer';
185
- else if (!encoding)
186
- encoding = state.defaultEncoding;
187
-
188
- if (typeof cb !== 'function')
189
- cb = function() {};
190
-
191
- if (state.ended)
192
- writeAfterEnd(this, state, cb);
193
- else if (validChunk(this, state, chunk, cb))
194
- ret = writeOrBuffer(this, state, chunk, encoding, cb);
195
-
196
- return ret;
197
- };
198
-
199
- function decodeChunk(state, chunk, encoding) {
200
- if (!state.objectMode &&
201
- state.decodeStrings !== false &&
202
- typeof chunk === 'string') {
203
- chunk = new Buffer(chunk, encoding);
204
- }
205
- return chunk;
206
- }
207
-
208
- // if we're already writing something, then just put this
209
- // in the queue, and wait our turn. Otherwise, call _write
210
- // If we return false, then we need a drain event, so set that flag.
211
- function writeOrBuffer(stream, state, chunk, encoding, cb) {
212
- chunk = decodeChunk(state, chunk, encoding);
213
- if (Buffer.isBuffer(chunk))
214
- encoding = 'buffer';
215
- var len = state.objectMode ? 1 : chunk.length;
216
-
217
- state.length += len;
218
-
219
- var ret = state.length < state.highWaterMark;
220
- // we must ensure that previous needDrain will not be reset to false.
221
- if (!ret)
222
- state.needDrain = true;
223
-
224
- if (state.writing)
225
- state.buffer.push(new WriteReq(chunk, encoding, cb));
226
- else
227
- doWrite(stream, state, len, chunk, encoding, cb);
228
-
229
- return ret;
230
- }
231
-
232
- function doWrite(stream, state, len, chunk, encoding, cb) {
233
- state.writelen = len;
234
- state.writecb = cb;
235
- state.writing = true;
236
- state.sync = true;
237
- stream._write(chunk, encoding, state.onwrite);
238
- state.sync = false;
239
- }
240
-
241
- function onwriteError(stream, state, sync, er, cb) {
242
- if (sync)
243
- process.nextTick(function() {
244
- cb(er);
245
- });
246
- else
247
- cb(er);
248
-
249
- stream._writableState.errorEmitted = true;
250
- stream.emit('error', er);
251
- }
252
-
253
- function onwriteStateUpdate(state) {
254
- state.writing = false;
255
- state.writecb = null;
256
- state.length -= state.writelen;
257
- state.writelen = 0;
258
- }
259
-
260
- function onwrite(stream, er) {
261
- var state = stream._writableState;
262
- var sync = state.sync;
263
- var cb = state.writecb;
264
-
265
- onwriteStateUpdate(state);
266
-
267
- if (er)
268
- onwriteError(stream, state, sync, er, cb);
269
- else {
270
- // Check if we're actually ready to finish, but don't emit yet
271
- var finished = needFinish(stream, state);
272
-
273
- if (!finished && !state.bufferProcessing && state.buffer.length)
274
- clearBuffer(stream, state);
275
-
276
- if (sync) {
277
- process.nextTick(function() {
278
- afterWrite(stream, state, finished, cb);
279
- });
280
- } else {
281
- afterWrite(stream, state, finished, cb);
282
- }
283
- }
284
- }
285
-
286
- function afterWrite(stream, state, finished, cb) {
287
- if (!finished)
288
- onwriteDrain(stream, state);
289
- cb();
290
- if (finished)
291
- finishMaybe(stream, state);
292
- }
293
-
294
- // Must force callback to be called on nextTick, so that we don't
295
- // emit 'drain' before the write() consumer gets the 'false' return
296
- // value, and has a chance to attach a 'drain' listener.
297
- function onwriteDrain(stream, state) {
298
- if (state.length === 0 && state.needDrain) {
299
- state.needDrain = false;
300
- stream.emit('drain');
301
- }
302
- }
303
-
304
-
305
- // if there's something in the buffer waiting, then process it
306
- function clearBuffer(stream, state) {
307
- state.bufferProcessing = true;
308
-
309
- for (var c = 0; c < state.buffer.length; c++) {
310
- var entry = state.buffer[c];
311
- var chunk = entry.chunk;
312
- var encoding = entry.encoding;
313
- var cb = entry.callback;
314
- var len = state.objectMode ? 1 : chunk.length;
315
-
316
- doWrite(stream, state, len, chunk, encoding, cb);
317
-
318
- // if we didn't call the onwrite immediately, then
319
- // it means that we need to wait until it does.
320
- // also, that means that the chunk and cb are currently
321
- // being processed, so move the buffer counter past them.
322
- if (state.writing) {
323
- c++;
324
- break;
325
- }
326
- }
327
-
328
- state.bufferProcessing = false;
329
- if (c < state.buffer.length)
330
- state.buffer = state.buffer.slice(c);
331
- else
332
- state.buffer.length = 0;
333
- }
334
-
335
- Writable.prototype._write = function(chunk, encoding, cb) {
336
- cb(new Error('not implemented'));
337
- };
338
-
339
- Writable.prototype.end = function(chunk, encoding, cb) {
340
- var state = this._writableState;
341
-
342
- if (typeof chunk === 'function') {
343
- cb = chunk;
344
- chunk = null;
345
- encoding = null;
346
- } else if (typeof encoding === 'function') {
347
- cb = encoding;
348
- encoding = null;
349
- }
350
-
351
- if (typeof chunk !== 'undefined' && chunk !== null)
352
- this.write(chunk, encoding);
353
-
354
- // ignore unnecessary end() calls.
355
- if (!state.ending && !state.finished)
356
- endWritable(this, state, cb);
357
- };
358
-
359
-
360
- function needFinish(stream, state) {
361
- return (state.ending &&
362
- state.length === 0 &&
363
- !state.finished &&
364
- !state.writing);
365
- }
366
-
367
- function finishMaybe(stream, state) {
368
- var need = needFinish(stream, state);
369
- if (need) {
370
- state.finished = true;
371
- stream.emit('finish');
372
- }
373
- return need;
374
- }
375
-
376
- function endWritable(stream, state, cb) {
377
- state.ending = true;
378
- finishMaybe(stream, state);
379
- if (cb) {
380
- if (state.finished)
381
- process.nextTick(cb);
382
- else
383
- stream.once('finish', cb);
384
- }
385
- state.ended = true;
386
- }
@@ -1,19 +0,0 @@
1
- Copyright Node.js contributors. All rights reserved.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to
5
- deal in the Software without restriction, including without limitation the
6
- rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
- sell copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
- IN THE SOFTWARE.
@@ -1,3 +0,0 @@
1
- # core-util-is
2
-
3
- The `util.is*` functions introduced in Node v0.12.