diff --git a/.gitignore b/.gitignore deleted file mode 100644 index daf2bea..0000000 --- a/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -dist -node_modules -ulog.min.js -ulog.lazy.min.js -.nyc_output -full.min.js diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2197832..0000000 --- a/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "node" diff --git a/CNAME b/CNAME deleted file mode 100644 index 3463618..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -ulog.js.org \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 62023db..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2021 Stijn de Witt - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index eac39ed..0000000 --- a/README.md +++ /dev/null @@ -1,999 +0,0 @@ -# ulog v2.0.0-beta.19 -### The Universal Logger - -[![npm](https://img.shields.io/npm/v/ulog.svg)](https://npmjs.com/package/ulog) -[![license](https://img.shields.io/npm/l/ulog.svg)](https://opensource.org/licenses/MIT) -[![travis](https://img.shields.io/travis/Download/ulog.svg)](https://travis-ci.org/Download/ulog) -![mind BLOWN](https://img.shields.io/badge/mind-BLOWN-ff69b4.svg) - -. - -![logo](https://unpkg.com/ulog@2.0.0-beta.19/ulog.png) - - -## The logger for javascript applications - -`ulog` is *the* logger for Javascript applications. It's universal, meaning it runs everywhere. You can use `ulog` in your Express server application running on Node JS just as well as in your React single page application running in the browser. It just works. - -![screenshot](https://unpkg.com/ulog@2.0.0-beta.19/screenshot.jpg) - - -## Features - -Ulog marries the feature sets from [`debug`](https://npmjs.com/package/debug) and [`loglevel`](https://npmjs.com/package/loglevel) and adds some of it's own! - -| Feature |   debug   | loglevel |   ulog   | -| ------------------------------------------- | ------------------- | ------------------- | ------------------ | -| [Footprint](#footprint) | 3.2 kB | 1.4 kB | 2.7 kB | -| [Debug mode](#debug-mode) | ✓ | ✓ (1) | ✓ | -| [Levels](#levels) | | ✓ | ✓ | -| [Configurable](#configure) | ✓ | ✓ (2) | ✓ | -| [Dynamic config](#dynamic-config) | | | ✓ | -| [Channels](#channels) | | | ✓ | -| [Outputs](#outputs) | | | ✓ | -| [Custom outputs](#custom-outputs) | | | ✓ | -| [Formatting](#formatting) | ✓ | | ✓ | -| [Preserves callstack](#preserves-callstack) | | ✓ | ✓ | -| [Configurable format](#configurable-format) | | | ✓ | -| [Custom formats](#custom-formats) | | | ✓ | -| [Colors](#colors) | ✓ | | ✓ | -| [Alignment](#alignment) | | | ✓ | -| [Add-ons / Mods](#mods) | | ✓ | ✓ | -| [Lazy loading](#lazy-loading) | | | ✓ | -| [Anylogger support](#anylogger-support) | ✓ (3) | ✓ (3) | ✓ | - -(1) emulated with levels -(2) in browser only -(3) via an adapter - -## Try it - -Have a look at the interactive -tutorial. It's the -fastest way to get a quick taste of `ulog`. - - -## Compare it - -Want to check how `ulog` measures up to it's competitors? Check out these -loggers side-by-side: - -* [`ulog` vs `debug`](https://ulog.js.org/vs/debug.html) -* [`ulog` vs `loglevel`](https://ulog.js.org/vs/loglevel.html) - - -## Install - -```sh -npm i -S anylogger ulog -``` - -### Add to entry point -In the entry point of your application import `ulog`: - -*index.js* -```js -import "ulog" -``` - - -## Use - -In your code, import `anylogger` and use it to create loggers and do logging: - -```js -import anylogger from 'anylogger' -const log = anylogger('my-app') -log('Logging is easy!') -``` - -This way, your code is decoupled from `ulog` and if you ever want to switch to another logging library, you will be able to do so without having to change any of that code. - -##### Anylogger support -> [`anylogger`](https://npmjs.com/package/anylogger) is a logging facade that -> allows code to use logging without getting coupled to a specific logging -> system. You can use that code with any logging system out there. `ulog` has -> anylogger support built in. For other loggers, adapters are available. - - -## The logger for libraries - -When we write a library, we install `ulog` as a development dependency so the library remains decoupled from `ulog`. - -### Install ulog as a dev dependency - -Install `anylogger` as a regular dependency and `ulog` as a dev dependency: - -```sh -npm install --save anylogger && npm install --save-dev ulog -``` - -In our tests: - -*test.js* -```js -import `ulog` -``` - -In our library code: - -*my-lib.js* -```js -import anylogger -const log = anylogger('my-lib') -log('Logging is easy') -``` - - -## Script tag - -If you want, you can import `ulog` with a script tag: - -```html - - - - -``` -*myscript.js* -```js -var log = anylogger('my-module') -log('Logging is easy!') -``` - -## Download - -If you want the file for the browser to include in your project yourself, you -can download it from here. - -* [ulog.min.js](https://unpkg.com/ulog@2.0.0-beta.19/ulog.min.js) (~2.7kB minified and gzipped) -* [ulog.lazy.min.js](https://unpkg.com/ulog@2.0.0-beta.19/ulog.lazy.min.js) (~4.3kB minified and gzipped) - -> `ulog.min.js` lazy loads `ulog.lazy.min.js` on demand, so make sure to include both files in your download - -* [full.min.js](https://unpkg.com/ulog@2.0.0-beta.19/full.min.js) (~5.6kB minified and gzipped) - -> Full bundle, no lazy loading - -I recommend to use a bundler instead. Loading lots of script tags is -inefficient and hard to manage. Also see the section on -[lazy loading with webpack](#lazy-loading-with-webpack) - - -## Why `ulog` - -The two most popular logging libraries on NPM at the moment are [`debug`](https://npmjs.com/package/debug) and [`loglevel`](https://npmjs.com/package/loglevel). They are both great loggers, but neither of them completely satisfied my requirements for a logging library. - -`debug` allows for namespaced debug logging, where each logger has a name. Whether these loggers output debug logging is configurable, though not dynamic, requiring a restart before changes take effect. It's simplicity makes `debug` an excellent choice for debug logging (as it's name implies), but it lacks support for log levels, so if you want to log error messages for example, you end up needing another library for that. It offers nicely formatted (and even colored!) log messages, but because of that mangles the call stack, which is a huge downside in the browser imho. It's not very extensible, basically being a monolith. - -`loglevel` also supports namespaced logging and it does offer log levels. It's configurable via localStorage but not via environment variables and just like `debug` requires a restart before configuration changes take effect. By default, it leaves your call stack alone, making the filename/line number entries in the browser console that much more useful. It does not offer alternative log destinations or formatters out of the box. It can be extended via plugins and there are some good plugins out there, but it's base feature set is coded as a monolith, so you cannot easily remove features. You probably won't have to though as it weighs only 1.4kB. - -Both these loggers lack the ability to configure the logger from the querystring, which I found to be a very desirable feature for web development as it allows you to create a URL that has the log config embedded, which you can then send to other developers or users etc. E.g: `https://example.com/page?log=debug`. - -What I want is a logging library that combines the best aspects of both these loggers and adds the features that I miss in both. -`ulog` is my attempt at building this library. It's base API is compatible with that of `debug` and `loglevel` and with the console, making it a drop-in replacement for all of these in many cases. It has a configuration mechanism that is compatible with that of `debug`, but that is more powerful and is monitored for changes at runtime. It accepts configuration from the querystring allowing you to craft URLs with log config embedded in it. It has powerful, configurable formatting included by default and it does this without mangling the call stack, so the filename/line number entries in the browser console remain unharmed. You can specify where the log output should go and where it should drain. It's completely modular, so you can not only easily add features through 'mods', but you can actually even drop features you don't need by not loading the mods those features are in. It has native `anylogger` support, decoupling the client code from the logger. And it supports lazy loading so we can get all those great features without bloating our bundle. - -I hope you will give `ulog` a try. If you have feedback on it, or found an issue, please let me know on the [issue tracker](https://github.com/download/ulog/issues). - - -## API - -`ulog` is very natural to use: - -```js -var log = require('anylogger')('my-module') // same as with `debug` -log('A log message') // same as with `debug` -log('info', 'An info message') // not possible with `debug` -log('warn', 'A warning message') // not possible with `debug` -log.info('Starting...') // same as with `loglevel` or console -log.log('Yeah!') // same as with console -log.error('Something went wrong', new Error('Oh no!')) -if (log.enabledFor('warn')) { - log.warn(expensiveArguments()) -} -``` -> Note that in the code above, we import `anylogger` and not `ulog`. This way the client code is decoupled from the logger. - -`ulog` inherits it's API from `anylogger`. If you are able to restrict yourself to the [Anylogger API](https://www.npmjs.com/package/anylogger#anylogger-api), your code will be framework independent and will work with any supported logging library. - -Note that any logging code written for either `debug`, `loglevel` or the console should be able to do it's logging just like it did before, but now using a `ulog` logger instead. This backward compatibility should make migrating from any of these to `ulog` very easy. And because this is just the `anylogger` API, you should even be able to migrate back to `debug` or `loglevel` without any changes at all, by just including the right adapter in your entry point. Of course once you get used to `ulog`, you will never want to go back! :p - - -## Levels - -`anylogger` defines 6 logging levels, which correspond with the natively available -logging functions on the console. `ulog` creates constants for these levels on all loggers: - -```js -log.ERROR // 1 -log.WARN // 2 -log.INFO // 3 -log.LOG // 4 -log.DEBUG // 5 -log.TRACE // 6 -``` - -In addition, `ulog` adds constants for pseudo-levels that enable or completely disable all logging: - -```js -log.ALL // 7 -log.NONE // 0 -``` - -### `log.enabledFor` - -`anylogger` defines `log.enabledFor` and `ulog` implements it by checking the logger's current log level and whether it's in debug mode. Normally, you should not have to use this method, unless you are doing some expensive calculations only to write log output. In such a case you can write: - -```js -import anylogger from 'anylogger' -const log = anylogger('my-app') -if (log.enabledFor('info')) { - log.info(calculateResults()) -} -``` - -### `log.level` - -`ulog` adds a property `level` to each logger that is a numeric representation of the current log level. - -```js -if (log.level >= log.INFO) { - log.info('This message will be logged') -} -log.level = log.WARN -log.info('This info message will NOT be logged.') -log.warn('This warning message WILL be logged.') -log.level = log.NONE -log.error('Logging is completely disabled.') -``` - -> In general, code should not set the log level directly, but instead should rely on the host environment for the log level. See the section on [configuring ulog](#configure). - -> To check the log level, `enabledFor` is preferred over the `level` property as it is within the `anylogger` API. - -### Default log level - -I've found that it makes sense to have different default log levels in the -browser and in Node. In Node, logging is often the only UI we have available -and we (the devs/admins) are the only ones that will see that logging. -In the browser, we have an alternative UI (the webpage itself), so -logging will be less useful for normal users. - -#### In Node -In Node, the log level defaults to `info`. This allows you to use -`info`, `warn` and `error` when informing the user of stuff that happened. - -#### In the browser -In the browser the log level defaults to `warn`. This means `info` -messages will be excluded, but for most users these messages won't be -relevant anyway. - -> Attention! Chromium-based browsers have their own level filter and by default, debug messages are filtered away. - - -## Footprint - -When we support logging with some logging library, we add code to our -application that many users don't actually need. There are techniques to remove -this code from our production builds, but they sacrifice logging with it. In -many scenarios we actually do want logging in the production builds. To assist -support personel in diagnosing user problems for example. So it's beneficial if -the minimum amount of code we need to load to support logging is small. This -minimum amount of code we call the *footprint*. `ulog` keeps its footprint -small by utilizing [lazy loading](#lazy-loading). - - -## Debug mode - -Debug mode is a feature that `ulog` copied from `debug` and it responds to the -same [config option](#config_option_debug). Setting a logger to debug mode -effectively means forcing it's log level to be at least debug: - -```sh -DEBUG=my:app -``` - -```js -import anylogger from 'anylogger' -const log = anylogger('my-app') -log('Hi!') // is output because logger is in debug mode -``` - -## Channels - -In `ulog`, logging is always sent to exactly one channel. By default, -two channels exist: `output`, for messages of loggers that are in -debug mode, or that are at an enabled level, and `drain`, for those -messages that are filtered away. - -By using a separate channel for the drain, we can override the default behavior -of using noops for all log levels that are outside of the active levels. We -could for example send *all* logging to a database and only later filter it, -when we display it for example. - -A channel has one or more configurable [outputs](#outputs) that can optionally -apply [formatting](#formatting) to the message. - - -## Outputs - -In `ulog`, where messages are going is completely configurable at runtime. -You can even configure where discarded messages are going. - -By default all log methods on a logger are associated with one of two channels, -`output` and `drain`. To configure the outputs for these channels, two -config options are available: - -* [config option `log_output`](#config-option-log_output), defaults to `'console'` -* [config option `log_drain`](#config-option-log_drain), defaults to `'drain'` - -When the logger is created, each log method is sent either to the `output` -channel, or to the `drain` channel, based on the current log level for that -logger and whether that logger is in debug mode. - -To configure the output for a logger, we assign the name of the output to use -to the relevant logger: - -```sh -log_output=console -``` - -This setting can include expressions to target individual loggers, just like -the `debug` and `log` settings: - -```sh -log_output=console;noisy-lib:*=noop -``` - -The value part is actually a kurly format string. The same syntax can be used -here as for [configuring formatting](#configuring-formatting). If more than -one output is specified, a multiplex function will be inserted that dispatches -the logging to all specified outputs. - -By default, the following outputs are included: - -### Output `console` - -This actually is the native console object. Using the native console directly is -what allows us to leave the call stack intact in the browser developer tools. - -### Output `noop` - -This is just an object with a noop `log` function - -### Custom outputs - -The default outputs are not very special, but the entire machinery is in place for -you to easily add any custom outputs you could ever need. You can define additional -outputs by making `ulog` use a mod with an `outputs` key: - -*index.js* -```js -import ulog from 'ulog' -ulog.use({ - outputs: { - custom: { - log: function(){ - var args = [].slice.call(arguments) - args.shift('Custom!!') - console.log.apply(console, args) - }, - info: function(){ - var args = [].slice.call(arguments) - args.shift('Custom!!') - console.info.apply(console, args) - } - } - } -}) -``` - -An output can either be an object with `log`, `info`, `warn` etc methods as shown -above, or a [kurly](https://npmjs.com/package/kurly) tag: - -*index.js* -```js -import ulog from 'ulog' -ulog.use({ - outputs: { - custom: function(ctx){ - return function(rec) { - rec.message.shift('Custom!!') - console[rec.level].apply(console, rec.message) - } - }} - } -}) -``` - -This way you can add outputs that send log messages to memory, a file, localStorage, a database etc etc. - - -## Formatting - -Formatting is another feature that separates `ulog` from `debug` and -`loglevel`. `debug` has formatting, but it is hardcoded and messes up the -callstack and there is not much you can do about it. `loglevel` does not mess -up the callstack, but it also has no formatting at all out of the box. - -Ulog uses [kurly](https://npmjs.com/package/kurly) to support advanced, -configurable and customizable formatting, [without mangling the callstack](#preserves-callstack). - -### Configurable format - -The actual format used is configurable easily via `ulog`'s powerful -configuration mechanism. - -The default format string on Node is: - -```sh -lvl name:20 message perf -``` - -This sacrifices the callstack for a colored and formatted `message` and having -the `perf` measurements after the message i.s.o before it. The Node JS doesn't -output any file name / line number information anyway. - -On browsers, we want to spare the call stack, so there the default is: - -```sh -lvl name perf -``` - -We don't include the `message`, but it will be appended as the last argument -automatically. The result is nicely formatted messages with the file name / -line number entries in the browser debug console intact. - -To override the default format, just set -[config option `log_format`](#config-option-log_format) to the format you want. - -Formats available out of the box include: - -* [Format `cr`](#format-cr) -* [Format `date`](#format-date) -* [Format `lvl`](#format-lvl) -* [Format `message`](#format-message) -* [Format `name`](#format-name) -* [Format `perf`](#format-perf) -* [Format `time`](#format-time) -* [Fallback format](#fallback-format) - - -### Format syntax - -`ulog` uses the new [options](https://www.npmjs.com/package/kurly/v/2.0.0-beta.2#options) -in `kurly` v2 to make tag open/close markers optional and enable nicer looking format -strings. This means that `lvl name perf` and `{lvl} {name} {perf}` are -equivalent. When using no open/close markers, any non-identifier symbols -following the tag name are considered nested text. For example for the format -string `name:22`, the `name` format will receive `':22'` as `ctx.text`. This -allows for parameterized formats, as `ulog` has done to support -[padding options](#padding-options). - -### Preserves callstack - -`ulog`'s formatting system has the unique (1) ability to do -formatting while [preserving the callstack](#preserves-callstack). As long as -only [static kurly tags](https://www.npmjs.com/package/kurly/v/2.0.0-beta.2#static-tags) -are used as formats, the call stack can remain unharmed. - -> (1) I do not know of any other logger out there that has this feature, but if -> you do know one, please let me know in the -> [issue tracker](https://github.com/download/ulog/issues) - -### Included formats - -Except for the `message` format, all included formats are static. - -#### Format `cr` -Prints a 'carriage return line feed' - -#### Format `date` -Prints the date the message was logged as `yyyy/MM/dd`. - -#### Format `lvl` -Prints the level of the message as a single character: -* `'x'` for error messages -* `'!'` for warning messages -* `'i'` for info messages -* `'-'` for log messages -* `'>'` for debug messages -* `'}'` for trace messages - -#### Format `message` -Prints the message, formatted and colored. -Using this format breaks the callstack as it is dynamic. - -#### Format `name` -Prints the logger name - -#### Format `perf` -Prints the time difference between two invocations to the same logger, only if this difference is larger than 1ms. Produces output that looks like `+62ms`. - -#### Format `time` -Prints the time the message was logged as `hh:mm`. - -#### Fallback format -Any unrecognized tags are being interpreted by the fallback format. This just -returns the field on the log record whose name matches. For example suppose -we'd write `level`. This is an unrecognized tag so the wildcard formatter is -used, which just returns the `level` field from the log record. If no field -on the log record matches, it returns the original text unchanged, making -`'Hello World!'` a valid format string. - -#### Padding options -All included formats support some padding options. For example, to pad out the -logger names to 16 characters and align the text on the left, use `name<16` or -`name:16`. To align the text on the right, use `name>16`. - -### Custom formats - -`ulog`'s formatting system is easily extendable by adding -[kurly tags](https://www.npmjs.com/package/kurly#tags) to a key `formats` -under a mod: - -```js -import ulog from 'ulog' -import formats from 'ulog/mods/formats' -ulog.use({ - use: [ formats ], - formats: { - custom: (ctx) => (rec) => (['custom'].concat(rec.message)), - random: (ctx, rec) => () => Math.random() - } -}) -``` - -These tags then become available in the format string. - -> We used two different signatures here, because there are two types of formats. - -### Types of formats - -Formats come in two flavors: - -#### Dynamic formats -Dynamic formats have full access to the message. But they do mess up the call stack. A dynamic format has this signature: - -```js -ulog.use({ - use: [ require('ulog/mods/formats') ], - formats: { - dynamicFormat: function(ctx) { - // one-time init here - return function(rec) { - // rec.message contains full message - return /* ... */ - } - } - } -}) -``` - -#### Static formats -Static formats do not have access to the message. But they do not break the call stack! So prefer static formats if possible. - -Static formats have this signature: - -```js -ulog.use({ - use: [ require('ulog/mods/formats') ], - formats: { - staticFormat: function(ctx, rec) { - // one-time init here - return function(){ - // rec.message is undefined - // rec.name, rec.level etc is populated - return /* ... */ - } - } - } -}) -``` - -To read more about kurly and custom kurly tags, refer to the kurly documentation on [creating kurly tags](https://www.npmjs.com/package/kurly#creating-tags) - - -## Colors - -Who doesn't like some colors?! Apart from making things prettier, when used -correctly they can actually also make our logs *easier* to read. Now I don't -know about you, but I find reading logs hard, so I'll take all the help I can -get! - -If you don't want colors, you can suppress them using -[config option `log_color`](#config-option-log_color). - - -## Alignment - -Browsers have great debug consoles these days. They even include stacktrace -info for higher-level messages. But they did mess one thing up imho; the -messages at these higher levels are indented a bit more than the other -messages, making the logging harder to read. This can be clearly seen in the -screenshot from `ulog` v2.0.0-beta-11, which did not yet have alignment: - -![screenshot](https://unpkg.com/ulog@2.0.0-beta.19/screenshot-beta.11.jpg) - -`ulog` now automatically adds some formatting that negates the extra indentation -the messages at these higher levels get, so all messages are nicely aligned: - -![screenshot](https://unpkg.com/ulog@2.0.0-beta.19/screenshot.jpg) - -You can control alignment with [config option `log_align`](#config-option-log_align). - - -## Configure - -`ulog` features a simple, yet powerful and flexible configuration mechanism. On -Node JS, we can configure `ulog` via program arguments, environment variables -or a configuration file. On browsers, we use querystring arguments or -localStorage. On both platforms, the configuration is monitored and changes to -it are picked up by `ulog` at runtime without the need to restart the -application. - -`ulog`'s configuration mechanism is an extension to that of -[`debug`](https://npmjs.com/package/debug) and is compatible with it. `debug` -is one of the most popular logging packages in the NPM ecosystem, with tens of -thousands of packages depending on it, so having `ulog`'s configuration -mechanism be compatible with it makes for a very smooth migration path. If your -app or library is currently using `debug`, you should be able to replace it -with `ulog` with no or only minor changes. - -We configure `ulog` by adjusting configuration options. - -* [`log`](#config_option_log): The main setting to control logger's levels with -* [`debug`](#config_option_debug): For compatibility with `debug` -* [`log_config`](#config_option_log_config): To specify the configuration file (Node JS only) -* [`log_output`](#config_option_log_output): To configure where logging should go -* [`log_drain`](#config_option_log_drain): To configure where logs should drain -* [`log_format`](#config_option_log_format): To configure the format for log messages -* [`log_color`](#config_option_log_color): To enable or disable colors -* [`log_align`](#config_option_log_align): To enable or disable alignment - -### Log configuration syntax - -`debug` has a simple but powerful configuration mechanism. You set an environment variable or localStorage option named `DEBUG` and you assign it a value that expresses which loggers to enable. E.g.: - -```sh -DEBUG=test,my:*,-my:lib -``` -The format is basically a comma-separated list of logger names, using the asterisk as a wildcard character and optionally negating the expression by preceding it with a minus sign. So the expression above includes `test` and `my:*` loggers, except for `my:lib` which is excluded. - -`ulog` extends this configuration mechanism. With `debug`, you can only turn loggers on and off, but `ulog` allows for a much more varied range of options. This is achieved by extending the configuration syntax so it also accepts the value applicable for the loggers matching the expression. Also we allow a semicolon-separated list of such expression=value pairs. For example, to set the logger `test` to debug and `my:*` loggers except for `my:lib` to info, we could write: - -```sh -log=test=debug;my:*,-my:lib=info -``` - -If an option only contains a value, `ulog` implicitly adds `*` as the expression. So we can write: -```sh -log=info -``` -and it's equivalent to -```sh -log=*=info -``` -We can even combine this. So we could write: -```sh -log=info;my:*=debug -``` -and it will set the level for all loggers to info, except for the ones starting with `my:`, which are set to debug. - -A special case is the config option [debug](#config_option_debug), which is designed to be compatible with `debug` so code using `ulog` will react to that setting in the same way. - -Most of the config options support this syntax. - -### Via program arguments - -On Node JS we can pass log configuration options as program arguments: - -```sh -node ./myapp log=debug -``` -This should be helpful when making CLI applications. These strongly rely on console messages, but are also often used in scripted setups where we would actually want to suppress that logging. Don't go and build in all kinds of custom methods to configure the logging but just use `ulog` and rely on it's powerful configuration mechanism instead. - -### Via environment variables - -On Node JS we can pass log configuration options via environment variables: - -```sh -log=debug node ./myapp -``` - -### Via a config file - -On Node JS we can place our log configuration in a file that will be read at startup and monitored for changes at runtime: - -*./log.config* - -``` -log=debug -``` - -### Via querystring parameters - -In browsers, we can pass log configuration options as querystring parameters in the URL: - -``` -https://example.com/page?log=debug -``` - -### Via localStorage - -In browsers, we can place our log configuration in localStorage and it will be read at startup and monitored for changes at runtime: - -```js -localStorage.setItem('log', 'debug') -``` - -### Dynamic config - -`ulog`'s configuration mechanism watches the configuration for changes while -the program is running and reacts to them in real-time. No more restarting your -application just to change some log level! On Node JS, `ulog` watches a -configuration file. Use -[Config option `log_format`](#config-option-log_format) to specify the -location. In browsers, `ulog` monitors `localStorage` for changes. - - -### Config option `log` - -Configure the levels loggers should be filtered at. - -```sh -log=test=debug;my:*,-my:lib=info -``` - -### Config option `debug` - -Enables debug mode for the selected loggers. - -```sh -debug=test,my:*,-my:lib -``` -This option is compatible with that of `debug`. - -### Config option `log_config` - -Specify the path to the log configuration file, absolute or relative to the current working directory. Node JS only. Default to `./log.config`. This option does not support expressions. - -```sh -log_config=./my.log.config -``` - -### Config option `log_output` - -Specify the name of the output logs should be written to. Defaults to `'console'`. - -```sh -log_output=my:*,-my:lib=console -``` - -### Config option `log_drain` - -Specify the name of the output logs should be drained to. Defaults to `noop`. -When log messages are filtered out, they are sent to the drain instead of to the normal output. The default `noop` output is just a noop, but you could override this to send them to a separate file for example. - -```sh -log_drain=my:*,-my:lib=noop -``` - -### Config option `log_format` - -Specify the format to use. Defaults to `lvl name:22 message perf` on Node JS and `lvl name perf` on browsers. - -```sh -log_format=lvl name perf message;my:*=lvl name perf -``` -This sets `lvl name perf message` as the default format, while assigning a different format string to all loggers starting with `my:`. - -For more details, refer to the [section on formatting](#formatting) - - -### Config option `log_color` - -Specify whether colors should be enabled. Defaults to `on`. - -```sh -log_color=off -``` - -### Config option `log_align` - -Specify whether messages should be aligned. Defaults to `on`. - -```sh -log_align=off -``` - - -## Mods - -`ulog` is completely modular, consisting of a microscopically small core and a -whole bunch of mods. The mods are small pieces of functionality, designed to -be usable stand-alone or in combination with each other. All functionality that -`ulog` adds to `anylogger`, it adds in the form of mods. All, except for the -ability to add mods itself, in the form of method `ulog.use`, that is in core. - -To add a mod, call `ulog.use` with either an individual mod - -```js -ulog.use({ - // an empty mod -}) -``` - -or with an array of mods: - -```js -ulog.use([ - { /* a mod */ }, - { /* another mod */ }, -]) -``` - -A mod is an object that can define many things declaratively: - -* That it extends some core functionality -* That it uses other mods -* That it adds settings -* That it adds properties to loggers -* That it adds outputs / formats / other components -* That it watches some config option - -As an example, here is a mod that does most of these things: - -```js -var boolean = require('ulog/mods/props/boolean') - -ulog.use({ - use: [ require('./some/mod/we/use') ], - extend: { someProp: 'addedToUlog' }, - settings: { - cool: { - config: 'log_cool' - prop: boolean(), - } - }, - outputs: { - file: { - log: function(){ - console.info.apply(console, ['file'].concat([].slice.call(arguments))) - } - } - }, - formats: { - random: function(ctx, rec){ - return function(){ - return Math.random() - } - } - }, - watch: { - 'debug': function(){ - console.info('debug setting changed') - } - } -}) -``` - -Interestingly, most of these features of mods are being added by mods. For -example the ability to add settings is added by the `settings` mod. Studying -the way `ulog`'s featureset is built from mods by reading the source code of -the included mods is the best way to learn about writing mods for now. - - -## Lazy loading - -`ulog` being built with mods makes it easy to use lazy loading to reduce the -minimum [footprint](#footprint). If you use ulog from a [script tag](#script-tag) -(not recommended), you can get it for free. Otherwise, you have to configure -your bundler to code-split. - -### Lazy-loading with Webpack - -Have a look at [ulog.bundle.js](https://github.com/Download/ulog/blob/master/ulog.bundle.js) -for an example of doing lazy loading with [Webpack](https://webpack.js.org/). - -Basically it only loads `ulog/base` and then configures a watch that loads the -remaining mods on-demand. It's using Webpack-specific API `require.ensure` for -this. Other bundlers support it in similar ways. - -```js -var ulog = require('ulog/base') - -// add a mod to ulog to load logging on-demand -ulog.use({ - watch: { - // watch for changes in these config keys - 'debug,log': - // when changes happen, load the other mods if needed - function(){ - // webpack specific API to lazy load modules - require.ensure( - // ensure these modules are loaded - [ 'ulog/mods/lazy' ], - // then execute this function, notice require being overridden - function(require){ - // use the overridden require to lazy load the modules - if (ulog.use(require('ulog/mods/lazy'))) { - // re-initialize the loggers if mods were added - ulog.ext() - } - }, - 'ulog.lazy' // chunkname webpack will use: ulog.lazy.min.js - ) - }, - } -}) -``` - -If you have successfully lazy-loaded `ulog` with other bundlers, please drop a -comment in the [issue tracker](https://github.com/ulog/issues), or create a -PR to add a section about it here in the README. - - -## Decoupling code from `debug` - -As I said before, `debug` is excellent for debug logging and there are tens of thousands of packages using it. The downside of this is that you will more or less get `debug` shoved through your throat if you include any of these libraries because they are *tighly coupled* to it. But we can uncouple them with the magic of bundlers like Webpack. - -To replace `debug` with `anylogger` everywhere, you can use this Webpack alias to make all modules that use `debug` switch to `anylogger` instead: - -```js -{ - resolve: { - alias: { - 'debug': 'anylogger' - } - } -} -``` - -This works because the anylogger API is backwards compatible with that of `debug`. And because `ulog` has native `anylogger` support, once you import `ulog` in your entry point, all those libraries that were using `debug` start to use `ulog` automagically! - - -## Performance considerations - -By default, the logging methods on the `log` object that correspond to a log level -which is higher than the currently set level, are replaced by no-op methods. As such, -you generally don't have to worry about the performance overhead of leaving -the log statements in the production code. There is one exception to this rule -though. If preparing the message itself is a costly operation, you may want to -surround the log code with an `if (log.enabledFor(level))` statement: - -```js -if (log.enabledFor('info')) { - var message = doLotsOfWorkToGenerateLogMessage(); - log.info(message); -} -``` - - -## Issues - -Add an issue in the [issue tracker](https://github.com/download/ulog/issues) -to let me know of any problems you find, or questions you may have. - - -## Credits - -Credits go to: -* Felix Geisendörfer from [debuggable.com](http://debuggable.com/) for kindly - giving up the `ulog` namespace on NPM. Thanks Felix! -* TJ Holowaychuk for creating [debug](https://npmjs.com/package/debug), - which was a great inspiration for ulog. -* Tim Perry for creating [loglevel](https://npmjs.com/package/loglevel), - which was another great inspiration for ulog. -* Community members [Jakub Jirutka](https://github.com/jirutka) and - [Alex Kesling](https://github.com/akesling) for making code contributions. - - -## Copyright - -Copyright 2021 by [Stijn de Witt](https://stijndewitt.com). - - -## License - -Licensed under the [MIT](https://opensource.org/licenses/MIT) Open Source license. diff --git a/base.js b/base.js deleted file mode 100644 index 1d7d99a..0000000 --- a/base.js +++ /dev/null @@ -1,3 +0,0 @@ -(module.exports = require('./core')).use( - require('./mods/config') -) \ No newline at end of file diff --git a/build.js b/build.js deleted file mode 100644 index 01585c5..0000000 --- a/build.js +++ /dev/null @@ -1,92 +0,0 @@ -var fs = require('fs') -var path = require('path') - -var gzipSize = require('gzip-size') -// be cool and use ulog to print the logging in the build of ulog :) -var ulog = require('./') -var log = ulog('ulog:build') - -var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8')) -var v = pkg.version - -;(function(){ - var file = path.resolve(__dirname, pkg.unpkg) - log('Reading ' + file) - data = fs.readFileSync(file, 'utf8') - log('Estimating gzipped size') - var gzip = (gzipSize.sync(data) / 1024).toFixed(1) - log.info(`${pkg.unpkg} (~${(data.length / 1024).toFixed(1)} kB, ${gzip} kB gzipped)`) - - file = path.resolve(__dirname, 'ulog.lazy.min.js') - log('Reading ' + file) - data = fs.readFileSync(file, 'utf8') - log('Estimating gzipped size') - var lazy = (gzipSize.sync(data) / 1024).toFixed(1) - log.info(`ulog.lazy.min.js (~${(data.length / 1024).toFixed(1)} kB, ${lazy} kB gzipped)`) - - file = path.resolve(__dirname, 'full.min.js') - log('Reading ' + file) - data = fs.readFileSync(file, 'utf8') - log('Estimating gzipped size') - var full = (gzipSize.sync(data) / 1024).toFixed(1) - log.info(`full.min.js (~${(data.length / 1024).toFixed(1)} kB, ${full} kB gzipped)`) - - file = path.resolve(__dirname, 'README.md') - log(`Reading ${file}`) - data = fs.readFileSync(file, 'utf-8') - log(`Updating version to ${v} and gzip size to ${gzip}...`) - data = data.replace(/ulog@\d(\d)?\.\d(\d)?\.\d(\d)?(-[a-z]+\.\d(\d)?)?/g, `ulog@${v}`) - data = data.replace(/\\v\d(\d)?\.\d(\d)?\.\d(\d)?(-[a-z]+\.\d(\d)?)?/g, `v${v}`) - data = data.replace(/ulog@\d(\d)?\.\d(\d)?\.\d(\d)?(-[a-z]+\.\d(\d)?)?\/ulog.min.js\) \(~\d\.\dkB/g, `ulog@${v}/ulog.min.js) (~${gzip}kB`) - data = data.replace(/ulog@\d(\d)?\.\d(\d)?\.\d(\d)?(-[a-z]+\.\d(\d)?)?\/ulog.lazy.min.js\) \(~\d\.\dkB/g, `ulog@${v}/ulog.lazy.min.js) (~${lazy}kB`) - data = data.replace(/ulog@\d(\d)?\.\d(\d)?\.\d(\d)?(-[a-z]+\.\d(\d)?)?\/full.min.js\) \(~\d\.\dkB/g, `ulog@${v}/full.min.js) (~${full}kB`) - log(`Writing ${file}`) - fs.writeFileSync(file, data, 'utf8') - log.info(`README.md (~${(data.length / 1024).toFixed(1)} kB)`) - - file = path.resolve(__dirname, 'tutorial', 'index.html') - log(`Reading ${file}`) - data = fs.readFileSync(file, 'utf-8') - data = data.replace(/ulog@\d(\d)?\.\d(\d)?\.\d(\d)?(-[a-z]+\.\d(\d)?)?/g, `ulog@${v}`) - log(`Writing ${file}`) - fs.writeFileSync(file, data, 'utf8') - log.info(`tutorial/index.html (~${(data.length / 1024).toFixed(1)} kB)`) - - file = path.resolve(__dirname, 'vs', 'debug.html') - log(`Reading ${file}`) - data = fs.readFileSync(file, 'utf-8') - data = data.replace(/ulog@\d(\d)?\.\d(\d)?\.\d(\d)?(-[a-z]+\.\d(\d)?)?/g, `ulog@${v}`) - log(`Writing ${file}`) - fs.writeFileSync(file, data, 'utf8') - log.info(`vs/debug.html (~${(data.length / 1024).toFixed(1)} kB)`) - - ulog('a:one').debug('A debug message') - ulog('a:two').debug('A debug message') - ulog('a:three').debug('A debug message') - ulog('a:four').debug('A debug message') - ulog('a:five').debug('A debug message') - ulog('b:one').log('A log message') - ulog('b:two').log('A log message') - ulog('b:three').log('A log message') - ulog('b:four').log('A log message') - ulog('b:five').log('A log message') - ulog('c:one').info('An info message') - ulog('c:two').info('An info message') - ulog('c:three').info('An info message') - ulog('c:four').info('An info message') - ulog('c:five').info('An info message') - ulog('d:one').warn('A warn message') - ulog('d:two').warn('A warn message') - ulog('d:three').warn('A warn message') - ulog('d:four').warn('A warn message') - ulog('d:five').warn('A warn message') - ulog('e:one').error('An error message') - ulog('e:two').error('An error message') - ulog('e:three').error('An error message') - ulog('e:four').error('An error message') - ulog('e:five').error('An error message') - ulog('ulog').error('An error message') - setTimeout(function(){ - log('A delayed message') - }, 1250) -})() \ No newline at end of file diff --git a/core/grab.js b/core/grab.js deleted file mode 100644 index d82b231..0000000 --- a/core/grab.js +++ /dev/null @@ -1,13 +0,0 @@ -var merge = require('./merge') - -module.exports = function(ulog, name, result) { - ulog.mods.reduce(function(r,mod){ - if (Array.isArray(r) && (name in mod)) { - r.push(mod[name]) - } else { - merge(r, mod[name]) - } - return r - }, result) - return result -} diff --git a/core/index.js b/core/index.js deleted file mode 100644 index f23e54b..0000000 --- a/core/index.js +++ /dev/null @@ -1,112 +0,0 @@ -var ulog = require('anylogger') -var grab = require('./grab') - -var ext = ulog.ext - -/** - * `ulog.ext(logger) => logger` - * - * Called when a logger needs to be extended, either because it was newly - * created, or because it's configuration or settings changed in some way. - * - * This method must ensure that a log method is available on the logger - * for each level in `ulog.levels`. - * - * This override calls `ext` on all mods when a logger is extended and - * enables calling ext on all loggers by passing no arguments. - */ -ulog.ext = function(logger) { - if (logger) { - ext(logger) - grab(ulog, 'ext', []).map(function(ext){ - ext.call(ulog, logger) - }) - grab(ulog, 'after', []).map(function(ext){ - ext.call(ulog, logger) - }) - return logger - } else { - for (logger in ulog()) { - ulog.ext(ulog(logger)) - } - } -} - -ulog.mods = [] - -/** - * ### `ulog.use(mod: Object|Array): Number` - * - * Makes ulog use `mod`. - * - * The mod(s) is/are added to `ulog.mods`. This function checks whether `mod` - * is already in use and only adds it if needed. Checks whether `mod` has a key - * `use` containing mods `mod` depends on and adding those first, guaranteeing - * the order in which mods are added. Returns the total number of mods added, - * including transitive dependencies. - * - * @param mod A single mod object or an array of mod objects. - * @returns The number of mods that were added - * - * E.g.: - * ``` - * var mod = require('./mod') - * var solo = {} // the simplest mod is just an empty object - * var using = { - * // you can declare a dependency on other mods - * use: [ - * mod - * ] - * } - * - * ulog.add(solo) // returns 1 - * ulog.add(solo) // returns 0, because mods are only added once - * ulog.add(using) // returns 2, because `using` depends on `mod` - * ulog.add(mod) // returns 0, because `mod` was already added by `using` - * ``` - */ -ulog.use = function(mod) { - // handle mod being an array of mods - if (Array.isArray(mod)) { - return mod.reduce(function(r,mod){return r + ulog.use(mod)}, 0) - } - // // handle mod being a single mod - var result = ulog.mods.indexOf(mod) === -1 ? 1 : 0 - if (result) { - if (mod.use) { - // use dependencies - result += ulog.use(mod.use) - } - if (mod.extend) { - for (var name in mod.extend) { - ulog[name] = mod.extend[name] - } - } - ulog.mods.push(mod) - if (mod.init) { - mod.init.call(ulog) - } - } - return result -} - -// ulog.grab = function(name){ -// return ulog.mods.reduce(function(r,mod){ -// for (var o in mod[name]) { -// r[o] = mod[name][o] -// } -// return r -// }, {}) -// } - -// var recorders = [] -// for (var i=0,mod; mod=ulog.mods[i]; i++) { -// if (mod.record) recorders.push(mod.record) -// } - - -// ulog.enabled = ulog.get.bind(ulog, 'debug') -// ulog.enable = ulog.set.bind(ulog, 'debug') -// ulog.disable = ulog.set.bind(ulog, 'debug', undefined) - -module.exports = ulog diff --git a/core/merge.js b/core/merge.js deleted file mode 100644 index fb69cb8..0000000 --- a/core/merge.js +++ /dev/null @@ -1,14 +0,0 @@ -var merge = module.exports = function(result, obj) { - for (var o in obj) { - if ((typeof obj[o] == 'object') && (Object.getPrototypeOf(obj[o]) === Object.prototype)) { - if (! (o in result)) result[o] = {} - if ((typeof result[o] == 'object') && (Object.getPrototypeOf(obj[o]) === Object.prototype)) { - merge(result[o], obj[o]) - } else { - result[o] = obj[o] - } - } else { - result[o] = obj[o] - } - } -} diff --git a/core/parse.js b/core/parse.js deleted file mode 100644 index b91f5ed..0000000 --- a/core/parse.js +++ /dev/null @@ -1,118 +0,0 @@ -"lvl name:22 date:yy/mm/dd perf" - -"console file:./log.output url:https://deze-auto-kopen.nl component:( with nested components )" - - -function parse(str) { - var tag, result = [] - if (str || (str === '')) { - while (tag = nextTag(str)) { - var before = str.substring(0, tag.index) - if (before) result.push(before) - result.push({ - name: tag.name, - text: tag.text, - ast: parse(tag.text) - }) - str = str.substring(tag.end + 1) - } - if (str) result.push(str) - } - return result -} - -function nextTag(str) { - var match = str.match(/\{[_a-zA-Z][_a-zA-Z0-9]*([^_a-zA-Z0-9].*)?\}/) - var result - if (match) { - var name = match[1] ? match[0].substring(1, match[0].indexOf(match[1])) : match[0].substring(1, match[0].indexOf('}')) - result = { name: name, index: match.index, end: -1, text: '' } - // loop through the string, parsing it as we go through it - var esc = false - var open=1 // we already found one open brace - for (var i=match.index+name.length+1; i} ast An abstract syntax tree created with `parse` - * @param {Object} tags An object of tags keyed by tag name - * @param {Function} parent Optionally, a compiled parent function for the ast - * - * @returns An array, possibly empty but never null or undefined. - */ -function compile(ast, tags, parent) { - if (process.env.NODE_ENV != 'production') { - log.debug('compile', ast, tags, parent) - if ((ast === undefined) || (ast === null)) throw new Error('parameter `ast` is required') - if (! Array.isArray(ast)) throw new Error('parameter `ast` must be an array') - if ((tags === undefined) || (tags === null)) throw new Error('parameter `tags` is required') - if (typeof tags != 'object') throw new Error('parameter `tags` must be an object') - } - - // recursively compile the ast - var nodes = ast.map(function(n){ - return typeof n == 'string' - ? n : - compile(n.ast, tags, - tags[n.name] ? tags[n.name](n) : - tags['*'] ? tags['*'](n) : - undefined - ) - }) - - // create the result function - var result = function(rec) { - // clone rec into res - var res = {} - for (k in rec) res[k] = rec[k] - // get the result children - res.children = nodes.reduce(function(r, n){ - if (typeof n == 'function') n = n(rec) - r.push.apply(r, Array.isArray(n) ? n : [n]) - return r - }, []) - // invoke parent if we have it - return parent ? parent(res) : res.children - } - if (process.env.NODE_ENV != 'production') { - log('compile', ast, tags, parent, '=>', '[Function]') - } - return result; -} - - diff --git a/core/test.js b/core/test.js deleted file mode 100644 index c371c8f..0000000 --- a/core/test.js +++ /dev/null @@ -1,136 +0,0 @@ -var test = require('tape') -var sinon = require('sinon'); - -var ulog = require('./') - -test('ulog(name?: String, options?: Object): Object|Function', function(t) { - t.equal(typeof ulog, 'function', 'is a function') - t.ok('mods' in ulog, 'has a property `mods`') - t.equal(typeof ulog.ext, 'function', 'has a method `ext()`') - t.equal(typeof ulog.use, 'function', 'has a method `use()`') - t.equal(typeof ulog('test'), 'function', 'returns a Logger when called with a name as argument') - t.ok(typeof ulog() === 'object' && ('test' in ulog()), 'returns an object containing entries for all loggers when called without arguments') - delete ulog().test - - t.test('ulog.mods', function(t){ - t.ok(Array.isArray(ulog.mods), 'is an array') - t.end() - }) - - t.test('ulog.ext(logger: Function): Function', function(t){ - var mod = { ext: sinon.stub() } - ulog.use(mod) - var logger = ulog('test') - t.equal(mod.ext.callCount, 1, 'calls the `ext` handler on all registered mods') - delete ulog().test - ulog.mods.splice(0, ulog.mods.length) - t.end() - }) - - t.test('ulog.use(mod: Object|Array): Number', function (t) { - var mod = {} - var result = ulog.use(mod) - t.equal(ulog.mods.indexOf(mod), 0, 'adds single mods to `ulog.mods`') - t.equal(result, 1, 'returns 1 to indicate a single mod was added') - var result = ulog.use(mod) - t.equal(ulog.mods.length, 1, 'does not add the same mod twice') - t.equal(result, 0, 'returns 0 to indicate no mods were added') - ulog.mods.splice(0, ulog.mods.length) - - var anotherMod = {} - result = ulog.use([ mod, anotherMod ]) - t.equal(ulog.mods.length, 2, 'adds arrays with mods to `ulog.mods`') - t.equal(result, 2, 'returns 2 to indicate two mods were added') - ulog.mods.splice(0, ulog.mods.length) - - var dependency = {} - var modWithDeps = { - use: [ dependency ] - } - result = ulog.use(modWithDeps) - t.equal(ulog.mods.length, 2, 'adds dependencies for mods that have a `use` property') - t.equal(ulog.mods.indexOf(dependency), 0, 'adds dependencies before dependants') - t.equal(result, 2, 'returns 2 to indicate two mods were added') - ulog.mods.splice(0, ulog.mods.length) - - var modWithExtensions = { - extend: { - test: 'test' - } - } - ulog.use(modWithExtensions) - t.equal(ulog.test, 'test', 'extends ulog for mods that have a `extend` property') - ulog.mods.splice(0, ulog.mods.length) - - // ulog.add('mods', { stub: { add: sinon.stub() } }) - // t.equal(ulog.mods.stub.add.callCount, 1, 'when adding a mod with an `add()` method, that method is called') - // ulog.add('whatever', { c:'component', b:'another', a:'yet another' }) - // t.equal(ulog.mods.stub.add.callCount, 2, 'when adding components, mods with an `add()` method are called') - // delete ulog.whatever - // delete ulog.mods.stub - t.end() - }) - - // t.test('ulog.set(name: String, value: String)', function (t) { - // var mod = { set: sinon.spy() } - // ulog.add(mod) - - // ulog.set('whatever', 'test') - // t.ok(mod.set.called, 'calls set on all registered mods') - - // ulog.mods.splice(0, ulog.mods.length) - // t.end() - // }) - - // t.test('ulog.get(name: String, loggerName: String)', function (t) { - // var mod = { get: sinon.spy() } - // ulog.add(mod) - - // ulog.get('whatever') - // t.ok(mod.get.called, 'calls get on all registered mods') - - // ulog.mods.splice(0, ulog.mods.length) - // t.end() - // }) - - t.end() -}) - -// test('Logger(level?: String = \'log\', ...args)', function(t) { -// var log = ulog('test') -// t.equal(typeof log, 'function', 'is a function') -// t.equal(log.name, 'test', 'has a property `name` that matches the given `name`') -// t.equal(typeof log.error, 'function', 'has a method `error()`') -// t.equal(typeof log.warn, 'function', 'has a method `warn()`') -// t.equal(typeof log.info, 'function', 'has a method `info()`') -// t.equal(typeof log.log, 'function', 'has a method `log()`') -// t.equal(typeof log.debug, 'function', 'has a method `debug()`') -// t.equal(typeof log.trace, 'function', 'has a method `trace()`') -// var sandbox = sinon.createSandbox() -// sandbox.stub(log, 'error') -// sandbox.stub(log, 'warn') -// sandbox.stub(log, 'info') -// sandbox.stub(log, 'log') -// sandbox.stub(log, 'debug') -// sandbox.stub(log, 'trace') -// try { -// log('a log message') -// t.equal(log.log.callCount, 1, 'when called without a level name as first argument, calls Logger.log()') -// log('error', 'an error message') -// t.equal(log.error.callCount, 1, 'when called with \'error\' as first argument, calls Logger.error()') -// log('warn', 'a warning message') -// t.equal(log.warn.callCount, 1, 'when called with \'warn\' as first argument, calls Logger.warn()') -// log('info', 'an info message') -// t.equal(log.info.callCount, 1, 'when called with \'info\' as first argument, calls Logger.info()') -// log('log', 'a log message') -// t.equal(log.log.callCount, 2, 'when called with \'log\' as first argument, calls Logger.log()') -// log('debug', 'a debug message') -// t.equal(log.debug.callCount, 1, 'when called with \'debug\' as first argument, calls Logger.debug()') -// log('trace', 'a trace message') -// t.equal(log.trace.callCount, 1, 'when called with \'trace\' as first argument, calls Logger.trace()') -// } -// finally { -// sandbox.restore() -// } -// t.end() -// }) diff --git a/full.bundle.js b/full.bundle.js deleted file mode 100644 index 3589bc8..0000000 --- a/full.bundle.js +++ /dev/null @@ -1,14 +0,0 @@ -// ulog - the universal logger -// © 2021 by Stijn de Witt -// License: MIT - -// full.bundle.js => full.min.js -// this is the bundled version of ulog, for use as an old-fashioned script-include -// bundlers and node will use ulog.js directly -// the full bundle is basically just ulog, without any lazy loading -// for lazy loading support, use ulog.min.js - -// just making sure both ulog and anylogger are available as globals in the script version -module.exports = self.ulog = self.anylogger = require('./ulog') - -// ....aaand we're done already :) \ No newline at end of file diff --git a/mods/align/index.js b/mods/align/index.js deleted file mode 100644 index 1b61a0d..0000000 --- a/mods/align/index.js +++ /dev/null @@ -1,18 +0,0 @@ -// var grab = require('../../core/grab') -// var palette = require('./utils').palette -// var levels = require('./utils').levels - -var boolean = require('../props/boolean') - -module.exports = { - use: [ - require('../props'), - ], - - settings: { - align: { - config: 'log_align', - prop: boolean() - }, - }, -} diff --git a/mods/align/utils.browser.js b/mods/align/utils.browser.js deleted file mode 100644 index 526f30e..0000000 --- a/mods/align/utils.browser.js +++ /dev/null @@ -1,25 +0,0 @@ -var ZWSP = '​' // zero-width space -var firefox = require('../colors/utils').firefox - -module.exports = { - // alignment depends on color format specifiers in the browser - hasAlign: require('../colors/utils').hasColor, - - specifier: { - error: '%c%s%c%s', - warn: '%c%s%c%s', - info: '%c%s%c%s', - log: '%c%s%c%s', - debug: '%c%s%c%s', - trace: '%c%s%c%s', - }, - - args: { - error: ['padding-left:0px', ZWSP, 'padding-left:0px', ZWSP], - warn: ['padding-left:' + (firefox ? '12' : '0') + 'px', ZWSP, 'padding-left:0px', ZWSP], - info: ['padding-left:' + (firefox ? '12' : '10') + 'px', ZWSP, 'padding-left:0px', ZWSP], - log: ['padding-left:' + (firefox ? '12' : '10') + 'px', ZWSP, 'padding-left:0px', ZWSP], - debug: ['padding-left:' + (firefox ? '12' : '10') + 'px', ZWSP, 'padding-left:0px', ZWSP], - trace: ['padding-left:0px', ZWSP, 'padding-left:0px', ZWSP], - }, -} diff --git a/mods/align/utils.js b/mods/align/utils.js deleted file mode 100644 index 1949f8a..0000000 --- a/mods/align/utils.js +++ /dev/null @@ -1,7 +0,0 @@ -var console = require('../channels/console') -module.exports = { - hasAlign: function(output){return output === console}, - specifier: { - trace: '\n' - } -} diff --git a/mods/channels/console.js b/mods/channels/console.js deleted file mode 100644 index 78186a6..0000000 --- a/mods/channels/console.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = (typeof console != 'undefined') && console \ No newline at end of file diff --git a/mods/channels/index.js b/mods/channels/index.js deleted file mode 100644 index 894e0c6..0000000 --- a/mods/channels/index.js +++ /dev/null @@ -1,84 +0,0 @@ -var grab = require('../../core/grab') -var console = require('./console') -var noop = require('./noop') -var method = require('./method') - -/** - * mod: channels - * - * Introduces the concept of log channels. - * - * A log channel is a path a log message may take that leads to an output. - * - * This mod enables multiple channels to be defined (by other mods) and offers - * a hook for other mods to customize how the channel output is created. - * - * This mod adds two default channels named 'output' and 'drain'. - */ -module.exports = { - use: [ - require('../config'), - // require('../options'), - require('../props'), - ], - - // adds the channels 'output' and 'drain' - channels: { - output: { - out: console, - }, - drain: { - out: noop, - } - }, - - // enhance the given loggers with channels - ext: function(logger) { - var ulog = this - var channels = grab(ulog, 'channels', {}) - var channelOutputs = grab(ulog, 'channelOutput', []) - var recorders = grab(ulog, 'record', []) - logger.channels = {} - for (var channel in channels) { - var ch = logger.channels[channel] = { - name: channel, - channels: channels, - out: channels[channel].out || console, - recorders: recorders, - fns: {}, - } - ch.out = channelOutputs.reduce(function(r, channelOutput){ - return channelOutput.call(ulog, logger, ch) || r - }, ch.out); - for (var level in ulog.levels) { - var rec = ch.recorders.reduce(function(rec, record){ - record.call(ulog, logger, rec) - return rec - }, { channel: channel, level: level }) - ch.fns[level] = (function(ch,rec){ - return (typeof ch.out == 'function' - ? function(){ - rec.message = [].slice.call(arguments) - ch.out(rec) - } - : method(ch.out, rec) - ) - })(ch,rec) - } - } - }, - - // after all ext hooks have run, assign the log methods to - // the right channels based on logger.enabledFor - after: function(logger) { - for (var level in this.levels) { - logger[level] = logger.channels[logger.enabledFor(level) ? 'output' : 'drain'].fns[level] - } - }, - - record: function(logger, rec){ - rec.name = logger.name - rec.logger = logger - rec.ulog = this - } -} diff --git a/mods/channels/method.js b/mods/channels/method.js deleted file mode 100644 index 9525904..0000000 --- a/mods/channels/method.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = function(out, rec) { - return out[rec.level] || out.log || function(){} -} \ No newline at end of file diff --git a/mods/channels/noop.js b/mods/channels/noop.js deleted file mode 100644 index cbdafd1..0000000 --- a/mods/channels/noop.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - log: function(){} -} \ No newline at end of file diff --git a/mods/colors/index.js b/mods/colors/index.js deleted file mode 100644 index b08517e..0000000 --- a/mods/colors/index.js +++ /dev/null @@ -1,48 +0,0 @@ -var grab = require('../../core/grab') -var palette = require('./utils').palette -var levels = require('./utils').levels -var boolean = require('../props/boolean') - -module.exports = { - use: [ - require('../props') - ], - - colors: { - palette: palette, - levels: levels, - }, - - settings: { - colored: { - config: 'log_color', - prop: boolean(), - }, - }, - - record: function(logger, rec) { - if (logger.colored) { - if (!logger.colors) { - logger.colors = grab(this, 'colors', {}) - logger.colors.index = hash(logger.name) % logger.colors.palette.length - } - if (!logger.color) { - logger.color = logger.colors.palette[logger.colors.index] - } - } - } -} - -function hash(s) { - for (var i=0, h=0xdeadbeef; i>> 16) >>> 0 -} - -// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul#Polyfill -function imul(a, b) { - b |= 0 - var result = (a & 0x003fffff) * b; - if (a & 0xffc00000 /*!== 0*/) result += (a & 0xffc00000) * b |0; - return result |0; -} diff --git a/mods/colors/utils.browser.js b/mods/colors/utils.browser.js deleted file mode 100644 index 5a048cc..0000000 --- a/mods/colors/utils.browser.js +++ /dev/null @@ -1,46 +0,0 @@ -var console = require('../channels/console') - -module.exports = { - // Detect firefox to compensate for it's lack of support for format specifiers on console.trace - firefox: (typeof navigator != 'undefined') && /firefox/i.test(navigator.userAgent), - - hasColor: function(output){ - return (output === console) && - (navigator.userAgent.indexOf('MSIE') === -1) && - (navigator.userAgent.indexOf('Trident') === -1) - }, - - colorSpecifier: function(color){ - return '%c' - }, - - colorSpecifierAfter: function(color){ - return '' - }, - - colorArgument: function(color){ - return ['color:rgb(' + color.r + ',' + color.g + ',' + color.b + ')'] - }, - - palette: (function() { - var palette = [] - for (var r=0; r<8; r++) { - for (var g=0; g<8; g++) { - for (var b=0; b<8; b++) { - if ((r + g + b > 8) && (r + g + b < 16)) // filter out darkest and lightest colors - palette.push({r:24*r, g:24*g, b:24*b}) - } - } - } - return palette - })(), - - levels: { - error: { r: 192, g: 64, b: 0 }, - warn: { r: 180, g: 96, b: 0 }, - info: { r: 64, g: 128, b: 16 }, - log: { r: 64, g: 64, b: 64 }, - debug: { r: 96, g: 96, b: 96 }, - trace: { r: 112, g: 112, b: 112 }, - }, -} diff --git a/mods/colors/utils.js b/mods/colors/utils.js deleted file mode 100644 index c8b6e5e..0000000 --- a/mods/colors/utils.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = { - firefox: false, - - hasColor: function(output){ - return (typeof console !== 'undefined') && (output === console) - }, - - colorSpecifier: function(color){ - return '\u001B[38;2;' + color.r + ';' + color.g + ';' + color.b + 'm' - }, - - colorArgument: function(color){ - return [] - }, - - colorSpecifierAfter: function(color){ - return '\x1b[0m' - }, - - palette: (function() { - var palette = [] - for (var r=0; r<8; r++) { - for (var g=0; g<8; g++) { - for (var b=0; b<8; b++) { - if ((r + g + b > 8) && (r + g + b < 16)) // filter out darkest and lightest colors - palette.push({r:32*r, g:32*g, b:32*b}) - } - } - } - return palette - })(), - - levels: { - error: { r: 244, g: 96, b: 48 }, - warn: { r: 200, g: 140, b: 0 }, - info: { r: 128, g: 204, b: 96 }, - log: { r: 192, g: 192, b: 192 }, - debug: { r: 160, g: 160, b: 160 }, - trace: { r: 144, g: 144, b: 144 }, - }, -} diff --git a/mods/config/args.browser.js b/mods/config/args.browser.js deleted file mode 100644 index 5ce17a2..0000000 --- a/mods/config/args.browser.js +++ /dev/null @@ -1,5 +0,0 @@ -var parse = require('./parse') - -module.exports = parse(typeof location == 'undefined' ? [] : location.search.replace(/^(\?|#|&)/, '').split('&'), - /\+/g, ' ', decodeURIComponent -) diff --git a/mods/config/args.js b/mods/config/args.js deleted file mode 100644 index b771400..0000000 --- a/mods/config/args.js +++ /dev/null @@ -1,5 +0,0 @@ -var parse = require('./parse') - -module.exports = parse( - process.argv.slice(2) -) diff --git a/mods/config/configure.js b/mods/config/configure.js deleted file mode 100644 index 85a8217..0000000 --- a/mods/config/configure.js +++ /dev/null @@ -1,15 +0,0 @@ -var merge = require('../../core/merge') -var env = require('./env') -var args = require('./args') - -module.exports = function(watched, data) { - var cfg = {} - merge(cfg, env) - merge(cfg, args) - data && merge(cfg, data) - // var result = {} - // for (var setting in watched) { - // if (setting in cfg) result[setting] = cfg[setting] - // } - return cfg -} diff --git a/mods/config/env.browser.js b/mods/config/env.browser.js deleted file mode 100644 index 4ba52ba..0000000 --- a/mods/config/env.browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = {} diff --git a/mods/config/env.js b/mods/config/env.js deleted file mode 100644 index 5bb848c..0000000 --- a/mods/config/env.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = process.env diff --git a/mods/config/index.js b/mods/config/index.js deleted file mode 100644 index 9c8dc09..0000000 --- a/mods/config/index.js +++ /dev/null @@ -1,46 +0,0 @@ -var grab = require('../../core/grab') -// var args = require('./args') -// var env = require('./env') -var read = require('./read') -var update = require('./update') -var notify = require('./notify') -var watch = require('./watch') -var config = module.exports = { - use: [ - require('../settings'), - ], - - settings: { - config: { - config: 'log_config' - } - }, - - init: function(){ - this.get('config') - }, - - get: function(result, name) { - if (! this.config) { - config.update(this) - } - if (!result) { - var settings = grab(this, 'settings', {}) - name = settings[name] && settings[name].config || name - result = this.config[name] - } - return result - }, - - update: function(ulog) { - ulog.config = ulog.config || {} - var newCfg = read(ulog) - var changed = update(ulog.config, newCfg) - if (changed.length) notify(ulog, changed) - watch(ulog) - }, - - set: function(name) { - if (name === 'log_config') config.update(this) - } -} diff --git a/mods/config/notify.js b/mods/config/notify.js deleted file mode 100644 index 56d705a..0000000 --- a/mods/config/notify.js +++ /dev/null @@ -1,20 +0,0 @@ -var watches = require('./watches') - -module.exports = function(ulog, changed) { - ulog.ext() - var watched = watches(ulog) - - changed.map(function(change){ - return { change: change, watches: watched.filter(function(watch){return typeof watch[change.name] == 'function'}) } - }) - .filter(function(item){ - return item.watches.length - }) - .forEach(function(item){ - item.watches.forEach(function(watch) { - setTimeout(function(){ - watch[item.change.name].call(ulog, item.change) - },0) - }) - }) -} diff --git a/mods/config/parse.js b/mods/config/parse.js deleted file mode 100644 index b9ec596..0000000 --- a/mods/config/parse.js +++ /dev/null @@ -1,15 +0,0 @@ -module.exports = function parse(data, regex, replacement, decode) { - return data.reduce(function(result,value){ - value = value.replace(regex, replacement) - var i = value.indexOf('=') - if (i !== -1) { - var n = value.substring(0, i).replace(/^\s+|\s+$/g, '') - if (n) { - var v = value.substring(i + 1).replace(/^\s+|\s+$/g, '') - if (decode) v = decode(v) - result[n] = v - } - } - return result - }, {}) -} diff --git a/mods/config/read.browser.js b/mods/config/read.browser.js deleted file mode 100644 index 1463d42..0000000 --- a/mods/config/read.browser.js +++ /dev/null @@ -1,18 +0,0 @@ - -var configure = require('./configure') -var watched = require('./watched') - -module.exports = function(ulog, callback) { - var watches = watched(ulog) - - var cfg = {} - for (var name in watches) { - try { - var value = localStorage.getItem(name) - if (value) cfg[name] = value - } catch(ignore){} - } - - cfg = configure(watches, cfg) - return callback ? callback(cfg) : cfg -} diff --git a/mods/config/read.js b/mods/config/read.js deleted file mode 100644 index 771c332..0000000 --- a/mods/config/read.js +++ /dev/null @@ -1,29 +0,0 @@ -var fs = require('fs') -var path = require('path') - -var grab = require('../../core/grab') -var parse = require('./parse') -var watched = require('./watched') -var configure = require('./configure') - -module.exports = function(ulog, callback) { - var settings = grab(ulog, 'settings', {}) - var log_config = ulog.get('log_config') || 'log.config' - var filename = path.resolve(log_config) - if (callback) { - fs.readFile(filename, 'utf8', function(e, data){ - callback(configure(watched(ulog, settings), data && parse(lines(data)))) - }) - } else { - var data - try {data = fs.readFileSync(filename, 'utf8')} catch(e){} - return configure(watched(ulog, settings), data && parse(lines(data))) - } -} - -function lines(data) { - return data.split(/(\r\n|\r|\n)/).map(function(line){ - // trim and skip comments - return (line = line.trim()).indexOf('#') === 0 ? '' : line - }) -} diff --git a/mods/config/test.config b/mods/config/test.config deleted file mode 100644 index 94ae033..0000000 --- a/mods/config/test.config +++ /dev/null @@ -1,3 +0,0 @@ -test = pass -log = pass -log_output = console;test=drain \ No newline at end of file diff --git a/mods/config/test.js b/mods/config/test.js deleted file mode 100644 index 861b502..0000000 --- a/mods/config/test.js +++ /dev/null @@ -1,58 +0,0 @@ -var test = require('tape') -var path = require('path') -var fs = require('fs') - -var ulog = require('../../core') -var config = require('./') -var filename = 'test.config' - -test('mod: config', function(t) { - t.equal(typeof config, 'object', 'is an object') - t.equal(typeof config.get, 'function', 'has a method `get`') - - t.test('config.get(result: String, name?: String)', function(t){ - ulog.use(config) - ulog.set('log_config', path.resolve(__dirname, filename)) - t.equal(typeof config.get.call(ulog), 'undefined', 'when called without arguments, returns undefined') - t.equal(config.get.call(ulog, 'test', 'test'), 'test', 'when called with a truthy result, returns that result') - ulog.use({ - settings: { - test: { } - } - }) - t.equal(config.get.call(ulog, undefined, 'test'), 'pass', 'returns the value configured in the config file') - ulog.use({ - settings: { - level: { - config: 'log' - } - } - }) - t.equal(config.get.call(ulog, undefined, 'level'), 'pass', 'when the setting has a config key, uses that key') - ulog.mods.splice(0, ulog.mods.length) - t.end() - }) - - t.test('ulog.use(config)', function(t){ - ulog.use(config) - ulog.set('log_config', path.resolve(__dirname, filename)) - t.ok(ulog.mods.indexOf(config) !== -1, 'adds mod `config` to `ulog.mods`') - ulog.use({ - settings: { - test: { } - } - }) - t.equal(ulog.get('test'), 'pass', 'reads in the config automatically') - var data = fs.readFileSync(path.resolve(__dirname, filename), 'utf8') - fs.writeFileSync(path.resolve(__dirname, filename), 'test=ok', 'utf8') - // allow ulog 250 ms to process the settings change - setTimeout(function(){ - t.equal(ulog.get('test'), 'ok', 'watches the config and updates automatically') - fs.writeFileSync(path.resolve(__dirname, filename), data, 'utf8') - ulog.mods.splice(0, ulog.mods.length) - t.end() - }, 250) - }) - - t.end() -}) diff --git a/mods/config/update.js b/mods/config/update.js deleted file mode 100644 index 2aa09eb..0000000 --- a/mods/config/update.js +++ /dev/null @@ -1,20 +0,0 @@ -module.exports = function(cfg, newCfg) { - var name, changes = [] - for (name in cfg) { - if (! (name in newCfg)) { - changes.push({ name: name, old: cfg[name] }) - delete cfg[name] - } - } - for (name in newCfg) { - if ((! (name in cfg)) || (cfg[name] !== newCfg[name])) { - if (! (name in cfg)) { - changes.push({ name: name, new: newCfg[name] }) - } else { - changes.push({ name: name, old: cfg[name], new: newCfg[name] }) - } - cfg[name] = newCfg[name] - } - } - return changes -} diff --git a/mods/config/watch.browser.js b/mods/config/watch.browser.js deleted file mode 100644 index 24ac2f8..0000000 --- a/mods/config/watch.browser.js +++ /dev/null @@ -1,19 +0,0 @@ -var read = require('./read') -var update = require('./update') -var notify = require('./notify') - -module.exports = function(ulog) { - // storage events unfortunately only fire on events triggered by other windows... - // so we need to poll here... - setInterval(function(){ - if (ulog.config) { - var cfg = read(ulog) - setTimeout(function(){ - var changed = update(ulog.config, cfg) - if (changed.length) setTimeout(function(){ - notify(ulog, changed) - }, 0) - }, 0) - } - }, 350) -} diff --git a/mods/config/watch.js b/mods/config/watch.js deleted file mode 100644 index acbd3e2..0000000 --- a/mods/config/watch.js +++ /dev/null @@ -1,18 +0,0 @@ -var fs = require('fs') -var path = require('path') - -var read = require('./read') -var update = require('./update') -var notify = require('./notify') - -module.exports = function(ulog) { - var filename = path.resolve(ulog.get('log_config') || 'log.config') - try { - fs.watch(filename, { persistent: false }, function() { - read(ulog, function(cfg){ - var changed = update(ulog.config, cfg) - if (changed.length) notify(ulog, changed) - }) - }) - } catch(ignore){} -} diff --git a/mods/config/watched.js b/mods/config/watched.js deleted file mode 100644 index c6066f1..0000000 --- a/mods/config/watched.js +++ /dev/null @@ -1,18 +0,0 @@ -var grab = require('../../core/grab') -var watches = require('./watches') - -module.exports = function(ulog){ - var settings = grab(ulog, 'settings', {}) - var watchers = watches(ulog) - var watched = {} - watchers.forEach(function(watcher){ - for (var name in watcher) { - watched[name] = watchers[name] - } - }) - for (var setting in settings) { - var name = (settings[setting] && settings[setting].config) || setting - watched[name] = settings[setting] - } - return watched -} diff --git a/mods/config/watches.js b/mods/config/watches.js deleted file mode 100644 index 6e46de0..0000000 --- a/mods/config/watches.js +++ /dev/null @@ -1,13 +0,0 @@ -var grab = require('../../core/grab') - -module.exports = function(ulog){ - return grab(ulog, 'watch', []).map(function(watch){ - var result = {} - for (var key in watch) { - key.split(',').forEach(function(name){ - result[name] = watch[key] - }) - } - return result - }) -} \ No newline at end of file diff --git a/mods/debug/index.js b/mods/debug/index.js deleted file mode 100644 index 2dd3e6e..0000000 --- a/mods/debug/index.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - use: [ - require('../levels'), - ], - - init: function() { - this.enabled = this.get.bind(this, 'debug') - this.enable = this.set.bind(this, 'debug') - this.disable = this.set.bind(this, 'debug', '') - } -} diff --git a/mods/formats/apply-alignment.js b/mods/formats/apply-alignment.js deleted file mode 100644 index f925e8e..0000000 --- a/mods/formats/apply-alignment.js +++ /dev/null @@ -1,9 +0,0 @@ -var alignment = require('../align/utils') -var hasAlign = alignment.hasAlign - -module.exports = function(rec, r){ - var a = hasAlign(rec.logger.channels[rec.channel].out) && rec.logger.align && alignment - r[0] = ((a && a.specifier && a.specifier[rec.level]) || '') + r[0] - r.splice.apply(r, [1, 0].concat((a && a.args && a.args[rec.level]) || [])) - return r -} diff --git a/mods/formats/apply-formatting.js b/mods/formats/apply-formatting.js deleted file mode 100644 index d631071..0000000 --- a/mods/formats/apply-formatting.js +++ /dev/null @@ -1,25 +0,0 @@ -var console = require('../channels/console') -var hasColor = require('../colors/utils').hasColor -var colorSpecifier = require('../colors/utils').colorSpecifier -var colorArgument = require('../colors/utils').colorArgument -var colorSpecifierAfter = require('../colors/utils').colorSpecifierAfter - -module.exports = function(rec, fmt, msg, r){ - var out = rec.logger.channels[rec.channel].out - if (out === console) { - var colored = hasColor(out) - var c = colored && rec.logger.colored && fmt.color - c = c == 'level' ? rec.logger.colors.levels[rec.level] : c - c = c == 'logger' ? rec.logger.color : c - r[0] += (c && colorSpecifier(c)) || '' - var len = Array.isArray(msg) ? msg.length : 1 - for (var i=0; i') dir = pad.LEFT - if (text[0] == '<') dir = pad.RIGHT - text = (text[0] == '>') || (text[0] == '<') ? text.substring(1) : text - if (Number(text) && (Number(text) === Number(text))) padding = Number(text) - }) - var fmt = function(rec) { - var result = fn(rec) - if (Array.isArray(result) && (result.length == 1) && (typeof result[0] == 'string')) - result = result[0] - if (padding && (typeof result == 'string')) result = pad(result, padding, ' ', dir) - return result - } - var result = rec ? function() {return fmt(rec)} : function(rec){return fmt(rec)} - for (var prop in props) { - result[prop] = props[prop] - } - return result -} diff --git a/mods/formats/index.js b/mods/formats/index.js deleted file mode 100644 index 0315961..0000000 --- a/mods/formats/index.js +++ /dev/null @@ -1,122 +0,0 @@ -var parse = require('kurly/parse') -var pipe = require('kurly/pipe') -var grab = require('../../core/grab') -var console = require('../channels/console') -var firefox = require('../colors/utils').firefox -var applyFormatting = require('./apply-formatting') -var applyAlignment = require('./apply-alignment') - -/** - * mod - formats - * - * Makes log formatting configurable and extendable - */ -module.exports = { - use: [ - require('../channels'), - ], - - settings: { - format: { - config: 'log_format', - prop: { - default: require('./default'), - } - }, - }, - - formats: { - // add a bunch of formats - cr: function(ctx,rec){return function(){return '\r\n'}}, - date: require('./date'), - lvl: require('./lvl'), - message: require('./message'), - name: require('./name'), - perf: require('./perf'), - time: require('./time'), - '*': require('./wildcard'), - }, - - ext: function(logger) { - var ulog = this - for (var channel in logger.channels) { - for (var level in ulog.levels) { - logger.channels[channel].fns[level] = makePipe(ulog, logger, channel, level) - } - } - - function makePipe(ulog, logger, channel, level) { - var formats = grab(ulog, 'formats', {}) - var ast = parse(logger.format, { optional: true }) - var rec = logger.channels[channel].recorders.reduce(function(rec, record){ - record.call(ulog, logger, rec) - return rec - }, { channel: channel, level: level }) - var line = pipe(ast, formats, rec) - var ch = logger.channels[channel] - var method = ch.fns[level] - var output = ch.out - - if ((output === console) && pipe.isStatic(line)) { - // derive the arguments to be bound from the pipeline - var args = line - .map(toTag) - .filter(skip) - .reduce(function(r,fmt){ - return applyFormatting(rec, fmt, fmt, r)} - , ['']) - // apply alignment if needed - applyAlignment(rec, args) - // bind the output and arguments to the log method - // this uses a devious trick to apply formatting without - // actually replacing the original method, and thus - // without mangling the call stack - return makeStaticPipe(output, method, rec, args) - } else { - return makeDynamicPipe(output, method, rec, line) - } - } - - function makeStaticPipe(output, method, rec, args) { - return Object.defineProperty({}, 'out', { - get: function(){ - return method.bind.apply(method, - [output].concat(firefox && (rec.level === 'trace') ? [] : args.map(function(arg){ - return typeof arg == 'function' ? arg() : arg - }) - )) - } - }).out - } - - function makeDynamicPipe(output, method, rec, line) { - // set up a dynamic pipeline as a function - var containsMessage = line.reduce(function(r,node){return r || (node && node.name === 'message')}, false) - return (function(rec){return function() { - // arguments to this function are the message - rec.message = [].slice.call(arguments) - // run through the pipeline, running all formatters - var args = line - .map(toTag) - .filter(skip) - .reduce(function(r,fmt){ - var msg = typeof fmt == 'function' ? fmt(rec) : fmt - return applyFormatting(rec, fmt, msg, r) - }, ['']) - if (! containsMessage) args.push.apply(args, rec.message) - // apply alignment if needed - applyAlignment(rec, args) - // pass the formatted arguments on to the original output method - method.apply(output, args) - }})(rec) - } - - function toTag(node) { - return !node || !node.tag ? node : node.tag - } - - function skip(tag){ - return (typeof tag != 'string') || tag.trim().length - } - }, -} diff --git a/mods/formats/lvl.js b/mods/formats/lvl.js deleted file mode 100644 index 38ab4ed..0000000 --- a/mods/formats/lvl.js +++ /dev/null @@ -1,7 +0,0 @@ -var formatter = require('./formatter') - -module.exports = function(ctx, rec){ - return formatter(ctx, rec, { color: 'level' }, function(){ - return [' ', 'x', '!', 'i', '-', '>', '}'][rec.ulog.levels[rec.level]] - }) -} diff --git a/mods/formats/message.js b/mods/formats/message.js deleted file mode 100644 index 810fef8..0000000 --- a/mods/formats/message.js +++ /dev/null @@ -1,7 +0,0 @@ -var formatter = require('../formats/formatter') - -module.exports = function(ctx) { - return formatter(ctx, { color: 'level' }, function(rec){ - return rec.message - }) -} diff --git a/mods/formats/name.js b/mods/formats/name.js deleted file mode 100644 index d481572..0000000 --- a/mods/formats/name.js +++ /dev/null @@ -1,7 +0,0 @@ -var formatter = require('./formatter') - -module.exports = function(ctx, rec) { - return formatter(ctx, rec, { color: 'logger', padding: 16 }, function(){ - return rec.logger.name - }) -} diff --git a/mods/formats/pad.js b/mods/formats/pad.js deleted file mode 100644 index 6634337..0000000 --- a/mods/formats/pad.js +++ /dev/null @@ -1,8 +0,0 @@ -var pad = module.exports = function(s, len, c, left){ - var s = s.substring(0, len) - for (var i=len-s.length; i>0; i--) - s = left ? (c || ' ') + s : s + (c || ' ') - return s -} -pad.RIGHT = 0 -pad.LEFT = 1 diff --git a/mods/formats/perf.js b/mods/formats/perf.js deleted file mode 100644 index a08f378..0000000 --- a/mods/formats/perf.js +++ /dev/null @@ -1,21 +0,0 @@ -var formatter = require('./formatter') - -module.exports = function(ctx, rec) { - return formatter(ctx, rec, { color: 'logger', padding: 6, dir: 1 }, function(){ - var time = new Date() - rec.logger.lastCalled = rec.logger.lastCalled || time - var ms = time.getTime() - rec.logger.lastCalled.getTime() - rec.logger.lastCalled = time - return ( - ms >= 36000000 ? (ms/3600000).toFixed(1) + 'h' : - ms >= 600000 ? (ms/60000).toFixed(ms >= 6000000 ? 1 : 2) + 'm' : - ms >= 10000 ? (ms/1000).toFixed(ms >= 100000 ? 1 : 2) + 's' : - // a one-ms diff is bound to occur at some point, - // but it doesn't really mean anything as it's - // basically just the next clock tick, so only - // show values > 1 - ms > 1 ? ms + 'ms' : - '' - ) - }) -} diff --git a/mods/formats/test.js b/mods/formats/test.js deleted file mode 100644 index 4ed5199..0000000 --- a/mods/formats/test.js +++ /dev/null @@ -1,38 +0,0 @@ -var test = require('tape') -var sinon = require('sinon') -var ulog = require('../../core') -var formats = require('./') -var levels = require('../levels') - -test('mod: formats', function(t) { - t.equal(typeof formats, 'object', 'is an object') - t.ok(Array.isArray(formats.use), 'has a `use` array') - t.equal(typeof formats.settings, 'object', 'has a `settings` object') - t.equal(typeof formats.formats, 'object', 'has a `formats` object') -// t.equal(typeof formats.formatters, 'object', 'has a `formatters` object') - t.equal(typeof formats.ext, 'function', 'has a method `ext`') -// t.equal(typeof formats.record, 'function', 'has a method `record`') - - t.test('ulog.use(formats)', function(t){ - ulog.use([levels, formats]) - t.ok(ulog.mods.indexOf(formats) !== -1, 'adds mod `formats` to `ulog.mods`') -// var fn = sinon.stub() -// ulog.use({ -// formats: { -// test: fn, -// } -// }) -// var logger = ulog('test') -// t.equal(fn.callCount, 1, 'when a format is selected, it\'s function is called') -// ulog.set('format', 'test') -// t.equal(fn.callCount, 1, 'when a format is selected, it\'s function is called') -// // delete ulog.get()['option'] - ulog.mods.splice(0, ulog.mods.length) - delete ulog().test - t.end() - }) - - - - t.end() -}) diff --git a/mods/formats/time.js b/mods/formats/time.js deleted file mode 100644 index bcffedb..0000000 --- a/mods/formats/time.js +++ /dev/null @@ -1,10 +0,0 @@ -var formatter = require('../formats/formatter') -var pad = require('../formats/pad') - -module.exports = function(ctx, rec){ - return formatter(ctx, rec, { color: 'logger' }, function() { - var time = new Date() - return pad(time.getHours().toString(), 2, '0', pad.LEFT) + ':' + - pad(time.getMinutes().toString(), 2, '0', pad.LEFT) - }) -} \ No newline at end of file diff --git a/mods/formats/wildcard.js b/mods/formats/wildcard.js deleted file mode 100644 index 2aae59e..0000000 --- a/mods/formats/wildcard.js +++ /dev/null @@ -1,7 +0,0 @@ -var formatter = require('./formatter') - -module.exports = function(ctx, rec) { - return formatter(ctx, rec, { color: 'level' }, function() { - return ctx.name in rec ? rec[ctx.name] : ctx.name + (ctx.text ? ctx.text : '') - }) -} \ No newline at end of file diff --git a/mods/index.js b/mods/index.js deleted file mode 100644 index 278f1da..0000000 --- a/mods/index.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = [ - // require('./settings'), - // require('./config'), - // require('./options'), - // require('./props'), - require('./channels'), - // require('./outputs'), - // require('./colors'), - // require('./align'), -// require('./formats'), -// require('./levels'), -// require('./ulog') -] diff --git a/mods/lazy/index.js b/mods/lazy/index.js deleted file mode 100644 index feb5285..0000000 --- a/mods/lazy/index.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - use: [ - require('../debug'), - require('../outputs'), - require('../formats'), - require('../colors'), - require('../align'), - ] -} diff --git a/mods/levels/default.browser.js b/mods/levels/default.browser.js deleted file mode 100644 index 4e15264..0000000 --- a/mods/levels/default.browser.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'warn' \ No newline at end of file diff --git a/mods/levels/default.js b/mods/levels/default.js deleted file mode 100644 index e91987e..0000000 --- a/mods/levels/default.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = 'info' \ No newline at end of file diff --git a/mods/levels/index.js b/mods/levels/index.js deleted file mode 100644 index 7f9c133..0000000 --- a/mods/levels/index.js +++ /dev/null @@ -1,42 +0,0 @@ -module.exports = { - use: [ - require('../channels'), - ], - - settings: { - debug: {}, - level: { - config: 'log', - // level property - prop: { - // default value - default: require('./default.js'), - // level number from string - fromStr: function(v) { - return Number(v) === Number(v) ? Number(v) : v && this[v.toUpperCase()] - }, - // level number to string - toStr: function(v) { - for (var x in this) - if (this[x] === v) return x.toLowerCase() - return v - }, - // property getter extension, called when property on logger is read - get: function(v, ulog){ - return Math.max(ulog.get('debug', this.name) && this.DEBUG || this.NONE, v) - }, - }, - }, - }, - - ext: function(logger) { - logger.NONE = 0 - logger.ALL = 7 - for (var level in this.levels) { - logger[level.toUpperCase()] = this.levels[level] - } - logger.enabledFor = function(level){ - return logger.level >= logger[level.toUpperCase()] - } - }, -} diff --git a/mods/levels/test.js b/mods/levels/test.js deleted file mode 100644 index f2c8d15..0000000 --- a/mods/levels/test.js +++ /dev/null @@ -1,72 +0,0 @@ -var test = require('tape') -var sinon = require('sinon').createSandbox() - -var ulog = require('../../core') -var settings = require('../settings') -var options = require('../options') -var props = require('../props') -var outputs = require('../outputs') -var levels = require('./') - -test('mod: levels', function (t) { - t.equal(typeof levels, 'object', 'is an object') - t.ok('use' in levels, 'has a property `use`') - t.ok('settings' in levels, 'has a property `settings`') - t.equal(typeof levels.ext, 'function', 'has a method `ext()') - - t.test('levels.use', function(t){ -// t.deepEqual(levels.use, [ outputs ], 'contains a dependency on `outputs`') - t.end() - }) - - t.test('levels.settings', function(t){ - t.equal(typeof levels.settings, 'object', 'is an object') - t.ok('level' in levels.settings, 'contains a settings `level`') - t.ok('prop' in levels.settings.level, 'setting `level` is a prop') - t.equal(typeof levels.settings.level.prop.fromStr, 'function', 'the `level` prop has a `fromStr` handler') - t.equal(typeof levels.settings.level.prop.toStr, 'function', 'the `level` prop has a `toStr` handler') - t.equal(typeof levels.settings.level.prop.get, 'function', 'the `level` prop has a `get` handler') -// t.equal(typeof levels.settings.level.prop.set, 'function', 'the `level` prop has a `set` handler') - t.end() - }) - - t.test('levels.ext(logger: Function)', function (t) { - ulog.use(levels) - var logger = ulog('test') - t.equal(logger.NONE, 0, 'creates a property `NONE`') - for (lvl in ulog.levels) { - var prop = lvl.toUpperCase() - t.equal(logger[prop], ulog.levels[lvl], 'creates a property `' + prop + '`') - } - t.equal(logger.ALL, 7, 'creates a property `ALL`') - t.equal(logger.error, logger.channels.output.fns.error, 'log methods that are within the logger\'s level lead to output') - t.equal(logger.log, logger.channels.drain.fns.log, 'log methods that are outside the logger\'s level lead to the drain') - - ulog.mods.splice(0, ulog.mods.length) - delete ulog().test - t.end() - }) - - t.test('ulog.use(levels)', function(t){ - ulog.use(levels) - t.ok(ulog.mods.indexOf(levels) !== -1, 'adds the `levels` mod') - var logger = ulog('test') - t.ok('level' in logger, 'adds a property `level` to loggers') - t.equal(typeof logger.level, 'number', 'property `level` is a number') - t.ok(!Number.isNaN(logger.level), 'property `level` is not NaN') - logger.level = logger.LOG - t.equal(logger.level, logger.LOG, 'property `level` can be assigned a level number') - logger.level = 'info' - t.equal(logger.level, logger.INFO, 'property `level` can be assigned a level name') - logger.level = '' + logger.INFO - t.equal(logger.level, logger.INFO, 'property `level` can be assigned a level number as a string') - ulog.set('debug', 'test') - t.equal(logger.level, logger.DEBUG, 'property `level` correctly reflects it when a logger is in debug mode') - ulog.mods.splice(0, ulog.mods.length) - delete ulog().test - t.end() - }) - - t.end() -}) - diff --git a/mods/options/index.js b/mods/options/index.js deleted file mode 100644 index bfa5dc5..0000000 --- a/mods/options/index.js +++ /dev/null @@ -1,124 +0,0 @@ -// options are smart settings.... -var options = module.exports = { - use: [ - require('../settings') - ], - - /** - * `options.get(result: String|Object, name?: String, loggerName?: String): String|Object` - * - * @param {String|Object} result The result found so far. - * @param {String} name The name of the setting to get. Optional. - * @param {String} loggerName The name of the logger to get the effective setting for. Optional. - * @returns {String|Object} The (effective) setting for the given `name` and `loggerName`. - * - * if no `loggerName` is given, returns the `result` unchanged. - * - * If a `loggerName` is given, the effective setting value for that specific - * logger name is returned. - * - * If empty string is given as `loggerName`, the effective global/default - * setting value is returned. - * - * For example, given that the following settings are active: - * - * `{ level: 'info; libA=warn; libB=error', output: 'console' }` - * - * These following statements would be true: - * - * `JSON.stringify(ulog.get()) == '{"level":"info; libA=warn; libB=error","output":"console"}'` - * `ulog.get('output') == 'console` - * `ulog.get('level') == 'info; libA=warn; libB=error'` - * `ulog.get('level', 'libA') == 'warn'` - * `ulog.get('level', 'libB') == 'error'` - * `ulog.get('level', 'libC') == 'info'` - * `ulog.get('level', '') == 'info'` - */ - get: function(result, name, loggerName) { - return (loggerName === undefined) ? result : options.eval(options.parse(result, name), loggerName) - }, - - /** - * `parse(value: string, name?: string) => Array` - * - * Parses the setting value string, returning an AST - * - * e.g `parse('warn; test=debug')` would yield: - * - * [{ - * incl: [test], - * excl: [], - * value: 'debug' - * },{ - * incl: [*], - * excl: [], - * value: 'warn' - * }]` - * - * if `debugStyle` is truthy, the setting value string is parsed debug-style - * and `impliedValue` is used as the value of the setting - * - * @param {String} value The setting value string. - * @param {String} name The name of the setting. Optional. - * - * @returns {Array} The parsed setting value objects - */ - parse: function(value, name) { - var d = (name == 'debug') && name - var settings = [] - var items = (value||'').trim().split(';').map(function(x){return x.replace('\\;', ';')}) - // parse `ulog` style settings, include support for `debug` style - var implied = [] - for (var i=0,item,idx; item=items[i]; i++) { - var x = ((idx = item.indexOf('=')) == -1) - ? [item.trim()] - : [item.substring(0,idx).trim(), item.substring(idx + 1).trim()] - // ulog: expressions is first param or none if only a setting value is present (implied) - // debug: expressions is always first and only param - var expressions = x[1] || d ? x[0].split(/[\s,]+/) : [] - // ulog: setting value is second param, or first if only a value is present (implied) - // debug: setting value is always implied - var setting = { value: x[1] || (!d && x[0]) || d, incl: [], excl: [] } - if (expressions.length) { - settings.push(setting) - } - else { - expressions.push('*') - implied.push(setting) - } - // add the expressions to the incl/excl lists on the setting - for (var j=0,s; s=expressions[j]; j++) { - s = s.replace(/\*/g, '.*?') - setting[s[0]=='-'?'excl':'incl'].push(new RegExp('^' + s.substr(s[0]=='-'?1:0) + '$')) - } - } - // add implied settings last so they act as defaults - settings.push.apply(settings, implied) - return settings - }, - - /** - * Evaluates the given AST for the given logger name. - * - * @param {Array} ast AST - * @param {String} name Logger name - * - * @returns {String} The effective option value for the given logger name - */ - eval: function(ast, name){ - for (var i=0,s,r; s=ast[i]; i++) { // for all parts ('info; test=debug' has 2 parts) - if (excl(s, name)) continue - if (r = incl(s, name)) return r - } - - function excl(s, name) { - for (var j=0,br,excl; excl=s.excl[j]; j++) // for all exclusion tests - if (br = excl.test(name)) return br // if logger matches exclude, return true - } - - function incl(s, name) { - for (var j=0,incl; incl=s.incl[j]; j++) // for all inclusion tests - if (incl.test(name)) return s.value // if logger matches include, return result - } - }, -} diff --git a/mods/options/test.js b/mods/options/test.js deleted file mode 100644 index b6ed848..0000000 --- a/mods/options/test.js +++ /dev/null @@ -1,96 +0,0 @@ -var test = require('tape') - -var ulog = require('../../core') -var settings = require('../settings') -var options = require('./') - -test('mod: options', function (t) { - t.equal(typeof options, 'object', 'is an object') - t.equal(typeof options.get, 'function', 'has a method `get()') - t.equal(typeof options.parse, 'function', 'has a method `parse()') - t.equal(typeof options.eval, 'function', 'has a method `eval()') - - t.test('options.get(result: Any, name: String, loggerName: String)', function (t) { - t.equal(options.get.call(ulog, 'result'), 'result', 'when called without a `loggerName`, returns the result unchanged') - t.equal(options.get.call(ulog, 'Hello World; test=OK', 'message', 'test'), 'OK', 'when called with a `loggerName`, returns the effective setting for that logger') - t.equal(options.get.call(ulog, 'SUCCESS; -test,*=FAILURE', 'message', 'test'), 'SUCCESS', 'after the option has been set, re-calculates the effective settings') - t.equal(options.get.call(ulog, 'test', 'debug', 'test'), 'debug', 'Parses the option named `debug` using debug-style parsing') - t.end() - }) - - t.test('options.parse(value: String, name?: String): Object[]', function (t) { - var given = 'ALL; many,-some=TRY; test=OK; ' - var expected = [ - { - value: 'TRY', - incl: [/^many$/], - excl: [/^some$/], - },{ - value: 'OK', - incl: [/^test$/], - excl: [], - },{ - value: 'ALL', - incl: [/^.*?$/], - excl: [], - } - ] - var actual = options.parse(given, 'test') - t.deepEqual(actual, expected, 'returns an abstract syntax tree (ast)') - t.end() - }) - - t.test('options.eval(ast: Object[], name?: String): String', function (t) { - var AST = [ - { - value: 'TRY', - incl: [/^many$/], - excl: [/^some$/], - },{ - value: 'OK', - incl: [/^test$/], - excl: [], - },{ - value: 'ALL', - incl: [/^.*?$/], - excl: [], - } - ] - t.equal(options.eval(AST), 'ALL', 'when no logger name is given, returns the effective global option value') - t.equal(options.eval(AST, ''), 'ALL', 'when an empty logger name is given, returns the effective global option value') - t.equal(options.eval(AST, 'many'), 'TRY', 'when \'many\' is given as `loggerName`, returns \'TRY\'') - t.equal(options.eval(AST, 'some'), 'ALL', 'when \'some\' is given as `loggerName` returns \'ALL\'') - t.equal(options.eval(AST, 'test'), 'OK', 'when \'test\' is given as `loggerName`, returns \'OK\'') - t.pass('does not throw') - t.end() - }) - - t.test('ulog.use(options)', function(t){ - ulog.use(options) - t.deepEqual(ulog.mods[0], settings, 'adds mod `settings` to `ulog.mods`, because it is used by mod `options`') - t.deepEqual(ulog.mods[1], options, 'adds mod `options` to `ulog.mods`') - t.equal(typeof ulog.get, 'function', 'method `get` is added to ulog by mod `settings`') - t.equal(typeof ulog.set, 'function', 'method `set` is added to ulog by mod `settings`') - ulog.use({ - settings: { - option: { - - } - } - }) - ulog.set('option', 'ALL; many,-some=TRY; test=OK; ') - t.equal(ulog.get('option'), 'ALL; many,-some=TRY; test=OK; ', '`ulog.get` returns the setting when no `loggerName` is given') - t.equal(ulog.get('option', ''), 'ALL', '`ulog.get` returns \'ALL\' when an empty `loggerName` is given') - t.equal(ulog.get('option', 'unknown'), 'ALL', '`ulog.get` returns \'ALL\' when an unknown `loggerName` is given') - t.equal(ulog.get('option', 'many'), 'TRY', '`ulog.get` returns \'TRY\' when \'many\' is given as `loggerName`') - t.equal(ulog.get('option', 'test'), 'OK', '`ulog.get` returns \'OK\' when \'test\' is given as `loggerName`') - delete ulog.get()['option'] - ulog.mods.splice(0, ulog.mods.length) - delete ulog.get - delete ulog.set - t.end() - }) - - t.end() -}) - diff --git a/mods/outputs/index.js b/mods/outputs/index.js deleted file mode 100644 index 7dff985..0000000 --- a/mods/outputs/index.js +++ /dev/null @@ -1,62 +0,0 @@ -var parse = require('kurly/parse') -var pipe = require('kurly/pipe') -var grab = require('../../core/grab') -var console = require('../channels/console') -var method = require('../channels/method') -const noop = require('../channels/noop') - -/** - * mod: outputs - * - * Makes the outputs of logger channels configurable via props - */ -module.exports = { - use: [ - require('../props'), - require('../channels'), - ], - - // adds a collection of outputs - // an output is either an object with `log()`, `info()`, `warn()` etc methods, - // or a kurly tag - outputs: { - console: console, - noop: noop, - }, - - // adds 'output' and `drain` props to configure the output of these channels - settings: { - output: { - config: 'log_output', - prop: { - default: 'console', - }, - }, - drain: { - config: 'log_drain', - prop: { - default: 'noop', - }, - }, - }, - - // override the channel output constructor to take logger props into account - channelOutput: function(logger, ch){ - if (! (ch.cfg = logger[ch.name])) return - ch.outputs = grab(this, 'outputs', {}) - var ast = parse(ch.cfg, { optional: true }) - .filter(function(node){return typeof node == 'object'}) - var outs = pipe(ast, ch.outputs) - .map(function(node){return node.tag}) - return ( - outs.length === 0 ? 0 : - (outs.length === 1) && (typeof outs[0] == 'object') ? outs[0] : - function(rec) { - for (var i=0,out; out=outs[i]; i++) { - if (typeof out == 'function') out(rec) - else method(out, rec).apply(out, rec.message) - } - } - ) - }, -} diff --git a/mods/outputs/test.js b/mods/outputs/test.js deleted file mode 100644 index 85ccfe4..0000000 --- a/mods/outputs/test.js +++ /dev/null @@ -1,50 +0,0 @@ -var test = require('tape') -var sinon = require('sinon').createSandbox() - -var ulog = require('../../core') -var mod = require('./') -var levels = require('../levels') - -test('mods.outputs: Object', function (t) { - t.equal(typeof mod, 'object', 'is an object') - t.equal(typeof mod.ext, 'function', 'has a method `ext()') - t.equal(typeof mod.settings, 'object', 'has an object `settings`') - t.equal(typeof mod.settings.output, 'object', 'defines an `output` setting') - - - t.test('outputs.set(name: String, value: String)', function (t) { - ulog.use(mod) - sinon.spy(ulog, 'ext') - ulog.set('log_output', 'test') - t.equal(!!ulog.ext.called, true, 're-extends all loggers when the output option is set') - ulog.set('log_output', undefined) - ulog.mods.splice(0, ulog.mods.length) - sinon.restore() - t.end() - }) - - t.test('outputs.ext(logger: Function)', function (t) { - var fn = sinon.stub() - ulog.use([ - levels, - { - outputs: { - test: { log: fn } - } - } - ]) - var logger = ulog('test') - logger.output = 'test' - - logger.info('test message') - t.ok(fn.called, 'Makes the given logger use the specified output') - ulog.mods.splice(0, ulog.mods.length) - for (var logger in ulog()) delete ulog()[logger] - sinon.restore() - t.end() - }) - - ulog.mods.splice(0, ulog.mods.length) - t.end() -}) - diff --git a/mods/props/boolean.js b/mods/props/boolean.js deleted file mode 100644 index 6525afa..0000000 --- a/mods/props/boolean.js +++ /dev/null @@ -1,11 +0,0 @@ -var merge = require('../../core/merge') - -module.exports = function(prop) { - var result = { - default: 'on', - fromStr: function(v){return v=='on' || v=='yes' || v=='true' || v=='enabled'}, - toStr: function(v){return v ? 'on' : 'off'} - } - merge(result, prop) - return result -} diff --git a/mods/props/index.js b/mods/props/index.js deleted file mode 100644 index 30645b7..0000000 --- a/mods/props/index.js +++ /dev/null @@ -1,81 +0,0 @@ -var grab = require('../../core/grab') - -/** - * Mod: props - * - * Enables properties on loggers that are backed by options on ulog. - * - * This mod allows other mods to declare props that will be added on each created logger - * and that are backed by options on ulog itself. A getter and setter will be created that - * return the value of the option for that logger, or set (override) the value of that - * option for that specific logger. - * - * When a prop is set directly on a logger, the logger will keep an in-memory setting that - * overrides the option set on ulog itself. To clear a prop and have it use the global option - * again, set `undefined` as the value for the prop. - */ -var props = module.exports = { - use: [ - require('../options'), - ], - - // // called when a logger needs to be enhanced - ext: function(logger) { - var settings = grab(this, 'settings', {}) - for (var name in settings) { - if (settings[name].prop) { - props.new.call(this, logger, name, settings[name].prop) - } - } - }, - - - // contribute props to log records - record: function(logger, rec) { - var settings = grab(this, 'settings', {}) - for (var name in settings) { - if (settings[name].prop) { - rec['log_' + name] = this.get(name, logger.name) - } - } - }, - - /** - * `new(logger, name, prop)` - * - * Creates an option named `name` on the given `logger`, using - * the provided `prop` whenever applicable. - * - * @param {Function} logger The logger function - * @param {String} name The name of the property to create - * @param {Object} prop A prop object - * - * The `prop` object can have functions `fromStr` and `toStr` that - * convert from and to String, and `get` and `set` that are called whenever - * the property is read or written. - * - * @returns The given `logger` - */ - new: function(logger, name, prop) { - if (name in logger) return logger // already exist - var ulog=this - var value // private field - return Object.defineProperty(logger, prop.name || name, { - get: function(){ - var v = value !== undefined ? value : ulog.get(name, logger.name) - v = v !== undefined ? v : prop.default - v = prop.fromStr ? prop.fromStr.call(logger, v, ulog) : v - v = prop.get ? prop.get.call(logger, v, ulog) : v - return v - }, - set: function(v){ - v = prop.toStr ? prop.toStr.call(logger, v, ulog) : v - if (value !== v) { - value = v - ulog.ext(logger) - } - prop.set && prop.set.call(logger, v, ulog) - } - }) - } -} \ No newline at end of file diff --git a/mods/props/test.js b/mods/props/test.js deleted file mode 100644 index 1db971c..0000000 --- a/mods/props/test.js +++ /dev/null @@ -1,100 +0,0 @@ -var test = require('tape') -var sinon = require('sinon') - -var ulog = require('../../core') -var settings = require('../settings') -var options = require('../options') -var props = require('./') - -test('mod: props', function (t) { - t.equal(typeof props, 'object', 'is an object') - t.ok('use' in props, 'has a property `use`') - t.equal(typeof props.ext, 'function', 'has a method `ext()') - t.equal(typeof props.new, 'function', 'has a method `new()') - - t.test('props.use', function (t) { - t.ok(Array.isArray(props.use), 'is an array') - t.deepEqual(props.use, [ options ], 'contains a single dependency on mod `options`') - t.end() - }) - - t.test('props.ext(logger: Function)', function (t) { - var ulogStub = sinon.stub() - ulogStub.mods = [] - ulogStub.mods.push({ settings: { level: { prop: {} } } }) - sinon.spy(props, 'new') - props.ext.call(ulogStub, function(){}) - t.equal(props.new.callCount, 1, 'calls props.new for all props found in registered mods') - t.end() - }) - - t.test('props.new(logger: Function, name: String, opts: Object): Function', function (t) { - function stub(v){return v} - var ulogStub = sinon.spy(stub) - ulogStub.get = sinon.spy(stub) - ulogStub.ext = sinon.spy(stub) - var logger, given - var fromStr = sinon.spy(stub) - var toStr = sinon.spy(stub) - var get = sinon.spy(stub) - var set = sinon.spy(stub) - - logger = props.new.call(ulogStub, given = function given(){}, 'level', {}) - t.equal(logger, given, 'returns the given logger') - t.ok('level' in logger, 'creates a property on the logger') - - logger = props.new.call(ulogStub, given = function given(){}, 'level', {}) - logger.level; - t.equal(ulogStub.get.callCount, 1, 'calls `ulog.get` when the property is accessed') - ulogStub.get.resetHistory() - - logger = props.new.call(ulogStub, given = function(){}, 'level', { fromStr: fromStr }) - logger.level; - t.equal(fromStr.callCount, 1, 'calls `fromStr` handlers on the prop when the property is accessed') - fromStr.resetHistory() - - logger = props.new.call(ulogStub, given = function(){}, 'level', { toStr: toStr }) - logger.level = 5 - t.equal(toStr.callCount, 1, 'calls `toStr` handlers on the prop when the property is set') - toStr.resetHistory() - ulogStub.ext.resetHistory() - - logger = props.new.call(ulogStub, given = function(){}, 'level', { get: get }) - logger.level; - t.equal(get.callCount, 1, 'calls `get` handlers on the prop when the property is accessed') - get.resetHistory() - - logger = props.new.call(ulogStub, given = function(){}, 'level', { set: set }) - logger.level; - logger.level = 1 - t.equal(set.callCount, 1, 'calls `set` handlers on the prop when the property is set') - t.equal(ulogStub.ext.callCount, 1, 'calls `ulog.ext` when the property is set and has a `set` handler that returns truthy') - set.resetHistory() - ulogStub.ext.resetHistory() - - t.end() - }) - - t.test('ulog.use(props)', function(t){ - ulog.use(props) - t.equal(ulog.mods[0], settings, 'adds mod `settings` to `ulog.mods`, because it is used by mod `options`') - t.equal(ulog.mods[1], options, 'adds mod `options` to `ulog.mods`, because it is used by mod `props`') - t.equal(ulog.mods[2], props, 'adds mod `props` to `ulog.mods`') - t.equal(typeof ulog.get, 'function', 'method `get` is added to ulog by mod `settings`') - t.equal(typeof ulog.set, 'function', 'method `set` is added to ulog by mod `settings`') - ulog.use({ - props: { - level: {} - } - }) - -// delete ulog.get()['option'] - ulog.mods.splice(0, ulog.mods.length) - delete ulog.get - delete ulog.set - t.end() - }) - - t.end() -}) - diff --git a/mods/settings/index.js b/mods/settings/index.js deleted file mode 100644 index ba51c0b..0000000 --- a/mods/settings/index.js +++ /dev/null @@ -1,81 +0,0 @@ -var grab = require('../../core/grab') - -module.exports = { - extend: { - settings: {}, - - /** - * `ulog.get(name?: String, ...args): String|Object` - * - * Get hook. - * - * This method can be used to read settings. When called, it - * initializes the return value to the value for the setting with `name` - * and then calls the `get` method on all registered mods, allowing them - * to modify the result value. Then it returns that result. - * - * The first argument to `get` is expected to be the name of the setting - * to get. Any other arguments are passed on to the `get` methods on - * registered mods unchanged. - */ - get: function() { - var ulog = this - var args = [].slice.call(arguments) - var name = args[0] - if (! name) return ulog.settings - args.unshift(ulog.settings[name]) - var getters = grab(ulog, 'get', []) - getters.map(function(get){ - args[0] = get.apply(ulog, args) - }) - return args[0] - }, - - /** - * `ulog.set(name, value)` - * - * Sets the setting named `name` to the given `value`. - * - * E.g. to set the log level for all loggers to 'warn': - * - * `ulog.set('log', 'warn')` - * - * The `value` may contain a literal value for the setting, or - * it may contain a semicolon separated list of `expression=value` pairs, - * where `expression` is a debug-style pattern and `value` is a literal value - * for the setting. The literal value may not contain any semicolons, or must - * escape them by preceding them with a backslash: `\;`. - * - * E.g. to set the log level for libA to ERROR, for libB to INFO and for - * all other loggers to WARN: - * - * `ulog.set('log', 'libA=error; libB=info; *=warn')` - * - * Both forms may be combined: - * - * `ulog.set('log', 'warn; libA=error; libB=info')` // same as above - * - * The `expression=value` pairs are evaluated in the order they are listed, - * the first `expression` to match decides which `value` is returned. - * - * The `expression` can be a list of patterns and contain wildcards - * and negations: - * - * `ulog.set('log', 'info; lib*,-libC=error; libC=warn')` - * - * Because of the expression=value pairs being evaluated in order, the simplest - * is generally to list specific rules first and general rules later: - * - * `ulog.set('log', 'libC=warn; lib*=error; info')` // equivalent to above - */ - set: function(name, value) { - var ulog = this - var changed = ulog.settings[name] !== value - ulog.settings[name] = value - grab(ulog, 'set', []).map(function(set){ - set.call(ulog, name, value) - }) - if (changed) ulog.ext() - } - } -} diff --git a/mods/settings/test.js b/mods/settings/test.js deleted file mode 100644 index 036432f..0000000 --- a/mods/settings/test.js +++ /dev/null @@ -1,55 +0,0 @@ -var test = require('tape') - -var ulog = require('../../core') -var settings = require('./') - -test('mod: settings', function(t) { - t.equal(typeof settings, 'object', 'is an object') - t.ok('extend' in settings, 'has a property `extend`') - - t.test(`settings.extend`, function(t){ - t.equal(typeof settings.extend, 'object', 'is an object') - t.equal(typeof settings.extend.get, 'function', 'has a method `get`') - t.equal(typeof settings.extend.set, 'function', 'has a method `set`') - t.end() - }) - - t.test('ulog.use(settings)', function(t){ - ulog.use(settings) - t.deepEqual(ulog.mods, [ settings ], 'adds mod `settings` to `ulog.mods`') - t.equal(typeof ulog.get, 'function', 'adds method `ulog.get`') - t.equal(typeof ulog.set, 'function', 'adds method `ulog.set`') - ulog.mods.splice(0, ulog.mods.length) - delete ulog.get - delete ulog.set - t.end() - }) - - t.test('ulog.get(name?: String, loggerName?: String): String|Object', function(t){ - ulog.use(settings) - t.deepEqual(ulog.get(), {}, 'when called without arguments, returns an object with all settings') - t.equal(ulog.get('name'), undefined, 'when called with an unknown `name`, returns undefined') - ulog.set('name', 'ok') - t.equal(ulog.get('name'), 'ok', 'when called with a known `name`, returns the setting for `name`') - delete ulog.get()['name'] - ulog.mods.splice(0, ulog.mods.length) - delete ulog.get - delete ulog.set - t.end() - }) - - t.test('ulog.set', function(t){ - ulog.use(settings) - ulog.set('name') - t.deepEqual(ulog.get(), { name: undefined }, 'when called with only a `name`, sets the setting for `name` to undefined') - ulog.set('name', 'ok') - t.deepEqual(ulog.get(), { name: 'ok' }, 'when called with a `name` and `value`, sets the setting for `name` to `value`') - delete ulog.get()['name'] - ulog.mods.splice(0, ulog.mods.length) - delete ulog.get - delete ulog.set - t.end() - }) - - t.end() -}) diff --git a/mods/test.js b/mods/test.js deleted file mode 100644 index a8efd27..0000000 --- a/mods/test.js +++ /dev/null @@ -1,7 +0,0 @@ -require('./settings/test') -require('./config/test'), -require('./options/test') -require('./props/test') -// require('./outputs/test'), -// require('./formats/test'), -require('./levels/test') diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 695ffd6..0000000 --- a/package-lock.json +++ /dev/null @@ -1,3216 +0,0 @@ -{ - "name": "ulog", - "version": "2.0.0-beta.18", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/code-frame": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", - "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", - "dev": true, - "requires": { - "@babel/highlight": "^7.10.4" - } - }, - "@babel/core": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz", - "integrity": "sha512-O34LQooYVDXPl7QWCdW9p4NR+QlzOr7xShPPJz8GsuCU3/8ua/wqTr7gmnxXv+WBESiGU/G5s16i6tUvHkNb+w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.10.5", - "@babel/helper-module-transforms": "^7.10.5", - "@babel/helpers": "^7.10.4", - "@babel/parser": "^7.10.5", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.5", - "@babel/types": "^7.10.5", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.2", - "lodash": "^4.17.19", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } - } - }, - "@babel/generator": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.5.tgz", - "integrity": "sha512-3vXxr3FEW7E7lJZiWQ3bM4+v/Vyr9C+hpolQ8BGFr9Y8Ri2tFLWTixmwKBafDujO1WVah4fhZBeU1bieKdghig==", - "dev": true, - "requires": { - "@babel/types": "^7.10.5", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - } - }, - "@babel/helper-function-name": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", - "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", - "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", - "dev": true, - "requires": { - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-member-expression-to-functions": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.5.tgz", - "integrity": "sha512-HiqJpYD5+WopCXIAbQDG0zye5XYVvcO9w/DHp5GsaGkRUaamLj2bEtu6i8rnGGprAhHM3qidCMgp71HF4endhA==", - "dev": true, - "requires": { - "@babel/types": "^7.10.5" - } - }, - "@babel/helper-module-imports": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz", - "integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==", - "dev": true, - "requires": { - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-module-transforms": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.5.tgz", - "integrity": "sha512-4P+CWMJ6/j1W915ITJaUkadLObmCRRSC234uctJfn/vHrsLNxsR8dwlcXv9ZhJWzl77awf+mWXSZEKt5t0OnlA==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.10.4", - "@babel/helper-replace-supers": "^7.10.4", - "@babel/helper-simple-access": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.5", - "lodash": "^4.17.19" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", - "dev": true - } - } - }, - "@babel/helper-optimise-call-expression": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", - "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", - "dev": true, - "requires": { - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-replace-supers": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz", - "integrity": "sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.10.4", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-simple-access": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz", - "integrity": "sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==", - "dev": true, - "requires": { - "@babel/template": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.4.tgz", - "integrity": "sha512-pySBTeoUff56fL5CBU2hWm9TesA4r/rOkI9DyJLvvgz09MB9YtfIYe3iBriVaYNaPe+Alua0vBIOVOLs2buWhg==", - "dev": true, - "requires": { - "@babel/types": "^7.10.4" - } - }, - "@babel/helper-validator-identifier": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", - "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", - "dev": true - }, - "@babel/helpers": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.4.tgz", - "integrity": "sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA==", - "dev": true, - "requires": { - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, - "@babel/parser": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.5.tgz", - "integrity": "sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ==", - "dev": true - }, - "@babel/template": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", - "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/parser": "^7.10.4", - "@babel/types": "^7.10.4" - } - }, - "@babel/traverse": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.5.tgz", - "integrity": "sha512-yc/fyv2gUjPqzTz0WHeRJH2pv7jA9kA7mBX2tXl/x5iOE81uaVPuGPtaYk7wmkx4b67mQ7NqI8rmT2pF47KYKQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.10.5", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-split-export-declaration": "^7.10.4", - "@babel/parser": "^7.10.5", - "@babel/types": "^7.10.5", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.5.tgz", - "integrity": "sha512-ixV66KWfCI6GKoA/2H9v6bQdbfXEwwpOdQ8cRvb4F+eyvhlaHxWFMQB4+3d9QFJXZsiiiqVrewNV0DFEQpyT4Q==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.10.4", - "lodash": "^4.17.19", - "to-fast-properties": "^2.0.0" - }, - "dependencies": { - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", - "dev": true - } - } - }, - "@discoveryjs/json-ext": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.4.tgz", - "integrity": "sha512-8szzeplTi6qw+dbzBB/I3T5TzU9GM7AxzQkiiWdakKsCnaMlMLUMElfEhqT1S3PfdSjHBwzPUTcfWyFHdf9FaQ==", - "dev": true - }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - } - }, - "@istanbuljs/schema": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", - "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", - "dev": true - }, - "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", - "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - }, - "@sinonjs/samsam": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.0.2.tgz", - "integrity": "sha512-jxPRPp9n93ci7b8hMfJOFDPRLFYadN6FSpeROFTR4UNF4i5b+EK6m4QXPO46BDhFgRy1JuS87zAnFOzCUwMJcQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", - "dev": true - }, - "@types/eslint": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", - "integrity": "sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A==", - "dev": true, - "requires": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "@types/eslint-scope": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", - "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", - "dev": true, - "requires": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "@types/estree": { - "version": "0.0.50", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", - "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", - "dev": true - }, - "@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", - "dev": true - }, - "@types/node": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.1.tgz", - "integrity": "sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g==", - "dev": true - }, - "@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", - "dev": true, - "requires": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" - } - }, - "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", - "dev": true - }, - "@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", - "dev": true - }, - "@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", - "dev": true - }, - "@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", - "dev": true, - "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", - "dev": true - }, - "@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" - } - }, - "@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", - "dev": true, - "requires": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", - "dev": true, - "requires": { - "@xtuc/long": "4.2.2" - } - }, - "@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", - "dev": true - }, - "@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" - } - }, - "@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } - }, - "@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" - } - }, - "@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" - } - }, - "@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", - "dev": true, - "requires": { - "@webassemblyjs/ast": "1.11.1", - "@xtuc/long": "4.2.2" - } - }, - "@webpack-cli/configtest": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.4.tgz", - "integrity": "sha512-cs3XLy+UcxiP6bj0A6u7MLLuwdXJ1c3Dtc0RkKg+wiI1g/Ti1om8+/2hc2A2B60NbBNAbMgyBMHvyymWm/j4wQ==", - "dev": true - }, - "@webpack-cli/info": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.3.0.tgz", - "integrity": "sha512-ASiVB3t9LOKHs5DyVUcxpraBXDOKubYu/ihHhU+t1UPpxsivg6Od2E2qU4gJCekfEddzRBzHhzA/Acyw/mlK/w==", - "dev": true, - "requires": { - "envinfo": "^7.7.3" - } - }, - "@webpack-cli/serve": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.5.2.tgz", - "integrity": "sha512-vgJ5OLWadI8aKjDlOH3rb+dYyPd2GTZuQC/Tihjct6F9GpXGZINo3Y/IVuZVTM1eDQB+/AOsjPUWH/WySDaXvw==", - "dev": true - }, - "@xtuc/ieee754": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", - "dev": true - }, - "@xtuc/long": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", - "dev": true - }, - "acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", - "dev": true - }, - "acorn-import-assertions": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.7.6.tgz", - "integrity": "sha512-FlVvVFA1TX6l3lp8VjDnYYq7R1nyW6x3svAt4nDgrWQ9SBaSh9CnbwgSUTasgfNfOG5HlM1ehugCvM+hjo56LA==", - "dev": true - }, - "aggregate-error": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", - "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true - }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "anylogger": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/anylogger/-/anylogger-1.0.11.tgz", - "integrity": "sha512-sKTWPTG2/d71kLGVmymMJQQslUppxvCz6DN/eODL3/ckmfygZzD0t4P5tRXE3qpM62jI98F/YTHHzFhM12jiJQ==" - }, - "append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", - "dev": true, - "requires": { - "default-require-extensions": "^3.0.0" - } - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "browserslist": { - "version": "4.17.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.0.tgz", - "integrity": "sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001254", - "colorette": "^1.3.0", - "electron-to-chromium": "^1.3.830", - "escalade": "^3.1.1", - "node-releases": "^1.1.75" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "buffer-shims": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", - "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=", - "dev": true - }, - "caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", - "dev": true, - "requires": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - } - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001257", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001257.tgz", - "integrity": "sha512-JN49KplOgHSXpIsVSF+LUyhD8PUp6xPpAXeRrrcBh4KBeP7W864jHn6RvzJgDlrReyeVjMFJL3PLpPvKIxlIHA==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", - "dev": true - }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "requires": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "colorette": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "deep-equal": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.0.5.tgz", - "integrity": "sha512-nPiRgmbAtm1a3JsnLCf6/SLfXcjyN5v8L1TXzdCmHrXJ4hx+gW/w1YCcn7z8gJtSiDArZCgYtbao3QqLm/N1Sw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "es-get-iterator": "^1.1.1", - "get-intrinsic": "^1.0.1", - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.2", - "is-regex": "^1.1.1", - "isarray": "^2.0.5", - "object-is": "^1.1.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "regexp.prototype.flags": "^1.3.0", - "side-channel": "^1.0.3", - "which-boxed-primitive": "^1.0.1", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.2" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - } - } - }, - "default-require-extensions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", - "dev": true, - "requires": { - "strip-bom": "^4.0.0" - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, - "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true - }, - "dotignore": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dotignore/-/dotignore-0.1.2.tgz", - "integrity": "sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw==", - "dev": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "duplexer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", - "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.838", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.838.tgz", - "integrity": "sha512-65O6UJiyohFAdX/nc6KJ0xG/4zOn7XCO03kQNNbCeMRGxlWTLzc6Uyi0tFNQuuGWqySZJi8CD2KXPXySVYmzMA==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "enhanced-resolve": { - "version": "5.8.2", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz", - "integrity": "sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - } - }, - "envinfo": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", - "dev": true - }, - "es-abstract": { - "version": "1.18.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.6.tgz", - "integrity": "sha512-kAeIT4cku5eNLNuUKhlmtuk1/TRZvQoYccn6TO0cSVdf1kzB0T7+dYuVK9MWM7l+/53W2Q8M7N2c6MQvhXFcUQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.4", - "is-string": "^1.0.7", - "object-inspect": "^1.11.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" - } - }, - "es-get-iterator": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.2.tgz", - "integrity": "sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.0", - "has-symbols": "^1.0.1", - "is-arguments": "^1.1.0", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.5", - "isarray": "^2.0.5" - }, - "dependencies": { - "isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true - } - } - }, - "es-module-lexer": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.7.1.tgz", - "integrity": "sha512-MgtWFl5No+4S3TmhDmCz2ObFGm6lEpTnzbQi+Dd+pw4mlTIZTmM2iAs5gRlmx5zS9luzobCSBSI90JM/1/JgOw==", - "dev": true - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", - "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", - "dev": true - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - }, - "events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fastest-levenshtein": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", - "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", - "dev": true - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", - "dev": true, - "requires": { - "is-callable": "^1.1.3" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, - "foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - } - }, - "fromentries": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.2.1.tgz", - "integrity": "sha512-Xu2Qh8yqYuDhQGOhD5iJGninErSfI9A3FrriD3tjUgV5VbJFeH8vfgZ9HnC6jWN80QDVNQK5vmxRAmEAp7Mevw==", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", - "dev": true - }, - "gzip-size": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", - "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", - "dev": true, - "requires": { - "duplexer": "^0.1.2" - }, - "dependencies": { - "duplexer": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", - "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", - "dev": true - } - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - } - } - }, - "has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", - "dev": true - }, - "has-dynamic-import": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-dynamic-import/-/has-dynamic-import-2.0.0.tgz", - "integrity": "sha512-GYPi/aZmACJVrVfEhP1rNUFmtCuK+SQ96mn8Bs7mXiGZRAJiI4VjaMmjj4uuvW8qaF085uWJvyJk9UNYUIYn0A==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "hasha": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.0.tgz", - "integrity": "sha512-2W+jKdQbAdSIrggA8Q35Br8qKadTrqCTC8+XZvBWepKDK6m9XkX6Iz1a2yh2KP01kzAR/dpuMeUnocoLYDcskw==", - "dev": true, - "requires": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - } - }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true - }, - "import-local": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", - "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", - "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", - "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, - "requires": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - } - }, - "interpret": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", - "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", - "dev": true - }, - "is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "requires": { - "has-bigints": "^1.0.1" - } - }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", - "dev": true - }, - "is-core-module": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", - "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-finite": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", - "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "is-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", - "dev": true - }, - "is-negative-zero": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "dev": true - }, - "is-number-object": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", - "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-set": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", - "dev": true - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "is-typed-array": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.8.tgz", - "integrity": "sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, - "is-weakmap": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", - "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", - "dev": true - }, - "is-weakset": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.1.tgz", - "integrity": "sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw==", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", - "dev": true, - "requires": { - "append-transform": "^2.0.0" - } - }, - "istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", - "dev": true, - "requires": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - } - }, - "istanbul-lib-processinfo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^3.3.3" - } - }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } - }, - "jest-worker": { - "version": "27.2.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.2.0.tgz", - "integrity": "sha512-laB0ZVIBz+voh/QQy9dmUuuDsadixeerrKqyVpgPz+CCWiOYjOBabUXHIXZhsdvkWbLqSHbgkAHWl5cg24Q6RA==", - "dev": true, - "requires": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", - "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stringify-pretty-compact": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-1.2.0.tgz", - "integrity": "sha512-/11Pj1OyX814QMKO7K8l85SHPTr/KsFxHp8GE2zVa0BtJgGimDjXHfM3FhC7keQdWDea7+nXf+f1de7ATZcZkQ==", - "dev": true - }, - "json5": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", - "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", - "dev": true - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "kurly": { - "version": "2.0.0-beta.3", - "resolved": "https://registry.npmjs.org/kurly/-/kurly-2.0.0-beta.3.tgz", - "integrity": "sha512-WXSRkhL2VV9lI/sPomBDV9Xf4oQ1s/RiUqzxKt4slkG7ndCxcDfXJ2ZXdxEYDRfevnkSOxmiVX3etunBlHqTAw==" - }, - "loader-runner": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", - "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==", - "dev": true - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", - "dev": true - }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "mime-db": { - "version": "1.49.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", - "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", - "dev": true - }, - "mime-types": { - "version": "2.1.32", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", - "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", - "dev": true, - "requires": { - "mime-db": "1.49.0" - } - }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "nise": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.0.tgz", - "integrity": "sha512-W5WlHu+wvo3PaKLsJJkgPup2LrsXCcm7AWwyNZkUnn5rwPkuPBi3Iwk5SQtN0mv+K65k7nKKjwNQ30wg3wLAQQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0", - "@sinonjs/fake-timers": "^7.0.4", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", - "dev": true, - "requires": { - "process-on-spawn": "^1.0.0" - } - }, - "node-releases": { - "version": "1.1.75", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", - "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, - "nyc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", - "dev": true, - "requires": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", - "dev": true - }, - "object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - } - }, - "parse-ms": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-1.0.1.tgz", - "integrity": "sha1-VjRtR0nXjyNDDKDHE4UK75GqNh0=", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "requires": { - "isarray": "0.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - } - } - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "plur": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/plur/-/plur-1.0.0.tgz", - "integrity": "sha1-24XGgU9eXlo7Se/CjWBP7GKXUVY=", - "dev": true - }, - "pretty-ms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-2.1.0.tgz", - "integrity": "sha1-QlfCVt8/sLRR1q/6qwIYhBJpgdw=", - "dev": true, - "requires": { - "is-finite": "^1.0.1", - "parse-ms": "^1.0.0", - "plur": "^1.0.0" - } - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", - "dev": true, - "requires": { - "fromentries": "^1.2.0" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "re-emitter": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/re-emitter/-/re-emitter-1.1.3.tgz", - "integrity": "sha1-+p4xn/3u6zWycpbvDz03TawvUqc=", - "dev": true - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, - "requires": { - "resolve": "^1.9.0" - } - }, - "regexp.prototype.flags": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", - "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", - "dev": true, - "requires": { - "es6-error": "^4.0.1" - } - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "requires": { - "resolve-from": "^5.0.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - }, - "resumer": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz", - "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=", - "dev": true, - "requires": { - "through": "~2.3.4" - } - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", - "dev": true, - "requires": { - "@types/json-schema": "^7.0.8", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, - "requires": { - "randombytes": "^2.1.0" - } - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "requires": { - "shebang-regex": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true - }, - "sinon": { - "version": "11.1.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-11.1.2.tgz", - "integrity": "sha512-59237HChms4kg7/sXhiRcUzdSkKuydDeTiamT/jesUVHshBgL8XAmhgFo0GfK6RruMDM/iRSij1EybmMog9cJw==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^7.1.2", - "@sinonjs/samsam": "^6.0.2", - "diff": "^5.0.0", - "nise": "^5.1.0", - "supports-color": "^7.2.0" - }, - "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-support": { - "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", - "dev": true, - "requires": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - } - }, - "split": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.0.tgz", - "integrity": "sha1-xDlc5oOrzSVLwo/h2rtuXCfc/64=", - "dev": true, - "requires": { - "through": "2" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "string.prototype.trim": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.4.tgz", - "integrity": "sha512-hWCk/iqf7lp0/AgTF7/ddO1IWtSNPASjlzCicV5irAVdE1grjsneK26YG6xACMBEdCvO8fUST0UzDMh/2Qy+9Q==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.2" - } - }, - "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "tap-nirvana": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/tap-nirvana/-/tap-nirvana-1.1.0.tgz", - "integrity": "sha512-TInVjB9doaYU8f1qX5/N2szEY+1ue506T1UQANrae8RSpQvrsYhtrXcHjkfgCcBVJKY38xZHi3izOkhqY7Yz3g==", - "dev": true, - "requires": { - "chalk": "^2.4.1", - "duplexer": "^0.1.1", - "figures": "^2.0.0", - "json-stringify-pretty-compact": "^1.1.0", - "lodash": "^4.17.10", - "pretty-ms": "^3.2.0", - "repeat-string": "^1.5.2", - "tap-out": "^3.0.0", - "through2": "^2.0.0", - "variable-diff": "^1.1.0" - }, - "dependencies": { - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "pretty-ms": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-3.2.0.tgz", - "integrity": "sha512-ZypexbfVUGTFxb0v+m1bUyy92DHe5SyYlnyY0msyms5zd3RwyvNgyxZZsXXgoyzlxjx5MiqtXUdhUfvQbe0A2Q==", - "dev": true, - "requires": { - "parse-ms": "^1.0.0" - } - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - }, - "readable-stream": { - "version": "2.2.9", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", - "integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=", - "dev": true, - "requires": { - "buffer-shims": "~1.0.0", - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~1.0.0", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "tap-out": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tap-out/-/tap-out-3.0.0.tgz", - "integrity": "sha512-JzlrjCL3anqI9xHGPfYb6Mo+6nYs60m0tDy6i0sWhYDlrBDVerYPNWoUo1buK3YeWQFdm42KQv8wu9qLf1tL5A==", - "dev": true, - "requires": { - "re-emitter": "1.1.3", - "readable-stream": "2.2.9", - "split": "1.0.0", - "trim": "0.0.1" - } - } - } - }, - "tap-out": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tap-out/-/tap-out-2.1.0.tgz", - "integrity": "sha512-LJE+TBoVbOWhwdz4+FQk40nmbIuxJLqaGvj3WauQw3NYYU5TdjoV3C0x/yq37YAvVyi+oeBXmWnxWSjJ7IEyUw==", - "dev": true, - "requires": { - "re-emitter": "1.1.3", - "readable-stream": "2.2.9", - "split": "1.0.0", - "trim": "0.0.1" - }, - "dependencies": { - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - }, - "readable-stream": { - "version": "2.2.9", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", - "integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=", - "dev": true, - "requires": { - "buffer-shims": "~1.0.0", - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "~1.0.0", - "process-nextick-args": "~1.0.6", - "string_decoder": "~1.0.0", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "tap-spec": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/tap-spec/-/tap-spec-5.0.0.tgz", - "integrity": "sha512-zMDVJiE5I6Y4XGjlueGXJIX2YIkbDN44broZlnypT38Hj/czfOXrszHNNJBF/DXR8n+x6gbfSx68x04kIEHdrw==", - "dev": true, - "requires": { - "chalk": "^1.0.0", - "duplexer": "^0.1.1", - "figures": "^1.4.0", - "lodash": "^4.17.10", - "pretty-ms": "^2.1.0", - "repeat-string": "^1.5.2", - "tap-out": "^2.1.0", - "through2": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", - "dev": true - }, - "tape": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/tape/-/tape-5.3.1.tgz", - "integrity": "sha512-Mj3h+/dgfI2xct4kTpzqZaRxhhglXcMg//xGTbB0AQisfiOYa6ZBNQIgv46xi1MqbgthuNLSS1SAySDZsb7MMA==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "deep-equal": "^2.0.5", - "defined": "^1.0.0", - "dotignore": "^0.1.2", - "for-each": "^0.3.3", - "get-package-type": "^0.1.0", - "glob": "^7.1.7", - "has": "^1.0.3", - "has-dynamic-import": "^2.0.0", - "inherits": "^2.0.4", - "is-regex": "^1.1.4", - "minimist": "^1.2.5", - "object-inspect": "^1.11.0", - "object-is": "^1.1.5", - "object.assign": "^4.1.2", - "resolve": "^2.0.0-next.3", - "resumer": "^0.0.0", - "string.prototype.trim": "^1.2.4", - "through": "^2.3.8" - }, - "dependencies": { - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "resolve": { - "version": "2.0.0-next.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz", - "integrity": "sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==", - "dev": true, - "requires": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - } - } - } - }, - "terser": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.8.0.tgz", - "integrity": "sha512-f0JH+6yMpneYcRJN314lZrSwu9eKkUFEHLN/kNy8ceh8gaRiLgFPJqrB9HsXjhEGdv4e/ekjTOFxIlL6xlma8A==", - "dev": true, - "requires": { - "commander": "^2.20.0", - "source-map": "~0.7.2", - "source-map-support": "~0.5.20" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true - } - } - }, - "terser-webpack-plugin": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.2.4.tgz", - "integrity": "sha512-E2CkNMN+1cho04YpdANyRrn8CyN4yMy+WdFKZIySFZrGXZxJwJP6PMNGGc/Mcr6qygQHUUqRxnAPmi0M9f00XA==", - "dev": true, - "requires": { - "jest-worker": "^27.0.6", - "p-limit": "^3.1.0", - "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "source-map": "^0.6.1", - "terser": "^5.7.2" - }, - "dependencies": { - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - } - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", - "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", - "dev": true, - "requires": { - "readable-stream": "~2.3.6", - "xtend": "~4.0.1" - } - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, - "trim": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", - "integrity": "sha1-WFhUf2spB1fulczMZm+1AITEYN0=", - "dev": true - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", - "which-boxed-primitive": "^1.0.2" - } - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - }, - "v8-compile-cache": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", - "dev": true - }, - "variable-diff": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/variable-diff/-/variable-diff-1.1.0.tgz", - "integrity": "sha1-0r1cZtt2wTh52W5qMG7cmJ35eNo=", - "dev": true, - "requires": { - "chalk": "^1.1.1", - "object-assign": "^4.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "watchpack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", - "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", - "dev": true, - "requires": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - } - }, - "webpack": { - "version": "5.52.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.52.1.tgz", - "integrity": "sha512-wkGb0hLfrS7ML3n2xIKfUIwHbjB6gxwQHyLmVHoAqEQBw+nWo+G6LoHL098FEXqahqximsntjBLuewStrnJk0g==", - "dev": true, - "requires": { - "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.50", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "acorn": "^8.4.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.8.0", - "es-module-lexer": "^0.7.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.4", - "json-parse-better-errors": "^1.0.2", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.2.0", - "webpack-sources": "^3.2.0" - } - }, - "webpack-cli": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.8.0.tgz", - "integrity": "sha512-+iBSWsX16uVna5aAYN6/wjhJy1q/GKk4KjKvfg90/6hykCTSgozbfz5iRgDTSJt/LgSbYxdBX3KBHeobIs+ZEw==", - "dev": true, - "requires": { - "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^1.0.4", - "@webpack-cli/info": "^1.3.0", - "@webpack-cli/serve": "^1.5.2", - "colorette": "^1.2.1", - "commander": "^7.0.0", - "execa": "^5.0.0", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^2.2.0", - "rechoir": "^0.7.0", - "v8-compile-cache": "^2.2.0", - "webpack-merge": "^5.7.3" - }, - "dependencies": { - "commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true - } - } - }, - "webpack-merge": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", - "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", - "dev": true, - "requires": { - "clone-deep": "^4.0.1", - "wildcard": "^2.0.0" - } - }, - "webpack-sources": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.1.tgz", - "integrity": "sha512-t6BMVLQ0AkjBOoRTZgqrWm7xbXMBzD+XDq2EZ96+vMfn3qKgsvdXZhbPZ4ElUOpdv4u+iiGe+w3+J75iy/bYGA==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "which-collection": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", - "dev": true, - "requires": { - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-weakmap": "^2.0.1", - "is-weakset": "^2.0.1" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "which-typed-array": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.7.tgz", - "integrity": "sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw==", - "dev": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.7" - } - }, - "wildcard": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", - "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", - "dev": true - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "dev": true, - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - } - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true - } - } -} diff --git a/package.json b/package.json deleted file mode 100644 index c0e5420..0000000 --- a/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "ulog", - "version": "2.0.0-beta.19", - "description": "The universal logger", - "main": "./ulog.js", - "unpkg": "ulog.min.js", - "author": "Stijn de Witt", - "license": "MIT", - "repository": { - "type": "git", - "url": "git+https://github.com/download/ulog.git" - }, - "files": [ - "core", - "mods", - "base.js", - "build.js", - "full.bundle.js", - "full.min.js", - "ulog.bundle.js", - "ulog.js", - "ulog.lazy.min.js", - "ulog.min.js", - "screenshot.jpg", - "screenshot-beta.11.jpg", - "ulog.png", - "webpack.config.js" - ], - "browser": { - "./mods/align/utils.js": "./mods/align/utils.browser.js", - "./mods/colors/utils.js": "./mods/colors/utils.browser.js", - "./mods/config/args.js": "./mods/config/args.browser.js", - "./mods/config/env.js": "./mods/config/env.browser.js", - "./mods/config/read.js": "./mods/config/read.browser.js", - "./mods/config/watch.js": "./mods/config/watch.browser.js", - "./mods/levels/default.js": "./mods/levels/default.browser.js", - "./mods/formats/aligned.js": "./mods/formats/aligned.browser.js", - "./mods/formats/default.js": "./mods/formats/default.browser.js" - }, - "keywords": [ - "ulog", - "log", - "logging", - "console", - "debug", - "loglevel", - "anylogger" - ], - "scripts": { - "build": "webpack --mode production && node ./build.js", - "clean": "rimraf ulog.min.js ulog.lazy.min.js full.min.js", - "test": "nyc tape test.js 2>&1 | tap-nirvana", - "prepare": "npm run test -S && npm run clean -S && npm run build -S" - }, - "dependencies": { - "anylogger": "^1.0.11", - "kurly": "^2.0.0-beta.3" - }, - "devDependencies": { - "gzip-size": "^6.0.0", - "nyc": "^15.1.0", - "rimraf": "^3.0.2", - "sinon": "^11.1.2", - "tap-nirvana": "^1.1.0", - "tap-spec": "^5.0.0", - "tape": "^5.3.1", - "webpack": "^5.52.1", - "webpack-cli": "^4.8.0" - }, - "peerDependencies": { - "anylogger": "^1.0.10" - } -} diff --git a/screenshot-beta.11.jpg b/screenshot-beta.11.jpg deleted file mode 100644 index 25499e3..0000000 Binary files a/screenshot-beta.11.jpg and /dev/null differ diff --git a/screenshot.jpg b/screenshot.jpg deleted file mode 100644 index 8395870..0000000 Binary files a/screenshot.jpg and /dev/null differ diff --git a/style.css b/style.css deleted file mode 100644 index 1fe6048..0000000 --- a/style.css +++ /dev/null @@ -1,155 +0,0 @@ -/* world's smalles reset? */ -*, *::before, *::after {box-sizing: border-box;} -img { max-width: 100%; } - -/* theming */ -:root { - --root-font-family: "Roboto"; - - --root-font-size: 16px; - --body-font-size: min(max( .875rem, calc(.75rem + .6vw)), 1.175rem); - --p-font-size: var(--body-font-size); - --button-font-size: min(max( .875rem, calc(.725rem + 0.62vw)), 1.175rem); - --h6-font-size: min(max( .9rem, calc(.725rem + 1vw)), 1.45rem); - --h5-font-size: min(max( 1rem, calc(.825rem + 1.25vw)), 1.75rem); - --h4-font-size: min(max(1.1rem, calc(0.95rem + 1.5vw)), 2.05rem); - --h3-font-size: min(max(1.25rem, calc(1.1rem + 1.75vw)), 2.37rem); - --h2-font-size: min(max(1.5rem, calc(1.3rem + 2.05vw)), 2.8rem); - --h1-font-size: min(max(1.75rem, calc(1.58rem + 2.5vw)), 3.4rem); - - --main-max-width: min(max( 30rem, calc(20rem + 50vw)), 50rem); - - --body-font-weight: normal; - --p-font-weight: normal; - --button-font-weight: normal; - --h6-font-weight: 500; - --h5-font-weight: 500; - --h4-font-weight: normal; - --h3-font-weight: normal; - --h2-font-weight: normal; - --h1-font-weight: normal; - - --body-color: #444; - --p-color: #444; - --button-color: #000; - --h6-color: #444; - --h5-color: #444; - --h4-color: #111; - --h3-color: #111; - --h2-color: #000; - --h1-color: #000; - - --body-margin-v: min(max(.5rem, calc(.25rem + 3vw)), 2.5rem); - --body-margin-h: var(--body-margin-v); - --body-margin: var(--body-margin-v) var(--body-margin-h); - - --p-margin-v: min(max(.25rem, calc(.1rem + 1vw)), .75rem); - --p-margin-h: 0; - --p-margin: var(--p-margin-v) var(--p-margin-h); - - --h6-margin-v: min(max(.125rem, calc(.1rem + .1vw)), .25rem); - --h6-margin-h: 0; - --h6-margin: var(--h6-margin-v) var(--h6-margin-h); - - --h5-margin-v: min(max(.25rem, calc(.1rem + .25vw)), .5rem); - --h5-margin-h: 0; - --h5-margin: var(--h5-margin-v) var(--h5-margin-h); - - --h4-margin-v: min(max(.5rem, calc(.1rem + .5vw)), .75rem); - --h4-margin-h: 0; - --h4-margin: var(--h4-margin-v) var(--h4-margin-h); - - --h3-margin-v: min(max(.75rem, calc(.1rem + .75vw)), 1rem); - --h3-margin-h: 0; - --h3-margin: var(--h3-margin-v) var(--h3-margin-h); - - --h2-margin-v: min(max(1rem, calc(.1rem + 1vw)), 1.25rem); - --h2-margin-h: 0; - --h2-margin: var(--h2-margin-v) var(--h2-margin-h); - - --h1-margin-v: min(max(1.25rem, calc(.1rem + 1.25vw)), 1.5rem); - --h1-margin-h: 0; - --h1-margin: var(--h1-margin-v) var(--h1-margin-h); - - --button-margin-v: min(max(.25rem, calc(.1rem + .25vw)), .5rem); - --button-margin-h: 0; - --button-margin-l: var(--button-margin-h); - --button-margin-r: min(max(.25rem, calc(.1rem + .25vw)), .5rem); - --button-margin: var(--button-margin-v) var(--button-margin-r) var(--button-margin-h) var(--button-margin-l); - - --img-margin-v: min(max(.25rem, calc(.1rem + 2.5vw)), 1rem); - --img-margin-h: 0; - --img-margin: var(--img-margin-v) var(--img-margin-h); - - --body-padding: 0; - --p-padding: 0; - --h6-padding: 0; - --h5-padding: 0; - --h4-padding: 0; - --h3-padding: 0; - --h2-padding: 0; - --h1-padding: 0; - --button-padding-v: 0.5rem; - --button-padding-h: 1rem; - --button-padding: var(--button-padding-v) var(--button-padding-h); - - --body-line-height: 1.5; - --p-line-height: 1.5; - --h6-line-height: 1.5; - --h5-line-height: 1.45; - --h4-line-height: 1.4; - --h3-line-height: 1.35; - --h2-line-height: 1.3; - --h1-line-height: 1.25; - --button-line-height: 24px; -} - -html { - font-family: var(--root-font-family); - font-size: var(--root-font-size); -} - -body, -.body {font-size: var(--body-font-size); font-weight: var(--body-font-weight); margin: var(--body-margin); padding: var(--body-padding); color: var(--body-color); line-height: var(--body-line-height)} -main, -.main {max-width: var(--main-max-width); margin: 0 auto;} -p, .p {font-size: var(--p-font-size); font-weight: var(--p-font-weight); margin: var(--p-margin); padding: var(--p-padding); color: var(--p-color); line-height: var(--p-line-height)} -h6, .h6 {font-size: var(--h6-font-size); font-weight: var(--h6-font-weight); margin: var(--h6-margin); padding: var(--h6-padding); color: var(--h6-color); line-height: var(--h6-line-height)} -h5, .h5 {font-size: var(--h5-font-size); font-weight: var(--h5-font-weight); margin: var(--h5-margin); padding: var(--h5-padding); color: var(--h5-color); line-height: var(--h5-line-height)} -h4, .h4 {font-size: var(--h4-font-size); font-weight: var(--h4-font-weight); margin: var(--h4-margin); padding: var(--h4-padding); color: var(--h4-color); line-height: var(--h4-line-height)} -h3, .h3 {font-size: var(--h3-font-size); font-weight: var(--h3-font-weight); margin: var(--h3-margin); padding: var(--h3-padding); color: var(--h3-color); line-height: var(--h3-line-height)} -h2, .h2 {font-size: var(--h2-font-size); font-weight: var(--h2-font-weight); margin: var(--h2-margin); padding: var(--h2-padding); color: var(--h2-color); line-height: var(--h2-line-height)} -h1, .h1 {font-size: var(--h1-font-size); font-weight: var(--h1-font-weight); margin: var(--h1-margin); padding: var(--h1-padding); color: var(--h1-color); line-height: var(--h1-line-height)} -button, -.button {font-size: var(--button-font-size); font-weight: var(--button-font-weight); margin: var(--button-margin); padding: var(--button-padding); color: var(--button-color); line-height: var(--button-line-height); - text-transform: uppercase; -} -img, -.img {margin: var(--img-margin)} - -button > i:first-of-type, -button > b:first-of-type { - vertical-align: middle; -} -button > i:first-of-type { - font-size: 24px; - font-weight: bold; - font-style: normal; - margin-right: 8px; -} -button > b:first-of-type { - font-style: normal; -} -summary:hover, -summary:focus, -summary:active { - outline: none; -} -h1 > img, -.h1 > img, -h1 > .img, -.h1 > .img { - max-height: calc(1.2 * var(--h1-font-size)); - margin: 0px var(--button-margin-r) calc(0px - 0.33 * var(--h1-font-size)) 0px; -} - diff --git a/test.js b/test.js deleted file mode 100644 index f26a05e..0000000 --- a/test.js +++ /dev/null @@ -1,2 +0,0 @@ -require('./core/test') -require('./mods/test') diff --git a/tutorial/callstack-mangled.jpg b/tutorial/callstack-mangled.jpg deleted file mode 100644 index eccfefc..0000000 Binary files a/tutorial/callstack-mangled.jpg and /dev/null differ diff --git a/tutorial/callstack-preserved.jpg b/tutorial/callstack-preserved.jpg deleted file mode 100644 index 74468ac..0000000 Binary files a/tutorial/callstack-preserved.jpg and /dev/null differ diff --git a/tutorial/date-and-time.jpg b/tutorial/date-and-time.jpg deleted file mode 100644 index 8d8c843..0000000 Binary files a/tutorial/date-and-time.jpg and /dev/null differ diff --git a/tutorial/filtered-levels.jpg b/tutorial/filtered-levels.jpg deleted file mode 100644 index 933ee86..0000000 Binary files a/tutorial/filtered-levels.jpg and /dev/null differ diff --git a/tutorial/index.html b/tutorial/index.html deleted file mode 100644 index 8723be8..0000000 --- a/tutorial/index.html +++ /dev/null @@ -1,359 +0,0 @@ - - - - ulog tutorial - - - - - - - - - - -
-

