fsevents 1.1.1 → 1.1.2
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/.travis.yml +7 -9
- package/build/.target.mk +6 -2
- package/build/Makefile +6 -6
- package/build/Release/.deps/Release/.node.d +1 -0
- package/build/Release/.deps/Release/fse.node.d +1 -0
- package/build/Release/.deps/Release/obj.target/action_after_build.stamp.d +1 -0
- package/build/Release/.deps/Release/obj.target/fse/fsevents.o.d +65 -0
- package/build/Release/.deps/Users/eshanker/Code/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node.d +1 -0
- package/build/Release/.node +0 -0
- package/build/Release/fse.node +0 -0
- package/build/Release/obj.target/action_after_build.stamp +0 -0
- package/build/Release/obj.target/fse/fsevents.o +0 -0
- package/build/action_after_build.target.mk +4 -4
- package/build/fse.target.mk +22 -12
- package/build/gyp-mac-tool +1 -2
- package/build/stage/v1.1.2/fse-v1.1.2-node-v48-darwin-x64.tar.gz +0 -0
- package/lib/binding/Release/node-v48-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v57-darwin-x64/fse.node +0 -0
- package/node_modules/abbrev/package.json +15 -51
- package/node_modules/ajv/.tonic_example.js +20 -0
- package/node_modules/{is-my-json-valid → ajv}/LICENSE +6 -5
- package/node_modules/ajv/README.md +1213 -0
- package/node_modules/ajv/dist/ajv.bundle.js +8023 -0
- package/node_modules/ajv/dist/ajv.min.js +6 -0
- package/node_modules/ajv/dist/ajv.min.js.map +1 -0
- package/node_modules/ajv/dist/nodent.min.js +8 -0
- package/node_modules/ajv/dist/regenerator.min.js +32 -0
- package/node_modules/ajv/lib/ajv.d.ts +284 -0
- package/node_modules/ajv/lib/ajv.js +420 -0
- package/node_modules/ajv/lib/async.js +218 -0
- package/node_modules/ajv/lib/cache.js +26 -0
- package/node_modules/ajv/lib/compile/_rules.js +28 -0
- package/node_modules/ajv/lib/compile/equal.js +45 -0
- package/node_modules/ajv/lib/compile/formats.js +164 -0
- package/node_modules/ajv/lib/compile/index.js +390 -0
- package/node_modules/ajv/lib/compile/resolve.js +267 -0
- package/node_modules/ajv/lib/compile/rules.js +40 -0
- package/node_modules/ajv/lib/compile/schema_obj.js +9 -0
- package/node_modules/ajv/lib/compile/ucs2length.js +20 -0
- package/node_modules/ajv/lib/compile/util.js +257 -0
- package/node_modules/ajv/lib/compile/validation_error.js +14 -0
- package/node_modules/ajv/lib/dot/_limit.jst +49 -0
- package/node_modules/ajv/lib/dot/_limitItems.jst +10 -0
- package/node_modules/ajv/lib/dot/_limitLength.jst +10 -0
- package/node_modules/ajv/lib/dot/_limitProperties.jst +10 -0
- package/node_modules/ajv/lib/dot/allOf.jst +34 -0
- package/node_modules/ajv/lib/dot/anyOf.jst +48 -0
- package/node_modules/ajv/lib/dot/coerce.def +61 -0
- package/node_modules/ajv/lib/dot/custom.jst +184 -0
- package/node_modules/ajv/lib/dot/defaults.def +32 -0
- package/node_modules/ajv/lib/dot/definitions.def +182 -0
- package/node_modules/ajv/lib/dot/dependencies.jst +69 -0
- package/node_modules/ajv/lib/dot/enum.jst +30 -0
- package/node_modules/ajv/lib/dot/errors.def +185 -0
- package/node_modules/ajv/lib/dot/format.jst +100 -0
- package/node_modules/ajv/lib/dot/items.jst +101 -0
- package/node_modules/ajv/lib/dot/missing.def +34 -0
- package/node_modules/ajv/lib/dot/multipleOf.jst +20 -0
- package/node_modules/ajv/lib/dot/not.jst +43 -0
- package/node_modules/ajv/lib/dot/oneOf.jst +44 -0
- package/node_modules/ajv/lib/dot/pattern.jst +14 -0
- package/node_modules/ajv/lib/dot/properties.jst +319 -0
- package/node_modules/ajv/lib/dot/ref.jst +86 -0
- package/node_modules/ajv/lib/dot/required.jst +96 -0
- package/node_modules/ajv/lib/dot/uniqueItems.jst +38 -0
- package/node_modules/ajv/lib/dot/v5/_formatLimit.jst +116 -0
- package/node_modules/ajv/lib/dot/v5/constant.jst +10 -0
- package/node_modules/ajv/lib/dot/v5/patternRequired.jst +28 -0
- package/node_modules/ajv/lib/dot/v5/switch.jst +73 -0
- package/node_modules/ajv/lib/dot/validate.jst +210 -0
- package/node_modules/ajv/lib/dotjs/README.md +3 -0
- package/node_modules/ajv/lib/dotjs/_formatLimit.js +176 -0
- package/node_modules/ajv/lib/dotjs/_limit.js +124 -0
- package/node_modules/ajv/lib/dotjs/_limitItems.js +76 -0
- package/node_modules/ajv/lib/dotjs/_limitLength.js +81 -0
- package/node_modules/ajv/lib/dotjs/_limitProperties.js +76 -0
- package/node_modules/ajv/lib/dotjs/allOf.js +43 -0
- package/node_modules/ajv/lib/dotjs/anyOf.js +65 -0
- package/node_modules/ajv/lib/dotjs/constant.js +52 -0
- package/node_modules/ajv/lib/dotjs/custom.js +220 -0
- package/node_modules/ajv/lib/dotjs/dependencies.js +147 -0
- package/node_modules/ajv/lib/dotjs/enum.js +65 -0
- package/node_modules/ajv/lib/dotjs/format.js +138 -0
- package/node_modules/ajv/lib/dotjs/items.js +144 -0
- package/node_modules/ajv/lib/dotjs/multipleOf.js +76 -0
- package/node_modules/ajv/lib/dotjs/not.js +83 -0
- package/node_modules/ajv/lib/dotjs/oneOf.js +76 -0
- package/node_modules/ajv/lib/dotjs/pattern.js +74 -0
- package/node_modules/ajv/lib/dotjs/patternRequired.js +51 -0
- package/node_modules/ajv/lib/dotjs/properties.js +445 -0
- package/node_modules/ajv/lib/dotjs/ref.js +119 -0
- package/node_modules/ajv/lib/dotjs/required.js +249 -0
- package/node_modules/ajv/lib/dotjs/switch.js +128 -0
- package/node_modules/ajv/lib/dotjs/uniqueItems.js +71 -0
- package/node_modules/ajv/lib/dotjs/validate.js +375 -0
- package/node_modules/ajv/lib/keyword.js +129 -0
- package/node_modules/ajv/lib/refs/json-schema-draft-04.json +150 -0
- package/node_modules/ajv/lib/refs/json-schema-v5.json +328 -0
- package/node_modules/ajv/lib/v5.js +52 -0
- package/node_modules/ajv/package.json +132 -0
- package/node_modules/ajv/scripts/.eslintrc.yml +3 -0
- package/node_modules/ajv/scripts/bundle.js +54 -0
- package/node_modules/ajv/scripts/compile-dots.js +73 -0
- package/node_modules/ajv/scripts/info +10 -0
- package/node_modules/ajv/scripts/prepare-tests +9 -0
- package/node_modules/ajv/scripts/travis-gh-pages +23 -0
- package/node_modules/ansi-regex/package.json +26 -49
- package/node_modules/aproba/package.json +15 -48
- package/node_modules/are-we-there-yet/CHANGES.md +12 -0
- package/node_modules/are-we-there-yet/CHANGES.md~ +27 -0
- package/node_modules/are-we-there-yet/README.md +4 -3
- package/node_modules/are-we-there-yet/package.json +28 -54
- package/node_modules/asn1/package.json +16 -48
- package/node_modules/assert-plus/package.json +15 -47
- package/node_modules/asynckit/package.json +15 -49
- package/node_modules/aws-sign2/package.json +15 -45
- package/node_modules/aws4/package.json +15 -50
- package/node_modules/balanced-match/package.json +15 -49
- package/node_modules/bcrypt-pbkdf/package.json +16 -62
- package/node_modules/block-stream/package.json +15 -49
- package/node_modules/boom/package.json +15 -54
- package/node_modules/brace-expansion/README.md +1 -0
- package/node_modules/brace-expansion/index.js +1 -1
- package/node_modules/brace-expansion/package.json +20 -56
- package/node_modules/buffer-shims/package.json +15 -51
- package/node_modules/caseless/index.js +1 -0
- package/node_modules/caseless/package.json +19 -58
- package/node_modules/caseless/test.js +27 -0
- package/node_modules/co/History.md +172 -0
- package/node_modules/{commander → co}/LICENSE +1 -1
- package/node_modules/co/Readme.md +212 -0
- package/node_modules/co/index.js +237 -0
- package/node_modules/co/package.json +67 -0
- package/node_modules/code-point-at/package.json +15 -50
- package/node_modules/combined-stream/package.json +15 -58
- package/node_modules/concat-map/package.json +13 -41
- package/node_modules/console-control-strings/package.json +15 -50
- package/node_modules/core-util-is/package.json +15 -47
- package/node_modules/cryptiles/package.json +15 -49
- package/node_modules/dashdash/node_modules/assert-plus/package.json +15 -47
- package/node_modules/dashdash/package.json +15 -72
- package/node_modules/debug/.coveralls.yml +1 -0
- package/node_modules/debug/.eslintrc +11 -0
- package/node_modules/debug/.npmignore +3 -0
- package/node_modules/debug/.travis.yml +14 -0
- package/node_modules/debug/CHANGELOG.md +357 -0
- package/node_modules/debug/LICENSE +19 -0
- package/node_modules/debug/Makefile +28 -14
- package/node_modules/debug/README.md +312 -0
- package/node_modules/debug/component.json +4 -4
- package/node_modules/debug/karma.conf.js +70 -0
- package/node_modules/debug/node.js +1 -209
- package/node_modules/debug/package.json +41 -58
- package/node_modules/debug/{browser.js → src/browser.js} +29 -12
- package/node_modules/debug/{debug.js → src/debug.js} +42 -37
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +246 -0
- package/node_modules/deep-extend/README.md +1 -1
- package/node_modules/deep-extend/lib/deep-extend.js +2 -2
- package/node_modules/deep-extend/package.json +22 -48
- package/node_modules/delayed-stream/package.json +15 -49
- package/node_modules/delegates/package.json +15 -50
- package/node_modules/ecc-jsbn/package.json +21 -45
- package/node_modules/extend/.eslintrc +10 -185
- package/node_modules/extend/.jscs.json +75 -4
- package/node_modules/extend/.travis.yml +154 -19
- package/node_modules/extend/CHANGELOG.md +8 -0
- package/node_modules/extend/README.md +20 -1
- package/node_modules/extend/index.js +8 -8
- package/node_modules/extend/package.json +26 -56
- package/node_modules/extsprintf/package.json +12 -43
- package/node_modules/forever-agent/package.json +16 -53
- package/node_modules/form-data/README.md +4 -4
- package/node_modules/form-data/lib/form_data.js +4 -0
- package/node_modules/form-data/package.json +18 -64
- package/node_modules/fs.realpath/package.json +15 -49
- package/node_modules/fstream/lib/reader.js +4 -4
- package/node_modules/fstream/lib/writer.js +2 -2
- package/node_modules/fstream/package.json +19 -67
- package/node_modules/fstream-ignore/package.json +15 -57
- package/node_modules/gauge/CHANGELOG.md +5 -0
- package/node_modules/gauge/package.json +18 -52
- package/node_modules/gauge/plumbing.js +1 -0
- package/node_modules/getpass/node_modules/assert-plus/package.json +15 -47
- package/node_modules/getpass/package.json +19 -58
- package/node_modules/glob/glob.js +0 -2
- package/node_modules/glob/package.json +19 -53
- package/node_modules/graceful-fs/package.json +15 -49
- package/node_modules/har-schema/LICENSE +13 -0
- package/node_modules/har-schema/README.md +49 -0
- package/node_modules/har-schema/lib/afterRequest.json +29 -0
- package/node_modules/har-schema/lib/beforeRequest.json +29 -0
- package/node_modules/har-schema/lib/browser.json +19 -0
- package/node_modules/har-schema/lib/cache.json +20 -0
- package/node_modules/{har-validator/lib/schemas → har-schema/lib}/content.json +1 -0
- package/node_modules/{har-validator/lib/schemas → har-schema/lib}/cookie.json +1 -0
- package/node_modules/{har-validator/lib/schemas → har-schema/lib}/creator.json +1 -0
- package/node_modules/{har-validator/lib/schemas → har-schema/lib}/entry.json +5 -4
- package/node_modules/{har-validator/lib/schemas → har-schema/lib}/har.json +2 -1
- package/node_modules/har-schema/lib/header.json +19 -0
- package/node_modules/har-schema/lib/index.js +22 -0
- package/node_modules/{har-validator/lib/schemas → har-schema/lib}/log.json +5 -4
- package/node_modules/{har-validator/lib/schemas → har-schema/lib}/page.json +2 -1
- package/node_modules/{har-validator/lib/schemas → har-schema/lib}/pageTimings.json +1 -0
- package/node_modules/{har-validator/lib/schemas → har-schema/lib}/postData.json +1 -0
- package/node_modules/{har-validator/lib/schemas/record.json → har-schema/lib/query.json} +1 -0
- package/node_modules/{har-validator/lib/schemas → har-schema/lib}/request.json +5 -4
- package/node_modules/{har-validator/lib/schemas → har-schema/lib}/response.json +4 -3
- package/node_modules/{har-validator/lib/schemas → har-schema/lib}/timings.json +1 -0
- package/node_modules/har-schema/package.json +87 -0
- package/node_modules/har-validator/README.md +31 -265
- package/node_modules/har-validator/lib/browser/async.js +96 -0
- package/node_modules/har-validator/lib/browser/error.js +15 -0
- package/node_modules/har-validator/lib/browser/promise.js +93 -0
- package/node_modules/har-validator/lib/node4/async.js +136 -0
- package/node_modules/har-validator/lib/node4/error.js +22 -0
- package/node_modules/har-validator/lib/node4/promise.js +132 -0
- package/node_modules/har-validator/lib/node6/async.js +133 -0
- package/node_modules/har-validator/lib/node6/error.js +22 -0
- package/node_modules/har-validator/lib/node6/promise.js +130 -0
- package/node_modules/har-validator/lib/node7/async.js +133 -0
- package/node_modules/har-validator/lib/node7/error.js +22 -0
- package/node_modules/har-validator/lib/node7/promise.js +130 -0
- package/node_modules/har-validator/package.json +54 -72
- package/node_modules/har-validator/src/async.js +96 -0
- package/node_modules/har-validator/src/error.js +15 -0
- package/node_modules/har-validator/src/promise.js +93 -0
- package/node_modules/has-unicode/package.json +15 -50
- package/node_modules/hawk/package.json +15 -45
- package/node_modules/hoek/package.json +15 -55
- package/node_modules/http-signature/package.json +15 -53
- package/node_modules/inflight/package.json +15 -61
- package/node_modules/inherits/package.json +15 -58
- package/node_modules/ini/package.json +15 -45
- package/node_modules/is-fullwidth-code-point/package.json +16 -46
- package/node_modules/is-typedarray/package.json +15 -45
- package/node_modules/isarray/package.json +15 -46
- package/node_modules/isstream/package.json +15 -46
- package/node_modules/jodid25519/package.json +16 -44
- package/node_modules/jsbn/package.json +16 -53
- package/node_modules/json-schema/package.json +13 -41
- package/node_modules/{generate-function → json-stable-stringify}/.npmignore +0 -0
- package/node_modules/{generate-object-property → json-stable-stringify}/.travis.yml +1 -0
- package/node_modules/{ms → json-stable-stringify}/LICENSE +1 -3
- package/node_modules/json-stable-stringify/example/key_cmp.js +7 -0
- package/node_modules/json-stable-stringify/example/nested.js +3 -0
- package/node_modules/json-stable-stringify/example/str.js +3 -0
- package/node_modules/json-stable-stringify/example/value_cmp.js +7 -0
- package/node_modules/json-stable-stringify/index.js +84 -0
- package/node_modules/json-stable-stringify/package.json +75 -0
- package/node_modules/json-stable-stringify/readme.markdown +130 -0
- package/node_modules/json-stable-stringify/test/cmp.js +11 -0
- package/node_modules/json-stable-stringify/test/nested.js +35 -0
- package/node_modules/json-stable-stringify/test/replacer.js +74 -0
- package/node_modules/json-stable-stringify/test/space.js +59 -0
- package/node_modules/json-stable-stringify/test/str.js +32 -0
- package/node_modules/json-stable-stringify/test/to-json.js +20 -0
- package/node_modules/json-stringify-safe/package.json +15 -50
- package/node_modules/jsonify/README.markdown +34 -0
- package/node_modules/jsonify/index.js +2 -0
- package/node_modules/jsonify/lib/parse.js +273 -0
- package/node_modules/jsonify/lib/stringify.js +154 -0
- package/node_modules/jsonify/package.json +60 -0
- package/node_modules/jsonify/test/parse.js +16 -0
- package/node_modules/jsonify/test/stringify.js +15 -0
- package/node_modules/jsprim/CHANGES.md +4 -0
- package/node_modules/jsprim/README.md +55 -0
- package/node_modules/jsprim/lib/jsprim.js +248 -1
- package/node_modules/jsprim/node_modules/assert-plus/AUTHORS +6 -0
- package/node_modules/jsprim/node_modules/assert-plus/CHANGES.md +14 -0
- package/node_modules/jsprim/node_modules/assert-plus/README.md +162 -0
- package/node_modules/jsprim/node_modules/assert-plus/assert.js +211 -0
- package/node_modules/jsprim/node_modules/assert-plus/package.json +83 -0
- package/node_modules/jsprim/package.json +22 -57
- package/node_modules/mime-db/HISTORY.md +21 -0
- package/node_modules/mime-db/db.json +54 -0
- package/node_modules/mime-db/package.json +24 -63
- package/node_modules/mime-types/HISTORY.md +7 -0
- package/node_modules/mime-types/README.md +10 -5
- package/node_modules/mime-types/index.js +1 -1
- package/node_modules/mime-types/package.json +23 -66
- package/node_modules/minimatch/package.json +24 -58
- package/node_modules/minimist/package.json +12 -41
- package/node_modules/mkdirp/package.json +15 -47
- package/node_modules/ms/index.js +50 -23
- package/node_modules/{graceful-readlink/LICENSE → ms/license.md} +1 -2
- package/node_modules/ms/package.json +49 -61
- package/node_modules/ms/readme.md +51 -0
- package/node_modules/node-pre-gyp/CHANGELOG.md +15 -0
- package/node_modules/node-pre-gyp/README.md +12 -1
- package/node_modules/node-pre-gyp/appveyor.yml +1 -6
- package/node_modules/node-pre-gyp/cloudformation/travis.template +73 -0
- package/node_modules/node-pre-gyp/contributing.md +10 -0
- package/node_modules/node-pre-gyp/lib/install.js +5 -47
- package/node_modules/node-pre-gyp/lib/testbinary.js +8 -2
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +72 -0
- package/node_modules/node-pre-gyp/package.json +30 -76
- package/node_modules/node-pre-gyp/template-name.diff +12 -0
- package/node_modules/nopt/.travis.yml +3 -4
- package/node_modules/nopt/CHANGELOG.md +58 -0
- package/node_modules/nopt/README.md +28 -26
- package/node_modules/nopt/lib/nopt.js +50 -29
- package/node_modules/nopt/package.json +22 -59
- package/node_modules/nopt/test/basic.js +36 -6
- package/node_modules/npmlog/CHANGELOG.md +5 -1
- package/node_modules/npmlog/log.js +2 -0
- package/node_modules/npmlog/package.json +21 -67
- package/node_modules/number-is-nan/package.json +15 -50
- package/node_modules/oauth-sign/package.json +15 -56
- package/node_modules/object-assign/package.json +15 -58
- package/node_modules/once/package.json +15 -49
- package/node_modules/os-homedir/index.js +24 -0
- package/node_modules/{ansi-styles → os-homedir}/license +0 -0
- package/node_modules/os-homedir/package.json +74 -0
- package/node_modules/os-homedir/readme.md +31 -0
- package/node_modules/os-tmpdir/index.js +25 -0
- package/node_modules/{chalk → os-tmpdir}/license +0 -0
- package/node_modules/os-tmpdir/package.json +74 -0
- package/node_modules/os-tmpdir/readme.md +32 -0
- package/node_modules/osenv/.npmignore +13 -0
- package/node_modules/osenv/.travis.yml +9 -0
- package/node_modules/{tar-pack/node_modules/once → osenv}/LICENSE +0 -0
- package/node_modules/osenv/README.md +63 -0
- package/node_modules/osenv/osenv.js +72 -0
- package/node_modules/osenv/package.json +68 -0
- package/node_modules/osenv/test/unix.js +71 -0
- package/node_modules/osenv/test/windows.js +74 -0
- package/node_modules/osenv/x.tap +39 -0
- package/node_modules/path-is-absolute/package.json +15 -50
- package/node_modules/performance-now/.npmignore +1 -0
- package/node_modules/performance-now/.tm_properties +7 -0
- package/node_modules/{generate-function → performance-now}/.travis.yml +1 -0
- package/node_modules/performance-now/Makefile +25 -0
- package/node_modules/performance-now/README.md +30 -0
- package/node_modules/performance-now/lib/performance-now.js +32 -0
- package/node_modules/performance-now/license.txt +7 -0
- package/node_modules/performance-now/package.json +58 -0
- package/node_modules/performance-now/src/performance-now.coffee +15 -0
- package/node_modules/performance-now/test/mocha.opts +3 -0
- package/node_modules/performance-now/test/performance-now.coffee +38 -0
- package/node_modules/process-nextick-args/package.json +15 -51
- package/node_modules/punycode/package.json +14 -49
- package/node_modules/qs/.eslintrc +4 -5
- package/node_modules/qs/.jscs.json +176 -0
- package/node_modules/qs/CHANGELOG.md +19 -0
- package/node_modules/qs/README.md +10 -1
- package/node_modules/qs/dist/qs.js +24 -14
- package/node_modules/qs/lib/index.js +0 -0
- package/node_modules/qs/lib/parse.js +6 -5
- package/node_modules/qs/lib/stringify.js +15 -8
- package/node_modules/qs/lib/utils.js +3 -1
- package/node_modules/qs/package.json +19 -61
- package/node_modules/qs/test/.eslintrc +2 -1
- package/node_modules/qs/test/parse.js +37 -2
- package/node_modules/qs/test/stringify.js +29 -0
- package/node_modules/qs/test/utils.js +0 -0
- package/node_modules/rc/lib/utils.js +2 -1
- package/node_modules/rc/node_modules/minimist/package.json +15 -46
- package/node_modules/rc/package.json +18 -53
- package/node_modules/rc/test/nested-env-vars.js +31 -21
- package/node_modules/readable-stream/.travis.yml +2 -2
- package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/node_modules/readable-stream/LICENSE +29 -0
- package/node_modules/readable-stream/README.md +20 -3
- package/node_modules/readable-stream/duplex-browser.js +1 -0
- package/node_modules/readable-stream/duplex.js +1 -1
- package/node_modules/readable-stream/lib/_stream_readable.js +7 -13
- package/node_modules/readable-stream/lib/_stream_writable.js +18 -28
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/node_modules/readable-stream/package.json +25 -67
- package/node_modules/readable-stream/passthrough.js +1 -1
- package/node_modules/{tar-pack/node_modules/readable-stream/readable.js → readable-stream/readable-browser.js} +1 -10
- package/node_modules/readable-stream/readable.js +17 -14
- package/node_modules/readable-stream/transform.js +1 -1
- package/node_modules/readable-stream/writable-browser.js +1 -0
- package/node_modules/readable-stream/writable.js +8 -1
- package/node_modules/request/CHANGELOG.md +23 -11
- package/node_modules/request/README.md +36 -19
- package/node_modules/request/lib/helpers.js +2 -1
- package/node_modules/request/lib/multipart.js +2 -1
- package/node_modules/request/lib/oauth.js +2 -1
- package/node_modules/request/package.json +30 -74
- package/node_modules/request/request.js +106 -16
- package/node_modules/rimraf/bin.js +13 -3
- package/node_modules/rimraf/package.json +19 -55
- package/node_modules/rimraf/rimraf.js +22 -2
- package/node_modules/safe-buffer/.travis.yml +7 -0
- package/node_modules/{is-property → safe-buffer}/LICENSE +1 -2
- package/node_modules/safe-buffer/README.md +581 -0
- package/node_modules/safe-buffer/browser.js +1 -0
- package/node_modules/safe-buffer/index.js +58 -0
- package/node_modules/safe-buffer/package.json +64 -0
- package/node_modules/safe-buffer/test.js +99 -0
- package/node_modules/semver/package.json +15 -54
- package/node_modules/set-blocking/package.json +15 -50
- package/node_modules/signal-exit/package.json +15 -54
- package/node_modules/sntp/package.json +16 -45
- package/node_modules/sshpk/README.md +38 -6
- package/node_modules/sshpk/lib/certificate.js +88 -2
- package/node_modules/sshpk/lib/dhe.js +101 -2
- package/node_modules/sshpk/lib/formats/openssh-cert.js +34 -1
- package/node_modules/sshpk/lib/formats/x509.js +247 -5
- package/node_modules/sshpk/lib/identity.js +1 -1
- package/node_modules/sshpk/lib/index.js +1 -0
- package/node_modules/sshpk/lib/key.js +6 -2
- package/node_modules/sshpk/lib/private-key.js +25 -1
- package/node_modules/sshpk/lib/signature.js +76 -8
- package/node_modules/sshpk/node_modules/assert-plus/package.json +15 -47
- package/node_modules/sshpk/package.json +21 -53
- package/node_modules/string-width/package.json +15 -50
- package/node_modules/string_decoder/LICENSE +48 -20
- package/node_modules/string_decoder/README.md +25 -4
- package/node_modules/string_decoder/lib/string_decoder.js +272 -0
- package/node_modules/string_decoder/package.json +24 -55
- package/node_modules/stringstream/package.json +15 -48
- package/node_modules/strip-ansi/package.json +27 -50
- package/node_modules/strip-json-comments/package.json +15 -50
- package/node_modules/tar/package.json +15 -58
- package/node_modules/tar-pack/package.json +28 -79
- package/node_modules/tough-cookie/package.json +15 -57
- package/node_modules/tunnel-agent/index.js +5 -4
- package/node_modules/tunnel-agent/package.json +22 -66
- package/node_modules/tweetnacl/package.json +16 -50
- package/node_modules/uid-number/package.json +16 -46
- package/node_modules/util-deprecate/package.json +15 -48
- package/node_modules/uuid/package.json +15 -58
- package/node_modules/verror/package.json +12 -41
- package/node_modules/wide-align/package.json +25 -51
- package/node_modules/wrappy/package.json +15 -54
- package/package.json +4 -3
- package/node_modules/ansi-styles/index.js +0 -65
- package/node_modules/ansi-styles/package.json +0 -114
- package/node_modules/ansi-styles/readme.md +0 -86
- package/node_modules/are-we-there-yet/.npmignore +0 -5
- package/node_modules/are-we-there-yet/test/lib/test-event.js +0 -29
- package/node_modules/are-we-there-yet/test/tracker.js +0 -57
- package/node_modules/are-we-there-yet/test/trackergroup.js +0 -96
- package/node_modules/are-we-there-yet/test/trackerstream.js +0 -51
- package/node_modules/chalk/index.js +0 -116
- package/node_modules/chalk/package.json +0 -140
- package/node_modules/chalk/readme.md +0 -213
- package/node_modules/commander/History.md +0 -261
- package/node_modules/commander/Readme.md +0 -351
- package/node_modules/commander/index.js +0 -1110
- package/node_modules/commander/package.json +0 -104
- package/node_modules/debug/.jshintrc +0 -3
- package/node_modules/debug/History.md +0 -195
- package/node_modules/debug/Readme.md +0 -188
- package/node_modules/debug/bower.json +0 -28
- package/node_modules/escape-string-regexp/index.js +0 -11
- package/node_modules/escape-string-regexp/license +0 -21
- package/node_modules/escape-string-regexp/package.json +0 -109
- package/node_modules/escape-string-regexp/readme.md +0 -27
- package/node_modules/generate-function/README.md +0 -72
- package/node_modules/generate-function/example.js +0 -27
- package/node_modules/generate-function/index.js +0 -61
- package/node_modules/generate-function/package.json +0 -87
- package/node_modules/generate-function/test.js +0 -33
- package/node_modules/generate-object-property/.npmignore +0 -1
- package/node_modules/generate-object-property/LICENSE +0 -21
- package/node_modules/generate-object-property/README.md +0 -19
- package/node_modules/generate-object-property/index.js +0 -12
- package/node_modules/generate-object-property/package.json +0 -84
- package/node_modules/generate-object-property/test.js +0 -12
- package/node_modules/graceful-readlink/.npmignore +0 -3
- package/node_modules/graceful-readlink/.travis.yml +0 -5
- package/node_modules/graceful-readlink/README.md +0 -17
- package/node_modules/graceful-readlink/index.js +0 -12
- package/node_modules/graceful-readlink/package.json +0 -83
- package/node_modules/har-validator/bin/har-validator +0 -56
- package/node_modules/har-validator/lib/async.js +0 -14
- package/node_modules/har-validator/lib/error.js +0 -10
- package/node_modules/har-validator/lib/index.js +0 -22
- package/node_modules/har-validator/lib/runner.js +0 -29
- package/node_modules/har-validator/lib/schemas/cache.json +0 -13
- package/node_modules/har-validator/lib/schemas/cacheEntry.json +0 -31
- package/node_modules/har-validator/lib/schemas/index.js +0 -49
- package/node_modules/has-ansi/index.js +0 -4
- package/node_modules/has-ansi/license +0 -21
- package/node_modules/has-ansi/package.json +0 -118
- package/node_modules/has-ansi/readme.md +0 -36
- package/node_modules/is-my-json-valid/.npmignore +0 -2
- package/node_modules/is-my-json-valid/.travis.yml +0 -3
- package/node_modules/is-my-json-valid/README.md +0 -173
- package/node_modules/is-my-json-valid/example.js +0 -18
- package/node_modules/is-my-json-valid/formats.js +0 -14
- package/node_modules/is-my-json-valid/index.js +0 -594
- package/node_modules/is-my-json-valid/package.json +0 -116
- package/node_modules/is-my-json-valid/require.js +0 -12
- package/node_modules/is-my-json-valid/test/fixtures/cosmic.js +0 -84
- package/node_modules/is-my-json-valid/test/json-schema-draft4/additionalItems.json +0 -82
- package/node_modules/is-my-json-valid/test/json-schema-draft4/additionalProperties.json +0 -88
- package/node_modules/is-my-json-valid/test/json-schema-draft4/allOf.json +0 -112
- package/node_modules/is-my-json-valid/test/json-schema-draft4/anyOf.json +0 -68
- package/node_modules/is-my-json-valid/test/json-schema-draft4/bignum.json +0 -107
- package/node_modules/is-my-json-valid/test/json-schema-draft4/default.json +0 -49
- package/node_modules/is-my-json-valid/test/json-schema-draft4/definitions.json +0 -32
- package/node_modules/is-my-json-valid/test/json-schema-draft4/dependencies.json +0 -113
- package/node_modules/is-my-json-valid/test/json-schema-draft4/enum.json +0 -72
- package/node_modules/is-my-json-valid/test/json-schema-draft4/format.json +0 -143
- package/node_modules/is-my-json-valid/test/json-schema-draft4/items.json +0 -46
- package/node_modules/is-my-json-valid/test/json-schema-draft4/maxItems.json +0 -28
- package/node_modules/is-my-json-valid/test/json-schema-draft4/maxLength.json +0 -28
- package/node_modules/is-my-json-valid/test/json-schema-draft4/maxProperties.json +0 -28
- package/node_modules/is-my-json-valid/test/json-schema-draft4/maximum.json +0 -42
- package/node_modules/is-my-json-valid/test/json-schema-draft4/minItems.json +0 -28
- package/node_modules/is-my-json-valid/test/json-schema-draft4/minLength.json +0 -28
- package/node_modules/is-my-json-valid/test/json-schema-draft4/minProperties.json +0 -28
- package/node_modules/is-my-json-valid/test/json-schema-draft4/minimum.json +0 -42
- package/node_modules/is-my-json-valid/test/json-schema-draft4/multipleOf.json +0 -96
- package/node_modules/is-my-json-valid/test/json-schema-draft4/not.json +0 -96
- package/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndFormat.json +0 -18
- package/node_modules/is-my-json-valid/test/json-schema-draft4/nullAndObject.json +0 -18
- package/node_modules/is-my-json-valid/test/json-schema-draft4/oneOf.json +0 -68
- package/node_modules/is-my-json-valid/test/json-schema-draft4/pattern.json +0 -23
- package/node_modules/is-my-json-valid/test/json-schema-draft4/patternProperties.json +0 -110
- package/node_modules/is-my-json-valid/test/json-schema-draft4/properties.json +0 -92
- package/node_modules/is-my-json-valid/test/json-schema-draft4/ref.json +0 -128
- package/node_modules/is-my-json-valid/test/json-schema-draft4/refRemote.json +0 -74
- package/node_modules/is-my-json-valid/test/json-schema-draft4/required.json +0 -39
- package/node_modules/is-my-json-valid/test/json-schema-draft4/type.json +0 -330
- package/node_modules/is-my-json-valid/test/json-schema-draft4/uniqueItems.json +0 -79
- package/node_modules/is-my-json-valid/test/json-schema.js +0 -23
- package/node_modules/is-my-json-valid/test/misc.js +0 -471
- package/node_modules/is-property/.npmignore +0 -17
- package/node_modules/is-property/README.md +0 -28
- package/node_modules/is-property/is-property.js +0 -5
- package/node_modules/is-property/package.json +0 -92
- package/node_modules/jsonpointer/LICENSE.md +0 -21
- package/node_modules/jsonpointer/README.md +0 -39
- package/node_modules/jsonpointer/jsonpointer.js +0 -93
- package/node_modules/jsonpointer/package.json +0 -112
- package/node_modules/ms/.npmignore +0 -5
- package/node_modules/ms/History.md +0 -66
- package/node_modules/ms/README.md +0 -35
- package/node_modules/pinkie/index.js +0 -292
- package/node_modules/pinkie/license +0 -21
- package/node_modules/pinkie/package.json +0 -100
- package/node_modules/pinkie/readme.md +0 -83
- package/node_modules/pinkie-promise/index.js +0 -3
- package/node_modules/pinkie-promise/license +0 -21
- package/node_modules/pinkie-promise/package.json +0 -102
- package/node_modules/pinkie-promise/readme.md +0 -28
- package/node_modules/string_decoder/index.js +0 -221
- package/node_modules/supports-color/index.js +0 -50
- package/node_modules/supports-color/license +0 -21
- package/node_modules/supports-color/package.json +0 -113
- package/node_modules/supports-color/readme.md +0 -36
- package/node_modules/tar-pack/node_modules/once/README.md +0 -51
- package/node_modules/tar-pack/node_modules/once/once.js +0 -21
- package/node_modules/tar-pack/node_modules/once/package.json +0 -96
- package/node_modules/tar-pack/node_modules/readable-stream/.npmignore +0 -8
- package/node_modules/tar-pack/node_modules/readable-stream/.travis.yml +0 -49
- package/node_modules/tar-pack/node_modules/readable-stream/LICENSE +0 -18
- package/node_modules/tar-pack/node_modules/readable-stream/README.md +0 -36
- package/node_modules/tar-pack/node_modules/readable-stream/doc/stream.md +0 -2015
- package/node_modules/tar-pack/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -60
- package/node_modules/tar-pack/node_modules/readable-stream/duplex.js +0 -1
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_duplex.js +0 -75
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_passthrough.js +0 -26
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_readable.js +0 -937
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_transform.js +0 -180
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_writable.js +0 -526
- package/node_modules/tar-pack/node_modules/readable-stream/lib/internal/streams/BufferList.js +0 -64
- package/node_modules/tar-pack/node_modules/readable-stream/package.json +0 -125
- package/node_modules/tar-pack/node_modules/readable-stream/passthrough.js +0 -1
- package/node_modules/tar-pack/node_modules/readable-stream/transform.js +0 -1
- package/node_modules/tar-pack/node_modules/readable-stream/writable.js +0 -1
- package/node_modules/wide-align/.npmignore +0 -5
- package/node_modules/wide-align/test/align.js +0 -37
- package/node_modules/xtend/.jshintrc +0 -30
- package/node_modules/xtend/.npmignore +0 -1
- package/node_modules/xtend/LICENCE +0 -19
- package/node_modules/xtend/Makefile +0 -4
- package/node_modules/xtend/README.md +0 -32
- package/node_modules/xtend/immutable.js +0 -19
- package/node_modules/xtend/mutable.js +0 -17
- package/node_modules/xtend/package.json +0 -117
- package/node_modules/xtend/test.js +0 -83
@@ -0,0 +1,284 @@
|
|
1
|
+
declare var ajv: {
|
2
|
+
(options?: ajv.Options): ajv.Ajv;
|
3
|
+
new (options?: ajv.Options): ajv.Ajv;
|
4
|
+
}
|
5
|
+
|
6
|
+
declare namespace ajv {
|
7
|
+
interface Ajv {
|
8
|
+
/**
|
9
|
+
* Validate data using schema
|
10
|
+
* Schema will be compiled and cached (using serialized JSON as key. [json-stable-stringify](https://github.com/substack/json-stable-stringify) is used to serialize.
|
11
|
+
* @param {String|Object} schemaKeyRef key, ref or schema object
|
12
|
+
* @param {Any} data to be validated
|
13
|
+
* @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
|
14
|
+
*/
|
15
|
+
validate(schemaKeyRef: Object | string, data: any): boolean;
|
16
|
+
/**
|
17
|
+
* Create validating function for passed schema.
|
18
|
+
* @param {Object} schema schema object
|
19
|
+
* @return {Function} validating function
|
20
|
+
*/
|
21
|
+
compile(schema: Object): ValidateFunction;
|
22
|
+
/**
|
23
|
+
* Creates validating function for passed schema with asynchronous loading of missing schemas.
|
24
|
+
* `loadSchema` option should be a function that accepts schema uri and node-style callback.
|
25
|
+
* @this Ajv
|
26
|
+
* @param {Object} schema schema object
|
27
|
+
* @param {Function} callback node-style callback, it is always called with 2 parameters: error (or null) and validating function.
|
28
|
+
*/
|
29
|
+
compileAsync(schema: Object, callback: (err: Error, validate: ValidateFunction) => any): void;
|
30
|
+
/**
|
31
|
+
* Adds schema to the instance.
|
32
|
+
* @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
|
33
|
+
* @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
|
34
|
+
*/
|
35
|
+
addSchema(schema: Array<Object> | Object, key?: string): void;
|
36
|
+
/**
|
37
|
+
* Add schema that will be used to validate other schemas
|
38
|
+
* options in META_IGNORE_OPTIONS are alway set to false
|
39
|
+
* @param {Object} schema schema object
|
40
|
+
* @param {String} key optional schema key
|
41
|
+
*/
|
42
|
+
addMetaSchema(schema: Object, key?: string): void;
|
43
|
+
/**
|
44
|
+
* Validate schema
|
45
|
+
* @param {Object} schema schema to validate
|
46
|
+
* @return {Boolean} true if schema is valid
|
47
|
+
*/
|
48
|
+
validateSchema(schema: Object): boolean;
|
49
|
+
/**
|
50
|
+
* Get compiled schema from the instance by `key` or `ref`.
|
51
|
+
* @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
|
52
|
+
* @return {Function} schema validating function (with property `schema`).
|
53
|
+
*/
|
54
|
+
getSchema(keyRef: string): ValidateFunction;
|
55
|
+
/**
|
56
|
+
* Remove cached schema(s).
|
57
|
+
* If no parameter is passed all schemas but meta-schemas are removed.
|
58
|
+
* If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
|
59
|
+
* Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
|
60
|
+
* @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
|
61
|
+
*/
|
62
|
+
removeSchema(schemaKeyRef?: Object | string | RegExp): void;
|
63
|
+
/**
|
64
|
+
* Add custom format
|
65
|
+
* @param {String} name format name
|
66
|
+
* @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
|
67
|
+
*/
|
68
|
+
addFormat(name: string, format: FormatValidator | FormatDefinition): void;
|
69
|
+
/**
|
70
|
+
* Define custom keyword
|
71
|
+
* @this Ajv
|
72
|
+
* @param {String} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords.
|
73
|
+
* @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`.
|
74
|
+
*/
|
75
|
+
addKeyword(keyword: string, definition: KeywordDefinition): void;
|
76
|
+
/**
|
77
|
+
* Get keyword definition
|
78
|
+
* @this Ajv
|
79
|
+
* @param {String} keyword pre-defined or custom keyword.
|
80
|
+
* @return {Object|Boolean} custom keyword definition, `true` if it is a predefined keyword, `false` otherwise.
|
81
|
+
*/
|
82
|
+
getKeyword(keyword: string): Object | boolean;
|
83
|
+
/**
|
84
|
+
* Remove keyword
|
85
|
+
* @this Ajv
|
86
|
+
* @param {String} keyword pre-defined or custom keyword.
|
87
|
+
*/
|
88
|
+
removeKeyword(keyword: string): void;
|
89
|
+
/**
|
90
|
+
* Convert array of error message objects to string
|
91
|
+
* @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
|
92
|
+
* @param {Object} options optional options with properties `separator` and `dataVar`.
|
93
|
+
* @return {String} human readable string with all errors descriptions
|
94
|
+
*/
|
95
|
+
errorsText(errors?: Array<ErrorObject>, options?: ErrorsTextOptions): string;
|
96
|
+
errors?: Array<ErrorObject>;
|
97
|
+
}
|
98
|
+
|
99
|
+
interface Thenable <R> {
|
100
|
+
then <U> (onFulfilled?: (value: R) => U | Thenable<U>, onRejected?: (error: any) => U | Thenable<U>): Thenable<U>;
|
101
|
+
}
|
102
|
+
|
103
|
+
interface ValidateFunction {
|
104
|
+
(
|
105
|
+
data: any,
|
106
|
+
dataPath?: string,
|
107
|
+
parentData?: Object | Array<any>,
|
108
|
+
parentDataProperty?: string | number,
|
109
|
+
rootData?: Object | Array<any>
|
110
|
+
): boolean | Thenable<boolean>;
|
111
|
+
errors?: Array<ErrorObject>;
|
112
|
+
schema?: Object;
|
113
|
+
}
|
114
|
+
|
115
|
+
interface Options {
|
116
|
+
v5?: boolean;
|
117
|
+
allErrors?: boolean;
|
118
|
+
verbose?: boolean;
|
119
|
+
jsonPointers?: boolean;
|
120
|
+
uniqueItems?: boolean;
|
121
|
+
unicode?: boolean;
|
122
|
+
format?: string;
|
123
|
+
formats?: Object;
|
124
|
+
unknownFormats?: boolean | string | Array<string>;
|
125
|
+
schemas?: Array<Object> | Object;
|
126
|
+
ownProperties?: boolean;
|
127
|
+
missingRefs?: boolean | string;
|
128
|
+
extendRefs?: boolean | string;
|
129
|
+
loadSchema?: (uri: string, cb: (err: Error, schema: Object) => any) => any;
|
130
|
+
removeAdditional?: boolean | string;
|
131
|
+
useDefaults?: boolean | string;
|
132
|
+
coerceTypes?: boolean | string;
|
133
|
+
async?: boolean | string;
|
134
|
+
transpile?: string | ((code: string) => string);
|
135
|
+
meta?: boolean | Object;
|
136
|
+
validateSchema?: boolean | string;
|
137
|
+
addUsedSchema?: boolean;
|
138
|
+
inlineRefs?: boolean | number;
|
139
|
+
passContext?: boolean;
|
140
|
+
loopRequired?: number;
|
141
|
+
multipleOfPrecision?: number;
|
142
|
+
errorDataPath?: string;
|
143
|
+
messages?: boolean;
|
144
|
+
sourceCode?: boolean;
|
145
|
+
beautify?: boolean | Object;
|
146
|
+
cache?: Object;
|
147
|
+
}
|
148
|
+
|
149
|
+
type FormatValidator = string | RegExp | ((data: string) => boolean);
|
150
|
+
|
151
|
+
interface FormatDefinition {
|
152
|
+
validate: FormatValidator;
|
153
|
+
compare: (data1: string, data2: string) => number;
|
154
|
+
async?: boolean;
|
155
|
+
}
|
156
|
+
|
157
|
+
interface KeywordDefinition {
|
158
|
+
type?: string | Array<string>;
|
159
|
+
async?: boolean;
|
160
|
+
errors?: boolean | string;
|
161
|
+
// schema: false makes validate not to expect schema (ValidateFunction)
|
162
|
+
schema?: boolean;
|
163
|
+
modifying?: boolean;
|
164
|
+
valid?: boolean;
|
165
|
+
// one and only one of the following properties should be present
|
166
|
+
validate?: ValidateFunction | SchemaValidateFunction;
|
167
|
+
compile?: (schema: Object, parentSchema: Object) => ValidateFunction;
|
168
|
+
macro?: (schema: Object, parentSchema: Object) => Object;
|
169
|
+
inline?: (it: Object, keyword: string, schema: Object, parentSchema: Object) => string;
|
170
|
+
}
|
171
|
+
|
172
|
+
interface SchemaValidateFunction {
|
173
|
+
(
|
174
|
+
schema: Object,
|
175
|
+
data: any,
|
176
|
+
parentSchema?: Object,
|
177
|
+
dataPath?: string,
|
178
|
+
parentData?: Object | Array<any>,
|
179
|
+
parentDataProperty?: string | number
|
180
|
+
): boolean | Thenable<boolean>;
|
181
|
+
errors?: Array<ErrorObject>;
|
182
|
+
}
|
183
|
+
|
184
|
+
interface ErrorsTextOptions {
|
185
|
+
separator?: string;
|
186
|
+
dataVar?: string;
|
187
|
+
}
|
188
|
+
|
189
|
+
interface ErrorObject {
|
190
|
+
keyword: string;
|
191
|
+
dataPath: string;
|
192
|
+
schemaPath: string;
|
193
|
+
params: ErrorParameters;
|
194
|
+
// Excluded if messages set to false.
|
195
|
+
message?: string;
|
196
|
+
// These are added with the `verbose` option.
|
197
|
+
schema?: Object;
|
198
|
+
parentSchema?: Object;
|
199
|
+
data?: any;
|
200
|
+
}
|
201
|
+
|
202
|
+
type ErrorParameters = RefParams | LimitParams | AdditionalPropertiesParams |
|
203
|
+
DependenciesParams | FormatParams | ComparisonParams |
|
204
|
+
MultipleOfParams | PatternParams | RequiredParams |
|
205
|
+
TypeParams | UniqueItemsParams | CustomParams |
|
206
|
+
PatternGroupsParams | PatternRequiredParams |
|
207
|
+
SwitchParams | NoParams | EnumParams;
|
208
|
+
|
209
|
+
interface RefParams {
|
210
|
+
ref: string;
|
211
|
+
}
|
212
|
+
|
213
|
+
interface LimitParams {
|
214
|
+
limit: number;
|
215
|
+
}
|
216
|
+
|
217
|
+
interface AdditionalPropertiesParams {
|
218
|
+
additionalProperty: string;
|
219
|
+
}
|
220
|
+
|
221
|
+
interface DependenciesParams {
|
222
|
+
property: string;
|
223
|
+
missingProperty: string;
|
224
|
+
depsCount: number;
|
225
|
+
deps: string;
|
226
|
+
}
|
227
|
+
|
228
|
+
interface FormatParams {
|
229
|
+
format: string
|
230
|
+
}
|
231
|
+
|
232
|
+
interface ComparisonParams {
|
233
|
+
comparison: string;
|
234
|
+
limit: number | string;
|
235
|
+
exclusive: boolean;
|
236
|
+
}
|
237
|
+
|
238
|
+
interface MultipleOfParams {
|
239
|
+
multipleOf: number;
|
240
|
+
}
|
241
|
+
|
242
|
+
interface PatternParams {
|
243
|
+
pattern: string;
|
244
|
+
}
|
245
|
+
|
246
|
+
interface RequiredParams {
|
247
|
+
missingProperty: string;
|
248
|
+
}
|
249
|
+
|
250
|
+
interface TypeParams {
|
251
|
+
type: string;
|
252
|
+
}
|
253
|
+
|
254
|
+
interface UniqueItemsParams {
|
255
|
+
i: number;
|
256
|
+
j: number;
|
257
|
+
}
|
258
|
+
|
259
|
+
interface CustomParams {
|
260
|
+
keyword: string;
|
261
|
+
}
|
262
|
+
|
263
|
+
interface PatternGroupsParams {
|
264
|
+
reason: string;
|
265
|
+
limit: number;
|
266
|
+
pattern: string;
|
267
|
+
}
|
268
|
+
|
269
|
+
interface PatternRequiredParams {
|
270
|
+
missingPattern: string;
|
271
|
+
}
|
272
|
+
|
273
|
+
interface SwitchParams {
|
274
|
+
caseIndex: number;
|
275
|
+
}
|
276
|
+
|
277
|
+
interface NoParams {}
|
278
|
+
|
279
|
+
interface EnumParams {
|
280
|
+
allowedValues: Array<any>;
|
281
|
+
}
|
282
|
+
}
|
283
|
+
|
284
|
+
export = ajv;
|
@@ -0,0 +1,420 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var compileSchema = require('./compile')
|
4
|
+
, resolve = require('./compile/resolve')
|
5
|
+
, Cache = require('./cache')
|
6
|
+
, SchemaObject = require('./compile/schema_obj')
|
7
|
+
, stableStringify = require('json-stable-stringify')
|
8
|
+
, formats = require('./compile/formats')
|
9
|
+
, rules = require('./compile/rules')
|
10
|
+
, v5 = require('./v5')
|
11
|
+
, util = require('./compile/util')
|
12
|
+
, async = require('./async')
|
13
|
+
, co = require('co');
|
14
|
+
|
15
|
+
module.exports = Ajv;
|
16
|
+
|
17
|
+
Ajv.prototype.compileAsync = async.compile;
|
18
|
+
|
19
|
+
var customKeyword = require('./keyword');
|
20
|
+
Ajv.prototype.addKeyword = customKeyword.add;
|
21
|
+
Ajv.prototype.getKeyword = customKeyword.get;
|
22
|
+
Ajv.prototype.removeKeyword = customKeyword.remove;
|
23
|
+
Ajv.ValidationError = require('./compile/validation_error');
|
24
|
+
|
25
|
+
var META_SCHEMA_ID = 'http://json-schema.org/draft-04/schema';
|
26
|
+
var SCHEMA_URI_FORMAT = /^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i;
|
27
|
+
function SCHEMA_URI_FORMAT_FUNC(str) {
|
28
|
+
return SCHEMA_URI_FORMAT.test(str);
|
29
|
+
}
|
30
|
+
|
31
|
+
var META_IGNORE_OPTIONS = [ 'removeAdditional', 'useDefaults', 'coerceTypes' ];
|
32
|
+
|
33
|
+
/**
|
34
|
+
* Creates validator instance.
|
35
|
+
* Usage: `Ajv(opts)`
|
36
|
+
* @param {Object} opts optional options
|
37
|
+
* @return {Object} ajv instance
|
38
|
+
*/
|
39
|
+
function Ajv(opts) {
|
40
|
+
if (!(this instanceof Ajv)) return new Ajv(opts);
|
41
|
+
var self = this;
|
42
|
+
|
43
|
+
opts = this._opts = util.copy(opts) || {};
|
44
|
+
this._schemas = {};
|
45
|
+
this._refs = {};
|
46
|
+
this._fragments = {};
|
47
|
+
this._formats = formats(opts.format);
|
48
|
+
this._cache = opts.cache || new Cache;
|
49
|
+
this._loadingSchemas = {};
|
50
|
+
this._compilations = [];
|
51
|
+
this.RULES = rules();
|
52
|
+
|
53
|
+
// this is done on purpose, so that methods are bound to the instance
|
54
|
+
// (without using bind) so that they can be used without the instance
|
55
|
+
this.validate = validate;
|
56
|
+
this.compile = compile;
|
57
|
+
this.addSchema = addSchema;
|
58
|
+
this.addMetaSchema = addMetaSchema;
|
59
|
+
this.validateSchema = validateSchema;
|
60
|
+
this.getSchema = getSchema;
|
61
|
+
this.removeSchema = removeSchema;
|
62
|
+
this.addFormat = addFormat;
|
63
|
+
this.errorsText = errorsText;
|
64
|
+
|
65
|
+
this._addSchema = _addSchema;
|
66
|
+
this._compile = _compile;
|
67
|
+
|
68
|
+
opts.loopRequired = opts.loopRequired || Infinity;
|
69
|
+
if (opts.async || opts.transpile) async.setup(opts);
|
70
|
+
if (opts.beautify === true) opts.beautify = { indent_size: 2 };
|
71
|
+
if (opts.errorDataPath == 'property') opts._errorDataPathProperty = true;
|
72
|
+
this._metaOpts = getMetaSchemaOptions();
|
73
|
+
|
74
|
+
if (opts.formats) addInitialFormats();
|
75
|
+
addDraft4MetaSchema();
|
76
|
+
if (opts.v5) v5.enable(this);
|
77
|
+
if (typeof opts.meta == 'object') addMetaSchema(opts.meta);
|
78
|
+
addInitialSchemas();
|
79
|
+
|
80
|
+
|
81
|
+
/**
|
82
|
+
* Validate data using schema
|
83
|
+
* Schema will be compiled and cached (using serialized JSON as key. [json-stable-stringify](https://github.com/substack/json-stable-stringify) is used to serialize.
|
84
|
+
* @param {String|Object} schemaKeyRef key, ref or schema object
|
85
|
+
* @param {Any} data to be validated
|
86
|
+
* @return {Boolean} validation result. Errors from the last validation will be available in `ajv.errors` (and also in compiled schema: `schema.errors`).
|
87
|
+
*/
|
88
|
+
function validate(schemaKeyRef, data) {
|
89
|
+
var v;
|
90
|
+
if (typeof schemaKeyRef == 'string') {
|
91
|
+
v = getSchema(schemaKeyRef);
|
92
|
+
if (!v) throw new Error('no schema with key or ref "' + schemaKeyRef + '"');
|
93
|
+
} else {
|
94
|
+
var schemaObj = _addSchema(schemaKeyRef);
|
95
|
+
v = schemaObj.validate || _compile(schemaObj);
|
96
|
+
}
|
97
|
+
|
98
|
+
var valid = v(data);
|
99
|
+
if (v.$async === true)
|
100
|
+
return self._opts.async == '*' ? co(valid) : valid;
|
101
|
+
self.errors = v.errors;
|
102
|
+
return valid;
|
103
|
+
}
|
104
|
+
|
105
|
+
|
106
|
+
/**
|
107
|
+
* Create validating function for passed schema.
|
108
|
+
* @param {Object} schema schema object
|
109
|
+
* @param {Boolean} _meta true if schema is a meta-schema. Used internally to compile meta schemas of custom keywords.
|
110
|
+
* @return {Function} validating function
|
111
|
+
*/
|
112
|
+
function compile(schema, _meta) {
|
113
|
+
var schemaObj = _addSchema(schema, undefined, _meta);
|
114
|
+
return schemaObj.validate || _compile(schemaObj);
|
115
|
+
}
|
116
|
+
|
117
|
+
|
118
|
+
/**
|
119
|
+
* Adds schema to the instance.
|
120
|
+
* @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored.
|
121
|
+
* @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`.
|
122
|
+
* @param {Boolean} _skipValidation true to skip schema validation. Used internally, option validateSchema should be used instead.
|
123
|
+
* @param {Boolean} _meta true if schema is a meta-schema. Used internally, addMetaSchema should be used instead.
|
124
|
+
*/
|
125
|
+
function addSchema(schema, key, _skipValidation, _meta) {
|
126
|
+
if (Array.isArray(schema)){
|
127
|
+
for (var i=0; i<schema.length; i++) addSchema(schema[i], undefined, _skipValidation, _meta);
|
128
|
+
return;
|
129
|
+
}
|
130
|
+
// can key/id have # inside?
|
131
|
+
key = resolve.normalizeId(key || schema.id);
|
132
|
+
checkUnique(key);
|
133
|
+
self._schemas[key] = _addSchema(schema, _skipValidation, _meta, true);
|
134
|
+
}
|
135
|
+
|
136
|
+
|
137
|
+
/**
|
138
|
+
* Add schema that will be used to validate other schemas
|
139
|
+
* options in META_IGNORE_OPTIONS are alway set to false
|
140
|
+
* @param {Object} schema schema object
|
141
|
+
* @param {String} key optional schema key
|
142
|
+
* @param {Boolean} skipValidation true to skip schema validation, can be used to override validateSchema option for meta-schema
|
143
|
+
*/
|
144
|
+
function addMetaSchema(schema, key, skipValidation) {
|
145
|
+
addSchema(schema, key, skipValidation, true);
|
146
|
+
}
|
147
|
+
|
148
|
+
|
149
|
+
/**
|
150
|
+
* Validate schema
|
151
|
+
* @param {Object} schema schema to validate
|
152
|
+
* @param {Boolean} throwOrLogError pass true to throw (or log) an error if invalid
|
153
|
+
* @return {Boolean} true if schema is valid
|
154
|
+
*/
|
155
|
+
function validateSchema(schema, throwOrLogError) {
|
156
|
+
var $schema = schema.$schema || self._opts.defaultMeta || defaultMeta();
|
157
|
+
var currentUriFormat = self._formats.uri;
|
158
|
+
self._formats.uri = typeof currentUriFormat == 'function'
|
159
|
+
? SCHEMA_URI_FORMAT_FUNC
|
160
|
+
: SCHEMA_URI_FORMAT;
|
161
|
+
var valid;
|
162
|
+
try { valid = validate($schema, schema); }
|
163
|
+
finally { self._formats.uri = currentUriFormat; }
|
164
|
+
if (!valid && throwOrLogError) {
|
165
|
+
var message = 'schema is invalid: ' + errorsText();
|
166
|
+
if (self._opts.validateSchema == 'log') console.error(message);
|
167
|
+
else throw new Error(message);
|
168
|
+
}
|
169
|
+
return valid;
|
170
|
+
}
|
171
|
+
|
172
|
+
|
173
|
+
function defaultMeta() {
|
174
|
+
var meta = self._opts.meta;
|
175
|
+
self._opts.defaultMeta = typeof meta == 'object'
|
176
|
+
? meta.id || meta
|
177
|
+
: self._opts.v5
|
178
|
+
? v5.META_SCHEMA_ID
|
179
|
+
: META_SCHEMA_ID;
|
180
|
+
return self._opts.defaultMeta;
|
181
|
+
}
|
182
|
+
|
183
|
+
|
184
|
+
/**
|
185
|
+
* Get compiled schema from the instance by `key` or `ref`.
|
186
|
+
* @param {String} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id).
|
187
|
+
* @return {Function} schema validating function (with property `schema`).
|
188
|
+
*/
|
189
|
+
function getSchema(keyRef) {
|
190
|
+
var schemaObj = _getSchemaObj(keyRef);
|
191
|
+
switch (typeof schemaObj) {
|
192
|
+
case 'object': return schemaObj.validate || _compile(schemaObj);
|
193
|
+
case 'string': return getSchema(schemaObj);
|
194
|
+
case 'undefined': return _getSchemaFragment(keyRef);
|
195
|
+
}
|
196
|
+
}
|
197
|
+
|
198
|
+
|
199
|
+
function _getSchemaFragment(ref) {
|
200
|
+
var res = resolve.schema.call(self, { schema: {} }, ref);
|
201
|
+
if (res) {
|
202
|
+
var schema = res.schema
|
203
|
+
, root = res.root
|
204
|
+
, baseId = res.baseId;
|
205
|
+
var v = compileSchema.call(self, schema, root, undefined, baseId);
|
206
|
+
self._fragments[ref] = new SchemaObject({
|
207
|
+
ref: ref,
|
208
|
+
fragment: true,
|
209
|
+
schema: schema,
|
210
|
+
root: root,
|
211
|
+
baseId: baseId,
|
212
|
+
validate: v
|
213
|
+
});
|
214
|
+
return v;
|
215
|
+
}
|
216
|
+
}
|
217
|
+
|
218
|
+
|
219
|
+
function _getSchemaObj(keyRef) {
|
220
|
+
keyRef = resolve.normalizeId(keyRef);
|
221
|
+
return self._schemas[keyRef] || self._refs[keyRef] || self._fragments[keyRef];
|
222
|
+
}
|
223
|
+
|
224
|
+
|
225
|
+
/**
|
226
|
+
* Remove cached schema(s).
|
227
|
+
* If no parameter is passed all schemas but meta-schemas are removed.
|
228
|
+
* If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed.
|
229
|
+
* Even if schema is referenced by other schemas it still can be removed as other schemas have local references.
|
230
|
+
* @param {String|Object|RegExp} schemaKeyRef key, ref, pattern to match key/ref or schema object
|
231
|
+
*/
|
232
|
+
function removeSchema(schemaKeyRef) {
|
233
|
+
if (schemaKeyRef instanceof RegExp) {
|
234
|
+
_removeAllSchemas(self._schemas, schemaKeyRef);
|
235
|
+
_removeAllSchemas(self._refs, schemaKeyRef);
|
236
|
+
return;
|
237
|
+
}
|
238
|
+
switch (typeof schemaKeyRef) {
|
239
|
+
case 'undefined':
|
240
|
+
_removeAllSchemas(self._schemas);
|
241
|
+
_removeAllSchemas(self._refs);
|
242
|
+
self._cache.clear();
|
243
|
+
return;
|
244
|
+
case 'string':
|
245
|
+
var schemaObj = _getSchemaObj(schemaKeyRef);
|
246
|
+
if (schemaObj) self._cache.del(schemaObj.jsonStr);
|
247
|
+
delete self._schemas[schemaKeyRef];
|
248
|
+
delete self._refs[schemaKeyRef];
|
249
|
+
return;
|
250
|
+
case 'object':
|
251
|
+
var jsonStr = stableStringify(schemaKeyRef);
|
252
|
+
self._cache.del(jsonStr);
|
253
|
+
var id = schemaKeyRef.id;
|
254
|
+
if (id) {
|
255
|
+
id = resolve.normalizeId(id);
|
256
|
+
delete self._schemas[id];
|
257
|
+
delete self._refs[id];
|
258
|
+
}
|
259
|
+
}
|
260
|
+
}
|
261
|
+
|
262
|
+
|
263
|
+
function _removeAllSchemas(schemas, regex) {
|
264
|
+
for (var keyRef in schemas) {
|
265
|
+
var schemaObj = schemas[keyRef];
|
266
|
+
if (!schemaObj.meta && (!regex || regex.test(keyRef))) {
|
267
|
+
self._cache.del(schemaObj.jsonStr);
|
268
|
+
delete schemas[keyRef];
|
269
|
+
}
|
270
|
+
}
|
271
|
+
}
|
272
|
+
|
273
|
+
|
274
|
+
function _addSchema(schema, skipValidation, meta, shouldAddSchema) {
|
275
|
+
if (typeof schema != 'object') throw new Error('schema should be object');
|
276
|
+
var jsonStr = stableStringify(schema);
|
277
|
+
var cached = self._cache.get(jsonStr);
|
278
|
+
if (cached) return cached;
|
279
|
+
|
280
|
+
shouldAddSchema = shouldAddSchema || self._opts.addUsedSchema !== false;
|
281
|
+
|
282
|
+
var id = resolve.normalizeId(schema.id);
|
283
|
+
if (id && shouldAddSchema) checkUnique(id);
|
284
|
+
|
285
|
+
var willValidate = self._opts.validateSchema !== false && !skipValidation;
|
286
|
+
var recursiveMeta;
|
287
|
+
if (willValidate && !(recursiveMeta = schema.id && schema.id == schema.$schema))
|
288
|
+
validateSchema(schema, true);
|
289
|
+
|
290
|
+
var localRefs = resolve.ids.call(self, schema);
|
291
|
+
|
292
|
+
var schemaObj = new SchemaObject({
|
293
|
+
id: id,
|
294
|
+
schema: schema,
|
295
|
+
localRefs: localRefs,
|
296
|
+
jsonStr: jsonStr,
|
297
|
+
meta: meta
|
298
|
+
});
|
299
|
+
|
300
|
+
if (id[0] != '#' && shouldAddSchema) self._refs[id] = schemaObj;
|
301
|
+
self._cache.put(jsonStr, schemaObj);
|
302
|
+
|
303
|
+
if (willValidate && recursiveMeta) validateSchema(schema, true);
|
304
|
+
|
305
|
+
return schemaObj;
|
306
|
+
}
|
307
|
+
|
308
|
+
|
309
|
+
function _compile(schemaObj, root) {
|
310
|
+
if (schemaObj.compiling) {
|
311
|
+
schemaObj.validate = callValidate;
|
312
|
+
callValidate.schema = schemaObj.schema;
|
313
|
+
callValidate.errors = null;
|
314
|
+
callValidate.root = root ? root : callValidate;
|
315
|
+
if (schemaObj.schema.$async === true)
|
316
|
+
callValidate.$async = true;
|
317
|
+
return callValidate;
|
318
|
+
}
|
319
|
+
schemaObj.compiling = true;
|
320
|
+
|
321
|
+
var currentOpts;
|
322
|
+
if (schemaObj.meta) {
|
323
|
+
currentOpts = self._opts;
|
324
|
+
self._opts = self._metaOpts;
|
325
|
+
}
|
326
|
+
|
327
|
+
var v;
|
328
|
+
try { v = compileSchema.call(self, schemaObj.schema, root, schemaObj.localRefs); }
|
329
|
+
finally {
|
330
|
+
schemaObj.compiling = false;
|
331
|
+
if (schemaObj.meta) self._opts = currentOpts;
|
332
|
+
}
|
333
|
+
|
334
|
+
schemaObj.validate = v;
|
335
|
+
schemaObj.refs = v.refs;
|
336
|
+
schemaObj.refVal = v.refVal;
|
337
|
+
schemaObj.root = v.root;
|
338
|
+
return v;
|
339
|
+
|
340
|
+
|
341
|
+
function callValidate() {
|
342
|
+
var _validate = schemaObj.validate;
|
343
|
+
var result = _validate.apply(null, arguments);
|
344
|
+
callValidate.errors = _validate.errors;
|
345
|
+
return result;
|
346
|
+
}
|
347
|
+
}
|
348
|
+
|
349
|
+
|
350
|
+
/**
|
351
|
+
* Convert array of error message objects to string
|
352
|
+
* @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used.
|
353
|
+
* @param {Object} options optional options with properties `separator` and `dataVar`.
|
354
|
+
* @return {String} human readable string with all errors descriptions
|
355
|
+
*/
|
356
|
+
function errorsText(errors, options) {
|
357
|
+
errors = errors || self.errors;
|
358
|
+
if (!errors) return 'No errors';
|
359
|
+
options = options || {};
|
360
|
+
var separator = options.separator === undefined ? ', ' : options.separator;
|
361
|
+
var dataVar = options.dataVar === undefined ? 'data' : options.dataVar;
|
362
|
+
|
363
|
+
var text = '';
|
364
|
+
for (var i=0; i<errors.length; i++) {
|
365
|
+
var e = errors[i];
|
366
|
+
if (e) text += dataVar + e.dataPath + ' ' + e.message + separator;
|
367
|
+
}
|
368
|
+
return text.slice(0, -separator.length);
|
369
|
+
}
|
370
|
+
|
371
|
+
|
372
|
+
/**
|
373
|
+
* Add custom format
|
374
|
+
* @param {String} name format name
|
375
|
+
* @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid)
|
376
|
+
*/
|
377
|
+
function addFormat(name, format) {
|
378
|
+
if (typeof format == 'string') format = new RegExp(format);
|
379
|
+
self._formats[name] = format;
|
380
|
+
}
|
381
|
+
|
382
|
+
|
383
|
+
function addDraft4MetaSchema() {
|
384
|
+
if (self._opts.meta !== false) {
|
385
|
+
var metaSchema = require('./refs/json-schema-draft-04.json');
|
386
|
+
addMetaSchema(metaSchema, META_SCHEMA_ID, true);
|
387
|
+
self._refs['http://json-schema.org/schema'] = META_SCHEMA_ID;
|
388
|
+
}
|
389
|
+
}
|
390
|
+
|
391
|
+
|
392
|
+
function addInitialSchemas() {
|
393
|
+
var optsSchemas = self._opts.schemas;
|
394
|
+
if (!optsSchemas) return;
|
395
|
+
if (Array.isArray(optsSchemas)) addSchema(optsSchemas);
|
396
|
+
else for (var key in optsSchemas) addSchema(optsSchemas[key], key);
|
397
|
+
}
|
398
|
+
|
399
|
+
|
400
|
+
function addInitialFormats() {
|
401
|
+
for (var name in self._opts.formats) {
|
402
|
+
var format = self._opts.formats[name];
|
403
|
+
addFormat(name, format);
|
404
|
+
}
|
405
|
+
}
|
406
|
+
|
407
|
+
|
408
|
+
function checkUnique(id) {
|
409
|
+
if (self._schemas[id] || self._refs[id])
|
410
|
+
throw new Error('schema with key or id "' + id + '" already exists');
|
411
|
+
}
|
412
|
+
|
413
|
+
|
414
|
+
function getMetaSchemaOptions() {
|
415
|
+
var metaOpts = util.copy(self._opts);
|
416
|
+
for (var i=0; i<META_IGNORE_OPTIONS.length; i++)
|
417
|
+
delete metaOpts[META_IGNORE_OPTIONS[i]];
|
418
|
+
return metaOpts;
|
419
|
+
}
|
420
|
+
}
|