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
@@ -11,8 +11,7 @@ var ed;
11
11
  var Key = require('./key');
12
12
  var PrivateKey = require('./private-key');
13
13
 
14
- var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined &&
15
- crypto.createECDH('prime256v1') !== undefined);
14
+ var CRYPTO_HAVE_ECDH = (crypto.createECDH !== undefined);
16
15
 
17
16
  var ecdh, ec, jsbn;
18
17
 
@@ -45,7 +45,8 @@ SSHBuffer.prototype.readBuffer = function () {
45
45
  var len = this._buffer.readUInt32BE(this._offset);
46
46
  this._offset += 4;
47
47
  assert.ok(this._offset + len <= this._buffer.length,
48
- 'length out of bounds at +0x' + this._offset.toString(16));
48
+ 'length out of bounds at +0x' + this._offset.toString(16) +
49
+ ' (data truncated?)');
49
50
  var buf = this._buffer.slice(this._offset, this._offset + len);
50
51
  this._offset += len;
51
52
  return (buf);
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "_from": "sshpk@^1.7.0",
3
- "_id": "sshpk@1.7.0",
3
+ "_id": "sshpk@1.7.2",
4
4
  "_location": "/sshpk",
5
- "_nodeVersion": "0.12.7",
5
+ "_nodeVersion": "0.12.9",
6
6
  "_npmUser": {
7
7
  "email": "alex@cooperi.net",
8
8
  "name": "arekinath"
9
9
  },
10
- "_npmVersion": "2.14.4",
10
+ "_npmVersion": "2.14.9",
11
11
  "_phantomChildren": {},
12
12
  "_requiredBy": [
13
13
  "/http-signature"
14
14
  ],
15
- "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.7.0.tgz",
16
- "_shasum": "c64ac26de1bdd19cc9ccbe78ba747292c6c70a7c",
15
+ "_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.7.2.tgz",
16
+ "_shasum": "e5eb43d0662bd201037327edb8b8f64656aca842",
17
17
  "author": {
18
18
  "name": "Joyent, Inc"
19
19
  },
@@ -50,20 +50,21 @@
50
50
  "devDependencies": {
51
51
  "benchmark": ">=1.0.0 <2.0.0",
52
52
  "sinon": ">=1.17.2 <2.0.0",
53
- "tape": ">=3.5.0 <4.0.0"
53
+ "tape": ">=3.5.0 <4.0.0",
54
+ "temp": "0.8.2"
54
55
  },
55
56
  "directories": {
56
57
  "bin": "./bin",
57
58
  "lib": "./lib"
58
59
  },
59
60
  "dist": {
60
- "shasum": "c64ac26de1bdd19cc9ccbe78ba747292c6c70a7c",
61
- "tarball": "http://registry.npmjs.org/sshpk/-/sshpk-1.7.0.tgz"
61
+ "shasum": "e5eb43d0662bd201037327edb8b8f64656aca842",
62
+ "tarball": "http://registry.npmjs.org/sshpk/-/sshpk-1.7.2.tgz"
62
63
  },
63
64
  "engines": {
64
65
  "node": ">=0.8.0"
65
66
  },
66
- "gitHead": "d268fc9a5442727dfb975a0c609f7419bc4d7057",
67
+ "gitHead": "f82457a5eca419cc3e6a2650e79b3414c47ea3bd",
67
68
  "homepage": "https://github.com/arekinath/node-sshpk#readme",
68
69
  "license": "MIT",
69
70
  "main": "lib/index.js",
@@ -80,7 +81,8 @@
80
81
  "jsbn": ">=0.1.0 <0.2.0",
81
82
  "tweetnacl": ">=0.13.0 <1.0.0"
82
83
  },
