fsevents 1.0.11 → 1.0.17
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/.npmignore +1 -3
- package/.travis.yml +7 -5
- package/ISSUE_TEMPLATE.md +8 -0
- package/build/.target.mk +49 -0
- package/build/Makefile +352 -0
- package/build/action_after_build.target.mk +32 -0
- package/build/binding.Makefile +6 -0
- package/build/fse.target.mk +169 -0
- package/build/gyp-mac-tool +612 -0
- package/fsevents.cc +2 -2
- package/lib/binding/Release/node-v11-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v46-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v47-darwin-x64/fse.node +0 -0
- package/lib/binding/Release/node-v48-darwin-x64/fse.node +0 -0
- package/node_modules/{aws4/node_modules/lru-cache/node_modules/pseudomap → abbrev}/LICENSE +0 -0
- package/node_modules/{node-pre-gyp/node_modules/nopt/node_modules/abbrev → abbrev}/README.md +0 -0
- package/node_modules/{node-pre-gyp/node_modules/nopt/node_modules/abbrev → abbrev}/abbrev.js +0 -0
- package/node_modules/abbrev/package.json +90 -0
- package/node_modules/{lodash.repeat/LICENSE → ansi-regex/license} +5 -7
- package/node_modules/ansi-regex/package.json +47 -21
- package/node_modules/{lodash.padstart/LICENSE → ansi-styles/license} +5 -7
- package/node_modules/ansi-styles/package.json +44 -19
- package/node_modules/aproba/LICENSE +14 -0
- package/node_modules/aproba/README.md +59 -0
- package/node_modules/aproba/index.js +62 -0
- package/node_modules/aproba/package.json +96 -0
- package/node_modules/are-we-there-yet/package.json +31 -6
- package/node_modules/asn1/package.json +31 -5
- package/node_modules/assert-plus/package.json +33 -8
- package/node_modules/{node-uuid/LICENSE.md → asynckit/LICENSE} +1 -1
- package/node_modules/asynckit/README.md +233 -0
- package/node_modules/asynckit/bench.js +76 -0
- package/node_modules/asynckit/index.js +6 -0
- package/node_modules/asynckit/lib/abort.js +29 -0
- package/node_modules/asynckit/lib/async.js +34 -0
- package/node_modules/asynckit/lib/defer.js +26 -0
- package/node_modules/asynckit/lib/iterate.js +75 -0
- package/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- package/node_modules/asynckit/lib/readable_parallel.js +25 -0
- package/node_modules/asynckit/lib/readable_serial.js +25 -0
- package/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- package/node_modules/asynckit/lib/state.js +37 -0
- package/node_modules/asynckit/lib/streamify.js +141 -0
- package/node_modules/asynckit/lib/terminator.js +29 -0
- package/node_modules/asynckit/package.json +126 -0
- package/node_modules/asynckit/parallel.js +43 -0
- package/node_modules/asynckit/serial.js +17 -0
- package/node_modules/asynckit/serialOrdered.js +75 -0
- package/node_modules/asynckit/stream.js +21 -0
- package/node_modules/aws-sign2/package.json +31 -5
- package/node_modules/aws4/README.md +9 -0
- package/node_modules/aws4/aws4.js +9 -4
- package/node_modules/aws4/lru.js +96 -0
- package/node_modules/aws4/package.json +79 -56
- package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion → balanced-match}/.npmignore +2 -0
- package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match → balanced-match}/LICENSE.md +0 -0
- package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match → balanced-match}/README.md +5 -3
- package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match → balanced-match}/index.js +9 -1
- package/node_modules/balanced-match/package.json +110 -0
- package/node_modules/bcrypt-pbkdf/README.md +39 -0
- package/node_modules/bcrypt-pbkdf/index.js +559 -0
- package/node_modules/bcrypt-pbkdf/package.json +72 -0
- package/node_modules/block-stream/package.json +47 -14
- package/node_modules/boom/package.json +30 -4
- package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion → brace-expansion}/README.md +0 -0
- package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion → brace-expansion}/index.js +10 -0
- package/node_modules/brace-expansion/package.json +112 -0
- package/node_modules/buffer-shims/index.js +108 -0
- package/node_modules/buffer-shims/license.md +19 -0
- package/node_modules/buffer-shims/package.json +86 -0
- package/node_modules/buffer-shims/readme.md +21 -0
- package/node_modules/caseless/package.json +34 -8
- package/node_modules/{lodash.pad/LICENSE → chalk/license} +5 -7
- package/node_modules/chalk/node_modules/supports-color/index.js +50 -0
- package/node_modules/chalk/node_modules/supports-color/license +21 -0
- package/node_modules/chalk/node_modules/supports-color/package.json +113 -0
- package/node_modules/chalk/node_modules/supports-color/readme.md +36 -0
- package/node_modules/chalk/package.json +47 -22
- package/node_modules/code-point-at/index.js +32 -0
- package/node_modules/code-point-at/license +21 -0
- package/node_modules/code-point-at/package.json +106 -0
- package/node_modules/code-point-at/readme.md +32 -0
- package/node_modules/combined-stream/package.json +31 -5
- package/node_modules/commander/History.md +261 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/package.json +32 -6
- package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/.travis.yml +0 -0
- package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/LICENSE +0 -0
- package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/README.markdown +0 -0
- package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/example/map.js +0 -0
- package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/index.js +0 -0
- package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/package.json +47 -21
- package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/test/map.js +0 -0
- package/node_modules/console-control-strings/LICENSE +13 -0
- package/node_modules/console-control-strings/README.md +145 -0
- package/node_modules/console-control-strings/README.md~ +140 -0
- package/node_modules/console-control-strings/index.js +125 -0
- package/node_modules/console-control-strings/package.json +96 -0
- package/node_modules/core-util-is/package.json +38 -11
- package/node_modules/cryptiles/package.json +30 -4
- package/node_modules/dashdash/CHANGES.md +364 -0
- package/node_modules/dashdash/LICENSE.txt +24 -0
- package/node_modules/dashdash/etc/dashdash.bash_completion.in +4 -3
- package/node_modules/dashdash/lib/dashdash.js +34 -1
- package/node_modules/dashdash/node_modules/assert-plus/package.json +33 -8
- package/node_modules/dashdash/package.json +49 -23
- package/node_modules/debug/package.json +36 -10
- package/node_modules/deep-extend/CHANGELOG.md +21 -0
- package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → deep-extend}/LICENSE +3 -1
- package/node_modules/deep-extend/package.json +40 -15
- package/node_modules/delayed-stream/package.json +31 -5
- package/node_modules/delegates/package.json +31 -6
- package/node_modules/ecc-jsbn/package.json +33 -7
- package/node_modules/escape-string-regexp/license +21 -0
- package/node_modules/escape-string-regexp/package.json +37 -12
- package/node_modules/extend/package.json +32 -6
- package/node_modules/extsprintf/package.json +30 -5
- package/node_modules/forever-agent/package.json +31 -5
- package/node_modules/form-data/README.md +7 -8
- package/node_modules/form-data/lib/browser.js +1 -1
- package/node_modules/form-data/lib/form_data.js +101 -72
- package/node_modules/form-data/lib/populate.js +6 -5
- package/node_modules/form-data/package.json +80 -47
- package/node_modules/fs.realpath/LICENSE +43 -0
- package/node_modules/fs.realpath/README.md +33 -0
- package/node_modules/fs.realpath/index.js +66 -0
- package/node_modules/fs.realpath/old.js +303 -0
- package/node_modules/fs.realpath/package.json +94 -0
- package/node_modules/fstream/.travis.yml +4 -4
- package/node_modules/fstream/lib/collect.js +2 -0
- package/node_modules/fstream/package.json +46 -16
- package/node_modules/fstream-ignore/package.json +54 -18
- package/node_modules/gauge/CHANGELOG.md +145 -0
- package/node_modules/gauge/README.md +321 -88
- package/node_modules/gauge/base-theme.js +14 -0
- package/node_modules/gauge/error.js +24 -0
- package/node_modules/gauge/has-color.js +12 -0
- package/node_modules/gauge/index.js +230 -0
- package/node_modules/gauge/package.json +82 -27
- package/node_modules/gauge/plumbing.js +47 -0
- package/node_modules/gauge/process.js +3 -0
- package/node_modules/gauge/progress-bar.js +29 -219
- package/node_modules/gauge/render-template.js +181 -0
- package/node_modules/gauge/set-immediate.js +7 -0
- package/node_modules/gauge/set-interval.js +3 -0
- package/node_modules/gauge/spin.js +5 -0
- package/node_modules/gauge/template-item.js +73 -0
- package/node_modules/gauge/theme-set.js +115 -0
- package/node_modules/gauge/themes.js +54 -0
- package/node_modules/gauge/wide-truncate.js +25 -0
- package/node_modules/generate-function/package.json +32 -6
- package/node_modules/generate-object-property/package.json +30 -4
- package/node_modules/getpass/.npmignore +8 -0
- package/node_modules/getpass/.travis.yml +9 -0
- package/node_modules/getpass/LICENSE +18 -0
- package/node_modules/getpass/README.md +32 -0
- package/node_modules/getpass/lib/index.js +123 -0
- package/node_modules/getpass/node_modules/assert-plus/AUTHORS +6 -0
- package/node_modules/getpass/node_modules/assert-plus/CHANGES.md +14 -0
- package/node_modules/getpass/node_modules/assert-plus/README.md +162 -0
- package/node_modules/getpass/node_modules/assert-plus/assert.js +211 -0
- package/node_modules/getpass/node_modules/assert-plus/package.json +115 -0
- package/node_modules/getpass/package.json +90 -0
- package/node_modules/{aws4/node_modules/lru-cache/node_modules/yallist → glob}/LICENSE +0 -0
- package/node_modules/{rimraf/node_modules/glob → glob}/README.md +3 -0
- package/node_modules/glob/changelog.md +67 -0
- package/node_modules/{rimraf/node_modules/glob → glob}/common.js +6 -1
- package/node_modules/{rimraf/node_modules/glob → glob}/glob.js +25 -15
- package/node_modules/glob/package.json +111 -0
- package/node_modules/{rimraf/node_modules/glob → glob}/sync.js +31 -12
- package/node_modules/graceful-fs/LICENSE +15 -0
- package/node_modules/graceful-fs/README.md +83 -3
- package/node_modules/graceful-fs/graceful-fs.js +23 -14
- package/node_modules/graceful-fs/package.json +50 -24
- package/node_modules/graceful-fs/polyfills.js +99 -21
- package/node_modules/graceful-readlink/package.json +30 -4
- package/node_modules/har-validator/LICENSE +13 -0
- package/node_modules/har-validator/package.json +32 -6
- package/node_modules/has-ansi/license +21 -0
- package/node_modules/has-ansi/package.json +45 -19
- package/node_modules/has-unicode/index.js +3 -8
- package/node_modules/has-unicode/package.json +50 -18
- package/node_modules/hawk/package.json +34 -8
- package/node_modules/hoek/package.json +30 -4
- package/node_modules/http-signature/package.json +30 -4
- package/node_modules/{rimraf/node_modules/glob/node_modules/inflight → inflight}/LICENSE +0 -0
- package/node_modules/{rimraf/node_modules/glob/node_modules/inflight → inflight}/README.md +0 -0
- package/node_modules/inflight/inflight.js +54 -0
- package/node_modules/inflight/package.json +105 -0
- package/node_modules/inherits/inherits.js +7 -1
- package/node_modules/inherits/package.json +53 -26
- package/node_modules/{node-pre-gyp/node_modules/nopt → ini}/LICENSE +0 -0
- package/node_modules/ini/package.json +32 -7
- package/node_modules/is-fullwidth-code-point/index.js +46 -0
- package/node_modules/is-fullwidth-code-point/license +21 -0
- package/node_modules/is-fullwidth-code-point/package.json +108 -0
- package/node_modules/is-fullwidth-code-point/readme.md +39 -0
- package/node_modules/is-my-json-valid/index.js +10 -0
- package/node_modules/is-my-json-valid/package.json +52 -19
- package/node_modules/is-my-json-valid/test/misc.js +24 -0
- package/node_modules/is-property/package.json +35 -9
- package/node_modules/is-typedarray/package.json +32 -6
- package/node_modules/isarray/package.json +44 -17
- package/node_modules/isstream/package.json +35 -9
- package/node_modules/jodid25519/package.json +33 -7
- package/node_modules/jsbn/package.json +30 -4
- package/node_modules/json-schema/lib/links.js +17 -3
- package/node_modules/json-schema/lib/validate.js +18 -5
- package/node_modules/json-schema/package.json +44 -12
- package/node_modules/json-stringify-safe/package.json +34 -8
- package/node_modules/jsonpointer/LICENSE.md +21 -0
- package/node_modules/jsonpointer/README.md +17 -10
- package/node_modules/jsonpointer/jsonpointer.js +73 -56
- package/node_modules/jsonpointer/package.json +57 -18
- package/node_modules/jsprim/CHANGES.md +9 -0
- package/node_modules/jsprim/README.md +13 -4
- package/node_modules/jsprim/lib/jsprim.js +12 -2
- package/node_modules/jsprim/package.json +44 -14
- package/node_modules/mime-db/HISTORY.md +55 -0
- package/node_modules/mime-db/db.json +139 -2
- package/node_modules/mime-db/package.json +56 -27
- package/node_modules/mime-types/HISTORY.md +19 -0
- package/node_modules/mime-types/index.js +8 -8
- package/node_modules/mime-types/package.json +48 -19
- package/node_modules/{node-pre-gyp/node_modules/nopt/node_modules/abbrev → minimatch}/LICENSE +0 -0
- package/node_modules/{fstream-ignore/node_modules/minimatch → minimatch}/README.md +2 -9
- package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch → minimatch}/minimatch.js +34 -23
- package/node_modules/minimatch/package.json +98 -0
- package/node_modules/minimist/package.json +24 -16
- package/node_modules/mkdirp/package.json +25 -15
- package/node_modules/ms/History.md +66 -0
- package/node_modules/ms/package.json +29 -3
- package/node_modules/node-pre-gyp/CHANGELOG.md +37 -0
- package/node_modules/node-pre-gyp/README.md +34 -30
- package/node_modules/node-pre-gyp/appveyor.yml +20 -10
- package/node_modules/node-pre-gyp/lib/install.js +42 -8
- package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +2 -0
- package/node_modules/node-pre-gyp/lib/testbinary.js +9 -9
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +172 -0
- package/node_modules/node-pre-gyp/package.json +55 -57
- package/node_modules/{ansi → nopt}/.npmignore +0 -0
- package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/.travis.yml +0 -0
- package/node_modules/{rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy → nopt}/LICENSE +0 -0
- package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/README.md +0 -0
- package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/bin/nopt.js +0 -0
- package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/examples/my-program.js +0 -0
- package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/lib/nopt.js +0 -0
- package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/package.json +32 -6
- package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/test/basic.js +0 -0
- package/node_modules/npmlog/CHANGELOG.md +45 -0
- package/node_modules/npmlog/README.md +23 -2
- package/node_modules/npmlog/log.js +109 -58
- package/node_modules/npmlog/package.json +54 -20
- package/node_modules/number-is-nan/index.js +4 -0
- package/node_modules/number-is-nan/license +21 -0
- package/node_modules/number-is-nan/package.json +103 -0
- package/node_modules/number-is-nan/readme.md +28 -0
- package/node_modules/oauth-sign/package.json +47 -15
- package/node_modules/object-assign/index.js +83 -0
- package/node_modules/object-assign/license +21 -0
- package/node_modules/object-assign/package.json +114 -0
- package/node_modules/object-assign/readme.md +56 -0
- package/node_modules/{rimraf/node_modules/glob/node_modules/once/node_modules/wrappy → once}/LICENSE +0 -0
- package/node_modules/once/README.md +28 -0
- package/node_modules/once/once.js +21 -0
- package/node_modules/once/package.json +47 -16
- package/node_modules/{rimraf/node_modules/glob/node_modules/path-is-absolute → path-is-absolute}/index.js +5 -5
- package/node_modules/path-is-absolute/license +21 -0
- package/node_modules/path-is-absolute/package.json +111 -0
- package/node_modules/{rimraf/node_modules/glob/node_modules/path-is-absolute → path-is-absolute}/readme.md +19 -11
- package/node_modules/pinkie/license +21 -0
- package/node_modules/pinkie/package.json +35 -10
- package/node_modules/pinkie-promise/index.js +1 -1
- package/node_modules/pinkie-promise/license +21 -0
- package/node_modules/pinkie-promise/package.json +46 -16
- package/node_modules/process-nextick-args/index.js +31 -8
- package/node_modules/process-nextick-args/package.json +44 -13
- package/node_modules/punycode/LICENSE-MIT.txt +20 -0
- package/node_modules/punycode/README.md +176 -0
- package/node_modules/punycode/package.json +127 -0
- package/node_modules/punycode/punycode.js +533 -0
- package/node_modules/qs/.eslintrc +15 -13
- package/node_modules/qs/CHANGELOG.md +34 -0
- package/node_modules/qs/README.md +66 -3
- package/node_modules/qs/dist/qs.js +196 -97
- package/node_modules/qs/lib/formats.js +18 -0
- package/node_modules/qs/lib/index.js +6 -4
- package/node_modules/qs/lib/parse.js +48 -46
- package/node_modules/qs/lib/stringify.js +90 -33
- package/node_modules/qs/lib/utils.js +28 -10
- package/node_modules/qs/package.json +57 -24
- package/node_modules/qs/test/.eslintrc +9 -0
- package/node_modules/qs/test/index.js +2 -0
- package/node_modules/qs/test/parse.js +100 -34
- package/node_modules/qs/test/stringify.js +315 -12
- package/node_modules/qs/test/utils.js +13 -0
- package/node_modules/rc/node_modules/minimist/package.json +40 -14
- package/node_modules/rc/package.json +34 -9
- package/node_modules/readable-stream/.npmignore +5 -1
- package/node_modules/readable-stream/.travis.yml +4 -7
- package/node_modules/readable-stream/README.md +6 -2
- package/node_modules/readable-stream/lib/_stream_readable.js +173 -112
- package/node_modules/readable-stream/lib/_stream_transform.js +9 -7
- package/node_modules/readable-stream/lib/_stream_writable.js +57 -19
- package/node_modules/readable-stream/lib/internal/streams/BufferList.js +64 -0
- package/node_modules/readable-stream/package.json +59 -22
- package/node_modules/readable-stream/readable.js +4 -0
- package/node_modules/request/CHANGELOG.md +93 -24
- package/node_modules/request/README.md +12 -8
- package/node_modules/request/index.js +8 -8
- package/node_modules/request/lib/auth.js +1 -1
- package/node_modules/request/lib/helpers.js +7 -16
- package/node_modules/request/lib/multipart.js +1 -1
- package/node_modules/request/lib/oauth.js +1 -1
- package/node_modules/request/lib/redirect.js +5 -1
- package/node_modules/request/package.json +79 -38
- package/node_modules/request/request.js +140 -84
- package/node_modules/rimraf/package.json +44 -19
- package/node_modules/rimraf/rimraf.js +12 -4
- package/node_modules/semver/README.md +31 -8
- package/node_modules/semver/package.json +48 -14
- package/node_modules/semver/range.bnf +1 -1
- package/node_modules/semver/semver.js +21 -6
- package/node_modules/set-blocking/CHANGELOG.md +26 -0
- package/node_modules/set-blocking/LICENSE.txt +14 -0
- package/node_modules/set-blocking/README.md +31 -0
- package/node_modules/set-blocking/index.js +7 -0
- package/node_modules/set-blocking/package.json +106 -0
- package/node_modules/signal-exit/CHANGELOG.md +27 -0
- package/node_modules/signal-exit/LICENSE.txt +16 -0
- package/node_modules/signal-exit/README.md +40 -0
- package/node_modules/signal-exit/index.js +157 -0
- package/node_modules/signal-exit/package.json +106 -0
- package/node_modules/signal-exit/signals.js +53 -0
- package/node_modules/sntp/package.json +32 -6
- package/node_modules/sshpk/.travis.yml +3 -3
- package/node_modules/sshpk/README.md +237 -7
- package/node_modules/sshpk/bin/sshpk-conv +20 -2
- package/node_modules/sshpk/bin/sshpk-sign +16 -1
- package/node_modules/sshpk/lib/certificate.js +291 -0
- package/node_modules/sshpk/lib/errors.js +27 -1
- package/node_modules/sshpk/lib/fingerprint.js +28 -7
- package/node_modules/sshpk/lib/formats/auto.js +8 -8
- package/node_modules/sshpk/lib/formats/openssh-cert.js +289 -0
- package/node_modules/sshpk/lib/formats/pem.js +41 -7
- package/node_modules/sshpk/lib/formats/pkcs1.js +4 -4
- package/node_modules/sshpk/lib/formats/pkcs8.js +6 -11
- package/node_modules/sshpk/lib/formats/rfc4253.js +2 -2
- package/node_modules/sshpk/lib/formats/ssh-private.js +143 -20
- package/node_modules/sshpk/lib/formats/ssh.js +2 -2
- package/node_modules/sshpk/lib/formats/x509-pem.js +77 -0
- package/node_modules/sshpk/lib/formats/x509.js +484 -0
- package/node_modules/sshpk/lib/identity.js +255 -0
- package/node_modules/sshpk/lib/index.js +14 -1
- package/node_modules/sshpk/lib/key.js +21 -17
- package/node_modules/sshpk/lib/private-key.js +19 -12
- package/node_modules/sshpk/lib/signature.js +14 -6
- package/node_modules/sshpk/lib/ssh-buffer.js +24 -0
- package/node_modules/sshpk/lib/utils.js +82 -1
- package/node_modules/sshpk/node_modules/assert-plus/AUTHORS +6 -0
- package/node_modules/sshpk/node_modules/assert-plus/CHANGES.md +14 -0
- package/node_modules/sshpk/node_modules/assert-plus/README.md +162 -0
- package/node_modules/sshpk/node_modules/assert-plus/assert.js +211 -0
- package/node_modules/sshpk/node_modules/assert-plus/package.json +115 -0
- package/node_modules/sshpk/package.json +63 -35
- package/node_modules/string-width/index.js +37 -0
- package/node_modules/string-width/license +21 -0
- package/node_modules/string-width/package.json +124 -0
- package/node_modules/string-width/readme.md +42 -0
- package/node_modules/string_decoder/package.json +35 -8
- package/node_modules/stringstream/package.json +34 -8
- package/node_modules/strip-ansi/license +21 -0
- package/node_modules/strip-ansi/package.json +49 -22
- package/node_modules/strip-json-comments/license +21 -0
- package/node_modules/strip-json-comments/package.json +43 -17
- package/node_modules/supports-color/cli.js +28 -0
- package/node_modules/supports-color/index.js +2 -20
- package/node_modules/supports-color/package.json +61 -36
- package/node_modules/supports-color/readme.md +14 -6
- package/node_modules/tar/package.json +31 -5
- package/node_modules/tar-pack/README.md +4 -1
- package/node_modules/tar-pack/index.js +17 -12
- package/node_modules/tar-pack/node_modules/once/LICENSE +15 -0
- package/node_modules/{rimraf/node_modules/glob → tar-pack}/node_modules/once/README.md +0 -0
- package/node_modules/{rimraf/node_modules/glob → tar-pack}/node_modules/once/once.js +0 -0
- package/node_modules/{rimraf/node_modules/glob → tar-pack}/node_modules/once/package.json +34 -9
- package/node_modules/tar-pack/node_modules/readable-stream/.npmignore +8 -0
- package/node_modules/tar-pack/node_modules/readable-stream/.travis.yml +49 -0
- package/node_modules/tar-pack/node_modules/readable-stream/LICENSE +18 -0
- package/node_modules/tar-pack/node_modules/readable-stream/README.md +36 -0
- package/node_modules/tar-pack/node_modules/readable-stream/doc/stream.md +2015 -0
- package/node_modules/tar-pack/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
- package/node_modules/tar-pack/node_modules/readable-stream/duplex.js +1 -0
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_duplex.js +75 -0
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_passthrough.js +26 -0
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_readable.js +937 -0
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_transform.js +180 -0
- package/node_modules/tar-pack/node_modules/readable-stream/lib/_stream_writable.js +526 -0
- package/node_modules/tar-pack/node_modules/readable-stream/lib/internal/streams/BufferList.js +64 -0
- package/node_modules/tar-pack/node_modules/readable-stream/package.json +125 -0
- package/node_modules/tar-pack/node_modules/readable-stream/passthrough.js +1 -0
- package/node_modules/tar-pack/node_modules/readable-stream/readable.js +16 -0
- package/node_modules/tar-pack/node_modules/readable-stream/transform.js +1 -0
- package/node_modules/tar-pack/node_modules/readable-stream/writable.js +1 -0
- package/node_modules/tar-pack/package.json +54 -20
- package/node_modules/tar-pack/test/index.js +43 -1
- package/node_modules/tough-cookie/LICENSE +27 -0
- package/node_modules/tough-cookie/README.md +17 -3
- package/node_modules/tough-cookie/lib/cookie.js +6 -12
- package/node_modules/tough-cookie/package.json +62 -30
- package/node_modules/tunnel-agent/package.json +46 -13
- package/node_modules/tweetnacl/AUTHORS.md +28 -0
- package/node_modules/tweetnacl/CHANGELOG.md +40 -0
- package/node_modules/tweetnacl/LICENSE +24 -0
- package/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md +20 -0
- package/node_modules/tweetnacl/README.md +33 -19
- package/node_modules/tweetnacl/nacl-fast.min.js +2 -2
- package/node_modules/tweetnacl/nacl.d.ts +98 -0
- package/node_modules/tweetnacl/nacl.min.js +1 -1
- package/node_modules/tweetnacl/package.json +44 -17
- package/node_modules/uid-number/package.json +32 -7
- package/node_modules/util-deprecate/package.json +37 -10
- package/node_modules/uuid/.npmignore +8 -0
- package/node_modules/uuid/.travis.yml +5 -0
- package/node_modules/uuid/AUTHORS +5 -0
- package/node_modules/uuid/HISTORY.md +28 -0
- package/node_modules/{lodash.padend/LICENSE → uuid/LICENSE.md} +1 -3
- package/node_modules/uuid/README.md +132 -0
- package/node_modules/{node-uuid → uuid}/bin/uuid +0 -0
- package/node_modules/uuid/index.js +8 -0
- package/node_modules/uuid/lib/bytesToUuid.js +23 -0
- package/node_modules/uuid/lib/rng-browser.js +33 -0
- package/node_modules/uuid/lib/rng.js +10 -0
- package/node_modules/uuid/package.json +122 -0
- package/node_modules/uuid/test/mocha.opts +3 -0
- package/node_modules/uuid/test/test.js +96 -0
- package/node_modules/uuid/v1.js +103 -0
- package/node_modules/uuid/v4.js +29 -0
- package/node_modules/verror/package.json +30 -5
- package/node_modules/wide-align/.npmignore +5 -0
- package/node_modules/wide-align/LICENSE +14 -0
- package/node_modules/wide-align/README.md +47 -0
- package/node_modules/wide-align/align.js +65 -0
- package/node_modules/wide-align/package.json +93 -0
- package/node_modules/wide-align/test/align.js +37 -0
- package/node_modules/wrappy/package.json +55 -16
- package/node_modules/xtend/package.json +45 -19
- package/package.json +3 -3
- package/node_modules/ansi/.jshintrc +0 -4
- package/node_modules/ansi/History.md +0 -23
- package/node_modules/ansi/LICENSE +0 -24
- package/node_modules/ansi/README.md +0 -98
- package/node_modules/ansi/examples/beep/index.js +0 -16
- package/node_modules/ansi/examples/clear/index.js +0 -15
- package/node_modules/ansi/examples/cursorPosition.js +0 -32
- package/node_modules/ansi/examples/progress/index.js +0 -87
- package/node_modules/ansi/lib/ansi.js +0 -405
- package/node_modules/ansi/lib/newlines.js +0 -71
- package/node_modules/ansi/package.json +0 -69
- package/node_modules/async/README.md +0 -1877
- package/node_modules/async/dist/async.js +0 -1265
- package/node_modules/async/dist/async.min.js +0 -2
- package/node_modules/async/lib/async.js +0 -1265
- package/node_modules/async/package.json +0 -131
- package/node_modules/aws4/node_modules/lru-cache/README.md +0 -142
- package/node_modules/aws4/node_modules/lru-cache/lib/lru-cache.js +0 -469
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/README.md +0 -60
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/map.js +0 -9
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/package.json +0 -60
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/pseudomap.js +0 -113
- package/node_modules/aws4/node_modules/lru-cache/node_modules/pseudomap/test/basic.js +0 -86
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/.npmignore +0 -4
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/.travis.yml +0 -7
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/CONTRIBUTING.md +0 -4
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/README.md +0 -204
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/package.json +0 -60
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/test/basic.js +0 -188
- package/node_modules/aws4/node_modules/lru-cache/node_modules/yallist/yallist.js +0 -360
- package/node_modules/aws4/node_modules/lru-cache/package.json +0 -78
- package/node_modules/bl/.jshintrc +0 -59
- package/node_modules/bl/.npmignore +0 -1
- package/node_modules/bl/.travis.yml +0 -13
- package/node_modules/bl/LICENSE.md +0 -13
- package/node_modules/bl/README.md +0 -200
- package/node_modules/bl/bl.js +0 -227
- package/node_modules/bl/package.json +0 -72
- package/node_modules/bl/test/test.js +0 -571
- package/node_modules/block-stream/bench/block-stream-pause.js +0 -70
- package/node_modules/block-stream/bench/block-stream.js +0 -68
- package/node_modules/block-stream/bench/dropper-pause.js +0 -70
- package/node_modules/block-stream/bench/dropper.js +0 -68
- package/node_modules/block-stream/test/basic.js +0 -27
- package/node_modules/block-stream/test/nopad-thorough.js +0 -68
- package/node_modules/block-stream/test/nopad.js +0 -57
- package/node_modules/block-stream/test/pause-resume.js +0 -73
- package/node_modules/block-stream/test/thorough.js +0 -68
- package/node_modules/block-stream/test/two-stream.js +0 -59
- package/node_modules/form-data/.dockerignore +0 -7
- package/node_modules/form-data/.editorconfig +0 -10
- package/node_modules/form-data/.eslintignore +0 -1
- package/node_modules/form-data/.eslintrc +0 -64
- package/node_modules/form-data/wercker.yml +0 -36
- package/node_modules/fstream-ignore/.npmignore +0 -1
- package/node_modules/fstream-ignore/example/basic.js +0 -13
- package/node_modules/fstream-ignore/node_modules/minimatch/minimatch.js +0 -912
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/example.js +0 -8
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -191
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +0 -2
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +0 -3
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +0 -6
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/README.md +0 -89
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +0 -5
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +0 -80
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +0 -84
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/package.json +0 -91
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -86
- package/node_modules/fstream-ignore/node_modules/minimatch/package.json +0 -67
- package/node_modules/fstream-ignore/test/.ignore +0 -2
- package/node_modules/fstream-ignore/test/.npmignore +0 -1
- package/node_modules/fstream-ignore/test/00-setup.js +0 -71
- package/node_modules/fstream-ignore/test/basic.js +0 -28
- package/node_modules/fstream-ignore/test/common.js +0 -40
- package/node_modules/fstream-ignore/test/ignore-most.js +0 -41
- package/node_modules/fstream-ignore/test/nested-ignores.js +0 -51
- package/node_modules/fstream-ignore/test/read-file-order.js +0 -81
- package/node_modules/fstream-ignore/test/unignore-child.js +0 -38
- package/node_modules/fstream-ignore/test/zz-cleanup.js +0 -10
- package/node_modules/gauge/.npmignore +0 -32
- package/node_modules/gauge/example.png +0 -0
- package/node_modules/gauge/test/progress-bar.js +0 -176
- package/node_modules/has-unicode/.npmignore +0 -32
- package/node_modules/has-unicode/test/index.js +0 -26
- package/node_modules/inherits/test.js +0 -25
- package/node_modules/jsonpointer/.travis.yml +0 -10
- package/node_modules/jsonpointer/test.js +0 -98
- package/node_modules/lodash.pad/README.md +0 -18
- package/node_modules/lodash.pad/index.js +0 -296
- package/node_modules/lodash.pad/package.json +0 -91
- package/node_modules/lodash.padend/README.md +0 -18
- package/node_modules/lodash.padend/index.js +0 -285
- package/node_modules/lodash.padend/package.json +0 -91
- package/node_modules/lodash.padstart/README.md +0 -18
- package/node_modules/lodash.padstart/index.js +0 -285
- package/node_modules/lodash.padstart/package.json +0 -91
- package/node_modules/lodash.repeat/README.md +0 -18
- package/node_modules/lodash.repeat/index.js +0 -215
- package/node_modules/lodash.repeat/package.json +0 -92
- package/node_modules/lodash.tostring/LICENSE +0 -23
- package/node_modules/lodash.tostring/README.md +0 -18
- package/node_modules/lodash.tostring/index.js +0 -164
- package/node_modules/lodash.tostring/package.json +0 -91
- package/node_modules/node-pre-gyp/node_modules/nopt/.npmignore +0 -1
- package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/.npmignore +0 -4
- package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/.travis.yml +0 -5
- package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/CONTRIBUTING.md +0 -3
- package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/package.json +0 -56
- package/node_modules/node-pre-gyp/node_modules/nopt/node_modules/abbrev/test.js +0 -47
- package/node_modules/node-uuid/.npmignore +0 -4
- package/node_modules/node-uuid/README.md +0 -254
- package/node_modules/node-uuid/benchmark/README.md +0 -53
- package/node_modules/node-uuid/benchmark/bench.gnu +0 -174
- package/node_modules/node-uuid/benchmark/bench.sh +0 -34
- package/node_modules/node-uuid/benchmark/benchmark-native.c +0 -34
- package/node_modules/node-uuid/benchmark/benchmark.js +0 -84
- package/node_modules/node-uuid/bower.json +0 -23
- package/node_modules/node-uuid/component.json +0 -25
- package/node_modules/node-uuid/package.json +0 -87
- package/node_modules/node-uuid/test/compare_v1.js +0 -63
- package/node_modules/node-uuid/test/test.html +0 -17
- package/node_modules/node-uuid/test/test.js +0 -231
- package/node_modules/node-uuid/uuid.js +0 -272
- package/node_modules/npmlog/.nyc_output/64996.json +0 -1
- package/node_modules/npmlog/.nyc_output/64998.json +0 -1
- package/node_modules/npmlog/.nyc_output/65000.json +0 -1
- package/node_modules/npmlog/.travis.yml +0 -14
- package/node_modules/npmlog/example.js +0 -39
- package/node_modules/npmlog/test/basic.js +0 -235
- package/node_modules/npmlog/test/progress.js +0 -131
- package/node_modules/oauth-sign/test.js +0 -89
- package/node_modules/qs/.npmignore +0 -18
- package/node_modules/qs/.travis.yml +0 -69
- package/node_modules/qs/bower.json +0 -22
- package/node_modules/qs/component.json +0 -15
- package/node_modules/readable-stream/.zuul.yml +0 -1
- package/node_modules/readable-stream/doc/stream.markdown +0 -1760
- package/node_modules/request/.eslintrc +0 -45
- package/node_modules/request/.npmignore +0 -6
- package/node_modules/request/.travis.yml +0 -15
- package/node_modules/request/CONTRIBUTING.md +0 -44
- package/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc +0 -17
- package/node_modules/rimraf/node_modules/glob/node_modules/inflight/inflight.js +0 -44
- package/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/README.md +0 -36
- package/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/package.json +0 -59
- package/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/test/basic.js +0 -51
- package/node_modules/rimraf/node_modules/glob/node_modules/inflight/node_modules/wrappy/wrappy.js +0 -33
- package/node_modules/rimraf/node_modules/glob/node_modules/inflight/package.json +0 -68
- package/node_modules/rimraf/node_modules/glob/node_modules/inflight/test.js +0 -97
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/LICENSE +0 -16
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/README.md +0 -42
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits.js +0 -1
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/inherits_browser.js +0 -23
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/package.json +0 -59
- package/node_modules/rimraf/node_modules/glob/node_modules/inherits/test.js +0 -25
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/README.md +0 -216
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/.npmignore +0 -3
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -122
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/example.js +0 -8
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.npmignore +0 -2
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/.travis.yml +0 -3
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/LICENSE.md +0 -21
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile +0 -6
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/example.js +0 -5
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js +0 -50
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json +0 -80
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/test/balanced.js +0 -84
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/.travis.yml +0 -4
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/README.markdown +0 -62
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/example/map.js +0 -6
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/index.js +0 -13
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map/test/map.js +0 -39
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -86
- package/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json +0 -67
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/README.md +0 -36
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/package.json +0 -59
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/test/basic.js +0 -51
- package/node_modules/rimraf/node_modules/glob/node_modules/once/node_modules/wrappy/wrappy.js +0 -33
- package/node_modules/rimraf/node_modules/glob/node_modules/path-is-absolute/package.json +0 -79
- package/node_modules/rimraf/node_modules/glob/package.json +0 -85
- package/node_modules/semver/.npmignore +0 -4
- package/node_modules/semver/.travis.yml +0 -5
- package/node_modules/semver/test/big-numbers.js +0 -31
- package/node_modules/semver/test/clean.js +0 -29
- package/node_modules/semver/test/gtr.js +0 -173
- package/node_modules/semver/test/index.js +0 -698
- package/node_modules/semver/test/ltr.js +0 -181
- package/node_modules/semver/test/major-minor-patch.js +0 -72
- package/node_modules/tunnel-agent/.jshintrc +0 -5
- package/node_modules/tweetnacl/COPYING.txt +0 -9
- package/node_modules/wrappy/test/basic.js +0 -51
- package/test/fsevents.js +0 -27
- package/test/function.js +0 -93
@@ -0,0 +1,162 @@
|
|
1
|
+
# assert-plus
|
2
|
+
|
3
|
+
This library is a super small wrapper over node's assert module that has two
|
4
|
+
things: (1) the ability to disable assertions with the environment variable
|
5
|
+
NODE\_NDEBUG, and (2) some API wrappers for argument testing. Like
|
6
|
+
`assert.string(myArg, 'myArg')`. As a simple example, most of my code looks
|
7
|
+
like this:
|
8
|
+
|
9
|
+
```javascript
|
10
|
+
var assert = require('assert-plus');
|
11
|
+
|
12
|
+
function fooAccount(options, callback) {
|
13
|
+
assert.object(options, 'options');
|
14
|
+
assert.number(options.id, 'options.id');
|
15
|
+
assert.bool(options.isManager, 'options.isManager');
|
16
|
+
assert.string(options.name, 'options.name');
|
17
|
+
assert.arrayOfString(options.email, 'options.email');
|
18
|
+
assert.func(callback, 'callback');
|
19
|
+
|
20
|
+
// Do stuff
|
21
|
+
callback(null, {});
|
22
|
+
}
|
23
|
+
```
|
24
|
+
|
25
|
+
# API
|
26
|
+
|
27
|
+
All methods that *aren't* part of node's core assert API are simply assumed to
|
28
|
+
take an argument, and then a string 'name' that's not a message; `AssertionError`
|
29
|
+
will be thrown if the assertion fails with a message like:
|
30
|
+
|
31
|
+
AssertionError: foo (string) is required
|
32
|
+
at test (/home/mark/work/foo/foo.js:3:9)
|
33
|
+
at Object.<anonymous> (/home/mark/work/foo/foo.js:15:1)
|
34
|
+
at Module._compile (module.js:446:26)
|
35
|
+
at Object..js (module.js:464:10)
|
36
|
+
at Module.load (module.js:353:31)
|
37
|
+
at Function._load (module.js:311:12)
|
38
|
+
at Array.0 (module.js:484:10)
|
39
|
+
at EventEmitter._tickCallback (node.js:190:38)
|
40
|
+
|
41
|
+
from:
|
42
|
+
|
43
|
+
```javascript
|
44
|
+
function test(foo) {
|
45
|
+
assert.string(foo, 'foo');
|
46
|
+
}
|
47
|
+
```
|
48
|
+
|
49
|
+
There you go. You can check that arrays are of a homogeneous type with `Arrayof$Type`:
|
50
|
+
|
51
|
+
```javascript
|
52
|
+
function test(foo) {
|
53
|
+
assert.arrayOfString(foo, 'foo');
|
54
|
+
}
|
55
|
+
```
|
56
|
+
|
57
|
+
You can assert IFF an argument is not `undefined` (i.e., an optional arg):
|
58
|
+
|
59
|
+
```javascript
|
60
|
+
assert.optionalString(foo, 'foo');
|
61
|
+
```
|
62
|
+
|
63
|
+
Lastly, you can opt-out of assertion checking altogether by setting the
|
64
|
+
environment variable `NODE_NDEBUG=1`. This is pseudo-useful if you have
|
65
|
+
lots of assertions, and don't want to pay `typeof ()` taxes to v8 in
|
66
|
+
production. Be advised: The standard functions re-exported from `assert` are
|
67
|
+
also disabled in assert-plus if NDEBUG is specified. Using them directly from
|
68
|
+
the `assert` module avoids this behavior.
|
69
|
+
|
70
|
+
The complete list of APIs is:
|
71
|
+
|
72
|
+
* assert.array
|
73
|
+
* assert.bool
|
74
|
+
* assert.buffer
|
75
|
+
* assert.func
|
76
|
+
* assert.number
|
77
|
+
* assert.finite
|
78
|
+
* assert.object
|
79
|
+
* assert.string
|
80
|
+
* assert.stream
|
81
|
+
* assert.date
|
82
|
+
* assert.regexp
|
83
|
+
* assert.uuid
|
84
|
+
* assert.arrayOfArray
|
85
|
+
* assert.arrayOfBool
|
86
|
+
* assert.arrayOfBuffer
|
87
|
+
* assert.arrayOfFunc
|
88
|
+
* assert.arrayOfNumber
|
89
|
+
* assert.arrayOfFinite
|
90
|
+
* assert.arrayOfObject
|
91
|
+
* assert.arrayOfString
|
92
|
+
* assert.arrayOfStream
|
93
|
+
* assert.arrayOfDate
|
94
|
+
* assert.arrayOfRegexp
|
95
|
+
* assert.arrayOfUuid
|
96
|
+
* assert.optionalArray
|
97
|
+
* assert.optionalBool
|
98
|
+
* assert.optionalBuffer
|
99
|
+
* assert.optionalFunc
|
100
|
+
* assert.optionalNumber
|
101
|
+
* assert.optionalFinite
|
102
|
+
* assert.optionalObject
|
103
|
+
* assert.optionalString
|
104
|
+
* assert.optionalStream
|
105
|
+
* assert.optionalDate
|
106
|
+
* assert.optionalRegexp
|
107
|
+
* assert.optionalUuid
|
108
|
+
* assert.optionalArrayOfArray
|
109
|
+
* assert.optionalArrayOfBool
|
110
|
+
* assert.optionalArrayOfBuffer
|
111
|
+
* assert.optionalArrayOfFunc
|
112
|
+
* assert.optionalArrayOfNumber
|
113
|
+
* assert.optionalArrayOfFinite
|
114
|
+
* assert.optionalArrayOfObject
|
115
|
+
* assert.optionalArrayOfString
|
116
|
+
* assert.optionalArrayOfStream
|
117
|
+
* assert.optionalArrayOfDate
|
118
|
+
* assert.optionalArrayOfRegexp
|
119
|
+
* assert.optionalArrayOfUuid
|
120
|
+
* assert.AssertionError
|
121
|
+
* assert.fail
|
122
|
+
* assert.ok
|
123
|
+
* assert.equal
|
124
|
+
* assert.notEqual
|
125
|
+
* assert.deepEqual
|
126
|
+
* assert.notDeepEqual
|
127
|
+
* assert.strictEqual
|
128
|
+
* assert.notStrictEqual
|
129
|
+
* assert.throws
|
130
|
+
* assert.doesNotThrow
|
131
|
+
* assert.ifError
|
132
|
+
|
133
|
+
# Installation
|
134
|
+
|
135
|
+
npm install assert-plus
|
136
|
+
|
137
|
+
## License
|
138
|
+
|
139
|
+
The MIT License (MIT)
|
140
|
+
Copyright (c) 2012 Mark Cavage
|
141
|
+
|
142
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
143
|
+
this software and associated documentation files (the "Software"), to deal in
|
144
|
+
the Software without restriction, including without limitation the rights to
|
145
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
146
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
147
|
+
subject to the following conditions:
|
148
|
+
|
149
|
+
The above copyright notice and this permission notice shall be included in all
|
150
|
+
copies or substantial portions of the Software.
|
151
|
+
|
152
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
153
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
154
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
155
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
156
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
157
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
158
|
+
SOFTWARE.
|
159
|
+
|
160
|
+
## Bugs
|
161
|
+
|
162
|
+
See <https://github.com/mcavage/node-assert-plus/issues>.
|
@@ -0,0 +1,211 @@
|
|
1
|
+
// Copyright (c) 2012, Mark Cavage. All rights reserved.
|
2
|
+
// Copyright 2015 Joyent, Inc.
|
3
|
+
|
4
|
+
var assert = require('assert');
|
5
|
+
var Stream = require('stream').Stream;
|
6
|
+
var util = require('util');
|
7
|
+
|
8
|
+
|
9
|
+
///--- Globals
|
10
|
+
|
11
|
+
/* JSSTYLED */
|
12
|
+
var UUID_REGEXP = /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/;
|
13
|
+
|
14
|
+
|
15
|
+
///--- Internal
|
16
|
+
|
17
|
+
function _capitalize(str) {
|
18
|
+
return (str.charAt(0).toUpperCase() + str.slice(1));
|
19
|
+
}
|
20
|
+
|
21
|
+
function _toss(name, expected, oper, arg, actual) {
|
22
|
+
throw new assert.AssertionError({
|
23
|
+
message: util.format('%s (%s) is required', name, expected),
|
24
|
+
actual: (actual === undefined) ? typeof (arg) : actual(arg),
|
25
|
+
expected: expected,
|
26
|
+
operator: oper || '===',
|
27
|
+
stackStartFunction: _toss.caller
|
28
|
+
});
|
29
|
+
}
|
30
|
+
|
31
|
+
function _getClass(arg) {
|
32
|
+
return (Object.prototype.toString.call(arg).slice(8, -1));
|
33
|
+
}
|
34
|
+
|
35
|
+
function noop() {
|
36
|
+
// Why even bother with asserts?
|
37
|
+
}
|
38
|
+
|
39
|
+
|
40
|
+
///--- Exports
|
41
|
+
|
42
|
+
var types = {
|
43
|
+
bool: {
|
44
|
+
check: function (arg) { return typeof (arg) === 'boolean'; }
|
45
|
+
},
|
46
|
+
func: {
|
47
|
+
check: function (arg) { return typeof (arg) === 'function'; }
|
48
|
+
},
|
49
|
+
string: {
|
50
|
+
check: function (arg) { return typeof (arg) === 'string'; }
|
51
|
+
},
|
52
|
+
object: {
|
53
|
+
check: function (arg) {
|
54
|
+
return typeof (arg) === 'object' && arg !== null;
|
55
|
+
}
|
56
|
+
},
|
57
|
+
number: {
|
58
|
+
check: function (arg) {
|
59
|
+
return typeof (arg) === 'number' && !isNaN(arg);
|
60
|
+
}
|
61
|
+
},
|
62
|
+
finite: {
|
63
|
+
check: function (arg) {
|
64
|
+
return typeof (arg) === 'number' && !isNaN(arg) && isFinite(arg);
|
65
|
+
}
|
66
|
+
},
|
67
|
+
buffer: {
|
68
|
+
check: function (arg) { return Buffer.isBuffer(arg); },
|
69
|
+
operator: 'Buffer.isBuffer'
|
70
|
+
},
|
71
|
+
array: {
|
72
|
+
check: function (arg) { return Array.isArray(arg); },
|
73
|
+
operator: 'Array.isArray'
|
74
|
+
},
|
75
|
+
stream: {
|
76
|
+
check: function (arg) { return arg instanceof Stream; },
|
77
|
+
operator: 'instanceof',
|
78
|
+
actual: _getClass
|
79
|
+
},
|
80
|
+
date: {
|
81
|
+
check: function (arg) { return arg instanceof Date; },
|
82
|
+
operator: 'instanceof',
|
83
|
+
actual: _getClass
|
84
|
+
},
|
85
|
+
regexp: {
|
86
|
+
check: function (arg) { return arg instanceof RegExp; },
|
87
|
+
operator: 'instanceof',
|
88
|
+
actual: _getClass
|
89
|
+
},
|
90
|
+
uuid: {
|
91
|
+
check: function (arg) {
|
92
|
+
return typeof (arg) === 'string' && UUID_REGEXP.test(arg);
|
93
|
+
},
|
94
|
+
operator: 'isUUID'
|
95
|
+
}
|
96
|
+
};
|
97
|
+
|
98
|
+
function _setExports(ndebug) {
|
99
|
+
var keys = Object.keys(types);
|
100
|
+
var out;
|
101
|
+
|
102
|
+
/* re-export standard assert */
|
103
|
+
if (process.env.NODE_NDEBUG) {
|
104
|
+
out = noop;
|
105
|
+
} else {
|
106
|
+
out = function (arg, msg) {
|
107
|
+
if (!arg) {
|
108
|
+
_toss(msg, 'true', arg);
|
109
|
+
}
|
110
|
+
};
|
111
|
+
}
|
112
|
+
|
113
|
+
/* standard checks */
|
114
|
+
keys.forEach(function (k) {
|
115
|
+
if (ndebug) {
|
116
|
+
out[k] = noop;
|
117
|
+
return;
|
118
|
+
}
|
119
|
+
var type = types[k];
|
120
|
+
out[k] = function (arg, msg) {
|
121
|
+
if (!type.check(arg)) {
|
122
|
+
_toss(msg, k, type.operator, arg, type.actual);
|
123
|
+
}
|
124
|
+
};
|
125
|
+
});
|
126
|
+
|
127
|
+
/* optional checks */
|
128
|
+
keys.forEach(function (k) {
|
129
|
+
var name = 'optional' + _capitalize(k);
|
130
|
+
if (ndebug) {
|
131
|
+
out[name] = noop;
|
132
|
+
return;
|
133
|
+
}
|
134
|
+
var type = types[k];
|
135
|
+
out[name] = function (arg, msg) {
|
136
|
+
if (arg === undefined || arg === null) {
|
137
|
+
return;
|
138
|
+
}
|
139
|
+
if (!type.check(arg)) {
|
140
|
+
_toss(msg, k, type.operator, arg, type.actual);
|
141
|
+
}
|
142
|
+
};
|
143
|
+
});
|
144
|
+
|
145
|
+
/* arrayOf checks */
|
146
|
+
keys.forEach(function (k) {
|
147
|
+
var name = 'arrayOf' + _capitalize(k);
|
148
|
+
if (ndebug) {
|
149
|
+
out[name] = noop;
|
150
|
+
return;
|
151
|
+
}
|
152
|
+
var type = types[k];
|
153
|
+
var expected = '[' + k + ']';
|
154
|
+
out[name] = function (arg, msg) {
|
155
|
+
if (!Array.isArray(arg)) {
|
156
|
+
_toss(msg, expected, type.operator, arg, type.actual);
|
157
|
+
}
|
158
|
+
var i;
|
159
|
+
for (i = 0; i < arg.length; i++) {
|
160
|
+
if (!type.check(arg[i])) {
|
161
|
+
_toss(msg, expected, type.operator, arg, type.actual);
|
162
|
+
}
|
163
|
+
}
|
164
|
+
};
|
165
|
+
});
|
166
|
+
|
167
|
+
/* optionalArrayOf checks */
|
168
|
+
keys.forEach(function (k) {
|
169
|
+
var name = 'optionalArrayOf' + _capitalize(k);
|
170
|
+
if (ndebug) {
|
171
|
+
out[name] = noop;
|
172
|
+
return;
|
173
|
+
}
|
174
|
+
var type = types[k];
|
175
|
+
var expected = '[' + k + ']';
|
176
|
+
out[name] = function (arg, msg) {
|
177
|
+
if (arg === undefined || arg === null) {
|
178
|
+
return;
|
179
|
+
}
|
180
|
+
if (!Array.isArray(arg)) {
|
181
|
+
_toss(msg, expected, type.operator, arg, type.actual);
|
182
|
+
}
|
183
|
+
var i;
|
184
|
+
for (i = 0; i < arg.length; i++) {
|
185
|
+
if (!type.check(arg[i])) {
|
186
|
+
_toss(msg, expected, type.operator, arg, type.actual);
|
187
|
+
}
|
188
|
+
}
|
189
|
+
};
|
190
|
+
});
|
191
|
+
|
192
|
+
/* re-export built-in assertions */
|
193
|
+
Object.keys(assert).forEach(function (k) {
|
194
|
+
if (k === 'AssertionError') {
|
195
|
+
out[k] = assert[k];
|
196
|
+
return;
|
197
|
+
}
|
198
|
+
if (ndebug) {
|
199
|
+
out[k] = noop;
|
200
|
+
return;
|
201
|
+
}
|
202
|
+
out[k] = assert[k];
|
203
|
+
});
|
204
|
+
|
205
|
+
/* export ourselves (for unit tests _only_) */
|
206
|
+
out._setExports = _setExports;
|
207
|
+
|
208
|
+
return out;
|
209
|
+
}
|
210
|
+
|
211
|
+
module.exports = _setExports(process.env.NODE_NDEBUG);
|
@@ -0,0 +1,115 @@
|
|
1
|
+
{
|
2
|
+
"_args": [
|
3
|
+
[
|
4
|
+
{
|
5
|
+
"raw": "assert-plus@^1.0.0",
|
6
|
+
"scope": null,
|
7
|
+
"escapedName": "assert-plus",
|
8
|
+
"name": "assert-plus",
|
9
|
+
"rawSpec": "^1.0.0",
|
10
|
+
"spec": ">=1.0.0 <2.0.0",
|
11
|
+
"type": "range"
|
12
|
+
},
|
13
|
+
"/Users/eshanker/Code/fsevents/node_modules/sshpk"
|
14
|
+
]
|
15
|
+
],
|
16
|
+
"_from": "assert-plus@>=1.0.0 <2.0.0",
|
17
|
+
"_id": "assert-plus@1.0.0",
|
18
|
+
"_inCache": true,
|
19
|
+
"_location": "/sshpk/assert-plus",
|
20
|
+
"_nodeVersion": "0.10.40",
|
21
|
+
"_npmUser": {
|
22
|
+
"name": "pfmooney",
|
23
|
+
"email": "patrick.f.mooney@gmail.com"
|
24
|
+
},
|
25
|
+
"_npmVersion": "3.3.9",
|
26
|
+
"_phantomChildren": {},
|
27
|
+
"_requested": {
|
28
|
+
"raw": "assert-plus@^1.0.0",
|
29
|
+
"scope": null,
|
30
|
+
"escapedName": "assert-plus",
|
31
|
+
"name": "assert-plus",
|
32
|
+
"rawSpec": "^1.0.0",
|
33
|
+
"spec": ">=1.0.0 <2.0.0",
|
34
|
+
"type": "range"
|
35
|
+
},
|
36
|
+
"_requiredBy": [
|
37
|
+
"/sshpk"
|
38
|
+
],
|
39
|
+
"_resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
|
40
|
+
"_shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
|
41
|
+
"_shrinkwrap": null,
|
42
|
+
"_spec": "assert-plus@^1.0.0",
|
43
|
+
"_where": "/Users/eshanker/Code/fsevents/node_modules/sshpk",
|
44
|
+
"author": {
|
45
|
+
"name": "Mark Cavage",
|
46
|
+
"email": "mcavage@gmail.com"
|
47
|
+
},
|
48
|
+
"bugs": {
|
49
|
+
"url": "https://github.com/mcavage/node-assert-plus/issues"
|
50
|
+
},
|
51
|
+
"contributors": [
|
52
|
+
{
|
53
|
+
"name": "Dave Eddy",
|
54
|
+
"email": "dave@daveeddy.com"
|
55
|
+
},
|
56
|
+
{
|
57
|
+
"name": "Fred Kuo",
|
58
|
+
"email": "fred.kuo@joyent.com"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"name": "Lars-Magnus Skog",
|
62
|
+
"email": "ralphtheninja@riseup.net"
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"name": "Mark Cavage",
|
66
|
+
"email": "mcavage@gmail.com"
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"name": "Patrick Mooney",
|
70
|
+
"email": "pmooney@pfmooney.com"
|
71
|
+
},
|
72
|
+
{
|
73
|
+
"name": "Rob Gulewich",
|
74
|
+
"email": "robert.gulewich@joyent.com"
|
75
|
+
}
|
76
|
+
],
|
77
|
+
"dependencies": {},
|
78
|
+
"description": "Extra assertions on top of node's assert module",
|
79
|
+
"devDependencies": {
|
80
|
+
"faucet": "0.0.1",
|
81
|
+
"tape": "4.2.2"
|
82
|
+
},
|
83
|
+
"directories": {},
|
84
|
+
"dist": {
|
85
|
+
"shasum": "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525",
|
86
|
+
"tarball": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz"
|
87
|
+
},
|
88
|
+
"engines": {
|
89
|
+
"node": ">=0.8"
|
90
|
+
},
|
91
|
+
"homepage": "https://github.com/mcavage/node-assert-plus#readme",
|
92
|
+
"license": "MIT",
|
93
|
+
"main": "./assert.js",
|
94
|
+
"maintainers": [
|
95
|
+
{
|
96
|
+
"name": "mcavage",
|
97
|
+
"email": "mcavage@gmail.com"
|
98
|
+
},
|
99
|
+
{
|
100
|
+
"name": "pfmooney",
|
101
|
+
"email": "patrick.f.mooney@gmail.com"
|
102
|
+
}
|
103
|
+
],
|
104
|
+
"name": "assert-plus",
|
105
|
+
"optionalDependencies": {},
|
106
|
+
"readme": "ERROR: No README data found!",
|
107
|
+
"repository": {
|
108
|
+
"type": "git",
|
109
|
+
"url": "git+https://github.com/mcavage/node-assert-plus.git"
|
110
|
+
},
|
111
|
+
"scripts": {
|
112
|
+
"test": "tape tests/*.js | ./node_modules/.bin/faucet"
|
113
|
+
},
|
114
|
+
"version": "1.0.0"
|
115
|
+
}
|
@@ -1,24 +1,50 @@
|
|
1
1
|
{
|
2
|
-
"
|
3
|
-
|
2
|
+
"_args": [
|
3
|
+
[
|
4
|
+
{
|
5
|
+
"raw": "sshpk@^1.7.0",
|
6
|
+
"scope": null,
|
7
|
+
"escapedName": "sshpk",
|
8
|
+
"name": "sshpk",
|
9
|
+
"rawSpec": "^1.7.0",
|
10
|
+
"spec": ">=1.7.0 <2.0.0",
|
11
|
+
"type": "range"
|
12
|
+
},
|
13
|
+
"/Users/eshanker/Code/fsevents/node_modules/http-signature"
|
14
|
+
]
|
15
|
+
],
|
16
|
+
"_from": "sshpk@>=1.7.0 <2.0.0",
|
17
|
+
"_id": "sshpk@1.10.1",
|
18
|
+
"_inCache": true,
|
4
19
|
"_location": "/sshpk",
|
5
|
-
"_nodeVersion": "0.12.
|
20
|
+
"_nodeVersion": "0.12.15",
|
6
21
|
"_npmOperationalInternal": {
|
7
|
-
"host": "packages-
|
8
|
-
"tmp": "tmp/sshpk-1.
|
22
|
+
"host": "packages-16-east.internal.npmjs.com",
|
23
|
+
"tmp": "tmp/sshpk-1.10.1.tgz_1475095320582_0.4095200637821108"
|
9
24
|
},
|
10
25
|
"_npmUser": {
|
11
|
-
"
|
12
|
-
"
|
26
|
+
"name": "arekinath",
|
27
|
+
"email": "alex@cooperi.net"
|
13
28
|
},
|
14
|
-
"_npmVersion": "
|
29
|
+
"_npmVersion": "3.10.3",
|
15
30
|
"_phantomChildren": {},
|
31
|
+
"_requested": {
|
32
|
+
"raw": "sshpk@^1.7.0",
|
33
|
+
"scope": null,
|
34
|
+
"escapedName": "sshpk",
|
35
|
+
"name": "sshpk",
|
36
|
+
"rawSpec": "^1.7.0",
|
37
|
+
"spec": ">=1.7.0 <2.0.0",
|
38
|
+
"type": "range"
|
39
|
+
},
|
16
40
|
"_requiredBy": [
|
17
41
|
"/http-signature"
|
18
42
|
],
|
19
|
-
"_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.
|
20
|
-
"_shasum": "
|
43
|
+
"_resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.1.tgz",
|
44
|
+
"_shasum": "30e1a5d329244974a1af61511339d595af6638b0",
|
21
45
|
"_shrinkwrap": null,
|
46
|
+
"_spec": "sshpk@^1.7.0",
|
47
|
+
"_where": "/Users/eshanker/Code/fsevents/node_modules/http-signature",
|
22
48
|
"author": {
|
23
49
|
"name": "Joyent, Inc"
|
24
50
|
},
|
@@ -45,20 +71,22 @@
|
|
45
71
|
}
|
46
72
|
],
|
47
73
|
"dependencies": {
|
48
|
-
"asn1": "
|
49
|
-
"assert-plus": "
|
50
|
-
"
|
51
|
-
"
|
52
|
-
"
|
53
|
-
"
|
54
|
-
"
|
74
|
+
"asn1": "~0.2.3",
|
75
|
+
"assert-plus": "^1.0.0",
|
76
|
+
"bcrypt-pbkdf": "^1.0.0",
|
77
|
+
"dashdash": "^1.12.0",
|
78
|
+
"ecc-jsbn": "~0.1.1",
|
79
|
+
"getpass": "^0.1.1",
|
80
|
+
"jodid25519": "^1.0.0",
|
81
|
+
"jsbn": "~0.1.0",
|
82
|
+
"tweetnacl": "~0.14.0"
|
55
83
|
},
|
56
84
|
"description": "A library for finding and using SSH public keys",
|
57
85
|
"devDependencies": {
|
58
|
-
"benchmark": "
|
59
|
-
"sinon": "
|
60
|
-
"tape": "
|
61
|
-
"temp": "0.8.2"
|
86
|
+
"benchmark": "^1.0.0",
|
87
|
+
"sinon": "^1.17.2",
|
88
|
+
"tape": "^3.5.0",
|
89
|
+
"temp": "^0.8.2"
|
62
90
|
},
|
63
91
|
"directories": {
|
64
92
|
"bin": "./bin",
|
@@ -66,13 +94,13 @@
|
|
66
94
|
"man": "./man/man1"
|
67
95
|
},
|
68
96
|
"dist": {
|
69
|
-
"shasum": "
|
70
|
-
"tarball": "
|
97
|
+
"shasum": "30e1a5d329244974a1af61511339d595af6638b0",
|
98
|
+
"tarball": "https://registry.npmjs.org/sshpk/-/sshpk-1.10.1.tgz"
|
71
99
|
},
|
72
100
|
"engines": {
|
73
|
-
"node": ">=0.
|
101
|
+
"node": ">=0.10.0"
|
74
102
|
},
|
75
|
-
"gitHead": "
|
103
|
+
"gitHead": "4212272b3889f2df155d2aa8a1a5305fe7a7d3a5",
|
76
104
|
"homepage": "https://github.com/arekinath/node-sshpk#readme",
|
77
105
|
"license": "MIT",
|
78
106
|
"main": "lib/index.js",
|
@@ -83,19 +111,19 @@
|
|
83
111
|
}
|
84
112
|
],
|
85
113
|
"man": [
|
86
|
-
"/Users/alex.wilson/dev/sshpk/man/man1/sshpk-conv.1",
|
87
|
-
"/Users/alex.wilson/dev/sshpk/man/man1/sshpk-sign.1",
|
88
|
-
"/Users/alex.wilson/dev/sshpk/man/man1/sshpk-verify.1"
|
114
|
+
"/Users/alex.wilson/dev/node-sshpk/man/man1/sshpk-conv.1",
|
115
|
+
"/Users/alex.wilson/dev/node-sshpk/man/man1/sshpk-sign.1",
|
116
|
+
"/Users/alex.wilson/dev/node-sshpk/man/man1/sshpk-verify.1"
|
89
117
|
],
|
90
118
|
"name": "sshpk",
|
91
119
|
"optionalDependencies": {
|
92
|
-
"
|
93
|
-
"
|
94
|
-
"
|
95
|
-
"
|
120
|
+
"bcrypt-pbkdf": "^1.0.0",
|
121
|
+
"ecc-jsbn": "~0.1.1",
|
122
|
+
"jodid25519": "^1.0.0",
|
123
|
+
"jsbn": "~0.1.0",
|
124
|
+
"tweetnacl": "~0.14.0"
|
96
125
|
},
|
97
|
-
"readme": "sshpk\n=========\n\nParse, convert, fingerprint and use SSH keys (both public and private) in pure\nnode -- no `ssh-keygen` or other external dependencies.\n\nSupports RSA, DSA, ECDSA (nistp-\\*) and ED25519 key types, in PEM (PKCS#1, \nPKCS#8) and OpenSSH formats.\n\nThis library has been extracted from\n[`node-http-signature`](https://github.com/joyent/node-http-signature)\n(work by [Mark Cavage](https://github.com/mcavage) and\n[Dave Eddy](https://github.com/bahamas10)) and\n[`node-ssh-fingerprint`](https://github.com/bahamas10/node-ssh-fingerprint)\n(work by Dave Eddy), with additions (including ECDSA support) by\n[Alex Wilson](https://github.com/arekinath).\n\nInstall\n-------\n\n```\nnpm install sshpk\n```\n\nExamples\n--------\n\n```js\nvar sshpk = require('sshpk');\n\nvar fs = require('fs');\n\n/* Read in an OpenSSH-format public key */\nvar keyPub = fs.readFileSync('id_rsa.pub');\nvar key = sshpk.parseKey(keyPub, 'ssh');\n\n/* Get metadata about the key */\nconsole.log('type => %s', key.type);\nconsole.log('size => %d bits', key.size);\nconsole.log('comment => %s', key.comment);\n\n/* Compute key fingerprints, in new OpenSSH (>6.7) format, and old MD5 */\nconsole.log('fingerprint => %s', key.fingerprint().toString());\nconsole.log('old-style fingerprint => %s', key.fingerprint('md5').toString());\n```\n\nExample output:\n\n```\ntype => rsa\nsize => 2048 bits\ncomment => foo@foo.com\nfingerprint => SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w\nold-style fingerprint => a0:c8:ad:6c:32:9a:32:fa:59:cc:a9:8c:0a:0d:6e:bd\n```\n\nMore examples: converting between formats:\n\n```js\n/* Read in a PEM public key */\nvar keyPem = fs.readFileSync('id_rsa.pem');\nvar key = sshpk.parseKey(keyPem, 'pem');\n\n/* Convert to PEM PKCS#8 public key format */\nvar pemBuf = key.toBuffer('pkcs8');\n\n/* Convert to SSH public key format (and return as a string) */\nvar sshKey = key.toString('ssh');\n```\n\nSigning and verifying:\n\n```js\n/* Read in an OpenSSH/PEM *private* key */\nvar keyPriv = fs.readFileSync('id_ecdsa');\nvar key = sshpk.parsePrivateKey(keyPriv, 'pem');\n\nvar data = 'some data';\n\n/* Sign some data with the key */\nvar s = key.createSign('sha1');\ns.update(data);\nvar signature = s.sign();\n\n/* Now load the public key (could also use just key.toPublic()) */\nvar keyPub = fs.readFileSync('id_ecdsa.pub');\nkey = sshpk.parseKey(keyPub, 'ssh');\n\n/* Make a crypto.Verifier with this key */\nvar v = key.createVerify('sha1');\nv.update(data);\nvar valid = v.verify(signature);\n/* => true! */\n```\n\nMatching fingerprints with keys:\n\n```js\nvar fp = sshpk.parseFingerprint('SHA256:PYC9kPVC6J873CSIbfp0LwYeczP/W4ffObNCuDJ1u5w');\n\nvar keys = [sshpk.parseKey(...), sshpk.parseKey(...), ...];\n\nkeys.forEach(function (key) {\n\tif (fp.matches(key))\n\t\tconsole.log('found it!');\n});\n```\n\nUsage\n-----\n\n## Public keys\n\n### `parseKey(data[, format = 'auto'[, name]])`\n\nParses a key from a given data format and returns a new `Key` object.\n\nParameters\n\n- `data` -- Either a Buffer or String, containing the key\n- `format` -- String name of format to use, valid options are:\n - `auto`: choose automatically from all below\n - `pem`: supports both PKCS#1 and PKCS#8\n - `ssh`: standard OpenSSH format,\n - `pkcs1`, `pkcs8`: variants of `pem`\n - `rfc4253`: raw OpenSSH wire format\n - `openssh`: new post-OpenSSH 6.5 internal format, produced by \n `ssh-keygen -o`\n- `name` -- Optional name for the key being parsed (eg. the filename that\n was opened). Used to generate Error messages\n\n### `Key.isKey(obj)`\n\nReturns `true` if the given object is a valid `Key` object created by a version\nof `sshpk` compatible with this one.\n\nParameters\n\n- `obj` -- Object to identify\n\n### `Key#type`\n\nString, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`.\n\n### `Key#size`\n\nInteger, \"size\" of the key in bits. For RSA/DSA this is the size of the modulus;\nfor ECDSA this is the bit size of the curve in use.\n\n### `Key#comment`\n\nOptional string, a key comment used by some formats (eg the `ssh` format).\n\n### `Key#curve`\n\nOnly present if `this.type === 'ecdsa'`, string containing the name of the\nnamed curve used with this key. Possible values include `nistp256`, `nistp384`\nand `nistp521`.\n\n### `Key#toBuffer([format = 'ssh'])`\n\nConvert the key into a given data format and return the serialized key as\na Buffer.\n\nParameters\n\n- `format` -- String name of format to use, for valid options see `parseKey()`\n\n### `Key#toString([format = 'ssh])`\n\nSame as `this.toBuffer(format).toString()`.\n\n### `Key#fingerprint([algorithm = 'sha256'])`\n\nCreates a new `Fingerprint` object representing this Key's fingerprint.\n\nParameters\n\n- `algorithm` -- String name of hash algorithm to use, valid options are `md5`,\n `sha1`, `sha256`, `sha384`, `sha512`\n\n### `Key#createVerify([hashAlgorithm])`\n\nCreates a `crypto.Verifier` specialized to use this Key (and the correct public\nkey algorithm to match it). The returned Verifier has the same API as a regular\none, except that the `verify()` function takes only the target signature as an\nargument.\n\nParameters\n\n- `hashAlgorithm` -- optional String name of hash algorithm to use, any\n supported by OpenSSL are valid, usually including\n `sha1`, `sha256`.\n\n`v.verify(signature[, format])` Parameters\n\n- `signature` -- either a Signature object, or a Buffer or String\n- `format` -- optional String, name of format to interpret given String with.\n Not valid if `signature` is a Signature or Buffer.\n\n### `Key#createDiffieHellman()`\n### `Key#createDH()`\n\nCreates a Diffie-Hellman key exchange object initialized with this key and all\nnecessary parameters. This has the same API as a `crypto.DiffieHellman`\ninstance, except that functions take `Key` and `PrivateKey` objects as\narguments, and return them where indicated for.\n\nThis is only valid for keys belonging to a cryptosystem that supports DHE\nor a close analogue (i.e. `dsa`, `ecdsa` and `curve25519` keys). An attempt\nto call this function on other keys will yield an `Error`.\n\n## Private keys\n\n### `parsePrivateKey(data[, format = 'auto'[, name]])`\n\nParses a private key from a given data format and returns a new\n`PrivateKey` object.\n\nParameters\n\n- `data` -- Either a Buffer or String, containing the key\n- `format` -- String name of format to use, valid options are:\n - `auto`: choose automatically from all below\n - `pem`: supports both PKCS#1 and PKCS#8\n - `ssh`, `openssh`: new post-OpenSSH 6.5 internal format, produced by \n `ssh-keygen -o`\n - `pkcs1`, `pkcs8`: variants of `pem`\n - `rfc4253`: raw OpenSSH wire format\n- `name` -- Optional name for the key being parsed (eg. the filename that\n was opened). Used to generate Error messages\n\n### `PrivateKey.isPrivateKey(obj)`\n\nReturns `true` if the given object is a valid `PrivateKey` object created by a\nversion of `sshpk` compatible with this one.\n\nParameters\n\n- `obj` -- Object to identify\n\n### `PrivateKey#type`\n\nString, the type of key. Valid options are `rsa`, `dsa`, `ecdsa`.\n\n### `PrivateKey#size`\n\nInteger, \"size\" of the key in bits. For RSA/DSA this is the size of the modulus;\nfor ECDSA this is the bit size of the curve in use.\n\n### `PrivateKey#curve`\n\nOnly present if `this.type === 'ecdsa'`, string containing the name of the\nnamed curve used with this key. Possible values include `nistp256`, `nistp384`\nand `nistp521`.\n\n### `PrivateKey#toBuffer([format = 'pkcs1'])`\n\nConvert the key into a given data format and return the serialized key as\na Buffer.\n\nParameters\n\n- `format` -- String name of format to use, valid options are listed under \n `parsePrivateKey`. Note that ED25519 keys default to `openssh`\n format instead (as they have no `pkcs1` representation).\n\n### `PrivateKey#toString([format = 'pkcs1'])`\n\nSame as `this.toBuffer(format).toString()`.\n\n### `PrivateKey#toPublic()`\n\nExtract just the public part of this private key, and return it as a `Key`\nobject.\n\n### `PrivateKey#fingerprint([algorithm = 'sha256'])`\n\nSame as `this.toPublic().fingerprint()`.\n\n### `PrivateKey#createVerify([hashAlgorithm])`\n\nSame as `this.toPublic().createVerify()`.\n\n### `PrivateKey#createSign([hashAlgorithm])`\n\nCreates a `crypto.Sign` specialized to use this PrivateKey (and the correct\nkey algorithm to match it). The returned Signer has the same API as a regular\none, except that the `sign()` function takes no arguments, and returns a\n`Signature` object.\n\nParameters\n\n- `hashAlgorithm` -- optional String name of hash algorithm to use, any\n supported by OpenSSL are valid, usually including\n `sha1`, `sha256`.\n\n`v.sign()` Parameters\n\n- none\n\n### `PrivateKey#derive(newType)`\n\nDerives a related key of type `newType` from this key. Currently this is\nonly supported to change between `ed25519` and `curve25519` keys which are\nstored with the same private key (but usually distinct public keys in order\nto avoid degenerate keys that lead to a weak Diffie-Hellman exchange).\n\nParameters\n\n- `newType` -- String, type of key to derive, either `ed25519` or `curve25519`\n\n## Fingerprints\n\n### `parseFingerprint(fingerprint[, algorithms])`\n\nPre-parses a fingerprint, creating a `Fingerprint` object that can be used to\nquickly locate a key by using the `Fingerprint#matches` function.\n\nParameters\n\n- `fingerprint` -- String, the fingerprint value, in any supported format\n- `algorithms` -- Optional list of strings, names of hash algorithms to limit\n support to. If `fingerprint` uses a hash algorithm not on\n this list, throws `InvalidAlgorithmError`.\n\n### `Fingerprint.isFingerprint(obj)`\n\nReturns `true` if the given object is a valid `Fingerprint` object created by a\nversion of `sshpk` compatible with this one.\n\nParameters\n\n- `obj` -- Object to identify\n\n### `Fingerprint#toString([format])`\n\nReturns a fingerprint as a string, in the given format.\n\nParameters\n\n- `format` -- Optional String, format to use, valid options are `hex` and\n `base64`. If this `Fingerprint` uses the `md5` algorithm, the\n default format is `hex`. Otherwise, the default is `base64`.\n\n### `Fingerprint#matches(key)`\n\nVerifies whether or not this `Fingerprint` matches a given `Key`. This function\nuses double-hashing to avoid leaking timing information. Returns a boolean.\n\nParameters\n\n- `key` -- a `Key` object, the key to match this fingerprint against\n\n## Signatures\n\n### `parseSignature(signature, algorithm, format)`\n\nParses a signature in a given format, creating a `Signature` object. Useful\nfor converting between the SSH and ASN.1 (PKCS/OpenSSL) signature formats, and\nalso returned as output from `PrivateKey#createSign().sign()`.\n\nA Signature object can also be passed to a verifier produced by\n`Key#createVerify()` and it will automatically be converted internally into the\ncorrect format for verification.\n\nParameters\n\n- `signature` -- a Buffer (binary) or String (base64), data of the actual\n signature in the given format\n- `algorithm` -- a String, name of the algorithm to be used, possible values\n are `rsa`, `dsa`, `ecdsa`\n- `format` -- a String, either `asn1` or `ssh`\n\n### `Signature.isSignature(obj)`\n\nReturns `true` if the given object is a valid `Signature` object created by a\nversion of `sshpk` compatible with this one.\n\nParameters\n\n- `obj` -- Object to identify\n\n### `Signature#toBuffer([format = 'asn1'])`\n\nConverts a Signature to the given format and returns it as a Buffer.\n\nParameters\n\n- `format` -- a String, either `asn1` or `ssh`\n\n### `Signature#toString([format = 'asn1'])`\n\nSame as `this.toBuffer(format).toString('base64')`.\n\nErrors\n------\n\n### `InvalidAlgorithmError`\n\nThe specified algorithm is not valid, either because it is not supported, or\nbecause it was not included on a list of allowed algorithms.\n\nThrown by `Fingerprint.parse`, `Key#fingerprint`.\n\nProperties\n\n- `algorithm` -- the algorithm that could not be validated\n\n### `FingerprintFormatError`\n\nThe fingerprint string given could not be parsed as a supported fingerprint\nformat, or the specified fingerprint format is invalid.\n\nThrown by `Fingerprint.parse`, `Fingerprint#toString`.\n\nProperties\n\n- `fingerprint` -- if caused by a fingerprint, the string value given\n- `format` -- if caused by an invalid format specification, the string value given\n\n### `KeyParseError`\n\nThe key data given could not be parsed as a valid key.\n\nProperties\n\n- `keyName` -- `name` that was given to `Key#parse`\n- `format` -- the `format` that was trying to parse the key\n- `innerErr` -- the inner Error thrown by the format parser\n\nFriends of sshpk\n----------------\n\n * [`sshpk-agent`](https://github.com/arekinath/node-sshpk-agent) is a library\n for speaking the `ssh-agent` protocol from node.js, which uses `sshpk`\n",
|
98
|
-
"readmeFilename": "README.md",
|
126
|
+
"readme": "ERROR: No README data found!",
|
99
127
|
"repository": {
|
100
128
|
"type": "git",
|
101
129
|
"url": "git+https://github.com/arekinath/node-sshpk.git"
|
@@ -103,5 +131,5 @@
|
|
103
131
|
"scripts": {
|
104
132
|
"test": "tape test/*.js"
|
105
133
|
},
|
106
|
-
"version": "1.
|
134
|
+
"version": "1.10.1"
|
107
135
|
}
|