diff options
author | Minteck <contact@minteck.org> | 2021-12-21 16:52:28 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2021-12-21 16:52:28 +0100 |
commit | 46e43f4bde4a35785b4997b81e86cd19f046b69b (patch) | |
tree | c53c2f826f777f9d6b2d249dab556feb72a6c3a6 /src/node_modules/consola | |
download | langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.tar.gz langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.tar.bz2 langdetect-46e43f4bde4a35785b4997b81e86cd19f046b69b.zip |
Commit
Diffstat (limited to 'src/node_modules/consola')
27 files changed, 2178 insertions, 0 deletions
diff --git a/src/node_modules/consola/CHANGELOG.md b/src/node_modules/consola/CHANGELOG.md new file mode 100644 index 0000000..55ef185 --- /dev/null +++ b/src/node_modules/consola/CHANGELOG.md @@ -0,0 +1,685 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## [2.15.0](https://github.com/nuxt/consola/compare/v2.14.0...v2.15.0) (2020-08-05) + + +### Features + +* **types:** use union type for `ConsolaLogObject.type` ([#100](https://github.com/nuxt/consola/issues/100)) ([a6eba53](https://github.com/nuxt/consola/commit/a6eba532381bcec9c84ac5600ac668aca87c8487)) +* support `formatOptions.date` to optionally hide date ([#101](https://github.com/nuxt/consola/issues/101)) ([6bf733f](https://github.com/nuxt/consola/commit/6bf733f2b9a5320584bdd0de7de08f4341c74335)) + +## [2.14.0](https://github.com/nuxt/consola/compare/v2.13.0...v2.14.0) (2020-06-26) + + +### Features + +* improve spam throttle ([5314eee](https://github.com/nuxt/consola/commit/5314eeebb4b564408a4ab14cb457bdbd426f6124)) + +## [2.13.0](https://github.com/nuxt/consola/compare/v2.12.2...v2.13.0) (2020-06-12) + + +### Features + +* remove level boundary check ([8972d47](https://github.com/nuxt/consola/commit/8972d478c93690fafb909f49d9d0edbcb67bddae)) + + +### Bug Fixes + +* **types:** fix silent/verbose levels ([7ab0a65](https://github.com/nuxt/consola/commit/7ab0a65f383d9dd1b68a18ee439bf19468a57885)) + +### [2.12.2](https://github.com/nuxt/consola/compare/v2.12.1...v2.12.2) (2020-05-26) + + +### Bug Fixes + +* silent log level does not work ([#98](https://github.com/nuxt/consola/issues/98)) ([6a4a79c](https://github.com/nuxt/consola/commit/6a4a79c24b8db902b078ad92a6ee7a33880ed26c)) + +### [2.12.1](https://github.com/nuxt/consola/compare/v2.12.0...v2.12.1) (2020-05-07) + + +### Bug Fixes + +* new LogLevel enum is not exported properly [#95](https://github.com/nuxt/consola/issues/95) ([#96](https://github.com/nuxt/consola/issues/96)) ([fafbec2](https://github.com/nuxt/consola/commit/fafbec2b1bc75912eea5d0618a27b982738d6cda)) + +## [2.12.0](https://github.com/nuxt/consola/compare/v2.11.3...v2.12.0) (2020-05-07) + + +### Features + +* **types:** add missing typescript definitions for reporters ([#94](https://github.com/nuxt/consola/issues/94)) ([4a08ef0](https://github.com/nuxt/consola/commit/4a08ef02bc48ddc887f2b91713520eda50793a27)) + +### [2.11.3](https://github.com/nuxt/consola/compare/v2.11.2...v2.11.3) (2019-12-31) + + +### Bug Fixes + +* **typescript:** remove cjs export (fixes [#88](https://github.com/nuxt/consola/issues/88)) ([0d9ab1b](https://github.com/nuxt/consola/commit/0d9ab1bba8645853c721069c57527764ed708869)) + +### [2.11.2](https://github.com/nuxt/consola/compare/v2.11.1...v2.11.2) (2019-12-27) + + +### Bug Fixes + +* **types:** `const consola = require('consola')` type is wrong ([#80](https://github.com/nuxt/consola/issues/80)) ([5c22d8c](https://github.com/nuxt/consola/commit/5c22d8cd4624e3bbd7294b9eba09f131ed786332)) +* throttle expiration ([#81](https://github.com/nuxt/consola/issues/81)) ([940474d](https://github.com/nuxt/consola/commit/940474d3b64a4969acdec04290734e700920c19f)), closes [#68](https://github.com/nuxt/consola/issues/68) + +### [2.11.1](https://github.com/nuxt/consola/compare/v2.11.0...v2.11.1) (2019-12-17) + + +### Bug Fixes + +* **consola:** use `options.stderr` ([#77](https://github.com/nuxt/consola/issues/77)) ([774c673](https://github.com/nuxt/consola/commit/774c6739e794665bc5e2c40aa84921b7f2a26387)) + +## [2.11.0](https://github.com/nuxt/consola/compare/v2.10.0...v2.11.0) (2019-11-10) + + +### Features + +* **browser:** add support of formatted strings ([#66](https://github.com/nuxt/consola/issues/66)) ([920f313](https://github.com/nuxt/consola/commit/920f313dba322c34ccd1b2f08afba59122c3b8e7)) + + +### Bug Fixes + +* typecheck type and tag before normalize ([1984deb](https://github.com/nuxt/consola/commit/1984deb0a5214a3aa82dab972ec76af20ba14d1b)) +* **types:** reporter in remove methods are optional ([#70](https://github.com/nuxt/consola/issues/70)) ([a17cdb1](https://github.com/nuxt/consola/commit/a17cdb1a423e41076c58692130955d5a9f5e36ba)) + +### [2.10.1](https://github.com/nuxt/consola/compare/v2.10.0...v2.10.1) (2019-08-05) + +## [2.10.0](https://github.com/nuxt/consola/compare/v2.9.0...v2.10.0) (2019-08-05) + + +### Bug Fixes + +* add missing typescript declaration for level, stdout and stderr ([#58](https://github.com/nuxt/consola/issues/58)) ([a149dbb](https://github.com/nuxt/consola/commit/a149dbb)) + + +### Features + +* improve typescript type definitions ([#57](https://github.com/nuxt/consola/issues/57)) ([80eefd8](https://github.com/nuxt/consola/commit/80eefd8)) + +## [2.9.0](https://github.com/nuxt/consola/compare/v2.8.0...v2.9.0) (2019-06-18) + + +### Features + +* count spam log ([197a6b3](https://github.com/nuxt/consola/commit/197a6b3)) + + + +## [2.8.0](https://github.com/nuxt/consola/compare/v2.7.1...v2.8.0) (2019-06-18) + + +### Features + +* spam preventation ([7da806b](https://github.com/nuxt/consola/commit/7da806b)) + + + +### [2.7.1](https://github.com/nuxt/consola/compare/v2.7.0...v2.7.1) (2019-05-26) + + +### Bug Fixes + +* **browser:** hide `:` with tag and normal log ([8250d5a](https://github.com/nuxt/consola/commit/8250d5a)) + + + +## [2.7.0](https://github.com/nuxt/consola/compare/v2.6.2...v2.7.0) (2019-05-26) + + +### Bug Fixes + +* correctly calculate line width when using grave accent ([bad52bd](https://github.com/nuxt/consola/commit/bad52bd)) + + +### Features + +* always hide right side on width < 80 ([07d8246](https://github.com/nuxt/consola/commit/07d8246)) +* improve basic logs ([ea6ce59](https://github.com/nuxt/consola/commit/ea6ce59)) +* **browser:** fancier logs ([b64f337](https://github.com/nuxt/consola/commit/b64f337)) +* hide time from basic logger as it is commonly used in CI environments ([68c3bae](https://github.com/nuxt/consola/commit/68c3bae)) +* smart hide time and tag when there is no space ([00a375f](https://github.com/nuxt/consola/commit/00a375f)) + + + +### [2.6.2](https://github.com/nuxt/consola/compare/v2.6.1...v2.6.2) (2019-05-15) + + +### Bug Fixes + +* transpile browser dist to ES5 ([1f81eea](https://github.com/nuxt/consola/commit/1f81eea)), closes [nuxt/nuxt.js#5743](https://github.com/nuxt/consola/issues/5743) + + + +### [2.6.1](https://github.com/nuxt/consola/compare/v2.6.0...v2.6.1) (2019-05-08) + + +### Bug Fixes + +* **browser:** use `console.warn` when possible ([#49](https://github.com/nuxt/consola/issues/49)) ([e386ede](https://github.com/nuxt/consola/commit/e386ede)) + + + +# [2.6.0](https://github.com/nuxt/consola/compare/v2.5.8...v2.6.0) (2019-04-12) + + +### Features + +* expose constructor and reporters ([3a8f662](https://github.com/nuxt/consola/commit/3a8f662)) + + + +## [2.5.8](https://github.com/nuxt/consola/compare/v2.5.7...v2.5.8) (2019-03-29) + + +### Bug Fixes + +* **types:** allow passing extra arguments ([#46](https://github.com/nuxt/consola/issues/46)) ([d29fc46](https://github.com/nuxt/consola/commit/d29fc46)) + + + +## [2.5.7](https://github.com/nuxt/consola/compare/v2.5.6...v2.5.7) (2019-03-19) + + +### Bug Fixes + +* **formatting:** fix formatting when multiple back-quotes ([#44](https://github.com/nuxt/consola/issues/44)) ([669a12e](https://github.com/nuxt/consola/commit/669a12e)) + + + +## [2.5.6](https://github.com/nuxt/consola/compare/v2.5.5...v2.5.6) (2019-02-25) + + +### Bug Fixes + +* **ts:** revert export consola ts declarations ([#43](https://github.com/nuxt/consola/issues/43)) ([6bd4f85](https://github.com/nuxt/consola/commit/6bd4f85)) + + + +<a name="2.4.1"></a> +## [2.4.1](https://github.com/nuxt/consola/compare/v2.4.0...v2.4.1) (2019-02-12) + + +### Bug Fixes + +* **ts:** set type "any" ([#40](https://github.com/nuxt/consola/issues/40)) ([ea9d551](https://github.com/nuxt/consola/commit/ea9d551)) + + + +<a name="2.4.0"></a> +# [2.4.0](https://github.com/nuxt/consola/compare/v2.3.2...v2.4.0) (2019-02-05) + + +### Bug Fixes + +* **esm:** fix esm compatibility ([8ddecc3](https://github.com/nuxt/consola/commit/8ddecc3)) +* **consola:** return `this` in setReporters ([544a887](https://github.com/nuxt/consola/commit/544a887)) +* **types:** set message type to "any" ([#39](https://github.com/nuxt/consola/issues/39)) ([ff97b09](https://github.com/nuxt/consola/commit/ff97b09)), closes [#38](https://github.com/nuxt/consola/issues/38) + +### Features + +* **types:** update types ([d0d7455](https://github.com/nuxt/consola/commit/d0d7455)) + + + +<a name="2.3.2"></a> +## [2.3.2](https://github.com/nuxt/consola/compare/v2.3.1...v2.3.2) (2019-01-06) + + +### Bug Fixes + +* **types:** add some of the missing types ([#35](https://github.com/nuxt/consola/issues/35)) ([5e3e69b](https://github.com/nuxt/consola/commit/5e3e69b)) +* ignore winston dep in webpack ([#37](https://github.com/nuxt/consola/issues/37)) ([e534a28](https://github.com/nuxt/consola/commit/e534a28)) + + + +<a name="2.3.1"></a> +## [2.3.1](https://github.com/nuxt/consola/compare/v2.3.0...v2.3.1) (2019-01-02) + + +### Bug Fixes + +* bypass webpack for lazy required version of winston ([500b509](https://github.com/nuxt/consola/commit/500b509)) + + + +<a name="2.3.0"></a> +# [2.3.0](https://github.com/nuxt/consola/compare/v2.2.6...v2.3.0) (2018-11-19) + + +### Bug Fixes + +* **isLogObj:** handle non-standard error objects ([8748c81](https://github.com/nuxt/consola/commit/8748c81)) + + +### Features + +* browser reporter improvements ([591d0b4](https://github.com/nuxt/consola/commit/591d0b4)), closes [#31](https://github.com/nuxt/consola/issues/31) +* **fancy:** look like jest traces ([ecae238](https://github.com/nuxt/consola/commit/ecae238)) + + + +<a name="2.2.6"></a> +## [2.2.6](https://github.com/nuxt/consola/compare/v2.2.5...v2.2.6) (2018-11-14) + + +### Bug Fixes + +* **json-reporter:** add a default value to the constructor ([#33](https://github.com/nuxt/consola/issues/33)) ([c59db36](https://github.com/nuxt/consola/commit/c59db36)) + + + +<a name="2.2.5"></a> +## [2.2.5](https://github.com/nuxt/consola/compare/v2.2.4...v2.2.5) (2018-11-14) + + +### Bug Fixes + +* expose typescript typings ([f0398ed](https://github.com/nuxt/consola/commit/f0398ed)) + + + +<a name="2.2.4"></a> +## [2.2.4](https://github.com/nuxt/consola/compare/v2.2.3...v2.2.4) (2018-11-08) + + +### Bug Fixes + +* use basic reporter only for ci and test environments ([33220e4](https://github.com/nuxt/consola/commit/33220e4)) + + + +<a name="2.2.3"></a> +## [2.2.3](https://github.com/nuxt/consola/compare/v2.2.2...v2.2.3) (2018-11-07) + + +### Bug Fixes + +* **fancy:** honor logObj.icon ([d56fa38](https://github.com/nuxt/consola/commit/d56fa38)) + + + +<a name="2.2.2"></a> +## [2.2.2](https://github.com/nuxt/consola/compare/v2.2.1...v2.2.2) (2018-11-04) + + +### Bug Fixes + +* update std-env to 2.1.1 ([32a9c67](https://github.com/nuxt/consola/commit/32a9c67)) + + + +<a name="2.2.1"></a> +## [2.2.1](https://github.com/nuxt/consola/compare/v2.2.0...v2.2.1) (2018-11-04) + + +### Bug Fixes + +* remove file:// from error stack traces ([ff24b69](https://github.com/nuxt/consola/commit/ff24b69)) + + + +<a name="2.2.0"></a> +# [2.2.0](https://github.com/nuxt/consola/compare/v2.1.1...v2.2.0) (2018-11-04) + + +### Bug Fixes + +* correctly handle falsy values ([367fb19](https://github.com/nuxt/consola/commit/367fb19)) + + +### Features + +* support formatOptions. resolves [#29](https://github.com/nuxt/consola/issues/29). ([7ed640f](https://github.com/nuxt/consola/commit/7ed640f)) + + + +<a name="2.1.1"></a> +## [2.1.1](https://github.com/nuxt/consola/compare/v2.1.0...v2.1.1) (2018-11-03) + + +### Bug Fixes + +* add legacy ready and start levels for more backward compatibility ([f54b5c2](https://github.com/nuxt/consola/commit/f54b5c2)) + + + +<a name="2.1.0"></a> +# [2.1.0](https://github.com/nuxt/consola/compare/v2.0.9...v2.1.0) (2018-11-03) + + +### Features + +* add aliases ([cbea7bd](https://github.com/nuxt/consola/commit/cbea7bd)) +* mockTypes for easy mocking ([a332890](https://github.com/nuxt/consola/commit/a332890)) + + + +<a name="2.0.9"></a> +## [2.0.9](https://github.com/nuxt/consola/compare/v2.0.8...v2.0.9) (2018-11-03) + + + +<a name="2.0.8"></a> +## [2.0.8](https://github.com/nuxt/consola/compare/v2.0.7...v2.0.8) (2018-11-03) + + + +<a name="2.0.7"></a> +## [2.0.7](https://github.com/nuxt/consola/compare/v2.0.6...v2.0.7) (2018-11-02) + + +### Bug Fixes + +* always use computed values for stdout/stderr ([f91abc0](https://github.com/nuxt/consola/commit/f91abc0)) + + + +<a name="2.0.6"></a> +## [2.0.6](https://github.com/nuxt/consola/compare/v2.0.5...v2.0.6) (2018-11-02) + + + +<a name="2.0.5"></a> +## [2.0.5](https://github.com/nuxt/consola/compare/v2.0.4...v2.0.5) (2018-11-02) + + + +<a name="2.0.4"></a> +## [2.0.4](https://github.com/nuxt/consola/compare/v2.0.3...v2.0.4) (2018-11-02) + + +### Bug Fixes + +* **fancy:** remove extra icons ([b66fde0](https://github.com/nuxt/consola/commit/b66fde0)) + + + +<a name="2.0.3"></a> +## [2.0.3](https://github.com/nuxt/consola/compare/v2.0.2...v2.0.3) (2018-11-02) + + +### Bug Fixes + +* **pkg:** exclude src from package ([4b1fb7d](https://github.com/nuxt/consola/commit/4b1fb7d)) +* use live console._stdout bindings for default stream ([d9573c3](https://github.com/nuxt/consola/commit/d9573c3)) + + + +<a name="2.0.2"></a> +## [2.0.2](https://github.com/nuxt/consola/compare/v2.0.1...v2.0.2) (2018-11-02) + + +### Bug Fixes + +* **error:** always strip first line from stack ([3afa9aa](https://github.com/nuxt/consola/commit/3afa9aa)) + + + +<a name="2.0.1"></a> +## [2.0.1](https://github.com/nuxt/consola/compare/v2.0.0...v2.0.1) (2018-11-02) + + +### Bug Fixes + +* **fancy:** use proper color for log paths ([7c75283](https://github.com/nuxt/consola/commit/7c75283)) + + + +<a name="2.0.0"></a> +# [2.0.0](https://github.com/nuxt/consola/compare/v2.0.0-2...v2.0.0) (2018-11-02) + + + +<a name="2.0.0-2"></a> +# [2.0.0-2](https://github.com/nuxt/consola/compare/v2.0.0-1...v2.0.0-2) (2018-11-02) + + +### Bug Fixes + +* add methods for legacy support ([4bdd034](https://github.com/nuxt/consola/commit/4bdd034)) +* preserve additional new lines ([340a001](https://github.com/nuxt/consola/commit/340a001)) +* update std-env to 2.1.0 ([2dc2a50](https://github.com/nuxt/consola/commit/2dc2a50)) + + +### Features + +* support badge with fancy ([38600fe](https://github.com/nuxt/consola/commit/38600fe)) + + + +<a name="2.0.0-1"></a> +# [2.0.0-1](https://github.com/nuxt/consola/compare/v2.0.0-0...v2.0.0-1) (2018-10-31) + + + +<a name="2.0.0-0"></a> +# [2.0.0-0](https://github.com/nuxt/consola/compare/v1.4.4...v2.0.0-0) (2018-10-31) + + +### Bug Fixes + +* add schmance.js ([2929648](https://github.com/nuxt/consola/commit/2929648)) +* **docs:** update readme ([#22](https://github.com/nuxt/consola/issues/22)) ([e75f2a0](https://github.com/nuxt/consola/commit/e75f2a0)) +* add default/undefined color for browser ([39584d2](https://github.com/nuxt/consola/commit/39584d2)) +* add missing parseStack import ([da53dee](https://github.com/nuxt/consola/commit/da53dee)) +* also copy symbols in assignGlobalReference ([b0eefb5](https://github.com/nuxt/consola/commit/b0eefb5)) +* don't return this when calling log functions ([f07e056](https://github.com/nuxt/consola/commit/f07e056)) +* fix badge display ([e036eed](https://github.com/nuxt/consola/commit/e036eed)) +* fix main field ([4b56e48](https://github.com/nuxt/consola/commit/4b56e48)) +* fix typos ([45e2f99](https://github.com/nuxt/consola/commit/45e2f99)) +* handle null value of obj for assignToLogObj ([d2402af](https://github.com/nuxt/consola/commit/d2402af)) +* improve browser packaging ([4d8c8d0](https://github.com/nuxt/consola/commit/4d8c8d0)) +* lint ([f909761](https://github.com/nuxt/consola/commit/f909761)) +* lint ([d976620](https://github.com/nuxt/consola/commit/d976620)) +* only one color ending parameter is enough ([d213634](https://github.com/nuxt/consola/commit/d213634)) +* readme: icon string length is digit ([31f1894](https://github.com/nuxt/consola/commit/31f1894)) +* remove name assignment ([8d59075](https://github.com/nuxt/consola/commit/8d59075)) +* remove pushes for better readability ([418d84a](https://github.com/nuxt/consola/commit/418d84a)) +* rename private fields ([244fe5c](https://github.com/nuxt/consola/commit/244fe5c)) +* rename require test file ([cfc8f9e](https://github.com/nuxt/consola/commit/cfc8f9e)) +* return earlier on not displaying levels ([cfdcf04](https://github.com/nuxt/consola/commit/cfdcf04)) +* support Error as logObject ([134ff54](https://github.com/nuxt/consola/commit/134ff54)) +* text color comment ([9336fbc](https://github.com/nuxt/consola/commit/9336fbc)) +* update demo ([3842e0e](https://github.com/nuxt/consola/commit/3842e0e)) +* use symbols for private property access ([8e6343c](https://github.com/nuxt/consola/commit/8e6343c)) + + +### Code Refactoring + +* additionalStyle ~> additionalColor ([3f808e9](https://github.com/nuxt/consola/commit/3f808e9)) + + +### Features + +* add __VERSION__ to consola prototype ([982c8ca](https://github.com/nuxt/consola/commit/982c8ca)) +* add assignGlobalConsola helper ([1af28f7](https://github.com/nuxt/consola/commit/1af28f7)) +* add getter/setter for level ([7af5ed5](https://github.com/nuxt/consola/commit/7af5ed5)) +* add global.consola ([4da784d](https://github.com/nuxt/consola/commit/4da784d)) +* add shmancy reporter ([dc6121a](https://github.com/nuxt/consola/commit/dc6121a)) +* add symbols to browser ([30cd4f0](https://github.com/nuxt/consola/commit/30cd4f0)) +* add sync/async write ([8525525](https://github.com/nuxt/consola/commit/8525525)) +* add typescript typings ([#24](https://github.com/nuxt/consola/issues/24)) ([0853a6f](https://github.com/nuxt/consola/commit/0853a6f)) +* align basic and fancy reporter tags ([38a4729](https://github.com/nuxt/consola/commit/38a4729)) +* better stack formater ([f5acb3c](https://github.com/nuxt/consola/commit/f5acb3c)) +* detect version changes and throw a warning ([73bdd1a](https://github.com/nuxt/consola/commit/73bdd1a)) +* improve packaging and exports ([90da862](https://github.com/nuxt/consola/commit/90da862)) +* improve packaging for browser support ([47af1df](https://github.com/nuxt/consola/commit/47af1df)) +* initial works for v2.0.0 ([455b6f9](https://github.com/nuxt/consola/commit/455b6f9)) +* log formatting using printf ([2afb025](https://github.com/nuxt/consola/commit/2afb025)) +* no more side effects ([c015c31](https://github.com/nuxt/consola/commit/c015c31)) +* pause/resume ([f217cc1](https://github.com/nuxt/consola/commit/f217cc1)) +* return new consola instance with consola.create ([4ae3614](https://github.com/nuxt/consola/commit/4ae3614)) +* rework _createLogFn with better argument handling ([2d4af39](https://github.com/nuxt/consola/commit/2d4af39)) +* scope inheritance support ([#23](https://github.com/nuxt/consola/issues/23)) ([0070c54](https://github.com/nuxt/consola/commit/0070c54)) +* **fancy/basic:** support logObj.stack field ([aa2216f](https://github.com/nuxt/consola/commit/aa2216f)) +* setReporters, withDefaults and withTag ([912446f](https://github.com/nuxt/consola/commit/912446f)) +* showType option ([ed294e4](https://github.com/nuxt/consola/commit/ed294e4)) +* style browser reporter ([d39684d](https://github.com/nuxt/consola/commit/d39684d)) +* support all chalk colors ([2cec678](https://github.com/nuxt/consola/commit/2cec678)), closes [#20](https://github.com/nuxt/consola/issues/20) +* wrapConsole ([3962a1f](https://github.com/nuxt/consola/commit/3962a1f)) +* wrapStd ([f8bfbeb](https://github.com/nuxt/consola/commit/f8bfbeb)) +* write error and warns to process.stderr by default ([6565254](https://github.com/nuxt/consola/commit/6565254)) + + +### Performance Improvements + +* **basic:** refactor getWriteMethod ([c52db69](https://github.com/nuxt/consola/commit/c52db69)) +* remove all DEPRECATED helpers for less bundle size ([fe39d37](https://github.com/nuxt/consola/commit/fe39d37)) + + +### BREAKING CHANGES + +* Use new additionalColor prop +* lot's of internals had been changed. +* Behavior may be changed in some conditions + + + +<a name="1.4.4"></a> +## [1.4.4](https://github.com/nuxt/consola/compare/v1.4.3...v1.4.4) (2018-10-13) + + +### Bug Fixes + +* add global.consola ([558cae5](https://github.com/nuxt/consola/commit/558cae5)) + + + +<a name="1.4.3"></a> +## [1.4.3](https://github.com/nuxt/consola/compare/v1.4.2...v1.4.3) (2018-08-18) + + +### Bug Fixes + +* use more compatible string to clear the console ([82ce410](https://github.com/nuxt/consola/commit/82ce410)) + + + +<a name="1.4.2"></a> +## [1.4.2](https://github.com/nuxt/consola/compare/v1.4.1...v1.4.2) (2018-08-12) + + +### Bug Fixes + +* cannot set level as 0 in options ([4c1ecce](https://github.com/nuxt/consola/commit/4c1ecce)) + + + +<a name="1.4.1"></a> +## [1.4.1](https://github.com/nuxt/consola/compare/v1.4.0...v1.4.1) (2018-05-27) + + +### Bug Fixes + +* **fancy:** logObj.type ([418be28](https://github.com/nuxt/consola/commit/418be28)) + + + +<a name="1.4.0"></a> +# [1.4.0](https://github.com/nuxt/consola/compare/v1.3.0...v1.4.0) (2018-05-27) + + +### Features + +* support custom additional style ([#18](https://github.com/nuxt/consola/issues/18)) ([7a750bf](https://github.com/nuxt/consola/commit/7a750bf)) +* **fancy:** support icon field ([0123bed](https://github.com/nuxt/consola/commit/0123bed)) + + + +<a name="1.3.0"></a> +# [1.3.0](https://github.com/nuxt/consola/compare/v1.2.0...v1.3.0) (2018-04-15) + + +### Bug Fixes + +* **reporters/fancy:** extra space for additional ([efeab44](https://github.com/nuxt/consola/commit/efeab44)) +* prevent duplicate consola instances when different versions used by packages ([0bce262](https://github.com/nuxt/consola/commit/0bce262)) + + +### Features + +* support extra log arguments ([8b6d3d2](https://github.com/nuxt/consola/commit/8b6d3d2)) + + + +<a name="1.2.0"></a> +# [1.2.0](https://github.com/nuxt/consola/compare/v1.1.4...v1.2.0) (2018-04-02) + + +### Features + +* **basic:** support additional field ([b50cad8](https://github.com/nuxt/consola/commit/b50cad8)) +* improve packaging ([158e8ef](https://github.com/nuxt/consola/commit/158e8ef)) + + +### Performance Improvements + +* require needed lodash methods only ([91065e4](https://github.com/nuxt/consola/commit/91065e4)) + + + +<a name="1.1.4"></a> +## [1.1.4](https://github.com/nuxt/consola/compare/v1.1.3...v1.1.4) (2018-03-31) + + +### Bug Fixes + +* **package:** add chalk to dependencies ([3f738e9](https://github.com/nuxt/consola/commit/3f738e9)) + + + +<a name="1.1.3"></a> +## [1.1.3](https://github.com/nuxt/consola/compare/v1.1.2...v1.1.3) (2018-03-31) + + +### Bug Fixes + +* only include dist and src in package ([8b477ec](https://github.com/nuxt/consola/commit/8b477ec)) + + + +<a name="1.1.2"></a> +## [1.1.2](https://github.com/nuxt/consola/compare/v1.1.1...v1.1.2) (2018-03-31) + + +### Bug Fixes + +* handle null and undefined calls ([1f98bb1](https://github.com/nuxt/consola/commit/1f98bb1)) + + + +<a name="1.1.1"></a> +## [1.1.1](https://github.com/nuxt/consola/compare/v1.1.0...v1.1.1) (2018-03-31) + + +### Bug Fixes + +* add prepublish script ([8dd8700](https://github.com/nuxt/consola/commit/8dd8700)) + + + +<a name="1.1.0"></a> +# [1.1.0](https://github.com/nuxt/consola/compare/v1.0.0...v1.1.0) (2018-03-31) + + +### Features + +* rewrite FancyReporter without ora ([73c1ddc](https://github.com/nuxt/consola/commit/73c1ddc)) + + + +<a name="1.0.0"></a> +# [1.0.0](https://github.com/nuxt/consola/compare/v0.1.0...v1.0.0) (2018-03-31) + + + +<a name="0.1.0"></a> +# 0.1.0 (2018-03-31) + + +### Features + +* add log type for console compability ([96a8162](https://github.com/nuxt/consola/commit/96a8162)) diff --git a/src/node_modules/consola/README.md b/src/node_modules/consola/README.md new file mode 100644 index 0000000..a516fcb --- /dev/null +++ b/src/node_modules/consola/README.md @@ -0,0 +1,287 @@ +<p align="center"> + <h1>🐨 Consola</h1> + <span>Elegant Console Logger for Node.js and Browser</span> +</p> + +[![Standard JS][standard-js-src]][standard-js-href] +[![npm version][npm-version-src]][npm-version-href] +[![npm downloads][npm-downloads-src]][npm-downloads-href] +[![package phobia][package-phobia-src]][package-phobia-href] +[![bundle phobia][bundle-phobia-src]][bundle-phobia-href] + +## Why Consola? + +- Easy to use +- Fancy output with fallback for minimal environments +- Pluggable reporters +- Consistent command line interface (CLI) experience +- Tag support +- Redirect `console` and `stdout/stderr` to the consola and easily restore redirect. +- Browser support +- Pause/Resume support +- Mocking support +- Spam prevention by throttling logs + +## Installation + +Using yarn: + +```bash +yarn add consola +``` + +Using npm: + +```bash +npm i consola +``` + +## Getting Started + +```js +const consola = require('consola') + +// See types section for all available types + +consola.success('Built!') +consola.info('Reporter: Some info') +consola.error(new Error('Foo')) +``` + +Will display in the terminal: + +![Screenshot 2020-01-28 at 14 15 15](https://user-images.githubusercontent.com/904724/73267133-af6b2f00-41d8-11ea-9f16-4a8243d19c43.png) + +**NOTE:** Alternatively, you can import consola from source. But don't forget to whitelist it for transpilation: + +```js +import consola from 'consola/src/node' +import consola from 'consola/src/browser' +``` + +## Methods + +#### `<type>(logObject)` `<type>(args...)` + +Log to all reporters. + +Example: `consola.info('Message')` + +A list of available types can be found [here](./src/types.js). + +#### `addReporter(reporter)` + +- Aliases: `add` + +Register a custom reporter instance. + +#### `removeReporter(reporter?)` + +- Aliases: `remove`, `clear` + +Remove a registered reporter. + +If no arguments are passed all reporters will be removed. + +#### `setReporters(reporter|reporter[])` + +Replace all reporters. + +#### `create(options)` + +Create a new `Consola` instance and inherit all parent options for defaults. + +#### `withDefaults(defaults)` + +Create a new `Consola` instance with provided defaults + +#### `withTag(tag)` + +- Aliases: `withScope` + +Create a new `Consola` instance with that tag. + +#### `wrapConsole()` `restoreConsole()` + +Globally redirect all `console.log`, etc calls to consola handlers. + +#### `wrapStd()` `restoreStd()` + +Globally redirect all stdout/stderr outputs to consola. + +#### `wrapAll()` `restoreAll()` + +Wrap both, std and console. + +console uses std in the underlying so calling `wrapStd` redirects console too. +Benefit of this function is that things like `console.info` will be correctly redirected to the corresponding type. + +#### `pauseLogs()` `resumeLogs()` + +- Aliases: `pause`/`resume` + +**Globally** pause and resume logs. + +Consola will enqueue all logs when paused and then sends them to the reported when resumed. + +#### `mockTypes` + +- Aliases: `mock` + +Mock all types. Useful for using with tests. + +The first argument passed to `mockTypes` should be a callback function accepting `(typeName, type)` and returning the mocked value: + +```js +consola.mockTypes((typeName, type) => jest.fn()) +``` + +Please note that with the example above, everything is mocked independently for each type. If you need one mocked fn create it outside: + +```js +const fn = jest.fn() +consola.mockTypes(() => fn) +``` + +If callback function returns a _falsy_ value, that type won't be mocked. + +For example if you just need to mock `consola.fatal`: + +```js +consola.mockTypes((typeName) => typeName === 'fatal' && jest.fn()) +``` + +**NOTE:** Any instance of consola that inherits the mocked instance, will apply provided callback again. +This way, mocking works for `withTag` scoped loggers without need to extra efforts. + +## Fields + +#### `reporters` + +An array of active reporters. + +#### `level` + +The level to display logs. Any logs at or above this level will be displayed. +List of available levels [here](./src/types.js). + +You can set log level using `CONSOLA_LEVEL` environment variable. + +## `logObject` + +The `logObject` is a free-to-extend object which will be passed to reporters. + +Standard fields: + +- `message` +- `additional` +- `args` +- `date` +- `tag` + +Extra fields: + +- `badge` + +## Reporters + +Choose between one of the built-in reporters or bring in your own one. + +By default `FancyReporter` is registered for modern terminals or `BasicReporter` will be used if running in limited environments such as CIs. + +Available reporters: + +- [BasicReporter](./src/reporters/basic.js) +- [FancyReporter](./src/reporters/fancy.js) +- [JSONReporter](./src/reporters/json.js) +- [WinstonReporter](./src/reporters/winston.js) + +### Creating your own reporter + +A reporter (class or object) exposes `log(logObj)` method. +To get more info about how to write your own reporter, take a look into the linked implementations above. + +## Types + +Types are used to actually log messages to the reporters. +Each type is attached to a _logging level_. + +A list of all available default types is [here](./src/types.js). + +## Creating a new instance + +Consola has a global instance and is recommended to use everywhere. +In case more control is needed, create a new instance. + +```js +import consola from 'consola' + +const logger = consola.create({ + // level: 4, + reporters: [ + new consola.JSONReporter() + ], + defaults: { + additionalColor: 'white' + } +}) +``` + +## Integrations + +### With jest + +```js +describe('your-consola-mock-test', () => { + beforeAll(() => { + // Redirect std and console to consola too + // Calling this once is sufficient + consola.wrapAll() + }) + + beforeEach(() => { + // Re-mock consola before each test call to remove + // calls from before + consola.mockTypes(() => jest.fn()) + }) + + + test('your test', async () => { + // Some code here + + // Let's retrieve all messages of `consola.log` + // Get the mock and map all calls to their first argument + const consolaMessages = consola.log.mock.calls.map(c => c[0]) + expect(consolaMessages).toContain('your message') + }) + +}) +``` + +### With jsdom + +```js +{ + virtualConsole: new jsdom.VirtualConsole().sendTo(consola) +} +``` + +## License + +MIT - Made with 💖 By Nuxt.js team! + +<!-- Refs --> +[standard-js-src]: https://flat.badgen.net/badge/code%20style/standard/green +[standard-js-href]: https://standardjs.com + +[npm-version-src]: https://flat.badgen.net/npm/v/consola/latest +[npm-version-href]: https://npmjs.com/package/consola + +[npm-downloads-src]: https://flat.badgen.net/npm/dt/consola +[npm-downloads-href]: https://npmjs.com/package/consola + +[package-phobia-src]: https://flat.badgen.net/packagephobia/install/consola +[package-phobia-href]: https://packagephobia.now.sh/result?p=consola + +[bundle-phobia-src]: https://flat.badgen.net/bundlephobia/minzip/consola +[bundle-phobia-href]: https://bundlephobia.com/result?p=consola diff --git a/src/node_modules/consola/dist/consola.browser.js b/src/node_modules/consola/dist/consola.browser.js new file mode 100644 index 0000000..3e4d7e7 --- /dev/null +++ b/src/node_modules/consola/dist/consola.browser.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).consola=e()}(this,(function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function r(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function i(t){return function(t){if(Array.isArray(t))return l(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||a(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}function u(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=a(t))){var e=0,r=function(){};return{s:r,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,n,s=!0,i=!1;return{s:function(){o=t[Symbol.iterator]()},n:function(){var t=o.next();return s=t.done,t},e:function(t){i=!0,n=t},f:function(){try{s||null==o.return||o.return()}finally{if(i)throw n}}}}var c={};c[c.Fatal=0]="Fatal",c[c.Error=0]="Error",c[c.Warn=1]="Warn",c[c.Log=2]="Log",c[c.Info=3]="Info",c[c.Success=3]="Success",c[c.Debug=4]="Debug",c[c.Trace=5]="Trace",c[c.Silent=-1/0]="Silent",c[c.Verbose=1/0]="Verbose";var f={silent:{level:-1},fatal:{level:c.Fatal},error:{level:c.Error},warn:{level:c.Warn},log:{level:c.Log},info:{level:c.Info},success:{level:c.Success},debug:{level:c.Debug},trace:{level:c.Trace},verbose:{level:c.Trace},ready:{level:c.Info},start:{level:c.Info}};function p(t){return e=t,"[object Object]"===Object.prototype.toString.call(e)&&(!(!t.message&&!t.args)&&!t.stack);var e}var h=!1,y=[],d=function(){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var o in t(this,e),this._reporters=r.reporters||[],this._types=r.types||f,this.level=void 0!==r.level?r.level:3,this._defaults=r.defaults||{},this._async=void 0!==r.async?r.async:void 0,this._stdout=r.stdout,this._stderr=r.stderr,this._mockFn=r.mockFn,this._throttle=r.throttle||1e3,this._throttleMin=r.throttleMin||5,this._types)this[o]=this._wrapLogFn(Object.assign({type:o},this._types[o],this._defaults));this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}return r(e,[{key:"create",value:function(t){return new e(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},t))}},{key:"withDefaults",value:function(t){return this.create({defaults:Object.assign({},this._defaults,t)})}},{key:"withTag",value:function(t){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+t:t})}},{key:"addReporter",value:function(t){return this._reporters.push(t),this}},{key:"removeReporter",value:function(t){if(t){var e=this._reporters.indexOf(t);if(e>=0)return this._reporters.splice(e,1)}else this._reporters.splice(0);return this}},{key:"setReporters",value:function(t){return this._reporters=Array.isArray(t)?t:[t],this}},{key:"wrapAll",value:function(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function(){for(var t in this._types)console["__"+t]||(console["__"+t]=console[t]),console[t]=this[t]}},{key:"restoreConsole",value:function(){for(var t in this._types)console["__"+t]&&(console[t]=console["__"+t],delete console["__"+t])}},{key:"wrapStd",value:function(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}},{key:"_wrapStream",value:function(t,e){var r=this;t&&(t.__write||(t.__write=t.write),t.write=function(t){r[e](String(t).trim())})}},{key:"restoreStd",value:function(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}},{key:"_restoreStream",value:function(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}},{key:"pauseLogs",value:function(){h=!0}},{key:"resumeLogs",value:function(){h=!1;var t,e=u(y.splice(0));try{for(e.s();!(t=e.n()).done;){var r=t.value;r[0]._logFn(r[1],r[2])}}catch(t){e.e(t)}finally{e.f()}}},{key:"mockTypes",value:function(t){if(this._mockFn=t||this._mockFn,"function"==typeof this._mockFn)for(var e in this._types)this[e]=this._mockFn(e,this._types[e])||this[e]}},{key:"_wrapLogFn",value:function(t){return function(){if(!h)return this._logFn(t,arguments);y.push([this,t,arguments])}.bind(this)}},{key:"_logFn",value:function(t,e){var r=this;if(t.level>this.level)return!!this._async&&Promise.resolve(!1);var o=Object.assign({date:new Date,args:[]},t);1===e.length&&p(e[0])?Object.assign(o,e[0]):o.args=Array.from(e),o.message&&(o.args.unshift(o.message),delete o.message),o.additional&&(Array.isArray(o.additional)||(o.additional=o.additional.split("\n")),o.args.push("\n"+o.additional.join("\n")),delete o.additional),o.type="string"==typeof o.type?o.type.toLowerCase():"",o.tag="string"==typeof o.tag?o.tag.toLowerCase():"";var n=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=r._lastLogCount-r._throttleMin;if(r._lastLog&&e>0){var n=i(r._lastLog.args);e>1&&n.push("(repeated ".concat(e," times)")),r._log(s(s({},r._lastLog),{},{args:n})),r._lastLogCount=1}if(t){if(r._lastLog=o,r._async)return r._logAsync(o);r._log(o)}};clearTimeout(this._throttleTimeout);var a=this._lastLogTime?o.date-this._lastLogTime:0;if(this._lastLogTime=o.date,a<this._throttle)try{var l=JSON.stringify([o.type,o.tag,o.args]),u=this._lastLogSerialized===l;if(this._lastLogSerialized=l,u&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(n,this._throttle))}catch(t){}n(!0)}},{key:"_log",value:function(t){var e,r=u(this._reporters);try{for(r.s();!(e=r.n()).done;){e.value.log(t,{async:!1,stdout:this.stdout,stderr:this.stderr})}}catch(t){r.e(t)}finally{r.f()}}},{key:"_logAsync",value:function(t){var e=this;return Promise.all(this._reporters.map((function(r){return r.log(t,{async:!0,stdout:e.stdout,stderr:e.stderr})})))}},{key:"stdout",get:function(){return this._stdout||console._stdout}},{key:"stderr",get:function(){return this._stderr||console._stderr}}]),e}();d.prototype.add=d.prototype.addReporter,d.prototype.remove=d.prototype.removeReporter,d.prototype.clear=d.prototype.removeReporter,d.prototype.withScope=d.prototype.withTag,d.prototype.mock=d.prototype.mockTypes,d.prototype.pause=d.prototype.pauseLogs,d.prototype.resume=d.prototype.resumeLogs;var g,v=function(){function e(r){t(this,e),this.options=Object.assign({},r),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}return r(e,[{key:"log",value:function(t){var e=t.level<1?console.__error||console.error:1===t.level&&console.warn?console.__warn||console.warn:console.__log||console.log,r="log"!==t.type?t.type:"",o=t.tag?t.tag:"",n=this.typeColorMap[t.type]||this.levelColorMap[t.level]||this.defaultColor,s="\n background: ".concat(n,";\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n "),a="%c".concat([o,r].filter(Boolean).join(":"));"string"==typeof t.args[0]?e.apply(void 0,["".concat(a,"%c ").concat(t.args[0]),s,""].concat(i(t.args.slice(1)))):e.apply(void 0,[a,s].concat(i(t.args)))}}]),e}();return"undefined"!=typeof window&&window.consola||((g=new d({reporters:[new v]})).Consola=d,g.LogLevel=c,g.BrowserReporter=v,g)})); diff --git a/src/node_modules/consola/dist/consola.js b/src/node_modules/consola/dist/consola.js new file mode 100644 index 0000000..22aa211 --- /dev/null +++ b/src/node_modules/consola/dist/consola.js @@ -0,0 +1 @@ +"use strict";function u(u){return u&&"object"==typeof u&&"default"in u?u.default:u}var D=u(require("util")),e=require("path"),t=require("fs"),r=u(require("os")),n=u(require("tty"));"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function s(u,D){return u(D={exports:{}},D.exports),D.exports}var o,i=(o=Object.freeze({__proto__:null,default:[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"Solano CI",constant:"TDDIUM",env:"TDDIUM",pr:"TDDIUM_PR_ID",deprecated:!0},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Team Foundation Server",constant:"TFS",env:"TF_BUILD"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]}))&&o.default||o,a=s((function(u,D){var e=process.env;function t(u){return"string"==typeof u?!!e[u]:Object.keys(u).every((function(D){return e[D]===u[D]}))}Object.defineProperty(D,"_vendors",{value:i.map((function(u){return u.constant}))}),D.name=null,D.isPR=null,i.forEach((function(u){var r=(Array.isArray(u.env)?u.env:[u.env]).every((function(u){return t(u)}));if(D[u.constant]=r,r)switch(D.name=u.name,typeof u.pr){case"string":D.isPR=!!e[u.pr];break;case"object":"env"in u.pr?D.isPR=u.pr.env in e&&e[u.pr.env]!==u.pr.ne:"any"in u.pr?D.isPR=u.pr.any.some((function(u){return!!e[u]})):D.isPR=t(u.pr);break;default:D.isPR=null}})),D.isCI=!!(e.CI||e.CONTINUOUS_INTEGRATION||e.BUILD_NUMBER||e.RUN_ID||D.name)})),l=(a.name,a.isPR,a.isCI,!1),c=!1,h=!1,F="development",C="undefined"!=typeof window,f="",E=!1;function d(u){return!(!u||"false"===u)}"undefined"!=typeof process&&(process.platform&&(f=String(process.platform)),process.stdout&&(h=d(process.stdout.isTTY)),l=Boolean(a.isCI),process.env&&(process.env.NODE_ENV&&(F=process.env.NODE_ENV),c=d(process.env.DEBUG),E=d(process.env.MINIMAL)));var g={browser:C,test:"test"===F,dev:"development"===F||"dev"===F,production:"production"===F,debug:c,ci:l,tty:h,minimal:void 0,minimalCLI:void 0,windows:/^win/i.test(f),darwin:/^darwin/i.test(f),linux:/^linux/i.test(f)};g.minimal=E||g.ci||g.test||!g.tty,g.minimalCLI=g.minimal;var p=Object.freeze(g);const m={};m[m.Fatal=0]="Fatal",m[m.Error=0]="Error",m[m.Warn=1]="Warn",m[m.Log=2]="Log",m[m.Info=3]="Info",m[m.Success=3]="Success",m[m.Debug=4]="Debug",m[m.Trace=5]="Trace",m[m.Silent=-1/0]="Silent",m[m.Verbose=1/0]="Verbose";var b={silent:{level:-1},fatal:{level:m.Fatal},error:{level:m.Error},warn:{level:m.Warn},log:{level:m.Log},info:{level:m.Info},success:{level:m.Success},debug:{level:m.Debug},trace:{level:m.Trace},verbose:{level:m.Trace},ready:{level:m.Info},start:{level:m.Info}};function y(u){return D=u,"[object Object]"===Object.prototype.toString.call(D)&&(!(!u.message&&!u.args)&&!u.stack);var D}let B=!1;const v=[];class _{constructor(u={}){this._reporters=u.reporters||[],this._types=u.types||b,this.level=void 0!==u.level?u.level:3,this._defaults=u.defaults||{},this._async=void 0!==u.async?u.async:void 0,this._stdout=u.stdout,this._stderr=u.stderr,this._mockFn=u.mockFn,this._throttle=u.throttle||1e3,this._throttleMin=u.throttleMin||5;for(const u in this._types)this[u]=this._wrapLogFn(Object.assign({type:u},this._types[u],this._defaults));this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}get stdout(){return this._stdout||console._stdout}get stderr(){return this._stderr||console._stderr}create(u){return new _(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},u))}withDefaults(u){return this.create({defaults:Object.assign({},this._defaults,u)})}withTag(u){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+u:u})}addReporter(u){return this._reporters.push(u),this}removeReporter(u){if(u){const D=this._reporters.indexOf(u);if(D>=0)return this._reporters.splice(D,1)}else this._reporters.splice(0);return this}setReporters(u){return this._reporters=Array.isArray(u)?u:[u],this}wrapAll(){this.wrapConsole(),this.wrapStd()}restoreAll(){this.restoreConsole(),this.restoreStd()}wrapConsole(){for(const u in this._types)console["__"+u]||(console["__"+u]=console[u]),console[u]=this[u]}restoreConsole(){for(const u in this._types)console["__"+u]&&(console[u]=console["__"+u],delete console["__"+u])}wrapStd(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}_wrapStream(u,D){u&&(u.__write||(u.__write=u.write),u.write=u=>{this[D](String(u).trim())})}restoreStd(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}_restoreStream(u){u&&u.__write&&(u.write=u.__write,delete u.__write)}pauseLogs(){B=!0}resumeLogs(){B=!1;const u=v.splice(0);for(const D of u)D[0]._logFn(D[1],D[2])}mockTypes(u){if(this._mockFn=u||this._mockFn,"function"==typeof this._mockFn)for(const u in this._types)this[u]=this._mockFn(u,this._types[u])||this[u]}_wrapLogFn(u){return function(){if(!B)return this._logFn(u,arguments);v.push([this,u,arguments])}.bind(this)}_logFn(u,D){if(u.level>this.level)return!!this._async&&Promise.resolve(!1);const e=Object.assign({date:new Date,args:[]},u);1===D.length&&y(D[0])?Object.assign(e,D[0]):e.args=Array.from(D),e.message&&(e.args.unshift(e.message),delete e.message),e.additional&&(Array.isArray(e.additional)||(e.additional=e.additional.split("\n")),e.args.push("\n"+e.additional.join("\n")),delete e.additional),e.type="string"==typeof e.type?e.type.toLowerCase():"",e.tag="string"==typeof e.tag?e.tag.toLowerCase():"";const t=(u=!1)=>{const D=this._lastLogCount-this._throttleMin;if(this._lastLog&&D>0){const u=[...this._lastLog.args];D>1&&u.push(`(repeated ${D} times)`),this._log({...this._lastLog,args:u}),this._lastLogCount=1}if(u){if(this._lastLog=e,this._async)return this._logAsync(e);this._log(e)}};clearTimeout(this._throttleTimeout);const r=this._lastLogTime?e.date-this._lastLogTime:0;if(this._lastLogTime=e.date,r<this._throttle)try{const u=JSON.stringify([e.type,e.tag,e.args]),D=this._lastLogSerialized===u;if(this._lastLogSerialized=u,D&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(t,this._throttle))}catch(u){}t(!0)}_log(u){for(const D of this._reporters)D.log(u,{async:!1,stdout:this.stdout,stderr:this.stderr})}_logAsync(u){return Promise.all(this._reporters.map(D=>D.log(u,{async:!0,stdout:this.stdout,stderr:this.stderr})))}}function A(u){const D=process.cwd()+e.sep;return u.split("\n").splice(1).map(u=>u.trim().replace("file://","").replace(D,""))}_.prototype.add=_.prototype.addReporter,_.prototype.remove=_.prototype.removeReporter,_.prototype.clear=_.prototype.removeReporter,_.prototype.withScope=_.prototype.withTag,_.prototype.mock=_.prototype.mockTypes,_.prototype.pause=_.prototype.pauseLogs,_.prototype.resume=_.prototype.resumeLogs;var w=s((function(u,D){u.exports=function(){var u="millisecond",D="second",e="minute",t="hour",r="day",n="week",s="month",o="quarter",i="year",a=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,l=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=function(u,D,e){var t=String(u);return!t||t.length>=D?u:""+Array(D+1-t.length).join(e)+u},h={s:c,z:function(u){var D=-u.utcOffset(),e=Math.abs(D),t=Math.floor(e/60),r=e%60;return(D<=0?"+":"-")+c(t,2,"0")+":"+c(r,2,"0")},m:function(u,D){var e=12*(D.year()-u.year())+(D.month()-u.month()),t=u.clone().add(e,s),r=D-t<0,n=u.clone().add(e+(r?-1:1),s);return Number(-(e+(D-t)/(r?t-n:n-t))||0)},a:function(u){return u<0?Math.ceil(u)||0:Math.floor(u)},p:function(a){return{M:s,y:i,w:n,d:r,D:"date",h:t,m:e,s:D,ms:u,Q:o}[a]||String(a||"").toLowerCase().replace(/s$/,"")},u:function(u){return void 0===u}},F={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},C="en",f={};f[C]=F;var E=function(u){return u instanceof m},d=function(u,D,e){var t;if(!u)return C;if("string"==typeof u)f[u]&&(t=u),D&&(f[u]=D,t=u);else{var r=u.name;f[r]=u,t=r}return!e&&t&&(C=t),t||!e&&C},g=function(u,D){if(E(u))return u.clone();var e="object"==typeof D?D:{};return e.date=u,e.args=arguments,new m(e)},p=h;p.l=d,p.i=E,p.w=function(u,D){return g(u,{locale:D.$L,utc:D.$u,$offset:D.$offset})};var m=function(){function c(u){this.$L=this.$L||d(u.locale,null,!0),this.parse(u)}var h=c.prototype;return h.parse=function(u){this.$d=function(u){var D=u.date,e=u.utc;if(null===D)return new Date(NaN);if(p.u(D))return new Date;if(D instanceof Date)return new Date(D);if("string"==typeof D&&!/Z$/i.test(D)){var t=D.match(a);if(t)return e?new Date(Date.UTC(t[1],t[2]-1,t[3]||1,t[4]||0,t[5]||0,t[6]||0,t[7]||0)):new Date(t[1],t[2]-1,t[3]||1,t[4]||0,t[5]||0,t[6]||0,t[7]||0)}return new Date(D)}(u),this.init()},h.init=function(){var u=this.$d;this.$y=u.getFullYear(),this.$M=u.getMonth(),this.$D=u.getDate(),this.$W=u.getDay(),this.$H=u.getHours(),this.$m=u.getMinutes(),this.$s=u.getSeconds(),this.$ms=u.getMilliseconds()},h.$utils=function(){return p},h.isValid=function(){return!("Invalid Date"===this.$d.toString())},h.isSame=function(u,D){var e=g(u);return this.startOf(D)<=e&&e<=this.endOf(D)},h.isAfter=function(u,D){return g(u)<this.startOf(D)},h.isBefore=function(u,D){return this.endOf(D)<g(u)},h.$g=function(u,D,e){return p.u(u)?this[D]:this.set(e,u)},h.year=function(u){return this.$g(u,"$y",i)},h.month=function(u){return this.$g(u,"$M",s)},h.day=function(u){return this.$g(u,"$W",r)},h.date=function(u){return this.$g(u,"$D","date")},h.hour=function(u){return this.$g(u,"$H",t)},h.minute=function(u){return this.$g(u,"$m",e)},h.second=function(u){return this.$g(u,"$s",D)},h.millisecond=function(D){return this.$g(D,"$ms",u)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(u,o){var a=this,l=!!p.u(o)||o,c=p.p(u),h=function(u,D){var e=p.w(a.$u?Date.UTC(a.$y,D,u):new Date(a.$y,D,u),a);return l?e:e.endOf(r)},F=function(u,D){return p.w(a.toDate()[u].apply(a.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(D)),a)},C=this.$W,f=this.$M,E=this.$D,d="set"+(this.$u?"UTC":"");switch(c){case i:return l?h(1,0):h(31,11);case s:return l?h(1,f):h(0,f+1);case n:var g=this.$locale().weekStart||0,m=(C<g?C+7:C)-g;return h(l?E-m:E+(6-m),f);case r:case"date":return F(d+"Hours",0);case t:return F(d+"Minutes",1);case e:return F(d+"Seconds",2);case D:return F(d+"Milliseconds",3);default:return this.clone()}},h.endOf=function(u){return this.startOf(u,!1)},h.$set=function(n,o){var a,l=p.p(n),c="set"+(this.$u?"UTC":""),h=(a={},a.day=c+"Date",a.date=c+"Date",a[s]=c+"Month",a[i]=c+"FullYear",a[t]=c+"Hours",a[e]=c+"Minutes",a[D]=c+"Seconds",a[u]=c+"Milliseconds",a)[l],F=l===r?this.$D+(o-this.$W):o;if(l===s||l===i){var C=this.clone().set("date",1);C.$d[h](F),C.init(),this.$d=C.set("date",Math.min(this.$D,C.daysInMonth())).toDate()}else h&&this.$d[h](F);return this.init(),this},h.set=function(u,D){return this.clone().$set(u,D)},h.get=function(u){return this[p.p(u)]()},h.add=function(u,o){var a,l=this;u=Number(u);var c=p.p(o),h=function(D){var e=g(l);return p.w(e.date(e.date()+Math.round(D*u)),l)};if(c===s)return this.set(s,this.$M+u);if(c===i)return this.set(i,this.$y+u);if(c===r)return h(1);if(c===n)return h(7);var F=(a={},a[e]=6e4,a[t]=36e5,a[D]=1e3,a)[c]||1,C=this.$d.getTime()+u*F;return p.w(C,this)},h.subtract=function(u,D){return this.add(-1*u,D)},h.format=function(u){var D=this;if(!this.isValid())return"Invalid Date";var e=u||"YYYY-MM-DDTHH:mm:ssZ",t=p.z(this),r=this.$locale(),n=this.$H,s=this.$m,o=this.$M,i=r.weekdays,a=r.months,c=function(u,t,r,n){return u&&(u[t]||u(D,e))||r[t].substr(0,n)},h=function(u){return p.s(n%12||12,u,"0")},F=r.meridiem||function(u,D,e){var t=u<12?"AM":"PM";return e?t.toLowerCase():t},C={YY:String(this.$y).slice(-2),YYYY:this.$y,M:o+1,MM:p.s(o+1,2,"0"),MMM:c(r.monthsShort,o,a,3),MMMM:c(a,o),D:this.$D,DD:p.s(this.$D,2,"0"),d:String(this.$W),dd:c(r.weekdaysMin,this.$W,i,2),ddd:c(r.weekdaysShort,this.$W,i,3),dddd:i[this.$W],H:String(n),HH:p.s(n,2,"0"),h:h(1),hh:h(2),a:F(n,s,!0),A:F(n,s,!1),m:String(s),mm:p.s(s,2,"0"),s:String(this.$s),ss:p.s(this.$s,2,"0"),SSS:p.s(this.$ms,3,"0"),Z:t};return e.replace(l,(function(u,D){return D||C[u]||t.replace(":","")}))},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(u,r,a){var l,c=p.p(r),h=g(u),F=6e4*(h.utcOffset()-this.utcOffset()),C=this-h,f=p.m(this,h);return f=(l={},l[i]=f/12,l[s]=f,l[o]=f/3,l[n]=(C-F)/6048e5,l.day=(C-F)/864e5,l[t]=C/36e5,l[e]=C/6e4,l[D]=C/1e3,l)[c]||C,a?f:p.a(f)},h.daysInMonth=function(){return this.endOf(s).$D},h.$locale=function(){return f[this.$L]},h.locale=function(u,D){if(!u)return this.$L;var e=this.clone(),t=d(u,D,!0);return t&&(e.$L=t),e},h.clone=function(){return p.w(this.$d,this)},h.toDate=function(){return new Date(this.valueOf())},h.toJSON=function(){return this.isValid()?this.toISOString():null},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},c}();return g.prototype=m.prototype,g.extend=function(u,D){return u(D,m,g),g},g.locale=d,g.isDayjs=E,g.unix=function(u){return g(1e3*u)},g.en=f[C],g.Ls=f,g}()}));const O={dateFormat:"HH:mm:ss",formatOptions:{date:!0,colors:!1,compact:!0}},M=u=>u?`[${u}]`:"";class S{constructor(u){this.options=Object.assign({},O,u)}formatStack(u){return" "+A(u).join("\n ")}formatArgs(u){const e=u.map(u=>u&&"string"==typeof u.stack?u.message+"\n"+this.formatStack(u.stack):u);return"function"==typeof D.formatWithOptions?D.formatWithOptions(this.options.formatOptions,...e):D.format(...e)}formatDate(u){return this.options.formatOptions.date?function(u,D){return w(D).format(u)}(this.options.dateFormat,u):""}filterAndJoin(u){return u.filter(u=>u).join(" ")}formatLogObj(u){const D=this.formatArgs(u.args);return this.filterAndJoin([M(u.type),M(u.tag),D])}log(u,{async:D,stdout:e,stderr:r}={}){return function(u,D,e="default"){const r=D.__write||D.write;switch(e){case"async":return new Promise(e=>{!0===r.call(D,u)?e():D.once("drain",()=>{e()})});case"sync":return t.writeSync(D.fd,u);default:return r.call(D,u)}}(this.formatLogObj(u,{width:e.columns||0})+"\n",u.level<2?r:e,D?"async":"default")}}var I=u=>"string"==typeof u?u.replace((({onlyFirst:u=!1}={})=>{const D=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(D,u?void 0:"g")})(),""):u;const k=u=>!Number.isNaN(u)&&(u>=4352&&(u<=4447||9001===u||9002===u||11904<=u&&u<=12871&&12351!==u||12880<=u&&u<=19903||19968<=u&&u<=42182||43360<=u&&u<=43388||44032<=u&&u<=55203||63744<=u&&u<=64255||65040<=u&&u<=65049||65072<=u&&u<=65131||65281<=u&&u<=65376||65504<=u&&u<=65510||110592<=u&&u<=110593||127488<=u&&u<=127569||131072<=u&&u<=262141));var R=k,T=k;R.default=T;const L=u=>{if("string"!=typeof(u=u.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g," "))||0===u.length)return 0;u=I(u);let D=0;for(let e=0;e<u.length;e++){const t=u.codePointAt(e);t<=31||t>=127&&t<=159||(t>=768&&t<=879||(t>65535&&e++,D+=R(t)?2:1))}return D};var $=L,x=L;$.default=x;var j=/[|\\{}()[\]^$+*?.]/g,U=function(u){if("string"!=typeof u)throw new TypeError("Expected a string");return u.replace(j,"\\$&")};const{platform:P}=process,N={tick:"✔",cross:"✖",star:"★",square:"▇",squareSmall:"◻",squareSmallFilled:"◼",play:"▶",circle:"◯",circleFilled:"◉",circleDotted:"◌",circleDouble:"◎",circleCircle:"ⓞ",circleCross:"ⓧ",circlePipe:"Ⓘ",circleQuestionMark:"?⃝",bullet:"●",dot:"․",line:"─",ellipsis:"…",pointer:"❯",pointerSmall:"›",info:"ℹ",warning:"⚠",hamburger:"☰",smiley:"㋡",mustache:"෴",heart:"♥",nodejs:"⬢",arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",checkboxOn:"☒",checkboxOff:"☐",checkboxCircleOn:"ⓧ",checkboxCircleOff:"Ⓘ",questionMarkPrefix:"?⃝",oneHalf:"½",oneThird:"⅓",oneQuarter:"¼",oneFifth:"⅕",oneSixth:"⅙",oneSeventh:"⅐",oneEighth:"⅛",oneNinth:"⅑",oneTenth:"⅒",twoThirds:"⅔",twoFifths:"⅖",threeQuarters:"¾",threeFifths:"⅗",threeEighths:"⅜",fourFifths:"⅘",fiveSixths:"⅚",fiveEighths:"⅝",sevenEighths:"⅞"},q={tick:"√",cross:"×",star:"*",square:"█",squareSmall:"[ ]",squareSmallFilled:"[█]",play:"►",circle:"( )",circleFilled:"(*)",circleDotted:"( )",circleDouble:"( )",circleCircle:"(○)",circleCross:"(×)",circlePipe:"(│)",circleQuestionMark:"(?)",bullet:"*",dot:".",line:"─",ellipsis:"...",pointer:">",pointerSmall:"»",info:"i",warning:"‼",hamburger:"≡",smiley:"☺",mustache:"┌─┐",heart:N.heart,nodejs:"♦",arrowUp:N.arrowUp,arrowDown:N.arrowDown,arrowLeft:N.arrowLeft,arrowRight:N.arrowRight,radioOn:"(*)",radioOff:"( )",checkboxOn:"[×]",checkboxOff:"[ ]",checkboxCircleOn:"(×)",checkboxCircleOff:"( )",questionMarkPrefix:"?",oneHalf:"1/2",oneThird:"1/3",oneQuarter:"1/4",oneFifth:"1/5",oneSixth:"1/6",oneSeventh:"1/7",oneEighth:"1/8",oneNinth:"1/9",oneTenth:"1/10",twoThirds:"2/3",twoFifths:"2/5",threeQuarters:"3/4",threeFifths:"3/5",threeEighths:"3/8",fourFifths:"4/5",fiveSixths:"5/6",fiveEighths:"5/8",sevenEighths:"7/8"};"linux"===P&&(N.questionMarkPrefix="?");const Y="win32"===P?q:N;var H=Object.assign(u=>{if(Y===N)return u;for(const[D,e]of Object.entries(N))e!==Y[D]&&(u=u.replace(new RegExp(U(e),"g"),Y[D]));return u},Y),V=N,W=q;H.main=V,H.windows=W;var G={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const z={};for(const u of Object.keys(G))z[G[u]]=u;const Q={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var J=Q;for(const u of Object.keys(Q)){if(!("channels"in Q[u]))throw new Error("missing channels property: "+u);if(!("labels"in Q[u]))throw new Error("missing channel labels property: "+u);if(Q[u].labels.length!==Q[u].channels)throw new Error("channel and label counts mismatch: "+u);const{channels:D,labels:e}=Q[u];delete Q[u].channels,delete Q[u].labels,Object.defineProperty(Q[u],"channels",{value:D}),Object.defineProperty(Q[u],"labels",{value:e})}function K(u){const D=function(){const u={},D=Object.keys(J);for(let e=D.length,t=0;t<e;t++)u[D[t]]={distance:-1,parent:null};return u}(),e=[u];for(D[u].distance=0;e.length;){const u=e.pop(),t=Object.keys(J[u]);for(let r=t.length,n=0;n<r;n++){const r=t[n],s=D[r];-1===s.distance&&(s.distance=D[u].distance+1,s.parent=u,e.unshift(r))}}return D}function Z(u,D){return function(e){return D(u(e))}}function X(u,D){const e=[D[u].parent,u];let t=J[D[u].parent][u],r=D[u].parent;for(;D[r].parent;)e.unshift(D[r].parent),t=Z(J[D[r].parent][r],t),r=D[r].parent;return t.conversion=e,t}Q.rgb.hsl=function(u){const D=u[0]/255,e=u[1]/255,t=u[2]/255,r=Math.min(D,e,t),n=Math.max(D,e,t),s=n-r;let o,i;n===r?o=0:D===n?o=(e-t)/s:e===n?o=2+(t-D)/s:t===n&&(o=4+(D-e)/s),o=Math.min(60*o,360),o<0&&(o+=360);const a=(r+n)/2;return i=n===r?0:a<=.5?s/(n+r):s/(2-n-r),[o,100*i,100*a]},Q.rgb.hsv=function(u){let D,e,t,r,n;const s=u[0]/255,o=u[1]/255,i=u[2]/255,a=Math.max(s,o,i),l=a-Math.min(s,o,i),c=function(u){return(a-u)/6/l+.5};return 0===l?(r=0,n=0):(n=l/a,D=c(s),e=c(o),t=c(i),s===a?r=t-e:o===a?r=1/3+D-t:i===a&&(r=2/3+e-D),r<0?r+=1:r>1&&(r-=1)),[360*r,100*n,100*a]},Q.rgb.hwb=function(u){const D=u[0],e=u[1];let t=u[2];const r=Q.rgb.hsl(u)[0],n=1/255*Math.min(D,Math.min(e,t));return t=1-1/255*Math.max(D,Math.max(e,t)),[r,100*n,100*t]},Q.rgb.cmyk=function(u){const D=u[0]/255,e=u[1]/255,t=u[2]/255,r=Math.min(1-D,1-e,1-t);return[100*((1-D-r)/(1-r)||0),100*((1-e-r)/(1-r)||0),100*((1-t-r)/(1-r)||0),100*r]},Q.rgb.keyword=function(u){const D=z[u];if(D)return D;let e,t=1/0;for(const D of Object.keys(G)){const s=(n=G[D],((r=u)[0]-n[0])**2+(r[1]-n[1])**2+(r[2]-n[2])**2);s<t&&(t=s,e=D)}var r,n;return e},Q.keyword.rgb=function(u){return G[u]},Q.rgb.xyz=function(u){let D=u[0]/255,e=u[1]/255,t=u[2]/255;D=D>.04045?((D+.055)/1.055)**2.4:D/12.92,e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92;return[100*(.4124*D+.3576*e+.1805*t),100*(.2126*D+.7152*e+.0722*t),100*(.0193*D+.1192*e+.9505*t)]},Q.rgb.lab=function(u){const D=Q.rgb.xyz(u);let e=D[0],t=D[1],r=D[2];e/=95.047,t/=100,r/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*t-16,500*(e-t),200*(t-r)]},Q.hsl.rgb=function(u){const D=u[0]/360,e=u[1]/100,t=u[2]/100;let r,n,s;if(0===e)return s=255*t,[s,s,s];r=t<.5?t*(1+e):t+e-t*e;const o=2*t-r,i=[0,0,0];for(let u=0;u<3;u++)n=D+1/3*-(u-1),n<0&&n++,n>1&&n--,s=6*n<1?o+6*(r-o)*n:2*n<1?r:3*n<2?o+(r-o)*(2/3-n)*6:o,i[u]=255*s;return i},Q.hsl.hsv=function(u){const D=u[0];let e=u[1]/100,t=u[2]/100,r=e;const n=Math.max(t,.01);t*=2,e*=t<=1?t:2-t,r*=n<=1?n:2-n;return[D,100*(0===t?2*r/(n+r):2*e/(t+e)),100*((t+e)/2)]},Q.hsv.rgb=function(u){const D=u[0]/60,e=u[1]/100;let t=u[2]/100;const r=Math.floor(D)%6,n=D-Math.floor(D),s=255*t*(1-e),o=255*t*(1-e*n),i=255*t*(1-e*(1-n));switch(t*=255,r){case 0:return[t,i,s];case 1:return[o,t,s];case 2:return[s,t,i];case 3:return[s,o,t];case 4:return[i,s,t];case 5:return[t,s,o]}},Q.hsv.hsl=function(u){const D=u[0],e=u[1]/100,t=u[2]/100,r=Math.max(t,.01);let n,s;s=(2-e)*t;const o=(2-e)*r;return n=e*r,n/=o<=1?o:2-o,n=n||0,s/=2,[D,100*n,100*s]},Q.hwb.rgb=function(u){const D=u[0]/360;let e=u[1]/100,t=u[2]/100;const r=e+t;let n;r>1&&(e/=r,t/=r);const s=Math.floor(6*D),o=1-t;n=6*D-s,0!=(1&s)&&(n=1-n);const i=e+n*(o-e);let a,l,c;switch(s){default:case 6:case 0:a=o,l=i,c=e;break;case 1:a=i,l=o,c=e;break;case 2:a=e,l=o,c=i;break;case 3:a=e,l=i,c=o;break;case 4:a=i,l=e,c=o;break;case 5:a=o,l=e,c=i}return[255*a,255*l,255*c]},Q.cmyk.rgb=function(u){const D=u[0]/100,e=u[1]/100,t=u[2]/100,r=u[3]/100;return[255*(1-Math.min(1,D*(1-r)+r)),255*(1-Math.min(1,e*(1-r)+r)),255*(1-Math.min(1,t*(1-r)+r))]},Q.xyz.rgb=function(u){const D=u[0]/100,e=u[1]/100,t=u[2]/100;let r,n,s;return r=3.2406*D+-1.5372*e+-.4986*t,n=-.9689*D+1.8758*e+.0415*t,s=.0557*D+-.204*e+1.057*t,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,n=n>.0031308?1.055*n**(1/2.4)-.055:12.92*n,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,r=Math.min(Math.max(0,r),1),n=Math.min(Math.max(0,n),1),s=Math.min(Math.max(0,s),1),[255*r,255*n,255*s]},Q.xyz.lab=function(u){let D=u[0],e=u[1],t=u[2];D/=95.047,e/=100,t/=108.883,D=D>.008856?D**(1/3):7.787*D+16/116,e=e>.008856?e**(1/3):7.787*e+16/116,t=t>.008856?t**(1/3):7.787*t+16/116;return[116*e-16,500*(D-e),200*(e-t)]},Q.lab.xyz=function(u){let D,e,t;e=(u[0]+16)/116,D=u[1]/500+e,t=e-u[2]/200;const r=e**3,n=D**3,s=t**3;return e=r>.008856?r:(e-16/116)/7.787,D=n>.008856?n:(D-16/116)/7.787,t=s>.008856?s:(t-16/116)/7.787,D*=95.047,e*=100,t*=108.883,[D,e,t]},Q.lab.lch=function(u){const D=u[0],e=u[1],t=u[2];let r;r=360*Math.atan2(t,e)/2/Math.PI,r<0&&(r+=360);return[D,Math.sqrt(e*e+t*t),r]},Q.lch.lab=function(u){const D=u[0],e=u[1],t=u[2]/360*2*Math.PI;return[D,e*Math.cos(t),e*Math.sin(t)]},Q.rgb.ansi16=function(u,D=null){const[e,t,r]=u;let n=null===D?Q.rgb.hsv(u)[2]:D;if(n=Math.round(n/50),0===n)return 30;let s=30+(Math.round(r/255)<<2|Math.round(t/255)<<1|Math.round(e/255));return 2===n&&(s+=60),s},Q.hsv.ansi16=function(u){return Q.rgb.ansi16(Q.hsv.rgb(u),u[2])},Q.rgb.ansi256=function(u){const D=u[0],e=u[1],t=u[2];if(D===e&&e===t)return D<8?16:D>248?231:Math.round((D-8)/247*24)+232;return 16+36*Math.round(D/255*5)+6*Math.round(e/255*5)+Math.round(t/255*5)},Q.ansi16.rgb=function(u){let D=u%10;if(0===D||7===D)return u>50&&(D+=3.5),D=D/10.5*255,[D,D,D];const e=.5*(1+~~(u>50));return[(1&D)*e*255,(D>>1&1)*e*255,(D>>2&1)*e*255]},Q.ansi256.rgb=function(u){if(u>=232){const D=10*(u-232)+8;return[D,D,D]}let D;u-=16;return[Math.floor(u/36)/5*255,Math.floor((D=u%36)/6)/5*255,D%6/5*255]},Q.rgb.hex=function(u){const D=(((255&Math.round(u[0]))<<16)+((255&Math.round(u[1]))<<8)+(255&Math.round(u[2]))).toString(16).toUpperCase();return"000000".substring(D.length)+D},Q.hex.rgb=function(u){const D=u.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!D)return[0,0,0];let e=D[0];3===D[0].length&&(e=e.split("").map(u=>u+u).join(""));const t=parseInt(e,16);return[t>>16&255,t>>8&255,255&t]},Q.rgb.hcg=function(u){const D=u[0]/255,e=u[1]/255,t=u[2]/255,r=Math.max(Math.max(D,e),t),n=Math.min(Math.min(D,e),t),s=r-n;let o,i;return o=s<1?n/(1-s):0,i=s<=0?0:r===D?(e-t)/s%6:r===e?2+(t-D)/s:4+(D-e)/s,i/=6,i%=1,[360*i,100*s,100*o]},Q.hsl.hcg=function(u){const D=u[1]/100,e=u[2]/100,t=e<.5?2*D*e:2*D*(1-e);let r=0;return t<1&&(r=(e-.5*t)/(1-t)),[u[0],100*t,100*r]},Q.hsv.hcg=function(u){const D=u[1]/100,e=u[2]/100,t=D*e;let r=0;return t<1&&(r=(e-t)/(1-t)),[u[0],100*t,100*r]},Q.hcg.rgb=function(u){const D=u[0]/360,e=u[1]/100,t=u[2]/100;if(0===e)return[255*t,255*t,255*t];const r=[0,0,0],n=D%1*6,s=n%1,o=1-s;let i=0;switch(Math.floor(n)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=o,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=o,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=o}return i=(1-e)*t,[255*(e*r[0]+i),255*(e*r[1]+i),255*(e*r[2]+i)]},Q.hcg.hsv=function(u){const D=u[1]/100,e=D+u[2]/100*(1-D);let t=0;return e>0&&(t=D/e),[u[0],100*t,100*e]},Q.hcg.hsl=function(u){const D=u[1]/100,e=u[2]/100*(1-D)+.5*D;let t=0;return e>0&&e<.5?t=D/(2*e):e>=.5&&e<1&&(t=D/(2*(1-e))),[u[0],100*t,100*e]},Q.hcg.hwb=function(u){const D=u[1]/100,e=D+u[2]/100*(1-D);return[u[0],100*(e-D),100*(1-e)]},Q.hwb.hcg=function(u){const D=u[1]/100,e=1-u[2]/100,t=e-D;let r=0;return t<1&&(r=(e-t)/(1-t)),[u[0],100*t,100*r]},Q.apple.rgb=function(u){return[u[0]/65535*255,u[1]/65535*255,u[2]/65535*255]},Q.rgb.apple=function(u){return[u[0]/255*65535,u[1]/255*65535,u[2]/255*65535]},Q.gray.rgb=function(u){return[u[0]/100*255,u[0]/100*255,u[0]/100*255]},Q.gray.hsl=function(u){return[0,0,u[0]]},Q.gray.hsv=Q.gray.hsl,Q.gray.hwb=function(u){return[0,100,u[0]]},Q.gray.cmyk=function(u){return[0,0,0,u[0]]},Q.gray.lab=function(u){return[u[0],0,0]},Q.gray.hex=function(u){const D=255&Math.round(u[0]/100*255),e=((D<<16)+(D<<8)+D).toString(16).toUpperCase();return"000000".substring(e.length)+e},Q.rgb.gray=function(u){return[(u[0]+u[1]+u[2])/3/255*100]};const uu={};Object.keys(J).forEach(u=>{uu[u]={},Object.defineProperty(uu[u],"channels",{value:J[u].channels}),Object.defineProperty(uu[u],"labels",{value:J[u].labels});const D=function(u){const D=K(u),e={},t=Object.keys(D);for(let u=t.length,r=0;r<u;r++){const u=t[r];null!==D[u].parent&&(e[u]=X(u,D))}return e}(u);Object.keys(D).forEach(e=>{const t=D[e];uu[u][e]=function(u){const D=function(...D){const e=D[0];if(null==e)return e;e.length>1&&(D=e);const t=u(D);if("object"==typeof t)for(let u=t.length,D=0;D<u;D++)t[D]=Math.round(t[D]);return t};return"conversion"in u&&(D.conversion=u.conversion),D}(t),uu[u][e].raw=function(u){const D=function(...D){const e=D[0];return null==e?e:(e.length>1&&(D=e),u(D))};return"conversion"in u&&(D.conversion=u.conversion),D}(t)})});var Du=uu,eu=s((function(u){const D=(u,D)=>(...e)=>`[${u(...e)+D}m`,e=(u,D)=>(...e)=>{const t=u(...e);return`[${38+D};5;${t}m`},t=(u,D)=>(...e)=>{const t=u(...e);return`[${38+D};2;${t[0]};${t[1]};${t[2]}m`},r=u=>u,n=(u,D,e)=>[u,D,e],s=(u,D,e)=>{Object.defineProperty(u,D,{get:()=>{const t=e();return Object.defineProperty(u,D,{value:t,enumerable:!0,configurable:!0}),t},enumerable:!0,configurable:!0})};let o;const i=(u,D,e,t)=>{void 0===o&&(o=Du);const r=t?10:0,n={};for(const[t,s]of Object.entries(o)){const o="ansi16"===t?"ansi":t;t===D?n[o]=u(e,r):"object"==typeof s&&(n[o]=u(s[D],r))}return n};Object.defineProperty(u,"exports",{enumerable:!0,get:function(){const u=new Map,o={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};o.color.gray=o.color.blackBright,o.bgColor.bgGray=o.bgColor.bgBlackBright,o.color.grey=o.color.blackBright,o.bgColor.bgGrey=o.bgColor.bgBlackBright;for(const[D,e]of Object.entries(o)){for(const[D,t]of Object.entries(e))o[D]={open:`[${t[0]}m`,close:`[${t[1]}m`},e[D]=o[D],u.set(t[0],t[1]);Object.defineProperty(o,D,{value:e,enumerable:!1})}return Object.defineProperty(o,"codes",{value:u,enumerable:!1}),o.color.close="[39m",o.bgColor.close="[49m",s(o.color,"ansi",()=>i(D,"ansi16",r,!1)),s(o.color,"ansi256",()=>i(e,"ansi256",r,!1)),s(o.color,"ansi16m",()=>i(t,"rgb",n,!1)),s(o.bgColor,"ansi",()=>i(D,"ansi16",r,!0)),s(o.bgColor,"ansi256",()=>i(e,"ansi256",r,!0)),s(o.bgColor,"ansi16m",()=>i(t,"rgb",n,!0)),o}})})),tu=(u,D=process.argv)=>{const e=u.startsWith("-")?"":1===u.length?"-":"--",t=D.indexOf(e+u),r=D.indexOf("--");return-1!==t&&(-1===r||t<r)};const{env:ru}=process;let nu;function su(u){return 0!==u&&{level:u,hasBasic:!0,has256:u>=2,has16m:u>=3}}function ou(u,D){if(0===nu)return 0;if(tu("color=16m")||tu("color=full")||tu("color=truecolor"))return 3;if(tu("color=256"))return 2;if(u&&!D&&void 0===nu)return 0;const e=nu||0;if("dumb"===ru.TERM)return e;if("win32"===process.platform){const u=r.release().split(".");return Number(u[0])>=10&&Number(u[2])>=10586?Number(u[2])>=14931?3:2:1}if("CI"in ru)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(u=>u in ru)||"codeship"===ru.CI_NAME?1:e;if("TEAMCITY_VERSION"in ru)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ru.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in ru)return 1;if("truecolor"===ru.COLORTERM)return 3;if("TERM_PROGRAM"in ru){const u=parseInt((ru.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ru.TERM_PROGRAM){case"iTerm.app":return u>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ru.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ru.TERM)||"COLORTERM"in ru?1:e}tu("no-color")||tu("no-colors")||tu("color=false")||tu("color=never")?nu=0:(tu("color")||tu("colors")||tu("color=true")||tu("color=always"))&&(nu=1),"FORCE_COLOR"in ru&&(nu="true"===ru.FORCE_COLOR?1:"false"===ru.FORCE_COLOR?0:0===ru.FORCE_COLOR.length?1:Math.min(parseInt(ru.FORCE_COLOR,10),3));var iu={supportsColor:function(u){return su(ou(u,u&&u.isTTY))},stdout:su(ou(!0,n.isatty(1))),stderr:su(ou(!0,n.isatty(2)))};var au={stringReplaceAll:(u,D,e)=>{let t=u.indexOf(D);if(-1===t)return u;const r=D.length;let n=0,s="";do{s+=u.substr(n,t-n)+D+e,n=t+r,t=u.indexOf(D,n)}while(-1!==t);return s+=u.substr(n),s},stringEncaseCRLFWithFirstIndex:(u,D,e,t)=>{let r=0,n="";do{const s="\r"===u[t-1];n+=u.substr(r,(s?t-1:t)-r)+D+(s?"\r\n":"\n")+e,r=t+1,t=u.indexOf("\n",r)}while(-1!==t);return n+=u.substr(r),n}};const lu=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,cu=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,hu=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,Fu=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Cu=new Map([["n","\n"],["r","\r"],["t","\t"],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a",""]]);function fu(u){const D="u"===u[0],e="{"===u[1];return D&&!e&&5===u.length||"x"===u[0]&&3===u.length?String.fromCharCode(parseInt(u.slice(1),16)):D&&e?String.fromCodePoint(parseInt(u.slice(2,-1),16)):Cu.get(u)||u}function Eu(u,D){const e=[],t=D.trim().split(/\s*,\s*/g);let r;for(const D of t){const t=Number(D);if(Number.isNaN(t)){if(!(r=D.match(hu)))throw new Error(`Invalid Chalk template style argument: ${D} (in style '${u}')`);e.push(r[2].replace(Fu,(u,D,e)=>D?fu(D):e))}else e.push(t)}return e}function du(u){cu.lastIndex=0;const D=[];let e;for(;null!==(e=cu.exec(u));){const u=e[1];if(e[2]){const t=Eu(u,e[2]);D.push([u].concat(t))}else D.push([u])}return D}function gu(u,D){const e={};for(const u of D)for(const D of u.styles)e[D[0]]=u.inverse?null:D.slice(1);let t=u;for(const[u,D]of Object.entries(e))if(Array.isArray(D)){if(!(u in t))throw new Error("Unknown Chalk style: "+u);t=D.length>0?t[u](...D):t[u]}return t}var pu=(u,D)=>{const e=[],t=[];let r=[];if(D.replace(lu,(D,n,s,o,i,a)=>{if(n)r.push(fu(n));else if(o){const D=r.join("");r=[],t.push(0===e.length?D:gu(u,e)(D)),e.push({inverse:s,styles:du(o)})}else if(i){if(0===e.length)throw new Error("Found extraneous } in Chalk template literal");t.push(gu(u,e)(r.join(""))),r=[],e.pop()}else r.push(a)}),t.push(r.join("")),e.length>0){const u=`Chalk template literal is missing ${e.length} closing bracket${1===e.length?"":"s"} (\`}\`)`;throw new Error(u)}return t.join("")};const{stdout:mu,stderr:bu}=iu,{stringReplaceAll:yu,stringEncaseCRLFWithFirstIndex:Bu}=au,vu=["ansi","ansi","ansi256","ansi16m"],_u=Object.create(null);class Au{constructor(u){return wu(u)}}const wu=u=>{const D={};return((u,D={})=>{if(D.level&&!(Number.isInteger(D.level)&&D.level>=0&&D.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");const e=mu?mu.level:0;u.level=void 0===D.level?e:D.level})(D,u),D.template=(...u)=>Lu(D.template,...u),Object.setPrototypeOf(D,Ou.prototype),Object.setPrototypeOf(D.template,D),D.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},D.template.Instance=Au,D.template};function Ou(u){return wu(u)}for(const[u,D]of Object.entries(eu))_u[u]={get(){const e=ku(this,Iu(D.open,D.close,this._styler),this._isEmpty);return Object.defineProperty(this,u,{value:e}),e}};_u.visible={get(){const u=ku(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:u}),u}};const Mu=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(const u of Mu)_u[u]={get(){const{level:D}=this;return function(...e){const t=Iu(eu.color[vu[D]][u](...e),eu.color.close,this._styler);return ku(this,t,this._isEmpty)}}};for(const u of Mu){_u["bg"+u[0].toUpperCase()+u.slice(1)]={get(){const{level:D}=this;return function(...e){const t=Iu(eu.bgColor[vu[D]][u](...e),eu.bgColor.close,this._styler);return ku(this,t,this._isEmpty)}}}}const Su=Object.defineProperties(()=>{},{..._u,level:{enumerable:!0,get(){return this._generator.level},set(u){this._generator.level=u}}}),Iu=(u,D,e)=>{let t,r;return void 0===e?(t=u,r=D):(t=e.openAll+u,r=D+e.closeAll),{open:u,close:D,openAll:t,closeAll:r,parent:e}},ku=(u,D,e)=>{const t=(...u)=>Ru(t,1===u.length?""+u[0]:u.join(" "));return Object.setPrototypeOf(t,Su),t._generator=u,t._styler=D,t._isEmpty=e,t},Ru=(u,D)=>{if(u.level<=0||!D)return u._isEmpty?"":D;let e=u._styler;if(void 0===e)return D;const{openAll:t,closeAll:r}=e;if(-1!==D.indexOf(""))for(;void 0!==e;)D=yu(D,e.close,e.open),e=e.parent;const n=D.indexOf("\n");return-1!==n&&(D=Bu(D,r,t,n)),t+D+r};let Tu;const Lu=(u,...D)=>{const[e]=D;if(!Array.isArray(e))return D.join(" ");const t=D.slice(1),r=[e.raw[0]];for(let u=1;u<e.length;u++)r.push(String(t[u-1]).replace(/[{}\\]/g,"\\$&"),String(e.raw[u]));return void 0===Tu&&(Tu=pu),Tu(u,r.join(""))};Object.defineProperties(Ou.prototype,_u);const $u=Ou();$u.supportsColor=mu,$u.stderr=Ou({level:bu?bu.level:0}),$u.stderr.supportsColor=bu;var xu=$u;const ju={};function Uu(u){let D=ju[u];return D||(D="#"===u[0]?xu.hex(u):xu[u]||xu.keyword(u),ju[u]=D,D)}const Pu={};const Nu={info:"cyan"},qu={0:"red",1:"yellow",2:"white",3:"green"},Yu={secondaryColor:"grey",formatOptions:{date:!0,colors:!0,compact:!1}},Hu={info:H("ℹ"),success:H("✔"),debug:H("›"),trace:H("›"),log:""};class Vu extends S{constructor(u){super(Object.assign({},Yu,u))}formatStack(u){const D=Uu("grey"),e=Uu("cyan");return"\n"+A(u).map(u=>" "+u.replace(/^at +/,u=>D(u)).replace(/\((.+)\)/,(u,D)=>`(${e(D)})`)).join("\n")}formatType(u,D){const e=Nu[u.type]||qu[u.level]||this.options.secondaryColor;if(D)return function(u){let D=Pu[u];return D||(D="#"===u[0]?xu.bgHex(u):xu["bg"+u[0].toUpperCase()+u.slice(1)]||xu.bgKeyword(u),Pu[u]=D,D)}(e).black(` ${u.type.toUpperCase()} `);const t="string"==typeof Hu[u.type]?Hu[u.type]:u.icon||u.type;return t?Uu(e)(t):""}formatLogObj(u,{width:D}){const[e,...t]=this.formatArgs(u.args).split("\n"),r=void 0!==u.badge?Boolean(u.badge):u.level<2,n=Uu(this.options.secondaryColor),s=this.formatDate(u.date),o=s&&n(s),i=this.formatType(u,r),a=u.tag?n(u.tag):"",l=e.replace(/`([^`]+)`/g,(u,D)=>xu.cyan(D));let c;const h=this.filterAndJoin([i,l]),F=this.filterAndJoin([a,o]),C=D-$(h)-$(F)-2;return c=C>0&&D>=80?h+" ".repeat(C)+F:h,c+=t.length?"\n"+t.join("\n"):"",r?"\n"+c+"\n":c}}class Wu{constructor({stream:u}={}){this.stream=u||process.stdout}log(u){this.stream.write(JSON.stringify(u)+"\n")}}const Gu="undefined"!=typeof __non_webpack_require__?__non_webpack_require__:require;class zu{constructor(u){if(u&&u.log)this.logger=u;else{const D=Gu("winston");this.logger=D.createLogger(Object.assign({level:"info",format:D.format.simple(),transports:[new D.transports.Console]},u))}}log(u){const D=[].concat(u.args),e=D.shift();this.logger.log({level:Qu[u.level]||"info",label:u.tag,message:e,args:D,timestamp:u.date.getTime()/1e3})}}const Qu={0:"error",1:"warn",2:"info",3:"verbose",4:"debug",5:"silly"};global.consola||(global.consola=function(){let u=p.debug?4:3;process.env.CONSOLA_LEVEL&&(u=parseInt(process.env.CONSOLA_LEVEL)||u);const D=new _({level:u,reporters:[p.ci||p.test?new S:new Vu]});return D.Consola=_,D.BasicReporter=S,D.FancyReporter=Vu,D.JSONReporter=Wu,D.WinstonReporter=zu,D.LogLevel=m,D}());var Ju=global.consola;module.exports=Ju; diff --git a/src/node_modules/consola/package.json b/src/node_modules/consola/package.json new file mode 100644 index 0000000..c2ee8ef --- /dev/null +++ b/src/node_modules/consola/package.json @@ -0,0 +1,80 @@ +{ + "name": "consola", + "version": "2.15.0", + "description": "Elegant Console Logger for Node.js and Browser", + "license": "MIT", + "repository": "nuxt/consola", + "main": "dist/consola.js", + "browser": "dist/consola.browser.js", + "typings": "types/consola.d.ts", + "scripts": { + "build": "rm -rf dist && yarn build:node && yarn build:browser", + "build:node": "NODE_ENV=node bili src/node.js --file-name consola.js --format cjs --bundle-node-modules --minify --no-map", + "build:browser": "NODE_ENV=browser bili src/browser.js --file-name consola.browser.js --format umd --module-name consola --bundle-node-modules --minify --no-map", + "demo": "node demo", + "browser": "serve", + "test": "yarn lint && yarn test:types && yarn build && jest test", + "lint": "eslint .", + "test:types": "tsc -p test/types", + "prepublish": "yarn build", + "release": "standard-version && yarn build && git push --follow-tags && npm publish" + }, + "files": [ + "src", + "dist", + "types" + ], + "keywords": [ + "console", + "logger", + "reporter", + "elegant", + "cli", + "universal", + "unified", + "winston" + ], + "contributors": [ + { + "name": "Pooya Parsa <pooya@pi0.ir>" + }, + { + "name": "Clark Du (@clarkdo)" + }, + { + "name": "@pimlie <pimlie@hotmail.com>" + }, + { + "name": "Sébastien Chopin <@Atinux>" + } + ], + "devDependencies": { + "@babel/core": "^7.9.6", + "@babel/preset-env": "^7.9.6", + "babel-eslint": "^10.1.0", + "babel-jest": "^26.0.1", + "benchmark": "^2.1.4", + "bili": "^4.10.0", + "chalk": "^4.0.0", + "dayjs": "^1.8.26", + "eslint": "^7.1.0", + "eslint-config-standard": "^14.1.1", + "eslint-plugin-import": "^2.20.2", + "eslint-plugin-jest": "^23.9.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1", + "eslint-plugin-standard": "^4.0.1", + "esm": "^3.2.25", + "figures": "^3.2.0", + "jest": "^26.0.1", + "lodash": "^4.17.15", + "sentencer": "^0.2.1", + "serve": "^11.3.0", + "standard-version": "^8.0.0", + "std-env": "^2.2.1", + "string-width": "^4.2.0", + "ts-node": "^8.10.1", + "typescript": "^3.8.3", + "winston": "^3.2.1" + } +} diff --git a/src/node_modules/consola/src/browser.js b/src/node_modules/consola/src/browser.js new file mode 100644 index 0000000..d39e1c1 --- /dev/null +++ b/src/node_modules/consola/src/browser.js @@ -0,0 +1,20 @@ +import Consola from './consola.js' +import BrowserReporter from './reporters/browser.js' +import { LogLevel } from './logLevels' + +function createConsola () { + const consola = new Consola({ + reporters: [ + new BrowserReporter() + ] + }) + + // Expose constructors + consola.Consola = Consola + consola.LogLevel = LogLevel + consola.BrowserReporter = BrowserReporter + + return consola +} + +export default (typeof window !== 'undefined' && window.consola) || createConsola() diff --git a/src/node_modules/consola/src/consola.js b/src/node_modules/consola/src/consola.js new file mode 100644 index 0000000..d88784a --- /dev/null +++ b/src/node_modules/consola/src/consola.js @@ -0,0 +1,326 @@ +import Types from './types.js' +import { isLogObj } from './utils/index.js' + +let paused = false +const queue = [] + +class Consola { + constructor (options = {}) { + this._reporters = options.reporters || [] + this._types = options.types || Types + this.level = options.level !== undefined ? options.level : 3 + this._defaults = options.defaults || {} + this._async = options.async !== undefined ? options.async : undefined + this._stdout = options.stdout + this._stderr = options.stderr + this._mockFn = options.mockFn + this._throttle = options.throttle || 1000 + this._throttleMin = options.throttleMin || 5 + + // Create logger functions for current instance + for (const type in this._types) { + this[type] = this._wrapLogFn(Object.assign( + { type }, + this._types[type], + this._defaults + )) + } + + // Use _mockFn if is set + if (this._mockFn) { + this.mockTypes() + } + + // Keep serialized version of last log + this._lastLogSerialized = undefined + this._lastLog = undefined + this._lastLogTime = undefined + this._lastLogCount = 0 + this._throttleTimeout = undefined + } + + get stdout () { + return this._stdout || console._stdout // eslint-disable-line no-console + } + + get stderr () { + return this._stderr || console._stderr // eslint-disable-line no-console + } + + create (options) { + return new Consola(Object.assign({ + reporters: this._reporters, + level: this.level, + types: this._types, + defaults: this._defaults, + stdout: this._stdout, + stderr: this._stderr, + mockFn: this._mockFn + }, options)) + } + + withDefaults (defaults) { + return this.create({ + defaults: Object.assign({}, this._defaults, defaults) + }) + } + + withTag (tag) { + return this.withDefaults({ + tag: this._defaults.tag ? (this._defaults.tag + ':' + tag) : tag + }) + } + + addReporter (reporter) { + this._reporters.push(reporter) + return this + } + + removeReporter (reporter) { + if (reporter) { + const i = this._reporters.indexOf(reporter) + if (i >= 0) { + return this._reporters.splice(i, 1) + } + } else { + this._reporters.splice(0) + } + return this + } + + setReporters (reporters) { + this._reporters = Array.isArray(reporters) + ? reporters + : [reporters] + return this + } + + wrapAll () { + this.wrapConsole() + this.wrapStd() + } + + restoreAll () { + this.restoreConsole() + this.restoreStd() + } + + wrapConsole () { + for (const type in this._types) { + // Backup original value + if (!console['__' + type]) { // eslint-disable-line no-console + console['__' + type] = console[type] // eslint-disable-line no-console + } + // Override + console[type] = this[type] // eslint-disable-line no-console + } + } + + restoreConsole () { + for (const type in this._types) { + // Restore if backup is available + if (console['__' + type]) { // eslint-disable-line no-console + console[type] = console['__' + type] // eslint-disable-line no-console + delete console['__' + type] // eslint-disable-line no-console + } + } + } + + wrapStd () { + this._wrapStream(this.stdout, 'log') + this._wrapStream(this.stderr, 'log') + } + + _wrapStream (stream, type) { + if (!stream) { + return + } + + // Backup original value + if (!stream.__write) { + stream.__write = stream.write + } + + // Override + stream.write = (data) => { + this[type](String(data).trim()) + } + } + + restoreStd () { + this._restoreStream(this.stdout) + this._restoreStream(this.stderr) + } + + _restoreStream (stream) { + if (!stream) { + return + } + + if (stream.__write) { + stream.write = stream.__write + delete stream.__write + } + } + + pauseLogs () { + paused = true + } + + resumeLogs () { + paused = false + + // Process queue + const _queue = queue.splice(0) + for (const item of _queue) { + item[0]._logFn(item[1], item[2]) + } + } + + mockTypes (mockFn) { + this._mockFn = mockFn || this._mockFn + + if (typeof this._mockFn !== 'function') { + return + } + + for (const type in this._types) { + this[type] = this._mockFn(type, this._types[type]) || this[type] + } + } + + _wrapLogFn (defaults) { + function logFn () { + if (paused) { + queue.push([this, defaults, arguments]) + return + } + + return this._logFn(defaults, arguments) + } + return logFn.bind(this) + } + + _logFn (defaults, args) { + if (defaults.level > this.level) { + return this._async ? Promise.resolve(false) : false + } + + // Construct a new log object + const logObj = Object.assign({ + date: new Date(), + args: [] + }, defaults) + + // Consume arguments + if (args.length === 1 && isLogObj(args[0])) { + Object.assign(logObj, args[0]) + } else { + logObj.args = Array.from(args) + } + + // Aliases + if (logObj.message) { + logObj.args.unshift(logObj.message) + delete logObj.message + } + if (logObj.additional) { + if (!Array.isArray(logObj.additional)) { + logObj.additional = logObj.additional.split('\n') + } + logObj.args.push('\n' + logObj.additional.join('\n')) + delete logObj.additional + } + + // Normalize type and tag to lowercase + logObj.type = typeof logObj.type === 'string' ? logObj.type.toLowerCase() : '' + logObj.tag = typeof logObj.tag === 'string' ? logObj.tag.toLowerCase() : '' + + // Resolve log + /** + * @param newLog false if the throttle expired and + * we don't want to log a duplicate + */ + const resolveLog = (newLog = false) => { + const repeated = this._lastLogCount - this._throttleMin + if (this._lastLog && repeated > 0) { + const args = [...this._lastLog.args] + if (repeated > 1) { + args.push(`(repeated ${repeated} times)`) + } + this._log({ ...this._lastLog, args }) + this._lastLogCount = 1 + } + + // Log + if (newLog) { + this._lastLog = logObj + if (this._async) { + return this._logAsync(logObj) + } else { + this._log(logObj) + } + } + } + + // Throttle + clearTimeout(this._throttleTimeout) + const diffTime = this._lastLogTime ? logObj.date - this._lastLogTime : 0 + this._lastLogTime = logObj.date + if (diffTime < this._throttle) { + try { + const serializedLog = JSON.stringify([logObj.type, logObj.tag, logObj.args]) + const isSameLog = this._lastLogSerialized === serializedLog + this._lastLogSerialized = serializedLog + if (isSameLog) { + this._lastLogCount++ + if (this._lastLogCount > this._throttleMin) { + // Auto-resolve when throttle is timed out + this._throttleTimeout = setTimeout(resolveLog, this._throttle) + return // SPAM! + } + } + } catch (_) { + // Circular References + } + } + + resolveLog(true) + } + + _log (logObj) { + for (const reporter of this._reporters) { + reporter.log(logObj, { + async: false, + stdout: this.stdout, + stderr: this.stderr + }) + } + } + + _logAsync (logObj) { + return Promise.all( + this._reporters.map(reporter => reporter.log(logObj, { + async: true, + stdout: this.stdout, + stderr: this.stderr + })) + ) + } +} + +// Legacy support +Consola.prototype.add = Consola.prototype.addReporter + +Consola.prototype.remove = Consola.prototype.removeReporter +Consola.prototype.clear = Consola.prototype.removeReporter + +Consola.prototype.withScope = Consola.prototype.withTag + +Consola.prototype.mock = Consola.prototype.mockTypes + +Consola.prototype.pause = Consola.prototype.pauseLogs +Consola.prototype.resume = Consola.prototype.resumeLogs + +// Export class +export default Consola diff --git a/src/node_modules/consola/src/index.js b/src/node_modules/consola/src/index.js new file mode 100644 index 0000000..dacee74 --- /dev/null +++ b/src/node_modules/consola/src/index.js @@ -0,0 +1,7 @@ +export { default as Consola } from './consola' +export { default as Types } from './types' +export { LogLevel } from './logLevels' +export { isLogObj } from './utils' +export { assignGlobalConsola } from './utils/global' + +export * from './reporters' diff --git a/src/node_modules/consola/src/logLevels.js b/src/node_modules/consola/src/logLevels.js new file mode 100644 index 0000000..12c977a --- /dev/null +++ b/src/node_modules/consola/src/logLevels.js @@ -0,0 +1,11 @@ +export const LogLevel = {} +LogLevel[LogLevel.Fatal = 0] = 'Fatal' +LogLevel[LogLevel.Error = 0] = 'Error' +LogLevel[LogLevel.Warn = 1] = 'Warn' +LogLevel[LogLevel.Log = 2] = 'Log' +LogLevel[LogLevel.Info = 3] = 'Info' +LogLevel[LogLevel.Success = 3] = 'Success' +LogLevel[LogLevel.Debug = 4] = 'Debug' +LogLevel[LogLevel.Trace = 5] = 'Trace' +LogLevel[LogLevel.Silent = -Infinity] = 'Silent' +LogLevel[LogLevel.Verbose = Infinity] = 'Verbose' diff --git a/src/node_modules/consola/src/node.js b/src/node_modules/consola/src/node.js new file mode 100644 index 0000000..da2139c --- /dev/null +++ b/src/node_modules/consola/src/node.js @@ -0,0 +1,36 @@ +import env from 'std-env' +import { Consola, BasicReporter, FancyReporter, JSONReporter, WinstonReporter, LogLevel } from '.' + +function createConsola () { + // Log level + let level = env.debug ? 4 : 3 + if (process.env.CONSOLA_LEVEL) { + level = parseInt(process.env.CONSOLA_LEVEL) || level + } + + // Create new consola instance + const consola = new Consola({ + level, + reporters: [ + (env.ci || env.test) + ? new BasicReporter() + : new FancyReporter() + ] + }) + + // Expose constructors + consola.Consola = Consola + consola.BasicReporter = BasicReporter + consola.FancyReporter = FancyReporter + consola.JSONReporter = JSONReporter + consola.WinstonReporter = WinstonReporter + consola.LogLevel = LogLevel + + return consola +} + +if (!global.consola) { + global.consola = createConsola() +} + +export default global.consola diff --git a/src/node_modules/consola/src/reporters/basic.js b/src/node_modules/consola/src/reporters/basic.js new file mode 100644 index 0000000..f34f1de --- /dev/null +++ b/src/node_modules/consola/src/reporters/basic.js @@ -0,0 +1,72 @@ +import util from 'util' +import { parseStack } from '../utils/error' +import { writeStream } from '../utils/stream' +import { formatDate } from '../utils/date' + +const DEFAULTS = { + dateFormat: 'HH:mm:ss', + formatOptions: { + date: true, + colors: false, + compact: true + } +} + +const bracket = x => x ? `[${x}]` : '' + +export default class BasicReporter { + constructor (options) { + this.options = Object.assign({}, DEFAULTS, options) + } + + formatStack (stack) { + return ' ' + parseStack(stack).join('\n ') + } + + formatArgs (args) { + const _args = args.map(arg => { + if (arg && typeof arg.stack === 'string') { + return arg.message + '\n' + this.formatStack(arg.stack) + } + return arg + }) + + // Only supported with Node >= 10 + // https://nodejs.org/api/util.html#util_util_inspect_object_options + if (typeof util.formatWithOptions === 'function') { + return util.formatWithOptions(this.options.formatOptions, ..._args) + } else { + return util.format(..._args) + } + } + + formatDate (date) { + return this.options.formatOptions.date ? formatDate(this.options.dateFormat, date) : '' + } + + filterAndJoin (arr) { + return arr.filter(x => x).join(' ') + } + + formatLogObj (logObj) { + const message = this.formatArgs(logObj.args) + + return this.filterAndJoin([ + bracket(logObj.type), + bracket(logObj.tag), + message + ]) + } + + log (logObj, { async, stdout, stderr } = {}) { + const line = this.formatLogObj(logObj, { + width: stdout.columns || 0 + }) + + return writeStream( + line + '\n', + logObj.level < 2 ? stderr : stdout, + async ? 'async' : 'default' + ) + } +} diff --git a/src/node_modules/consola/src/reporters/browser.js b/src/node_modules/consola/src/reporters/browser.js new file mode 100644 index 0000000..b07c311 --- /dev/null +++ b/src/node_modules/consola/src/reporters/browser.js @@ -0,0 +1,54 @@ +export default class BrowserReporter { + constructor (options) { + this.options = Object.assign({}, options) + + this.defaultColor = '#7f8c8d' // Gray + this.levelColorMap = { + 0: '#c0392b', // Red + 1: '#f39c12', // Yellow + 3: '#00BCD4' // Cyan + } + this.typeColorMap = { + success: '#2ecc71' // Green + } + } + + log (logObj) { + const consoleLogFn = logObj.level < 1 + // eslint-disable-next-line no-console + ? (console.__error || console.error) + // eslint-disable-next-line no-console + : logObj.level === 1 && console.warn ? (console.__warn || console.warn) : (console.__log || console.log) + + // Type + const type = logObj.type !== 'log' ? logObj.type : '' + + // Tag + const tag = logObj.tag ? logObj.tag : '' + + // Styles + const color = this.typeColorMap[logObj.type] || this.levelColorMap[logObj.level] || this.defaultColor + const style = ` + background: ${color}; + border-radius: 0.5em; + color: white; + font-weight: bold; + padding: 2px 0.5em; + ` + + const badge = `%c${[tag, type].filter(Boolean).join(':')}` + + // Log to the console + if (typeof logObj.args[0] === 'string') { + consoleLogFn( + `${badge}%c ${logObj.args[0]}`, + style, + // Empty string as style resets to default console style + '', + ...logObj.args.slice(1) + ) + } else { + consoleLogFn(badge, style, ...logObj.args) + } + } +} diff --git a/src/node_modules/consola/src/reporters/fancy.js b/src/node_modules/consola/src/reporters/fancy.js new file mode 100644 index 0000000..11271d4 --- /dev/null +++ b/src/node_modules/consola/src/reporters/fancy.js @@ -0,0 +1,87 @@ +import stringWidth from 'string-width' +import figures from 'figures' +import chalk from 'chalk' +import BasicReporter from './basic' +import { parseStack } from '../utils/error' +import { chalkColor, chalkBgColor } from '../utils/chalk' +import { TYPE_COLOR_MAP, LEVEL_COLOR_MAP } from '../utils/fancy' + +const DEFAULTS = { + secondaryColor: 'grey', + formatOptions: { + date: true, + colors: true, + compact: false + } +} + +const TYPE_ICONS = { + info: figures('ℹ'), + success: figures('✔'), + debug: figures('›'), + trace: figures('›'), + log: '' +} + +export default class FancyReporter extends BasicReporter { + constructor (options) { + super(Object.assign({}, DEFAULTS, options)) + } + + formatStack (stack) { + const grey = chalkColor('grey') + const cyan = chalkColor('cyan') + + return '\n' + parseStack(stack) + .map(line => ' ' + line + .replace(/^at +/, m => grey(m)) + .replace(/\((.+)\)/, (_, m) => `(${cyan(m)})`) + ) + .join('\n') + } + + formatType (logObj, isBadge) { + const typeColor = TYPE_COLOR_MAP[logObj.type] || + LEVEL_COLOR_MAP[logObj.level] || + this.options.secondaryColor + + if (isBadge) { + return chalkBgColor(typeColor).black(` ${logObj.type.toUpperCase()} `) + } + + const _type = typeof TYPE_ICONS[logObj.type] === 'string' ? TYPE_ICONS[logObj.type] : (logObj.icon || logObj.type) + return _type ? chalkColor(typeColor)(_type) : '' + } + + formatLogObj (logObj, { width }) { + const [message, ...additional] = this.formatArgs(logObj.args).split('\n') + + const isBadge = typeof logObj.badge !== 'undefined' ? Boolean(logObj.badge) : logObj.level < 2 + + const secondaryColor = chalkColor(this.options.secondaryColor) + + const date = this.formatDate(logObj.date) + const coloredDate = date && secondaryColor(date) + + const type = this.formatType(logObj, isBadge) + + const tag = logObj.tag ? secondaryColor(logObj.tag) : '' + + const formattedMessage = message.replace(/`([^`]+)`/g, (_, m) => chalk.cyan(m)) + + let line + const left = this.filterAndJoin([type, formattedMessage]) + const right = this.filterAndJoin([tag, coloredDate]) + const space = width - stringWidth(left) - stringWidth(right) - 2 + + if (space > 0 && width >= 80) { + line = left + ' '.repeat(space) + right + } else { + line = left + } + + line += additional.length ? '\n' + additional.join('\n') : '' + + return isBadge ? '\n' + line + '\n' : line + } +} diff --git a/src/node_modules/consola/src/reporters/index.js b/src/node_modules/consola/src/reporters/index.js new file mode 100644 index 0000000..5aae10c --- /dev/null +++ b/src/node_modules/consola/src/reporters/index.js @@ -0,0 +1,5 @@ +export { default as BasicReporter } from './basic' +export { default as BrowserReporter } from './browser' +export { default as FancyReporter } from './fancy' +export { default as JSONReporter } from './json' +export { default as WinstonReporter } from './winston' diff --git a/src/node_modules/consola/src/reporters/json.js b/src/node_modules/consola/src/reporters/json.js new file mode 100644 index 0000000..9c1f77d --- /dev/null +++ b/src/node_modules/consola/src/reporters/json.js @@ -0,0 +1,9 @@ +export default class JSONReporter { + constructor ({ stream } = {}) { + this.stream = stream || process.stdout + } + + log (logObj) { + this.stream.write(JSON.stringify(logObj) + '\n') + } +} diff --git a/src/node_modules/consola/src/reporters/winston.js b/src/node_modules/consola/src/reporters/winston.js new file mode 100644 index 0000000..c2e2009 --- /dev/null +++ b/src/node_modules/consola/src/reporters/winston.js @@ -0,0 +1,45 @@ +// This reporter is compatible with Winston 3 +// https://github.com/winstonjs/winston + +// eslint-disable-next-line +const _require = typeof __non_webpack_require__ !== 'undefined' ? __non_webpack_require__ : require // bypass webpack + +export default class WinstonReporter { + constructor (logger) { + if (logger && logger.log) { + this.logger = logger + } else { + const winston = _require('winston') + + this.logger = winston.createLogger(Object.assign({ + level: 'info', + format: winston.format.simple(), + transports: [ + new winston.transports.Console() + ] + }, logger)) + } + } + + log (logObj) { + const args = [].concat(logObj.args) + const arg0 = args.shift() + + this.logger.log({ + level: levels[logObj.level] || 'info', + label: logObj.tag, + message: arg0, + args: args, + timestamp: logObj.date.getTime() / 1000 + }) + } +} + +const levels = { + 0: 'error', + 1: 'warn', + 2: 'info', + 3: 'verbose', + 4: 'debug', + 5: 'silly' +} diff --git a/src/node_modules/consola/src/types.js b/src/node_modules/consola/src/types.js new file mode 100644 index 0000000..d5392f3 --- /dev/null +++ b/src/node_modules/consola/src/types.js @@ -0,0 +1,50 @@ +import { LogLevel } from './logLevels' + +export default { + // Silent + silent: { + level: -1 + }, + // Level 0 + fatal: { + level: LogLevel.Fatal + }, + error: { + level: LogLevel.Error + }, + // Level 1 + warn: { + level: LogLevel.Warn + }, + // Level 2 + log: { + level: LogLevel.Log + }, + // Level 3 + info: { + level: LogLevel.Info + }, + success: { + level: LogLevel.Success + }, + // Level 4 + debug: { + level: LogLevel.Debug + }, + // Level 5 + trace: { + level: LogLevel.Trace + }, + // Verbose + verbose: { + level: LogLevel.Trace + }, + + // Legacy + ready: { + level: LogLevel.Info + }, + start: { + level: LogLevel.Info + } +} diff --git a/src/node_modules/consola/src/utils/chalk.js b/src/node_modules/consola/src/utils/chalk.js new file mode 100644 index 0000000..fd9567f --- /dev/null +++ b/src/node_modules/consola/src/utils/chalk.js @@ -0,0 +1,37 @@ +import chalk from 'chalk' + +const _colorCache = {} + +export function chalkColor (name) { + let color = _colorCache[name] + if (color) { + return color + } + + if (name[0] === '#') { + color = chalk.hex(name) + } else { + color = chalk[name] || chalk.keyword(name) + } + + _colorCache[name] = color + return color +} + +const _bgColorCache = {} + +export function chalkBgColor (name) { + let color = _bgColorCache[name] + if (color) { + return color + } + + if (name[0] === '#') { + color = chalk.bgHex(name) + } else { + color = chalk['bg' + name[0].toUpperCase() + name.slice(1)] || chalk.bgKeyword(name) + } + + _bgColorCache[name] = color + return color +} diff --git a/src/node_modules/consola/src/utils/date.js b/src/node_modules/consola/src/utils/date.js new file mode 100644 index 0000000..8201ac6 --- /dev/null +++ b/src/node_modules/consola/src/utils/date.js @@ -0,0 +1,5 @@ +import dayjs from 'dayjs' + +export function formatDate (timeFormat, date) { + return dayjs(date).format(timeFormat) +} diff --git a/src/node_modules/consola/src/utils/error.js b/src/node_modules/consola/src/utils/error.js new file mode 100644 index 0000000..3d5ab8e --- /dev/null +++ b/src/node_modules/consola/src/utils/error.js @@ -0,0 +1,16 @@ +import { sep } from 'path' + +export function parseStack (stack) { + const cwd = process.cwd() + sep + + const lines = stack + .split('\n') + .splice(1) + .map(l => l + .trim() + .replace('file://', '') + .replace(cwd, '') + ) + + return lines +} diff --git a/src/node_modules/consola/src/utils/fancy.js b/src/node_modules/consola/src/utils/fancy.js new file mode 100644 index 0000000..59fdcb8 --- /dev/null +++ b/src/node_modules/consola/src/utils/fancy.js @@ -0,0 +1,10 @@ +export const TYPE_COLOR_MAP = { + info: 'cyan' +} + +export const LEVEL_COLOR_MAP = { + 0: 'red', + 1: 'yellow', + 2: 'white', + 3: 'green' +} diff --git a/src/node_modules/consola/src/utils/format.js b/src/node_modules/consola/src/utils/format.js new file mode 100644 index 0000000..50948a9 --- /dev/null +++ b/src/node_modules/consola/src/utils/format.js @@ -0,0 +1,30 @@ +import { vsprintf } from 'printj' + +const FORMAT_ARGS = [ + ['additional', 5], + ['message', 4], + ['type', 2], + ['date', 1], + ['tag', 3] +] // .sort((a, b) => b[0].length - a[0].length) + +const _compileCache = {} +// process.on('beforeExit', () => { console.log(_compileCache) }) + +export function compileFormat (format) { + if (_compileCache[format]) { + return _compileCache[format] + } + + let _format = format + for (const arg of FORMAT_ARGS) { + _format = _format.replace(new RegExp('([%-])' + arg[0], 'g'), '$1' + arg[1]) + } + + _compileCache[format] = _format + return _format +} + +export function formatString (format, argv) { + return vsprintf(compileFormat(format), argv) +} diff --git a/src/node_modules/consola/src/utils/global.js b/src/node_modules/consola/src/utils/global.js new file mode 100644 index 0000000..530eafe --- /dev/null +++ b/src/node_modules/consola/src/utils/global.js @@ -0,0 +1,38 @@ +export function assignGlobalReference (newInstance, referenceKey) { + if (!newInstance.constructor || (global[referenceKey] && !global[referenceKey].constructor)) { + throw new Error('Assigning to global reference is only supported for class instances') + } else if (newInstance.constructor && !global[referenceKey]) { + global[referenceKey] = newInstance + } else if (!( + newInstance instanceof global[referenceKey].constructor || + global[referenceKey] instanceof newInstance.constructor + )) { + throw new Error(`Not a ${global[referenceKey].constructor.name} instance`) + } + + const oldInstance = Object.create(global[referenceKey]) + + for (const prop in global[referenceKey]) { + oldInstance[prop] = global[referenceKey][prop] + delete global[referenceKey][prop] + } + + for (const prop of Object.getOwnPropertySymbols(global[referenceKey])) { + oldInstance[prop] = global[referenceKey][prop] + delete global[referenceKey][prop] + } + + for (const prop in newInstance) { + global[referenceKey][prop] = newInstance[prop] + } + + for (const prop of Object.getOwnPropertySymbols(newInstance)) { + global[referenceKey][prop] = newInstance[prop] + } + + return oldInstance +} + +export function assignGlobalConsola (newConsola) { + return assignGlobalReference(newConsola, 'consola') +} diff --git a/src/node_modules/consola/src/utils/index.js b/src/node_modules/consola/src/utils/index.js new file mode 100644 index 0000000..845f3de --- /dev/null +++ b/src/node_modules/consola/src/utils/index.js @@ -0,0 +1,23 @@ +export function isPlainObject (obj) { + return Object.prototype.toString.call(obj) === '[object Object]' +} + +// TODO: remove for consola@3 +export function isLogObj (arg) { + // Should be plain object + if (!isPlainObject(arg)) { + return false + } + + // Should contains either 'message' or 'args' field + if (!arg.message && !arg.args) { + return false + } + + // Handle non-standard error objects + if (arg.stack) { + return false + } + + return true +} diff --git a/src/node_modules/consola/src/utils/stream.js b/src/node_modules/consola/src/utils/stream.js new file mode 100644 index 0000000..100113e --- /dev/null +++ b/src/node_modules/consola/src/utils/stream.js @@ -0,0 +1,20 @@ +import { writeSync } from 'fs' + +export function writeStream (data, stream, mode = 'default') { + const write = stream.__write || stream.write + + switch (mode) { + case 'async': + return new Promise((resolve) => { + if (write.call(stream, data) === true) { + resolve() + } else { + stream.once('drain', () => { resolve() }) + } + }) + case 'sync': + return writeSync(stream.fd, data) + default: + return write.call(stream, data) + } +} diff --git a/src/node_modules/consola/src/utils/string.js b/src/node_modules/consola/src/utils/string.js new file mode 100644 index 0000000..40a2f55 --- /dev/null +++ b/src/node_modules/consola/src/utils/string.js @@ -0,0 +1,41 @@ +export function centerAlign (str, len, space = ' ') { + const free = len - str.length + if (free <= 0) { + return str + } + const freeLeft = Math.floor(free / 2) + let _str = '' + for (let i = 0; i < len; i++) { + _str += (i < freeLeft || i >= freeLeft + str.length) ? space : str[i - freeLeft] + } + return _str +} + +export function rightAlign (str, len, space = ' ') { + const free = len - str.length + if (free <= 0) { + return str + } + let _str = '' + for (let i = 0; i < len; i++) { + _str += i < free ? space : str[i - free] + } + return _str +} + +export function leftAlign (str, len, space = ' ') { + let _str = '' + for (let i = 0; i < len; i++) { + _str += i < str.length ? str[i] : space + } + return _str +} + +export function align (alignment, str, len, space = ' ') { + switch (alignment) { + case 'left': return leftAlign(str, len, space) + case 'right': return rightAlign(str, len, space) + case 'center': return centerAlign(str, len, space) + default: return str + } +} diff --git a/src/node_modules/consola/types/consola.d.ts b/src/node_modules/consola/types/consola.d.ts new file mode 100644 index 0000000..f98f7aa --- /dev/null +++ b/src/node_modules/consola/types/consola.d.ts @@ -0,0 +1,182 @@ +import { InspectOptions } from 'util'; + +export enum LogLevel { + Fatal= 0, + Error= 0, + Warn= 1, + Log= 2, + Info= 3, + Success= 3, + Debug= 4, + Trace= 5, + Silent= -Infinity, + Verbose= Infinity, +} + +export type logType = + | 'silent' + | 'fatal' + | 'error' + | 'warn' + | 'log' + | 'info' + | 'success' + | 'debug' + | 'trace' + | 'verbose' + | 'ready' + | 'start' + +export interface ConsolaLogObject { + level?: LogLevel, + tag?: string, + type?: logType, + message?: string, + additional?: string | string[], + args?: any[], + date?: Date, +} + +export interface ConsolaReporterLogObject { + level: LogLevel, + type: logType, + tag: string; + args: any[], + date: Date, +} + +type ConsolaMock = (...args: any) => void + +type ConsolaMockFn = (type: logType, defaults: ConsolaLogObject) => ConsolaMock + +export interface ConsolaReporterArgs { + async: boolean, + stdout: NodeJS.WritableStream, + stderr: NodeJS.WritableStream, +} + +export interface ConsolaReporter { + log: (logObj: ConsolaReporterLogObject, args: ConsolaReporterArgs) => void +} + +export interface ConsolaOptions { + reporters?: ConsolaReporter[], + types?: { [type in logType]: ConsolaLogObject }, + level?: LogLevel, + defaults?: ConsolaLogObject, + async?: boolean, + stdout?: NodeJS.WritableStream, + stderr?: NodeJS.WritableStream, + mockFn?: ConsolaMockFn, + throttle?: number, +} + +export declare class Consola { + constructor(options: ConsolaOptions) + + level: LogLevel + readonly stdout: NodeJS.WritableStream + readonly stderr: NodeJS.WritableStream + + // Built-in log levels + fatal(message: ConsolaLogObject | any, ...args: any[]): void + error(message: ConsolaLogObject | any, ...args: any[]): void + warn(message: ConsolaLogObject | any, ...args: any[]): void + log(message: ConsolaLogObject | any, ...args: any[]): void + info(message: ConsolaLogObject | any, ...args: any[]): void + start(message: ConsolaLogObject | any, ...args: any[]): void + success(message: ConsolaLogObject | any, ...args: any[]): void + ready(message: ConsolaLogObject | any, ...args: any[]): void + debug(message: ConsolaLogObject | any, ...args: any[]): void + trace(message: ConsolaLogObject | any, ...args: any[]): void + + // Create + create(options: ConsolaOptions): Consola + withDefaults(defaults: ConsolaLogObject): Consola + + withTag(tag: string): Consola + withScope(tag: string): Consola + + // Reporter + addReporter(reporter: ConsolaReporter): Consola + setReporters(reporters: Array<ConsolaReporter>): Consola + + removeReporter(reporter?: ConsolaReporter): Consola + remove(reporter?: ConsolaReporter): Consola + clear(reporter?: ConsolaReporter): Consola + + // Wrappers + wrapAll(): void + restoreAll(): void + wrapConsole(): void + restoreConsole(): void + wrapStd(): void + restoreStd(): void + + // Pause/Resume + pauseLogs(): void + pause(): void + + resumeLogs(): void + resume(): void + + // Mock + mockTypes(mockFn: ConsolaMockFn): any + mock(mockFn: ConsolaMockFn): any +} + +export interface BasicReporterOptions { + dateFormat?: string; + formatOptions?: InspectOptions; +} + +export declare class BasicReporter implements ConsolaReporter { + protected options: BasicReporterOptions; + + constructor(options?: BasicReporterOptions); + + public log(logObj: ConsolaReporterLogObject, args: ConsolaReporterArgs): void; + + protected formatStack(stack: string): string; + protected formatArgs(args: any[]): string; + protected formatDate(date: Date): string; + protected filterAndJoin(arr: Array<string | undefined>): string; + protected formatLogObj(logObj: ConsolaReporterLogObject): string; +} + +export interface FancyReporterOptions extends BasicReporterOptions{ + secondaryColor?: string; +} + +export declare class FancyReporter extends BasicReporter { + constructor(options?: FancyReporterOptions); + + protected formatType(logObj: ConsolaReporterLogObject): void; +} + +export type BrowserReporterOptions = {}; + +export declare class BrowserReporter implements ConsolaReporter { + public log(logObj: ConsolaReporterLogObject, args: ConsolaReporterArgs): void; +} + +export type JSONReporterOptions = { + stream?: NodeJS.WritableStream; +}; + +export declare class JSONReporter implements ConsolaReporter { + constructor(options?: JSONReporterOptions); + public log(logObj: ConsolaReporterLogObject, args: ConsolaReporterArgs): void; +} + +export type Winston = any; + +export declare class WinstonReporter implements ConsolaReporter { + constructor(logger?: Winston); + public log(logObj: ConsolaReporterLogObject, args: ConsolaReporterArgs): void; +} + +declare const consolaGlobalInstance: Consola; + +export default consolaGlobalInstance + |