83
- "readme": "ERROR: No README data found!",
84
+ "readme": "sshpk\n=========\n\nParse, convert, fingerprint and use SSH keys (both public and private) in pure\nnode -- no `ssh-keygen` or other external dependencies.\n\nSupports RSA, DSA, ECDSA (nistp-\\*) and ED25519 key types, in PEM (PKCS#1, \nPKCS#8) and OpenSSH formats.\n\nThis library has been extracted from\n[`node-http-signature`](https://github.com/joyent/node-http-signature)\n(work by [Mark Cavage](https://github.com/mcavage) and\n[Dave Eddy](https://github.com/bahamas10)) and\n[`node-ssh-fingerprint`](https://github.com/bahamas10/node-ssh-fingerprint)\n(work by Dave Eddy), with additions (including ECDSA support) by\n[Alex Wilson](https://github.com/arekinath).\n\nInstall\n-------\n\n```\nnpm install sshpk\n```\n\nExamples\n--------\n\n```js\nvar sshpk = require('sshpk');\n\nvar fs = require('fs');\n\n/* Read in an OpenSSH-format public key */\nvar keyPub = fs.readFileSync('id_rsa.pub');\nvar key = sshpk.parseKey(keyPub, 'ssh');\n\n/* Get metadata about the key */\nconsole.log('type => %s', key.type);\nconsole.log('size => %d bits', key.size);\nconsole.log('comment => %s', key.comment);\n\n/* Compute key fingerprints, in new OpenSSH (>6.7) format, and old MD5 */\nconsole.log('fingerprint => %s', key.fingerprint().toString());\nconsole.log('old-style fingerprint => %s', key.fingerprint('md5').toString());\n```\n\nExample output:\n\n```\ntype => rsa\nsize => 2048 bits\ncomment => foo@foo.com\nfingerprint => SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w\nold-style fingerprint => a0:c8:ad:6c:32:9a:32:fa:59:cc:a9:8c:0a:0d:6e:bd\n```\n\nMore examples: converting between formats:\n\n```js\n/* Read in a PEM public key */\nvar keyPem = fs.readFileSync('id_rsa.pem');\nvar key = sshpk.parseKey(keyPem, 'pem');\n\n/* Convert to PEM PKCS#8 public key format */\nvar pemBuf = key.toBuffer('pkcs8');\n\n/* Convert to SSH public key format (and return as a string) */\nvar sshKey = key.toString('ssh');\n```\n\nSigning and verifying:\n\n```js\n/* Read in an OpenSSH/PEM *private* key */\nvar keyPriv = fs.readFileSync('id_ecdsa');\nvar key = sshpk.parsePrivateKey(keyPriv, 'pem');\n\nvar data = 'some data';\n\n/* Sign some data with the key */\nvar s = key.createSign('sha1');\ns.update(data);\nvar signature = s.sign();\n\n/* Now load the public key (could also use just key.toPublic()) */\nvar keyPub = fs.readFileSync('id_ecdsa.pub');\nkey = sshpk.parseKey(keyPub, 'ssh');\n\n/* Make a crypto.Verifier with this key */\nvar v = key.createVerify('sha1');\nv.update(data);\nvar valid = v.verify(signature);\n/* => true! */\n```\n\nMatching fingerprints with keys:\n\n```js\nvar fp = sshpk.parseFingerprint('SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w');\n\nvar keys = [sshpk.parseKey(...), sshpk.parseKey(...), ...];\n\nkeys.forEach(function (key) {\n\tif (fp.matches(key))\n\t\tconsole.log('found it!');\n});\n```\n\nUsage\n-----\n\n## Public keys\n\n### `parseKey(data[, format = 'auto'[, name]])`\n\nParses a key from a given data format and returns a new `Key` object.\n\nParameters\n\n- `data` -- Either a Buffer or String, containing the key\n- `format` -- String name of format to use, valid options are:\n - `auto`: choose automatically from all below\n - `pem`: supports both PKCS#1 and PKCS#8\n - `ssh`: standard OpenSSH format,\n - `pkcs1`, `pkcs8`: variants of `pem`\n - `rfc4253`: raw OpenSSH wire format\n - `openssh`: new post-OpenSSH 6.5 internal format, produced by \n `ssh-keygen -o`\n- `name` -- Optional name for the key being parsed (eg. the filename that\n was opened). Used to generate Error messages\n\n### `Key.isKey(obj)`\n\nReturns `true` if the given object is a valid `Key` object created by a version\nof `sshpk` compatible with this one.\n\nParameters\n\n- `obj` -- Object to identify\n\n### `Key#type`\n\nString, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`.\n\n### `Key#size`\n\nInteger, \"size\" of the key in bits. For RSA/DSA this is the size of the modulus;\nfor ECDSA this is the bit size of the curve in use.\n\n### `Key#comment`\n\nOptional string, a key comment used by some formats (eg the `ssh` format).\n\n### `Key#curve`\n\nOnly present if `this.type === 'ecdsa'`, string containing the name of the\nnamed curve used with this key. Possible values include `nistp256`, `nistp384`\nand `nistp521`.\n\n### `Key#toBuffer([format = 'ssh'])`\n\nConvert the key into a given data format and return the serialized key as\na Buffer.\n\nParameters\n\n- `format` -- String name of format to use, for valid options see `parseKey()`\n\n### `Key#toString([format = 'ssh])`\n\nSame as `this.toBuffer(format).toString()`.\n\n### `Key#fingerprint([algorithm = 'sha256'])`\n\nCreates a new `Fingerprint` object representing this Key's fingerprint.\n\nParameters\n\n- `algorithm` -- String name of hash algorithm to use, valid options are `md5`,\n `sha1`, `sha256`, `sha384`, `sha512`\n\n### `Key#createVerify([hashAlgorithm])`\n\nCreates a `crypto.Verifier` specialized to use this Key (and the correct public\nkey algorithm to match it). The returned Verifier has the same API as a regular\none, except that the `verify()` function takes only the target signature as an\nargument.\n\nParameters\n\n- `hashAlgorithm` -- optional String name of hash algorithm to use, any\n supported by OpenSSL are valid, usually including\n `sha1`, `sha256`.\n\n`v.verify(signature[, format])` Parameters\n\n- `signature` -- either a Signature object, or a Buffer or String\n- `format` -- optional String, name of format to interpret given String with.\n Not valid if `signature` is a Signature or Buffer.\n\n### `Key#createDiffieHellman()`\n### `Key#createDH()`\n\nCreates a Diffie-Hellman key exchange object initialized with this key and all\nnecessary parameters. This has the same API as a `crypto.DiffieHellman`\ninstance, except that functions take `Key` and `PrivateKey` objects as\narguments, and return them where indicated for.\n\nThis is only valid for keys belonging to a cryptosystem that supports DHE\nor a close analogue (i.e. `dsa`, `ecdsa` and `curve25519` keys). An attempt\nto call this function on other keys will yield an `Error`.\n\n## Private keys\n\n### `parsePrivateKey(data[, format = 'auto'[, name]])`\n\nParses a private key from a given data format and returns a new\n`PrivateKey` object.\n\nParameters\n\n- `data` -- Either a Buffer or String, containing the key\n- `format` -- String name of format to use, valid options are:\n - `auto`: choose automatically from all below\n - `pem`: supports both PKCS#1 and PKCS#8\n - `ssh`, `openssh`: new post-OpenSSH 6.5 internal format, produced by \n `ssh-keygen -o`\n - `pkcs1`, `pkcs8`: variants of `pem`\n - `rfc4253`: raw OpenSSH wire format\n- `name` -- Optional name for the key being parsed (eg. the filename that\n was opened). Used to generate Error messages\n\n### `PrivateKey.isPrivateKey(obj)`\n\nReturns `true` if the given object is a valid `PrivateKey` object created by a\nversion of `sshpk` compatible with this one.\n\nParameters\n\n- `obj` -- Object to identify\n\n### `PrivateKey#type`\n\nString, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`.\n\n### `PrivateKey#size`\n\nInteger, \"size\" of the key in bits. For RSA/DSA this is the size of the modulus;\nfor ECDSA this is the bit size of the curve in use.\n\n### `PrivateKey#curve`\n\nOnly present if `this.type === 'ecdsa'`, string containing the name of the\nnamed curve used with this key. Possible values include `nistp256`, `nistp384`\nand `nistp521`.\n\n### `PrivateKey#toBuffer([format = 'pkcs1'])`\n\nConvert the key into a given data format and return the serialized key as\na Buffer.\n\nParameters\n\n- `format` -- String name of format to use, valid options are listed under \n `parsePrivateKey`. Note that ED25519 keys default to `openssh`\n format instead (as they have no `pkcs1` representation).\n\n### `PrivateKey#toString([format = 'pkcs1'])`\n\nSame as `this.toBuffer(format).toString()`.\n\n### `PrivateKey#toPublic()`\n\nExtract just the public part of this private key, and return it as a `Key`\nobject.\n\n### `PrivateKey#fingerprint([algorithm = 'sha256'])`\n\nSame as `this.toPublic().fingerprint()`.\n\n### `PrivateKey#createVerify([hashAlgorithm])`\n\nSame as `this.toPublic().createVerify()`.\n\n### `PrivateKey#createSign([hashAlgorithm])`\n\nCreates a `crypto.Sign` specialized to use this PrivateKey (and the correct\nkey algorithm to match it). The returned Signer has the same API as a regular\none, except that the `sign()` function takes no arguments, and returns a\n`Signature` object.\n\nParameters\n\n- `hashAlgorithm` -- optional String name of hash algorithm to use, any\n supported by OpenSSL are valid, usually including\n `sha1`, `sha256`.\n\n`v.sign()` Parameters\n\n- none\n\n### `PrivateKey#derive(newType)`\n\nDerives a related key of type `newType` from this key. Currently this is\nonly supported to change between `ed25519` and `curve25519` keys which are\nstored with the same private key (but usually distinct public keys in order\nto avoid degenerate keys that lead to a weak Diffie-Hellman exchange).\n\nParameters\n\n- `newType` -- String, type of key to derive, either `ed25519` or `curve25519`\n\n## Fingerprints\n\n### `parseFingerprint(fingerprint[, algorithms])`\n\nPre-parses a fingerprint, creating a `Fingerprint` object that can be used to\nquickly locate a key by using the `Fingerprint#matches` function.\n\nParameters\n\n- `fingerprint` -- String, the fingerprint value, in any supported format\n- `algorithms` -- Optional list of strings, names of hash algorithms to limit\n support to. If `fingerprint` uses a hash algorithm not on\n this list, throws `InvalidAlgorithmError`.\n\n### `Fingerprint.isFingerprint(obj)`\n\nReturns `true` if the given object is a valid `Fingerprint` object created by a\nversion of `sshpk` compatible with this one.\n\nParameters\n\n- `obj` -- Object to identify\n\n### `Fingerprint#toString([format])`\n\nReturns a fingerprint as a string, in the given format.\n\nParameters\n\n- `format` -- Optional String, format to use, valid options are `hex` and\n `base64`. If this `Fingerprint` uses the `md5` algorithm, the\n default format is `hex`. Otherwise, the default is `base64`.\n\n### `Fingerprint#matches(key)`\n\nVerifies whether or not this `Fingerprint` matches a given `Key`. This function\nuses double-hashing to avoid leaking timing information. Returns a boolean.\n\nParameters\n\n- `key` -- a `Key` object, the key to match this fingerprint against\n\n## Signatures\n\n### `parseSignature(signature, algorithm, format)`\n\nParses a signature in a given format, creating a `Signature` object. Useful\nfor converting between the SSH and ASN.1 (PKCS/OpenSSL) signature formats, and\nalso returned as output from `PrivateKey#createSign().sign()`.\n\nA Signature object can also be passed to a verifier produced by\n`Key#createVerify()` and it will automatically be converted internally into the\ncorrect format for verification.\n\nParameters\n\n- `signature` -- a Buffer (binary) or String (base64), data of the actual\n signature in the given format\n- `algorithm` -- a String, name of the algorithm to be used, possible values\n are `rsa`, `dsa`, `ecdsa`\n- `format` -- a String, either `asn1` or `ssh`\n\n### `Signature.isSignature(obj)`\n\nReturns `true` if the given object is a valid `Signature` object created by a\nversion of `sshpk` compatible with this one.\n\nParameters\n\n- `obj` -- Object to identify\n\n### `Signature#toBuffer([format = 'asn1'])`\n\nConverts a Signature to the given format and returns it as a Buffer.\n\nParameters\n\n- `format` -- a String, either `asn1` or `ssh`\n\n### `Signature#toString([format = 'asn1'])`\n\nSame as `this.toBuffer(format).toString('base64')`.\n\nErrors\n------\n\n### `InvalidAlgorithmError`\n\nThe specified algorithm is not valid, either because it is not supported, or\nbecause it was not included on a list of allowed algorithms.\n\nThrown by `Fingerprint.parse`, `Key#fingerprint`.\n\nProperties\n\n- `algorithm` -- the algorithm that could not be validated\n\n### `FingerprintFormatError`\n\nThe fingerprint string given could not be parsed as a supported fingerprint\nformat, or the specified fingerprint format is invalid.\n\nThrown by `Fingerprint.parse`, `Fingerprint#toString`.\n\nProperties\n\n- `fingerprint` -- if caused by a fingerprint, the string value given\n- `format` -- if caused by an invalid format specification, the string value given\n\n### `KeyParseError`\n\nThe key data given could not be parsed as a valid key.\n\nProperties\n\n- `keyName` -- `name` that was given to `Key#parse`\n- `format` -- the `format` that was trying to parse the key\n- `innerErr` -- the inner Error thrown by the format parser\n\nFriends of sshpk\n----------------\n\n * [`sshpk-agent`](https://github.com/arekinath/node-sshpk-agent) is a library\n for speaking the `ssh-agent` protocol from node.js, which uses `sshpk`\n",
85
+ "readmeFilename": "README.md",
84
86
  "repository": {
85
87
  "type": "git",
86
88
  "url": "git+https://github.com/arekinath/node-sshpk.git"
@@ -88,5 +90,5 @@
88
90
  "scripts": {
89
91
  "test": "tape test/*.js"
90
92
  },
91
- "version": "1.7.0"
93
+ "version": "1.7.2"
92
94
  }