Tutorial

-

Follow the instructions to learn ulog as you read.

-

Have fun!

-

Open devtools

-

Open the developer tools (F12)

-

Check the Network tab

-

Switch to the Network tab, reload the page and note that `ulog.min.js` - has loaded.

- -

Enable logging

-

ulog.min.js uses lazy loading to only load the - bulk of the logging code once logging has been enabled.

-

To enable logging, add one of these keys to localStorage: -

-
debug
-
This key sets the selected loggers to debug mode. For example, - debug=my-app will set the logger named 'my-app' to - debug mode, debug=test:* will set all loggers with - names starting with 'test:' to debug and debug=* will - set all loggers to debug. -
-
log
-
This key is like an advanced version of the debug - key, that let's you specify the level to set the loggers to. For - example, log=my-app=info will set the level of the - logger named 'my-app' to info, log=test:*=debug sets - the levels of all loggers with names starting with 'test:' to debug - and log=*=info (or log=info for short) - will set the levels of all loggers to info. -
-
-

- -

Try it

-

Enable logging by setting the log level to warn.

-

You can set localStorage keys in the developer tools:

- -

Alternatively, you can enter the - command localStorage.setItem('log', 'warn') in the - console, or simply press this button:

- -

Enable logging now.

- -

Check the network tab again

