diff --git a/docs/index.html b/docs/index.html index ec5dd46..2375e84 100644 --- a/docs/index.html +++ b/docs/index.html @@ -215,13 +215,13 @@

Examples

console.log('Works like normal...') console.debug('...but now controllable.') -console.verbosity(3) +console.verbosity(3) // Use numbered levels 5 (debug) to 1 (error) console.debug('...this isn’t printed now.') console.canWrite(5) && console.dir({print: 'this won’t.'}) -console.verbosity(5) +console.verbosity('debug') // Use named levels [debug, info, log, warning, error] console.canWrite(5) && console.dir({print: 'this will now.'})

This will direct all console output to stderr, but silence 'info' and 'debug' messages.

@@ -278,7 +278,7 @@

- + src/index.js @@ -354,7 +354,7 @@

- + src/index.js @@ -430,7 +430,7 @@

- + src/lib/verbosity.class.js @@ -503,6 +503,8 @@

options.verbosity Number + + (default 3) The verboseness of output: 0: Mute @@ -534,6 +536,17 @@

+ + options.global Boolean + + (default true) + + Should changes to verbosity be made globally? + + + + + options.prefix String @@ -587,7 +600,7 @@

- + src/lib/verbosity.class.js @@ -597,7 +610,7 @@

Set the current verbosity.

-
verbosity(level: Number) → Number
+
verbosity(level: (Number | String)) → Number
@@ -614,8 +627,8 @@

- level (Number) - The current level (0 to 5). + level ((Number | String)) + The current level (0 to 5) or level name.
@@ -664,7 +677,7 @@

- + src/lib/verbosity.class.js @@ -742,7 +755,7 @@

- + src/lib/verbosity.class.js @@ -820,7 +833,7 @@

- + src/lib/verbosity.class.js @@ -898,7 +911,7 @@

- + src/lib/verbosity.class.js @@ -976,7 +989,7 @@

- + src/lib/verbosity.class.js @@ -1054,7 +1067,7 @@

- + src/lib/verbosity.class.js @@ -1132,7 +1145,7 @@

- + src/lib/verbosity.class.js @@ -1210,7 +1223,7 @@

- + src/lib/verbosity.class.js @@ -1288,7 +1301,7 @@

- + src/lib/verbosity.class.js @@ -1366,7 +1379,7 @@

- + src/lib/verbosity.class.js @@ -1444,7 +1457,7 @@

- + src/lib/verbosity.class.js @@ -1523,7 +1536,7 @@

- + src/lib/verbosity.class.js @@ -1629,7 +1642,7 @@