@@ -9,7 +9,8 @@
9
9
  "_npmVersion": "1.4.23",
10
10
  "_phantomChildren": {},
11
11
  "_requiredBy": [
12
- "/readable-stream"
12
+ "/readable-stream",
13
+ "/tar-pack/readable-stream"
13
14
  ],
14
15
  "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
15
16
  "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94",
@@ -11,7 +11,6 @@ var packer = require('fstream-ignore')
11
11
  var PassThrough = require('stream').PassThrough || require('readable-stream').PassThrough
12
12
  var zlib = require('zlib')
13
13
  var path = require('path')
14
- var fs = require('graceful-fs')
15
14
 
16
15
  var win32 = process.platform === 'win32'
17
16
  var myUid = process.getuid && process.getuid()
@@ -238,4 +237,4 @@ function type(stream, callback) {
238
237
  stream.removeListener('error', handle)
239
238
  stream.unshift(chunk)
240
239
  }
241
- }
240
+ }
@@ -1,23 +1,15 @@
1
- Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
2
- All rights reserved.
1
+ The ISC License
3
2
 
4
- Permission is hereby granted, free of charge, to any person
5
- obtaining a copy of this software and associated documentation
6
- files (the "Software"), to deal in the Software without
7
- restriction, including without limitation the rights to use,
8
- copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the
10
- Software is furnished to do so, subject to the following
11
- conditions:
3
+ Copyright (c) Isaac Z. Schlueter and Contributors
12
4
 
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
15
8
 
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18
- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20
- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21
- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23
- OTHER DEALINGS IN THE SOFTWARE.
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
15
+ IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -1,18 +1,31 @@
1
- `rm -rf` for node.
1
+ [![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)
2
+
3
+ The [UNIX command](http://en.wikipedia.org/wiki/Rm_(Unix)) `rm -rf` for node.
2
4
 
3
5
  Install with `npm install rimraf`, or just drop rimraf.js somewhere.
4
6
 
5
7
  ## API
6
8
 
7
- `rimraf(f, callback)`
9
+ `rimraf(f, [opts], callback)`
10
+
11
+ The first parameter will be interpreted as a globbing pattern for files. If you
12
+ want to disable globbing you can do so with `opts.disableGlob` (defaults to
13
+ `false`). This might be handy, for instance, if you have filenames that contain
14
+ globbing wildcard characters.
8
15
 
9
16
  The callback will be called with an error if there is one. Certain
10
17
  errors are handled for you:
11
18
 
12
19
  * Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of
13
- `opts.maxBusyTries` times before giving up.
20
+ `opts.maxBusyTries` times before giving up, adding 100ms of wait
21
+ between each attempt. The default `maxBusyTries` is 3.
14
22
  * `ENOENT` - If the file doesn't exist, rimraf will return
15
23
  successfully, since your desired outcome is already the case.
24
+ * `EMFILE` - Since `readdir` requires opening a file descriptor, it's
25
+ possible to hit `EMFILE` if too many file descriptors are in use.
26
+ In the sync case, there's nothing to be done for this. But in the
27
+ async case, rimraf will gradually back off with timeouts up to
28
+ `opts.emfileWait` ms, which defaults to 1000.
16
29
 
17
30
  ## rimraf.sync
18
31
 
@@ -22,7 +35,7 @@ the async API. It's better.
22
35
  ## CLI
23
36
 
24
37
  If installed with `npm install rimraf -g` it can be used as a global
25
- command `rimraf <path>` which is useful for cross platform support.
38
+ command `rimraf <path> [<path> ...]` which is useful for cross platform support.
26
39
 
27
40
  ## mkdirp
28
41
 
@@ -18,7 +18,7 @@ var args = process.argv.slice(2).filter(function(arg) {
18
18
  if (help || args.length === 0) {
19
19
  // If they didn't ask for help, then this is not a "success"
20
20
  var log = help ? console.log : console.error
21
- log('Usage: rimraf <path>')
21
+ log('Usage: rimraf <path> [<path> ...]')
22
22
  log('')
23
23
  log(' Deletes all files and folders at "path" recursively.')
24
24
  log('')
@@ -26,8 +26,15 @@ if (help || args.length === 0) {
26
26
  log('')
27
27
  log(' -h, --help Display this usage info')
28
28
  process.exit(help ? 0 : 1)
29
- } else {
30
- args.forEach(function(arg) {
31
- rimraf.sync(arg)
29
+ } else
30
+ go(0)
31
+
32
+ function go (n) {
33
+ if (n >= args.length)
34
+ return
35
+ rimraf(args[n], function (er) {
36
+ if (er)
37
+ throw er
38
+ go(n+1)
32
39
  })
33
40
  }
@@ -0,0 +1,359 @@
1
+ [![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies)
2
+
3
+ # Glob
4
+
5
+ Match files using the patterns the shell uses, like stars and stuff.
6
+
7
+ This is a glob implementation in JavaScript. It uses the `minimatch`
8
+ library to do its matching.
9
+
10
+ ![](oh-my-glob.gif)
11
+
12
+ ## Usage
13
+
14
+ ```javascript
15
+ var glob = require("glob")
16
+
17
+ // options is optional
18
+ glob("**/*.js", options, function (er, files) {
19
+ // files is an array of filenames.
20
+ // If the `nonull` option is set, and nothing
21
+ // was found, then files is ["**/*.js"]
22
+ // er is an error object or null.
23
+ })
24
+ ```
25
+
26
+ ## Glob Primer
27
+
28
+ "Globs" are the patterns you type when you do stuff like `ls *.js` on
29
+ the command line, or put `build/*` in a `.gitignore` file.
30
+
31
+ Before parsing the path part patterns, braced sections are expanded
32
+ into a set. Braced sections start with `{` and end with `}`, with any
33
+ number of comma-delimited sections within. Braced sections may contain
34
+ slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`.
35
+
36
+ The following characters have special magic meaning when used in a
37
+ path portion:
38
+
39
+ * `*` Matches 0 or more characters in a single path portion
40
+ * `?` Matches 1 character
41
+ * `[...]` Matches a range of characters, similar to a RegExp range.
42
+ If the first character of the range is `!` or `^` then it matches
43
+ any character not in the range.
44
+ * `!(pattern|pattern|pattern)` Matches anything that does not match
45
+ any of the patterns provided.
46
+ * `?(pattern|pattern|pattern)` Matches zero or one occurrence of the
47
+ patterns provided.
48
+ * `+(pattern|pattern|pattern)` Matches one or more occurrences of the
49
+ patterns provided.
50
+ * `*(a|b|c)` Matches zero or more occurrences of the patterns provided
51
+ * `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns
52
+ provided
53
+ * `**` If a "globstar" is alone in a path portion, then it matches
54
+ zero or more directories and subdirectories searching for matches.
55
+ It does not crawl symlinked directories.
56
+
57
+ ### Dots
58
+
59
+ If a file or directory path portion has a `.` as the first character,
60
+ then it will not match any glob pattern unless that pattern's
61
+ corresponding path part also has a `.` as its first character.
62
+
63
+ For example, the pattern `a/.*/c` would match the file at `a/.b/c`.
64
+ However the pattern `a/*/c` would not, because `*` does not start with
65
+ a dot character.
66
+
67
+ You can make glob treat dots as normal characters by setting
68
+ `dot:true` in the options.
69
+
70
+ ### Basename Matching
71
+
72
+ If you set `matchBase:true` in the options, and the pattern has no
73
+ slashes in it, then it will seek for any file anywhere in the tree
74
+ with a matching basename. For example, `*.js` would match
75
+ `test/simple/basic.js`.
76
+
77
+ ### Empty Sets
78
+
79
+ If no matching files are found, then an empty array is returned. This
80
+ differs from the shell, where the pattern itself is returned. For
81
+ example:
82
+
83
+ $ echo a*s*d*f
84
+ a*s*d*f
85
+
86
+ To get the bash-style behavior, set the `nonull:true` in the options.
87
+
88
+ ### See Also:
89
+
90
+ * `man sh`
91
+ * `man bash` (Search for "Pattern Matching")
92
+ * `man 3 fnmatch`
93
+ * `man 5 gitignore`
94
+ * [minimatch documentation](https://github.com/isaacs/minimatch)
95
+
96
+ ## glob.hasMagic(pattern, [options])
97
+
98
+ Returns `true` if there are any special characters in the pattern, and
99
+ `false` otherwise.
100
+
101
+ Note that the options affect the results. If `noext:true` is set in
102
+ the options object, then `+(a|b)` will not be considered a magic
103
+ pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}`
104
+ then that is considered magical, unless `nobrace:true` is set in the
105
+ options.
106
+
107
+ ## glob(pattern, [options], cb)
108
+
109
+ * `pattern` `{String}` Pattern to be matched
110
+ * `options` `{Object}`
111
+ * `cb` `{Function}`
112
+ * `err` `{Error | null}`
113
+ * `matches` `{Array<String>}` filenames found matching the pattern
114
+
115
+ Perform an asynchronous glob search.
116
+
117
+ ## glob.sync(pattern, [options])
118
+
119
+ * `pattern` `{String}` Pattern to be matched
120
+ * `options` `{Object}`
121
+ * return: `{Array<String>}` filenames found matching the pattern
122
+
123
+ Perform a synchronous glob search.
124
+
125
+ ## Class: glob.Glob
126
+
127
+ Create a Glob object by instantiating the `glob.Glob` class.
128
+
129
+ ```javascript
130
+ var Glob = require("glob").Glob
131
+ var mg = new Glob(pattern, options, cb)
132
+ ```
133
+
134
+ It's an EventEmitter, and starts walking the filesystem to find matches
135
+ immediately.
136
+
137
+ ### new glob.Glob(pattern, [options], [cb])
138
+
139
+ * `pattern` `{String}` pattern to search for
140
+ * `options` `{Object}`
141
+ * `cb` `{Function}` Called when an error occurs, or matches are found
142
+ * `err` `{Error | null}`
143
+ * `matches` `{Array<String>}` filenames found matching the pattern
144
+
145
+ Note that if the `sync` flag is set in the options, then matches will
146
+ be immediately available on the `g.found` member.
147
+
148
+ ### Properties
149
+
150
+ * `minimatch` The minimatch object that the glob uses.
151
+ * `options` The options object passed in.
152
+ * `aborted` Boolean which is set to true when calling `abort()`. There
153
+ is no way at this time to continue a glob search after aborting, but
154
+ you can re-use the statCache to avoid having to duplicate syscalls.
155
+ * `cache` Convenience object. Each field has the following possible
156
+ values:
157
+ * `false` - Path does not exist
158
+ * `true` - Path exists
159
+ * `'FILE'` - Path exists, and is not a directory
160
+ * `'DIR'` - Path exists, and is a directory
161
+ * `[file, entries, ...]` - Path exists, is a directory, and the
162
+ array value is the results of `fs.readdir`
163
+ * `statCache` Cache of `fs.stat` results, to prevent statting the same
164
+ path multiple times.
165
+ * `symlinks` A record of which paths are symbolic links, which is
166
+ relevant in resolving `**` patterns.
167
+ * `realpathCache` An optional object which is passed to `fs.realpath`
168
+ to minimize unnecessary syscalls. It is stored on the instantiated
169
+ Glob object, and may be re-used.
170
+
171
+ ### Events
172
+
173
+ * `end` When the matching is finished, this is emitted with all the
174
+ matches found. If the `nonull` option is set, and no match was found,
175
+ then the `matches` list contains the original pattern. The matches
176
+ are sorted, unless the `nosort` flag is set.
177
+ * `match` Every time a match is found, this is emitted with the specific
178
+ thing that matched. It is not deduplicated or resolved to a realpath.
179
+ * `error` Emitted when an unexpected error is encountered, or whenever
180
+ any fs error occurs if `options.strict` is set.
181
+ * `abort` When `abort()` is called, this event is raised.
182
+
183
+ ### Methods
184
+
185
+ * `pause` Temporarily stop the search
186
+ * `resume` Resume the search
187
+ * `abort` Stop the search forever
188
+
189
+ ### Options
190
+
191
+ All the options that can be passed to Minimatch can also be passed to
192
+ Glob to change pattern matching behavior. Also, some have been added,
193
+ or have glob-specific ramifications.
194
+
195
+ All options are false by default, unless otherwise noted.
196
+
197
+ All options are added to the Glob object, as well.
198
+
199
+ If you are running many `glob` operations, you can pass a Glob object
200
+ as the `options` argument to a subsequent operation to shortcut some
201
+ `stat` and `readdir` calls. At the very least, you may pass in shared
202
+ `symlinks`, `statCache`, `realpathCache`, and `cache` options, so that
203
+ parallel glob operations will be sped up by sharing information about
204
+ the filesystem.
205
+
206
+ * `cwd` The current working directory in which to search. Defaults
207
+ to `process.cwd()`.
208
+ * `root` The place where patterns starting with `/` will be mounted
209
+ onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix
210
+ systems, and `C:\` or some such on Windows.)
211
+ * `dot` Include `.dot` files in normal matches and `globstar` matches.
212
+ Note that an explicit dot in a portion of the pattern will always
213
+ match dot files.
214
+ * `nomount` By default, a pattern starting with a forward-slash will be
215
+ "mounted" onto the root setting, so that a valid filesystem path is
216
+ returned. Set this flag to disable that behavior.
217
+ * `mark` Add a `/` character to directory matches. Note that this
218
+ requires additional stat calls.
219
+ * `nosort` Don't sort the results.
220
+ * `stat` Set to true to stat *all* results. This reduces performance
221
+ somewhat, and is completely unnecessary, unless `readdir` is presumed
222
+ to be an untrustworthy indicator of file existence.
223
+ * `silent` When an unusual error is encountered when attempting to
224
+ read a directory, a warning will be printed to stderr. Set the
225
+ `silent` option to true to suppress these warnings.
226
+ * `strict` When an unusual error is encountered when attempting to
227
+ read a directory, the process will just continue on in search of
228
+ other matches. Set the `strict` option to raise an error in these
229
+ cases.
230
+ * `cache` See `cache` property above. Pass in a previously generated
231
+ cache object to save some fs calls.
232
+ * `statCache` A cache of results of filesystem information, to prevent
233
+ unnecessary stat calls. While it should not normally be necessary
234
+ to set this, you may pass the statCache from one glob() call to the
235
+ options object of another, if you know that the filesystem will not
236
+ change between calls. (See "Race Conditions" below.)
237
+ * `symlinks` A cache of known symbolic links. You may pass in a
238
+ previously generated `symlinks` object to save `lstat` calls when
239
+ resolving `**` matches.
240
+ * `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead.
241
+ * `nounique` In some cases, brace-expanded patterns can result in the
242
+ same file showing up multiple times in the result set. By default,
243
+ this implementation prevents duplicates in the result set. Set this
244
+ flag to disable that behavior.
245
+ * `nonull` Set to never return an empty set, instead returning a set
246
+ containing the pattern itself. This is the default in glob(3).
247
+ * `debug` Set to enable debug logging in minimatch and glob.
248
+ * `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets.
249
+ * `noglobstar` Do not match `**` against multiple filenames. (Ie,
250
+ treat it as a normal `*` instead.)
251
+ * `noext` Do not match `+(a|b)` "extglob" patterns.
252
+ * `nocase` Perform a case-insensitive match. Note: on
253
+ case-insensitive filesystems, non-magic patterns will match by
254
+ default, since `stat` and `readdir` will not raise errors.
255
+ * `matchBase` Perform a basename-only match if the pattern does not
256
+ contain any slash characters. That is, `*.js` would be treated as
257
+ equivalent to `**/*.js`, matching all js files in all directories.
258
+ * `nodir` Do not match directories, only files. (Note: to match
259
+ *only* directories, simply put a `/` at the end of the pattern.)
260
+ * `ignore` Add a pattern or an array of glob patterns to exclude matches.
261
+ Note: `ignore` patterns are *always* in `dot:true` mode, regardless
262
+ of any other settings.
263
+ * `follow` Follow symlinked directories when expanding `**` patterns.
264
+ Note that this can result in a lot of duplicate references in the
265
+ presence of cyclic links.
266
+ * `realpath` Set to true to call `fs.realpath` on all of the results.
267
+ In the case of a symlink that cannot be resolved, the full absolute
268
+ path to the matched entry is returned (though it will usually be a
269
+ broken symlink)
270
+
271
+ ## Comparisons to other fnmatch/glob implementations
272
+
273
+ While strict compliance with the existing standards is a worthwhile
274
+ goal, some discrepancies exist between node-glob and other
275
+ implementations, and are intentional.
276
+
277
+ The double-star character `**` is supported by default, unless the
278
+ `noglobstar` flag is set. This is supported in the manner of bsdglob
279
+ and bash 4.3, where `**` only has special significance if it is the only
280
+ thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but
281
+ `a/**b` will not.
282
+
283
+ Note that symlinked directories are not crawled as part of a `**`,
284
+ though their contents may match against subsequent portions of the
285
+ pattern. This prevents infinite loops and duplicates and the like.
286
+
287
+ If an escaped pattern has no matches, and the `nonull` flag is set,
288
+ then glob returns the pattern as-provided, rather than
289
+ interpreting the character escapes. For example,
290
+ `glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than
291
+ `"*a?"`. This is akin to setting the `nullglob` option in bash, except
292
+ that it does not resolve escaped pattern characters.
293
+
294
+ If brace expansion is not disabled, then it is performed before any
295
+ other interpretation of the glob pattern. Thus, a pattern like
296
+ `+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded
297
+ **first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are
298
+ checked for validity. Since those two are valid, matching proceeds.
299
+
300
+ ### Comments and Negation
301
+
302
+ Previously, this module let you mark a pattern as a "comment" if it
303
+ started with a `#` character, or a "negated" pattern if it started
304
+ with a `!` character.
305
+
306
+ These options were deprecated in version 5, and removed in version 6.
307
+
308
+ To specify things that should not match, use the `ignore` option.
309
+
310
+ ## Windows
311
+
312
+ **Please only use forward-slashes in glob expressions.**
313
+
314
+ Though windows uses either `/` or `\` as its path separator, only `/`
315
+ characters are used by this glob implementation. You must use
316
+ forward-slashes **only** in glob expressions. Back-slashes will always
317
+ be interpreted as escape characters, not path separators.
318
+
319
+ Results from absolute patterns such as `/foo/*` are mounted onto the
320
+ root setting using `path.join`. On windows, this will by default result
321
+ in `/foo/*` matching `C:\foo\bar.txt`.
322
+
323
+ ## Race Conditions
324
+
325
+ Glob searching, by its very nature, is susceptible to race conditions,
326
+ since it relies on directory walking and such.
327
+
328
+ As a result, it is possible that a file that exists when glob looks for
329
+ it may have been deleted or modified by the time it returns the result.
330
+
331
+ As part of its internal implementation, this program caches all stat
332
+ and readdir calls that it makes, in order to cut down on system
333
+ overhead. However, this also makes it even more susceptible to races,
334
+ especially if the cache or statCache objects are reused between glob
335
+ calls.
336
+
337
+ Users are thus advised not to use a glob result as a guarantee of
338
+ filesystem state in the face of rapid changes. For the vast majority
339
+ of operations, this is never a problem.
340
+
341
+ ## Contributing
342
+
343
+ Any change to behavior (including bugfixes) must come with a test.
344
+
345
+ Patches that fail tests or reduce performance will be rejected.
346
+
347
+ ```
348
+ # to run tests
349
+ npm test
350
+
351
+ # to re-generate test fixtures
352
+ npm run test-regen
353
+
354
+ # to benchmark against bash/zsh
355
+ npm run bench
356
+
357
+ # to profile javascript
358
+ npm run prof
359
+ ```