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.
- package/node_modules/node-pre-gyp/CHANGELOG.md +9 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +32 -0
- package/node_modules/node-pre-gyp/node_modules/mkdirp/node_modules/minimist/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/nopt/README.md +8 -7
- package/node_modules/node-pre-gyp/node_modules/nopt/package.json +16 -12
- 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
- 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
- package/node_modules/node-pre-gyp/node_modules/npmlog/node_modules/are-we-there-yet/node_modules/readable-stream/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/rc/lib/utils.js +2 -2
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/index.js +14 -2
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/package.json +10 -9
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/bool.js +23 -0
- package/node_modules/node-pre-gyp/node_modules/rc/node_modules/minimist/test/kv_short.js +16 -0
- package/node_modules/node-pre-gyp/node_modules/rc/package.json +9 -8
- package/node_modules/node-pre-gyp/node_modules/request/.travis.yml +1 -0
- package/node_modules/node-pre-gyp/node_modules/request/CHANGELOG.md +22 -2
- package/node_modules/node-pre-gyp/node_modules/request/README.md +42 -10
- package/node_modules/node-pre-gyp/node_modules/request/index.js +4 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/aws-sign2/package.json +1 -1
- 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
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/node_modules/inherits/package.json +1 -1
- 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
- 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
- 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
- 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
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/node_modules/readable-stream/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/bl/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/caseless/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/extend/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/forever-agent/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/Readme.md +44 -9
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/lib/form_data.js +48 -25
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/lib/async.js +13 -7
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/package.json +26 -11
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/package.json +29 -20
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/README.md +4 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.js +35 -11
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/browser/bluebird.min.js +5 -5
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/debuggability.js +2 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/direct_resolve.js +2 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promise.js +5 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/promisify.js +10 -5
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/js/main/using.js +14 -3
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/bluebird/package.json +9 -8
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/index.js +2 -2
- 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
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/package.json +22 -15
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/chalk/readme.md +3 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/commander/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/README.md +1 -1
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/har-validator/node_modules/is-my-json-valid/package.json +11 -10
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/.travis.yml +3 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js +39 -28
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/package.json +11 -12
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/boom/test/index.js +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/.npmignore +18 -18
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/.travis.yml +8 -5
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/README.md +2 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/package.json +24 -28
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/test/index.js +57 -63
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/.travis.yml +2 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/README.md +16 -6
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/images/hoek.png +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/lib/escape.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/lib/index.js +24 -8
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/package.json +13 -13
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/escaper.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/index.js +866 -778
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test1.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test2.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/test/modules/test3.js +0 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/sntp/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/assert-plus/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/http-signature/node_modules/ctype/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/isstream/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/HISTORY.md +24 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/index.js +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/HISTORY.md +33 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/db.json +50 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/node_modules/mime-db/package.json +12 -13
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/mime-types/package.json +9 -10
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/node-uuid/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/.npmignore +0 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/.travis.yml +3 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/CHANGELOG.md +13 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/README.md +11 -4
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/bower.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/component.json +15 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/dist/qs.js +523 -0
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/lib/parse.js +3 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/lib/stringify.js +28 -7
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/package.json +20 -18
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/test/parse.js +14 -14
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/qs/test/stringify.js +23 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/stringstream/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/request/package.json +12 -12
- package/node_modules/node-pre-gyp/node_modules/request/request.js +51 -30
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +3 -2
- package/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/package.json +2 -1
- package/node_modules/node-pre-gyp/node_modules/rimraf/package.json +9 -8
- package/node_modules/node-pre-gyp/node_modules/rimraf/rimraf.js +1 -1
- package/node_modules/node-pre-gyp/node_modules/semver/package.json +10 -12
- package/node_modules/node-pre-gyp/node_modules/semver/semver.js +1 -0
- package/node_modules/node-pre-gyp/node_modules/semver/test/index.js +21 -8
- package/node_modules/node-pre-gyp/node_modules/tar/lib/entry.js +7 -0
- package/node_modules/node-pre-gyp/node_modules/tar/lib/parse.js +5 -1
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/fs.js +21 -11
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/graceful-fs.js +208 -115
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/package.json +18 -17
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/polyfills.js +130 -133
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/package.json +18 -14
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/inherits/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/tar/package.json +22 -15
- package/node_modules/node-pre-gyp/node_modules/tar/test/parse-discard.js +29 -0
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/inherits/package.json +1 -1
- 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
- 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
- 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
- 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
- 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
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/package.json +1 -1
- package/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/readable-stream/package.json +1 -1
- package/node_modules/node-pre-gyp/package.json +10 -10
- package/package.json +2 -2
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/.jscsrc +0 -3
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/CHANGELOG.md +0 -81
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/README.md +0 -1789
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/form-data/node_modules/async/support/sync-package-managers.js +0 -53
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/Makefile +0 -9
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/cryptiles/index.js +0 -1
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/Makefile +0 -8
- package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/index.js +0 -1
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/.npmignore +0 -1
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/LICENSE +0 -15
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/max-open.js +0 -69
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/open.js +0 -39
- package/node_modules/node-pre-gyp/node_modules/tar/node_modules/fstream/node_modules/graceful-fs/test/readdir-sort.js +0 -20
- 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
|
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 =
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
247
|
+
return internals.create(417, message, data, exports.expectationFailed);
|
244
248
|
};
|
245
249
|
|
246
250
|
exports.badData = function (message, data) {
|
247
251
|
|
248
|
-
return
|
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
|
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
|
-
|
266
|
+
return internals.serverError(message, data, statusCode, exports.internal);
|
267
|
+
};
|
268
|
+
|
269
|
+
internals.serverError = function (message, data, statusCode, ctor) {
|
263
270
|
|
264
|
-
|
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
|
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
|
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
|
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
|
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 =
|
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.
|
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.
|
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": "
|
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.
|
35
|
-
"_shasum": "
|
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
|
+
"_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": "
|
59
|
-
"tarball": "http://registry.npmjs.org/boom/-/boom-2.
|
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.
|
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,65 +1,61 @@
|
|
1
1
|
{
|
2
2
|
"name": "cryptiles",
|
3
3
|
"description": "General purpose crypto utilities",
|
4
|
-
"version": "2.0.
|
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.
|
16
|
+
"node": ">=0.10.40"
|
23
17
|
},
|
24
18
|
"dependencies": {
|
25
19
|
"boom": "2.x.x"
|
26
20
|
},
|
27
21
|
"devDependencies": {
|
28
|
-
"
|
22
|
+
"code": "1.x.x",
|
23
|
+
"lab": "5.x.x"
|
29
24
|
},
|
30
25
|
"scripts": {
|
31
|
-
"test": "
|
26
|
+
"test": "lab -a code -t 100 -L",
|
27
|
+
"test-cov-html": "lab -a code -r html -o coverage.html"
|
32
28
|
},
|
33
|
-
"
|
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.
|
45
|
-
"_shasum": "
|
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": "
|
38
|
+
"_npmVersion": "2.14.2",
|
39
|
+
"_nodeVersion": "4.0.0",
|
48
40
|
"_npmUser": {
|
49
41
|
"name": "hueniverse",
|
50
|
-
"email": "eran@
|
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.
|
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
|
16
|
-
var
|
17
|
-
var
|
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('
|
21
|
+
describe('randomString()', function () {
|
23
22
|
|
24
|
-
|
23
|
+
it('should generate the right length string', function (done) {
|
25
24
|
|
26
|
-
|
25
|
+
for (var i = 1; i <= 1000; ++i) {
|
26
|
+
expect(Cryptiles.randomString(i).length).to.equal(i);
|
27
|
+
}
|
27
28
|
|
28
|
-
|
29
|
-
|
30
|
-
}
|
31
|
-
|
32
|
-
done();
|
33
|
-
});
|
29
|
+
done();
|
30
|
+
});
|
34
31
|
|
35
|
-
|
32
|
+
it('returns an error on invalid bits size', function (done) {
|
36
33
|
|
37
|
-
|
38
|
-
|
39
|
-
});
|
34
|
+
expect(Cryptiles.randomString(99999999999999999999).message).to.match(/Failed generating random bits/);
|
35
|
+
done();
|
40
36
|
});
|
37
|
+
});
|
41
38
|
|
42
|
-
|
39
|
+
describe('randomBits()', function () {
|
43
40
|
|
44
|
-
|
41
|
+
it('returns an error on invalid input', function (done) {
|
45
42
|
|
46
|
-
|
47
|
-
|
48
|
-
});
|
43
|
+
expect(Cryptiles.randomBits(0).message).to.equal('Invalid random bits count');
|
44
|
+
done();
|
49
45
|
});
|
46
|
+
});
|
50
47
|
|
51
|
-
|
48
|
+
describe('fixedTimeComparison()', function () {
|
52
49
|
|
53
|
-
|
54
|
-
|
50
|
+
var a = Cryptiles.randomString(50000);
|
51
|
+
var b = Cryptiles.randomString(150000);
|
55
52
|
|
56
|
-
|
53
|
+
it('should take the same amount of time comparing different string sizes', function (done) {
|
57
54
|
|
58
|
-
|
59
|
-
|
60
|
-
|
55
|
+
var now = Date.now();
|
56
|
+
Cryptiles.fixedTimeComparison(b, a);
|
57
|
+
var t1 = Date.now() - now;
|
61
58
|
|
62
|
-
|
63
|
-
|
64
|
-
|
59
|
+
now = Date.now();
|
60
|
+
Cryptiles.fixedTimeComparison(b, b);
|
61
|
+
var t2 = Date.now() - now;
|
65
62
|
|
66
|
-
|
67
|
-
|
68
|
-
|
63
|
+
expect(t2 - t1).to.be.within(-20, 20);
|
64
|
+
done();
|
65
|
+
});
|
69
66
|
|
70
|
-
|
67
|
+
it('should return true for equal strings', function (done) {
|
71
68
|
|
72
|
-
|
73
|
-
|
74
|
-
|
69
|
+
expect(Cryptiles.fixedTimeComparison(a, a)).to.equal(true);
|
70
|
+
done();
|
71
|
+
});
|
75
72
|
|
76
|
-
|
73
|
+
it('should return false for different strings (size, a < b)', function (done) {
|
77
74
|
|
78
|
-
|
79
|
-
|
80
|
-
|
75
|
+
expect(Cryptiles.fixedTimeComparison(a, a + 'x')).to.equal(false);
|
76
|
+
done();
|
77
|
+
});
|
81
78
|
|
82
|
-
|
79
|
+
it('should return false for different strings (size, a > b)', function (done) {
|
83
80
|
|
84
|
-
|
85
|
-
|
86
|
-
|
81
|
+
expect(Cryptiles.fixedTimeComparison(a + 'x', a)).to.equal(false);
|
82
|
+
done();
|
83
|
+
});
|
87
84
|
|
88
|
-
|
85
|
+
it('should return false for different strings (size, a = b)', function (done) {
|
89
86
|
|
90
|
-
|
91
|
-
|
92
|
-
|
87
|
+
expect(Cryptiles.fixedTimeComparison(a + 'x', a + 'y')).to.equal(false);
|
88
|
+
done();
|
89
|
+
});
|
93
90
|
|
94
|
-
|
91
|
+
it('should return false when not a string', function (done) {
|
95
92
|
|
96
|
-
|
97
|
-
|
98
|
-
|
93
|
+
expect(Cryptiles.fixedTimeComparison('x', null)).to.equal(false);
|
94
|
+
done();
|
95
|
+
});
|
99
96
|
|
100
|
-
|
97
|
+
it('should return false when not a string (left)', function (done) {
|
101
98
|
|
102
|
-
|
103
|
-
|
104
|
-
});
|
99
|
+
expect(Cryptiles.fixedTimeComparison(null, 'x')).to.equal(false);
|
100
|
+
done();
|
105
101
|
});
|
106
102
|
});
|
107
|
-
|
108
|
-
|
package/node_modules/node-pre-gyp/node_modules/request/node_modules/hawk/node_modules/hoek/LICENSE
CHANGED
File without changes
|