- -

Notice how ulog.lazy.min.js has been loaded? - That's lazy loading in action! This allows ulog - to keep a tiny footprint while giving you powerful logging.

- -

Log some messages

-

Press the button to log some messages

- -

If you followed the steps so far, you should see 4 log messages:

- - -

Initially there are 2 loggers defined, test:log1 and - test:log2. When you press the button, the test code loops - through all loggers and logs a message at all levels with each of them. -

- -

Browse the sections below for details and experiment with creating - loggers, changing config etc. Every time you want to test the new - situation, press the button again. -

- -

Named loggers

- -

In ulog all loggers have a name. Currently these loggers are defined:

- -
    -
  • test:log1
  • -
  • test:log2
  • -
- -

You can remove them by pressing the 'x' button.

- -

Creating a new logger

- -

You can create a new logger with this code:

-

anylogger('my:logger')

- You can try this out for yourself in the console, or - you can add new loggers with the text field and button - below:

- - -

Log some more messages to see the - new logger in action. If you followed the steps, you should see - extra messages from the new logger appear.

- - - -

Levels

- -

In ulog, there are 6 log levels:

- - - - - - - - -
Level Value
error 1
warn 2
info 3
log 4
debug 5
trace 6
-

In addition there are the pseudo-levels none - (0) and all (7).

