fsevents 1.0.12 → 1.0.14
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fsevents might be problematic. Click here for more details.
- package/.npmignore +1 -3
- package/.travis.yml +6 -5
- 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/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/node_modules/abbrev/package.json +82 -0
- package/node_modules/{lodash.repeat/LICENSE → ansi-regex/license} +5 -7
- package/node_modules/ansi-regex/package.json +20 -2
- package/node_modules/{lodash.padstart/LICENSE → ansi-styles/license} +5 -7
- package/node_modules/ansi-styles/package.json +21 -4
- 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 +88 -0
- package/node_modules/are-we-there-yet/package.json +21 -4
- package/node_modules/asn1/package.json +19 -1
- package/node_modules/assert-plus/package.json +21 -4
- package/node_modules/async/CHANGELOG.md +125 -0
- package/node_modules/async/LICENSE +19 -0
- package/node_modules/async/package.json +20 -2
- package/node_modules/aws-sign2/package.json +20 -2
- package/node_modules/aws4/aws4.js +1 -1
- package/node_modules/aws4/lru.js +96 -0
- package/node_modules/aws4/package.json +31 -16
- package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion → balanced-match}/.npmignore +2 -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/{rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match → balanced-match}/package.json +35 -13
- package/node_modules/bl/README.md +3 -3
- package/node_modules/bl/bl.js +54 -38
- package/node_modules/bl/node_modules/readable-stream/.npmignore +5 -0
- package/node_modules/bl/node_modules/readable-stream/.travis.yml +52 -0
- package/node_modules/bl/node_modules/readable-stream/LICENSE +18 -0
- package/node_modules/bl/node_modules/readable-stream/README.md +36 -0
- package/node_modules/bl/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
- package/node_modules/bl/node_modules/readable-stream/duplex.js +1 -0
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_duplex.js +75 -0
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_passthrough.js +26 -0
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_readable.js +880 -0
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_transform.js +180 -0
- package/node_modules/bl/node_modules/readable-stream/lib/_stream_writable.js +516 -0
- package/node_modules/bl/node_modules/readable-stream/package.json +105 -0
- package/node_modules/bl/node_modules/readable-stream/passthrough.js +1 -0
- package/node_modules/bl/node_modules/readable-stream/readable.js +12 -0
- package/node_modules/bl/node_modules/readable-stream/transform.js +1 -0
- package/node_modules/bl/node_modules/readable-stream/writable.js +1 -0
- package/node_modules/bl/package.json +39 -15
- package/node_modules/bl/test/test.js +71 -2
- package/node_modules/block-stream/package.json +37 -12
- package/node_modules/boom/package.json +20 -2
- package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion → brace-expansion}/package.json +34 -16
- 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 +77 -0
- package/node_modules/buffer-shims/readme.md +21 -0
- package/node_modules/caseless/package.json +20 -2
- package/node_modules/{lodash.pad/LICENSE → chalk/license} +5 -7
- package/node_modules/chalk/package.json +21 -4
- package/node_modules/code-point-at/index.js +33 -0
- package/node_modules/{lodash.padend/LICENSE → code-point-at/license} +5 -7
- package/node_modules/code-point-at/package.json +96 -0
- package/node_modules/code-point-at/readme.md +34 -0
- package/node_modules/combined-stream/package.json +20 -2
- package/node_modules/commander/History.md +261 -0
- package/node_modules/commander/LICENSE +22 -0
- package/node_modules/commander/package.json +20 -2
- package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/package.json +21 -3
- 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 +88 -0
- package/node_modules/core-util-is/package.json +21 -2
- package/node_modules/cryptiles/package.json +20 -2
- package/node_modules/dashdash/lib/dashdash.js +34 -1
- package/node_modules/dashdash/node_modules/assert-plus/package.json +21 -4
- package/node_modules/dashdash/package.json +29 -12
- package/node_modules/debug/package.json +20 -2
- 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 +21 -4
- package/node_modules/delayed-stream/package.json +20 -2
- package/node_modules/delegates/package.json +21 -4
- package/node_modules/ecc-jsbn/package.json +20 -2
- package/node_modules/escape-string-regexp/license +21 -0
- package/node_modules/escape-string-regexp/package.json +21 -4
- package/node_modules/extend/package.json +20 -2
- package/node_modules/extsprintf/package.json +20 -3
- package/node_modules/forever-agent/package.json +20 -2
- package/node_modules/form-data/package.json +21 -4
- 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 +86 -0
- package/node_modules/fstream/.travis.yml +4 -4
- package/node_modules/fstream/lib/collect.js +2 -0
- package/node_modules/fstream/package.json +37 -15
- package/node_modules/fstream-ignore/package.json +45 -17
- package/node_modules/gauge/CHANGELOG.md +131 -0
- package/node_modules/gauge/CHANGELOG.md~ +123 -0
- package/node_modules/gauge/README.md +317 -88
- package/node_modules/gauge/README.md~ +393 -0
- 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 +226 -0
- package/node_modules/gauge/package.json +67 -21
- 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 +20 -2
- package/node_modules/generate-object-property/package.json +20 -2
- 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 +107 -0
- package/node_modules/getpass/package.json +82 -0
- package/node_modules/glob/changelog.md +67 -0
- package/node_modules/{rimraf/node_modules/glob → glob}/glob.js +2 -1
- package/node_modules/glob/package.json +103 -0
- package/node_modules/{rimraf/node_modules/glob → glob}/sync.js +2 -1
- package/node_modules/graceful-fs/LICENSE +15 -0
- package/node_modules/graceful-fs/README.md +82 -2
- package/node_modules/graceful-fs/package.json +30 -12
- package/node_modules/graceful-readlink/package.json +20 -2
- package/node_modules/har-validator/LICENSE +13 -0
- package/node_modules/har-validator/package.json +20 -2
- package/node_modules/has-ansi/license +21 -0
- package/node_modules/has-ansi/package.json +20 -2
- package/node_modules/has-color/index.js +32 -0
- package/node_modules/has-color/package.json +97 -0
- package/node_modules/has-color/readme.md +30 -0
- package/node_modules/has-unicode/index.js +3 -8
- package/node_modules/has-unicode/package.json +36 -12
- package/node_modules/hawk/package.json +20 -2
- package/node_modules/hoek/package.json +20 -2
- package/node_modules/http-signature/package.json +20 -2
- package/node_modules/inflight/package.json +97 -0
- package/node_modules/inherits/package.json +16 -9
- package/node_modules/ini/package.json +21 -4
- 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 +100 -0
- package/node_modules/is-fullwidth-code-point/readme.md +39 -0
- package/node_modules/is-my-json-valid/package.json +21 -4
- package/node_modules/is-property/package.json +20 -2
- package/node_modules/is-typedarray/package.json +20 -2
- package/node_modules/isarray/package.json +21 -2
- package/node_modules/isstream/package.json +20 -2
- package/node_modules/jodid25519/package.json +19 -1
- package/node_modules/jsbn/package.json +19 -1
- package/node_modules/json-schema/package.json +20 -2
- package/node_modules/json-stringify-safe/package.json +20 -2
- package/node_modules/jsonpointer/package.json +19 -1
- package/node_modules/jsprim/CHANGES.md +5 -0
- package/node_modules/jsprim/README.md +13 -4
- package/node_modules/jsprim/lib/jsprim.js +12 -2
- package/node_modules/jsprim/package.json +33 -11
- package/node_modules/mime-db/HISTORY.md +21 -0
- package/node_modules/mime-db/db.json +53 -1
- package/node_modules/mime-db/package.json +36 -19
- package/node_modules/mime-types/HISTORY.md +6 -0
- package/node_modules/mime-types/package.json +33 -16
- package/node_modules/{fstream-ignore/node_modules/minimatch → minimatch}/README.md +2 -9
- package/node_modules/{fstream-ignore/node_modules/minimatch → minimatch}/minimatch.js +15 -3
- package/node_modules/{rimraf/node_modules/glob/node_modules/minimatch → minimatch}/package.json +37 -14
- package/node_modules/mkdirp/package.json +10 -8
- package/node_modules/ms/History.md +66 -0
- package/node_modules/ms/package.json +19 -1
- package/node_modules/node-pre-gyp/CHANGELOG.md +21 -0
- package/node_modules/node-pre-gyp/appveyor.yml +2 -2
- package/node_modules/node-pre-gyp/lib/install.js +12 -2
- package/node_modules/node-pre-gyp/lib/testbinary.js +9 -9
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +84 -0
- package/node_modules/node-pre-gyp/package.json +21 -31
- package/node_modules/node-uuid/package.json +20 -2
- package/node_modules/{node-pre-gyp/node_modules/nopt → nopt}/package.json +21 -3
- package/node_modules/npmlog/CHANGELOG.md +36 -0
- package/node_modules/npmlog/CHANGELOG.md~ +31 -0
- package/node_modules/npmlog/README.md +16 -1
- package/node_modules/npmlog/log.js +97 -50
- package/node_modules/npmlog/package.json +43 -17
- 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 +94 -0
- package/node_modules/number-is-nan/readme.md +30 -0
- package/node_modules/oauth-sign/package.json +36 -12
- package/node_modules/object-assign/index.js +83 -0
- package/node_modules/object-assign/license +21 -0
- package/node_modules/object-assign/package.json +106 -0
- package/node_modules/object-assign/readme.md +56 -0
- package/node_modules/once/package.json +22 -2
- package/node_modules/path-is-absolute/license +21 -0
- package/node_modules/{rimraf/node_modules/glob/node_modules/path-is-absolute → path-is-absolute}/package.json +22 -4
- package/node_modules/pinkie/license +21 -0
- package/node_modules/pinkie/package.json +21 -4
- package/node_modules/pinkie-promise/index.js +1 -1
- package/node_modules/pinkie-promise/license +21 -0
- package/node_modules/pinkie-promise/package.json +32 -10
- package/node_modules/process-nextick-args/index.js +31 -8
- package/node_modules/process-nextick-args/package.json +33 -10
- package/node_modules/qs/.eslintrc +5 -3
- package/node_modules/qs/.jscs.json +176 -0
- package/node_modules/qs/CHANGELOG.md +10 -0
- package/node_modules/qs/dist/qs.js +75 -63
- package/node_modules/qs/lib/parse.js +32 -29
- package/node_modules/qs/lib/stringify.js +37 -30
- package/node_modules/qs/lib/utils.js +6 -4
- package/node_modules/qs/package.json +41 -18
- package/node_modules/qs/test/parse.js +30 -0
- package/node_modules/qs/test/stringify.js +70 -0
- package/node_modules/rc/node_modules/minimist/package.json +20 -2
- package/node_modules/rc/package.json +21 -4
- package/node_modules/readable-stream/.npmignore +4 -1
- package/node_modules/readable-stream/.travis.yml +2 -0
- package/node_modules/readable-stream/README.md +2 -2
- package/node_modules/readable-stream/doc/stream.md +1772 -0
- package/node_modules/readable-stream/lib/_stream_readable.js +33 -20
- package/node_modules/readable-stream/lib/_stream_transform.js +3 -3
- package/node_modules/readable-stream/lib/_stream_writable.js +25 -15
- package/node_modules/readable-stream/package.json +44 -15
- package/node_modules/readable-stream/readable.js +4 -0
- package/node_modules/request/.eslintrc +1 -1
- package/node_modules/request/.travis.yml +9 -3
- package/node_modules/request/CHANGELOG.md +46 -8
- package/node_modules/request/CONTRIBUTING.md +41 -4
- package/node_modules/request/README.md +9 -6
- package/node_modules/request/codecov.yml +2 -0
- package/node_modules/request/index.js +6 -5
- package/node_modules/request/lib/helpers.js +3 -3
- package/node_modules/request/package.json +52 -30
- package/node_modules/request/request.js +58 -43
- package/node_modules/rimraf/package.json +33 -16
- package/node_modules/rimraf/rimraf.js +10 -2
- package/node_modules/semver/README.md +27 -8
- package/node_modules/semver/package.json +38 -12
- package/node_modules/semver/range.bnf +1 -1
- package/node_modules/semver/semver.js +7 -1
- 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 +98 -0
- package/node_modules/signal-exit/CHANGELOG.md +17 -0
- package/node_modules/signal-exit/LICENSE.txt +14 -0
- package/node_modules/signal-exit/README.md +40 -0
- package/node_modules/signal-exit/index.js +148 -0
- package/node_modules/signal-exit/package.json +98 -0
- package/node_modules/signal-exit/signals.js +52 -0
- package/node_modules/sntp/package.json +20 -2
- package/node_modules/sshpk/.travis.yml +3 -3
- package/node_modules/sshpk/README.md +26 -7
- package/node_modules/sshpk/bin/sshpk-conv +14 -2
- package/node_modules/sshpk/bin/sshpk-sign +16 -1
- package/node_modules/sshpk/lib/errors.js +14 -1
- package/node_modules/sshpk/lib/formats/auto.js +8 -8
- package/node_modules/sshpk/lib/formats/pem.js +39 -5
- package/node_modules/sshpk/lib/formats/pkcs1.js +4 -4
- package/node_modules/sshpk/lib/formats/pkcs8.js +4 -4
- package/node_modules/sshpk/lib/formats/rfc4253.js +2 -2
- package/node_modules/sshpk/lib/formats/ssh-private.js +3 -3
- package/node_modules/sshpk/lib/formats/ssh.js +2 -2
- package/node_modules/sshpk/lib/index.js +2 -1
- package/node_modules/sshpk/lib/key.js +20 -17
- package/node_modules/sshpk/lib/private-key.js +19 -12
- package/node_modules/sshpk/lib/utils.js +40 -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 +107 -0
- package/node_modules/sshpk/package.json +48 -30
- package/node_modules/string-width/index.js +32 -0
- package/node_modules/string-width/license +21 -0
- package/node_modules/string-width/package.json +111 -0
- package/node_modules/string-width/readme.md +41 -0
- package/node_modules/string_decoder/package.json +21 -2
- package/node_modules/stringstream/package.json +20 -2
- package/node_modules/strip-ansi/license +21 -0
- package/node_modules/strip-ansi/package.json +24 -5
- package/node_modules/strip-json-comments/license +21 -0
- package/node_modules/strip-json-comments/package.json +20 -2
- package/node_modules/supports-color/license +21 -0
- package/node_modules/supports-color/package.json +20 -2
- package/node_modules/tar/package.json +20 -2
- package/node_modules/tar-pack/package.json +34 -17
- package/node_modules/tough-cookie/LICENSE +27 -0
- package/node_modules/tough-cookie/package.json +21 -4
- package/node_modules/tunnel-agent/package.json +35 -10
- package/node_modules/tweetnacl/CHANGELOG.md +0 -53
- package/node_modules/tweetnacl/README.md +42 -24
- package/node_modules/tweetnacl/nacl-fast.js +52 -22
- package/node_modules/tweetnacl/nacl-fast.min.js +2 -2
- package/node_modules/tweetnacl/nacl.js +51 -21
- package/node_modules/tweetnacl/nacl.min.js +1 -1
- package/node_modules/tweetnacl/package.json +56 -30
- package/node_modules/uid-number/package.json +21 -4
- package/node_modules/util-deprecate/package.json +21 -2
- package/node_modules/verror/package.json +20 -3
- 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 +85 -0
- package/node_modules/wide-align/test/align.js +37 -0
- package/node_modules/wrappy/package.json +44 -14
- package/node_modules/xtend/package.json +20 -2
- package/package.json +2 -2
- 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/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/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/fstream-ignore/.npmignore +0 -1
- package/node_modules/fstream-ignore/example/basic.js +0 -13
- package/node_modules/fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/.npmignore +0 -3
- 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/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/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/README.md +0 -570
- 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/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/README.md +0 -335
- package/node_modules/qs/bower.json +0 -22
- package/node_modules/qs/component.json +0 -15
- package/node_modules/rimraf/node_modules/glob/node_modules/inflight/.eslintrc +0 -17
- 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/minimatch.js +0 -912
- 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/index.js +0 -191
- 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/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/once/README.md +0 -51
- 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/once/once.js +0 -21
- package/node_modules/rimraf/node_modules/glob/node_modules/once/package.json +0 -71
- 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
- /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/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match → balanced-match}/LICENSE.md +0 -0
- /package/node_modules/{readable-stream → bl/node_modules/readable-stream}/.zuul.yml +0 -0
- /package/node_modules/{readable-stream → bl/node_modules/readable-stream}/doc/stream.markdown +0 -0
- /package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion → brace-expansion}/README.md +0 -0
- /package/node_modules/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion → brace-expansion}/index.js +0 -0
- /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/{fstream-ignore/node_modules/minimatch/node_modules/brace-expansion/node_modules/concat-map → concat-map}/test/map.js +0 -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 +0 -0
- /package/node_modules/{rimraf/node_modules/glob → glob}/common.js +0 -0
- /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/{rimraf/node_modules/glob/node_modules/inflight → inflight}/inflight.js +0 -0
- /package/node_modules/{node-pre-gyp/node_modules/nopt → ini}/LICENSE +0 -0
- /package/node_modules/{node-pre-gyp/node_modules/nopt/node_modules/abbrev → minimatch}/LICENSE +0 -0
- /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}/test/basic.js +0 -0
- /package/node_modules/{rimraf/node_modules/glob/node_modules/once/node_modules/wrappy → once}/LICENSE +0 -0
- /package/node_modules/{rimraf/node_modules/glob/node_modules/path-is-absolute → path-is-absolute}/index.js +0 -0
- /package/node_modules/{rimraf/node_modules/glob/node_modules/path-is-absolute → path-is-absolute}/readme.md +0 -0
@@ -15,138 +15,330 @@ gauge.pulse("this")
|
|
15
15
|
gauge.hide()
|
16
16
|
```
|
17
17
|
|
18
|
-
![](
|
18
|
+
![](gauge-demo.gif)
|
19
19
|
|
20
20
|
|
21
|
-
###
|
21
|
+
### CHANGES FROM 1.x
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
module to include various commands for controlling the cursor in a terminal.
|
23
|
+
Gauge 2.x is breaking release, please see the [changelog] for details on
|
24
|
+
what's changed if you were previously a user of this module.
|
26
25
|
|
27
|
-
[
|
28
|
-
|
26
|
+
[changelog]: CHANGELOG.md
|
27
|
+
|
28
|
+
### THE GAUGE CLASS
|
29
|
+
|
30
|
+
This is the typical interface to the module– it provides a pretty
|
31
|
+
fire-and-forget interface to displaying your status information.
|
32
|
+
|
33
|
+
```
|
34
|
+
var Gauge = require("gauge")
|
35
|
+
|
36
|
+
var gauge = new Gauge([stream], [options])
|
37
|
+
```
|
38
|
+
|
39
|
+
* **stream** – *(optional, default STDERR)* A stream that progress bar
|
40
|
+
updates are to be written to. Gauge honors backpressure and will pause
|
41
|
+
most writing if it is indicated.
|
42
|
+
* **options** – *(optional)* An option object.
|
29
43
|
|
30
44
|
Constructs a new gauge. Gauges are drawn on a single line, and are not drawn
|
31
|
-
if
|
45
|
+
if **stream** isn't a tty and a tty isn't explicitly provided.
|
46
|
+
|
47
|
+
If **stream** is a terminal or if you pass in **tty** to **options** then we
|
48
|
+
will detect terminal resizes and redraw to fit. We do this by watching for
|
49
|
+
`resize` events on the tty. (To work around a bug in verisons of Node prior
|
50
|
+
to 2.5.0, we watch for them on stdout if the tty is stderr.) Resizes to
|
51
|
+
larger window sizes will be clean, but shrinking the window will always
|
52
|
+
result in some cruft.
|
32
53
|
|
33
|
-
If you
|
34
|
-
|
35
|
-
|
36
|
-
|
54
|
+
**IMPORTANT:** If you prevously were passing in a non-tty stream but you still
|
55
|
+
want output (for example, a stream wrapped by the `ansi` module) then you
|
56
|
+
need to pass in the **tty** option below, as `gauge` needs access to
|
57
|
+
the underlying tty in order to do things like terminal resizes and terminal
|
58
|
+
width detection.
|
37
59
|
|
38
60
|
The **options** object can have the following properties, all of which are
|
39
61
|
optional:
|
40
62
|
|
41
|
-
*
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
63
|
+
* **updateInterval**: How often gauge updates should be drawn, in miliseconds.
|
64
|
+
* **fixedFramerate**: Defaults to false on node 0.8, true on everything
|
65
|
+
else. When this is true a timer is created to trigger once every
|
66
|
+
`updateInterval` ms, when false, updates are printed as soon as they come
|
67
|
+
in but updates more often than `updateInterval` are ignored. The reason
|
68
|
+
0.8 doesn't have this set to true is that it can't `unref` its timer and
|
69
|
+
so it would stop your program from exiting– if you want to use this
|
70
|
+
feature with 0.8 just make sure you call `gauge.disable()` before you
|
71
|
+
expect your program to exit.
|
72
|
+
* **themes**: A themeset to use when selecting the theme to use. Defaults
|
73
|
+
to `gauge/themes`, see the [themes] documentation for details.
|
74
|
+
* **theme**: Select a theme for use, it can be a:
|
75
|
+
* Theme object, in which case the **themes** is not used.
|
76
|
+
* The name of a theme, which will be looked up in the current *themes*
|
77
|
+
object.
|
78
|
+
* A configuration object with any of `hasUnicode`, `hasColor` or
|
79
|
+
`platform` keys, which if wlll be used to override our guesses when making
|
80
|
+
a default theme selection.
|
81
|
+
|
82
|
+
If no theme is selected then a default is picked using a combination of our
|
83
|
+
best guesses at your OS, color support and unicode support.
|
84
|
+
* **template**: Describes what you want your gauge to look like. The
|
85
|
+
default is what npm uses. Detailed [documentation] is later in this
|
86
|
+
document.
|
87
|
+
* **hideCursor**: Defaults to true. If true, then the cursor will be hidden
|
88
|
+
while the gauge is displayed.
|
89
|
+
* **tty**: The tty that you're ultimately writing to. Defaults to the same
|
90
|
+
as **stream**. This is used for detecting the width of the terminal and
|
91
|
+
resizes. The width used is `tty.columns - 1`. If no tty is available then
|
92
|
+
a width of `79` is assumed.
|
93
|
+
* **enabled**: Defaults to true if `tty` is a TTY, false otherwise. If true
|
94
|
+
the gauge starts enabled. If disabled then all update commands are
|
95
|
+
ignored and no gauge will be printed until you call `.enable()`.
|
96
|
+
* **Plumbing**: The class to use to actually generate the gauge for
|
97
|
+
printing. This defaults to `require('gauge/plumbing')` and ordinarly you
|
98
|
+
shouldn't need to override this.
|
99
|
+
* **cleanupOnExit**: Defaults to true. Ordinarily we register an exit
|
100
|
+
handler to make sure your cursor is turned back on and the progress bar
|
101
|
+
erased when your process exits, even if you Ctrl-C out or otherwise exit
|
102
|
+
unexpectedly. You can disable this and it won't register the exit handler.
|
50
103
|
|
51
104
|
[has-unicode]: https://www.npmjs.com/package/has-unicode
|
105
|
+
[themes]: #themes
|
106
|
+
[documentation]: #templates
|
52
107
|
|
53
|
-
|
54
|
-
with `ansi(process.stderr)`.
|
108
|
+
#### `gauge.show(section | status, [completed])`
|
55
109
|
|
56
|
-
|
110
|
+
The first argument is either the section, the name of the current thing
|
111
|
+
contributing to progress, or an object with keys like **section**,
|
112
|
+
**subsection** & **completed** (or any others you have types for in a custom
|
113
|
+
template). If you don't want to update or set any of these you can pass
|
114
|
+
`null` and it will be ignored.
|
57
115
|
|
58
|
-
|
59
|
-
|
116
|
+
The second argument is the percent completed as a value between 0 and 1.
|
117
|
+
Without it, completion is just not updated. You'll also note that completion
|
118
|
+
can be passed in as part of a status object as the first argument. If both
|
119
|
+
it and the completed argument are passed in, the completed argument wins.
|
60
120
|
|
61
|
-
|
62
|
-
and `gauge.pulse` has never been called, then similarly nothing will be printed.
|
121
|
+
#### `gauge.hide([cb])`
|
63
122
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
happened, the gauge update will happen.)
|
123
|
+
Removes the gauge from the terminal. Optionally, callback `cb` after IO has
|
124
|
+
had an opportunity to happen (currently this just means after `setImmediate`
|
125
|
+
has called back.)
|
68
126
|
|
69
|
-
|
127
|
+
It turns out this is important when you're pausing the progress bar on one
|
128
|
+
filehandle and printing to another– otherwise (with a big enough print) node
|
129
|
+
can end up printing the "end progress bar" bits to the progress bar filehandle
|
130
|
+
while other stuff is printing to another filehandle. These getting interleaved
|
131
|
+
can cause corruption in some terminals.
|
70
132
|
|
71
|
-
|
133
|
+
#### `gauge.pulse([subsection])`
|
72
134
|
|
73
|
-
|
135
|
+
* **subsection** – *(optional)* The specific thing that triggered this pulse
|
74
136
|
|
75
|
-
|
137
|
+
Spins the spinner in the gauge to show output. If **subsection** is
|
138
|
+
included then it will be combined with the last name passed to `gauge.show`.
|
76
139
|
|
77
|
-
|
78
|
-
it will be combined with the last name passed to `gauge.show` using the
|
79
|
-
subsection property of the theme (typically a right facing arrow).
|
80
|
-
|
81
|
-
### `gauge.disable()`
|
140
|
+
#### `gauge.disable()`
|
82
141
|
|
83
142
|
Hides the gauge and ignores further calls to `show` or `pulse`.
|
84
143
|
|
85
|
-
|
144
|
+
#### `gauge.enable()`
|
86
145
|
|
87
146
|
Shows the gauge and resumes updating when `show` or `pulse` is called.
|
88
147
|
|
89
|
-
|
148
|
+
#### `gauge.setThemeset(themes)`
|
149
|
+
|
150
|
+
Change the themeset to select a theme from. The same as the `themes` option
|
151
|
+
used in the constructor. The theme will be reselected from this themeset.
|
90
152
|
|
91
|
-
|
153
|
+
#### `gauge.setTheme(theme)`
|
92
154
|
|
93
|
-
|
155
|
+
Change the active theme, will be displayed with the next show or pulse. This can be:
|
156
|
+
|
157
|
+
* Theme object, in which case the **themes** is not used.
|
158
|
+
* The name of a theme, which will be looked up in the current *themes*
|
159
|
+
object.
|
160
|
+
* A configuration object with any of `hasUnicode`, `hasColor` or
|
161
|
+
`platform` keys, which if wlll be used to override our guesses when making
|
162
|
+
a default theme selection.
|
163
|
+
|
164
|
+
If no theme is selected then a default is picked using a combination of our
|
165
|
+
best guesses at your OS, color support and unicode support.
|
166
|
+
|
167
|
+
#### `gauge.setTemplate(template)`
|
94
168
|
|
95
169
|
Change the active template, will be displayed with the next show or pulse
|
96
170
|
|
97
|
-
###
|
171
|
+
### Tracking Completion
|
172
|
+
|
173
|
+
If you have more than one thing going on that you want to track completion
|
174
|
+
of, you may find the related [are-we-there-yet] helpful. It's `change`
|
175
|
+
event can be wired up to the `show` method to get a more traditional
|
176
|
+
progress bar interface.
|
177
|
+
|
178
|
+
[are-we-there-yet]: https://www.npmjs.com/package/are-we-there-yet
|
179
|
+
|
180
|
+
### THEMES
|
181
|
+
|
182
|
+
```
|
183
|
+
var themes = require('gauge/themes')
|
184
|
+
|
185
|
+
// fetch the default color unicode theme for this platform
|
186
|
+
var ourTheme = themes({hasUnicode: true, hasColor: true})
|
187
|
+
|
188
|
+
// fetch the default non-color unicode theme for osx
|
189
|
+
var ourTheme = themes({hasUnicode: true, hasColor: false, platform: 'darwin'})
|
190
|
+
|
191
|
+
// create a new theme based on the color ascii theme for this platform
|
192
|
+
// that brackets the progress bar with arrows
|
193
|
+
var ourTheme = themes.newTheme(theme(hasUnicode: false, hasColor: true}), {
|
194
|
+
preProgressbar: '→',
|
195
|
+
postProgressbar: '←'
|
196
|
+
})
|
197
|
+
```
|
198
|
+
|
199
|
+
The object returned by `gauge/themes` is an instance of the `ThemeSet` class.
|
200
|
+
|
201
|
+
```
|
202
|
+
var ThemeSet = require('gauge/theme-set')
|
203
|
+
var themes = new ThemeSet()
|
204
|
+
// or
|
205
|
+
var themes = require('gauge/themes')
|
206
|
+
var mythemes = themes.newThemeset() // creates a new themeset based on the default themes
|
207
|
+
```
|
208
|
+
|
209
|
+
#### themes(opts)
|
210
|
+
#### themes.getDefault(opts)
|
211
|
+
|
212
|
+
Theme objects are a function that fetches the default theme based on
|
213
|
+
platform, unicode and color support.
|
214
|
+
|
215
|
+
Options is an object with the following properties:
|
216
|
+
|
217
|
+
* **hasUnicode** - If true, fetch a unicode theme, if no unicode theme is
|
218
|
+
available then a non-unicode theme will be used.
|
219
|
+
* **hasColor** - If true, fetch a color theme, if no color theme is
|
220
|
+
available a non-color theme will be used.
|
221
|
+
* **platform** (optional) - Defaults to `process.platform`. If no
|
222
|
+
platform match is available then `fallback` is used instead.
|
223
|
+
|
224
|
+
If no compatible theme can be found then an error will be thrown with a
|
225
|
+
`code` of `EMISSINGTHEME`.
|
226
|
+
|
227
|
+
#### themes.addTheme(themeName, themeObj)
|
228
|
+
#### themes.addTheme(themeName, [parentTheme], newTheme)
|
229
|
+
|
230
|
+
Adds a named theme to the themeset. You can pass in either a theme object,
|
231
|
+
as returned by `themes.newTheme` or the arguments you'd pass to
|
232
|
+
`themes.newTheme`.
|
233
|
+
|
234
|
+
#### themes.getThemeNames()
|
98
235
|
|
99
|
-
|
100
|
-
|
236
|
+
Return a list of all of the names of the themes in this themeset. Suitable
|
237
|
+
for use in `themes.getTheme(…)`.
|
101
238
|
|
102
|
-
|
103
|
-
| ---------- | ------- | ----- |
|
104
|
-
| startgroup | ╢ | \| |
|
105
|
-
| endgroup | ╟ | \| |
|
106
|
-
| complete | █ | # |
|
107
|
-
| incomplete | ░ | - |
|
108
|
-
| spinner | ▀▐▄▌ | -\\\|/ |
|
109
|
-
| subsection | → | -> |
|
239
|
+
#### themes.getTheme(name)
|
110
240
|
|
111
|
-
|
241
|
+
Returns the theme object from this theme set named `name`.
|
112
242
|
|
113
|
-
|
243
|
+
If `name` does not exist in this themeset an error will be thrown with
|
244
|
+
a `code` of `EMISSINGTHEME`.
|
114
245
|
|
115
|
-
|
116
|
-
spinner. The Gauge will spin as many characters as you give here.
|
246
|
+
#### themes.setDefault([opts], themeName)
|
117
247
|
|
118
|
-
|
248
|
+
`opts` is an object with the following properties.
|
249
|
+
|
250
|
+
* **platform** - Defaults to `'fallback'`. If your theme is platform
|
251
|
+
specific, specify that here with the platform from `process.platform`, eg,
|
252
|
+
`win32`, `darwin`, etc.
|
253
|
+
* **hasUnicode** - Defaults to `false`. If your theme uses unicode you
|
254
|
+
should set this to true.
|
255
|
+
* **hasColor** - Defaults to `false`. If your theme uses color you should
|
256
|
+
set this to true.
|
257
|
+
|
258
|
+
`themeName` is the name of the theme (as given to `addTheme`) to use for
|
259
|
+
this set of `opts`.
|
260
|
+
|
261
|
+
#### themes.newTheme([parentTheme,] newTheme)
|
262
|
+
|
263
|
+
Create a new theme object based on `parentTheme`. If no `parentTheme` is
|
264
|
+
provided then a minimal parentTheme that defines functions for rendering the
|
265
|
+
activity indicator (spinner) and progress bar will be defined. (This
|
266
|
+
fallback parent is defined in `gauge/base-theme`.)
|
267
|
+
|
268
|
+
newTheme should be a bare object– we'll start by discussing the properties
|
269
|
+
defined by the default themes:
|
270
|
+
|
271
|
+
* **preProgressbar** - displayed prior to the progress bar, if the progress
|
272
|
+
bar is displayed.
|
273
|
+
* **postProgressbar** - displayed after the progress bar, if the progress bar
|
274
|
+
is displayed.
|
275
|
+
* **progressBarTheme** - The subtheme passed through to the progress bar
|
276
|
+
renderer, it's an object with `complete` and `remaining` properties
|
277
|
+
that are the strings you want repeated for those sections of the progress
|
278
|
+
bar.
|
279
|
+
* **activityIndicatorTheme** - The theme for the activity indicator (spinner),
|
280
|
+
this can either be a string, in which each character is a different step, or
|
281
|
+
an array of strings.
|
282
|
+
* **preSubsection** - Displayed as a separator between the `section` and
|
283
|
+
`subsection` when the latter is printed.
|
284
|
+
|
285
|
+
More generally, themes can have any value that would be a valid value when rendering
|
286
|
+
templates. The properties in the theme are used when their name matches a type in
|
287
|
+
the template. Their values can be:
|
288
|
+
|
289
|
+
* **strings & numbers** - They'll be included as is
|
290
|
+
* **function (values, theme, width)** - Should return what you want in your output.
|
291
|
+
*values* is an object with values provided via `gauge.show`,
|
292
|
+
*theme* is the theme specific to this item (see below) or this theme object,
|
293
|
+
and *width* is the number of characters wide your result should be.
|
294
|
+
|
295
|
+
There are a couple of special prefixes:
|
296
|
+
|
297
|
+
* **pre** - Is shown prior to the property, if its displayed.
|
298
|
+
* **post** - Is shown after the property, if its displayed.
|
299
|
+
|
300
|
+
And one special suffix:
|
301
|
+
|
302
|
+
* **Theme** - Its value is passed to a function-type item as the theme.
|
303
|
+
|
304
|
+
#### themes.addToAllThemes(theme)
|
305
|
+
|
306
|
+
This *mixes-in* `theme` into all themes currently defined. It also adds it
|
307
|
+
to the default parent theme for this themeset, so future themes added to
|
308
|
+
this themeset will get the values from `theme` by default.
|
309
|
+
|
310
|
+
#### themes.newThemeset()
|
311
|
+
|
312
|
+
Copy the current themeset into a new one. This allows you to easily inherit
|
313
|
+
one themeset from another.
|
314
|
+
|
315
|
+
### TEMPLATES
|
119
316
|
|
120
317
|
A template is an array of objects and strings that, after being evaluated,
|
121
318
|
will be turned into the gauge line. The default template is:
|
122
319
|
|
123
320
|
```javascript
|
124
321
|
[
|
125
|
-
{type:
|
126
|
-
{type:
|
127
|
-
{type:
|
128
|
-
{type:
|
129
|
-
{type: "endgroup"}
|
322
|
+
{type: 'progressbar', length: 20},
|
323
|
+
{type: 'activityIndicator', kerning: 1, length: 1},
|
324
|
+
{type: 'section', kerning: 1, default: ''},
|
325
|
+
{type: 'subsection', kerning: 1, default: ''}
|
130
326
|
]
|
131
327
|
```
|
132
328
|
|
133
329
|
The various template elements can either be **plain strings**, in which case they will
|
134
|
-
be be included verbatum in the output
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
*
|
139
|
-
* `
|
140
|
-
|
141
|
-
|
142
|
-
* `
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
* `endgroup` – The `endgroup` property from the theme.
|
147
|
-
* *separated* – If true, the element will be separated with spaces from things on
|
148
|
-
either side (and margins count as space, so it won't be indented), but only
|
149
|
-
if its included.
|
330
|
+
be be included verbatum in the output, or objects with the following properties:
|
331
|
+
|
332
|
+
* *type* can be any of the following plus any keys you pass into `gauge.show` plus
|
333
|
+
any keys you have on a custom theme.
|
334
|
+
* `section` – What big thing you're working on now.
|
335
|
+
* `subsection` – What component of that thing is currently working.
|
336
|
+
* `activityIndicator` – Shows a spinner using the `activityIndicatorTheme`
|
337
|
+
from your active theme.
|
338
|
+
* `progressbar` – A progress bar representing your current `completed`
|
339
|
+
using the `progressbarTheme` from your active theme.
|
340
|
+
* *kerning* – Number of spaces that must be between this item and other
|
341
|
+
items, if this item is displayed at all.
|
150
342
|
* *maxLength* – The maximum length for this element. If its value is longer it
|
151
343
|
will be truncated.
|
152
344
|
* *minLength* – The minimum length for this element. If its value is shorter it
|
@@ -155,12 +347,49 @@ If the template element is an object, it can have the following keys:
|
|
155
347
|
as you'd expect from word processors.
|
156
348
|
* *length* – Provides a single value for both *minLength* and *maxLength*. If both
|
157
349
|
*length* and *minLength or *maxLength* are specifed then the latter take precedence.
|
350
|
+
* *value* – A literal value to use for this template item.
|
351
|
+
* *default* – A default value to use for this template item if a value
|
352
|
+
wasn't otherwise passed in.
|
158
353
|
|
159
|
-
###
|
354
|
+
### PLUMBING
|
160
355
|
|
161
|
-
|
162
|
-
|
163
|
-
event can be wired up to the `show` method to get a more traditional
|
164
|
-
progress bar interface.
|
356
|
+
This is the super simple, assume nothing, do no magic internals used by gauge to
|
357
|
+
implement its ordinary interface.
|
165
358
|
|
166
|
-
|
359
|
+
```
|
360
|
+
var Plumbing = require('gauge/plumbing')
|
361
|
+
var gauge = new Plumbing(theme, template, width)
|
362
|
+
```
|
363
|
+
|
364
|
+
* **theme**: The theme to use.
|
365
|
+
* **template**: The template to use.
|
366
|
+
* **width**: How wide your gauge should be
|
367
|
+
|
368
|
+
#### `gauge.setTheme(theme)`
|
369
|
+
|
370
|
+
Change the active theme.
|
371
|
+
|
372
|
+
#### `gauge.setTemplate(template)`
|
373
|
+
|
374
|
+
Change the active template.
|
375
|
+
|
376
|
+
#### `gauge.setWidth(width)`
|
377
|
+
|
378
|
+
Change the width to render at.
|
379
|
+
|
380
|
+
#### `gauge.hide()`
|
381
|
+
|
382
|
+
Return the string necessary to hide the progress bar
|
383
|
+
|
384
|
+
#### `gauge.hideCursor()`
|
385
|
+
|
386
|
+
Return a string to hide the cursor.
|
387
|
+
|
388
|
+
#### `gauge.showCursor()`
|
389
|
+
|
390
|
+
Return a string to show the cursor.
|
391
|
+
|
392
|
+
#### `gauge.show(status)`
|
393
|
+
|
394
|
+
Using `status` for values, render the provided template with the theme and return
|
395
|
+
a string that is suitable for printing to update the gauge.
|