fsevents 1.0.0 → 1.0.1

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

Potentially problematic release.


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

Files changed (149) hide show
  1. package/node_modules/node-pre-gyp/CHANGELOG.md +9 -0
  2. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +32 -0
  3. package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/package.json +2 -1
  4. package/node_modules/node-pre-gyp/node_modules/nopt/README.md +8 -7
  5. package/node_modules/node-pre-gyp/node_modules/nopt/package.json +16 -12
  6. package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/core-util-is/package.json +1 -1
  7. package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/node_modules/inherits/package.json +1 -1
  8. package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/package.json +1 -1
  9. package/node_modules/node-pre-gyp/node_modules/rc/lib/utils.js +2 -2
  10. package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/index.js +14 -2
  11. package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/package.json +10 -9
  12. package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/bool.js +23 -0
  13. package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/kv_short.js +16 -0
  14. package/node_modules/node-pre-gyp/node_modules/rc/package.json +9 -8
  15. package/node_modules/node-pre-gyp/node_modules/request/.travis.yml +1 -0
  16. package/node_modules/node-pre-gyp/node_modules/request/CHANGELOG.md +22 -2
  17. package/node_modules/node-pre-gyp/node_modules/request/README.md +42 -10
  18. package/node_modules/node-pre-gyp/node_modules/request/index.js +4 -0
  19. package/node_modules/node-pre-gyp/node_modules/request/node_modules/aws-sign2/package.json +1 -1
  20. package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json +1 -1
  21. package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits/package.json +1 -1
  22. package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/index.js +1 -1
  23. package/node_modules/node-pre-gyp/node_modules/request/node_modules/{form-data/node_modules/async/LICENSE → bl/node_modules/readable-stream/node_modules/process-nextick-args/license.md} +6 -6
  24. package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/package.json +10 -9
  25. package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/process-nextick-args/test.js +7 -0
  26. package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json +2 -1
  27. package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/package.json +2 -1
  28. package/node_modules/node-pre-gyp/node_modules/request/node_modules/caseless/package.json +2 -1
  29. package/node_modules/node-pre-gyp/node_modules/request/node_modules/extend/package.json +2 -1
  30. package/node_modules/node-pre-gyp/node_modules/request/node_modules/forever-agent/package.json +1 -1
  31. package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/Readme.md +44 -9
  32. package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/lib/form_data.js +48 -25
  33. package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +13 -7
  34. package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/package.json +26 -11
  35. package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/package.json +29 -20
  36. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/README.md +4 -1
  37. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.js +35 -11
  38. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.min.js +5 -5
  39. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/debuggability.js +2 -0
  40. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/direct_resolve.js +2 -0
  41. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise.js +5 -1
  42. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promisify.js +10 -5
  43. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/using.js +14 -3
  44. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/package.json +9 -8
  45. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/index.js +2 -2
  46. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/node_modules/escape-string-regexp/package.json +1 -1
  47. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/package.json +22 -15
  48. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/readme.md +3 -2
  49. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/package.json +1 -1
  50. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/README.md +1 -1
  51. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-function/package.json +1 -1
  52. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/generate-object-property/package.json +1 -1
  53. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/.travis.yml +6 -2
  54. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/README.md +3 -2
  55. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/jsonpointer.js +7 -10
  56. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/package.json +24 -20
  57. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/node_modules/jsonpointer/test.js +11 -13
  58. package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json +11 -10
  59. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +3 -2
  60. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +39 -28
  61. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/package.json +11 -12
  62. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +1 -1
  63. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +18 -18
  64. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +8 -5
  65. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +2 -0
  66. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +24 -28
  67. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +57 -63
  68. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +2 -2
  69. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +0 -0
  70. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +16 -6
  71. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
  72. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +0 -0
  73. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +24 -8
  74. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +13 -13
  75. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +0 -0
  76. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +866 -778
  77. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +0 -0
  78. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +0 -0
  79. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +0 -0
  80. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +1 -1
  81. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/package.json +2 -1
  82. package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +1 -1
  83. package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +1 -1
  84. package/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/package.json +1 -1
  85. package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/HISTORY.md +24 -0
  86. package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/index.js +1 -1
  87. package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md +33 -0
  88. package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json +50 -0
  89. package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json +12 -13
  90. package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/package.json +9 -10
  91. package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/package.json +1 -1
  92. package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/.npmignore +0 -1
  93. package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/.travis.yml +3 -2
  94. package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/CHANGELOG.md +13 -2
  95. package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/README.md +11 -4
  96. package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/bower.json +1 -1
  97. package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/component.json +15 -0
  98. package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/dist/qs.js +523 -0
  99. package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/lib/parse.js +3 -2
  100. package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/lib/stringify.js +28 -7
  101. package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/package.json +20 -18
  102. package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/test/parse.js +14 -14
  103. package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/test/stringify.js +23 -1
  104. package/node_modules/node-pre-gyp/node_modules/request/node_modules/stringstream/package.json +1 -1
  105. package/node_modules/node-pre-gyp/node_modules/request/package.json +12 -12
  106. package/node_modules/node-pre-gyp/node_modules/request/request.js +51 -30
  107. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +1 -1
  108. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +3 -2
  109. package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/package.json +2 -1
  110. package/node_modules/node-pre-gyp/node_modules/rimraf/package.json +9 -8
  111. package/node_modules/node-pre-gyp/node_modules/rimraf/rimraf.js +1 -1
  112. package/node_modules/node-pre-gyp/node_modules/semver/package.json +10 -12
  113. package/node_modules/node-pre-gyp/node_modules/semver/semver.js +1 -0
  114. package/node_modules/node-pre-gyp/node_modules/semver/test/index.js +21 -8
  115. package/node_modules/node-pre-gyp/node_modules/tar/lib/entry.js +7 -0
  116. package/node_modules/node-pre-gyp/node_modules/tar/lib/parse.js +5 -1
  117. package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/fs.js +21 -11
  118. package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js +208 -115
  119. package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/legacy-streams.js +118 -0
  120. package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/package.json +18 -17
  121. package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/polyfills.js +130 -133
  122. package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/package.json +18 -14
  123. package/node_modules/node-pre-gyp/node_modules/tar/node_modules/inherits/package.json +1 -1
  124. package/node_modules/node-pre-gyp/node_modules/tar/package.json +22 -15
  125. package/node_modules/node-pre-gyp/node_modules/tar/test/parse-discard.js +29 -0
  126. package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/inherits/package.json +1 -1
  127. package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/README.md +12 -2
  128. package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +48 -4
  129. package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/package.json +9 -9
  130. package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/test/basic.js +26 -25
  131. package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/test/serialize.js +216 -0
  132. package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/package.json +1 -1
  133. package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/package.json +1 -1
  134. package/node_modules/node-pre-gyp/package.json +10 -10
  135. package/package.json +2 -2
  136. package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/.jscsrc +0 -3
  137. package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/CHANGELOG.md +0 -81
  138. package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/README.md +0 -1789
  139. package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/support/sync-package-managers.js +0 -53
  140. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +0 -9
  141. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +0 -1
  142. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +0 -8
  143. package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +0 -1
  144. package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/.npmignore +0 -1
  145. package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/LICENSE +0 -15
  146. package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/max-open.js +0 -69
  147. package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/open.js +0 -39
  148. package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/readdir-sort.js +0 -20
  149. package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/write-then-read.js +0 -47