-

To change the level, you can set the key log to - a different value. Let's start by setting the level to - all to see all messages. Enter this code in the - console: localStorage.setItem('log', 'all'), or - press this button:

-

-

Then, Log some messages again. - You should now see a lot more messages appear.

- - -

Native level filters

- -

Possibly, you are not seeing the debug messages; that's - because Chromium-based browsers these days have their own built-in level - filter and by default, 'Verbose' messages are filtered away.

- -

For clarity, it's probably best if you enable Verbose messages in - the browser. ulog gives you much finer control anyway.

-

Setting levels individually

-

Until now, we only set the global log level. But ulog - gives us fine-grained control over the levels of each individual - logger. We do this by specifying patterns and values in the - log configuration. For example, to set the global level to - info, but the level for all loggers whose name starts with - 'test:' to debug, we set - log=info;test:*=debug.

-

You can enter this command in the console:

-

localStorage.setItem('log', 'info;test:*=debug')

-

Or press the button below:

-

-

Log more messages and check the - results.

- - - -

Colors

- -

ulog supports colored logging if the output supports it. - By default this setting is enabled and will give us colors in all modern - browsers and the terminal in Node JS. The colors are based on the - logger name and are consistent across outputs. So if your logger is - blue in one browser, it should also be blue in other browsers and the - terminal. To disable colors, we can set log_color=off by - running this command in the console:

-

localStorage.setItem('log_color', 'off')

-

Or by pressing this button:

-

-

Log some messages again to see - the difference. Personally I think colors make the output easier - to read, but ulog leaves the choice to you.

- -

The orange and red colors for the warn and - error messages in the screenshot above are a native - feature of Chromium-based browsers that are not controlled by - ulog.

-

You can target individual loggers here in the same way as with - levels. For example log_color=off;test:*=on would - enable colors only for those loggers with names starting with - 'test:'.

-

Set log_color=on or press the button below to enable - colors again.

-

-
- - -

Alignment

- -

By default, most browsers add some extra information to - error, warn and sometimes - info messages. While providing useful information, - they influence message indentation, making output harder to read.

-

For those outputs that support it, ulog emits - formatting that compensates for the indentation difference, nicely - aligning the log messages.

-

You can disable this feature by setting log_align=off - by entering the command

-

localStorage.setItem('log_align', 'off') in the console, - or pressing the button below:

-

-

Log more messages and see - the difference.

- -

I think alignment makes the output easier to read. Set - log_align=on again or press the button below to - turn alignment back on:

-

-
- - -

Formatting

- -

Let's talk about formatting. It's here where ulog really - sets itself apart from the crowd. We can easily change the formatting - of the messages emitted by ulog loggers by changing the - log_format setting.