- + src/lib/verbosity.class.js diff --git a/index.js b/index.js index 79c0f5d..9cc8d77 100644 --- a/index.js +++ b/index.js @@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true }); function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } -var chalk = _interopDefault(require('chalk')); +var meta = _interopDefault(require('@thebespokepixel/meta')); var util = _interopDefault(require('util')); var termNG = _interopDefault(require('term-ng')); +var chalk = _interopDefault(require('chalk')); var sparkles = _interopDefault(require('sparkles')); var time = require('@thebespokepixel/time'); -var meta = _interopDefault(require('@thebespokepixel/meta')); function matrix(sOut, sErr) { return { @@ -67,9 +67,10 @@ class Verbosity extends Console { constructor({ outStream, errorStream, - verbosity, + verbosity = 3, timestamp, namespace, + global = true, prefix } = {}) { const sOut = (ws => { @@ -90,6 +91,7 @@ class Verbosity extends Console { super(sOut, sErr); this.willEmit = Boolean(namespace); + this.globalControl = Boolean(global); this.timeFormatter = (ts => ts ? () => `[${chalk.dim(time.bespokeTimeFormat(ts))}] ` : () => '')(timestamp); @@ -97,16 +99,30 @@ class Verbosity extends Console { this._stdout = sOut; this._stderr = sErr; - this.threshold = verbosity ? verbosity : 3; + this.threshold = verbosity; + this.globalVerbosityController = this.globalControl && sparkles('verbosityGlobal'); this.emitter = this.willEmit && sparkles(namespace); this.matrix = matrix(sOut, sErr); + this.globalVerbosityController.on('level', ({ + level + }) => { + this.threshold = level; + }); } verbosity(level) { - level = typeof level === 'string' ? this.matrix[level] : level; + if (level) { + level = typeof level === 'string' ? this.matrix[level].level : level; - if (level < 6) { - this.threshold = level; + if (level < 6) { + this.threshold = level; + } + + if (this.globalControl) { + this.globalVerbosityController.emit('level', { + level + }); + } } return this.threshold; diff --git a/index.mjs b/index.mjs index bf9f298..cf383b9 100644 --- a/index.mjs +++ b/index.mjs @@ -1,9 +1,9 @@ -import chalk from 'chalk'; +import meta from '@thebespokepixel/meta'; import util from 'util'; import termNG from 'term-ng'; +import chalk from 'chalk'; import sparkles from 'sparkles'; import { bespokeTimeFormat } from '@thebespokepixel/time'; -import meta from '@thebespokepixel/meta'; function matrix(sOut, sErr) { return { @@ -61,9 +61,10 @@ class Verbosity extends Console { constructor({ outStream, errorStream, - verbosity, + verbosity = 3, timestamp, namespace, + global = true, prefix } = {}) { const sOut = (ws => { @@ -84,6 +85,7 @@ class Verbosity extends Console { super(sOut, sErr); this.willEmit = Boolean(namespace); + this.globalControl = Boolean(global); this.timeFormatter = (ts => ts ? () => `[${chalk.dim(bespokeTimeFormat(ts))}] ` : () => '')(timestamp); @@ -91,16 +93,30 @@ class Verbosity extends Console { this._stdout = sOut; this._stderr = sErr; - this.threshold = verbosity ? verbosity : 3; + this.threshold = verbosity; + this.globalVerbosityController = this.globalControl && sparkles('verbosityGlobal'); this.emitter = this.willEmit && sparkles(namespace); this.matrix = matrix(sOut, sErr); + this.globalVerbosityController.on('level', ({ + level + }) => { + this.threshold = level; + }); } verbosity(level) { - level = typeof level === 'string' ? this.matrix[level] : level; + if (level) { + level = typeof level === 'string' ? this.matrix[level].level : level; - if (level < 6) { - this.threshold = level; + if (level < 6) { + this.threshold = level; + } + + if (this.globalControl) { + this.globalVerbosityController.emit('level', { + level + }); + } } return this.threshold; diff --git a/package-lock.json b/package-lock.json index 1ba4a25..f4f0aa9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,18 +56,18 @@ } }, "@babel/core": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.3.3.tgz", - "integrity": "sha512-w445QGI2qd0E0GlSnq6huRZWPMmQGCp5gd5ZWS4hagn0EiwzxD5QMFkpchyusAyVC1n27OKXzQ0/88aVU9n4xQ==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.3.4.tgz", + "integrity": "sha512-jRsuseXBo9pN197KnDwhhaaBzyZr2oIcLHHTt2oDdQrej5Qp57dCCJafWx5ivU8/alEYDpssYqv1MUqcxwQlrA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.3.3", + "@babel/generator": "^7.3.4", "@babel/helpers": "^7.2.0", - "@babel/parser": "^7.3.3", + "@babel/parser": "^7.3.4", "@babel/template": "^7.2.2", - "@babel/traverse": "^7.2.2", - "@babel/types": "^7.3.3", + "@babel/traverse": "^7.3.4", + "@babel/types": "^7.3.4", "convert-source-map": "^1.1.0", "debug": "^4.1.0", "json5": "^2.1.0", @@ -78,12 +78,12 @@ } }, "@babel/generator": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.3.tgz", - "integrity": "sha512-aEADYwRRZjJyMnKN7llGIlircxTCofm3dtV5pmY6ob18MSIuipHpA2yZWkPlycwu5HJcx/pADS3zssd8eY7/6A==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.3.4.tgz", + "integrity": "sha512-8EXhHRFqlVVWXPezBW5keTiQi/rJMQTg/Y9uVCEZ0CAF3PKtCCaVRnp64Ii1ujhkoDhhF1fVsImoN4yJ2uz4Wg==", "dev": true, "requires": { - "@babel/types": "^7.3.3", + "@babel/types": "^7.3.4", "jsesc": "^2.5.1", "lodash": "^4.17.11", "source-map": "^0.5.0", @@ -131,16 +131,17 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.3.2.tgz", - "integrity": "sha512-tdW8+V8ceh2US4GsYdNVNoohq5uVwOf9k6krjwW4E1lINcHgttnWcNqgdoessn12dAy8QkbezlbQh2nXISNY+A==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.3.4.tgz", + "integrity": "sha512-uFpzw6L2omjibjxa8VGZsJUPL5wJH0zzGKpoz0ccBkzIa6C8kWNUbiBmQ0rgOKWlHJ6qzmfa6lTiGchiV8SC+g==", "dev": true, "requires": { "@babel/helper-function-name": "^7.1.0", "@babel/helper-member-expression-to-functions": "^7.0.0", "@babel/helper-optimise-call-expression": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.2.3" + "@babel/helper-replace-supers": "^7.3.4", + "@babel/helper-split-export-declaration": "^7.0.0" } }, "@babel/helper-define-map": { @@ -263,15 +264,15 @@ } }, "@babel/helper-replace-supers": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.2.3.tgz", - "integrity": "sha512-GyieIznGUfPXPWu0yLS6U55Mz67AZD9cUk0BfirOWlPrXlBcan9Gz+vHGz+cPfuoweZSnPzPIm67VtQM0OWZbA==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.3.4.tgz", + "integrity": "sha512-pvObL9WVf2ADs+ePg0jrqlhHoxRXlOa+SHRHzAXIz2xkYuOHfGl+fKxPMaS4Fq+uje8JQPobnertBBvyrWnQ1A==", "dev": true, "requires": { "@babel/helper-member-expression-to-functions": "^7.0.0", "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.2.3", - "@babel/types": "^7.0.0" + "@babel/traverse": "^7.3.4", + "@babel/types": "^7.3.4" } }, "@babel/helper-simple-access": { @@ -328,9 +329,9 @@ } }, "@babel/parser": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.3.tgz", - "integrity": "sha512-xsH1CJoln2r74hR+y7cg2B5JCPaTh+Hd+EbBRk9nWGSNspuo6krjhX0Om6RnRQuIvFq8wVXCLKH3kwKDYhanSg==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.3.4.tgz", + "integrity": "sha512-tXZCqWtlOOP4wgCp6RjRvLmfuhnqTLy9VHwRochJBCP2nDm27JnnuFEnXFASVyQNHk36jD1tAammsCEEqgscIQ==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { @@ -345,12 +346,12 @@ } }, "@babel/plugin-proposal-class-properties": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.3.3.tgz", - "integrity": "sha512-XO9eeU1/UwGPM8L+TjnQCykuVcXqaO5J1bkRPIygqZ/A2L1xVMJ9aZXrY31c0U4H2/LHKL4lbFQLsxktSrc/Ng==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.3.4.tgz", + "integrity": "sha512-lUf8D3HLs4yYlAo8zjuneLvfxN7qfKv1Yzbj5vjqaqMJxgJA3Ipwp4VUJ+OrOdz53Wbww6ahwB8UhB2HQyLotA==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.3.0", + "@babel/helper-create-class-features-plugin": "^7.3.4", "@babel/helper-plugin-utils": "^7.0.0" } }, @@ -457,9 +458,9 @@ } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.3.2.tgz", - "integrity": "sha512-DjeMS+J2+lpANkYLLO+m6GjoTMygYglKmRe6cDTbFv3L9i6mmiE8fe6B8MtCSLZpVXscD5kn7s6SgtHrDoBWoA==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.3.4.tgz", + "integrity": "sha512-j7VQmbbkA+qrzNqbKHrBsW3ddFnOeva6wzSe/zB7T+xaxGc+RCpwo44wCmRixAIGRoIpmVgvzFzNJqQcO3/9RA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -707,9 +708,9 @@ } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz", - "integrity": "sha512-CEHzg4g5UraReozI9D4fblBYABs7IM6UerAVG7EJVrTLC5keh00aEuLUT+O40+mJCEzaXkYfTCUKIyeDfMOFFQ==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.3.4.tgz", + "integrity": "sha512-Y7nCzv2fw/jEZ9f678MuKdMo99MFDJMT/PvD9LisrR5JDFcJH6vYeH6RnjVt3p5tceyGRvTtEN0VOlU+rgHZjA==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -727,19 +728,19 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz", - "integrity": "sha512-vDTgf19ZEV6mx35yiPJe4fS02mPQUUcBNwWQSZFXSzTSbsJFQvHt7DqyS3LK8oOWALFOsJ+8bbqBgkirZteD5Q==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.3.4.tgz", + "integrity": "sha512-blRr2O8IOZLAOJklXLV4WhcEzpYafYQKSGT3+R26lWG41u/FODJuBggehtOwilVAcFu393v3OFj+HmaE6tVjhA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", - "lodash": "^4.17.10" + "lodash": "^4.17.11" } }, "@babel/plugin-transform-classes": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.3.3.tgz", - "integrity": "sha512-n0CLbsg7KOXsMF4tSTLCApNMoXk0wOPb0DYfsOO1e7SfIb9gOyfbpKI2MZ+AXfqvlfzq2qsflJ1nEns48Caf2w==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.3.4.tgz", + "integrity": "sha512-J9fAvCFBkXEvBimgYxCjvaVDzL6thk0j0dBvCeZmIUDBwyt+nv6HfbImsSrWsYXfDNDivyANgJlFXDUWRTZBuA==", "dev": true, "requires": { "@babel/helper-annotate-as-pure": "^7.0.0", @@ -747,7 +748,7 @@ "@babel/helper-function-name": "^7.1.0", "@babel/helper-optimise-call-expression": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.1.0", + "@babel/helper-replace-supers": "^7.3.4", "@babel/helper-split-export-declaration": "^7.0.0", "globals": "^11.1.0" } @@ -801,9 +802,9 @@ } }, "@babel/plugin-transform-flow-strip-types": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.2.3.tgz", - "integrity": "sha512-xnt7UIk9GYZRitqCnsVMjQK1O2eKZwFB3CvvHjf5SGx6K6vr/MScCKQDnf1DxRaj501e3pXjti+inbSXX2ZUoQ==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.3.4.tgz", + "integrity": "sha512-PmQC9R7DwpBFA+7ATKMyzViz3zCaMNouzZMPZN2K5PnbBbtL3AXFYTkDk+Hey5crQq2A90UG5Uthz0mel+XZrA==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", @@ -860,9 +861,9 @@ } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.2.0.tgz", - "integrity": "sha512-aYJwpAhoK9a+1+O625WIjvMY11wkB/ok0WClVwmeo3mCjcNRjt+/8gHWrB5i+00mUju0gWsBkQnPpdvQ7PImmQ==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.3.4.tgz", + "integrity": "sha512-VZ4+jlGOF36S7TjKs8g4ojp4MEI+ebCQZdswWb/T9I4X84j8OtFAyjXjt/M16iIm5RIZn0UMQgg/VgIwo/87vw==", "dev": true, "requires": { "@babel/helper-hoist-variables": "^7.0.0", @@ -959,12 +960,12 @@ } }, "@babel/plugin-transform-regenerator": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz", - "integrity": "sha512-sj2qzsEx8KDVv1QuJc/dEfilkg3RRPvPYx/VnKLtItVQRWt1Wqf5eVCOLZm29CiGFfYYsA3VPjfizTCV0S0Dlw==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.3.4.tgz", + "integrity": "sha512-hvJg8EReQvXT6G9H2MvNPXkv9zK36Vxa1+csAVTpE1J3j0zlHplw76uudEbJxgvqZzAq9Yh45FLD4pk5mKRFQA==", "dev": true, "requires": { - "regenerator-transform": "^0.13.3" + "regenerator-transform": "^0.13.4" } }, "@babel/plugin-transform-shorthand-properties": { @@ -1026,16 +1027,16 @@ } }, "@babel/preset-env": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.3.1.tgz", - "integrity": "sha512-FHKrD6Dxf30e8xgHQO0zJZpUPfVZg+Xwgz5/RdSWCbza9QLNk4Qbp40ctRoqDxml3O8RMzB1DU55SXeDG6PqHQ==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.3.4.tgz", + "integrity": "sha512-2mwqfYMK8weA0g0uBKOt4FE3iEodiHy9/CW0b+nWXcbL+pGzLx8ESYc+j9IIxr6LTDHWKgPm71i9smo02bw+gA==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-proposal-async-generator-functions": "^7.2.0", "@babel/plugin-proposal-json-strings": "^7.2.0", - "@babel/plugin-proposal-object-rest-spread": "^7.3.1", + "@babel/plugin-proposal-object-rest-spread": "^7.3.4", "@babel/plugin-proposal-optional-catch-binding": "^7.2.0", "@babel/plugin-proposal-unicode-property-regex": "^7.2.0", "@babel/plugin-syntax-async-generators": "^7.2.0", @@ -1043,10 +1044,10 @@ "@babel/plugin-syntax-object-rest-spread": "^7.2.0", "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", "@babel/plugin-transform-arrow-functions": "^7.2.0", - "@babel/plugin-transform-async-to-generator": "^7.2.0", + "@babel/plugin-transform-async-to-generator": "^7.3.4", "@babel/plugin-transform-block-scoped-functions": "^7.2.0", - "@babel/plugin-transform-block-scoping": "^7.2.0", - "@babel/plugin-transform-classes": "^7.2.0", + "@babel/plugin-transform-block-scoping": "^7.3.4", + "@babel/plugin-transform-classes": "^7.3.4", "@babel/plugin-transform-computed-properties": "^7.2.0", "@babel/plugin-transform-destructuring": "^7.2.0", "@babel/plugin-transform-dotall-regex": "^7.2.0", @@ -1057,13 +1058,13 @@ "@babel/plugin-transform-literals": "^7.2.0", "@babel/plugin-transform-modules-amd": "^7.2.0", "@babel/plugin-transform-modules-commonjs": "^7.2.0", - "@babel/plugin-transform-modules-systemjs": "^7.2.0", + "@babel/plugin-transform-modules-systemjs": "^7.3.4", "@babel/plugin-transform-modules-umd": "^7.2.0", "@babel/plugin-transform-named-capturing-groups-regex": "^7.3.0", "@babel/plugin-transform-new-target": "^7.0.0", "@babel/plugin-transform-object-super": "^7.2.0", "@babel/plugin-transform-parameters": "^7.2.0", - "@babel/plugin-transform-regenerator": "^7.0.0", + "@babel/plugin-transform-regenerator": "^7.3.4", "@babel/plugin-transform-shorthand-properties": "^7.2.0", "@babel/plugin-transform-spread": "^7.2.0", "@babel/plugin-transform-sticky-regex": "^7.2.0", @@ -1117,26 +1118,26 @@ } }, "@babel/traverse": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.3.tgz", - "integrity": "sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.3.4.tgz", + "integrity": "sha512-TvTHKp6471OYEcE/91uWmhR6PrrYywQntCHSaZ8CM8Vmp+pjAusal4nGB2WCCQd0rvI7nOMKn9GnbcvTUz3/ZQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.2.2", + "@babel/generator": "^7.3.4", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.2.3", - "@babel/types": "^7.2.2", + "@babel/parser": "^7.3.4", + "@babel/types": "^7.3.4", "debug": "^4.1.0", "globals": "^11.1.0", - "lodash": "^4.17.10" + "lodash": "^4.17.11" } }, "@babel/types": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.3.tgz", - "integrity": "sha512-2tACZ80Wg09UnPg5uGAOUvvInaqLk3l/IAhQzlxLQOIXacr6bMsra5SH6AWw/hIDRCSbCdHP2KzSOD+cT7TzMQ==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.3.4.tgz", + "integrity": "sha512-WEkp8MsLftM7O/ty580wAmZzN1nDmCACc5+jFzUt+GUFNNIi3LdRlueYz0YIlmJhlZx1QYDMZL5vdWCL0fNjFQ==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -1170,13 +1171,13 @@ "dev": true }, "@thebespokepixel/badges": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@thebespokepixel/badges/-/badges-1.0.5.tgz", - "integrity": "sha512-hL371LOXeZa1kZnCt3Xr4yWNtthVwgsXlP6NtHFQnLBiGoZQ9cJpc+9z9uK0VZ121zOd/LBtVothwkfRf0tb+Q==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@thebespokepixel/badges/-/badges-1.0.6.tgz", + "integrity": "sha512-wbKStIH03TXng09BO6G5vFDWlgHdN2dvdPExaP5aK3503NebwCVaBbp0Gozi5/DZnZ7e2ktCoXBgd1aRk4A3Mw==", "dev": true, "requires": { - "@thebespokepixel/meta": "^1.0.1", - "@thebespokepixel/string": "^0.5.5", + "@thebespokepixel/meta": "^1.0.2", + "@thebespokepixel/string": "^0.5.6", "common-tags": "^1.8.0", "lodash": "^4.17.11", "mdast-util-inject": "^1.1.0", @@ -1186,13 +1187,68 @@ "remark-heading-gap": "^3.1.0", "remark-squeeze-paragraphs": "^3.0.3", "remark-usage": "^6.1.3", - "trucolor": "^1.0.1", - "truwrap": "^1.0.1", + "trucolor": "^1.0.2", + "truwrap": "^1.0.2", "unist-builder": "^1.0.3", "update-notifier": "^2.5.0", "urlencode": "^1.1.0", - "verbosity": "^1.0.1", + "verbosity": "^1.0.2", "yargs": "^13.2.1" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pkg-conf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", + "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" + } + } } }, "@thebespokepixel/es-tinycolor": { @@ -1242,12 +1298,34 @@ "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", "dev": true }, - "@types/node": { - "version": "11.9.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.9.5.tgz", - "integrity": "sha512-vVjM0SVzgaOUpflq4GYBvCpozes8OgIIS5gVXVka+OfK3hvnkC1i93U8WiY2OtNE4XUWyyy/86Kf6e0IHTQw1Q==", + "@types/events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", + "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", "dev": true }, + "@types/glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", + "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", + "dev": true, + "requires": { + "@types/events": "*", + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, + "@types/node": { + "version": "11.11.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.0.tgz", + "integrity": "sha512-D5Rt+HXgEywr3RQJcGlZUCTCx1qVbCZpVk3/tOOA6spLNZdGm8BU+zRgdRYDoF1pO3RuXLxADzMrF903JlQXqg==" + }, "@types/unist": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", @@ -1298,9 +1376,9 @@ "dev": true }, "ajv": { - "version": "6.9.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.2.tgz", - "integrity": "sha512-4UFy0/LgDo7Oa/+wOAlj44tp9K78u38E5/359eSrqEp1Z5PdVfimCcs7SluXMP755RUQu6d2b4AvF0R1C9RZjg==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -1372,9 +1450,9 @@ } }, "ansi-regex": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", - "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, "ansi-styles": { "version": "3.2.1", @@ -1472,9 +1550,9 @@ "dev": true }, "array-differ": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-2.0.3.tgz", - "integrity": "sha1-AZW7AMzM8nEQbv7kpHhkiLcYBxI=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-2.1.0.tgz", + "integrity": "sha512-KbUpJgx909ZscOc/7CLATBFam7P1Z1QRQInvgT0UztM9Q72aGKCunKASAl7WNW0tnPmPyEMeMhdsfWhfmW037w==", "dev": true }, "array-each": { @@ -1638,21 +1716,21 @@ "dev": true }, "ava": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ava/-/ava-1.2.1.tgz", - "integrity": "sha512-EHqbPGdd8aNvlvRNL7liD1J9Auf9kByHj5Zi7zF7Z5ukn2ZStZgVBf7LSqirKIOWScB3XZzFQbO59SnTvzD5kA==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/ava/-/ava-1.3.1.tgz", + "integrity": "sha512-peXne6s798phYkbsf09tJXBT2ahWtc1V12TnvxUkBwVNay8GFwYzd6vgnklV9YNP4YHnHj5av8op4SZd4hJ4Xw==", "dev": true, "requires": { "@ava/babel-preset-stage-4": "^2.0.0", "@ava/babel-preset-transform-test-files": "^4.0.1", "@ava/write-file-atomic": "^2.2.0", - "@babel/core": "^7.2.2", - "@babel/generator": "^7.3.0", + "@babel/core": "^7.3.4", + "@babel/generator": "^7.3.4", "@babel/plugin-syntax-async-generators": "^7.2.0", "@babel/plugin-syntax-object-rest-spread": "^7.2.0", "@babel/plugin-syntax-optional-catch-binding": "^7.2.0", "@concordance/react": "^2.0.0", - "ansi-escapes": "^3.1.0", + "ansi-escapes": "^3.2.0", "ansi-styles": "^3.2.1", "arr-flatten": "^1.1.0", "array-union": "^1.0.1", @@ -1660,7 +1738,7 @@ "arrify": "^1.0.0", "bluebird": "^3.5.3", "chalk": "^2.4.2", - "chokidar": "^2.0.4", + "chokidar": "^2.1.2", "chunkd": "^1.0.0", "ci-parallel-vars": "^1.0.0", "clean-stack": "^2.0.0", @@ -1673,16 +1751,16 @@ "convert-source-map": "^1.6.0", "currently-unhandled": "^0.4.1", "debug": "^4.1.1", - "del": "^3.0.0", + "del": "^4.0.0", "dot-prop": "^4.2.0", "emittery": "^0.4.1", "empower-core": "^1.2.0", "equal-length": "^1.0.0", "escape-string-regexp": "^1.0.5", - "esm": "^3.1.3", + "esm": "^3.2.10", "figures": "^2.0.0", "find-up": "^3.0.0", - "get-port": "^4.1.0", + "get-port": "^4.2.0", "globby": "^7.1.1", "ignore-by-default": "^1.0.0", "import-local": "^2.0.0", @@ -1699,16 +1777,16 @@ "lodash.difference": "^4.3.0", "lodash.flatten": "^4.2.0", "loud-rejection": "^1.2.0", - "make-dir": "^1.3.0", + "make-dir": "^2.1.0", "matcher": "^1.1.1", "md5-hex": "^2.0.0", "meow": "^5.0.0", "ms": "^2.1.1", "multimatch": "^3.0.0", "observable-to-promise": "^0.5.0", - "ora": "^3.0.0", + "ora": "^3.2.0", "package-hash": "^3.0.0", - "pkg-conf": "^2.1.0", + "pkg-conf": "^3.0.0", "plur": "^3.0.1", "pretty-ms": "^4.0.0", "require-precompiled": "^0.1.0", @@ -1741,6 +1819,22 @@ "ci-info": "^2.0.0" } }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", @@ -1952,14 +2046,14 @@ } }, "browserslist": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.1.tgz", - "integrity": "sha512-pEBxEXg7JwaakBXjATYw/D1YZh4QUSCX/Mnd/wnqSRPPSi1U39iDhDoKGoBUcraKdxDlrYqJxSI5nNvD+dWP2A==", + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.4.2.tgz", + "integrity": "sha512-ISS/AIAiHERJ3d45Fz0AVYKkgcy+F/eJHzKEvv1j0wwKGKD9T3BrwKr/5g45L+Y4XIK5PlTqefHciRFcfE1Jxg==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000929", - "electron-to-chromium": "^1.3.103", - "node-releases": "^1.1.3" + "caniuse-lite": "^1.0.30000939", + "electron-to-chromium": "^1.3.113", + "node-releases": "^1.1.8" } }, "buf-compare": { @@ -2061,9 +2155,9 @@ "dev": true }, "camelcase": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", - "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==" + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz", + "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ==" }, "camelcase-keys": { "version": "4.2.0", @@ -2085,9 +2179,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000939", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000939.tgz", - "integrity": "sha512-oXB23ImDJOgQpGjRv1tCtzAvJr4/OvrHi5SO2vUgB0g0xpdZZoA/BxfImiWfdwoYdUTtQrPsXsvYU/dmCSM8gg==", + "version": "1.0.30000942", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000942.tgz", + "integrity": "sha512-wLf+IhZUy2rfz48tc40OH7jHjXjnvDFEYqBHluINs/6MgzoNLPf25zhE4NOVzqxLKndf+hau81sAW0RcGHIaBQ==", "dev": true }, "capture-stack-trace": { @@ -2243,49 +2337,11 @@ } }, "cli-spinners": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.3.1.tgz", - "integrity": "sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.0.0.tgz", + "integrity": "sha512-yiEBmhaKPPeBj7wWm4GEdtPZK940p9pl3EANIrnJ3JnvWyrPjcFcsEq6qRUuQ7fzB0+Y82ld3p6B34xo95foWw==", "dev": true }, - "cli-table3": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/cli-table3/-/cli-table3-0.5.1.tgz", - "integrity": "sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw==", - "dev": true, - "requires": { - "colors": "^1.1.2", - "object-assign": "^4.1.0", - "string-width": "^2.1.1" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, "cli-truncate": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-1.1.0.tgz", @@ -2451,12 +2507,6 @@ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "dev": true }, - "colors": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.3.3.tgz", - "integrity": "sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==", - "dev": true - }, "columnify": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz", @@ -2532,9 +2582,9 @@ }, "dependencies": { "readable-stream": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz", - "integrity": "sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.2.0.tgz", + "integrity": "sha512-RV20kLjdmpZuTF1INEb9IA3L68Nmi+Ri7ppZqo78wj//Pn62fCoJyV9zalccNzDD/OuJpMG4f+pfMl8+L6QdGw==", "dev": true, "requires": { "inherits": "^2.0.3", @@ -2871,17 +2921,17 @@ "dev": true }, "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-4.0.0.tgz", + "integrity": "sha512-/BnSJ+SuZyLu7xMn48kZY0nMXDi+5KNmR4g8n21Wivsl8+B9njV6/5kcTNE9juSprp0zRWBU28JuHUq0FqK1Nw==", "dev": true, "requires": { "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" + "is-path-cwd": "^2.0.0", + "is-path-in-cwd": "^2.0.0", + "p-map": "^2.0.0", + "pify": "^4.0.1", + "rimraf": "^2.6.2" }, "dependencies": { "globby": { @@ -2904,6 +2954,12 @@ "dev": true } } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true } } }, @@ -2990,9 +3046,9 @@ } }, "documentation": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/documentation/-/documentation-9.2.0.tgz", - "integrity": "sha512-5xCqzC3QGSbf3DBufbJtZA3xEfqfyRnoPo65r4z7i5XUlqRN6H5XjUjdK+K4XuZMgdL3z++p7zB07C+SsuFAXg==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/documentation/-/documentation-9.3.0.tgz", + "integrity": "sha512-HGHuYATpJz2VKI7TjuAnUFrE+xzLWzp2ttz1oRBPVYPTtzGCSZE6RDiYYCyErOW18BtxCA8o7jzt+VpcWv/ZCg==", "dev": true, "requires": { "@babel/core": "^7.1.2", @@ -3032,7 +3088,7 @@ "github-slugger": "1.2.0", "glob": "^7.1.2", "globals-docs": "^2.4.0", - "highlight.js": "^9.12.0", + "highlight.js": "^9.15.5", "js-yaml": "^3.10.0", "lodash": "^4.17.10", "mdast-util-inject": "^1.1.0", @@ -3470,17 +3526,17 @@ } }, "documentation-theme-bespoke": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/documentation-theme-bespoke/-/documentation-theme-bespoke-0.5.2.tgz", - "integrity": "sha512-6wEQNR49hl92eWzXxyEfvYV6Rar2DanSmK/nZP+mz9r2FNW43Ak6StjUgZjaGcR8VtHEKQKfwz2yW7/8BdoNlw==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/documentation-theme-bespoke/-/documentation-theme-bespoke-0.5.5.tgz", + "integrity": "sha512-Fq3Cya3ET0mWmcZIAcfoMsQexw7Pv3xBhMkKMEpasp5BLtj1Xd1AyvJ5/H+1m8DvGLhbHzW08ChWDEqIxztFGw==", "dev": true, "requires": { - "@thebespokepixel/badges": "^1.0.5", + "@thebespokepixel/badges": "^1.0.6", "anchor-js": "^4.2.0", "concat-stream": "^2.0.0", - "documentation": "^9.2.0", + "documentation": "^9.3.0", "github-slugger": "^1.2.1", - "highlight.js": "^9.14.2", + "highlight.js": "^9.15.6", "lodash": "^4.17.11", "remark": "^10.0.1", "remark-heading-gap": "^3.1.0", @@ -3668,9 +3724,9 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "5.14.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.14.1.tgz", - "integrity": "sha512-CyUMbmsjxedx8B0mr79mNOqetvkbij/zrXnFeK2zc3pGRn3/tibjiNAv/3UxFEyfMDjh+ZqTrJrEGBFiGfD5Og==", + "version": "5.15.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.15.1.tgz", + "integrity": "sha512-NTcm6vQ+PTgN3UBsALw5BMhgO6i5EpIjQF/Xb5tIh3sk9QhrFafujUOczGz4J24JBlzWclSB9Vmx8d+9Z6bFCg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -3679,7 +3735,7 @@ "cross-spawn": "^6.0.5", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^4.0.0", + "eslint-scope": "^4.0.2", "eslint-utils": "^1.3.1", "eslint-visitor-keys": "^1.0.0", "espree": "^5.0.1", @@ -3939,9 +3995,9 @@ }, "dependencies": { "acorn": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.0.tgz", - "integrity": "sha512-MW/FjM+IvU9CgBzjO3UIPCE2pyEwUsoFl+VGdczOPEdxfGFjuKny/gN54mOuX7Qxmb9Rg9MCn2oKiSUeW+pjrw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", "dev": true }, "array-differ": { @@ -4213,194 +4269,27 @@ "safe-regex": "^2.0.1" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", - "dev": true, - "requires": { - "invert-kv": "^1.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "regexp-tree": { - "version": "0.0.86", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.0.86.tgz", - "integrity": "sha512-xjTX9GmRw7Nn2wxinLoqQXv9Dt5yerP7CJIsYe/5z5gFs0Ltu20wRuZophafi9sf0JpsdVtki5EuICRYpgB1AQ==", - "dev": true, - "requires": { - "cli-table3": "^0.5.0", - "colors": "^1.1.2", - "yargs": "^10.0.3" - } - }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, "safe-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.0.1.tgz", - "integrity": "sha512-4tbOl0xq/cxbhEhdvxKaCZgzwOKeqt2tnHc2OPBkMsVdZ0s0C5oJwI6voRI9XzPSzeN35PECDNDK946x4d/0eA==", - "dev": true, - "requires": { - "regexp-tree": "~0.0.85" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yargs": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-10.1.2.tgz", - "integrity": "sha512-ivSoxqBGYOqQVruxD35+EyCFDYNEFL/Uo6FcOnz+9xZdZzK0Zzw4r4KhbrME1Oo2gOggwJod2MnsdamSG7H9ig==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.1.1", - "find-up": "^2.1.0", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^8.1.0" - } - }, - "yargs-parser": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz", - "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.0.2.tgz", + "integrity": "sha512-rRALJT0mh4qVFIJ9HvfjKDN77F9vp7kltOpFFI/8e6oKyHFmmxz4aSkY/YVauRDe7U0RrHdw9Lsxdel3E19s0A==", "dev": true, "requires": { - "camelcase": "^4.1.0" + "regexp-tree": "~0.1.1" } } } }, "eslint-rule-docs": { - "version": "1.1.65", - "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.65.tgz", - "integrity": "sha512-ZcJgNUqOXSGosCL/l0KHo1FKVex/s8HATLkQnls/NCdYGULG6vX99jVmEoHL07aAP0mZnaM7pkwZDFjt/Mq2SQ==", + "version": "1.1.74", + "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.74.tgz", + "integrity": "sha512-lQhvoT+OcGs6YBS1tZ2rU7t8dUOlcGQpQltlw/ttM6CMwFI3cR6WZ4EMaBrGh/LrNo+yqwA4fec7Sm22fgbtsA==", "dev": true }, "eslint-scope": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz", - "integrity": "sha512-1G6UTDi7Jc1ELFwnR58HV4fK9OQK4S6N985f166xqXxpjU6plxFISJa2Ba9KCQuFa8RCnj/lSFJbHo7UFDBnUA==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.2.tgz", + "integrity": "sha512-5q1+B/ogmHl8+paxtOKx38Z8LtWkVGuNt3+GQNErqwLl6ViNp/gdJGMCjZNxZ8j/VYjDNZ2Fo+eQc1TAVPIzbg==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -4420,9 +4309,9 @@ "dev": true }, "esm": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.6.tgz", - "integrity": "sha512-3wWjSurKSczMzYyHiBih3VVEQYCoZa6nfsqqcM2Tx6KBAQAeor0SZUfAol+zeVUtESLygayOi2ZcMfYZy7MCsg==", + "version": "3.2.14", + "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.14.tgz", + "integrity": "sha512-uQq8DK0HB0n2Ze9gshhxGQa60caKmwNH7tKxALAT6wxYGfQCdEMXA3MV3z1rh8TSmQIVFYbltm9Xe1ghusnCqw==", "dev": true }, "espower-location-detector": { @@ -4449,9 +4338,9 @@ }, "dependencies": { "acorn": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.0.tgz", - "integrity": "sha512-MW/FjM+IvU9CgBzjO3UIPCE2pyEwUsoFl+VGdczOPEdxfGFjuKny/gN54mOuX7Qxmb9Rg9MCn2oKiSUeW+pjrw==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", "dev": true } } @@ -5472,14 +5361,17 @@ "dev": true }, "get-caller-file": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.1.tgz", - "integrity": "sha512-SpOZHfz845AH0wJYVuZk2jWDqFmu7Xubsx+ldIpwzy5pDUpu7OJHK7QYNSA2NPlDSKQwM1GFaAkciOWjjW92Sg==" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.4.tgz", + "integrity": "sha512-asZ7znBEyqkVHAjMI14GLeskxIJjn1Gplsvh1neaiHXgqRasKDR4uFnkMQXLMb7+0wn221u5vdY6QBkhgxkx0Q==", + "requires": { + "@types/node": "^11.10.5" + } }, "get-port": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-port/-/get-port-4.1.0.tgz", - "integrity": "sha512-4/fqAYrzrzOiqDrdeZRKXGdTGgbkfTEumGlNQPeP6Jy8w0PzN9mzeNQ3XgHaTNie8pQ3hOUkrwlZt2Fzk5H9mA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-4.2.0.tgz", + "integrity": "sha512-/b3jarXkH8KJoOMQc3uVGHASwGLPq3gSFJ7tgJm2diza+bydJPTGOibin2steecKeOylE8oY2JERlVWkAJO6yw==", "dev": true }, "get-set-props": { @@ -5982,14 +5874,13 @@ } }, "gulp-better-rollup": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/gulp-better-rollup/-/gulp-better-rollup-3.4.0.tgz", - "integrity": "sha512-x43aG/5jj26qJdfvvCFJ1R+w6oNEuiTxmxkTiq0Oh3jpO0DsoF6c4t0L7oyyNQ6avlDxPRj8QQF+Lwj6YAIPXQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/gulp-better-rollup/-/gulp-better-rollup-4.0.1.tgz", + "integrity": "sha512-oUGrMd+p9umBPoIPYVDxFT4EwCzywh3o8q++eswJyAxrRgYCEM6OOGGxJLG+AmzzjEoiq0cc/ndgF5SH2qW3Fg==", "dev": true, "requires": { "lodash.camelcase": "^4.3.0", "plugin-error": "^1.0.1", - "rollup": "^0.66.0", "vinyl": "^2.1.0", "vinyl-sourcemaps-apply": "^0.2.1" } @@ -6185,9 +6076,9 @@ "dev": true }, "highlight.js": { - "version": "9.14.2", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.14.2.tgz", - "integrity": "sha512-Nc6YNECYpxyJABGYJAyw7dBAYbXEuIzwzkqoJnwbc1nIpCiN+3ioYf0XrBnLiyyG0JLuJhpPtt2iTSbXiKLoyA==", + "version": "9.15.6", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.6.tgz", + "integrity": "sha512-zozTAWM1D6sozHo8kqhfYgsac+B+q0PmsjXeyDrYIHHcBN0zTVT66+s2GW1GZv7DbyaROdLXKdabwS/WqPyIdQ==", "dev": true }, "homedir-polyfill": { @@ -6637,15 +6528,15 @@ } }, "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.0.0.tgz", + "integrity": "sha512-m5dHHzpOXEiv18JEORttBO64UgTEypx99vCxQLjbBvGhOJxnTNglYoFXxwo6AbsQb79sqqycQEHv2hWkHZAijA==", "dev": true }, "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.0.0.tgz", + "integrity": "sha512-6Vz5Gc9s/sDA3JBVu0FzWufm8xaBsqy1zn8Q6gmvGP6nSDMw78aS4poBNeatWjaRpTpxxLn1WOndAiOlk+qY8A==", "dev": true, "requires": { "is-path-inside": "^1.0.0" @@ -6837,9 +6728,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz", - "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==", + "version": "3.12.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.2.tgz", + "integrity": "sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -7154,9 +7045,9 @@ } }, "luxon": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.11.3.tgz", - "integrity": "sha512-/0jMa+JfTRBx1ixsSBs5ZPAQ32H+TPeP9BvgRf0Gi4VxCqhUpRNWagwupy6wA8MckazneKWBLCcwwAH8hkQamg==" + "version": "1.11.4", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.11.4.tgz", + "integrity": "sha512-zTQ1DCShOGHIdNpa56yjDpUCowKDsBqeFVuEG2XBcrAM2udxN0g3N5RTZzbw94OkDiBgECsuDgLNnQTo73yghw==" }, "magic-string": { "version": "0.25.2", @@ -7688,9 +7579,9 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "node-releases": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.8.tgz", - "integrity": "sha512-gQm+K9mGCiT/NXHy+V/ZZS1N/LOaGGqRAAJJs3X9Ah1g+CIbRcBgNyoNYQ+SEtcyAtB9KqDruu+fF7nWjsqRaA==", + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.10.tgz", + "integrity": "sha512-KbUPCpfoBvb3oBkej9+nrU0/7xPlVhmhhUJ1PZqwIP5/1dJkRWKWD3OONjo6M2J7tSCBtDCumLwwqeI+DWWaLQ==", "dev": true, "requires": { "semver": "^5.3.0" @@ -8973,14 +8864,14 @@ } }, "ora": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-3.1.0.tgz", - "integrity": "sha512-vRBPaNCclUi8pUxRF/G8+5qEQkc6EgzKK1G2ZNJUIGu088Un5qIxFXeDgymvPRM9nmrcUOGzQgS1Vmtz+NtlMw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ora/-/ora-3.2.0.tgz", + "integrity": "sha512-XHMZA5WieCbtg+tu0uPF8CjvwQdNzKCX6BVh3N6GFsEXH40mTk5dsw/ya1lBTUGJslcEFJFQ8cBhOgkkZXQtMA==", "dev": true, "requires": { "chalk": "^2.4.2", "cli-cursor": "^2.1.0", - "cli-spinners": "^1.3.1", + "cli-spinners": "^2.0.0", "log-symbols": "^2.2.0", "strip-ansi": "^5.0.0", "wcwidth": "^1.0.1" @@ -9063,9 +8954,9 @@ "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==" }, "p-limit": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.1.0.tgz", - "integrity": "sha512-NhURkNcrVB+8hNfLuysU8enY5xn2KXphsHBaC2YmRNTZRc7RWusw6apSpdEj3jo4CMb6W9nrF6tTnsJsJeyu6g==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", "requires": { "p-try": "^2.0.0" } @@ -9079,9 +8970,9 @@ } }, "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.0.0.tgz", + "integrity": "sha512-GO107XdrSUmtHxVoi60qc9tUl/KkNKm+X2CF4P9amalpGxv5YqVPJNfSb0wcA+syCopkZvYYIzW8OVTQW59x/w==", "dev": true }, "p-try": { @@ -9130,9 +9021,9 @@ } }, "parse-entities": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.0.tgz", - "integrity": "sha512-XXtDdOPLSB0sHecbEapQi6/58U/ODj/KWfIXmmMCJF/eRn8laX6LZbOyioMoETOOJoWRW8/qTSl5VQkUIfKM5g==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.1.tgz", + "integrity": "sha512-NBWYLQm1KSoDKk7GAHyioLTvCZ5QjdH/ASBBQTD3iLiAWJXS5bg1jEWI8nIJ+vgVvsceBVBcDGRWSo0KVQBvvg==", "dev": true, "requires": { "character-entities": "^1.0.0", @@ -9294,57 +9185,26 @@ } }, "pkg-conf": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", - "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.0.0.tgz", + "integrity": "sha512-YOvV9hWNY9+abaZdgaZs4eyTzfeO1bwEYCYRskER2aP5ZWZAdrb/8YeOo95mb6tr01MR9ZUGArl1sMy2At/YWQ==", "dev": true, "requires": { - "find-up": "^2.0.0", - "load-json-file": "^4.0.0" + "find-up": "^3.0.0", + "load-json-file": "^5.2.0" }, "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "load-json-file": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.2.0.tgz", + "integrity": "sha512-HvjIlM2Y/RDHk1X6i4sGgaMTrAsnNrgQCJtuf5PEhbOV6MCJuMVZLMdlJRE0JGLMkF7b6O5zs9LcDxKIUt9CbQ==", "dev": true, "requires": { - "p-limit": "^1.1.0" + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true } } }, @@ -9683,9 +9543,9 @@ "dev": true }, "regenerate-unicode-properties": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz", - "integrity": "sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.0.1.tgz", + "integrity": "sha512-HTjMafphaH5d5QDHuwW8Me6Hbc/GhXg8luNqTkPVwZ/oCZhnoifjWhGYsu2BzepMELTlbnoVcXvV0f+2uDDvoQ==", "dev": true, "requires": { "regenerate": "^1.4.0" @@ -9723,17 +9583,17 @@ "dev": true }, "regexpu-core": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.4.0.tgz", - "integrity": "sha512-eDDWElbwwI3K0Lo6CqbQbA6FwgtCz4kYTarrri1okfkRLZAqstU+B3voZBCjg8Fl6iq0gXrJG6MvRgLthfvgOA==", + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.3.tgz", + "integrity": "sha512-LON8666bTAlViVEPXMv65ZqiaR3rMNLz36PIaQ7D+er5snu93k0peR7FSvO0QteYbZ3GOkvfHKbGr/B1xDu9FA==", "dev": true, "requires": { "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^7.0.0", + "regenerate-unicode-properties": "^8.0.1", "regjsgen": "^0.5.0", "regjsparser": "^0.6.0", "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.0.2" + "unicode-match-property-value-ecmascript": "^1.1.0" } }, "registry-auth-token": { @@ -10095,13 +9955,22 @@ } }, "rollup": { - "version": "0.66.6", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.66.6.tgz", - "integrity": "sha512-J7/SWanrcb83vfIHqa8+aVVGzy457GcjA6GVZEnD0x2u4OnOd0Q1pCrEoNe8yLwM6z6LZP02zBT2uW0yh5TqOw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.6.0.tgz", + "integrity": "sha512-qu9iWyuiOxAuBM8cAwLuqPclYdarIpayrkfQB7aTGTiyYPbvx+qVF33sIznfq4bxZCiytQux/FvZieUBAXivCw==", "dev": true, "requires": { "@types/estree": "0.0.39", - "@types/node": "*" + "@types/node": "^11.9.5", + "acorn": "^6.1.1" + }, + "dependencies": { + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + } } }, "rollup-plugin-babel": { @@ -10666,13 +10535,13 @@ "dev": true }, "string-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.0.0.tgz", - "integrity": "sha512-rr8CUxBbvOZDUvc5lNIJ+OC1nPVpz+Siw9VBtUjB9b6jZehZLFt0JMCZzShFHIsI8cbhm0EsNIfWJMFV3cu3Ew==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.0.0" + "strip-ansi": "^5.1.0" } }, "string_decoder": { @@ -10697,11 +10566,11 @@ } }, "strip-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", - "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.1.0.tgz", + "integrity": "sha512-TjxrkPONqO2Z8QDCpeE2j6n0M6EwxzyDgzEeGp+FbdvaJAt//ClYi6W5my+3ROlC/hZX2KACUwDfK49Ka5eDvg==", "requires": { - "ansi-regex": "^4.0.0" + "ansi-regex": "^4.1.0" } }, "strip-bom": { @@ -11072,22 +10941,22 @@ "dev": true }, "trucolor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/trucolor/-/trucolor-1.0.1.tgz", - "integrity": "sha512-TQ83BCGkE0moS3YvlJBQa+8YogJZ5jvoBU470Fyk8pgUvM8+05PEcVdCB4fVjdg76kdnCISdHAF2mwcIr3M3CQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/trucolor/-/trucolor-1.0.2.tgz", + "integrity": "sha512-ZLDBO+jFoG8imCwkPll9SI1bOElvDWiQ9eEiWZ5iLICjtCn/4Aed+yzbOMmGzik23ewFzC2HFP07I2rA+QT5lw==", "requires": { - "@thebespokepixel/es-tinycolor": "^1.0.3", - "@thebespokepixel/meta": "^1.0.1", - "@thebespokepixel/string": "^0.5.5", + "@thebespokepixel/es-tinycolor": "^1.0.4", + "@thebespokepixel/meta": "^1.0.2", + "@thebespokepixel/string": "^0.5.6", "color-convert": "^2.0.0", "common-tags": "^1.8.0", "escape-string-regexp": "^1.0.5", "lodash": "^4.17.10", - "sgr-composer": "^1.0.1", - "term-ng": "^1.0.1", - "truwrap": "^1.0.0", + "sgr-composer": "^1.0.2", + "term-ng": "^1.0.2", + "truwrap": "^1.0.2", "update-notifier": "^2.5.0", - "verbosity": "^1.0.0", + "verbosity": "^1.0.2", "yargs": "^13.2.1" }, "dependencies": { @@ -11107,13 +10976,13 @@ } }, "truwrap": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/truwrap/-/truwrap-1.0.1.tgz", - "integrity": "sha512-JOVg9HLcvtzx75/SHie/UHTmUr45MjQtiBRTIsV9Mpy4YkLTp/BVCnxc9uHWx21OxM1gFfF68uKgEFTjisra6Q==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/truwrap/-/truwrap-1.0.2.tgz", + "integrity": "sha512-JdK7u2/Azcyzj69QUQoD31mOlosH/VfEWchwp9XN+5eeG2VscAaGxqeMAwG4HJ3gz3cSncKFzdEF+WccEraiVw==", "requires": { - "@thebespokepixel/meta": "^1.0.1", - "@thebespokepixel/n-selector": "^1.0.1", - "@thebespokepixel/string": "^0.5.5", + "@thebespokepixel/meta": "^1.0.2", + "@thebespokepixel/n-selector": "^1.0.2", + "@thebespokepixel/string": "^0.5.6", "ansi-regex": "^4.0.0", "columnify": "^1.5.4", "common-tags": "^1.8.0", @@ -11123,10 +10992,10 @@ "lodash": "^4.17.11", "os-locale": "^3.1.0", "read-pkg-up": "^4.0.0", - "term-ng": "^1.0.1", - "trucolor": "^1.0.0", + "term-ng": "^1.0.2", + "trucolor": "^1.0.1", "update-notifier": "^2.5.0", - "verbosity": "^1.0.1", + "verbosity": "^1.0.2", "yargs": "^13.2.1" } }, @@ -11213,15 +11082,15 @@ } }, "unicode-match-property-value-ecmascript": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz", - "integrity": "sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", + "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==", "dev": true }, "unicode-property-aliases-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz", - "integrity": "sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", + "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==", "dev": true }, "unified": { @@ -11425,9 +11294,9 @@ "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=" }, "upath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.1.tgz", + "integrity": "sha512-D0yetkpIOKiZQquxjM2Syvy48Y1DbZ0SWxgsZiwd9GCWRpc75vN8ytzem14WDSg+oiX6+Qt31FpiS/ExODCrLg==", "dev": true }, "update-notifier": { @@ -11572,15 +11441,15 @@ "dev": true }, "verbosity": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/verbosity/-/verbosity-1.0.1.tgz", - "integrity": "sha512-LyYAwr27caPMoBevnvhg0EAY04nxGskJZH/Reg4ezesXxkVhIsXRqpzDJdalvVioyeBK43p9ID0JI69cd/F1sw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/verbosity/-/verbosity-1.0.2.tgz", + "integrity": "sha512-YOeIdDTLPgTfniQderMN81bQNjG7ZvEiW/HU+vFkJGvbWXW1o5dFzr+hVWAPgckA7J6D9zF1TFBJDz+xCP0z3Q==", "requires": { - "@thebespokepixel/meta": "^1.0.1", - "@thebespokepixel/time": "^0.5.2", + "@thebespokepixel/meta": "^1.0.2", + "@thebespokepixel/time": "^0.5.3", "chalk": "^2.4.2", "sparkles": "^1.0.1", - "term-ng": "^1.0.1" + "term-ng": "^1.0.2" } }, "vfile": { @@ -11754,9 +11623,9 @@ } }, "vue-template-compiler": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.7.tgz", - "integrity": "sha512-ZjxJLr6Lw2gj6aQGKwBWTxVNNd28/qggIdwvr5ushrUHUvqgbHD0xusOVP2yRxT4pX3wRIJ2LfxjgFT41dEtoQ==", + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.8.tgz", + "integrity": "sha512-SwWKANE5ee+oJg+dEJmsdxsxWYICPsNwk68+1AFjOS8l0O/Yz2845afuJtFqf3UjS/vXG7ECsPeHHEAD65Cjng==", "dev": true, "requires": { "de-indent": "^1.0.2", @@ -12007,12 +11876,22 @@ "xo-init": "^0.7.0" }, "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, "globby": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-9.0.0.tgz", - "integrity": "sha512-q0qiO/p1w/yJ0hk8V9x1UXlgsXUxlGd0AHUOXZVXBO6aznDtpx7M8D1kBrCAItoPm+4l8r6ATXV1JpjY2SBQOw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-9.1.0.tgz", + "integrity": "sha512-VtYjhHr7ncls724Of5W6Kaahz0ag7dB4G62/2HsN+xEKG6SrPzM1AJMerGxQTwJGnN9reeyxdvXbuZYpfssCvg==", "dev": true, "requires": { + "@types/glob": "^7.1.1", "array-union": "^1.0.2", "dir-glob": "^2.2.1", "fast-glob": "^2.2.6", @@ -12028,12 +11907,56 @@ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, + "pkg-conf": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", + "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "load-json-file": "^4.0.0" + } + }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -12145,9 +12068,9 @@ "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" }, "yargs": { - "version": "13.2.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.1.tgz", - "integrity": "sha512-HgY0xHGmPPakg6kEDufqxZuXVtvPZcipORC8O7S44iEnwsUmP+qnhReHc6d1dyeIZkrPmYFblh45Z2oeDn++fQ==", + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", + "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==", "requires": { "cliui": "^4.0.0", "find-up": "^3.0.0", diff --git a/package.json b/package.json index 3d2e7bf..ab485de 100644 --- a/package.json +++ b/package.json @@ -52,13 +52,14 @@ "devDependencies": { "@babel/core": "^7.3.3", "@babel/preset-env": "^7.3.1", - "ava": "^1.2.1", + "ava": "^1.3.1", "documentation-theme-bespoke": "^0.5.2", "gulp": "^4.0.0", - "gulp-better-rollup": "^3.4.0", + "gulp-better-rollup": "^4.0.1", "gulp-rename": "^1.4.0", "gulp-strip-comments": "^2.5.2", "nyc": "^13.3.0", + "rollup": "^1.6.0", "rollup-plugin-babel": "^4.3.2", "rollup-plugin-commonjs": "^9.2.1", "rollup-plugin-node-resolve": "^4.0.1", diff --git a/readme.md b/readme.md index 66fcb3b..8429ef0 100644 --- a/readme.md +++ b/readme.md @@ -46,13 +46,13 @@ const console = createConsole({ console.log('Works like normal...') console.debug('...but now controllable.') -console.verbosity(3) +console.verbosity(3) // Use numbered levels 5 (debug) to 1 (error) console.debug('...this isn’t printed now.') console.canWrite(5) && console.dir({print: 'this won’t.'}) -console.verbosity(5) +console.verbosity('debug') // Use named levels [debug, info, log, warning, error] console.canWrite(5) && console.dir({print: 'this will now.'}) ``` diff --git a/src/docs/example.md b/src/docs/example.md index e7fd812..111189b 100644 --- a/src/docs/example.md +++ b/src/docs/example.md @@ -26,13 +26,13 @@ const console = createConsole({ console.log('Works like normal...') console.debug('...but now controllable.') -console.verbosity(3) +console.verbosity(3) // Use numbered levels 5 (debug) to 1 (error) console.debug('...this isn’t printed now.') console.canWrite(5) && console.dir({print: 'this won’t.'}) -console.verbosity(5) +console.verbosity('debug') // Use named levels [debug, info, log, warning, error] console.canWrite(5) && console.dir({print: 'this will now.'}) ``` diff --git a/src/lib/verbosity.class.js b/src/lib/verbosity.class.js index 7f7a857..ffc53aa 100644 --- a/src/lib/verbosity.class.js +++ b/src/lib/verbosity.class.js @@ -25,6 +25,7 @@ const {Console} = console * 5: Debug * @param {String} options.timestamp - Timestamp format. * @param {String} options.namespace - Sparkles namespace to emit events to. + * @param {Boolean} options.global - Should changes to verbosity be made globally? * @param {String} options.prefix - Logging message prefix. * @return {Verbosity} Verbosity's console object. */ @@ -32,9 +33,10 @@ export default class Verbosity extends Console { constructor({ outStream, errorStream, - verbosity, + verbosity = 3, timestamp, namespace, + global = true, prefix } = {}) { const sOut = (ws => { @@ -55,6 +57,7 @@ export default class Verbosity extends Console { super(sOut, sErr) this.willEmit = Boolean(namespace) + this.globalControl = Boolean(global) this.timeFormatter = (ts => ts ? () => `[${chalk.dim(bespokeTimeFormat(ts))}] ` : @@ -68,20 +71,32 @@ export default class Verbosity extends Console { this._stdout = sOut this._stderr = sErr - this.threshold = verbosity ? verbosity : 3 + this.threshold = verbosity + this.globalVerbosityController = this.globalControl && sparkles('verbosityGlobal') this.emitter = this.willEmit && sparkles(namespace) this.matrix = matrix(sOut, sErr) + + this.globalVerbosityController.on('level', ({level}) => { + this.threshold = level + }) } /** * Set the current verbosity. - * @param {Number} level - The current level (0 to 5). + * @param {Number|String} level - The current level (0 to 5) or level name. * @return {Number} The current verboseness (0 to 5). */ verbosity(level) { - level = (typeof level === 'string') ? this.matrix[level] : level - if (level < 6) { - this.threshold = level + if (level) { + level = (typeof level === 'string') ? this.matrix[level].level : level + + if (level < 6) { + this.threshold = level + } + + if (this.globalControl) { + this.globalVerbosityController.emit('level', {level}) + } } return this.threshold diff --git a/test/arguments.js b/test/arguments.js index 628190e..18258ee 100644 --- a/test/arguments.js +++ b/test/arguments.js @@ -1,5 +1,3 @@ -'use strict' - import stream from 'stream' import test from 'ava' import {createConsole} from '..' diff --git a/test/builtin.js b/test/builtin.js index ffefafd..004e782 100644 --- a/test/builtin.js +++ b/test/builtin.js @@ -1,5 +1,3 @@ -'use strict' - import stream from 'stream' import test from 'ava' import {createConsole} from '..' diff --git a/test/global.js b/test/global.js new file mode 100644 index 0000000..839a69b --- /dev/null +++ b/test/global.js @@ -0,0 +1,48 @@ +import stream from 'stream' +import test from 'ava' +import {createConsole} from '..' + +const StreamProxy1 = new stream.PassThrough() +StreamProxy1.setEncoding('utf8') + +const StreamProxy2 = new stream.PassThrough() +StreamProxy2.setEncoding('utf8') + +test('Set verbosity 1 on one instance and globally affects another', t => { + const testConsole1 = createConsole({outStream: StreamProxy1}) + const testConsole2 = createConsole({outStream: StreamProxy2}) + testConsole1.verbosity(1) + t.is(testConsole2.verbosity(), 1) +}) + +test('Set verbosity 2 on one instance and globally affects another', t => { + const testConsole1 = createConsole({outStream: StreamProxy1}) + const testConsole2 = createConsole({outStream: StreamProxy2}) + testConsole1.verbosity(2) + t.is(testConsole2.verbosity(), 2) +}) + +test('Set verbosity 3 on one instance and globally affects another', t => { + const testConsole1 = createConsole({outStream: StreamProxy1}) + const testConsole2 = createConsole({outStream: StreamProxy2}) + testConsole1.verbosity(3) + t.is(testConsole2.verbosity(), 3) +}) + +test('Set verbosity 3 on one instance mutes debug output on another', t => { + const testConsole1 = createConsole({outStream: StreamProxy1}) + const testConsole2 = createConsole({outStream: StreamProxy2}) + testConsole1.verbosity(3) + testConsole2.debug('testing') + const result = StreamProxy2.read() + t.is(result, null) +}) + +test('Set verbosity 5 on one instance allows info output on another', t => { + const testConsole1 = createConsole({outStream: StreamProxy1}) + const testConsole2 = createConsole({outStream: StreamProxy2}) + testConsole1.verbosity(5) + testConsole2.info('testing') + const result = StreamProxy2.read() + t.is(result, 'testing\n') +}) diff --git a/test/logging.js b/test/logging.js index a9b779b..e944708 100644 --- a/test/logging.js +++ b/test/logging.js @@ -1,4 +1,3 @@ -'use strict' import stream from 'stream' import test from 'ava' import {createConsole} from '..' @@ -71,14 +70,17 @@ const levels = [{ critical: logbold('Damn you Chell, not again.', 'red', 'CRITICAL: ', true) }] -function runSuite(title_, console_, stamp_ = '') { - let targetLevel = 5 - levels.forEach(suite => { - console_.verbosity(targetLevel) +function runSuite( + title_, + console_, + levels_ = [5, 4, 3, 2, 1], + stamp_ = '') { + levels.forEach((suite, index) => { + console_.verbosity(levels_[index]) Object.keys(suite).forEach(level => { console_[level](suite[level].src) const result = StreamProxy.read() - test(`${title_} @ ${targetLevel}, Level: ${level}: ${['-', stamp_ + suite[level].raw][0 | suite[level].willRead]}`, t => { + test(`${title_} @ ${levels_[index]}, Level: ${level}: ${['-', stamp_ + suite[level].raw][0 | suite[level].willRead]}`, t => { if (suite[level].willRead) { t.deepEqual(`${stamp_}${suite[level].dest}`, result) } else { @@ -86,7 +88,6 @@ function runSuite(title_, console_, stamp_ = '') { } }) }) - targetLevel-- }) } @@ -95,8 +96,15 @@ runSuite( createConsole({outStream: StreamProxy}) ) +runSuite( + 'Named', + createConsole({outStream: StreamProxy}), + ['debug', 'info', 'log', 'warn', 'error'] +) + runSuite( 'Timestamp', createConsole({outStream: StreamProxy, timestamp: 'XX:XX:XX'}), + undefined, `[${chalk.dim('XX:XX:XX')}] ` ) diff --git a/test/module.js b/test/module.js index 094951c..fa0bca6 100644 --- a/test/module.js +++ b/test/module.js @@ -1,5 +1,3 @@ -'use strict' - import stream from 'stream' import test from 'ava' import {createConsole, getVersion, Verbosity} from '..' @@ -8,11 +6,11 @@ import pkg from '../package' const StreamProxy = new stream.PassThrough() StreamProxy.setEncoding('utf8') -test(`Module version is '${pkg.version}'.`, t => { +test(`Module version is '${pkg.version}'`, t => { t.is(`${pkg.version}`, getVersion()) }) -test(`Module long version is '${pkg.name} v${pkg.version}'.`, t => { +test(`Module long version is '${pkg.name} v${pkg.version}'`, t => { t.is(`${pkg.name} v${pkg.version}`, getVersion(2)) }) diff --git a/test/obejcts.js b/test/obejcts.js index 2854b2a..38780f6 100644 --- a/test/obejcts.js +++ b/test/obejcts.js @@ -1,6 +1,4 @@ /* eslint quotes:0 */ -'use strict' - import stream from 'stream' import test from 'ava' import {createConsole} from '..'