fsevents 1.0.15 → 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/lib/binding/Release/node-v48-darwin-x64/fse.node +0 -0
- package/node_modules/abbrev/package.json +16 -8
- package/node_modules/ansi-regex/package.json +31 -23
- package/node_modules/ansi-styles/package.json +27 -19
- package/node_modules/aproba/package.json +16 -8
- package/node_modules/are-we-there-yet/package.json +14 -6
- package/node_modules/asn1/package.json +16 -8
- package/node_modules/assert-plus/package.json +16 -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 +15 -7
- package/node_modules/aws4/README.md +9 -0
- package/node_modules/aws4/aws4.js +8 -3
- package/node_modules/aws4/package.json +62 -54
- package/node_modules/balanced-match/package.json +27 -19
- 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 +15 -7
- package/node_modules/boom/package.json +14 -6
- package/node_modules/brace-expansion/index.js +10 -0
- package/node_modules/brace-expansion/package.json +35 -27
- package/node_modules/buffer-shims/package.json +16 -7
- package/node_modules/caseless/package.json +18 -10
- package/node_modules/chalk/node_modules/supports-color/index.js +50 -0
- package/node_modules/{supports-color → chalk/node_modules/supports-color}/license +0 -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 +30 -22
- package/node_modules/code-point-at/index.js +3 -4
- package/node_modules/code-point-at/package.json +40 -30
- package/node_modules/code-point-at/readme.md +2 -4
- package/node_modules/combined-stream/package.json +15 -7
- package/node_modules/commander/package.json +16 -8
- package/node_modules/concat-map/package.json +30 -22
- package/node_modules/console-control-strings/package.json +15 -7
- package/node_modules/core-util-is/package.json +22 -14
- package/node_modules/cryptiles/package.json +14 -6
- 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/node_modules/assert-plus/package.json +16 -8
- package/node_modules/dashdash/package.json +33 -24
- package/node_modules/debug/package.json +20 -12
- package/node_modules/deep-extend/package.json +23 -15
- package/node_modules/delayed-stream/package.json +15 -7
- package/node_modules/delegates/package.json +14 -6
- package/node_modules/ecc-jsbn/package.json +17 -9
- package/node_modules/escape-string-regexp/package.json +20 -12
- package/node_modules/extend/package.json +16 -8
- package/node_modules/extsprintf/package.json +14 -6
- package/node_modules/forever-agent/package.json +15 -7
- 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 +68 -52
- package/node_modules/fs.realpath/package.json +19 -11
- package/node_modules/fstream/package.json +15 -7
- package/node_modules/fstream-ignore/package.json +15 -7
- package/node_modules/gauge/CHANGELOG.md +14 -0
- package/node_modules/gauge/README.md +4 -0
- package/node_modules/gauge/index.js +7 -3
- package/node_modules/gauge/package.json +37 -28
- package/node_modules/generate-function/package.json +16 -8
- package/node_modules/generate-object-property/package.json +14 -6
- package/node_modules/getpass/node_modules/assert-plus/package.json +16 -8
- package/node_modules/getpass/package.json +16 -8
- package/node_modules/glob/README.md +3 -0
- package/node_modules/glob/common.js +6 -1
- package/node_modules/glob/glob.js +23 -14
- package/node_modules/glob/package.json +29 -21
- package/node_modules/glob/sync.js +29 -11
- package/node_modules/graceful-fs/README.md +1 -1
- package/node_modules/graceful-fs/graceful-fs.js +23 -14
- package/node_modules/graceful-fs/package.json +35 -27
- package/node_modules/graceful-fs/polyfills.js +99 -21
- package/node_modules/graceful-readlink/package.json +14 -6
- package/node_modules/har-validator/package.json +16 -8
- package/node_modules/has-ansi/package.json +29 -21
- package/node_modules/has-unicode/package.json +18 -10
- package/node_modules/hawk/package.json +18 -10
- package/node_modules/hoek/package.json +14 -6
- package/node_modules/http-signature/package.json +14 -6
- package/node_modules/inflight/inflight.js +22 -12
- package/node_modules/inflight/package.json +28 -20
- package/node_modules/inherits/inherits.js +7 -1
- package/node_modules/inherits/package.json +41 -21
- package/node_modules/ini/package.json +15 -7
- package/node_modules/is-fullwidth-code-point/package.json +27 -19
- package/node_modules/is-my-json-valid/index.js +10 -0
- package/node_modules/is-my-json-valid/package.json +36 -20
- package/node_modules/is-my-json-valid/test/misc.js +24 -0
- package/node_modules/is-property/package.json +19 -11
- package/node_modules/is-typedarray/package.json +16 -8
- package/node_modules/isarray/package.json +28 -20
- package/node_modules/isstream/package.json +19 -11
- package/node_modules/jodid25519/package.json +18 -10
- package/node_modules/jsbn/package.json +15 -7
- 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 +32 -18
- package/node_modules/json-stringify-safe/package.json +18 -10
- package/node_modules/{async/LICENSE → jsonpointer/LICENSE.md} +3 -1
- package/node_modules/jsonpointer/README.md +17 -10
- package/node_modules/jsonpointer/jsonpointer.js +73 -56
- package/node_modules/jsonpointer/package.json +47 -26
- package/node_modules/jsprim/CHANGES.md +4 -0
- package/node_modules/jsprim/package.json +25 -17
- package/node_modules/mime-db/HISTORY.md +34 -0
- package/node_modules/mime-db/db.json +86 -1
- package/node_modules/mime-db/package.json +43 -31
- package/node_modules/mime-types/HISTORY.md +13 -0
- package/node_modules/mime-types/index.js +8 -8
- package/node_modules/mime-types/package.json +31 -19
- package/node_modules/minimatch/minimatch.js +19 -20
- package/node_modules/minimatch/package.json +25 -17
- package/node_modules/minimist/package.json +24 -16
- package/node_modules/mkdirp/package.json +21 -13
- package/node_modules/ms/package.json +14 -6
- package/node_modules/node-pre-gyp/CHANGELOG.md +16 -0
- package/node_modules/node-pre-gyp/README.md +574 -0
- package/node_modules/node-pre-gyp/appveyor.yml +19 -9
- package/node_modules/node-pre-gyp/lib/install.js +31 -7
- package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +2 -0
- package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +88 -0
- package/node_modules/node-pre-gyp/package.json +48 -40
- package/node_modules/nopt/package.json +19 -11
- package/node_modules/npmlog/CHANGELOG.md +9 -0
- package/node_modules/npmlog/README.md +7 -1
- package/node_modules/npmlog/log.js +12 -8
- package/node_modules/npmlog/package.json +30 -22
- package/node_modules/number-is-nan/package.json +39 -30
- package/node_modules/number-is-nan/readme.md +1 -3
- package/node_modules/oauth-sign/package.json +15 -7
- package/node_modules/object-assign/package.json +22 -14
- package/node_modules/once/README.md +28 -0
- package/node_modules/once/once.js +21 -0
- package/node_modules/once/package.json +31 -20
- package/node_modules/path-is-absolute/index.js +5 -5
- package/node_modules/path-is-absolute/package.json +45 -31
- package/node_modules/path-is-absolute/readme.md +19 -11
- package/node_modules/pinkie/package.json +18 -10
- package/node_modules/pinkie-promise/package.json +18 -10
- package/node_modules/process-nextick-args/package.json +16 -8
- 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 -15
- package/node_modules/qs/CHANGELOG.md +24 -0
- package/node_modules/qs/README.md +398 -0
- package/node_modules/qs/dist/qs.js +138 -51
- 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 +23 -24
- package/node_modules/qs/lib/stringify.js +63 -13
- package/node_modules/qs/lib/utils.js +22 -6
- package/node_modules/qs/package.json +40 -30
- package/node_modules/qs/test/.eslintrc +9 -0
- package/node_modules/qs/test/index.js +2 -0
- package/node_modules/qs/test/parse.js +81 -45
- package/node_modules/qs/test/stringify.js +260 -27
- package/node_modules/qs/test/utils.js +13 -0
- package/node_modules/rc/node_modules/minimist/package.json +24 -16
- package/node_modules/rc/package.json +21 -13
- package/node_modules/readable-stream/.npmignore +1 -0
- package/node_modules/readable-stream/.travis.yml +2 -7
- package/node_modules/readable-stream/README.md +6 -2
- package/node_modules/readable-stream/lib/_stream_readable.js +158 -110
- package/node_modules/readable-stream/lib/_stream_transform.js +7 -5
- package/node_modules/readable-stream/lib/_stream_writable.js +35 -7
- package/node_modules/readable-stream/lib/internal/streams/BufferList.js +64 -0
- package/node_modules/readable-stream/package.json +34 -26
- package/node_modules/request/CHANGELOG.md +49 -18
- package/node_modules/request/README.md +3 -2
- package/node_modules/request/index.js +2 -3
- package/node_modules/request/lib/auth.js +1 -1
- package/node_modules/request/lib/helpers.js +4 -13
- 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 +50 -31
- package/node_modules/request/request.js +84 -43
- package/node_modules/rimraf/package.json +28 -20
- package/node_modules/rimraf/rimraf.js +2 -2
- package/node_modules/semver/README.md +4 -0
- package/node_modules/semver/package.json +27 -19
- package/node_modules/semver/semver.js +14 -5
- package/node_modules/set-blocking/package.json +21 -13
- package/node_modules/signal-exit/CHANGELOG.md +10 -0
- package/node_modules/signal-exit/LICENSE.txt +2 -0
- package/node_modules/signal-exit/index.js +9 -0
- package/node_modules/signal-exit/package.json +32 -24
- package/node_modules/signal-exit/signals.js +5 -4
- package/node_modules/sntp/package.json +16 -8
- package/node_modules/sshpk/README.md +214 -3
- package/node_modules/sshpk/bin/sshpk-conv +6 -0
- package/node_modules/sshpk/lib/certificate.js +291 -0
- package/node_modules/sshpk/lib/errors.js +14 -1
- package/node_modules/sshpk/lib/fingerprint.js +28 -7
- package/node_modules/sshpk/lib/formats/openssh-cert.js +289 -0
- package/node_modules/sshpk/lib/formats/pem.js +2 -2
- package/node_modules/sshpk/lib/formats/pkcs8.js +2 -7
- package/node_modules/sshpk/lib/formats/ssh-private.js +140 -17
- 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 +13 -1
- package/node_modules/sshpk/lib/key.js +1 -0
- 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 +43 -1
- package/node_modules/sshpk/node_modules/assert-plus/package.json +16 -8
- package/node_modules/sshpk/package.json +31 -21
- package/node_modules/string-width/index.js +5 -0
- package/node_modules/string-width/package.json +49 -36
- package/node_modules/string-width/readme.md +4 -3
- package/node_modules/string_decoder/package.json +19 -11
- package/node_modules/stringstream/package.json +18 -10
- package/node_modules/strip-ansi/package.json +29 -21
- package/node_modules/strip-json-comments/package.json +27 -19
- 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 +52 -45
- package/node_modules/supports-color/readme.md +14 -6
- package/node_modules/tar/package.json +19 -11
- 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/tar-pack/node_modules/once/README.md +51 -0
- package/node_modules/tar-pack/node_modules/once/once.js +21 -0
- package/node_modules/tar-pack/node_modules/once/package.json +96 -0
- package/node_modules/tar-pack/node_modules/readable-stream/.npmignore +8 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/.travis.yml +4 -7
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/LICENSE +0 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/README.md +2 -2
- package/node_modules/tar-pack/node_modules/readable-stream/doc/stream.md +2015 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +0 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/duplex.js +0 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_duplex.js +0 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_passthrough.js +0 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_readable.js +164 -107
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_transform.js +3 -3
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/lib/_stream_writable.js +25 -15
- package/node_modules/tar-pack/node_modules/readable-stream/lib/internal/streams/BufferList.js +64 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/package.json +50 -30
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/passthrough.js +0 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/readable.js +4 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/transform.js +0 -0
- package/node_modules/{bl → tar-pack}/node_modules/readable-stream/writable.js +0 -0
- package/node_modules/tar-pack/package.json +39 -22
- package/node_modules/tar-pack/test/index.js +43 -1
- 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 +50 -35
- package/node_modules/tunnel-agent/package.json +15 -7
- package/node_modules/tweetnacl/AUTHORS.md +28 -0
- package/node_modules/tweetnacl/CHANGELOG.md +93 -0
- package/node_modules/tweetnacl/LICENSE +24 -0
- package/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md +20 -0
- package/node_modules/tweetnacl/README.md +57 -61
- package/node_modules/tweetnacl/nacl-fast.js +22 -52
- package/node_modules/tweetnacl/nacl-fast.min.js +2 -2
- package/node_modules/tweetnacl/nacl.d.ts +98 -0
- package/node_modules/tweetnacl/nacl.js +21 -51
- package/node_modules/tweetnacl/nacl.min.js +1 -1
- package/node_modules/tweetnacl/package.json +47 -46
- package/node_modules/uid-number/package.json +15 -7
- package/node_modules/util-deprecate/package.json +21 -13
- 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/uuid/LICENSE.md +21 -0
- 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 +14 -6
- package/node_modules/wide-align/package.json +19 -11
- package/node_modules/wrappy/package.json +17 -8
- package/node_modules/xtend/package.json +29 -21
- package/package.json +1 -1
- package/node_modules/async/CHANGELOG.md +0 -125
- 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 -149
- 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 -243
- package/node_modules/bl/node_modules/readable-stream/.npmignore +0 -5
- package/node_modules/bl/node_modules/readable-stream/.zuul.yml +0 -1
- package/node_modules/bl/node_modules/readable-stream/doc/stream.markdown +0 -1760
- package/node_modules/bl/package.json +0 -96
- package/node_modules/bl/test/test.js +0 -640
- 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/gauge/CHANGELOG.md~ +0 -123
- package/node_modules/gauge/README.md~ +0 -393
- package/node_modules/has-color/index.js +0 -32
- package/node_modules/has-color/package.json +0 -97
- package/node_modules/has-color/readme.md +0 -30
- 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/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 -105
- 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/CHANGELOG.md~ +0 -31
- package/node_modules/qs/.jscs.json +0 -176
- package/node_modules/readable-stream/doc/stream.md +0 -1772
- package/node_modules/request/.eslintrc +0 -45
- package/node_modules/request/.npmignore +0 -6
- package/node_modules/request/.travis.yml +0 -21
- package/node_modules/request/CONTRIBUTING.md +0 -81
- package/node_modules/request/codecov.yml +0 -2
@@ -1,64 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"env": {
|
3
|
-
"node": true,
|
4
|
-
"browser": false
|
5
|
-
},
|
6
|
-
"rules": {
|
7
|
-
// 2-space indentation
|
8
|
-
"indent": [2, 2, {"SwitchCase": 1}],
|
9
|
-
// Require strings to use single quotes
|
10
|
-
"quotes": [2, "single"],
|
11
|
-
// Allow only unix line-endings
|
12
|
-
"linebreak-style": [2, "unix"],
|
13
|
-
// Always require semicolons
|
14
|
-
"semi": [2, "always"],
|
15
|
-
// Require curly braces for multi-line control statements
|
16
|
-
"curly": [2, "multi-line"],
|
17
|
-
// Always handle callback error cases
|
18
|
-
"handle-callback-err": [2, "^err"],
|
19
|
-
// Require JSDoc for all function definitions
|
20
|
-
"valid-jsdoc": [2, {
|
21
|
-
"requireReturn": false,
|
22
|
-
"requireReturnDescription": false,
|
23
|
-
"prefer": {
|
24
|
-
"return": "returns"
|
25
|
-
}
|
26
|
-
}],
|
27
|
-
"require-jsdoc": [2, {
|
28
|
-
"require": {
|
29
|
-
"FunctionDeclaration": true
|
30
|
-
}
|
31
|
-
}],
|
32
|
-
"no-redeclare": [2, { "builtinGlobals": true }],
|
33
|
-
"no-shadow": [2, { "builtinGlobals": true, "hoist": "all" }],
|
34
|
-
// Disallow using variables before they've been defined
|
35
|
-
// functions are ok
|
36
|
-
"no-use-before-define": [2, "nofunc"],
|
37
|
-
"no-shadow-restricted-names": 2,
|
38
|
-
"no-extra-semi": 2,
|
39
|
-
// Disallow unused variables
|
40
|
-
"no-unused-vars": 2,
|
41
|
-
"no-undef": 2,
|
42
|
-
// Use if () { }
|
43
|
-
// ^ space
|
44
|
-
"keyword-spacing": 2,
|
45
|
-
// Use if () { }
|
46
|
-
// ^ space
|
47
|
-
"space-before-blocks": [2, "always"],
|
48
|
-
// eslint can't handle this, so the check is disabled.
|
49
|
-
"key-spacing": 0,
|
50
|
-
"strict": 0,
|
51
|
-
// Do not force dot-notation
|
52
|
-
"dot-notation": 0,
|
53
|
-
"eol-last": 0,
|
54
|
-
"no-new": 0,
|
55
|
-
"semi-spacing": 0,
|
56
|
-
// Allow multi spaces around operators since they are
|
57
|
-
// used for alignment. This is not consistent in the
|
58
|
-
// code.
|
59
|
-
"no-multi-spaces": 0,
|
60
|
-
"eqeqeq": 0,
|
61
|
-
"no-mixed-requires": 0,
|
62
|
-
"no-console": 0
|
63
|
-
}
|
64
|
-
}
|
@@ -1,36 +0,0 @@
|
|
1
|
-
# This references the default nodejs container from
|
2
|
-
# the Docker Hub: https://registry.hub.docker.com/_/node/
|
3
|
-
# If you want Nodesource's container you would reference nodesource/node
|
4
|
-
# Read more about containers on our dev center
|
5
|
-
# http://devcenter.wercker.com/docs/containers/index.html
|
6
|
-
box: node
|
7
|
-
# This is the build pipeline. Pipelines are the core of wercker
|
8
|
-
# Read more about pipelines on our dev center
|
9
|
-
# http://devcenter.wercker.com/docs/pipelines/index.html
|
10
|
-
|
11
|
-
# You can also use services such as databases. Read more on our dev center:
|
12
|
-
# http://devcenter.wercker.com/docs/services/index.html
|
13
|
-
# services:
|
14
|
-
# - postgres
|
15
|
-
# http://devcenter.wercker.com/docs/services/postgresql.html
|
16
|
-
|
17
|
-
# - mongodb
|
18
|
-
# http://devcenter.wercker.com/docs/services/mongodb.html
|
19
|
-
build:
|
20
|
-
# The steps that will be executed on build
|
21
|
-
# Steps make up the actions in your pipeline
|
22
|
-
# Read more about steps on our dev center:
|
23
|
-
# http://devcenter.wercker.com/docs/steps/index.html
|
24
|
-
steps:
|
25
|
-
# A step that executes `npm install` command
|
26
|
-
- npm-install
|
27
|
-
# A step that executes `npm test` command
|
28
|
-
- npm-test
|
29
|
-
|
30
|
-
# A custom script step, name value is used in the UI
|
31
|
-
# and the code value contains the command that get executed
|
32
|
-
- script:
|
33
|
-
name: echo nodejs information
|
34
|
-
code: |
|
35
|
-
echo "node version $(node -v) running"
|
36
|
-
echo "npm version $(npm -v) running"
|
@@ -1,123 +0,0 @@
|
|
1
|
-
### v2.5.3
|
2
|
-
|
3
|
-
* Default to `enabled` only if we have a tty. Users can always override
|
4
|
-
this by passing in the `enabled` option explicitly or by calling calling
|
5
|
-
`gauge.enable()`.
|
6
|
-
|
7
|
-
### v2.5.2
|
8
|
-
|
9
|
-
* Externalized `./console-strings.js` into `console-control-strings`.
|
10
|
-
|
11
|
-
### v2.5.1
|
12
|
-
|
13
|
-
* Update to `signal-exit@3.0.0`, which fixes a compatibility bug with the
|
14
|
-
node profiler.
|
15
|
-
* [#39](https://github.com/iarna/gauge/pull/39) Fix tests on 0.10 and add
|
16
|
-
a missing devDependency. ([@helloyou2012](https://github.com/helloyou2012))
|
17
|
-
|
18
|
-
### v2.5.0
|
19
|
-
|
20
|
-
* Add way to programmatically fetch a list of theme names in a themeset
|
21
|
-
(`Themeset.getThemeNames`).
|
22
|
-
|
23
|
-
### v2.4.0
|
24
|
-
|
25
|
-
* Add support for setting themesets on existing gauge objects.
|
26
|
-
* Add post-IO callback to `gauge.hide()` as it is somtetimes necessary when
|
27
|
-
your terminal is interleaving output from multiple filehandles (ie, stdout
|
28
|
-
& stderr).
|
29
|
-
|
30
|
-
### v2.3.1
|
31
|
-
|
32
|
-
* Fix a refactor bug in setTheme where it wasn't accepting the various types
|
33
|
-
of args it should.
|
34
|
-
|
35
|
-
### v2.3.0
|
36
|
-
|
37
|
-
#### FEATURES
|
38
|
-
|
39
|
-
* Add setTemplate & setTheme back in.
|
40
|
-
* Add support for named themes, you can now ask for things like 'colorASCII'
|
41
|
-
and 'brailleSpinner'. Of course, you can still pass in theme objects.
|
42
|
-
Additionally you can now pass in an object with `hasUnicode`, `hasColor` and
|
43
|
-
`platform` keys in order to override our guesses as to those values when
|
44
|
-
selecting a default theme from the themeset.
|
45
|
-
* Make the output stream optional (it defaults to `process.stderr` now).
|
46
|
-
* Add `setWriteTo(stream[, tty])` to change the output stream and,
|
47
|
-
optionally, tty.
|
48
|
-
|
49
|
-
#### BUG FIXES & REFACTORING
|
50
|
-
|
51
|
-
* Abort the display phase early if we're supposed to be hidden and we are.
|
52
|
-
* Stop printing a bunch of spaces at the end of lines, since we're already
|
53
|
-
using an erase-to-end-of-line code anyway.
|
54
|
-
* The unicode themes were missing the subsection separator.
|
55
|
-
|
56
|
-
### v2.2.1
|
57
|
-
|
58
|
-
* Fix image in readme
|
59
|
-
|
60
|
-
### v2.2.0
|
61
|
-
|
62
|
-
* All new themes API– reference themes by name and pass in custom themes and
|
63
|
-
themesets (themesets get platform support autodetection done on them to
|
64
|
-
select the best theme). Theme mixins let you add features to all existing
|
65
|
-
themes.
|
66
|
-
* Much, much improved test coverage.
|
67
|
-
|
68
|
-
### v2.1.0
|
69
|
-
|
70
|
-
* Got rid of ░ in the default platform, noUnicode, hasColor theme. Thanks
|
71
|
-
to @yongtw123 for pointing out this had snuck in.
|
72
|
-
* Fiddled with the demo output to make it easier to see the spinner spin. Also
|
73
|
-
added prints before each platforms test output.
|
74
|
-
* I forgot to include `signal-exit` in our deps. <.< Thank you @KenanY for
|
75
|
-
finding this. Then I was lazy and made a new commit instead of using his
|
76
|
-
PR. Again, thank you for your patience @KenenY.
|
77
|
-
* Drastically speed up travis testing.
|
78
|
-
* Add a small javascript demo (demo.js) for showing off the various themes
|
79
|
-
(and testing them on diff platforms).
|
80
|
-
* Change: The subsection separator from ⁄ and / (different chars) to >.
|
81
|
-
* Fix crasher: A show or pulse without a label would cause the template renderer
|
82
|
-
to complain about a missing value.
|
83
|
-
* New feature: Add the ability to disable the clean-up-on-exit behavior.
|
84
|
-
Not something I expect to be widely desirable, but important if you have
|
85
|
-
multiple distinct gauge instances in your app.
|
86
|
-
* Use our own color support detection.
|
87
|
-
The `has-color` module proved too magic for my needs, making assumptions
|
88
|
-
as to which stream we write to and reading command line arguments.
|
89
|
-
|
90
|
-
### v2.0.0
|
91
|
-
|
92
|
-
This is a major rewrite of the internals. Externally there are fewer
|
93
|
-
changes:
|
94
|
-
|
95
|
-
* On node>0.8 gauge object now prints updates at a fixed rate. This means
|
96
|
-
that when you call `show` it may wate up to `updateInterval` ms before it
|
97
|
-
actually prints an update. You override this behavior with the
|
98
|
-
`fixedFramerate` option.
|
99
|
-
* The gauge object now keeps the cursor hidden as long as it's enabled and
|
100
|
-
shown.
|
101
|
-
* The constructor's arguments have changed, now it takes a mandatory output
|
102
|
-
stream and an optional options object. The stream no longer needs to be
|
103
|
-
an `ansi`ified stream, although it can be if you want (but we won't make
|
104
|
-
use of its special features).
|
105
|
-
* Previously the gauge was disabled by default if `process.stdout` wasn't a
|
106
|
-
tty. Now it always defaults to enabled. If you want the previous
|
107
|
-
behavior set the `enabled` option to `process.stdout.isTTY`.
|
108
|
-
* The constructor's options have changed– see the docs for details.
|
109
|
-
* Themes are entirely different. If you were using a custom theme, or
|
110
|
-
referring to one directly (eg via `Gauge.unicode` or `Gauge.ascii`) then
|
111
|
-
you'll need to change your code. You can get the equivalent of the latter
|
112
|
-
with:
|
113
|
-
```
|
114
|
-
var themes = require('gauge/themes')
|
115
|
-
var unicodeTheme = themes(true, true) // returns the color unicode theme for your platform
|
116
|
-
```
|
117
|
-
The default themes no longer use any ambiguous width characters, so even
|
118
|
-
if you choose to display those as wide your progress bar should still
|
119
|
-
display correctly.
|
120
|
-
* Templates are entirely different and if you were using a custom one, you
|
121
|
-
should consult the documentation to learn how to recreate it. If you were
|
122
|
-
using the default, be aware that it has changed and the result looks quite
|
123
|
-
a bit different.
|
@@ -1,393 +0,0 @@
|
|
1
|
-
gauge
|
2
|
-
=====
|
3
|
-
|
4
|
-
A nearly stateless terminal based horizontal gauge / progress bar.
|
5
|
-
|
6
|
-
```javascript
|
7
|
-
var Gauge = require("gauge")
|
8
|
-
|
9
|
-
var gauge = new Gauge()
|
10
|
-
|
11
|
-
gauge.show("test", 0.20)
|
12
|
-
|
13
|
-
gauge.pulse("this")
|
14
|
-
|
15
|
-
gauge.hide()
|
16
|
-
```
|
17
|
-
|
18
|
-

|
19
|
-
|
20
|
-
|
21
|
-
### CHANGES FROM 1.x
|
22
|
-
|
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.
|
25
|
-
|
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.
|
43
|
-
|
44
|
-
Constructs a new gauge. Gauges are drawn on a single line, and are not drawn
|
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.
|
53
|
-
|
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.
|
59
|
-
|
60
|
-
The **options** object can have the following properties, all of which are
|
61
|
-
optional:
|
62
|
-
|
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.
|
103
|
-
|
104
|
-
[has-unicode]: https://www.npmjs.com/package/has-unicode
|
105
|
-
[themes]: #themes
|
106
|
-
[documentation]: #templates
|
107
|
-
|
108
|
-
#### `gauge.show(section | status, [completed])`
|
109
|
-
|
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.
|
115
|
-
|
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.
|
120
|
-
|
121
|
-
#### `gauge.hide([cb])`
|
122
|
-
|
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.)
|
126
|
-
|
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.
|
132
|
-
|
133
|
-
#### `gauge.pulse([subsection])`
|
134
|
-
|
135
|
-
* **subsection** – *(optional)* The specific thing that triggered this pulse
|
136
|
-
|
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`.
|
139
|
-
|
140
|
-
#### `gauge.disable()`
|
141
|
-
|
142
|
-
Hides the gauge and ignores further calls to `show` or `pulse`.
|
143
|
-
|
144
|
-
#### `gauge.enable()`
|
145
|
-
|
146
|
-
Shows the gauge and resumes updating when `show` or `pulse` is called.
|
147
|
-
|
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.
|
152
|
-
|
153
|
-
#### `gauge.setTheme(theme)`
|
154
|
-
|
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)`
|
168
|
-
|
169
|
-
Change the active template, will be displayed with the next show or pulse
|
170
|
-
|
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()
|
235
|
-
|
236
|
-
Return a list of all of the names of the themes in this themeset. Suitable
|
237
|
-
for use in `themes.getTheme(…)`.
|
238
|
-
|
239
|
-
#### themes.getTheme(name)
|
240
|
-
|
241
|
-
Returns the theme object from this theme set named `name`.
|
242
|
-
|
243
|
-
If `name` does not exist in this themeset an error will be thrown with
|
244
|
-
a `code` of `EMISSINGTHEME`.
|
245
|
-
|
246
|
-
#### themes.setDefault([opts], themeName)
|
247
|
-
|
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
|
316
|
-
|
317
|
-
A template is an array of objects and strings that, after being evaluated,
|
318
|
-
will be turned into the gauge line. The default template is:
|
319
|
-
|
320
|
-
```javascript
|
321
|
-
[
|
322
|
-
{type: 'progressbar', length: 20},
|
323
|
-
{type: 'activityIndicator', kerning: 1, length: 1},
|
324
|
-
{type: 'section', kerning: 1},
|
325
|
-
{type: 'subsection', kerning: 1}
|
326
|
-
]
|
327
|
-
```
|
328
|
-
|
329
|
-
The various template elements can either be **plain strings**, in which case they will
|
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.
|
342
|
-
* *maxLength* – The maximum length for this element. If its value is longer it
|
343
|
-
will be truncated.
|
344
|
-
* *minLength* – The minimum length for this element. If its value is shorter it
|
345
|
-
will be padded according to the *align* value.
|
346
|
-
* *align* – (Default: left) Possible values "left", "right" and "center". Works
|
347
|
-
as you'd expect from word processors.
|
348
|
-
* *length* – Provides a single value for both *minLength* and *maxLength*. If both
|
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
|
-
|
352
|
-
### PLUMBING
|
353
|
-
|
354
|
-
This is the super simple, assume nothing, do no magic internals used by gauge to
|
355
|
-
implement its ordinary interface.
|
356
|
-
|
357
|
-
```
|
358
|
-
var Plumbing = require('gauge/plumbing')
|
359
|
-
var gauge = new Plumbing(theme, template, width)
|
360
|
-
```
|
361
|
-
|
362
|
-
* **theme**: The theme to use.
|
363
|
-
* **template**: The template to use.
|
364
|
-
* **width**: How wide your gauge should be
|
365
|
-
|
366
|
-
#### `gauge.setTheme(theme)`
|
367
|
-
|
368
|
-
Change the active theme.
|
369
|
-
|
370
|
-
#### `gauge.setTemplate(template)`
|
371
|
-
|
372
|
-
Change the active template.
|
373
|
-
|
374
|
-
#### `gauge.setWidth(width)`
|
375
|
-
|
376
|
-
Change the width to render at.
|
377
|
-
|
378
|
-
#### `gauge.hide()`
|
379
|
-
|
380
|
-
Return the string necessary to hide the progress bar
|
381
|
-
|
382
|
-
#### `gauge.hideCursor()`
|
383
|
-
|
384
|
-
Return a string to hide the cursor.
|
385
|
-
|
386
|
-
#### `gauge.showCursor()`
|
387
|
-
|
388
|
-
Return a string to show the cursor.
|
389
|
-
|
390
|
-
#### `gauge.show(status)`
|
391
|
-
|
392
|
-
Using `status` for values, render the provided template with the theme and return
|
393
|
-
a string that is suitable for printing to update the gauge.
|
@@ -1,32 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
module.exports = (function () {
|
3
|
-
if (process.argv.indexOf('--no-color') !== -1) {
|
4
|
-
return false;
|
5
|
-
}
|
6
|
-
|
7
|
-
if (process.argv.indexOf('--color') !== -1) {
|
8
|
-
return true;
|
9
|
-
}
|
10
|
-
|
11
|
-
if (process.stdout && !process.stdout.isTTY) {
|
12
|
-
return false;
|
13
|
-
}
|
14
|
-
|
15
|
-
if (process.platform === 'win32') {
|
16
|
-
return true;
|
17
|
-
}
|
18
|
-
|
19
|
-
if ('COLORTERM' in process.env) {
|
20
|
-
return true;
|
21
|
-
}
|
22
|
-
|
23
|
-
if (process.env.TERM === 'dumb') {
|
24
|
-
return false;
|
25
|
-
}
|
26
|
-
|
27
|
-
if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
|
28
|
-
return true;
|
29
|
-
}
|
30
|
-
|
31
|
-
return false;
|
32
|
-
})();
|