@@ -8,7 +8,6 @@ var Hoek = require('hoek');
8
8
 
9
9
  var internals = {};
10
10
 
11
-
12
11
  exports.wrap = function (error, statusCode, message) {
13
12
 
14
13
  Hoek.assert(error instanceof Error, 'Cannot wrap non-Error object');
@@ -18,13 +17,18 @@ exports.wrap = function (error, statusCode, message) {
18
17
 
19
18
  exports.create = function (statusCode, message, data) {
20
19
 
20
+ return internals.create(statusCode, message, data, exports.create);
21
+ };
22
+
23
+ internals.create = function (statusCode, message, data, ctor) {
24
+
21
25
  var error = new Error(message ? message : undefined); // Avoids settings null message
26
+ Error.captureStackTrace(error, ctor); // Filter the stack to our external API
22
27
  error.data = data || null;
23
28
  internals.initialize(error, statusCode);
24
29
  return error;
25
30
  };
26
31
 
27
-
28
32
  internals.initialize = function (error, statusCode, message) {
29
33
 
30
34
  var numberCode = parseInt(statusCode, 10);
@@ -78,13 +82,13 @@ internals.reformat = function () {
78
82
 
79
83
  exports.badRequest = function (message, data) {
80
84
 
81
- return exports.create(400, message, data);
85
+ return internals.create(400, message, data, exports.badRequest);
82
86
  };
83
87
 
84
88
 
85
89
  exports.unauthorized = function (message, scheme, attributes) { // Or function (message, wwwAuthenticate[])
86
90
 
87
- var err = exports.create(401, message);
91
+ var err = internals.create(401, message, undefined, exports.unauthorized);
88
92
 
89
93
  if (!scheme) {
90
94
  return err;
@@ -156,102 +160,102 @@ exports.unauthorized = function (message, scheme, attributes) { // Or f
156
160
 
157
161
  exports.forbidden = function (message, data) {
158
162
 
159
- return exports.create(403, message, data);
163
+ return internals.create(403, message, data, exports.forbidden);
160
164
  };
161
165
 
162
166
 
163
167
  exports.notFound = function (message, data) {
164
168
 
165
- return exports.create(404, message, data);
169
+ return internals.create(404, message, data, exports.notFound);
166
170
  };
167
171
 
168
172
 
169
173
  exports.methodNotAllowed = function (message, data) {
170
174
 
171
- return exports.create(405, message, data);
175
+ return internals.create(405, message, data, exports.methodNotAllowed);
172
176
  };
173
177
 
174
178
 
175
179
  exports.notAcceptable = function (message, data) {
176
180
 
177
- return exports.create(406, message, data);
181
+ return internals.create(406, message, data, exports.notAcceptable);
178
182
  };
179
183
 
180
184
 
181
185
  exports.proxyAuthRequired = function (message, data) {
182
186
 
183
- return exports.create(407, message, data);
187
+ return internals.create(407, message, data, exports.proxyAuthRequired);
184
188
  };
185
189
 
186
190
 
187
191
  exports.clientTimeout = function (message, data) {
188
192
 
189
- return exports.create(408, message, data);
193
+ return internals.create(408, message, data, exports.clientTimeout);
190
194
  };
191
195
 
192
196
 
193
197
  exports.conflict = function (message, data) {
194
198
 
195
- return exports.create(409, message, data);
199
+ return internals.create(409, message, data, exports.conflict);
196
200
  };
197
201
 
198
202
 
199
203
  exports.resourceGone = function (message, data) {
200
204
 
201
- return exports.create(410, message, data);
205
+ return internals.create(410, message, data, exports.resourceGone);
202
206
  };
203
207
 
204
208
 
205
209
  exports.lengthRequired = function (message, data) {
206
210
 
207
- return exports.create(411, message, data);
211
+ return internals.create(411, message, data, exports.lengthRequired);
208
212
  };
209
213
 
210
214
 
211
215
  exports.preconditionFailed = function (message, data) {
212
216
 
213
- return exports.create(412, message, data);
217
+ return internals.create(412, message, data, exports.preconditionFailed);
214
218
  };
215
219
 
216
220
 
217
221
  exports.entityTooLarge = function (message, data) {
218
222
 
219
- return exports.create(413, message, data);
223
+ return internals.create(413, message, data, exports.entityTooLarge);
220
224
  };
221
225
 
222
226
 
223
227
  exports.uriTooLong = function (message, data) {
224
228
 
225
- return exports.create(414, message, data);
229
+ return internals.create(414, message, data, exports.uriTooLong);
226
230
  };
227
231
 
228
232
 
229
233
  exports.unsupportedMediaType = function (message, data) {
230
234
 
231
- return exports.create(415, message, data);
235
+ return internals.create(415, message, data, exports.unsupportedMediaType);
232
236
  };
233
237
 
234
238
 
235
239
  exports.rangeNotSatisfiable = function (message, data) {
236
240
 
237
- return exports.create(416, message, data);
241
+ return internals.create(416, message, data, exports.rangeNotSatisfiable);
238
242
  };
239
243
 
240
244
 
241
245
  exports.expectationFailed = function (message, data) {
242
246
 
243
- return exports.create(417, message, data);
247
+ return internals.create(417, message, data, exports.expectationFailed);
244
248
  };
245
249
 
246
250
  exports.badData = function (message, data) {
247
251
 
248
- return exports.create(422, message, data);
252
+ return internals.create(422, message, data, exports.badData);
249
253
  };
250
254
 
251
255
 
252
256
  exports.tooManyRequests = function (message, data) {
253
257
 
254
- return exports.create(429, message, data);
258
+ return internals.create(429, message, data, exports.tooManyRequests);
255
259
  };
256
260
 
257
261
 
@@ -259,9 +263,16 @@ exports.tooManyRequests = function (message, data) {
259
263
 
260
264
  exports.internal = function (message, data, statusCode) {
261
265
 
262
- var error = (data instanceof Error ? exports.wrap(data, statusCode, message) : exports.create(statusCode || 500, message));
266
+ return internals.serverError(message, data, statusCode, exports.internal);
267
+ };
268
+
269
+ internals.serverError = function (message, data, statusCode, ctor) {
263
270
 
264
- if (data instanceof Error === false) {
271
+ var error;
272
+ if (data instanceof Error) {
273
+ error = exports.wrap(data, statusCode, message);
274
+ } else {
275
+ error = internals.create(statusCode || 500, message, ctor);
265
276
  error.data = data;
266
277
  }
267
278
 
@@ -271,31 +282,31 @@ exports.internal = function (message, data, statusCode) {
271
282
 
272
283
  exports.notImplemented = function (message, data) {
273
284
 
274
- return exports.internal(message, data, 501);
285
+ return internals.serverError(message, data, 501, exports.notImplemented);
275
286
  };
276
287
 
277
288
 
278
289
  exports.badGateway = function (message, data) {
279
290
 
280
- return exports.internal(message, data, 502);
291
+ return internals.serverError(message, data, 502, exports.badGateway);
281
292
  };
282
293
 
283
294
 
284
295
  exports.serverTimeout = function (message, data) {
285
296
 
286
- return exports.internal(message, data, 503);
297
+ return internals.serverError(message, data, 503, exports.serverTimeout);
287
298
  };
288
299
 
289
300
 
290
301
  exports.gatewayTimeout = function (message, data) {
291
302
 
292
- return exports.internal(message, data, 504);
303
+ return internals.serverError(message, data, 504, exports.gatewayTimeout);
293
304
  };
294
305
 
295
306
 
296
307
  exports.badImplementation = function (message, data) {
297
308
 
298
- var err = exports.internal(message, data, 500);
309
+ var err = internals.serverError(message, data, 500, exports.badImplementation);
299
310
  err.isDeveloperError = true;
300
311
  return err;
301
312
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "boom",
3
3
  "description": "HTTP-friendly error objects",
4
- "version": "2.8.0",
4
+ "version": "2.9.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git://github.com/hapijs/boom.git"
@@ -12,7 +12,7 @@
12
12
  "http"
13
13
  ],
14
14
  "engines": {
15
- "node": ">=0.8.0"
15
+ "node": ">=0.10.40"
16
16
  },
17
17
  "dependencies": {
18
18
  "hoek": "2.x.x"
@@ -22,20 +22,20 @@
22
22
  "lab": "5.x.x"
23
23
  },
24
24
  "scripts": {
25
- "test": "lab -a code -t 100",
26
- "test-cov-html": "lab -a code -r html -o coverage.html"
25
+ "test": "lab -a code -t 100 -L",
26
+ "test-cov-html": "lab -a code -r html -o coverage.html -L"
27
27
  },
28
28
  "license": "BSD-3-Clause",
29
- "gitHead": "43f13bf2d336b35ccbb062b32ba2a17259f6d24c",
29
+ "gitHead": "2ffee0e9d9868140911d30c7acfd7925e534623e",
30
30
  "bugs": {
31
31
  "url": "https://github.com/hapijs/boom/issues"
32
32
  },
33
33
  "homepage": "https://github.com/hapijs/boom#readme",
34
- "_id": "boom@2.8.0",
35
- "_shasum": "317bdfd47018fe7dd79b0e9da73efe244119fdf1",
34
+ "_id": "boom@2.9.0",
35
+ "_shasum": "a54b7fd2fee477d351bf9e371680cbea67f12715",
36
36
  "_from": "boom@^2.8.x",
37
37
  "_npmVersion": "2.11.1",
38
- "_nodeVersion": "0.10.38",
38
+ "_nodeVersion": "0.10.40",
39
39
  "_npmUser": {
40
40
  "name": "arb",
41
41
  "email": "arbretz@gmail.com"
@@ -55,10 +55,9 @@
55
55
  }
56
56
  ],
57
57
  "dist": {
58
- "shasum": "317bdfd47018fe7dd79b0e9da73efe244119fdf1",
59
- "tarball": "http://registry.npmjs.org/boom/-/boom-2.8.0.tgz"
58
+ "shasum": "a54b7fd2fee477d351bf9e371680cbea67f12715",
59
+ "tarball": "http://registry.npmjs.org/boom/-/boom-2.9.0.tgz"
60
60
  },
61
61
  "directories": {},
62
- "_resolved": "https://registry.npmjs.org/boom/-/boom-2.8.0.tgz",
63
- "readme": "ERROR: No README data found!"
62
+ "_resolved": "https://registry.npmjs.org/boom/-/boom-2.9.0.tgz"
64
63
  }
@@ -79,7 +79,7 @@ it('will cast a number-string to an integer', function (done) {
79
79
  { input: '404', result: 404 },
80
80
  { input: '404.1', result: 404 },
81
81
  { input: 400, result: 400 },
82
- { input: 400.123, result: 400 }]
82
+ { input: 400.123, result: 400 }];
83
83
  for (var i = 0, il = codes.length; i < il; ++i) {
84
84
  var code = codes[i];
85
85
  var err = Boom.create(code.input);
@@ -1,18 +1,18 @@
1
- .idea
2
- *.iml
3
- npm-debug.log
4
- dump.rdb
5
- node_modules
6
- results.tap
7
- results.xml
8
- npm-shrinkwrap.json
9
- config.json
10
- .DS_Store
11
- */.DS_Store
12
- */*/.DS_Store
13
- ._*
14
- */._*
15
- */*/._*
16
- coverage.*
17
- lib-cov
18
-
1
+ .idea
2
+ *.iml
3
+ npm-debug.log
4
+ dump.rdb
5
+ node_modules
6
+ results.tap
7
+ results.xml
8
+ npm-shrinkwrap.json
9
+ config.json
10
+ .DS_Store
11
+ */.DS_Store
12
+ */*/.DS_Store
13
+ ._*
14
+ */._*
15
+ */*/._*
16
+ coverage.*
17
+ lib-cov
18
+
@@ -1,5 +1,8 @@
1
- language: node_js
2
-
3
- node_js:
4
- - 0.10
5
-
1
+ language: node_js
2
+
3
+ node_js:
4
+ - 0.10
5
+ - 4.0
6
+
7
+ sudo: false
8
+
@@ -5,6 +5,8 @@ General purpose crypto utilities
5
5
 
6
6
  [![Build Status](https://secure.travis-ci.org/hapijs/cryptiles.png)](http://travis-ci.org/hapijs/cryptiles)
7
7
 
8
+ Lead Maintainer - [C J Silverio](https://github.com/ceejbot)
9
+
8
10
  ## Methods
9
11
 
10
12
  ### `randomString(<Number> size)`
@@ -1,65 +1,61 @@
1
1
  {
2
2
  "name": "cryptiles",
3
3
  "description": "General purpose crypto utilities",
4
- "version": "2.0.4",
5
- "author": {
6
- "name": "Eran Hammer",
7
- "email": "eran@hammer.io",
8
- "url": "http://hueniverse.com"
9
- },
10
- "contributors": [],
4
+ "version": "2.0.5",
11
5
  "repository": {
12
6
  "type": "git",
13
7
  "url": "git://github.com/hapijs/cryptiles.git"
14
8
  },
15
- "main": "index",
9
+ "main": "lib/index.js",
16
10
  "keywords": [
17
11
  "cryptography",
18
12
  "security",
19
13
  "utilites"
20
14
  ],
21
15
  "engines": {
22
- "node": ">=0.8.0"
16
+ "node": ">=0.10.40"
23
17
  },
24
18
  "dependencies": {
25
19
  "boom": "2.x.x"
26
20
  },
27
21
  "devDependencies": {
28
- "lab": "4.x.x"
22
+ "code": "1.x.x",
23
+ "lab": "5.x.x"
29
24
  },
30
25
  "scripts": {
31
- "test": "make test-cov"
26
+ "test": "lab -a code -t 100 -L",
27
+ "test-cov-html": "lab -a code -r html -o coverage.html"
32
28
  },
33
- "licenses": [
34
- {
35
- "type": "BSD",
36
- "url": "http://github.com/hapijs/cryptiles/raw/master/LICENSE"
37
- }
38
- ],
39
- "gitHead": "944263dbb628b9b3da542d35600d587f861eeaf0",
29
+ "license": "BSD-3-Clause",
30
+ "gitHead": "9bc5a852f01cd51e615814e1cb255fe2df810649",
40
31
  "bugs": {
41
32
  "url": "https://github.com/hapijs/cryptiles/issues"
42
33
  },
43
- "homepage": "https://github.com/hapijs/cryptiles",
44
- "_id": "cryptiles@2.0.4",
45
- "_shasum": "09ea1775b9e1c7de7e60a99d42ab6f08ce1a1285",
34
+ "homepage": "https://github.com/hapijs/cryptiles#readme",
35
+ "_id": "cryptiles@2.0.5",
36
+ "_shasum": "3bdfecdc608147c1c67202fa291e7dca59eaa3b8",
46
37
  "_from": "cryptiles@2.x.x",
47
- "_npmVersion": "1.4.23",
38
+ "_npmVersion": "2.14.2",
39
+ "_nodeVersion": "4.0.0",
48
40
  "_npmUser": {
49
41
  "name": "hueniverse",
50
- "email": "eran@hueniverse.com"
42
+ "email": "eran@hammer.io"
43
+ },
44
+ "dist": {
45
+ "shasum": "3bdfecdc608147c1c67202fa291e7dca59eaa3b8",
46
+ "tarball": "http://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz"
51
47
  },
52
48
  "maintainers": [
53
49
  {
54
50
  "name": "hueniverse",
55
51
  "email": "eran@hueniverse.com"
52
+ },
53
+ {
54
+ "name": "ceejbot",
55
+ "email": "ceejceej@gmail.com"
56
56
  }
57
57
  ],
58
- "dist": {
59
- "shasum": "09ea1775b9e1c7de7e60a99d42ab6f08ce1a1285",
60
- "tarball": "http://registry.npmjs.org/cryptiles/-/cryptiles-2.0.4.tgz"
61
- },
62
58
  "directories": {},
63
- "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.4.tgz",
59
+ "_resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
64
60
  "readme": "ERROR: No README data found!"
65
61
  }
@@ -1,7 +1,8 @@
1
1
  // Load modules
2
2
 
3
+ var Code = require('code');
4
+ var Cryptiles = require('..');
3
5
  var Lab = require('lab');
4
- var Cryptiles = require('../lib');
5
6
 
6
7
 
7
8
  // Declare internals
@@ -12,97 +13,90 @@ var internals = {};
12
13
  // Test shortcuts
13
14
 
14
15
  var lab = exports.lab = Lab.script();
15
- var before = lab.before;
16
- var after = lab.after;
17
- var describe = lab.experiment;
18
- var it = lab.test;
19
- var expect = Lab.expect;
16
+ var describe = lab.describe;
17
+ var it = lab.it;
18
+ var expect = Code.expect;
20
19
 
21
20
 
22
- describe('Cryptiles', function () {
21
+ describe('randomString()', function () {
23
22
 
24
- describe('#randomString', function () {
23
+ it('should generate the right length string', function (done) {
25
24
 
26
- it('should generate the right length string', function (done) {
25
+ for (var i = 1; i <= 1000; ++i) {
26
+ expect(Cryptiles.randomString(i).length).to.equal(i);
27
+ }
27
28
 
28
- for (var i = 1; i <= 1000; ++i) {
29
- expect(Cryptiles.randomString(i).length).to.equal(i);
30
- }
31
-
32
- done();
33
- });
29
+ done();
30
+ });
34
31
 
35
- it('returns an error on invalid bits size', function (done) {
32
+ it('returns an error on invalid bits size', function (done) {
36
33
 
37
- expect(Cryptiles.randomString(99999999999999999999).message).to.equal('Failed generating random bits: Argument #1 must be number > 0');
38
- done();
39
- });
34
+ expect(Cryptiles.randomString(99999999999999999999).message).to.match(/Failed generating random bits/);
35
+ done();
40
36
  });
37
+ });
41
38
 
42
- describe('#randomBits', function () {
39
+ describe('randomBits()', function () {
43
40
 
44
- it('returns an error on invalid input', function (done) {
41
+ it('returns an error on invalid input', function (done) {
45
42
 
46
- expect(Cryptiles.randomBits(0).message).to.equal('Invalid random bits count');
47
- done();
48
- });
43
+ expect(Cryptiles.randomBits(0).message).to.equal('Invalid random bits count');
44
+ done();
49
45
  });
46
+ });
50
47
 
51
- describe('#fixedTimeComparison', function () {
48
+ describe('fixedTimeComparison()', function () {
52
49
 
53
- var a = Cryptiles.randomString(50000);
54
- var b = Cryptiles.randomString(150000);
50
+ var a = Cryptiles.randomString(50000);
51
+ var b = Cryptiles.randomString(150000);
55
52
 
56
- it('should take the same amount of time comparing different string sizes', function (done) {
53
+ it('should take the same amount of time comparing different string sizes', function (done) {
57
54
 
58
- var now = Date.now();
59
- Cryptiles.fixedTimeComparison(b, a);
60
- var t1 = Date.now() - now;
55
+ var now = Date.now();
56
+ Cryptiles.fixedTimeComparison(b, a);
57
+ var t1 = Date.now() - now;
61
58
 
62
- now = Date.now();
63
- Cryptiles.fixedTimeComparison(b, b);
64
- var t2 = Date.now() - now;
59
+ now = Date.now();
60
+ Cryptiles.fixedTimeComparison(b, b);
61
+ var t2 = Date.now() - now;
65
62
 
66
- expect(t2 - t1).to.be.within(-20, 20);
67
- done();
68
- });
63
+ expect(t2 - t1).to.be.within(-20, 20);
64
+ done();
65
+ });
69
66
 
70
- it('should return true for equal strings', function (done) {
67
+ it('should return true for equal strings', function (done) {
71
68
 
72
- expect(Cryptiles.fixedTimeComparison(a, a)).to.equal(true);
73
- done();
74
- });
69
+ expect(Cryptiles.fixedTimeComparison(a, a)).to.equal(true);
70
+ done();
71
+ });
75
72
 
76
- it('should return false for different strings (size, a < b)', function (done) {
73
+ it('should return false for different strings (size, a < b)', function (done) {
77
74
 
78
- expect(Cryptiles.fixedTimeComparison(a, a + 'x')).to.equal(false);
79
- done();
80
- });
75
+ expect(Cryptiles.fixedTimeComparison(a, a + 'x')).to.equal(false);
76
+ done();
77
+ });
81
78
 
82
- it('should return false for different strings (size, a > b)', function (done) {
79
+ it('should return false for different strings (size, a > b)', function (done) {
83
80
 
84
- expect(Cryptiles.fixedTimeComparison(a + 'x', a)).to.equal(false);
85
- done();
86
- });
81
+ expect(Cryptiles.fixedTimeComparison(a + 'x', a)).to.equal(false);
82
+ done();
83
+ });
87
84
 
88
- it('should return false for different strings (size, a = b)', function (done) {
85
+ it('should return false for different strings (size, a = b)', function (done) {
89
86
 
90
- expect(Cryptiles.fixedTimeComparison(a + 'x', a + 'y')).to.equal(false);
91
- done();
92
- });
87
+ expect(Cryptiles.fixedTimeComparison(a + 'x', a + 'y')).to.equal(false);
88
+ done();
89
+ });
93
90
 
94
- it('should return false when not a string', function (done) {
91
+ it('should return false when not a string', function (done) {
95
92
 
96
- expect(Cryptiles.fixedTimeComparison('x', null)).to.equal(false);
97
- done();
98
- });
93
+ expect(Cryptiles.fixedTimeComparison('x', null)).to.equal(false);
94
+ done();
95
+ });
99
96
 
100
- it('should return false when not a string (left)', function (done) {
97
+ it('should return false when not a string (left)', function (done) {
101
98
 
102
- expect(Cryptiles.fixedTimeComparison(null, 'x')).to.equal(false);
103
- done();
104
- });
99
+ expect(Cryptiles.fixedTimeComparison(null, 'x')).to.equal(false);
100
+ done();
105
101
  });
106
102
  });
107
-
108
-
@@ -2,6 +2,6 @@ language: node_js
2
2
 
3
3
  node_js:
4
4
  - 0.10
5
- - 0.12
6
- - iojs
5
+ - 4.0
7
6
 
7
+ sudo: false