-

For example, let's change the format to include the date and time - a message was logged. We do this by setting - log_format=date time lvl name.

-

-

Now log some messages and check the - resuls.

- -

date, time, lvl and - name are all names of formats that come with - ulog. Check the documentation for a list of - included formats.

-

Click the button below to restore the default format:

-

-
-

Preserves callstack

-

ulog's formatting system has a unique feature: whenever - possible, it preserves the call stack. This may sound like a very - technical feature, but it has very practical consequences. To see what - this is all about, first let's log some messages that are coming from - different files:

-

-

Have a close look at the results. On the right of each message, the - browser adds the filename and line number of the source file where the - message originated from. This is a very useful feature!

- -

ulog uses - kurly to - handle formatting and as long as your format only contains - static tags the callstack will be preserved. For comparison, - let's log some messages with a format that includes - message, a dynamic tag, to see the difference.

-

First, set the format to lvl name message:

-

-

Then, test the callstack again - and compare:

- -

Because message is a dynamic tag, ulog was - unable to preserve the callstack and the result is that now, the - filename and line numbers all point to ulog.lazy.min.js, - which is a lot less useful. But the message is now formatted and - the info messages are colored green. Whatever your - formatting preferences, ulog will always give you the - optimal results.

-

Further reading

-

You have now touched upon most of the features that ulog - includes out of the box. But ulog was written to be - completely modular and extensible. So if you are willing to write - some code, there is a whole lot more you can do with it. For example, - you can add custom formats, custom outputs, or indeed you can write - your own mods that can do... whatever you come up with!

