fsevents 1.0.5 → 1.0.6

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 (360) hide show
  1. package/Readme.md +12 -13
  2. package/node_modules/ansi/package.json +1 -2
  3. package/node_modules/are-we-there-yet/package.json +1 -2
  4. package/node_modules/asn1/.travis.yml +4 -0
  5. package/node_modules/asn1/lib/ber/reader.js +27 -33
  6. package/node_modules/asn1/lib/ber/writer.js +10 -11
  7. package/node_modules/asn1/package.json +21 -19
  8. package/node_modules/asn1/tst/ber/reader.test.js +36 -0
  9. package/node_modules/asn1/tst/ber/writer.test.js +74 -0
  10. package/node_modules/assert-plus/package.json +1 -0
  11. package/node_modules/{ctype → bl/node_modules/readable-stream/node_modules/core-util-is}/LICENSE +1 -6
  12. package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +11 -11
  13. package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json +17 -12
  14. package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js +68 -0
  15. package/node_modules/boom/package.json +1 -1
  16. package/node_modules/commander/package.json +1 -1
  17. package/node_modules/core-util-is/LICENSE +19 -0
  18. package/node_modules/core-util-is/lib/util.js +11 -11
  19. package/node_modules/core-util-is/package.json +17 -12
  20. package/node_modules/core-util-is/test.js +68 -0
  21. package/node_modules/dashdash/README.md +508 -0
  22. package/node_modules/dashdash/lib/dashdash.js +813 -0
  23. package/node_modules/dashdash/package.json +87 -0
  24. package/node_modules/deep-extend/LICENSE +1 -1
  25. package/node_modules/deep-extend/README.md +89 -52
  26. package/node_modules/deep-extend/index.js +1 -90
  27. package/node_modules/deep-extend/lib/deep-extend.js +144 -0
  28. package/node_modules/deep-extend/package.json +47 -16
  29. package/node_modules/deep-extend/test/index.spec.js +168 -5
  30. package/node_modules/delegates/package.json +1 -2
  31. package/node_modules/ecc-jsbn/.npmignore +15 -0
  32. package/node_modules/ecc-jsbn/LICENSE +21 -0
  33. package/node_modules/ecc-jsbn/README.md +8 -0
  34. package/node_modules/ecc-jsbn/index.js +57 -0
  35. package/node_modules/ecc-jsbn/lib/LICENSE-jsbn +40 -0
  36. package/node_modules/ecc-jsbn/lib/ec.js +561 -0
  37. package/node_modules/ecc-jsbn/lib/sec.js +170 -0
  38. package/node_modules/ecc-jsbn/package.json +63 -0
  39. package/node_modules/ecc-jsbn/test.js +14 -0
  40. package/node_modules/extsprintf/.gitmodules +6 -0
  41. package/node_modules/{path-is-absolute/license → extsprintf/LICENSE} +2 -4
  42. package/node_modules/extsprintf/Makefile +23 -0
  43. package/node_modules/extsprintf/Makefile.deps +39 -0
  44. package/node_modules/extsprintf/Makefile.targ +285 -0
  45. package/node_modules/extsprintf/README.md +39 -0
  46. package/node_modules/extsprintf/examples/simple.js +2 -0
  47. package/node_modules/{ctype/tools/jsl.conf → extsprintf/jsl.node.conf} +71 -63
  48. package/node_modules/extsprintf/lib/extsprintf.js +166 -0
  49. package/node_modules/extsprintf/package.json +48 -0
  50. package/node_modules/fstream/package.json +1 -2
  51. package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/package.json +4 -22
  52. package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/package.json +3 -21
  53. package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/package.json +4 -23
  54. package/node_modules/fstream-ignore/node_modules/minimatch/package.json +4 -24
  55. package/node_modules/fstream-ignore/package.json +1 -2
  56. package/node_modules/gauge/package.json +1 -2
  57. package/node_modules/har-validator/package.json +15 -15
  58. package/node_modules/has-unicode/package.json +1 -2
  59. package/node_modules/hawk/dist/client.js +340 -0
  60. package/node_modules/hawk/lib/browser.js +14 -20
  61. package/node_modules/hawk/package.json +10 -10
  62. package/node_modules/hawk/test/browser.js +134 -101
  63. package/node_modules/hawk/test/index.js +61 -61
  64. package/node_modules/hawk/test/server.js +72 -84
  65. package/node_modules/hawk/test/uri.js +52 -63
  66. package/node_modules/http-signature/CHANGES.md +39 -0
  67. package/node_modules/http-signature/http_signing.md +16 -17
  68. package/node_modules/http-signature/lib/index.js +6 -4
  69. package/node_modules/http-signature/lib/parser.js +43 -29
  70. package/node_modules/http-signature/lib/signer.js +290 -74
  71. package/node_modules/http-signature/lib/utils.js +112 -0
  72. package/node_modules/http-signature/lib/verify.js +47 -15
  73. package/node_modules/http-signature/package.json +20 -14
  74. package/node_modules/is-my-json-valid/index.js +16 -14
  75. package/node_modules/is-my-json-valid/package.json +16 -12
  76. package/node_modules/is-typedarray/LICENSE.md +18 -0
  77. package/node_modules/is-typedarray/README.md +16 -0
  78. package/node_modules/is-typedarray/index.js +41 -0
  79. package/node_modules/is-typedarray/package.json +63 -0
  80. package/node_modules/is-typedarray/test.js +34 -0
  81. package/node_modules/jodid25519/.npmignore +11 -0
  82. package/node_modules/jodid25519/.travis.yml +7 -0
  83. package/node_modules/jodid25519/AUTHORS.md +3 -0
  84. package/node_modules/jodid25519/LICENSE +23 -0
  85. package/node_modules/jodid25519/README.md +51 -0
  86. package/node_modules/jodid25519/almond.0 +42 -0
  87. package/node_modules/jodid25519/almond.1 +13 -0
  88. package/node_modules/jodid25519/index.js +35 -0
  89. package/node_modules/jodid25519/jsdoc.json +19 -0
  90. package/node_modules/jodid25519/lib/core.js +481 -0
  91. package/node_modules/jodid25519/lib/curve255.js +221 -0
  92. package/node_modules/jodid25519/lib/dh.js +111 -0
  93. package/node_modules/jodid25519/lib/eddsa.js +573 -0
  94. package/node_modules/jodid25519/lib/utils.js +198 -0
  95. package/node_modules/jodid25519/package.json +77 -0
  96. package/node_modules/jsbn/.npmignore +2 -0
  97. package/node_modules/jsbn/LICENSE +40 -0
  98. package/node_modules/jsbn/README.md +175 -0
  99. package/node_modules/jsbn/example.html +12 -0
  100. package/node_modules/jsbn/example.js +3 -0
  101. package/node_modules/jsbn/index.js +1358 -0
  102. package/node_modules/jsbn/package.json +60 -0
  103. package/node_modules/json-schema/README.md +5 -0
  104. package/node_modules/json-schema/draft-00/hyper-schema +68 -0
  105. package/node_modules/json-schema/draft-00/json-ref +26 -0
  106. package/node_modules/json-schema/draft-00/links +33 -0
  107. package/node_modules/json-schema/draft-00/schema +155 -0
  108. package/node_modules/json-schema/draft-01/hyper-schema +68 -0
  109. package/node_modules/json-schema/draft-01/json-ref +26 -0
  110. package/node_modules/json-schema/draft-01/links +33 -0
  111. package/node_modules/json-schema/draft-01/schema +155 -0
  112. package/node_modules/json-schema/draft-02/hyper-schema +68 -0
  113. package/node_modules/json-schema/draft-02/json-ref +26 -0
  114. package/node_modules/json-schema/draft-02/links +35 -0
  115. package/node_modules/json-schema/draft-02/schema +166 -0
  116. package/node_modules/json-schema/draft-03/examples/address +20 -0
  117. package/node_modules/json-schema/draft-03/examples/calendar +53 -0
  118. package/node_modules/json-schema/draft-03/examples/card +105 -0
  119. package/node_modules/json-schema/draft-03/examples/geo +8 -0
  120. package/node_modules/json-schema/draft-03/examples/interfaces +23 -0
  121. package/node_modules/json-schema/draft-03/hyper-schema +60 -0
  122. package/node_modules/json-schema/draft-03/json-ref +26 -0
  123. package/node_modules/json-schema/draft-03/links +35 -0
  124. package/node_modules/json-schema/draft-03/schema +174 -0
  125. package/node_modules/json-schema/draft-04/hyper-schema +60 -0
  126. package/node_modules/json-schema/draft-04/links +41 -0
  127. package/node_modules/json-schema/draft-04/schema +189 -0
  128. package/node_modules/json-schema/draft-zyp-json-schema-03.xml +1120 -0
  129. package/node_modules/json-schema/draft-zyp-json-schema-04.xml +1072 -0
  130. package/node_modules/json-schema/lib/links.js +52 -0
  131. package/node_modules/json-schema/lib/validate.js +260 -0
  132. package/node_modules/json-schema/package.json +67 -0
  133. package/node_modules/json-schema/test/tests.js +95 -0
  134. package/node_modules/jsprim/CHANGES.md +30 -0
  135. package/node_modules/jsprim/LICENSE +19 -0
  136. package/node_modules/jsprim/README.md +228 -0
  137. package/node_modules/jsprim/lib/jsprim.js +478 -0
  138. package/node_modules/jsprim/package.json +54 -0
  139. package/node_modules/lodash._basetostring/package.json +1 -2
  140. package/node_modules/lodash._createpadding/package.json +1 -2
  141. package/node_modules/lodash.pad/package.json +1 -2
  142. package/node_modules/lodash.padleft/package.json +1 -2
  143. package/node_modules/lodash.padright/package.json +1 -2
  144. package/node_modules/lodash.repeat/package.json +1 -2
  145. package/node_modules/node-pre-gyp/CHANGELOG.md +8 -0
  146. package/node_modules/node-pre-gyp/README.md +570 -0
  147. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +4 -0
  148. package/node_modules/node-pre-gyp/node_modules/nopt/lib/nopt.js +2 -1
  149. package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/package.json +30 -37
  150. package/node_modules/node-pre-gyp/node_modules/nopt/package.json +37 -57
  151. package/node_modules/node-pre-gyp/node_modules/nopt/test/basic.js +22 -0
  152. package/node_modules/node-pre-gyp/package.json +17 -17
  153. package/node_modules/node-uuid/.npmignore +2 -0
  154. package/node_modules/node-uuid/README.md +12 -1
  155. package/node_modules/node-uuid/bower.json +1 -1
  156. package/node_modules/node-uuid/component.json +11 -4
  157. package/node_modules/node-uuid/package.json +25 -12
  158. package/node_modules/node-uuid/test/test.js +3 -0
  159. package/node_modules/node-uuid/uuid.js +70 -45
  160. package/node_modules/npmlog/.travis.yml +14 -0
  161. package/node_modules/npmlog/log.js +3 -0
  162. package/node_modules/npmlog/package.json +23 -20
  163. package/node_modules/npmlog/test/basic.js +8 -1
  164. package/node_modules/once/package.json +2 -3
  165. package/node_modules/pinkie/index.js +23 -7
  166. package/node_modules/pinkie/package.json +22 -15
  167. package/node_modules/pinkie/readme.md +17 -9
  168. package/node_modules/pinkie-promise/package.json +16 -14
  169. package/node_modules/pinkie-promise/readme.md +5 -3
  170. package/node_modules/rc/README.md +1 -1
  171. package/node_modules/rc/index.js +1 -1
  172. package/node_modules/rc/node_modules/minimist/package.json +1 -1
  173. package/node_modules/rc/package.json +12 -12
  174. package/node_modules/request/.eslintrc +1 -1
  175. package/node_modules/request/.travis.yml +4 -4
  176. package/node_modules/request/CHANGELOG.md +25 -0
  177. package/node_modules/request/README.md +12 -13
  178. package/node_modules/request/lib/har.js +84 -75
  179. package/node_modules/request/lib/redirect.js +2 -3
  180. package/node_modules/request/lib/tunnel.js +13 -18
  181. package/node_modules/request/package.json +17 -16
  182. package/node_modules/request/request.js +16 -59
  183. package/node_modules/rimraf/README.md +7 -2
  184. package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/package.json +5 -25
  185. package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/package.json +5 -25
  186. package/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE +16 -0
  187. package/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md +42 -0
  188. package/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js +1 -0
  189. package/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
  190. package/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +58 -0
  191. package/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js +25 -0
  192. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +3 -0
  193. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +122 -0
  194. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
  195. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
  196. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
  197. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +3 -0
  198. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md +21 -0
  199. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
  200. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +80 -0
  201. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
  202. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +38 -0
  203. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +79 -0
  204. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +56 -0
  205. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +4 -0
  206. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
  207. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
  208. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
  209. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
  210. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +90 -0
  211. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
  212. package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +81 -0
  213. package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/package.json +3 -21
  214. package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
  215. package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +58 -0
  216. package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
  217. package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
  218. package/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +70 -0
  219. package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/package.json +4 -22
  220. package/node_modules/rimraf/node_modules/glob/package.json +2 -20
  221. package/node_modules/rimraf/package.json +10 -10
  222. package/node_modules/semver/README.md +25 -1
  223. package/node_modules/semver/package.json +10 -10
  224. package/node_modules/semver/range.bnf +16 -0
  225. package/node_modules/semver/semver.js +0 -12
  226. package/node_modules/sshpk/.npmignore +8 -0
  227. package/node_modules/sshpk/.travis.yml +11 -0
  228. package/node_modules/sshpk/LICENSE +18 -0
  229. package/node_modules/sshpk/README.md +436 -0
  230. package/node_modules/sshpk/bin/sshpk-conv +183 -0
  231. package/node_modules/sshpk/lib/algs.js +168 -0
  232. package/node_modules/sshpk/lib/dhe.js +312 -0
  233. package/node_modules/sshpk/lib/ed-compat.js +94 -0
  234. package/node_modules/sshpk/lib/errors.js +58 -0
  235. package/node_modules/sshpk/lib/fingerprint.js +140 -0
  236. package/node_modules/sshpk/lib/formats/auto.js +73 -0
  237. package/node_modules/sshpk/lib/formats/pem.js +152 -0
  238. package/node_modules/sshpk/lib/formats/pkcs1.js +320 -0
  239. package/node_modules/sshpk/lib/formats/pkcs8.js +510 -0
  240. package/node_modules/sshpk/lib/formats/rfc4253.js +145 -0
  241. package/node_modules/sshpk/lib/formats/ssh-private.js +138 -0
  242. package/node_modules/sshpk/lib/formats/ssh.js +114 -0
  243. package/node_modules/sshpk/lib/index.js +25 -0
  244. package/node_modules/sshpk/lib/key.js +260 -0
  245. package/node_modules/sshpk/lib/private-key.js +224 -0
  246. package/node_modules/sshpk/lib/signature.js +237 -0
  247. package/node_modules/sshpk/lib/ssh-buffer.js +123 -0
  248. package/node_modules/sshpk/lib/utils.js +207 -0
  249. package/node_modules/sshpk/node_modules/assert-plus/AUTHORS +6 -0
  250. package/node_modules/sshpk/node_modules/assert-plus/CHANGES.md +8 -0
  251. package/node_modules/sshpk/node_modules/assert-plus/README.md +155 -0
  252. package/node_modules/sshpk/node_modules/assert-plus/assert.js +206 -0
  253. package/node_modules/sshpk/node_modules/assert-plus/package.json +88 -0
  254. package/node_modules/sshpk/package.json +92 -0
  255. package/node_modules/strip-json-comments/cli.js +2 -2
  256. package/node_modules/strip-json-comments/package.json +13 -12
  257. package/node_modules/strip-json-comments/readme.md +11 -5
  258. package/node_modules/strip-json-comments/strip-json-comments.js +16 -7
  259. package/node_modules/tar/package.json +1 -2
  260. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/LICENSE +19 -0
  261. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +11 -11
  262. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/package.json +17 -12
  263. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/test.js +68 -0
  264. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/package.json +1 -1
  265. package/node_modules/tar-pack/node_modules/rimraf/package.json +1 -2
  266. package/node_modules/tar-pack/package.json +1 -2
  267. package/node_modules/tough-cookie/lib/cookie.js +1 -1
  268. package/node_modules/tough-cookie/package.json +7 -7
  269. package/node_modules/tweetnacl/.npmignore +4 -0
  270. package/node_modules/tweetnacl/CHANGELOG.md +128 -0
  271. package/node_modules/tweetnacl/README.md +463 -0
  272. package/node_modules/tweetnacl/nacl-fast.js +2418 -0
  273. package/node_modules/tweetnacl/nacl-fast.min.js +2 -0
  274. package/node_modules/tweetnacl/nacl.js +1205 -0
  275. package/node_modules/tweetnacl/nacl.min.js +1 -0
  276. package/node_modules/tweetnacl/package.json +101 -0
  277. package/node_modules/uid-number/package.json +2 -3
  278. package/node_modules/verror/.gitmodules +0 -0
  279. package/node_modules/verror/LICENSE +19 -0
  280. package/node_modules/verror/Makefile +35 -0
  281. package/node_modules/verror/Makefile.targ +285 -0
  282. package/node_modules/verror/README.md +120 -0
  283. package/node_modules/verror/examples/levels-verror.js +36 -0
  284. package/node_modules/verror/examples/levels-werror.js +34 -0
  285. package/node_modules/verror/examples/varargs.js +6 -0
  286. package/node_modules/verror/examples/verror.js +13 -0
  287. package/node_modules/verror/examples/werror.js +14 -0
  288. package/node_modules/verror/jsl.node.conf +139 -0
  289. package/node_modules/verror/lib/verror.js +157 -0
  290. package/node_modules/verror/package.json +51 -0
  291. package/node_modules/verror/tests/tst.inherit.js +100 -0
  292. package/node_modules/verror/tests/tst.verror.js +156 -0
  293. package/node_modules/verror/tests/tst.werror.js +179 -0
  294. package/package.json +3 -3
  295. package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js +0 -106
  296. package/node_modules/core-util-is/util.js +0 -106
  297. package/node_modules/ctype/.npmignore +0 -1
  298. package/node_modules/ctype/CHANGELOG +0 -78
  299. package/node_modules/ctype/README +0 -82
  300. package/node_modules/ctype/README.old +0 -298
  301. package/node_modules/ctype/ctf.js +0 -245
  302. package/node_modules/ctype/ctio.js +0 -1485
  303. package/node_modules/ctype/ctype.js +0 -944
  304. package/node_modules/ctype/man/man3ctype/ctio.3ctype +0 -241
  305. package/node_modules/ctype/package.json +0 -51
  306. package/node_modules/ctype/tools/jsstyle +0 -839
  307. package/node_modules/http-signature/lib/util.js +0 -306
  308. package/node_modules/inflight/node_modules/once/package.json +0 -86
  309. package/node_modules/inflight/node_modules/once/test/once.js +0 -23
  310. package/node_modules/rimraf/node_modules/glob/LICENSE +0 -15
  311. package/node_modules/rimraf/node_modules/minimatch/LICENSE +0 -15
  312. package/node_modules/rimraf/node_modules/once/LICENSE +0 -15
  313. package/node_modules/rimraf/node_modules/once/README.md +0 -51
  314. package/node_modules/rimraf/node_modules/once/once.js +0 -21
  315. package/node_modules/rimraf/node_modules/once/package.json +0 -84
  316. package/node_modules/rimraf/node_modules/once/test/once.js +0 -23
  317. package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/util.js +0 -106
  318. package/node_modules/wrappy/LICENSE +0 -15
  319. /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/.npmignore +0 -0
  320. /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/README.md +0 -0
  321. /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/example.js +0 -0
  322. /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/index.js +0 -0
  323. /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.npmignore +0 -0
  324. /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.travis.yml +0 -0
  325. /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/LICENSE.md +0 -0
  326. /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/Makefile +0 -0
  327. /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/README.md +0 -0
  328. /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/example.js +0 -0
  329. /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/index.js +0 -0
  330. /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/test/balanced.js +0 -0
  331. /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/.travis.yml +0 -0
  332. /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/LICENSE +0 -0
  333. /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/README.markdown +0 -0
  334. /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/example/map.js +0 -0
  335. /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/index.js +0 -0
  336. /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/test/map.js +0 -0
  337. /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/.npmignore +0 -0
  338. /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/.travis.yml +0 -0
  339. /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/CONTRIBUTING.md +0 -0
  340. /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/LICENSE +0 -0
  341. /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/README.md +0 -0
  342. /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/abbrev.js +0 -0
  343. /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/test.js +0 -0
  344. /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/.eslintrc +0 -0
  345. /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/LICENSE +0 -0
  346. /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/README.md +0 -0
  347. /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/inflight.js +0 -0
  348. /package/node_modules/{fstream-ignore/node_modules/minimatch → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/LICENSE +0 -0
  349. /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/README.md +0 -0
  350. /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/test/basic.js +0 -0
  351. /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/wrappy.js +0 -0
  352. /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/test.js +0 -0
  353. /package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/README.md +0 -0
  354. /package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/minimatch.js +0 -0
  355. /package/node_modules/{inflight → rimraf/node_modules/glob}/node_modules/once/README.md +0 -0
  356. /package/node_modules/{inflight/node_modules/once → rimraf/node_modules/glob/node_modules/once/node_modules/wrappy}/LICENSE +0 -0
  357. /package/node_modules/{inflight → rimraf/node_modules/glob}/node_modules/once/once.js +0 -0
  358. /package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/index.js +0 -0
  359. /package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/readme.md +0 -0
  360. /package/node_modules/{deep-extend → verror}/.npmignore +0 -0
@@ -0,0 +1,34 @@
1
+ var extsprintf = require('extsprintf');
2
+ var fs = require('fs');
3
+ var verror = require('../lib/verror');
4
+
5
+ function checkFile(filename, callback) {
6
+ fs.stat(filename, function (err) {
7
+ if (err)
8
+ /* Annotate the "stat" error with what we were doing. */
9
+ return (callback(new verror.VError(err,
10
+ 'failed to check "%s"', filename)));
11
+
12
+ /* ... */
13
+ return (callback());
14
+ });
15
+ }
16
+
17
+ function handleRequest(filename, callback) {
18
+ checkFile('/nonexistent', function (err) {
19
+ if (err)
20
+ /* Wrap the "checkFile" error. */
21
+ return (callback(new verror.WError(
22
+ err, 'request failed')));
23
+
24
+ /* ... */
25
+ return (callback());
26
+ });
27
+ }
28
+
29
+ handleRequest('/nonexistent', function (err) {
30
+ if (err) {
31
+ console.log(err.message);
32
+ console.log(err.toString());
33
+ }
34
+ });
@@ -0,0 +1,6 @@
1
+ var verror = require('../lib/verror');
2
+
3
+ var opname = 'read';
4
+ var err = new verror.VError('"%s" operation failed', opname);
5
+ console.log(err.message);
6
+ console.log(err.stack);
@@ -0,0 +1,13 @@
1
+ var mod_fs = require('fs');
2
+ var mod_verror = require('../lib/verror');
3
+
4
+ var filename = '/nonexistent';
5
+
6
+ mod_fs.stat(filename, function (err1) {
7
+ var err2 = new mod_verror.VError(err1, 'failed to stat "%s"', filename);
8
+
9
+ /* The following would normally be higher up the stack. */
10
+ var err3 = new mod_verror.VError(err2, 'failed to handle request');
11
+ console.log(err3.message);
12
+ console.log(err3.stack);
13
+ });
@@ -0,0 +1,14 @@
1
+ var mod_fs = require('fs');
2
+ var mod_verror = require('../lib/verror');
3
+
4
+ var filename = '/nonexistent';
5
+
6
+ mod_fs.stat(filename, function (err1) {
7
+ var err2 = new mod_verror.WError(err1, 'failed to stat "%s"', filename);
8
+
9
+ /* The following would normally be higher up the stack. */
10
+ var err3 = new mod_verror.WError(err2, 'failed to handle request');
11
+ console.log(err3.message);
12
+ console.log(err3.toString());
13
+ console.log(err3.stack);
14
+ });
@@ -0,0 +1,139 @@
1
+ #
2
+ # Configuration File for JavaScript Lint
3
+ #
4
+ # This configuration file can be used to lint a collection of scripts, or to enable
5
+ # or disable warnings for scripts that are linted via the command line.
6
+ #
7
+
8
+ ### Warnings
9
+ # Enable or disable warnings based on requirements.
10
+ # Use "+WarningName" to display or "-WarningName" to suppress.
11
+ #
12
+ +ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent
13
+ +ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity
14
+ +ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement
15
+ +anon_no_return_value # anonymous function does not always return value
16
+ +assign_to_function_call # assignment to a function call
17
+ -block_without_braces # block statement without curly braces
18
+ +comma_separated_stmts # multiple statements separated by commas (use semicolons?)
19
+ +comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)
20
+ +default_not_at_end # the default case is not at the end of the switch statement
21
+ +dup_option_explicit # duplicate "option explicit" control comment
22
+ +duplicate_case_in_switch # duplicate case in switch statement
23
+ +duplicate_formal # duplicate formal argument {name}
24
+ +empty_statement # empty statement or extra semicolon
25
+ +identifier_hides_another # identifer {name} hides an identifier in a parent scope
26
+ -inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement
27
+ +incorrect_version # Expected /*jsl:content-type*/ control comment. The script was parsed with the wrong version.
28
+ +invalid_fallthru # unexpected "fallthru" control comment
29
+ +invalid_pass # unexpected "pass" control comment
30
+ +jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax
31
+ +leading_decimal_point # leading decimal point may indicate a number or an object member
32
+ +legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax
33
+ +meaningless_block # meaningless block; curly braces have no impact
34
+ +mismatch_ctrl_comments # mismatched control comment; "ignore" and "end" control comments must have a one-to-one correspondence
35
+ +misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma
36
+ +missing_break # missing break statement
37
+ +missing_break_for_last_case # missing break statement for last case in switch
38
+ +missing_default_case # missing default case in switch statement
39
+ +missing_option_explicit # the "option explicit" control comment is missing
40
+ +missing_semicolon # missing semicolon
41
+ +missing_semicolon_for_lambda # missing semicolon for lambda assignment
42
+ +multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs
43
+ +nested_comment # nested comment
44
+ +no_return_value # function {name} does not always return a value
45
+ +octal_number # leading zeros make an octal number
46
+ +parseint_missing_radix # parseInt missing radix parameter
47
+ +partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag
48
+ +redeclared_var # redeclaration of {name}
49
+ +trailing_comma_in_array # extra comma is not recommended in array initializers
50
+ +trailing_decimal_point # trailing decimal point may indicate a number or an object member
51
+ +undeclared_identifier # undeclared identifier: {name}
52
+ +unreachable_code # unreachable code
53
+ -unreferenced_argument # argument declared but never referenced: {name}
54
+ -unreferenced_function # function is declared but never referenced: {name}
55
+ +unreferenced_variable # variable is declared but never referenced: {name}
56
+ +unsupported_version # JavaScript {version} is not supported
57
+ +use_of_label # use of label
58
+ +useless_assign # useless assignment
59
+ +useless_comparison # useless comparison; comparing identical expressions
60
+ -useless_quotes # the quotation marks are unnecessary
61
+ +useless_void # use of the void type may be unnecessary (void is always undefined)
62
+ +var_hides_arg # variable {name} hides argument
63
+ +want_assign_or_call # expected an assignment or function call
64
+ +with_statement # with statement hides undeclared variables; use temporary variable instead
65
+
66
+
67
+ ### Output format
68
+ # Customize the format of the error message.
69
+ # __FILE__ indicates current file path
70
+ # __FILENAME__ indicates current file name
71
+ # __LINE__ indicates current line
72
+ # __COL__ indicates current column
73
+ # __ERROR__ indicates error message (__ERROR_PREFIX__: __ERROR_MSG__)
74
+ # __ERROR_NAME__ indicates error name (used in configuration file)
75
+ # __ERROR_PREFIX__ indicates error prefix
76
+ # __ERROR_MSG__ indicates error message
77
+ #
78
+ # For machine-friendly output, the output format can be prefixed with
79
+ # "encode:". If specified, all items will be encoded with C-slashes.
80
+ #
81
+ # Visual Studio syntax (default):
82
+ +output-format __FILE__(__LINE__): __ERROR__
83
+ # Alternative syntax:
84
+ #+output-format __FILE__:__LINE__: __ERROR__
85
+
86
+
87
+ ### Context
88
+ # Show the in-line position of the error.
89
+ # Use "+context" to display or "-context" to suppress.
90
+ #
91
+ +context
92
+
93
+
94
+ ### Control Comments
95
+ # Both JavaScript Lint and the JScript interpreter confuse each other with the syntax for
96
+ # the /*@keyword@*/ control comments and JScript conditional comments. (The latter is
97
+ # enabled in JScript with @cc_on@). The /*jsl:keyword*/ syntax is preferred for this reason,
98
+ # although legacy control comments are enabled by default for backward compatibility.
99
+ #
100
+ -legacy_control_comments
101
+
102
+
103
+ ### Defining identifiers
104
+ # By default, "option explicit" is enabled on a per-file basis.
105
+ # To enable this for all files, use "+always_use_option_explicit"
106
+ -always_use_option_explicit
107
+
108
+ # Define certain identifiers of which the lint is not aware.
109
+ # (Use this in conjunction with the "undeclared identifier" warning.)
110
+ #
111
+ # Common uses for webpages might be:
112
+ +define __dirname
113
+ +define clearInterval
114
+ +define clearTimeout
115
+ +define console
116
+ +define exports
117
+ +define global
118
+ +define process
119
+ +define require
120
+ +define setInterval
121
+ +define setTimeout
122
+ +define Buffer
123
+ +define JSON
124
+ +define Math
125
+ +define __dirname
126
+ +define __filename
127
+
128
+ ### JavaScript Version
129
+ # To change the default JavaScript version:
130
+ #+default-type text/javascript;version=1.5
131
+ #+default-type text/javascript;e4x=1
132
+
133
+ ### Files
134
+ # Specify which files to lint
135
+ # Use "+recurse" to enable recursion (disabled by default).
136
+ # To add a set of files, use "+process FileName", "+process Folder\Path\*.js",
137
+ # or "+process Folder\Path\*.htm".
138
+ #
139
+
@@ -0,0 +1,157 @@
1
+ /*
2
+ * verror.js: richer JavaScript errors
3
+ */
4
+
5
+ var mod_assert = require('assert');
6
+ var mod_util = require('util');
7
+
8
+ var mod_extsprintf = require('extsprintf');
9
+
10
+ /*
11
+ * Public interface
12
+ */
13
+ exports.VError = VError;
14
+ exports.WError = WError;
15
+ exports.MultiError = MultiError;
16
+
17
+ /*
18
+ * Like JavaScript's built-in Error class, but supports a "cause" argument and a
19
+ * printf-style message. The cause argument can be null.
20
+ */
21
+ function VError(options)
22
+ {
23
+ var args, causedBy, ctor, tailmsg;
24
+
25
+ if (options instanceof Error || typeof (options) === 'object') {
26
+ args = Array.prototype.slice.call(arguments, 1);
27
+ } else {
28
+ args = Array.prototype.slice.call(arguments, 0);
29
+ options = undefined;
30
+ }
31
+
32
+ tailmsg = args.length > 0 ?
33
+ mod_extsprintf.sprintf.apply(null, args) : '';
34
+ this.jse_shortmsg = tailmsg;
35
+ this.jse_summary = tailmsg;
36
+
37
+ if (options) {
38
+ causedBy = options.cause;
39
+
40
+ if (!causedBy || !(options.cause instanceof Error))
41
+ causedBy = options;
42
+
43
+ if (causedBy && (causedBy instanceof Error)) {
44
+ this.jse_cause = causedBy;
45
+ this.jse_summary += ': ' + causedBy.message;
46
+ }
47
+ }
48
+
49
+ this.message = this.jse_summary;
50
+ Error.call(this, this.jse_summary);
51
+
52
+ if (Error.captureStackTrace) {
53
+ ctor = options ? options.constructorOpt : undefined;
54
+ ctor = ctor || arguments.callee;
55
+ Error.captureStackTrace(this, ctor);
56
+ }
57
+ }
58
+
59
+ mod_util.inherits(VError, Error);
60
+ VError.prototype.name = 'VError';
61
+
62
+ VError.prototype.toString = function ve_toString()
63
+ {
64
+ var str = (this.hasOwnProperty('name') && this.name ||
65
+ this.constructor.name || this.constructor.prototype.name);
66
+ if (this.message)
67
+ str += ': ' + this.message;
68
+
69
+ return (str);
70
+ };
71
+
72
+ VError.prototype.cause = function ve_cause()
73
+ {
74
+ return (this.jse_cause);
75
+ };
76
+
77
+
78
+ /*
79
+ * Represents a collection of errors for the purpose of consumers that generally
80
+ * only deal with one error. Callers can extract the individual errors
81
+ * contained in this object, but may also just treat it as a normal single
82
+ * error, in which case a summary message will be printed.
83
+ */
84
+ function MultiError(errors)
85
+ {
86
+ mod_assert.ok(errors.length > 0);
87
+ this.ase_errors = errors;
88
+
89
+ VError.call(this, errors[0], 'first of %d error%s',
90
+ errors.length, errors.length == 1 ? '' : 's');
91
+ }
92
+
93
+ mod_util.inherits(MultiError, VError);
94
+
95
+
96
+
97
+ /*
98
+ * Like JavaScript's built-in Error class, but supports a "cause" argument which
99
+ * is wrapped, not "folded in" as with VError. Accepts a printf-style message.
100
+ * The cause argument can be null.
101
+ */
102
+ function WError(options)
103
+ {
104
+ Error.call(this);
105
+
106
+ var args, cause, ctor;
107
+ if (typeof (options) === 'object') {
108
+ args = Array.prototype.slice.call(arguments, 1);
109
+ } else {
110
+ args = Array.prototype.slice.call(arguments, 0);
111
+ options = undefined;
112
+ }
113
+
114
+ if (args.length > 0) {
115
+ this.message = mod_extsprintf.sprintf.apply(null, args);
116
+ } else {
117
+ this.message = '';
118
+ }
119
+
120
+ if (options) {
121
+ if (options instanceof Error) {
122
+ cause = options;
123
+ } else {
124
+ cause = options.cause;
125
+ ctor = options.constructorOpt;
126
+ }
127
+ }
128
+
129
+ Error.captureStackTrace(this, ctor || this.constructor);
130
+ if (cause)
131
+ this.cause(cause);
132
+
133
+ }
134
+
135
+ mod_util.inherits(WError, Error);
136
+ WError.prototype.name = 'WError';
137
+
138
+
139
+ WError.prototype.toString = function we_toString()
140
+ {
141
+ var str = (this.hasOwnProperty('name') && this.name ||
142
+ this.constructor.name || this.constructor.prototype.name);
143
+ if (this.message)
144
+ str += ': ' + this.message;
145
+ if (this.we_cause && this.we_cause.message)
146
+ str += '; caused by ' + this.we_cause.toString();
147
+
148
+ return (str);
149
+ };
150
+
151
+ WError.prototype.cause = function we_cause(c)
152
+ {
153
+ if (c instanceof Error)
154
+ this.we_cause = c;
155
+
156
+ return (this.we_cause);
157
+ };
@@ -0,0 +1,51 @@
1
+ {
2
+ "_from": "verror@1.3.6",
3
+ "_id": "verror@1.3.6",
4
+ "_location": "/verror",
5
+ "_npmUser": {
6
+ "email": "dap@cs.brown.edu",
7
+ "name": "dap"
8
+ },
9
+ "_npmVersion": "1.1.65",
10
+ "_phantomChildren": {},
11
+ "_requiredBy": [
12
+ "/jsprim"
13
+ ],
14
+ "_resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz",
15
+ "_shasum": "cff5df12946d297d2baaefaa2689e25be01c005c",
16
+ "bugs": {
17
+ "url": "https://github.com/davepacheco/node-verror/issues"
18
+ },
19
+ "dependencies": {
20
+ "extsprintf": "1.0.2"
21
+ },
22
+ "description": "richer JavaScript errors",
23
+ "devDependencies": {},
24
+ "directories": {},
25
+ "dist": {
26
+ "shasum": "cff5df12946d297d2baaefaa2689e25be01c005c",
27
+ "tarball": "http://registry.npmjs.org/verror/-/verror-1.3.6.tgz"
28
+ },
29
+ "engines": [
30
+ "node >=0.6.0"
31
+ ],
32
+ "homepage": "https://github.com/davepacheco/node-verror",
33
+ "main": "./lib/verror.js",
34
+ "maintainers": [
35
+ {
36
+ "name": "dap",
37
+ "email": "dap@cs.brown.edu"
38
+ }
39
+ ],
40
+ "name": "verror",
41
+ "optionalDependencies": {},
42
+ "readme": "ERROR: No README data found!",
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "git://github.com/davepacheco/node-verror.git"
46
+ },
47
+ "scripts": {
48
+ "test": "make test"
49
+ },
50
+ "version": "1.3.6"
51
+ }
@@ -0,0 +1,100 @@
1
+ /*
2
+ * tst.inherit.js: test that inheriting from VError and WError work as expected.
3
+ */
4
+
5
+ var mod_assert = require('assert');
6
+ var mod_util = require('util');
7
+
8
+ var mod_verror = require('../lib/verror');
9
+
10
+ var VError = mod_verror.VError;
11
+ var WError = mod_verror.WError;
12
+ var err, suberr;
13
+
14
+ function VErrorChild()
15
+ {
16
+ VError.apply(this, Array.prototype.slice.call(arguments));
17
+ }
18
+
19
+ mod_util.inherits(VErrorChild, VError);
20
+ VErrorChild.prototype.name = 'VErrorChild';
21
+
22
+
23
+ function WErrorChild()
24
+ {
25
+ WError.apply(this, Array.prototype.slice.call(arguments));
26
+ }
27
+
28
+ mod_util.inherits(WErrorChild, WError);
29
+ WErrorChild.prototype.name = 'WErrorChild';
30
+
31
+
32
+ suberr = new Error('root cause');
33
+ err = new VErrorChild(suberr, 'top');
34
+ mod_assert.ok(err instanceof Error);
35
+ mod_assert.ok(err instanceof VError);
36
+ mod_assert.ok(err instanceof VErrorChild);
37
+ mod_assert.equal(err.cause(), suberr);
38
+ mod_assert.equal(err.message, 'top: root cause');
39
+ mod_assert.equal(err.toString(), 'VErrorChild: top: root cause');
40
+ mod_assert.equal(err.stack.split('\n')[0], 'VErrorChild: top: root cause');
41
+
42
+ suberr = new Error('root cause');
43
+ err = new WErrorChild(suberr, 'top');
44
+ mod_assert.ok(err instanceof Error);
45
+ mod_assert.ok(err instanceof WError);
46
+ mod_assert.ok(err instanceof WErrorChild);
47
+ mod_assert.equal(err.cause(), suberr);
48
+ mod_assert.equal(err.message, 'top');
49
+ mod_assert.equal(err.toString(),
50
+ 'WErrorChild: top; caused by Error: root cause');
51
+ mod_assert.equal(err.stack.split('\n')[0],
52
+ 'WErrorChild: top; caused by Error: root cause');
53
+
54
+
55
+ // Test that `<Ctor>.toString()` uses the ctor name. I.e. setting
56
+ // `<Ctor>.prototype.name` isn't necessary.
57
+ function VErrorChildNoName() {
58
+ VError.apply(this, Array.prototype.slice.call(arguments));
59
+ }
60
+ mod_util.inherits(VErrorChildNoName, VError);
61
+ err = new VErrorChildNoName('top');
62
+ mod_assert.equal(err.toString(), 'VErrorChildNoName: top');
63
+
64
+ function WErrorChildNoName() {
65
+ WError.apply(this, Array.prototype.slice.call(arguments));
66
+ }
67
+ mod_util.inherits(WErrorChildNoName, WError);
68
+ err = new WErrorChildNoName('top');
69
+ mod_assert.equal(err.toString(), 'WErrorChildNoName: top');
70
+
71
+
72
+ // Test that `<Ctor>.prototype.name` can be used for the `.toString()`
73
+ // when the ctor is anonymous.
74
+ var VErrorChildAnon = function () {
75
+ VError.apply(this, Array.prototype.slice.call(arguments));
76
+ };
77
+ mod_util.inherits(VErrorChildAnon, VError);
78
+ VErrorChildAnon.prototype.name = 'VErrorChildAnon';
79
+ err = new VErrorChildAnon('top');
80
+ mod_assert.equal(err.toString(), 'VErrorChildAnon: top');
81
+
82
+ var WErrorChildAnon = function () {
83
+ WError.apply(this, Array.prototype.slice.call(arguments));
84
+ };
85
+ mod_util.inherits(WErrorChildAnon, WError);
86
+ WErrorChildAnon.prototype.name = 'WErrorChildAnon';
87
+ err = new WErrorChildAnon('top');
88
+ mod_assert.equal(err.toString(), 'WErrorChildAnon: top');
89
+
90
+
91
+ // Test get appropriate exception name in `.toString()` when reconstituting
92
+ // an error instance a la:
93
+ // https://github.com/mcavage/node-fast/blob/master/lib/client.js#L215
94
+ err = new VError('top');
95
+ err.name = 'CustomNameError';
96
+ mod_assert.equal(err.toString(), 'CustomNameError: top');
97
+
98
+ err = new WError('top');
99
+ err.name = 'CustomNameError';
100
+ mod_assert.equal(err.toString(), 'CustomNameError: top');
@@ -0,0 +1,156 @@
1
+ /*
2
+ * tst.verror.js: tests basic functionality of the VError class.
3
+ */
4
+
5
+ var mod_assert = require('assert');
6
+ var mod_verror = require('../lib/verror');
7
+
8
+ var VError = mod_verror.VError;
9
+ var WError = mod_verror.WError;
10
+
11
+ var err, suberr, stack, substack;
12
+
13
+ /*
14
+ * Remove full paths and relative line numbers from stack traces so that we can
15
+ * compare against "known-good" output.
16
+ */
17
+ function cleanStack(stacktxt)
18
+ {
19
+ var re = new RegExp(__filename + ':\\d+:\\d+', 'gm');
20
+ stacktxt = stacktxt.replace(re, 'tst.verror.js');
21
+ return (stacktxt);
22
+ }
23
+
24
+ /*
25
+ * Save the generic parts of all stack traces so we can avoid hardcoding
26
+ * Node-specific implementation details in our testing of stack traces.
27
+ */
28
+ var nodestack = new Error().stack.split('\n').slice(2).join('\n');
29
+
30
+ /* no arguments */
31
+ err = new VError();
32
+ mod_assert.equal(err.name, 'VError');
33
+ mod_assert.ok(err instanceof Error);
34
+ mod_assert.ok(err instanceof VError);
35
+ mod_assert.equal(err.message, '');
36
+ mod_assert.ok(err.cause() === undefined);
37
+ stack = cleanStack(err.stack);
38
+ mod_assert.equal(stack, [
39
+ 'VError',
40
+ ' at Object.<anonymous> (tst.verror.js)'
41
+ ].join('\n') + '\n' + nodestack);
42
+
43
+ /* options-argument form */
44
+ err = new VError({});
45
+ mod_assert.equal(err.message, '');
46
+ mod_assert.ok(err.cause() === undefined);
47
+
48
+ /* simple message */
49
+ err = new VError('my error');
50
+ mod_assert.equal(err.message, 'my error');
51
+ mod_assert.ok(err.cause() === undefined);
52
+ stack = cleanStack(err.stack);
53
+ mod_assert.equal(stack, [
54
+ 'VError: my error',
55
+ ' at Object.<anonymous> (tst.verror.js)'
56
+ ].join('\n') + '\n' + nodestack);
57
+
58
+ err = new VError({}, 'my error');
59
+ mod_assert.equal(err.message, 'my error');
60
+ mod_assert.ok(err.cause() === undefined);
61
+
62
+ /* printf-style message */
63
+ err = new VError('%s error: %3d problems', 'very bad', 15);
64
+ mod_assert.equal(err.message, 'very bad error: 15 problems');
65
+ mod_assert.ok(err.cause() === undefined);
66
+
67
+ err = new VError({}, '%s error: %3d problems', 'very bad', 15);
68
+ mod_assert.equal(err.message, 'very bad error: 15 problems');
69
+ mod_assert.ok(err.cause() === undefined);
70
+
71
+ /* caused by another error, with no additional message */
72
+ suberr = new Error('root cause');
73
+ err = new VError(suberr);
74
+ mod_assert.equal(err.message, ': root cause');
75
+ mod_assert.ok(err.cause() === suberr);
76
+
77
+ err = new VError({ 'cause': suberr });
78
+ mod_assert.equal(err.message, ': root cause');
79
+ mod_assert.ok(err.cause() === suberr);
80
+
81
+ /* caused by another error, with annotation */
82
+ err = new VError(suberr, 'proximate cause: %d issues', 3);
83
+ mod_assert.equal(err.message, 'proximate cause: 3 issues: root cause');
84
+ mod_assert.ok(err.cause() === suberr);
85
+ stack = cleanStack(err.stack);
86
+ mod_assert.equal(stack, [
87
+ 'VError: proximate cause: 3 issues: root cause',
88
+ ' at Object.<anonymous> (tst.verror.js)'
89
+ ].join('\n') + '\n' + nodestack);
90
+
91
+ err = new VError({ 'cause': suberr }, 'proximate cause: %d issues', 3);
92
+ mod_assert.equal(err.message, 'proximate cause: 3 issues: root cause');
93
+ mod_assert.ok(err.cause() === suberr);
94
+ stack = cleanStack(err.stack);
95
+ mod_assert.equal(stack, [
96
+ 'VError: proximate cause: 3 issues: root cause',
97
+ ' at Object.<anonymous> (tst.verror.js)'
98
+ ].join('\n') + '\n' + nodestack);
99
+
100
+ /* caused by another VError, with annotation. */
101
+ suberr = err;
102
+ err = new VError(suberr, 'top');
103
+ mod_assert.equal(err.message, 'top: proximate cause: 3 issues: root cause');
104
+ mod_assert.ok(err.cause() === suberr);
105
+
106
+ err = new VError({ 'cause': suberr }, 'top');
107
+ mod_assert.equal(err.message, 'top: proximate cause: 3 issues: root cause');
108
+ mod_assert.ok(err.cause() === suberr);
109
+
110
+ /* caused by a WError */
111
+ suberr = new WError(new Error('root cause'), 'mid');
112
+ err = new VError(suberr, 'top');
113
+ mod_assert.equal(err.message, 'top: mid');
114
+ mod_assert.ok(err.cause() === suberr);
115
+
116
+ /* null cause (for backwards compatibility with older versions) */
117
+ err = new VError(null, 'my error');
118
+ mod_assert.equal(err.message, 'my error');
119
+ mod_assert.ok(err.cause() === undefined);
120
+ stack = cleanStack(err.stack);
121
+ mod_assert.equal(stack, [
122
+ 'VError: my error',
123
+ ' at Object.<anonymous> (tst.verror.js)'
124
+ ].join('\n') + '\n' + nodestack);
125
+
126
+ err = new VError({ 'cause': null }, 'my error');
127
+ mod_assert.equal(err.message, 'my error');
128
+ mod_assert.ok(err.cause() === undefined);
129
+
130
+ err = new VError(null);
131
+ mod_assert.equal(err.message, '');
132
+ mod_assert.ok(err.cause() === undefined);
133
+ stack = cleanStack(err.stack);
134
+ mod_assert.equal(stack, [
135
+ 'VError',
136
+ ' at Object.<anonymous> (tst.verror.js)'
137
+ ].join('\n') + '\n' + nodestack);
138
+
139
+ /* constructorOpt */
140
+ function makeErr(options) {
141
+ return (new VError(options, 'test error'));
142
+ }
143
+ err = makeErr({});
144
+ stack = cleanStack(err.stack);
145
+ mod_assert.equal(stack, [
146
+ 'VError: test error',
147
+ ' at makeErr (tst.verror.js)',
148
+ ' at Object.<anonymous> (tst.verror.js)'
149
+ ].join('\n') + '\n' + nodestack);
150
+
151
+ err = makeErr({ 'constructorOpt': makeErr });
152
+ stack = cleanStack(err.stack);
153
+ mod_assert.equal(stack, [
154
+ 'VError: test error',
155
+ ' at Object.<anonymous> (tst.verror.js)'
156
+ ].join('\n') + '\n' + nodestack);