fsevents 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/Readme.md +12 -13
- package/node_modules/ansi/package.json +1 -2
- package/node_modules/are-we-there-yet/package.json +1 -2
- package/node_modules/asn1/.travis.yml +4 -0
- package/node_modules/asn1/lib/ber/reader.js +27 -33
- package/node_modules/asn1/lib/ber/writer.js +10 -11
- package/node_modules/asn1/package.json +21 -19
- package/node_modules/asn1/tst/ber/reader.test.js +36 -0
- package/node_modules/asn1/tst/ber/writer.test.js +74 -0
- package/node_modules/assert-plus/package.json +1 -0
- package/node_modules/{ctype → bl/node_modules/readable-stream/node_modules/core-util-is}/LICENSE +1 -6
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +11 -11
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/package.json +17 -12
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/test.js +68 -0
- package/node_modules/boom/package.json +1 -1
- package/node_modules/commander/package.json +1 -1
- package/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/core-util-is/lib/util.js +11 -11
- package/node_modules/core-util-is/package.json +17 -12
- package/node_modules/core-util-is/test.js +68 -0
- package/node_modules/dashdash/README.md +508 -0
- package/node_modules/dashdash/lib/dashdash.js +813 -0
- package/node_modules/dashdash/package.json +87 -0
- package/node_modules/deep-extend/LICENSE +1 -1
- package/node_modules/deep-extend/README.md +89 -52
- package/node_modules/deep-extend/index.js +1 -90
- package/node_modules/deep-extend/lib/deep-extend.js +144 -0
- package/node_modules/deep-extend/package.json +47 -16
- package/node_modules/deep-extend/test/index.spec.js +168 -5
- package/node_modules/delegates/package.json +1 -2
- package/node_modules/ecc-jsbn/.npmignore +15 -0
- package/node_modules/ecc-jsbn/LICENSE +21 -0
- package/node_modules/ecc-jsbn/README.md +8 -0
- package/node_modules/ecc-jsbn/index.js +57 -0
- package/node_modules/ecc-jsbn/lib/LICENSE-jsbn +40 -0
- package/node_modules/ecc-jsbn/lib/ec.js +561 -0
- package/node_modules/ecc-jsbn/lib/sec.js +170 -0
- package/node_modules/ecc-jsbn/package.json +63 -0
- package/node_modules/ecc-jsbn/test.js +14 -0
- package/node_modules/extsprintf/.gitmodules +6 -0
- package/node_modules/{path-is-absolute/license → extsprintf/LICENSE} +2 -4
- package/node_modules/extsprintf/Makefile +23 -0
- package/node_modules/extsprintf/Makefile.deps +39 -0
- package/node_modules/extsprintf/Makefile.targ +285 -0
- package/node_modules/extsprintf/README.md +39 -0
- package/node_modules/extsprintf/examples/simple.js +2 -0
- package/node_modules/{ctype/tools/jsl.conf → extsprintf/jsl.node.conf} +71 -63
- package/node_modules/extsprintf/lib/extsprintf.js +166 -0
- package/node_modules/extsprintf/package.json +48 -0
- package/node_modules/fstream/package.json +1 -2
- package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/package.json +4 -22
- package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/package.json +3 -21
- package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/package.json +4 -23
- package/node_modules/fstream-ignore/node_modules/minimatch/package.json +4 -24
- package/node_modules/fstream-ignore/package.json +1 -2
- package/node_modules/gauge/package.json +1 -2
- package/node_modules/har-validator/package.json +15 -15
- package/node_modules/has-unicode/package.json +1 -2
- package/node_modules/hawk/dist/client.js +340 -0
- package/node_modules/hawk/lib/browser.js +14 -20
- package/node_modules/hawk/package.json +10 -10
- package/node_modules/hawk/test/browser.js +134 -101
- package/node_modules/hawk/test/index.js +61 -61
- package/node_modules/hawk/test/server.js +72 -84
- package/node_modules/hawk/test/uri.js +52 -63
- package/node_modules/http-signature/CHANGES.md +39 -0
- package/node_modules/http-signature/http_signing.md +16 -17
- package/node_modules/http-signature/lib/index.js +6 -4
- package/node_modules/http-signature/lib/parser.js +43 -29
- package/node_modules/http-signature/lib/signer.js +290 -74
- package/node_modules/http-signature/lib/utils.js +112 -0
- package/node_modules/http-signature/lib/verify.js +47 -15
- package/node_modules/http-signature/package.json +20 -14
- package/node_modules/is-my-json-valid/index.js +16 -14
- package/node_modules/is-my-json-valid/package.json +16 -12
- package/node_modules/is-typedarray/LICENSE.md +18 -0
- package/node_modules/is-typedarray/README.md +16 -0
- package/node_modules/is-typedarray/index.js +41 -0
- package/node_modules/is-typedarray/package.json +63 -0
- package/node_modules/is-typedarray/test.js +34 -0
- package/node_modules/jodid25519/.npmignore +11 -0
- package/node_modules/jodid25519/.travis.yml +7 -0
- package/node_modules/jodid25519/AUTHORS.md +3 -0
- package/node_modules/jodid25519/LICENSE +23 -0
- package/node_modules/jodid25519/README.md +51 -0
- package/node_modules/jodid25519/almond.0 +42 -0
- package/node_modules/jodid25519/almond.1 +13 -0
- package/node_modules/jodid25519/index.js +35 -0
- package/node_modules/jodid25519/jsdoc.json +19 -0
- package/node_modules/jodid25519/lib/core.js +481 -0
- package/node_modules/jodid25519/lib/curve255.js +221 -0
- package/node_modules/jodid25519/lib/dh.js +111 -0
- package/node_modules/jodid25519/lib/eddsa.js +573 -0
- package/node_modules/jodid25519/lib/utils.js +198 -0
- package/node_modules/jodid25519/package.json +77 -0
- package/node_modules/jsbn/.npmignore +2 -0
- package/node_modules/jsbn/LICENSE +40 -0
- package/node_modules/jsbn/README.md +175 -0
- package/node_modules/jsbn/example.html +12 -0
- package/node_modules/jsbn/example.js +3 -0
- package/node_modules/jsbn/index.js +1358 -0
- package/node_modules/jsbn/package.json +60 -0
- package/node_modules/json-schema/README.md +5 -0
- package/node_modules/json-schema/draft-00/hyper-schema +68 -0
- package/node_modules/json-schema/draft-00/json-ref +26 -0
- package/node_modules/json-schema/draft-00/links +33 -0
- package/node_modules/json-schema/draft-00/schema +155 -0
- package/node_modules/json-schema/draft-01/hyper-schema +68 -0
- package/node_modules/json-schema/draft-01/json-ref +26 -0
- package/node_modules/json-schema/draft-01/links +33 -0
- package/node_modules/json-schema/draft-01/schema +155 -0
- package/node_modules/json-schema/draft-02/hyper-schema +68 -0
- package/node_modules/json-schema/draft-02/json-ref +26 -0
- package/node_modules/json-schema/draft-02/links +35 -0
- package/node_modules/json-schema/draft-02/schema +166 -0
- package/node_modules/json-schema/draft-03/examples/address +20 -0
- package/node_modules/json-schema/draft-03/examples/calendar +53 -0
- package/node_modules/json-schema/draft-03/examples/card +105 -0
- package/node_modules/json-schema/draft-03/examples/geo +8 -0
- package/node_modules/json-schema/draft-03/examples/interfaces +23 -0
- package/node_modules/json-schema/draft-03/hyper-schema +60 -0
- package/node_modules/json-schema/draft-03/json-ref +26 -0
- package/node_modules/json-schema/draft-03/links +35 -0
- package/node_modules/json-schema/draft-03/schema +174 -0
- package/node_modules/json-schema/draft-04/hyper-schema +60 -0
- package/node_modules/json-schema/draft-04/links +41 -0
- package/node_modules/json-schema/draft-04/schema +189 -0
- package/node_modules/json-schema/draft-zyp-json-schema-03.xml +1120 -0
- package/node_modules/json-schema/draft-zyp-json-schema-04.xml +1072 -0
- package/node_modules/json-schema/lib/links.js +52 -0
- package/node_modules/json-schema/lib/validate.js +260 -0
- package/node_modules/json-schema/package.json +67 -0
- package/node_modules/json-schema/test/tests.js +95 -0
- package/node_modules/jsprim/CHANGES.md +30 -0
- package/node_modules/jsprim/LICENSE +19 -0
- package/node_modules/jsprim/README.md +228 -0
- package/node_modules/jsprim/lib/jsprim.js +478 -0
- package/node_modules/jsprim/package.json +54 -0
- package/node_modules/lodash._basetostring/package.json +1 -2
- package/node_modules/lodash._createpadding/package.json +1 -2
- package/node_modules/lodash.pad/package.json +1 -2
- package/node_modules/lodash.padleft/package.json +1 -2
- package/node_modules/lodash.padright/package.json +1 -2
- package/node_modules/lodash.repeat/package.json +1 -2
- package/node_modules/node-pre-gyp/CHANGELOG.md +8 -0
- package/node_modules/node-pre-gyp/README.md +570 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +4 -0
- package/node_modules/node-pre-gyp/node_modules/nopt/lib/nopt.js +2 -1
- package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/package.json +30 -37
- package/node_modules/node-pre-gyp/node_modules/nopt/package.json +37 -57
- package/node_modules/node-pre-gyp/node_modules/nopt/test/basic.js +22 -0
- package/node_modules/node-pre-gyp/package.json +17 -17
- package/node_modules/node-uuid/.npmignore +2 -0
- package/node_modules/node-uuid/README.md +12 -1
- package/node_modules/node-uuid/bower.json +1 -1
- package/node_modules/node-uuid/component.json +11 -4
- package/node_modules/node-uuid/package.json +25 -12
- package/node_modules/node-uuid/test/test.js +3 -0
- package/node_modules/node-uuid/uuid.js +70 -45
- package/node_modules/npmlog/.travis.yml +14 -0
- package/node_modules/npmlog/log.js +3 -0
- package/node_modules/npmlog/package.json +23 -20
- package/node_modules/npmlog/test/basic.js +8 -1
- package/node_modules/once/package.json +2 -3
- package/node_modules/pinkie/index.js +23 -7
- package/node_modules/pinkie/package.json +22 -15
- package/node_modules/pinkie/readme.md +17 -9
- package/node_modules/pinkie-promise/package.json +16 -14
- package/node_modules/pinkie-promise/readme.md +5 -3
- package/node_modules/rc/README.md +1 -1
- package/node_modules/rc/index.js +1 -1
- package/node_modules/rc/node_modules/minimist/package.json +1 -1
- package/node_modules/rc/package.json +12 -12
- package/node_modules/request/.eslintrc +1 -1
- package/node_modules/request/.travis.yml +4 -4
- package/node_modules/request/CHANGELOG.md +25 -0
- package/node_modules/request/README.md +12 -13
- package/node_modules/request/lib/har.js +84 -75
- package/node_modules/request/lib/redirect.js +2 -3
- package/node_modules/request/lib/tunnel.js +13 -18
- package/node_modules/request/package.json +17 -16
- package/node_modules/request/request.js +16 -59
- package/node_modules/rimraf/README.md +7 -2
- package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/package.json +5 -25
- package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/package.json +5 -25
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE +16 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md +42 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js +1 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js +23 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +58 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js +25 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +3 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +122 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +8 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js +191 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +2 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +3 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md +21 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +6 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +80 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +5 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +38 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +79 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +56 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +4 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/LICENSE +18 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +62 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +6 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +13 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +90 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +39 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +81 -0
- package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/package.json +3 -21
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +36 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +58 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +51 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +33 -0
- package/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +70 -0
- package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/package.json +4 -22
- package/node_modules/rimraf/node_modules/glob/package.json +2 -20
- package/node_modules/rimraf/package.json +10 -10
- package/node_modules/semver/README.md +25 -1
- package/node_modules/semver/package.json +10 -10
- package/node_modules/semver/range.bnf +16 -0
- package/node_modules/semver/semver.js +0 -12
- package/node_modules/sshpk/.npmignore +8 -0
- package/node_modules/sshpk/.travis.yml +11 -0
- package/node_modules/sshpk/LICENSE +18 -0
- package/node_modules/sshpk/README.md +436 -0
- package/node_modules/sshpk/bin/sshpk-conv +183 -0
- package/node_modules/sshpk/lib/algs.js +168 -0
- package/node_modules/sshpk/lib/dhe.js +312 -0
- package/node_modules/sshpk/lib/ed-compat.js +94 -0
- package/node_modules/sshpk/lib/errors.js +58 -0
- package/node_modules/sshpk/lib/fingerprint.js +140 -0
- package/node_modules/sshpk/lib/formats/auto.js +73 -0
- package/node_modules/sshpk/lib/formats/pem.js +152 -0
- package/node_modules/sshpk/lib/formats/pkcs1.js +320 -0
- package/node_modules/sshpk/lib/formats/pkcs8.js +510 -0
- package/node_modules/sshpk/lib/formats/rfc4253.js +145 -0
- package/node_modules/sshpk/lib/formats/ssh-private.js +138 -0
- package/node_modules/sshpk/lib/formats/ssh.js +114 -0
- package/node_modules/sshpk/lib/index.js +25 -0
- package/node_modules/sshpk/lib/key.js +260 -0
- package/node_modules/sshpk/lib/private-key.js +224 -0
- package/node_modules/sshpk/lib/signature.js +237 -0
- package/node_modules/sshpk/lib/ssh-buffer.js +123 -0
- package/node_modules/sshpk/lib/utils.js +207 -0
- package/node_modules/sshpk/node_modules/assert-plus/AUTHORS +6 -0
- package/node_modules/sshpk/node_modules/assert-plus/CHANGES.md +8 -0
- package/node_modules/sshpk/node_modules/assert-plus/README.md +155 -0
- package/node_modules/sshpk/node_modules/assert-plus/assert.js +206 -0
- package/node_modules/sshpk/node_modules/assert-plus/package.json +88 -0
- package/node_modules/sshpk/package.json +92 -0
- package/node_modules/strip-json-comments/cli.js +2 -2
- package/node_modules/strip-json-comments/package.json +13 -12
- package/node_modules/strip-json-comments/readme.md +11 -5
- package/node_modules/strip-json-comments/strip-json-comments.js +16 -7
- package/node_modules/tar/package.json +1 -2
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/lib/util.js +11 -11
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/package.json +17 -12
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/test.js +68 -0
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/inherits/package.json +1 -1
- package/node_modules/tar-pack/node_modules/rimraf/package.json +1 -2
- package/node_modules/tar-pack/package.json +1 -2
- package/node_modules/tough-cookie/lib/cookie.js +1 -1
- package/node_modules/tough-cookie/package.json +7 -7
- package/node_modules/tweetnacl/.npmignore +4 -0
- package/node_modules/tweetnacl/CHANGELOG.md +128 -0
- package/node_modules/tweetnacl/README.md +463 -0
- package/node_modules/tweetnacl/nacl-fast.js +2418 -0
- package/node_modules/tweetnacl/nacl-fast.min.js +2 -0
- package/node_modules/tweetnacl/nacl.js +1205 -0
- package/node_modules/tweetnacl/nacl.min.js +1 -0
- package/node_modules/tweetnacl/package.json +101 -0
- package/node_modules/uid-number/package.json +2 -3
- package/node_modules/verror/.gitmodules +0 -0
- package/node_modules/verror/LICENSE +19 -0
- package/node_modules/verror/Makefile +35 -0
- package/node_modules/verror/Makefile.targ +285 -0
- package/node_modules/verror/README.md +120 -0
- package/node_modules/verror/examples/levels-verror.js +36 -0
- package/node_modules/verror/examples/levels-werror.js +34 -0
- package/node_modules/verror/examples/varargs.js +6 -0
- package/node_modules/verror/examples/verror.js +13 -0
- package/node_modules/verror/examples/werror.js +14 -0
- package/node_modules/verror/jsl.node.conf +139 -0
- package/node_modules/verror/lib/verror.js +157 -0
- package/node_modules/verror/package.json +51 -0
- package/node_modules/verror/tests/tst.inherit.js +100 -0
- package/node_modules/verror/tests/tst.verror.js +156 -0
- package/node_modules/verror/tests/tst.werror.js +179 -0
- package/package.json +3 -3
- package/node_modules/bl/node_modules/readable-stream/node_modules/core-util-is/util.js +0 -106
- package/node_modules/core-util-is/util.js +0 -106
- package/node_modules/ctype/.npmignore +0 -1
- package/node_modules/ctype/CHANGELOG +0 -78
- package/node_modules/ctype/README +0 -82
- package/node_modules/ctype/README.old +0 -298
- package/node_modules/ctype/ctf.js +0 -245
- package/node_modules/ctype/ctio.js +0 -1485
- package/node_modules/ctype/ctype.js +0 -944
- package/node_modules/ctype/man/man3ctype/ctio.3ctype +0 -241
- package/node_modules/ctype/package.json +0 -51
- package/node_modules/ctype/tools/jsstyle +0 -839
- package/node_modules/http-signature/lib/util.js +0 -306
- package/node_modules/inflight/node_modules/once/package.json +0 -86
- package/node_modules/inflight/node_modules/once/test/once.js +0 -23
- package/node_modules/rimraf/node_modules/glob/LICENSE +0 -15
- package/node_modules/rimraf/node_modules/minimatch/LICENSE +0 -15
- package/node_modules/rimraf/node_modules/once/LICENSE +0 -15
- package/node_modules/rimraf/node_modules/once/README.md +0 -51
- package/node_modules/rimraf/node_modules/once/once.js +0 -21
- package/node_modules/rimraf/node_modules/once/package.json +0 -84
- package/node_modules/rimraf/node_modules/once/test/once.js +0 -23
- package/node_modules/tar-pack/node_modules/readable-stream/node_modules/core-util-is/util.js +0 -106
- package/node_modules/wrappy/LICENSE +0 -15
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/.npmignore +0 -0
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/README.md +0 -0
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/example.js +0 -0
- /package/node_modules/{brace-expansion → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion}/index.js +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.npmignore +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/.travis.yml +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/LICENSE.md +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/Makefile +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/README.md +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/example.js +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/index.js +0 -0
- /package/node_modules/{balanced-match → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match}/test/balanced.js +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/.travis.yml +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/LICENSE +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/README.markdown +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/example/map.js +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/index.js +0 -0
- /package/node_modules/{concat-map → fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map}/test/map.js +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/.npmignore +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/.travis.yml +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/CONTRIBUTING.md +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/LICENSE +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/README.md +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/abbrev.js +0 -0
- /package/node_modules/{abbrev → node-pre-gyp/node_modules/nopt/node_modules/abbrev}/test.js +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/.eslintrc +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/LICENSE +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/README.md +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/inflight.js +0 -0
- /package/node_modules/{fstream-ignore/node_modules/minimatch → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/LICENSE +0 -0
- /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/README.md +0 -0
- /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/test/basic.js +0 -0
- /package/node_modules/{wrappy → rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy}/wrappy.js +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob/node_modules/inflight}/test.js +0 -0
- /package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/README.md +0 -0
- /package/node_modules/rimraf/node_modules/{minimatch → glob/node_modules/minimatch}/minimatch.js +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob}/node_modules/once/README.md +0 -0
- /package/node_modules/{inflight/node_modules/once → rimraf/node_modules/glob/node_modules/once/node_modules/wrappy}/LICENSE +0 -0
- /package/node_modules/{inflight → rimraf/node_modules/glob}/node_modules/once/once.js +0 -0
- /package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/index.js +0 -0
- /package/node_modules/{path-is-absolute → rimraf/node_modules/glob/node_modules/path-is-absolute}/readme.md +0 -0
- /package/node_modules/{deep-extend → verror}/.npmignore +0 -0
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"_from": "har-validator@~2.0.2",
|
3
|
-
"_id": "har-validator@2.0.
|
3
|
+
"_id": "har-validator@2.0.3",
|
4
4
|
"_location": "/har-validator",
|
5
|
-
"_nodeVersion": "4.1.
|
5
|
+
"_nodeVersion": "4.1.2",
|
6
6
|
"_npmUser": {
|
7
7
|
"email": "ahmad@ahmadnassri.com",
|
8
8
|
"name": "ahmadnassri"
|
@@ -12,8 +12,8 @@
|
|
12
12
|
"_requiredBy": [
|
13
13
|
"/request"
|
14
14
|
],
|
15
|
-
"_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.
|
16
|
-
"_shasum": "
|
15
|
+
"_resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.3.tgz",
|
16
|
+
"_shasum": "5a9e12564a571cf0b81ef93c2157bd1617168883",
|
17
17
|
"author": {
|
18
18
|
"email": "ahmad@ahmadnassri.com",
|
19
19
|
"name": "Ahmad Nassri",
|
@@ -27,25 +27,25 @@
|
|
27
27
|
},
|
28
28
|
"dependencies": {
|
29
29
|
"chalk": "^1.1.1",
|
30
|
-
"commander": "^2.
|
31
|
-
"is-my-json-valid": "^2.12.
|
32
|
-
"pinkie-promise": "^
|
30
|
+
"commander": "^2.9.0",
|
31
|
+
"is-my-json-valid": "^2.12.3",
|
32
|
+
"pinkie-promise": "^2.0.0"
|
33
33
|
},
|
34
34
|
"description": "Extremely fast HTTP Archive (HAR) validator using JSON Schema",
|
35
35
|
"devDependencies": {
|
36
36
|
"codeclimate-test-reporter": "0.1.1",
|
37
37
|
"echint": "^1.5.0",
|
38
|
-
"istanbul": "^0.
|
39
|
-
"mocha": "^2.3.
|
38
|
+
"istanbul": "^0.4.0",
|
39
|
+
"mocha": "^2.3.4",
|
40
40
|
"require-directory": "^2.1.1",
|
41
|
-
"should": "^7.1.
|
41
|
+
"should": "^7.1.1",
|
42
42
|
"should-promised": "^0.3.1",
|
43
|
-
"standard": "^5.
|
43
|
+
"standard": "^5.4.1"
|
44
44
|
},
|
45
45
|
"directories": {},
|
46
46
|
"dist": {
|
47
|
-
"shasum": "
|
48
|
-
"tarball": "http://registry.npmjs.org/har-validator/-/har-validator-2.0.
|
47
|
+
"shasum": "5a9e12564a571cf0b81ef93c2157bd1617168883",
|
48
|
+
"tarball": "http://registry.npmjs.org/har-validator/-/har-validator-2.0.3.tgz"
|
49
49
|
},
|
50
50
|
"echint": {
|
51
51
|
"ignore": [
|
@@ -59,7 +59,7 @@
|
|
59
59
|
"bin",
|
60
60
|
"lib"
|
61
61
|
],
|
62
|
-
"gitHead": "
|
62
|
+
"gitHead": "a71163c62b8786a41d503248fb60893598f3c26f",
|
63
63
|
"homepage": "https://github.com/ahmadnassri/har-validator",
|
64
64
|
"keywords": [
|
65
65
|
"archive",
|
@@ -90,5 +90,5 @@
|
|
90
90
|
"pretest": "standard && echint",
|
91
91
|
"test": "mocha"
|
92
92
|
},
|
93
|
-
"version": "2.0.
|
93
|
+
"version": "2.0.3"
|
94
94
|
}
|
@@ -48,8 +48,7 @@
|
|
48
48
|
],
|
49
49
|
"name": "has-unicode",
|
50
50
|
"optionalDependencies": {},
|
51
|
-
"readme": "
|
52
|
-
"readmeFilename": "README.md",
|
51
|
+
"readme": "ERROR: No README data found!",
|
53
52
|
"repository": {
|
54
53
|
"type": "git",
|
55
54
|
"url": "git+https://github.com/iarna/has-unicode.git"
|
@@ -0,0 +1,340 @@
|
|
1
|
+
'use strict'
|
2
|
+
|
3
|
+
// Load modules
|
4
|
+
|
5
|
+
;
|
6
|
+
|
7
|
+
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }
|
8
|
+
|
9
|
+
var Url = require('url');
|
10
|
+
var Hoek = require('hoek');
|
11
|
+
var Cryptiles = require('cryptiles');
|
12
|
+
var Crypto = require('./crypto');
|
13
|
+
var Utils = require('./utils');
|
14
|
+
|
15
|
+
// Declare internals
|
16
|
+
|
17
|
+
var internals = {};
|
18
|
+
|
19
|
+
// Generate an Authorization header for a given request
|
20
|
+
|
21
|
+
/*
|
22
|
+
uri: 'http://example.com/resource?a=b' or object from Url.parse()
|
23
|
+
method: HTTP verb (e.g. 'GET', 'POST')
|
24
|
+
options: {
|
25
|
+
|
26
|
+
// Required
|
27
|
+
|
28
|
+
credentials: {
|
29
|
+
id: 'dh37fgj492je',
|
30
|
+
key: 'aoijedoaijsdlaksjdl',
|
31
|
+
algorithm: 'sha256' // 'sha1', 'sha256'
|
32
|
+
},
|
33
|
+
|
34
|
+
// Optional
|
35
|
+
|
36
|
+
ext: 'application-specific', // Application specific data sent via the ext attribute
|
37
|
+
timestamp: Date.now(), // A pre-calculated timestamp
|
38
|
+
nonce: '2334f34f', // A pre-generated nonce
|
39
|
+
localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
|
40
|
+
payload: '{"some":"payload"}', // UTF-8 encoded string for body hash generation (ignored if hash provided)
|
41
|
+
contentType: 'application/json', // Payload content-type (ignored if hash provided)
|
42
|
+
hash: 'U4MKKSmiVxk37JCCrAVIjV=', // Pre-calculated payload hash
|
43
|
+
app: '24s23423f34dx', // Oz application id
|
44
|
+
dlg: '234sz34tww3sd' // Oz delegated-by application id
|
45
|
+
}
|
46
|
+
*/
|
47
|
+
|
48
|
+
exports.header = function (uri, method, options) {
|
49
|
+
|
50
|
+
var result = {
|
51
|
+
field: '',
|
52
|
+
artifacts: {}
|
53
|
+
};
|
54
|
+
|
55
|
+
// Validate inputs
|
56
|
+
|
57
|
+
if (!uri || typeof uri !== 'string' && (typeof uri === 'undefined' ? 'undefined' : _typeof(uri)) !== 'object' || !method || typeof method !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') {
|
58
|
+
|
59
|
+
result.err = 'Invalid argument type';
|
60
|
+
return result;
|
61
|
+
}
|
62
|
+
|
63
|
+
// Application time
|
64
|
+
|
65
|
+
var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
|
66
|
+
|
67
|
+
// Validate credentials
|
68
|
+
|
69
|
+
var credentials = options.credentials;
|
70
|
+
if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
|
71
|
+
|
72
|
+
result.err = 'Invalid credential object';
|
73
|
+
return result;
|
74
|
+
}
|
75
|
+
|
76
|
+
if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
|
77
|
+
result.err = 'Unknown algorithm';
|
78
|
+
return result;
|
79
|
+
}
|
80
|
+
|
81
|
+
// Parse URI
|
82
|
+
|
83
|
+
if (typeof uri === 'string') {
|
84
|
+
uri = Url.parse(uri);
|
85
|
+
}
|
86
|
+
|
87
|
+
// Calculate signature
|
88
|
+
|
89
|
+
var artifacts = {
|
90
|
+
ts: timestamp,
|
91
|
+
nonce: options.nonce || Cryptiles.randomString(6),
|
92
|
+
method: method,
|
93
|
+
resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
|
94
|
+
host: uri.hostname,
|
95
|
+
port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
|
96
|
+
hash: options.hash,
|
97
|
+
ext: options.ext,
|
98
|
+
app: options.app,
|
99
|
+
dlg: options.dlg
|
100
|
+
};
|
101
|
+
|
102
|
+
result.artifacts = artifacts;
|
103
|
+
|
104
|
+
// Calculate payload hash
|
105
|
+
|
106
|
+
if (!artifacts.hash && (options.payload || options.payload === '')) {
|
107
|
+
|
108
|
+
artifacts.hash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, options.contentType);
|
109
|
+
}
|
110
|
+
|
111
|
+
var mac = Crypto.calculateMac('header', credentials, artifacts);
|
112
|
+
|
113
|
+
// Construct header
|
114
|
+
|
115
|
+
var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== ''; // Other falsey values allowed
|
116
|
+
var header = 'Hawk id="' + credentials.id + '", ts="' + artifacts.ts + '", nonce="' + artifacts.nonce + (artifacts.hash ? '", hash="' + artifacts.hash : '') + (hasExt ? '", ext="' + Hoek.escapeHeaderAttribute(artifacts.ext) : '') + '", mac="' + mac + '"';
|
117
|
+
|
118
|
+
if (artifacts.app) {
|
119
|
+
header = header + ', app="' + artifacts.app + (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"';
|
120
|
+
}
|
121
|
+
|
122
|
+
result.field = header;
|
123
|
+
|
124
|
+
return result;
|
125
|
+
};
|
126
|
+
|
127
|
+
// Validate server response
|
128
|
+
|
129
|
+
/*
|
130
|
+
res: node's response object
|
131
|
+
artifacts: object received from header().artifacts
|
132
|
+
options: {
|
133
|
+
payload: optional payload received
|
134
|
+
required: specifies if a Server-Authorization header is required. Defaults to 'false'
|
135
|
+
}
|
136
|
+
*/
|
137
|
+
|
138
|
+
exports.authenticate = function (res, credentials, artifacts, options) {
|
139
|
+
|
140
|
+
artifacts = Hoek.clone(artifacts);
|
141
|
+
options = options || {};
|
142
|
+
|
143
|
+
if (res.headers['www-authenticate']) {
|
144
|
+
|
145
|
+
// Parse HTTP WWW-Authenticate header
|
146
|
+
|
147
|
+
var wwwAttributes = Utils.parseAuthorizationHeader(res.headers['www-authenticate'], ['ts', 'tsm', 'error']);
|
148
|
+
if (wwwAttributes instanceof Error) {
|
149
|
+
return false;
|
150
|
+
}
|
151
|
+
|
152
|
+
// Validate server timestamp (not used to update clock since it is done via the SNPT client)
|
153
|
+
|
154
|
+
if (wwwAttributes.ts) {
|
155
|
+
var tsm = Crypto.calculateTsMac(wwwAttributes.ts, credentials);
|
156
|
+
if (tsm !== wwwAttributes.tsm) {
|
157
|
+
return false;
|
158
|
+
}
|
159
|
+
}
|
160
|
+
}
|
161
|
+
|
162
|
+
// Parse HTTP Server-Authorization header
|
163
|
+
|
164
|
+
if (!res.headers['server-authorization'] && !options.required) {
|
165
|
+
|
166
|
+
return true;
|
167
|
+
}
|
168
|
+
|
169
|
+
var attributes = Utils.parseAuthorizationHeader(res.headers['server-authorization'], ['mac', 'ext', 'hash']);
|
170
|
+
if (attributes instanceof Error) {
|
171
|
+
return false;
|
172
|
+
}
|
173
|
+
|
174
|
+
artifacts.ext = attributes.ext;
|
175
|
+
artifacts.hash = attributes.hash;
|
176
|
+
|
177
|
+
var mac = Crypto.calculateMac('response', credentials, artifacts);
|
178
|
+
if (mac !== attributes.mac) {
|
179
|
+
return false;
|
180
|
+
}
|
181
|
+
|
182
|
+
if (!options.payload && options.payload !== '') {
|
183
|
+
|
184
|
+
return true;
|
185
|
+
}
|
186
|
+
|
187
|
+
if (!attributes.hash) {
|
188
|
+
return false;
|
189
|
+
}
|
190
|
+
|
191
|
+
var calculatedHash = Crypto.calculatePayloadHash(options.payload, credentials.algorithm, res.headers['content-type']);
|
192
|
+
return calculatedHash === attributes.hash;
|
193
|
+
};
|
194
|
+
|
195
|
+
// Generate a bewit value for a given URI
|
196
|
+
|
197
|
+
/*
|
198
|
+
uri: 'http://example.com/resource?a=b' or object from Url.parse()
|
199
|
+
options: {
|
200
|
+
|
201
|
+
// Required
|
202
|
+
|
203
|
+
credentials: {
|
204
|
+
id: 'dh37fgj492je',
|
205
|
+
key: 'aoijedoaijsdlaksjdl',
|
206
|
+
algorithm: 'sha256' // 'sha1', 'sha256'
|
207
|
+
},
|
208
|
+
ttlSec: 60 * 60, // TTL in seconds
|
209
|
+
|
210
|
+
// Optional
|
211
|
+
|
212
|
+
ext: 'application-specific', // Application specific data sent via the ext attribute
|
213
|
+
localtimeOffsetMsec: 400 // Time offset to sync with server time
|
214
|
+
};
|
215
|
+
*/
|
216
|
+
|
217
|
+
exports.getBewit = function (uri, options) {
|
218
|
+
|
219
|
+
// Validate inputs
|
220
|
+
|
221
|
+
if (!uri || typeof uri !== 'string' && (typeof uri === 'undefined' ? 'undefined' : _typeof(uri)) !== 'object' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object' || !options.ttlSec) {
|
222
|
+
|
223
|
+
return '';
|
224
|
+
}
|
225
|
+
|
226
|
+
options.ext = options.ext === null || options.ext === undefined ? '' : options.ext; // Zero is valid value
|
227
|
+
|
228
|
+
// Application time
|
229
|
+
|
230
|
+
var now = Utils.now(options.localtimeOffsetMsec);
|
231
|
+
|
232
|
+
// Validate credentials
|
233
|
+
|
234
|
+
var credentials = options.credentials;
|
235
|
+
if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
|
236
|
+
|
237
|
+
return '';
|
238
|
+
}
|
239
|
+
|
240
|
+
if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
|
241
|
+
return '';
|
242
|
+
}
|
243
|
+
|
244
|
+
// Parse URI
|
245
|
+
|
246
|
+
if (typeof uri === 'string') {
|
247
|
+
uri = Url.parse(uri);
|
248
|
+
}
|
249
|
+
|
250
|
+
// Calculate signature
|
251
|
+
|
252
|
+
var exp = Math.floor(now / 1000) + options.ttlSec;
|
253
|
+
var mac = Crypto.calculateMac('bewit', credentials, {
|
254
|
+
ts: exp,
|
255
|
+
nonce: '',
|
256
|
+
method: 'GET',
|
257
|
+
resource: uri.pathname + (uri.search || ''), // Maintain trailing '?'
|
258
|
+
host: uri.hostname,
|
259
|
+
port: uri.port || (uri.protocol === 'http:' ? 80 : 443),
|
260
|
+
ext: options.ext
|
261
|
+
});
|
262
|
+
|
263
|
+
// Construct bewit: id\exp\mac\ext
|
264
|
+
|
265
|
+
var bewit = credentials.id + '\\' + exp + '\\' + mac + '\\' + options.ext;
|
266
|
+
return Hoek.base64urlEncode(bewit);
|
267
|
+
};
|
268
|
+
|
269
|
+
// Generate an authorization string for a message
|
270
|
+
|
271
|
+
/*
|
272
|
+
host: 'example.com',
|
273
|
+
port: 8000,
|
274
|
+
message: '{"some":"payload"}', // UTF-8 encoded string for body hash generation
|
275
|
+
options: {
|
276
|
+
|
277
|
+
// Required
|
278
|
+
|
279
|
+
credentials: {
|
280
|
+
id: 'dh37fgj492je',
|
281
|
+
key: 'aoijedoaijsdlaksjdl',
|
282
|
+
algorithm: 'sha256' // 'sha1', 'sha256'
|
283
|
+
},
|
284
|
+
|
285
|
+
// Optional
|
286
|
+
|
287
|
+
timestamp: Date.now(), // A pre-calculated timestamp
|
288
|
+
nonce: '2334f34f', // A pre-generated nonce
|
289
|
+
localtimeOffsetMsec: 400, // Time offset to sync with server time (ignored if timestamp provided)
|
290
|
+
}
|
291
|
+
*/
|
292
|
+
|
293
|
+
exports.message = function (host, port, message, options) {
|
294
|
+
|
295
|
+
// Validate inputs
|
296
|
+
|
297
|
+
if (!host || typeof host !== 'string' || !port || typeof port !== 'number' || message === null || message === undefined || typeof message !== 'string' || !options || (typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object') {
|
298
|
+
|
299
|
+
return null;
|
300
|
+
}
|
301
|
+
|
302
|
+
// Application time
|
303
|
+
|
304
|
+
var timestamp = options.timestamp || Utils.nowSecs(options.localtimeOffsetMsec);
|
305
|
+
|
306
|
+
// Validate credentials
|
307
|
+
|
308
|
+
var credentials = options.credentials;
|
309
|
+
if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) {
|
310
|
+
|
311
|
+
// Invalid credential object
|
312
|
+
return null;
|
313
|
+
}
|
314
|
+
|
315
|
+
if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
|
316
|
+
return null;
|
317
|
+
}
|
318
|
+
|
319
|
+
// Calculate signature
|
320
|
+
|
321
|
+
var artifacts = {
|
322
|
+
ts: timestamp,
|
323
|
+
nonce: options.nonce || Cryptiles.randomString(6),
|
324
|
+
host: host,
|
325
|
+
port: port,
|
326
|
+
hash: Crypto.calculatePayloadHash(message, credentials.algorithm)
|
327
|
+
};
|
328
|
+
|
329
|
+
// Construct authorization
|
330
|
+
|
331
|
+
var result = {
|
332
|
+
id: credentials.id,
|
333
|
+
ts: artifacts.ts,
|
334
|
+
nonce: artifacts.nonce,
|
335
|
+
hash: artifacts.hash,
|
336
|
+
mac: Crypto.calculateMac('message', credentials, artifacts)
|
337
|
+
};
|
338
|
+
|
339
|
+
return result;
|
340
|
+
};
|
@@ -93,8 +93,8 @@ hawk.client = {
|
|
93
93
|
ts: timestamp,
|
94
94
|
nonce: options.nonce || hawk.utils.randomString(6),
|
95
95
|
method: method,
|
96
|
-
resource: uri.
|
97
|
-
host: uri.
|
96
|
+
resource: uri.resource,
|
97
|
+
host: uri.host,
|
98
98
|
port: uri.port,
|
99
99
|
hash: options.hash,
|
100
100
|
ext: options.ext,
|
@@ -201,8 +201,8 @@ hawk.client = {
|
|
201
201
|
ts: exp,
|
202
202
|
nonce: '',
|
203
203
|
method: 'GET',
|
204
|
-
resource: uri.
|
205
|
-
host: uri.
|
204
|
+
resource: uri.resource, // Maintain trailing '?' and query params
|
205
|
+
host: uri.host,
|
206
206
|
port: uri.port,
|
207
207
|
ext: options.ext
|
208
208
|
});
|
@@ -583,26 +583,20 @@ hawk.utils = {
|
|
583
583
|
return result.join('');
|
584
584
|
},
|
585
585
|
|
586
|
+
uriRegex: /^([^:]+)\:\/\/(?:[^@]*@)?([^\/:]+)(?:\:(\d+))?([^#]*)(?:#.*)?$/, // scheme://credentials@host:port/resource#fragment
|
586
587
|
parseUri: function (input) {
|
587
588
|
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
// MIT License
|
592
|
-
|
593
|
-
var keys = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'hostname', 'port', 'resource', 'relative', 'pathname', 'directory', 'file', 'query', 'fragment'];
|
594
|
-
|
595
|
-
var uriRegex = /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?(((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?)(?:#(.*))?)/;
|
596
|
-
var uriByNumber = input.match(uriRegex);
|
597
|
-
var uri = {};
|
598
|
-
|
599
|
-
for (var i = 0, il = keys.length; i < il; ++i) {
|
600
|
-
uri[keys[i]] = uriByNumber[i] || '';
|
589
|
+
var parts = input.match(hawk.utils.uriRegex);
|
590
|
+
if (!parts) {
|
591
|
+
return { host: '', port: '', resource: '' };
|
601
592
|
}
|
602
593
|
|
603
|
-
|
604
|
-
|
605
|
-
|
594
|
+
var scheme = parts[1].toLowerCase();
|
595
|
+
var uri = {
|
596
|
+
host: parts[2],
|
597
|
+
port: parts[3] || (scheme === 'http' ? '80' : (scheme === 'https' ? '443' : '')),
|
598
|
+
resource: parts[4]
|
599
|
+
};
|
606
600
|
|
607
601
|
return uri;
|
608
602
|
},
|
@@ -1,19 +1,19 @@
|
|
1
1
|
{
|
2
2
|
"_from": "hawk@~3.1.0",
|
3
|
-
"_id": "hawk@3.1.
|
3
|
+
"_id": "hawk@3.1.2",
|
4
4
|
"_location": "/hawk",
|
5
|
-
"_nodeVersion": "0.
|
5
|
+
"_nodeVersion": "5.0.0",
|
6
6
|
"_npmUser": {
|
7
7
|
"email": "eran@hammer.io",
|
8
8
|
"name": "hueniverse"
|
9
9
|
},
|
10
|
-
"_npmVersion": "
|
10
|
+
"_npmVersion": "3.3.12",
|
11
11
|
"_phantomChildren": {},
|
12
12
|
"_requiredBy": [
|
13
13
|
"/request"
|
14
14
|
],
|
15
|
-
"_resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.
|
16
|
-
"_shasum": "
|
15
|
+
"_resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.2.tgz",
|
16
|
+
"_shasum": "90c90118886e21975d1ad4ae9b3e284ed19a2de8",
|
17
17
|
"author": {
|
18
18
|
"email": "eran@hammer.io",
|
19
19
|
"name": "Eran Hammer",
|
@@ -25,7 +25,7 @@
|
|
25
25
|
},
|
26
26
|
"contributors": [],
|
27
27
|
"dependencies": {
|
28
|
-
"boom": "
|
28
|
+
"boom": "2.x.x",
|
29
29
|
"cryptiles": "2.x.x",
|
30
30
|
"hoek": "2.x.x",
|
31
31
|
"sntp": "1.x.x"
|
@@ -37,13 +37,13 @@
|
|
37
37
|
},
|
38
38
|
"directories": {},
|
39
39
|
"dist": {
|
40
|
-
"shasum": "
|
41
|
-
"tarball": "http://registry.npmjs.org/hawk/-/hawk-3.1.
|
40
|
+
"shasum": "90c90118886e21975d1ad4ae9b3e284ed19a2de8",
|
41
|
+
"tarball": "http://registry.npmjs.org/hawk/-/hawk-3.1.2.tgz"
|
42
42
|
},
|
43
43
|
"engines": {
|
44
44
|
"node": ">=0.10.32"
|
45
45
|
},
|
46
|
-
"gitHead": "
|
46
|
+
"gitHead": "66dd8f9b32058c2e834b0976b2f112e19f38ee72",
|
47
47
|
"homepage": "https://github.com/hueniverse/hawk#readme",
|
48
48
|
"keywords": [
|
49
49
|
"authentication",
|
@@ -70,5 +70,5 @@
|
|
70
70
|
"test": "lab -a code -t 100 -L",
|
71
71
|
"test-cov-html": "lab -a code -r html -o coverage.html"
|
72
72
|
},
|
73
|
-
"version": "3.1.
|
73
|
+
"version": "3.1.2"
|
74
74
|
}
|