-

Have a look at these sections of - the documentation if you want to - learn more about that:

- -

Thanks for trying ulog!

-
-
-
- - \ No newline at end of file diff --git a/tutorial/lazy-loading.jpg b/tutorial/lazy-loading.jpg deleted file mode 100644 index 62b8d1d..0000000 Binary files a/tutorial/lazy-loading.jpg and /dev/null differ diff --git a/tutorial/local-storage.jpg b/tutorial/local-storage.jpg deleted file mode 100644 index 536c13c..0000000 Binary files a/tutorial/local-storage.jpg and /dev/null differ diff --git a/tutorial/log-messages.jpg b/tutorial/log-messages.jpg deleted file mode 100644 index bbc2eba..0000000 Binary files a/tutorial/log-messages.jpg and /dev/null differ diff --git a/tutorial/my-lib.js b/tutorial/my-lib.js deleted file mode 100644 index ad8af53..0000000 --- a/tutorial/my-lib.js +++ /dev/null @@ -1,6 +0,0 @@ -self.myLib = { - log: function() { - var log = anylogger('my-lib') - log.info('This is my-lib yo!') - } -} \ No newline at end of file diff --git a/tutorial/my-other-lib.js b/tutorial/my-other-lib.js deleted file mode 100644 index 5c6ee73..0000000 --- a/tutorial/my-other-lib.js +++ /dev/null @@ -1,6 +0,0 @@ -self.myOtherLib = { - log: function() { - var log = anylogger('my-other-lib') - log.info('This is my-other-lib') - } -} \ No newline at end of file diff --git a/tutorial/named-loggers.jpg b/tutorial/named-loggers.jpg deleted file mode 100644 index 0b3121f..0000000 Binary files a/tutorial/named-loggers.jpg and /dev/null differ diff --git a/tutorial/native-level-filters.jpg b/tutorial/native-level-filters.jpg deleted file mode 100644 index ff2d2c2..0000000 Binary files a/tutorial/native-level-filters.jpg and /dev/null differ diff --git a/tutorial/network-tab.jpg b/tutorial/network-tab.jpg deleted file mode 100644 index d6fc0ca..0000000 Binary files a/tutorial/network-tab.jpg and /dev/null differ diff --git a/tutorial/no-align.jpg b/tutorial/no-align.jpg deleted file mode 100644 index 1263eff..0000000 Binary files a/tutorial/no-align.jpg and /dev/null differ diff --git a/tutorial/no-colors.jpg b/tutorial/no-colors.jpg deleted file mode 100644 index d5f2719..0000000 Binary files a/tutorial/no-colors.jpg and /dev/null differ diff --git a/tutorial/test.js b/tutorial/test.js deleted file mode 100644 index 7916f1b..0000000 --- a/tutorial/test.js +++ /dev/null @@ -1,8 +0,0 @@ -self.myTest = { - log: function() { - var log = anylogger('test') - log.info('This is a test') - log.info('Notice, how the filename and line numbers') - log.info('shown in the browser are correct.') - } -} \ No newline at end of file diff --git a/tutorial/trace-messages.jpg b/tutorial/trace-messages.jpg deleted file mode 100644 index 4822c59..0000000 Binary files a/tutorial/trace-messages.jpg and /dev/null differ diff --git a/ulog.bundle.js b/ulog.bundle.js deleted file mode 100644 index fc8389b..0000000 --- a/ulog.bundle.js +++ /dev/null @@ -1,37 +0,0 @@ -// ulog - the universal logger -// © 2021 by Stijn de Witt -// License: MIT - -// ulog.bundle.js => ulog.min.js -// this is the bundled version of ulog, for use as an old-fashioned script-include -// bundlers and node will use ulog.js directly -// the ulog bundle implements lazy loading -// If you don't want this, use the full bundle instead. - -// just making sure both ulog and anylogger are available as globals in the script version -module.exports = self.ulog = self.anylogger = require('./base') - -// add a mod to ulog to load logging on-demand -ulog.use({ - watch: { - // watch for changes in these config keys - 'debug,log': - // when changes happen, load the other mods if needed - function(){ - // webpack specific API to lazy load modules - require.ensure( - // ensure these modules are loaded - [ './mods/lazy' ], - // then execute this function, notice require being overridden - function(require){ - // use the overridden require to lazy load the modules - if (ulog.use(require('./mods/lazy'))) { - // re-initialize the loggers if mods were added - ulog.ext() - } - }, - 'ulog.lazy' // chunkname webpack will use: ulog.lazy.min.js - ) - } - } -}) diff --git a/ulog.js b/ulog.js deleted file mode 100644 index 400c4c6..0000000 --- a/ulog.js +++ /dev/null @@ -1,10 +0,0 @@ -// ulog - the universal logger -// © 2021 by Stijn de Witt -// License: MIT -(module.exports = require('./base')).use([ - require('./mods/debug'), - require('./mods/outputs'), - require('./mods/formats'), - require('./mods/colors'), - require('./mods/align'), -]) diff --git a/ulog.png b/ulog.png deleted file mode 100644 index 2d661b4..0000000 Binary files a/ulog.png and /dev/null differ diff --git a/vs/Roboto.woff2 b/vs/Roboto.woff2 deleted file mode 100644 index 8323edd..0000000 Binary files a/vs/Roboto.woff2 and /dev/null differ diff --git a/vs/callstack.jpg b/vs/callstack.jpg deleted file mode 100644 index 821d2e5..0000000 Binary files a/vs/callstack.jpg and /dev/null differ diff --git a/vs/colors.js b/vs/colors.js deleted file mode 100644 index 77e3b4d..0000000 --- a/vs/colors.js +++ /dev/null @@ -1,19 +0,0 @@ -self.colors = { - logWithDebug: function(){ - // code below is tightly coupled to debug - var log = debug('colors') - log('See how different loggers') - log('get different colors. This ') - log('makes reading the log output') - log('much easier.') - }, - logWithUlog: function(){ - // we use anylogger to create the loggers - // so we stay loosely coupled to ulog - var log = anylogger('colors').debug - log('See how different loggers') - log('get different colors. This') - log('makes reading the log output') - log('much easier.') - } -} \ No newline at end of file diff --git a/vs/debug-3.4.2.min.js b/vs/debug-3.4.2.min.js deleted file mode 100644 index ab61db4..0000000 --- a/vs/debug-3.4.2.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).debug=e()}}((function(){return function e(n,t,r){function o(i,c){if(!t[i]){if(!n[i]){var u="function"==typeof require&&require;if(!c&&u)return u(i,!0);if(s)return s(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var f=t[i]={exports:{}};n[i][0].call(f.exports,(function(e){return o(n[i][1][e]||e)}),f,f.exports,e,n,t,r)}return t[i].exports}for(var s="function"==typeof require&&require,i=0;i1)for(var t=1;t=1.5*t;return Math.round(e/t)+" "+r+(o?"s":"")}n.exports=function(e,n){n=n||{};var t=typeof e;if("string"===t&&e.length>0)return function(e){if((e=String(e)).length>100)return;var n=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!n)return;var t=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return t*u;case"weeks":case"week":case"w":return t*c;case"days":case"day":case"d":return t*i;case"hours":case"hour":case"hrs":case"hr":case"h":return t*s;case"minutes":case"minute":case"mins":case"min":case"m":return t*o;case"seconds":case"second":case"secs":case"sec":case"s":return t*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}(e);if("number"===t&&isFinite(e))return n.long?function(e){var n=Math.abs(e);if(n>=i)return a(e,n,i,"day");if(n>=s)return a(e,n,s,"hour");if(n>=o)return a(e,n,o,"minute");if(n>=r)return a(e,n,r,"second");return e+" ms"}(e):function(e){var n=Math.abs(e);if(n>=i)return Math.round(e/i)+"d";if(n>=s)return Math.round(e/s)+"h";if(n>=o)return Math.round(e/o)+"m";if(n>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],3:[function(e,n,t){(function(r){t.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(o=r))}),e.splice(o,0,t)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),n.exports=e("./common")(t);const{formatters:o}=n.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,e("_process"))},{"./common":4,_process:1}],4:[function(e,n,t){n.exports=function(n){function t(e){let n,o,s,i=null;function c(...e){if(!c.enabled)return;const r=c,o=Number(new Date),s=o-(n||o);r.diff=s,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(n,o)=>{if("%%"===n)return"%";i++;const s=t.formatters[o];if("function"==typeof s){const t=e[i];n=s.call(r,t),e.splice(i,1),i--}return n}),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=r,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==i?i:(o!==t.namespaces&&(o=t.namespaces,s=t.enabled(e)),s),set:e=>{i=e}}),"function"==typeof t.init&&t.init(c),c}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map(e=>"-"+e)].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),o=r.length;for(n=0;n{t[e]=n[e]}),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},{ms:2}]},{},[3])(3)})); \ No newline at end of file diff --git a/vs/debug.html b/vs/debug.html deleted file mode 100644 index 1c6d3f3..0000000 --- a/vs/debug.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - ulog vs debug - - - - - - - - - - - - - - - - - -
-

