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
@@ -0,0 +1,170 @@
|
|
1
|
+
// Named EC curves
|
2
|
+
|
3
|
+
// Requires ec.js, jsbn.js, and jsbn2.js
|
4
|
+
var BigInteger = require('jsbn').BigInteger
|
5
|
+
var ECCurveFp = require('./ec.js').ECCurveFp
|
6
|
+
|
7
|
+
|
8
|
+
// ----------------
|
9
|
+
// X9ECParameters
|
10
|
+
|
11
|
+
// constructor
|
12
|
+
function X9ECParameters(curve,g,n,h) {
|
13
|
+
this.curve = curve;
|
14
|
+
this.g = g;
|
15
|
+
this.n = n;
|
16
|
+
this.h = h;
|
17
|
+
}
|
18
|
+
|
19
|
+
function x9getCurve() {
|
20
|
+
return this.curve;
|
21
|
+
}
|
22
|
+
|
23
|
+
function x9getG() {
|
24
|
+
return this.g;
|
25
|
+
}
|
26
|
+
|
27
|
+
function x9getN() {
|
28
|
+
return this.n;
|
29
|
+
}
|
30
|
+
|
31
|
+
function x9getH() {
|
32
|
+
return this.h;
|
33
|
+
}
|
34
|
+
|
35
|
+
X9ECParameters.prototype.getCurve = x9getCurve;
|
36
|
+
X9ECParameters.prototype.getG = x9getG;
|
37
|
+
X9ECParameters.prototype.getN = x9getN;
|
38
|
+
X9ECParameters.prototype.getH = x9getH;
|
39
|
+
|
40
|
+
// ----------------
|
41
|
+
// SECNamedCurves
|
42
|
+
|
43
|
+
function fromHex(s) { return new BigInteger(s, 16); }
|
44
|
+
|
45
|
+
function secp128r1() {
|
46
|
+
// p = 2^128 - 2^97 - 1
|
47
|
+
var p = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF");
|
48
|
+
var a = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC");
|
49
|
+
var b = fromHex("E87579C11079F43DD824993C2CEE5ED3");
|
50
|
+
//byte[] S = Hex.decode("000E0D4D696E6768756151750CC03A4473D03679");
|
51
|
+
var n = fromHex("FFFFFFFE0000000075A30D1B9038A115");
|
52
|
+
var h = BigInteger.ONE;
|
53
|
+
var curve = new ECCurveFp(p, a, b);
|
54
|
+
var G = curve.decodePointHex("04"
|
55
|
+
+ "161FF7528B899B2D0C28607CA52C5B86"
|
56
|
+
+ "CF5AC8395BAFEB13C02DA292DDED7A83");
|
57
|
+
return new X9ECParameters(curve, G, n, h);
|
58
|
+
}
|
59
|
+
|
60
|
+
function secp160k1() {
|
61
|
+
// p = 2^160 - 2^32 - 2^14 - 2^12 - 2^9 - 2^8 - 2^7 - 2^3 - 2^2 - 1
|
62
|
+
var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73");
|
63
|
+
var a = BigInteger.ZERO;
|
64
|
+
var b = fromHex("7");
|
65
|
+
//byte[] S = null;
|
66
|
+
var n = fromHex("0100000000000000000001B8FA16DFAB9ACA16B6B3");
|
67
|
+
var h = BigInteger.ONE;
|
68
|
+
var curve = new ECCurveFp(p, a, b);
|
69
|
+
var G = curve.decodePointHex("04"
|
70
|
+
+ "3B4C382CE37AA192A4019E763036F4F5DD4D7EBB"
|
71
|
+
+ "938CF935318FDCED6BC28286531733C3F03C4FEE");
|
72
|
+
return new X9ECParameters(curve, G, n, h);
|
73
|
+
}
|
74
|
+
|
75
|
+
function secp160r1() {
|
76
|
+
// p = 2^160 - 2^31 - 1
|
77
|
+
var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF");
|
78
|
+
var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC");
|
79
|
+
var b = fromHex("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45");
|
80
|
+
//byte[] S = Hex.decode("1053CDE42C14D696E67687561517533BF3F83345");
|
81
|
+
var n = fromHex("0100000000000000000001F4C8F927AED3CA752257");
|
82
|
+
var h = BigInteger.ONE;
|
83
|
+
var curve = new ECCurveFp(p, a, b);
|
84
|
+
var G = curve.decodePointHex("04"
|
85
|
+
+ "4A96B5688EF573284664698968C38BB913CBFC82"
|
86
|
+
+ "23A628553168947D59DCC912042351377AC5FB32");
|
87
|
+
return new X9ECParameters(curve, G, n, h);
|
88
|
+
}
|
89
|
+
|
90
|
+
function secp192k1() {
|
91
|
+
// p = 2^192 - 2^32 - 2^12 - 2^8 - 2^7 - 2^6 - 2^3 - 1
|
92
|
+
var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37");
|
93
|
+
var a = BigInteger.ZERO;
|
94
|
+
var b = fromHex("3");
|
95
|
+
//byte[] S = null;
|
96
|
+
var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D");
|
97
|
+
var h = BigInteger.ONE;
|
98
|
+
var curve = new ECCurveFp(p, a, b);
|
99
|
+
var G = curve.decodePointHex("04"
|
100
|
+
+ "DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D"
|
101
|
+
+ "9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D");
|
102
|
+
return new X9ECParameters(curve, G, n, h);
|
103
|
+
}
|
104
|
+
|
105
|
+
function secp192r1() {
|
106
|
+
// p = 2^192 - 2^64 - 1
|
107
|
+
var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF");
|
108
|
+
var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC");
|
109
|
+
var b = fromHex("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1");
|
110
|
+
//byte[] S = Hex.decode("3045AE6FC8422F64ED579528D38120EAE12196D5");
|
111
|
+
var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831");
|
112
|
+
var h = BigInteger.ONE;
|
113
|
+
var curve = new ECCurveFp(p, a, b);
|
114
|
+
var G = curve.decodePointHex("04"
|
115
|
+
+ "188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012"
|
116
|
+
+ "07192B95FFC8DA78631011ED6B24CDD573F977A11E794811");
|
117
|
+
return new X9ECParameters(curve, G, n, h);
|
118
|
+
}
|
119
|
+
|
120
|
+
function secp224r1() {
|
121
|
+
// p = 2^224 - 2^96 + 1
|
122
|
+
var p = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001");
|
123
|
+
var a = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE");
|
124
|
+
var b = fromHex("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4");
|
125
|
+
//byte[] S = Hex.decode("BD71344799D5C7FCDC45B59FA3B9AB8F6A948BC5");
|
126
|
+
var n = fromHex("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D");
|
127
|
+
var h = BigInteger.ONE;
|
128
|
+
var curve = new ECCurveFp(p, a, b);
|
129
|
+
var G = curve.decodePointHex("04"
|
130
|
+
+ "B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21"
|
131
|
+
+ "BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34");
|
132
|
+
return new X9ECParameters(curve, G, n, h);
|
133
|
+
}
|
134
|
+
|
135
|
+
function secp256r1() {
|
136
|
+
// p = 2^224 (2^32 - 1) + 2^192 + 2^96 - 1
|
137
|
+
var p = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF");
|
138
|
+
var a = fromHex("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC");
|
139
|
+
var b = fromHex("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B");
|
140
|
+
//byte[] S = Hex.decode("C49D360886E704936A6678E1139D26B7819F7E90");
|
141
|
+
var n = fromHex("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551");
|
142
|
+
var h = BigInteger.ONE;
|
143
|
+
var curve = new ECCurveFp(p, a, b);
|
144
|
+
var G = curve.decodePointHex("04"
|
145
|
+
+ "6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296"
|
146
|
+
+ "4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5");
|
147
|
+
return new X9ECParameters(curve, G, n, h);
|
148
|
+
}
|
149
|
+
|
150
|
+
// TODO: make this into a proper hashtable
|
151
|
+
function getSECCurveByName(name) {
|
152
|
+
if(name == "secp128r1") return secp128r1();
|
153
|
+
if(name == "secp160k1") return secp160k1();
|
154
|
+
if(name == "secp160r1") return secp160r1();
|
155
|
+
if(name == "secp192k1") return secp192k1();
|
156
|
+
if(name == "secp192r1") return secp192r1();
|
157
|
+
if(name == "secp224r1") return secp224r1();
|
158
|
+
if(name == "secp256r1") return secp256r1();
|
159
|
+
return null;
|
160
|
+
}
|
161
|
+
|
162
|
+
module.exports = {
|
163
|
+
"secp128r1":secp128r1,
|
164
|
+
"secp160k1":secp160k1,
|
165
|
+
"secp160r1":secp160r1,
|
166
|
+
"secp192k1":secp192k1,
|
167
|
+
"secp192r1":secp192r1,
|
168
|
+
"secp224r1":secp224r1,
|
169
|
+
"secp256r1":secp256r1
|
170
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
{
|
2
|
+
"_from": "ecc-jsbn@>=0.0.1 <1.0.0",
|
3
|
+
"_id": "ecc-jsbn@0.1.1",
|
4
|
+
"_location": "/ecc-jsbn",
|
5
|
+
"_nodeVersion": "0.12.6",
|
6
|
+
"_npmUser": {
|
7
|
+
"email": "jeremie@jabber.org",
|
8
|
+
"name": "quartzjer"
|
9
|
+
},
|
10
|
+
"_npmVersion": "2.11.2",
|
11
|
+
"_phantomChildren": {},
|
12
|
+
"_requiredBy": [
|
13
|
+
"/sshpk"
|
14
|
+
],
|
15
|
+
"_resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
|
16
|
+
"_shasum": "0fc73a9ed5f0d53c38193398523ef7e543777505",
|
17
|
+
"author": {
|
18
|
+
"email": "jeremie@jabber.org",
|
19
|
+
"name": "Jeremie Miller",
|
20
|
+
"url": "http://jeremie.com/"
|
21
|
+
},
|
22
|
+
"bugs": {
|
23
|
+
"url": "https://github.com/quartzjer/ecc-jsbn/issues"
|
24
|
+
},
|
25
|
+
"dependencies": {
|
26
|
+
"jsbn": "~0.1.0"
|
27
|
+
},
|
28
|
+
"description": "ECC JS code based on JSBN",
|
29
|
+
"devDependencies": {},
|
30
|
+
"directories": {},
|
31
|
+
"dist": {
|
32
|
+
"shasum": "0fc73a9ed5f0d53c38193398523ef7e543777505",
|
33
|
+
"tarball": "http://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz"
|
34
|
+
},
|
35
|
+
"gitHead": "d35a360352496721030da645e8054f07efc22487",
|
36
|
+
"homepage": "https://github.com/quartzjer/ecc-jsbn",
|
37
|
+
"keywords": [
|
38
|
+
"browserify",
|
39
|
+
"ecc",
|
40
|
+
"jsbn"
|
41
|
+
],
|
42
|
+
"license": "MIT",
|
43
|
+
"main": "index.js",
|
44
|
+
"maintainers": [
|
45
|
+
{
|
46
|
+
"name": "quartzjer",
|
47
|
+
"email": "jeremie@jabber.org"
|
48
|
+
},
|
49
|
+
{
|
50
|
+
"name": "rynomad",
|
51
|
+
"email": "nomad.ry@gmail.com"
|
52
|
+
}
|
53
|
+
],
|
54
|
+
"name": "ecc-jsbn",
|
55
|
+
"optionalDependencies": {},
|
56
|
+
"readme": "ERROR: No README data found!",
|
57
|
+
"repository": {
|
58
|
+
"type": "git",
|
59
|
+
"url": "git+https://github.com/quartzjer/ecc-jsbn.git"
|
60
|
+
},
|
61
|
+
"scripts": {},
|
62
|
+
"version": "0.1.1"
|
63
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
var ecc = require("./index.js");
|
2
|
+
var key1 = new ecc.ECKey(ecc.ECCurves.secp160r1);
|
3
|
+
var key2 = new ecc.ECKey(ecc.ECCurves.secp160r1);
|
4
|
+
console.log(key1.deriveSharedSecret(key2));
|
5
|
+
var key3 = new ecc.ECKey(ecc.ECCurves.secp160r1,key1.PrivateKey);
|
6
|
+
var key4 = new ecc.ECKey(ecc.ECCurves.secp160r1,key2.PublicKey,true);
|
7
|
+
console.log(key3.deriveSharedSecret(key4));
|
8
|
+
|
9
|
+
var key1 = new ecc.ECKey(ecc.ECCurves.secp256r1);
|
10
|
+
var key2 = new ecc.ECKey(ecc.ECCurves.secp256r1);
|
11
|
+
console.log(key1.deriveSharedSecret(key2));
|
12
|
+
var key3 = new ecc.ECKey(ecc.ECCurves.secp256r1,key1.PrivateKey);
|
13
|
+
var key4 = new ecc.ECKey(ecc.ECCurves.secp256r1,key2.PublicKey,true);
|
14
|
+
console.log(key3.deriveSharedSecret(key4));
|
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
1
|
+
Copyright (c) 2012, Joyent, Inc. All rights reserved.
|
4
2
|
|
5
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
4
|
of this software and associated documentation files (the "Software"), to deal
|
@@ -18,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
16
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
17
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
18
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE
|
19
|
+
THE SOFTWARE
|
@@ -0,0 +1,23 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2012, Joyent, Inc. All rights reserved.
|
3
|
+
#
|
4
|
+
# Makefile: top-level Makefile
|
5
|
+
#
|
6
|
+
# This Makefile contains only repo-specific logic and uses included makefiles
|
7
|
+
# to supply common targets (javascriptlint, jsstyle, restdown, etc.), which are
|
8
|
+
# used by other repos as well.
|
9
|
+
#
|
10
|
+
|
11
|
+
#
|
12
|
+
# Files
|
13
|
+
#
|
14
|
+
JS_FILES := $(shell find lib -name '*.js')
|
15
|
+
JSL_FILES_NODE = $(JS_FILES)
|
16
|
+
JSSTYLE_FILES = $(JS_FILES)
|
17
|
+
JSL_CONF_NODE = jsl.node.conf
|
18
|
+
|
19
|
+
# Default target is "check"
|
20
|
+
check:
|
21
|
+
|
22
|
+
include ./Makefile.deps
|
23
|
+
include ./Makefile.targ
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# -*- mode: makefile -*-
|
2
|
+
#
|
3
|
+
# Copyright (c) 2012, Joyent, Inc. All rights reserved.
|
4
|
+
#
|
5
|
+
# Makefile.deps: Makefile for including common tools as dependencies
|
6
|
+
#
|
7
|
+
# NOTE: This makefile comes from the "eng" repo. It's designed to be dropped
|
8
|
+
# into other repos as-is without requiring any modifications. If you find
|
9
|
+
# yourself changing this file, you should instead update the original copy in
|
10
|
+
# eng.git and then update your repo to use the new version.
|
11
|
+
#
|
12
|
+
# This file is separate from Makefile.targ so that teams can choose
|
13
|
+
# independently whether to use the common targets in Makefile.targ and the
|
14
|
+
# common tools here.
|
15
|
+
#
|
16
|
+
|
17
|
+
#
|
18
|
+
# javascriptlint
|
19
|
+
#
|
20
|
+
JSL_EXEC ?= deps/javascriptlint/build/install/jsl
|
21
|
+
JSL ?= python2.6 $(JSL_EXEC)
|
22
|
+
|
23
|
+
$(JSL_EXEC): | deps/javascriptlint/.git
|
24
|
+
cd deps/javascriptlint && make install
|
25
|
+
|
26
|
+
#
|
27
|
+
# jsstyle
|
28
|
+
#
|
29
|
+
JSSTYLE_EXEC ?= deps/jsstyle/jsstyle
|
30
|
+
JSSTYLE ?= $(JSSTYLE_EXEC)
|
31
|
+
|
32
|
+
$(JSSTYLE_EXEC): | deps/jsstyle/.git
|
33
|
+
|
34
|
+
#
|
35
|
+
# restdown
|
36
|
+
#
|
37
|
+
RESTDOWN_EXEC ?= deps/restdown/bin/restdown
|
38
|
+
RESTDOWN ?= python2.6 $(RESTDOWN_EXEC)
|
39
|
+
$(RESTDOWN_EXEC): | deps/restdown/.git
|
@@ -0,0 +1,285 @@
|
|
1
|
+
# -*- mode: makefile -*-
|
2
|
+
#
|
3
|
+
# Copyright (c) 2012, Joyent, Inc. All rights reserved.
|
4
|
+
#
|
5
|
+
# Makefile.targ: common targets.
|
6
|
+
#
|
7
|
+
# NOTE: This makefile comes from the "eng" repo. It's designed to be dropped
|
8
|
+
# into other repos as-is without requiring any modifications. If you find
|
9
|
+
# yourself changing this file, you should instead update the original copy in
|
10
|
+
# eng.git and then update your repo to use the new version.
|
11
|
+
#
|
12
|
+
# This Makefile defines several useful targets and rules. You can use it by
|
13
|
+
# including it from a Makefile that specifies some of the variables below.
|
14
|
+
#
|
15
|
+
# Targets defined in this Makefile:
|
16
|
+
#
|
17
|
+
# check Checks JavaScript files for lint and style
|
18
|
+
# Checks bash scripts for syntax
|
19
|
+
# Checks SMF manifests for validity against the SMF DTD
|
20
|
+
#
|
21
|
+
# clean Removes built files
|
22
|
+
#
|
23
|
+
# docs Builds restdown documentation in docs/
|
24
|
+
#
|
25
|
+
# prepush Depends on "check" and "test"
|
26
|
+
#
|
27
|
+
# test Does nothing (you should override this)
|
28
|
+
#
|
29
|
+
# xref Generates cscope (source cross-reference index)
|
30
|
+
#
|
31
|
+
# For details on what these targets are supposed to do, see the Joyent
|
32
|
+
# Engineering Guide.
|
33
|
+
#
|
34
|
+
# To make use of these targets, you'll need to set some of these variables. Any
|
35
|
+
# variables left unset will simply not be used.
|
36
|
+
#
|
37
|
+
# BASH_FILES Bash scripts to check for syntax
|
38
|
+
# (paths relative to top-level Makefile)
|
39
|
+
#
|
40
|
+
# CLEAN_FILES Files to remove as part of the "clean" target. Note
|
41
|
+
# that files generated by targets in this Makefile are
|
42
|
+
# automatically included in CLEAN_FILES. These include
|
43
|
+
# restdown-generated HTML and JSON files.
|
44
|
+
#
|
45
|
+
# DOC_FILES Restdown (documentation source) files. These are
|
46
|
+
# assumed to be contained in "docs/", and must NOT
|
47
|
+
# contain the "docs/" prefix.
|
48
|
+
#
|
49
|
+
# JSL_CONF_NODE Specify JavaScriptLint configuration files
|
50
|
+
# JSL_CONF_WEB (paths relative to top-level Makefile)
|
51
|
+
#
|
52
|
+
# Node.js and Web configuration files are separate
|
53
|
+
# because you'll usually want different global variable
|
54
|
+
# configurations. If no file is specified, none is given
|
55
|
+
# to jsl, which causes it to use a default configuration,
|
56
|
+
# which probably isn't what you want.
|
57
|
+
#
|
58
|
+
# JSL_FILES_NODE JavaScript files to check with Node config file.
|
59
|
+
# JSL_FILES_WEB JavaScript files to check with Web config file.
|
60
|
+
#
|
61
|
+
# You can also override these variables:
|
62
|
+
#
|
63
|
+
# BASH Path to bash (default: bash)
|
64
|
+
#
|
65
|
+
# CSCOPE_DIRS Directories to search for source files for the cscope
|
66
|
+
# index. (default: ".")
|
67
|
+
#
|
68
|
+
# JSL Path to JavaScriptLint (default: "jsl")
|
69
|
+
#
|
70
|
+
# JSL_FLAGS_NODE Additional flags to pass through to JSL
|
71
|
+
# JSL_FLAGS_WEB
|
72
|
+
# JSL_FLAGS
|
73
|
+
#
|
74
|
+
# JSSTYLE Path to jsstyle (default: jsstyle)
|
75
|
+
#
|
76
|
+
# JSSTYLE_FLAGS Additional flags to pass through to jsstyle
|
77
|
+
#
|
78
|
+
|
79
|
+
#
|
80
|
+
# Defaults for the various tools we use.
|
81
|
+
#
|
82
|
+
BASH ?= bash
|
83
|
+
BASHSTYLE ?= tools/bashstyle
|
84
|
+
CP ?= cp
|
85
|
+
CSCOPE ?= cscope
|
86
|
+
CSCOPE_DIRS ?= .
|
87
|
+
JSL ?= jsl
|
88
|
+
JSSTYLE ?= jsstyle
|
89
|
+
MKDIR ?= mkdir -p
|
90
|
+
MV ?= mv
|
91
|
+
RESTDOWN_FLAGS ?=
|
92
|
+
RMTREE ?= rm -rf
|
93
|
+
JSL_FLAGS ?= --nologo --nosummary
|
94
|
+
|
95
|
+
ifeq ($(shell uname -s),SunOS)
|
96
|
+
TAR ?= gtar
|
97
|
+
else
|
98
|
+
TAR ?= tar
|
99
|
+
endif
|
100
|
+
|
101
|
+
|
102
|
+
#
|
103
|
+
# Defaults for other fixed values.
|
104
|
+
#
|
105
|
+
BUILD = build
|
106
|
+
DISTCLEAN_FILES += $(BUILD)
|
107
|
+
DOC_BUILD = $(BUILD)/docs/public
|
108
|
+
|
109
|
+
#
|
110
|
+
# Configure JSL_FLAGS_{NODE,WEB} based on JSL_CONF_{NODE,WEB}.
|
111
|
+
#
|
112
|
+
ifneq ($(origin JSL_CONF_NODE), undefined)
|
113
|
+
JSL_FLAGS_NODE += --conf=$(JSL_CONF_NODE)
|
114
|
+
endif
|
115
|
+
|
116
|
+
ifneq ($(origin JSL_CONF_WEB), undefined)
|
117
|
+
JSL_FLAGS_WEB += --conf=$(JSL_CONF_WEB)
|
118
|
+
endif
|
119
|
+
|
120
|
+
#
|
121
|
+
# Targets. For descriptions on what these are supposed to do, see the
|
122
|
+
# Joyent Engineering Guide.
|
123
|
+
#
|
124
|
+
|
125
|
+
#
|
126
|
+
# Instruct make to keep around temporary files. We have rules below that
|
127
|
+
# automatically update git submodules as needed, but they employ a deps/*/.git
|
128
|
+
# temporary file. Without this directive, make tries to remove these .git
|
129
|
+
# directories after the build has completed.
|
130
|
+
#
|
131
|
+
.SECONDARY: $($(wildcard deps/*):%=%/.git)
|
132
|
+
|
133
|
+
#
|
134
|
+
# This rule enables other rules that use files from a git submodule to have
|
135
|
+
# those files depend on deps/module/.git and have "make" automatically check
|
136
|
+
# out the submodule as needed.
|
137
|
+
#
|
138
|
+
deps/%/.git:
|
139
|
+
git submodule update --init deps/$*
|
140
|
+
|
141
|
+
#
|
142
|
+
# These recipes make heavy use of dynamically-created phony targets. The parent
|
143
|
+
# Makefile defines a list of input files like BASH_FILES. We then say that each
|
144
|
+
# of these files depends on a fake target called filename.bashchk, and then we
|
145
|
+
# define a pattern rule for those targets that runs bash in check-syntax-only
|
146
|
+
# mode. This mechanism has the nice properties that if you specify zero files,
|
147
|
+
# the rule becomes a noop (unlike a single rule to check all bash files, which
|
148
|
+
# would invoke bash with zero files), and you can check individual files from
|
149
|
+
# the command line with "make filename.bashchk".
|
150
|
+
#
|
151
|
+
.PHONY: check-bash
|
152
|
+
check-bash: $(BASH_FILES:%=%.bashchk) $(BASH_FILES:%=%.bashstyle)
|
153
|
+
|
154
|
+
%.bashchk: %
|
155
|
+
$(BASH) -n $^
|
156
|
+
|
157
|
+
%.bashstyle: %
|
158
|
+
$(BASHSTYLE) $^
|
159
|
+
|
160
|
+
.PHONY: check-jsl check-jsl-node check-jsl-web
|
161
|
+
check-jsl: check-jsl-node check-jsl-web
|
162
|
+
|
163
|
+
check-jsl-node: $(JSL_FILES_NODE:%=%.jslnodechk)
|
164
|
+
|
165
|
+
check-jsl-web: $(JSL_FILES_WEB:%=%.jslwebchk)
|
166
|
+
|
167
|
+
%.jslnodechk: % $(JSL_EXEC)
|
168
|
+
$(JSL) $(JSL_FLAGS) $(JSL_FLAGS_NODE) $<
|
169
|
+
|
170
|
+
%.jslwebchk: % $(JSL_EXEC)
|
171
|
+
$(JSL) $(JSL_FLAGS) $(JSL_FLAGS_WEB) $<
|
172
|
+
|
173
|
+
.PHONY: check-jsstyle
|
174
|
+
check-jsstyle: $(JSSTYLE_FILES:%=%.jsstylechk)
|
175
|
+
|
176
|
+
%.jsstylechk: % $(JSSTYLE_EXEC)
|
177
|
+
$(JSSTYLE) $(JSSTYLE_FLAGS) $<
|
178
|
+
|
179
|
+
.PHONY: check
|
180
|
+
check: check-jsl check-jsstyle check-bash
|
181
|
+
@echo check ok
|
182
|
+
|
183
|
+
.PHONY: clean
|
184
|
+
clean::
|
185
|
+
-$(RMTREE) $(CLEAN_FILES)
|
186
|
+
|
187
|
+
.PHONY: distclean
|
188
|
+
distclean:: clean
|
189
|
+
-$(RMTREE) $(DISTCLEAN_FILES)
|
190
|
+
|
191
|
+
CSCOPE_FILES = cscope.in.out cscope.out cscope.po.out
|
192
|
+
CLEAN_FILES += $(CSCOPE_FILES)
|
193
|
+
|
194
|
+
.PHONY: xref
|
195
|
+
xref: cscope.files
|
196
|
+
$(CSCOPE) -bqR
|
197
|
+
|
198
|
+
.PHONY: cscope.files
|
199
|
+
cscope.files:
|
200
|
+
find $(CSCOPE_DIRS) -name '*.c' -o -name '*.h' -o -name '*.cc' \
|
201
|
+
-o -name '*.js' -o -name '*.s' -o -name '*.cpp' > $@
|
202
|
+
|
203
|
+
#
|
204
|
+
# The "docs" target is complicated because we do several things here:
|
205
|
+
#
|
206
|
+
# (1) Use restdown to build HTML and JSON files from each of DOC_FILES.
|
207
|
+
#
|
208
|
+
# (2) Copy these files into $(DOC_BUILD) (build/docs/public), which
|
209
|
+
# functions as a complete copy of the documentation that could be
|
210
|
+
# mirrored or served over HTTP.
|
211
|
+
#
|
212
|
+
# (3) Then copy any directories and media from docs/media into
|
213
|
+
# $(DOC_BUILD)/media. This allows projects to include their own media,
|
214
|
+
# including files that will override same-named files provided by
|
215
|
+
# restdown.
|
216
|
+
#
|
217
|
+
# Step (3) is the surprisingly complex part: in order to do this, we need to
|
218
|
+
# identify the subdirectories in docs/media, recreate them in
|
219
|
+
# $(DOC_BUILD)/media, then do the same with the files.
|
220
|
+
#
|
221
|
+
DOC_MEDIA_DIRS := $(shell find docs/media -type d 2>/dev/null | grep -v "^docs/media$$")
|
222
|
+
DOC_MEDIA_DIRS := $(DOC_MEDIA_DIRS:docs/media/%=%)
|
223
|
+
DOC_MEDIA_DIRS_BUILD := $(DOC_MEDIA_DIRS:%=$(DOC_BUILD)/media/%)
|
224
|
+
|
225
|
+
DOC_MEDIA_FILES := $(shell find docs/media -type f 2>/dev/null)
|
226
|
+
DOC_MEDIA_FILES := $(DOC_MEDIA_FILES:docs/media/%=%)
|
227
|
+
DOC_MEDIA_FILES_BUILD := $(DOC_MEDIA_FILES:%=$(DOC_BUILD)/media/%)
|
228
|
+
|
229
|
+
#
|
230
|
+
# Like the other targets, "docs" just depends on the final files we want to
|
231
|
+
# create in $(DOC_BUILD), leveraging other targets and recipes to define how
|
232
|
+
# to get there.
|
233
|
+
#
|
234
|
+
.PHONY: docs
|
235
|
+
docs: \
|
236
|
+
$(DOC_FILES:%.restdown=$(DOC_BUILD)/%.html) \
|
237
|
+
$(DOC_FILES:%.restdown=$(DOC_BUILD)/%.json) \
|
238
|
+
$(DOC_MEDIA_FILES_BUILD)
|
239
|
+
|
240
|
+
#
|
241
|
+
# We keep the intermediate files so that the next build can see whether the
|
242
|
+
# files in DOC_BUILD are up to date.
|
243
|
+
#
|
244
|
+
.PRECIOUS: \
|
245
|
+
$(DOC_FILES:%.restdown=docs/%.html) \
|
246
|
+
$(DOC_FILES:%.restdown=docs/%json)
|
247
|
+
|
248
|
+
#
|
249
|
+
# We do clean those intermediate files, as well as all of DOC_BUILD.
|
250
|
+
#
|
251
|
+
CLEAN_FILES += \
|
252
|
+
$(DOC_BUILD) \
|
253
|
+
$(DOC_FILES:%.restdown=docs/%.html) \
|
254
|
+
$(DOC_FILES:%.restdown=docs/%.json)
|
255
|
+
|
256
|
+
#
|
257
|
+
# Before installing the files, we must make sure the directories exist. The |
|
258
|
+
# syntax tells make that the dependency need only exist, not be up to date.
|
259
|
+
# Otherwise, it might try to rebuild spuriously because the directory itself
|
260
|
+
# appears out of date.
|
261
|
+
#
|
262
|
+
$(DOC_MEDIA_FILES_BUILD): | $(DOC_MEDIA_DIRS_BUILD)
|
263
|
+
|
264
|
+
$(DOC_BUILD)/%: docs/% | $(DOC_BUILD)
|
265
|
+
$(CP) $< $@
|
266
|
+
|
267
|
+
docs/%.json docs/%.html: docs/%.restdown | $(DOC_BUILD) $(RESTDOWN_EXEC)
|
268
|
+
$(RESTDOWN) $(RESTDOWN_FLAGS) -m $(DOC_BUILD) $<
|
269
|
+
|
270
|
+
$(DOC_BUILD):
|
271
|
+
$(MKDIR) $@
|
272
|
+
|
273
|
+
$(DOC_MEDIA_DIRS_BUILD):
|
274
|
+
$(MKDIR) $@
|
275
|
+
|
276
|
+
#
|
277
|
+
# The default "test" target does nothing. This should usually be overridden by
|
278
|
+
# the parent Makefile. It's included here so we can define "prepush" without
|
279
|
+
# requiring the repo to define "test".
|
280
|
+
#
|
281
|
+
.PHONY: test
|
282
|
+
test:
|
283
|
+
|
284
|
+
.PHONY: prepush
|
285
|
+
prepush: check test
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# extsprintf: extended POSIX-style sprintf
|
2
|
+
|
3
|
+
Stripped down version of s[n]printf(3c). We make a best effort to throw an
|
4
|
+
exception when given a format string we don't understand, rather than ignoring
|
5
|
+
it, so that we won't break existing programs if/when we go implement the rest
|
6
|
+
of this.
|
7
|
+
|
8
|
+
This implementation currently supports specifying
|
9
|
+
|
10
|
+
* field alignment ('-' flag),
|
11
|
+
* zero-pad ('0' flag)
|
12
|
+
* always show numeric sign ('+' flag),
|
13
|
+
* field width
|
14
|
+
* conversions for strings, decimal integers, and floats (numbers).
|
15
|
+
* argument size specifiers. These are all accepted but ignored, since
|
16
|
+
Javascript has no notion of the physical size of an argument.
|
17
|
+
|
18
|
+
Everything else is currently unsupported, most notably: precision, unsigned
|
19
|
+
numbers, non-decimal numbers, and characters.
|
20
|
+
|
21
|
+
Besides the usual POSIX conversions, this implementation supports:
|
22
|
+
|
23
|
+
* `%j`: pretty-print a JSON object (using node's "inspect")
|
24
|
+
* `%r`: pretty-print an Error object
|
25
|
+
|
26
|
+
# Example
|
27
|
+
|
28
|
+
First, install it:
|
29
|
+
|
30
|
+
# npm install extsprintf
|
31
|
+
|
32
|
+
Now, use it:
|
33
|
+
|
34
|
+
var mod_extsprintf = require('extsprintf');
|
35
|
+
console.log(mod_extsprintf.sprintf('hello %25s', 'world'));
|
36
|
+
|
37
|
+
outputs:
|
38
|
+
|
39
|
+
hello world
|