vs debug

-

This page compares ulog to debug.

-

Open devtools

-

Open the browser developer tools (F12).

-

Enable logging

-

No output will be visible until you enable logging. To enable - logging in both debug and ulog, set - debug=*.

- -

You can do this using the developer tools GUI (tab Application in - Chrome), or in the Console tab run this command: - localStorage.setItem('debug', '*'), - or you can press the button below:

-

-
-

Log some messages

- Press the buttons to log messages with both loggers:

- - -

You should get output like this:

- -

ulog monitors the config

-

You may notice that debug is not producing any output, - whereas ulog is. That's because ulog monitors - the configuration at runtime but debug doesn't. So to get - debug to pick up our configuration change, reload the - page (F5). Then, press both buttons again. This time, we can see - debug and ulog output side by side:

- -

The output of ulog and debug is very similar. - Both loggers add the name of the logger to the message and both loggers - show some timing information. Also, both loggers use colors to produce - more clear output. But, there are actually more differences here than - initially meet the eye. -

ulog preserves the callstack

-

One big difference between debug and ulog - is marked with arrows in the screenshot. ulog preserves - the callstack, meaning file names and line numbers shown in the - console point to the client code. This is in big contrast to - debug, which injects it's own formatting function in - the callstack, meaning all file names and line numbers point to that - function in the debug minified source file. Not very - convenient!

-

ulog has configurable formatting

-

debug only allows some tweaks to it's formatting. - ulog allows you to take full control of formatting. - You can change the format for all or some loggers using config - option log_format. For example, let's try adding the time to the - message. Set log_format=time lvl name perf in the - devtools or press the button below:

- - -
- - \ No newline at end of file diff --git a/vs/debug.js b/vs/debug.js deleted file mode 100644 index 1ee57d0..0000000 --- a/vs/debug.js +++ /dev/null @@ -1,10 +0,0 @@ -self.mydebug = { - log: function(){ - // code below is tightly coupled to debug - var log = debug('debug') - log('------------') - log('| debug |') - log('------------') - } -} - diff --git a/vs/enable-debug.jpg b/vs/enable-debug.jpg deleted file mode 100644 index b509bf1..0000000 Binary files a/vs/enable-debug.jpg and /dev/null differ diff --git a/vs/formats.js b/vs/formats.js deleted file mode 100644 index 76d06a1..0000000 --- a/vs/formats.js +++ /dev/null @@ -1,14 +0,0 @@ -self.formats = { - logWithUlog: function(){ - // we go outside the anylogger api here - // this code is now tightly coupled to ulog - // this is why it's better to use external - // config instead of ulog.get and ulog.set - // or logger properties as we use here - // however this is just an example so it's ok - var log = ulog('formats') - log.debug('ulog also feautures configurable formatting') - log.format = 'lvl name time>6' - log.info('Here we changed the format to include the time') - } -} \ No newline at end of file diff --git a/vs/levels.js b/vs/levels.js deleted file mode 100644 index adf81c4..0000000 --- a/vs/levels.js +++ /dev/null @@ -1,14 +0,0 @@ -self.levels = { - logWithUlog: function(){ - // we use anylogger to create the logger - // so we stay framework independent - var log = anylogger('levels') - log.debug('In addition to debug logging, ulog also has levels') - log.trace('This is a trace message') - log.debug('This is a debug message') - log.log('This is a log message') - log.info('This is an info message') - log.warn('This is a warning message') - log.error('This is an error message') - } -} diff --git a/vs/loglevel.html b/vs/loglevel.html deleted file mode 100644 index cb6fd55..0000000 --- a/vs/loglevel.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - ulog vs loglevel - - - - - - - - - - - - - - - - -
-

vs loglevel

-

This page compares ulog to loglevel.

-

Open devtools

-

Open the browser developer tools (F12).

-

TO DO

-
- - \ No newline at end of file diff --git a/vs/loglevel.js b/vs/loglevel.js deleted file mode 100644 index f65b961..0000000 --- a/vs/loglevel.js +++ /dev/null @@ -1,10 +0,0 @@ -self.myloglevel = { - log: function(){ - // code below is tightly coupled to debug - var logger = log.createLogger('loglevel') - logger.info('------------') - logger.info('| loglevel |') - logger.info('------------') - } -} - diff --git a/vs/my-app.js b/vs/my-app.js deleted file mode 100644 index 97d86c3..0000000 --- a/vs/my-app.js +++ /dev/null @@ -1,20 +0,0 @@ -self.myapp = { - logWithDebug: function(){ - // code below is tightly coupled to debug - var log = debug('my-app') - log('Let\'s log some messages with debug!') - log('With debug, every logger has a name') - log('and the name is printed in the output.') - }, - logWithUlog: function(){ - // we use anylogger to create the logger - // so we stay loosely coupled to ulog - var log = anylogger('my-app').debug - log('Let\'s log some messages with ulog!') - log('With ulog, every logger has a name') - log('and the name is printed in the output.') - }, - logWithLogLevel: function(){ - - } -} diff --git a/vs/timings.js b/vs/timings.js deleted file mode 100644 index 33362e6..0000000 --- a/vs/timings.js +++ /dev/null @@ -1,28 +0,0 @@ -self.timings = { - logWithDebug: function(){ - // found a bug in debug... timings don't actually seem to work when - // we recreate the logger on each call. at least not in this version. - // So let's create one logger and use it multiple times... - var log = debug('timings') - log('Notice how the timings of the log calls') - log('are added at the end of the message.') - log('This gives us some extra insight') - setTimeout(function(){ - log('in our app\'s performance.') - }, 256) - }, - - logWithUlog: function(){ - var log = anylogger('timings').debug - log('Also notice how the timings of the log') - log('calls are added before the message') - log('This gives us some extra insight') - setTimeout(function(){ - log('in our app\'s performance.') - }, 256) - }, - - logWithLogLevel: function(){ - - } -} diff --git a/vs/ulog-only.jpg b/vs/ulog-only.jpg deleted file mode 100644 index 9473e23..0000000 Binary files a/vs/ulog-only.jpg and /dev/null differ diff --git a/vs/ulog.js b/vs/ulog.js deleted file mode 100644 index 68262cc..0000000 --- a/vs/ulog.js +++ /dev/null @@ -1,10 +0,0 @@ -self.myulog = { - log: function(){ - // we use anylogger to create the logger - // so we stay loosely coupled to ulog - var log = anylogger('ulog').debug - log('------------') - log('| ulog |') - log('------------') - } -} diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index a2b3d93..0000000 --- a/webpack.config.js +++ /dev/null @@ -1,29 +0,0 @@ -var path = require('path') -var dir = path.resolve(__dirname) -const TerserPlugin = require("terser-webpack-plugin"); - -module.exports = { - node: false, - context: dir, - entry: { - ulog: './ulog.bundle.js', - full: './full.bundle.js', - }, - output: { - path: dir, - filename: '[name].min.js', - environment: { - // The environment supports arrow functions ('() => { ... }'). - arrowFunction: false, - } - }, - devtool: false, - optimization: { - minimize: true, - minimizer: [ - new TerserPlugin({ - extractComments: false, - }), - ], - }, -}