údržba
This commit is contained in:
853
CyLukTs/lukan/node_modules/listr2/CHANGELOG.md
generated
vendored
Normal file
853
CyLukTs/lukan/node_modules/listr2/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,853 @@
|
||||
# [3.14.0](https://github.com/cenk1cenk2/listr2/compare/v3.13.6...v3.14.0) (2022-01-04)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- add tests and inject context variable as mutable ([afe3528](https://github.com/cenk1cenk2/listr2/commit/afe35289980a4bc89d8e021a997a3c6b011b58b6))
|
||||
|
||||
### Features
|
||||
|
||||
- ability to change the context type on subtasks ([7dccdfc](https://github.com/cenk1cenk2/listr2/commit/7dccdfc9563b3de2e059c43e0130f7777a3a2090)), closes [#612](https://github.com/cenk1cenk2/listr2/issues/612)
|
||||
|
||||
## [3.13.6](https://github.com/cenk1cenk2/listr2/compare/v3.13.5...v3.13.6) (2022-01-03)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- update dependencies ([9ce590c](https://github.com/cenk1cenk2/listr2/commit/9ce590ca03e7954797e559a6999ed4ea9c6d27dd))
|
||||
|
||||
## [3.13.5](https://github.com/cenk1cenk2/listr2/compare/v3.13.4...v3.13.5) (2021-11-22)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- swap clone package for rfdc to improve speed of error reporting ([a75c857](https://github.com/cenk1cenk2/listr2/commit/a75c8571e069f3aaca9538187027c9d72450635d))
|
||||
|
||||
## [3.13.4](https://github.com/cenk1cenk2/listr2/compare/v3.13.3...v3.13.4) (2021-11-17)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- mark enquirer as optional as peer ([742395e](https://github.com/cenk1cenk2/listr2/commit/742395ec2d1674a1eae11e943bea1a0cd6733f16)), closes [#589](https://github.com/cenk1cenk2/listr2/issues/589)
|
||||
|
||||
## [3.13.3](https://github.com/cenk1cenk2/listr2/compare/v3.13.2...v3.13.3) (2021-11-02)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- upgrade to rxjs7 ([f5fab40](https://github.com/cenk1cenk2/listr2/commit/f5fab401bb7e50023022abd7a0a77b6a02196ae7)), closes [#493](https://github.com/cenk1cenk2/listr2/issues/493) [#409](https://github.com/cenk1cenk2/listr2/issues/409)
|
||||
|
||||
## [3.13.2](https://github.com/cenk1cenk2/listr2/compare/v3.13.1...v3.13.2) (2021-11-02)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- cloneing objects ([15e8317](https://github.com/cenk1cenk2/listr2/commit/15e8317cb3854e74a8c6d5f86983909cf34f89d8)), closes [#571](https://github.com/cenk1cenk2/listr2/issues/571) [#569](https://github.com/cenk1cenk2/listr2/issues/569) [#538](https://github.com/cenk1cenk2/listr2/issues/538)
|
||||
|
||||
## [3.13.1](https://github.com/cenk1cenk2/listr2/compare/v3.13.0...v3.13.1) (2021-10-23)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- use v8 functions for error collection ([be37833](https://github.com/cenk1cenk2/listr2/commit/be37833807b2f915c53e58946543d257c723ac4b))
|
||||
|
||||
# [3.13.0](https://github.com/cenk1cenk2/listr2/compare/v3.12.2...v3.13.0) (2021-10-23)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- ditch api-extractor update colorrette ([7ae6752](https://github.com/cenk1cenk2/listr2/commit/7ae6752d7da59e54c28caeb7b3297f1792b0c7c8))
|
||||
- pass options to custom logger ([3004640](https://github.com/cenk1cenk2/listr2/commit/30046409eddba749b460d34cd9ef089bfcf300a4))
|
||||
|
||||
### Features
|
||||
|
||||
- pass options to the custom logger, implement it with types ([4cecba8](https://github.com/cenk1cenk2/listr2/commit/4cecba8a0b1f3efae5d89d982c67edcc82969218))
|
||||
|
||||
## [3.12.2](https://github.com/cenk1cenk2/listr2/compare/v3.12.1...v3.12.2) (2021-09-23)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- commit message for pull request [#527](https://github.com/cenk1cenk2/listr2/issues/527) ([2b96129](https://github.com/cenk1cenk2/listr2/commit/2b96129dd38dd47cea77f757b0c9f2760001c0f4))
|
||||
|
||||
## [3.12.1](https://github.com/cenk1cenk2/listr2/compare/v3.12.0...v3.12.1) (2021-09-13)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** update dependency colorette to ^1.4.0 ([4f52e16](https://github.com/cenk1cenk2/listr2/commit/4f52e16f6251490ba4e8f4a3dc49b41a9a997048))
|
||||
|
||||
# [3.12.0](https://github.com/cenk1cenk2/listr2/compare/v3.11.1...v3.12.0) (2021-09-12)
|
||||
|
||||
### Features
|
||||
|
||||
- fix error collection and improve it a bit ([29a08bb](https://github.com/cenk1cenk2/listr2/commit/29a08bb53f3de4260e0ba60d94c375d0f9592058)), closes [#459](https://github.com/cenk1cenk2/listr2/issues/459)
|
||||
|
||||
## [3.11.1](https://github.com/cenk1cenk2/listr2/compare/v3.11.0...v3.11.1) (2021-08-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- git hook ([5e5c111](https://github.com/cenk1cenk2/listr2/commit/5e5c111255a6bfb5f19bde0dae331ef7e883ba10))
|
||||
- node 16 try/catch type changes ([a5e29f4](https://github.com/cenk1cenk2/listr2/commit/a5e29f412f8412002546657275030927146dae25))
|
||||
|
||||
# [3.11.0](https://github.com/cenk1cenk2/listr2/compare/v3.10.1...v3.11.0) (2021-07-22)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- fix the tests and errors with the simple renderer ([ae4319b](https://github.com/cenk1cenk2/listr2/commit/ae4319be1797f029165c3fd2772abc5aae1e6b46))
|
||||
- tiny bug with sending output through channel ([cce9eee](https://github.com/cenk1cenk2/listr2/commit/cce9eeeec4d3c8370b22d6da72d61fe25c13b6c5)), closes [#437](https://github.com/cenk1cenk2/listr2/issues/437)
|
||||
|
||||
### Features
|
||||
|
||||
- **renderer:** adds simple renderer which is neither updating nor verbose ([04a6858](https://github.com/cenk1cenk2/listr2/commit/04a6858fa8ce8c0b30bc24d81d9cef99ab5d6381))
|
||||
|
||||
## [3.10.1](https://github.com/cenk1cenk2/listr2/compare/v3.10.0...v3.10.1) (2021-07-22)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- update deps ([84f3529](https://github.com/cenk1cenk2/listr2/commit/84f3529270637d04341aacbc5039ed8b52237b2e))
|
||||
|
||||
# [3.10.0](https://github.com/cenk1cenk2/listr2/compare/v3.9.0...v3.10.0) (2021-06-07)
|
||||
|
||||
### Features
|
||||
|
||||
- add context to the class itself for outside access ([98ea144](https://github.com/cenk1cenk2/listr2/commit/98ea14453257f9aec93932890e4c8c8d8ac53ead))
|
||||
|
||||
# [3.9.0](https://github.com/cenk1cenk2/listr2/compare/v3.8.6...v3.9.0) (2021-05-27)
|
||||
|
||||
### Features
|
||||
|
||||
- dependency cleaning merge ([07cc724](https://github.com/cenk1cenk2/listr2/commit/07cc72434db8c1ec743a9556890a572be9cd474d))
|
||||
- export figures ([f7377d2](https://github.com/cenk1cenk2/listr2/commit/f7377d2fa771bc3ef05b4aa496f0a1c0a1ca8eec))
|
||||
|
||||
## [3.8.6](https://github.com/cenk1cenk2/listr2/compare/v3.8.5...v3.8.6) (2021-05-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- add the missing test case ([b630e57](https://github.com/cenk1cenk2/listr2/commit/b630e5702b7d17dd802e7fb6a3d08d6d649e564a)), closes [#411](https://github.com/cenk1cenk2/listr2/issues/411)
|
||||
- allow async skip boolean or string ([2289f3a](https://github.com/cenk1cenk2/listr2/commit/2289f3ab8b53a54adfdf76f2b64b802018c596fc))
|
||||
|
||||
## [3.8.5](https://github.com/cenk1cenk2/listr2/compare/v3.8.4...v3.8.5) (2021-05-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- issue with enabling tasks ([0aa255e](https://github.com/cenk1cenk2/listr2/commit/0aa255ecc4638146d20ab897873d23ad92d960cb)), closes [#414](https://github.com/cenk1cenk2/listr2/issues/414)
|
||||
|
||||
## [3.8.4](https://github.com/cenk1cenk2/listr2/compare/v3.8.3...v3.8.4) (2021-05-25)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- rollback rxjs ([36a02e1](https://github.com/cenk1cenk2/listr2/commit/36a02e1ec56d9a65e41d2adc34b3eabe0660bb38)), closes [#409](https://github.com/cenk1cenk2/listr2/issues/409)
|
||||
|
||||
## [3.8.3](https://github.com/cenk1cenk2/listr2/compare/v3.8.2...v3.8.3) (2021-05-24)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
- **deps:** replace `chalk` with `colorette` ([3014a16](https://github.com/cenk1cenk2/listr2/commit/3014a16420938a9c98a315a1233da630433460d8))
|
||||
|
||||
## [3.8.2](https://github.com/cenk1cenk2/listr2/compare/v3.8.1...v3.8.2) (2021-05-03)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- update icons for windows ([6449de6](https://github.com/cenk1cenk2/listr2/commit/6449de6b3c4a5d369d8bbe5d0fd8571865783be2))
|
||||
|
||||
## [3.8.1](https://github.com/cenk1cenk2/listr2/compare/v3.8.0...v3.8.1) (2021-04-26)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** update dependency chalk to ^4.1.1 ([ef4bb19](https://github.com/cenk1cenk2/listr2/commit/ef4bb19dbbc82bb588abb2052f8771818f287aba))
|
||||
|
||||
# [3.8.0](https://github.com/cenk1cenk2/listr2/compare/v3.7.1...v3.8.0) (2021-04-25)
|
||||
|
||||
### Features
|
||||
|
||||
- use elegant spinner on environments that support unicode ([f71db87](https://github.com/cenk1cenk2/listr2/commit/f71db877060e1479b79f27b06dc3b7a84da51529))
|
||||
|
||||
## [3.7.1](https://github.com/cenk1cenk2/listr2/compare/v3.7.0...v3.7.1) (2021-04-19)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- add auto generated docs for documentation site imports ([ae3786e](https://github.com/cenk1cenk2/listr2/commit/ae3786e4e4fbf8564a37dfc0c33bb0f5d9b1cc38))
|
||||
|
||||
# [3.7.0](https://github.com/cenk1cenk2/listr2/compare/v3.6.3...v3.7.0) (2021-04-18)
|
||||
|
||||
### Features
|
||||
|
||||
- adds task level exit on error ([9d27c2b](https://github.com/cenk1cenk2/listr2/commit/9d27c2b92eca3e0be60da3dcc858711c7ad52392))
|
||||
|
||||
## [3.6.3](https://github.com/cenk1cenk2/listr2/compare/v3.6.2...v3.6.3) (2021-04-17)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- force commit for publish ([79ede29](https://github.com/cenk1cenk2/listr2/commit/79ede29516c16c516295af25f71a6a95e48a7d9e))
|
||||
|
||||
## [3.6.2](https://github.com/cenk1cenk2/listr2/compare/v3.6.1...v3.6.2) (2021-04-05)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- just export the types ([0e787e9](https://github.com/cenk1cenk2/listr2/commit/0e787e9f3c3f62b9f16dd519be1fb0f3fa500ce9))
|
||||
|
||||
## [3.6.1](https://github.com/cenk1cenk2/listr2/compare/v3.6.0...v3.6.1) (2021-04-05)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- fix exporting types in the old format ([f415027](https://github.com/cenk1cenk2/listr2/commit/f41502748d2e85b489a558dd35dd845648c34092))
|
||||
|
||||
# [3.6.0](https://github.com/cenk1cenk2/listr2/compare/v3.5.0...v3.6.0) (2021-04-05)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- add missing imports ([91a5b5a](https://github.com/cenk1cenk2/listr2/commit/91a5b5aeb5b770646fda50db7ebb94326bc93a26))
|
||||
- update some little things ([6eadb3a](https://github.com/cenk1cenk2/listr2/commit/6eadb3a82d402a04d5b163b318eca171175c7a04))
|
||||
|
||||
### Features
|
||||
|
||||
- fix types and styling ([ef8c9f9](https://github.com/cenk1cenk2/listr2/commit/ef8c9f99fbcc6f37c1c0810a420fbc39a357baa5))
|
||||
|
||||
# [3.5.0](https://github.com/cenk1cenk2/listr2/compare/v3.4.5...v3.5.0) (2021-04-05)
|
||||
|
||||
### Features
|
||||
|
||||
- adds timer in verbose renderer ([19e8b14](https://github.com/cenk1cenk2/listr2/commit/19e8b14f275c0d754de1a37f1d1e0495fda68a31)), closes [#320](https://github.com/cenk1cenk2/listr2/issues/320)
|
||||
|
||||
## [3.4.5](https://github.com/cenk1cenk2/listr2/compare/v3.4.4...v3.4.5) (2021-04-04)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- fix issue with numeral prompt add example ([49e67a6](https://github.com/cenk1cenk2/listr2/commit/49e67a6c4385774790a1d83fb35bc4fdb4ea6d73)), closes [#325](https://github.com/cenk1cenk2/listr2/issues/325)
|
||||
|
||||
## [3.4.4](https://github.com/cenk1cenk2/listr2/compare/v3.4.3...v3.4.4) (2021-03-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** update dependency rxjs to ^6.6.7 ([1b00a87](https://github.com/cenk1cenk2/listr2/commit/1b00a877cbaaecafb3ec31457468a2553c8e777e))
|
||||
|
||||
## [3.4.3](https://github.com/cenk1cenk2/listr2/compare/v3.4.2...v3.4.3) (2021-03-08)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- add enquirer import type for no type erors ([9a3f105](https://github.com/cenk1cenk2/listr2/commit/9a3f1059684511cdc4e100ac7059b5861b99e0c4))
|
||||
|
||||
## [3.4.2](https://github.com/cenk1cenk2/listr2/compare/v3.4.1...v3.4.2) (2021-03-08)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- fix breaking the for ([456b681](https://github.com/cenk1cenk2/listr2/commit/456b681216e89d917a3b8f7c127a6563772bb2ae))
|
||||
|
||||
## [3.4.1](https://github.com/cenk1cenk2/listr2/compare/v3.4.0...v3.4.1) (2021-03-05)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- return the last error as well from isRetrying ([f94641e](https://github.com/cenk1cenk2/listr2/commit/f94641e064464dddbf736e7f1dea1602a65ec433))
|
||||
|
||||
# [3.4.0](https://github.com/cenk1cenk2/listr2/compare/v3.3.4...v3.4.0) (2021-03-05)
|
||||
|
||||
### Features
|
||||
|
||||
- add retry feature ([4569fd2](https://github.com/cenk1cenk2/listr2/commit/4569fd262bb688198b44c58c6687d8d383664da5))
|
||||
|
||||
## [3.3.4](https://github.com/cenk1cenk2/listr2/compare/v3.3.3...v3.3.4) (2021-02-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** update dependency rxjs to ^6.6.6 ([0164fac](https://github.com/cenk1cenk2/listr2/commit/0164fac5afa0837496b6fb2c76a42e1f61f0111c))
|
||||
|
||||
## [3.3.3](https://github.com/cenk1cenk2/listr2/compare/v3.3.2...v3.3.3) (2021-02-23)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- update how the renderer options are handled enabling to use task options ([2b147b2](https://github.com/cenk1cenk2/listr2/commit/2b147b24772a3133b9f8c456d5c302e0dba4b5ef))
|
||||
|
||||
## [3.3.2](https://github.com/cenk1cenk2/listr2/compare/v3.3.1...v3.3.2) (2021-02-21)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- move documentation to site ([462ad71](https://github.com/cenk1cenk2/listr2/commit/462ad715782ef77fa3f991a8360392e261c05c03))
|
||||
|
||||
## [3.3.1](https://github.com/cenk1cenk2/listr2/compare/v3.3.0...v3.3.1) (2021-01-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- rollback types ([7935241](https://github.com/cenk1cenk2/listr2/commit/7935241ef91ed36434242ee00ed838c1fe0979e2)), closes [#276](https://github.com/cenk1cenk2/listr2/issues/276)
|
||||
- try fix typings issue ([4dd9013](https://github.com/cenk1cenk2/listr2/commit/4dd901356dffa24d3a3d41cf829896da7890e17e))
|
||||
- update interface ([2cb2cd6](https://github.com/cenk1cenk2/listr2/commit/2cb2cd637efdbdadfff548ed0c9cccbb347ca5f6))
|
||||
|
||||
## [3.3.1-beta.3](https://github.com/cenk1cenk2/listr2/compare/v3.3.1-beta.2...v3.3.1-beta.3) (2021-01-31)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- try fix typings issue ([4dd9013](https://github.com/cenk1cenk2/listr2/commit/4dd901356dffa24d3a3d41cf829896da7890e17e))
|
||||
|
||||
## [3.3.1-beta.2](https://github.com/cenk1cenk2/listr2/compare/v3.3.1-beta.1...v3.3.1-beta.2) (2021-01-25)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- update interface ([2cb2cd6](https://github.com/cenk1cenk2/listr2/commit/2cb2cd637efdbdadfff548ed0c9cccbb347ca5f6))
|
||||
|
||||
## [3.3.1-beta.1](https://github.com/cenk1cenk2/listr2/compare/v3.3.0...v3.3.1-beta.1) (2021-01-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- rollback types ([7935241](https://github.com/cenk1cenk2/listr2/commit/7935241ef91ed36434242ee00ed838c1fe0979e2)), closes [#276](https://github.com/cenk1cenk2/listr2/issues/276)
|
||||
|
||||
# [3.3.0](https://github.com/cenk1cenk2/listr2/compare/v3.2.3...v3.3.0) (2021-01-20)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- add more filtering for empty lines ([8bc1671](https://github.com/cenk1cenk2/listr2/commit/8bc1671d58aba6d067ce03fd4882352a9a402bb4))
|
||||
- drone stupidity ([3baa018](https://github.com/cenk1cenk2/listr2/commit/3baa018b5984d1c13aa4ebeb2cabba2764fa4ba2))
|
||||
- fix drone ([af43b84](https://github.com/cenk1cenk2/listr2/commit/af43b840a7c8446b22d7e1dcb4dc527dfcac89d9))
|
||||
- force build ([bc6cb28](https://github.com/cenk1cenk2/listr2/commit/bc6cb285f2cf17da5b12067279a87d6275397b98))
|
||||
- some fixes for truncation and word wrapping ([18c279a](https://github.com/cenk1cenk2/listr2/commit/18c279a6a5a5b1273e7d372c16f264acf8593a4e))
|
||||
- update readme, remove word-wrap ([2d6c6e8](https://github.com/cenk1cenk2/listr2/commit/2d6c6e8824ad93e3cd419e5aaaf3a5796d075484))
|
||||
- update truncating and word wrap column thingies ([f8662b9](https://github.com/cenk1cenk2/listr2/commit/f8662b9c03d6138409945ce946389235b8e1bafb))
|
||||
|
||||
### Features
|
||||
|
||||
- added rollback stuff ([d80c060](https://github.com/cenk1cenk2/listr2/commit/d80c06052a1fdad3dcefda68ef3446d659ba191b))
|
||||
|
||||
# [3.3.0-beta.2](https://github.com/cenk1cenk2/listr2/compare/v3.3.0-beta.1...v3.3.0-beta.2) (2021-01-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- add more filtering for empty lines ([8bc1671](https://github.com/cenk1cenk2/listr2/commit/8bc1671d58aba6d067ce03fd4882352a9a402bb4))
|
||||
- some fixes for truncation and word wrapping ([18c279a](https://github.com/cenk1cenk2/listr2/commit/18c279a6a5a5b1273e7d372c16f264acf8593a4e))
|
||||
- update truncating and word wrap column thingies ([f8662b9](https://github.com/cenk1cenk2/listr2/commit/f8662b9c03d6138409945ce946389235b8e1bafb))
|
||||
|
||||
# [3.3.0-beta.1](https://github.com/cenk1cenk2/listr2/compare/v3.2.3...v3.3.0-beta.1) (2021-01-17)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- drone stupidity ([3baa018](https://github.com/cenk1cenk2/listr2/commit/3baa018b5984d1c13aa4ebeb2cabba2764fa4ba2))
|
||||
- fix drone ([af43b84](https://github.com/cenk1cenk2/listr2/commit/af43b840a7c8446b22d7e1dcb4dc527dfcac89d9))
|
||||
- force build ([bc6cb28](https://github.com/cenk1cenk2/listr2/commit/bc6cb285f2cf17da5b12067279a87d6275397b98))
|
||||
|
||||
### Features
|
||||
|
||||
- added rollback stuff ([d80c060](https://github.com/cenk1cenk2/listr2/commit/d80c06052a1fdad3dcefda68ef3446d659ba191b))
|
||||
|
||||
## [3.2.3](https://github.com/cenk1cenk2/listr2/compare/v3.2.2...v3.2.3) (2020-11-26)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- update deps and fix typescript resolve ([836b8fd](https://github.com/cenk1cenk2/listr2/commit/836b8fde33a0d4bb8b2995ef3bad72dbf25a2a75))
|
||||
|
||||
## [3.2.2](https://github.com/cenk1cenk2/listr2/compare/v3.2.1...v3.2.2) (2020-10-26)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **prompt:** update task wrapper as this requirement for external use ([f0c0146](https://github.com/cenk1cenk2/listr2/commit/f0c01466d033a70560dd046362623b2fc4022da9))
|
||||
|
||||
## [3.2.1](https://github.com/cenk1cenk2/listr2/compare/v3.2.0...v3.2.1) (2020-10-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- improve tests and disable the unnecassary cases ([929a616](https://github.com/cenk1cenk2/listr2/commit/929a6164444d7790f1a4bdd058378fc50b76e28d))
|
||||
|
||||
# [3.2.0](https://github.com/cenk1cenk2/listr2/compare/v3.1.1...v3.2.0) (2020-10-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- fixed a tiny bug with newlistr ([51e4071](https://github.com/cenk1cenk2/listr2/commit/51e4071dd11c09d5cec4c0fafbf3368a7b165af7))
|
||||
|
||||
### Features
|
||||
|
||||
- Implemented some jsdoc style docs ([788fb99](https://github.com/cenk1cenk2/listr2/commit/788fb995da5a82a56d47d473dd3ed98a8c7cc457)), closes [#172](https://github.com/cenk1cenk2/listr2/issues/172)
|
||||
|
||||
## [3.1.1](https://github.com/cenk1cenk2/listr2/compare/v3.1.0...v3.1.1) (2020-09-22)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **prompt:** make prompt outside used ([2a61ac8](https://github.com/cenk1cenk2/listr2/commit/2a61ac80c5121ee020abc5b268c540eefad3738d))
|
||||
- **prompt:** reenabled external use ([2408aa1](https://github.com/cenk1cenk2/listr2/commit/2408aa1391fb65f07cbcade698a0e834d38b2231))
|
||||
|
||||
# [3.1.0](https://github.com/cenk1cenk2/listr2/compare/v3.0.1...v3.1.0) (2020-09-20)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **prompt:** prompt.submit instead of prompt.cancel to not throw error ([b758dac](https://github.com/cenk1cenk2/listr2/commit/b758dace3ddc3ff731b2689c7b4fd1a467ff90f9))
|
||||
- trying for adding skip functionality to prompt ([71924c9](https://github.com/cenk1cenk2/listr2/commit/71924c97b4a79077934530c02a6dcd3ecd968741)), closes [#173](https://github.com/cenk1cenk2/listr2/issues/173)
|
||||
- trying for fix ([79ba2bb](https://github.com/cenk1cenk2/listr2/commit/79ba2bb2005a3d646c9e5fafc1347fdc4a369cc7))
|
||||
- **deps:** update dependency rxjs to ^6.6.3 ([6664562](https://github.com/cenk1cenk2/listr2/commit/6664562749eb422436166f73668de12c0d0297ec))
|
||||
|
||||
### Features
|
||||
|
||||
- code style for cancel prompt ([4737669](https://github.com/cenk1cenk2/listr2/commit/4737669ec2ce75d46afef3402760fb959f1b7424)), closes [#173](https://github.com/cenk1cenk2/listr2/issues/173)
|
||||
|
||||
## [3.0.1](https://github.com/cenk1cenk2/listr2/compare/v3.0.0...v3.0.1) (2020-09-05)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **default-renderer:** added some fixes to swallowing error output in collapseErrors: [secure] mode and showErrorMessage ([b0c2bb7](https://github.com/cenk1cenk2/listr2/commit/b0c2bb7d11cd3b3e9cdffdaa4a6a2dfab725a0c7))
|
||||
|
||||
# [3.0.0](https://github.com/cenk1cenk2/listr2/compare/v2.6.2...v3.0.0) (2020-09-04)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- fix subtasks rendering ([c11aea0](https://github.com/cenk1cenk2/listr2/commit/c11aea05e4ca749e4c92cdd69d358765a43451c4))
|
||||
- lost message ([c5cc510](https://github.com/cenk1cenk2/listr2/commit/c5cc51028c2d9dccd28ea1f635288f4e5ba38f0d)), closes [#163](https://github.com/cenk1cenk2/listr2/issues/163) [#163](https://github.com/cenk1cenk2/listr2/issues/163)
|
||||
|
||||
### Features
|
||||
|
||||
- **default-renderer:** added collapse errors changed the renderer a bit ([514fc87](https://github.com/cenk1cenk2/listr2/commit/514fc87bb2595cc1a09cb865d60a380b0f71a9ec)), closes [#163](https://github.com/cenk1cenk2/listr2/issues/163)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
- changed last rendering method ([bd38146](https://github.com/cenk1cenk2/listr2/commit/bd38146c692127abb09cd754f2be0aac306efda4))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- Tests might break with this release, if they directly rely on default-renderer. Especially the snapshot testing will get hit.
|
||||
|
||||
* default-renderer now utilizes different EOL depending on the platform.
|
||||
* The last rendering method has been changed therefore it will leave a empty line before doing the last render which is the log-update clean functionallity, before writing it with process.stdout.
|
||||
* Outputted data now gets better trimmed which might cause testing to not match.
|
||||
* More consistent spacing is introduced for rendering the subtasks, bottom bar and the prompt bar.
|
||||
|
||||
* error-collection was not working as expected but it might now cause some tests to fail.
|
||||
|
||||
Overall there are no breaking changes introduced to the code directly but it might cause the tests which rely on default-renderer, since the rendering method is almost completely revised.
|
||||
|
||||
# [3.0.0-beta.1](https://github.com/cenk1cenk2/listr2/compare/v2.6.2...v3.0.0-beta.1) (2020-09-04)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- fix subtasks rendering ([c11aea0](https://github.com/cenk1cenk2/listr2/commit/c11aea05e4ca749e4c92cdd69d358765a43451c4))
|
||||
- lost message ([c5cc510](https://github.com/cenk1cenk2/listr2/commit/c5cc51028c2d9dccd28ea1f635288f4e5ba38f0d)), closes [#163](https://github.com/cenk1cenk2/listr2/issues/163) [#163](https://github.com/cenk1cenk2/listr2/issues/163)
|
||||
|
||||
### Features
|
||||
|
||||
- **default-renderer:** added collapse errors changed the renderer a bit ([514fc87](https://github.com/cenk1cenk2/listr2/commit/514fc87bb2595cc1a09cb865d60a380b0f71a9ec)), closes [#163](https://github.com/cenk1cenk2/listr2/issues/163)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
- changed last rendering method ([bd38146](https://github.com/cenk1cenk2/listr2/commit/bd38146c692127abb09cd754f2be0aac306efda4))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- Tests might break with this release, if they directly rely on default-renderer. Especially the snapshot testing will get hit.
|
||||
|
||||
* default-renderer now utilizes different EOL depending on the platform.
|
||||
* The last rendering method has been changed therefore it will leave a empty line before doing the last render which is the log-update clean functionallity, before writing it with process.stdout.
|
||||
* Outputted data now gets better trimmed which might cause testing to not match.
|
||||
* More consistent spacing is introduced for rendering the subtasks, bottom bar and the prompt bar.
|
||||
|
||||
* error-collection was not working as expected but it might now cause some tests to fail.
|
||||
|
||||
Overall there are no breaking changes introduced to the code directly but it might cause the tests which rely on default-renderer, since the rendering method is almost completely revised.
|
||||
|
||||
## [2.6.2](https://github.com/cenk1cenk2/listr2/compare/v2.6.1...v2.6.2) (2020-08-29)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **default-renderer:** timer with title change ([6cf1eec](https://github.com/cenk1cenk2/listr2/commit/6cf1eec57346246120cb5e75282da9e10ebe3748))
|
||||
|
||||
## [2.6.1](https://github.com/cenk1cenk2/listr2/compare/v2.6.0...v2.6.1) (2020-08-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- new version for replicate.npmjs ([09dcb9c](https://github.com/cenk1cenk2/listr2/commit/09dcb9cbcafb7222222560c84cd8e0a08916ef1b))
|
||||
|
||||
# [2.6.0](https://github.com/cenk1cenk2/listr2/compare/v2.5.1...v2.6.0) (2020-08-16)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- keep persistent output on error ([de7e661](https://github.com/cenk1cenk2/listr2/commit/de7e661c15f9fba020e66cd098426f47cf08c1db))
|
||||
|
||||
### Features
|
||||
|
||||
- **listr:** accessing parent task ([544a130](https://github.com/cenk1cenk2/listr2/commit/544a1304ff5e642621ae1ed14358947b04cb3f91)), closes [#141](https://github.com/cenk1cenk2/listr2/issues/141)
|
||||
- isolated error and skip messages ([5b8735d](https://github.com/cenk1cenk2/listr2/commit/5b8735d53ba7325e0d3a5aa1ec5989b1cc353610))
|
||||
- **default-renderer:** added timer to renderer ([4b8d757](https://github.com/cenk1cenk2/listr2/commit/4b8d757648153305090d00c3f885fec3ac5a0fe0))
|
||||
|
||||
## [2.5.1](https://github.com/cenk1cenk2/listr2/compare/v2.5.0...v2.5.1) (2020-08-10)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **prompt:** fixed an issue with one prompt not returning default ([375a441](https://github.com/cenk1cenk2/listr2/commit/375a441cfc560b550c639fe4b977ee2d74aad755))
|
||||
|
||||
# [2.5.0](https://github.com/cenk1cenk2/listr2/compare/v2.4.1...v2.5.0) (2020-08-10)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** update dependency rxjs to ^6.6.2 ([5175991](https://github.com/cenk1cenk2/listr2/commit/5175991e471a2c4a3f6621026657744ae59c9b43))
|
||||
- **prompt:** enquirer custom prompts ([6317ec6](https://github.com/cenk1cenk2/listr2/commit/6317ec6d4aac2f3467dd6dc37a98f05baeb244b6))
|
||||
|
||||
### Features
|
||||
|
||||
- **renderer:** added disable color and enable silent renderer via options ([74f91c2](https://github.com/cenk1cenk2/listr2/commit/74f91c2269316b2bac22bb450c14972e0dd56dde))
|
||||
|
||||
## [2.4.1](https://github.com/cenk1cenk2/listr2/compare/v2.4.0...v2.4.1) (2020-07-29)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **default-renderer:** added a tiny fix when persistent bottom bar is enabled and task is skipped ([d6a25a8](https://github.com/cenk1cenk2/listr2/commit/d6a25a886224bf6d0ac3c3a7253901f1fb74dc59))
|
||||
|
||||
# [2.4.0](https://github.com/cenk1cenk2/listr2/compare/v2.3.6...v2.4.0) (2020-07-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** removed bundle of rxjs ([a103acb](https://github.com/cenk1cenk2/listr2/commit/a103acb040cd8b89c67dea17b5aa9e63730af269))
|
||||
- **rxjs:** retry for rxjs export with webpack ([ac537e5](https://github.com/cenk1cenk2/listr2/commit/ac537e5beb2c096acdbb6cb2725f9d7aa434a26d))
|
||||
|
||||
### Features
|
||||
|
||||
- **build:** bundle rxjs with webpack, reduce total bundle size, since i started to use this everywhere ([4cc922a](https://github.com/cenk1cenk2/listr2/commit/4cc922a94a21899973aeca371e4078fa9205e053))
|
||||
|
||||
### Reverts
|
||||
|
||||
- **deps:** rxjs bundle ([4067164](https://github.com/cenk1cenk2/listr2/commit/4067164ed993368997986223bbec3c22059f27b8))
|
||||
|
||||
# [2.4.0-beta.3](https://github.com/cenk1cenk2/listr2/compare/v2.4.0-beta.2...v2.4.0-beta.3) (2020-07-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** removed bundle of rxjs ([a103acb](https://github.com/cenk1cenk2/listr2/commit/a103acb040cd8b89c67dea17b5aa9e63730af269))
|
||||
|
||||
### Reverts
|
||||
|
||||
- **deps:** rxjs bundle ([4067164](https://github.com/cenk1cenk2/listr2/commit/4067164ed993368997986223bbec3c22059f27b8))
|
||||
|
||||
# [2.4.0-beta.2](https://github.com/cenk1cenk2/listr2/compare/v2.4.0-beta.1...v2.4.0-beta.2) (2020-07-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **rxjs:** retry for rxjs export with webpack ([ac537e5](https://github.com/cenk1cenk2/listr2/commit/ac537e5beb2c096acdbb6cb2725f9d7aa434a26d))
|
||||
|
||||
# [2.4.0-beta.1](https://github.com/cenk1cenk2/listr2/compare/v2.3.6...v2.4.0-beta.1) (2020-07-27)
|
||||
|
||||
### Features
|
||||
|
||||
- **build:** bundle rxjs with webpack, reduce total bundle size, since i started to use this everywhere ([4cc922a](https://github.com/cenk1cenk2/listr2/commit/4cc922a94a21899973aeca371e4078fa9205e053))
|
||||
|
||||
## [2.3.6](https://github.com/cenk1cenk2/listr2/compare/v2.3.5...v2.3.6) (2020-07-27)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- remove unused import ([46a72c7](https://github.com/cenk1cenk2/listr2/commit/46a72c7d16d5ae882e4fa23e9064b3f0ad008792))
|
||||
- **default-renderer:** fix output rendering with empty subtasks ([8299c3f](https://github.com/cenk1cenk2/listr2/commit/8299c3fe8324bdade582e1e0052a4463039f52e3))
|
||||
- **default-renderer:** output from subtask of subtask ([4096e62](https://github.com/cenk1cenk2/listr2/commit/4096e62f058082f15cc494c6a406cd0bdef4e641))
|
||||
|
||||
## [2.3.5](https://github.com/cenk1cenk2/listr2/compare/v2.3.4...v2.3.5) (2020-07-26)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **default-renderer:** renderer to show spinner if all subtasks has no title ([58aaadc](https://github.com/cenk1cenk2/listr2/commit/58aaadc08924ea4657caa86850c5d9040fb9d1f5))
|
||||
- **deps:** update all minor dependency updates ([4fccbc4](https://github.com/cenk1cenk2/listr2/commit/4fccbc4382c3b41e374070166a1ecb558ab77c66))
|
||||
|
||||
## [2.3.4](https://github.com/cenk1cenk2/listr2/compare/v2.3.3...v2.3.4) (2020-07-26)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **default-renderer:** fixed the issue when there is all empty subtasks and it leaves one extra space ([57b0809](https://github.com/cenk1cenk2/listr2/commit/57b08097bdd83bca40fbd89cd823fc1d175fa612))
|
||||
|
||||
## [2.3.3](https://github.com/cenk1cenk2/listr2/compare/v2.3.2...v2.3.3) (2020-07-24)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **prompts:** removed prompt bind type to use it in other scripts directly ([655334a](https://github.com/cenk1cenk2/listr2/commit/655334a256524cb8099c189868bb8f30dc784b90))
|
||||
|
||||
## [2.3.2](https://github.com/cenk1cenk2/listr2/compare/v2.3.1...v2.3.2) (2020-07-23)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **tests:** change env variable for tests, esspecially chalk because node_env test is more common ([5c7c9ca](https://github.com/cenk1cenk2/listr2/commit/5c7c9caf33eb5141d46cf79cd7176826807b9e50))
|
||||
|
||||
## [2.3.1](https://github.com/cenk1cenk2/listr2/compare/v2.3.0...v2.3.1) (2020-07-22)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **readme:** added badge for npm ([61f6bc3](https://github.com/cenk1cenk2/listr2/commit/61f6bc36a5df27b80d61233dd0880326b93b7d5a))
|
||||
|
||||
# [2.3.0](https://github.com/cenk1cenk2/listr2/compare/v2.2.1...v2.3.0) (2020-07-22)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **colors:** disable colors for test ([b81ee08](https://github.com/cenk1cenk2/listr2/commit/b81ee087fd11f9ee8b96b305d9a76fb7b245ca9c))
|
||||
- **deps:** update all minor package updates ([aba8cf2](https://github.com/cenk1cenk2/listr2/commit/aba8cf20abbf6c81cd98be41099254ba6c30a19b))
|
||||
- **truncate:** fix truncate to 80 on columns unknown ([3454aed](https://github.com/cenk1cenk2/listr2/commit/3454aedbc4282550f79f4e65fe34ab14fbe06e4e))
|
||||
|
||||
### Features
|
||||
|
||||
- added lazy option to default renderer. moved enquirer to inject wrapper key from root ([78f3984](https://github.com/cenk1cenk2/listr2/commit/78f3984c19cd31f45edf5fbc8e8bfa5380104331))
|
||||
- **prompts:** added external enquirer injection for testing, fallback condition, fixed catching err ([a0bf6fd](https://github.com/cenk1cenk2/listr2/commit/a0bf6fd444caf69b0231f710099e367840c0ed15)), closes [#66](https://github.com/cenk1cenk2/listr2/issues/66) [#67](https://github.com/cenk1cenk2/listr2/issues/67) [#68](https://github.com/cenk1cenk2/listr2/issues/68)
|
||||
|
||||
# [2.3.0-beta.2](https://github.com/cenk1cenk2/listr2/compare/v2.3.0-beta.1...v2.3.0-beta.2) (2020-07-22)
|
||||
|
||||
### Features
|
||||
|
||||
- added lazy option to default renderer. moved enquirer to inject wrapper key from root ([78f3984](https://github.com/cenk1cenk2/listr2/commit/78f3984c19cd31f45edf5fbc8e8bfa5380104331))
|
||||
|
||||
# [2.3.0-beta.1](https://github.com/cenk1cenk2/listr2/compare/v2.2.1...v2.3.0-beta.1) (2020-07-22)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** update all minor package updates ([aba8cf2](https://github.com/cenk1cenk2/listr2/commit/aba8cf20abbf6c81cd98be41099254ba6c30a19b))
|
||||
|
||||
### Features
|
||||
|
||||
- **prompts:** added external enquirer injection for testing, fallback condition, fixed catching err ([a0bf6fd](https://github.com/cenk1cenk2/listr2/commit/a0bf6fd444caf69b0231f710099e367840c0ed15)), closes [#66](https://github.com/cenk1cenk2/listr2/issues/66) [#67](https://github.com/cenk1cenk2/listr2/issues/67) [#68](https://github.com/cenk1cenk2/listr2/issues/68)
|
||||
|
||||
## [2.2.1](https://github.com/cenk1cenk2/listr2/compare/v2.2.0...v2.2.1) (2020-07-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **prompts:** added return when prompt error ([6c89e56](https://github.com/cenk1cenk2/listr2/commit/6c89e562713686a1748a0436aef3c2ae43c6c555))
|
||||
- **prompts:** fixed prompt error message when enquirer is not installed optionally ([8fc5849](https://github.com/cenk1cenk2/listr2/commit/8fc58492bcac3fb5520360c7c8d1e5c2156b74fc))
|
||||
|
||||
# [2.2.0](https://github.com/cenk1cenk2/listr2/compare/v2.1.9...v2.2.0) (2020-07-03)
|
||||
|
||||
### Features
|
||||
|
||||
- display elegant spinner on Windows Terminal ([a86868b](https://github.com/cenk1cenk2/listr2/commit/a86868b7638f5b63b64f70e7559ace07d598c84a))
|
||||
|
||||
## [2.1.9](https://github.com/cenk1cenk2/listr2/compare/v2.1.8...v2.1.9) (2020-07-01)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **manager:** manager type problem with indent ([9444d3d](https://github.com/cenk1cenk2/listr2/commit/9444d3dcc5c7d1d72aa424441cc0b150effedebd))
|
||||
|
||||
## [2.1.9-beta.1](https://github.com/cenk1cenk2/listr2/compare/v2.1.8...v2.1.9-beta.1) (2020-06-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **manager:** manager type problem with indent ([9444d3d](https://github.com/cenk1cenk2/listr2/commit/9444d3dcc5c7d1d72aa424441cc0b150effedebd))
|
||||
|
||||
## [2.1.8](https://github.com/cenk1cenk2/listr2/compare/v2.1.7...v2.1.8) (2020-06-17)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **renderer:** add skip to verbose output ([f577df0](https://github.com/cenk1cenk2/listr2/commit/f577df08720a6602a46b9eec457a9d55321d89d7))
|
||||
|
||||
## [2.1.7](https://github.com/cenk1cenk2/listr2/compare/v2.1.6...v2.1.7) (2020-06-14)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **renderer:** verbose renderer ([794f966](https://github.com/cenk1cenk2/listr2/commit/794f9667f8d2b1715f76a841dcb73f47bf8d6aca))
|
||||
|
||||
## [2.1.6](https://github.com/cenk1cenk2/listr2/compare/v2.1.5...v2.1.6) (2020-06-14)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **renderer:** add defaults ([8d3436d](https://github.com/cenk1cenk2/listr2/commit/8d3436d74dfe904f1259f85cfa251445f5c58e84))
|
||||
|
||||
## [2.1.5](https://github.com/cenk1cenk2/listr2/compare/v2.1.4...v2.1.5) (2020-06-14)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **renderer:** verbose renderer defaults ([3246fe1](https://github.com/cenk1cenk2/listr2/commit/3246fe1deb19dd2878d5c86ee2ca98d9a7b2f26a))
|
||||
|
||||
## [2.1.4](https://github.com/cenk1cenk2/listr2/compare/v2.1.3...v2.1.4) (2020-06-14)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **added verbose renderer options:** added new options of log empty title and title change ([5a5eb79](https://github.com/cenk1cenk2/listr2/commit/5a5eb79e5d9097b84fc74722de85c6f60e0f288e))
|
||||
- **types:** enquirer types ([d309d91](https://github.com/cenk1cenk2/listr2/commit/d309d91241ec85f52d54b974f6391f7c640ea1ae))
|
||||
|
||||
## [2.1.3](https://github.com/cenk1cenk2/listr2/compare/v2.1.2...v2.1.3) (2020-06-04)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **enquirer:** moved prompt flattening around again for my own scripts ([a40a569](https://github.com/cenk1cenk2/listr2/commit/a40a569785dec64d14186fa997bf8bebcd219390))
|
||||
- **enquirer:** optional stdout ([703658f](https://github.com/cenk1cenk2/listr2/commit/703658f3fe84f91e74173932c91b609380d40c59))
|
||||
|
||||
## [2.1.2](https://github.com/cenk1cenk2/listr2/compare/v2.1.1...v2.1.2) (2020-06-04)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **prompt:** added option to call prompt from outside for my applicatiosn ([27dbdfa](https://github.com/cenk1cenk2/listr2/commit/27dbdfa5068eed7570293468455515ed1c7860ba))
|
||||
|
||||
## [2.1.1](https://github.com/cenk1cenk2/listr2/compare/v2.1.0...v2.1.1) (2020-06-04)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **streams:** add legacy streams to accepted types ([f63dd52](https://github.com/cenk1cenk2/listr2/commit/f63dd52167c2babada80ff5d092843ead2ca86e7))
|
||||
|
||||
# [2.1.0](https://github.com/cenk1cenk2/listr2/compare/v2.0.4...v2.1.0) (2020-06-03)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** remove trivial deps ([de8dec0](https://github.com/cenk1cenk2/listr2/commit/de8dec09b45fa09ddc8afb1d7742846ba3b620dd))
|
||||
- **deps:** remove unnecassary types ([b37f416](https://github.com/cenk1cenk2/listr2/commit/b37f416fbed04d531b1dca5495d7008ecedf4ab5))
|
||||
- **deps:** updated deps to latest ([c4ad38f](https://github.com/cenk1cenk2/listr2/commit/c4ad38f32510d598a4c93d19ca517eef81c841a2))
|
||||
- **figures:** made microsoft icons to use the fancy ones, even though it may fail in some cases ([f0e5817](https://github.com/cenk1cenk2/listr2/commit/f0e581706e59d9b96da9bd050a1ad3638b59c2aa)), closes [#31](https://github.com/cenk1cenk2/listr2/issues/31)
|
||||
- **prompt:** enquirer to peer ([cae55e9](https://github.com/cenk1cenk2/listr2/commit/cae55e962faf54f3ddadc6c220567a316c8ee15b))
|
||||
- **prompt:** types ([110130a](https://github.com/cenk1cenk2/listr2/commit/110130a6c0a6b3443362cd8fc018e18b6ef5fbbc))
|
||||
- **prompts:** fixed type for array prompts, added name as mandatory ([a08b1e4](https://github.com/cenk1cenk2/listr2/commit/a08b1e4a9b80fd542384ef3a5dbc111dead0bd6c))
|
||||
- **stream:** fixed streams added example ([614d89f](https://github.com/cenk1cenk2/listr2/commit/614d89fc1b64e7a586a7a590233d4dce1696b7b4)), closes [#37](https://github.com/cenk1cenk2/listr2/issues/37)
|
||||
|
||||
### Features
|
||||
|
||||
- **prompt:** make prompt module optional, be more compatible to underlying enqurier ([64cecc1](https://github.com/cenk1cenk2/listr2/commit/64cecc10049f5802a6e7a71071ec698e1226bdc2)), closes [#34](https://github.com/cenk1cenk2/listr2/issues/34)
|
||||
- **prompt:** use enquirer directly ([b34e9d0](https://github.com/cenk1cenk2/listr2/commit/b34e9d0b2ef9b0cbf723759c5a236eca8ac86af0)), closes [#34](https://github.com/cenk1cenk2/listr2/issues/34)
|
||||
- **renderer:** added hook and stdout support ([bd73c68](https://github.com/cenk1cenk2/listr2/commit/bd73c68b9eb21cd100a266ce05ba36af0c727a4f)), closes [#31](https://github.com/cenk1cenk2/listr2/issues/31)
|
||||
|
||||
# [2.1.0-beta.6](https://github.com/cenk1cenk2/listr2/compare/v2.1.0-beta.5...v2.1.0-beta.6) (2020-06-03)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** remove trivial deps ([de8dec0](https://github.com/cenk1cenk2/listr2/commit/de8dec09b45fa09ddc8afb1d7742846ba3b620dd))
|
||||
- **deps:** remove unnecassary types ([b37f416](https://github.com/cenk1cenk2/listr2/commit/b37f416fbed04d531b1dca5495d7008ecedf4ab5))
|
||||
- **deps:** updated deps to latest ([c4ad38f](https://github.com/cenk1cenk2/listr2/commit/c4ad38f32510d598a4c93d19ca517eef81c841a2))
|
||||
- **stream:** fixed streams added example ([614d89f](https://github.com/cenk1cenk2/listr2/commit/614d89fc1b64e7a586a7a590233d4dce1696b7b4)), closes [#37](https://github.com/cenk1cenk2/listr2/issues/37)
|
||||
|
||||
# [2.1.0-beta.5](https://github.com/cenk1cenk2/listr2/compare/v2.1.0-beta.4...v2.1.0-beta.5) (2020-06-03)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **prompt:** types ([110130a](https://github.com/cenk1cenk2/listr2/commit/110130a6c0a6b3443362cd8fc018e18b6ef5fbbc))
|
||||
|
||||
# [2.1.0-beta.4](https://github.com/cenk1cenk2/listr2/compare/v2.1.0-beta.3...v2.1.0-beta.4) (2020-06-02)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **prompt:** enquirer to peer ([cae55e9](https://github.com/cenk1cenk2/listr2/commit/cae55e962faf54f3ddadc6c220567a316c8ee15b))
|
||||
|
||||
# [2.1.0-beta.3](https://github.com/cenk1cenk2/listr2/compare/v2.1.0-beta.2...v2.1.0-beta.3) (2020-06-02)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **prompts:** fixed type for array prompts, added name as mandatory ([a08b1e4](https://github.com/cenk1cenk2/listr2/commit/a08b1e4a9b80fd542384ef3a5dbc111dead0bd6c))
|
||||
|
||||
# [2.1.0-beta.2](https://github.com/cenk1cenk2/listr2/compare/v2.1.0-beta.1...v2.1.0-beta.2) (2020-06-02)
|
||||
|
||||
### Features
|
||||
|
||||
- **prompt:** make prompt module optional, be more compatible to underlying enqurier ([64cecc1](https://github.com/cenk1cenk2/listr2/commit/64cecc10049f5802a6e7a71071ec698e1226bdc2)), closes [#34](https://github.com/cenk1cenk2/listr2/issues/34)
|
||||
- **prompt:** use enquirer directly ([b34e9d0](https://github.com/cenk1cenk2/listr2/commit/b34e9d0b2ef9b0cbf723759c5a236eca8ac86af0)), closes [#34](https://github.com/cenk1cenk2/listr2/issues/34)
|
||||
|
||||
# [2.1.0-beta.1](https://github.com/cenk1cenk2/listr2/compare/v2.0.4...v2.1.0-beta.1) (2020-05-25)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **figures:** made microsoft icons to use the fancy ones, even though it may fail in some cases ([f0e5817](https://github.com/cenk1cenk2/listr2/commit/f0e581706e59d9b96da9bd050a1ad3638b59c2aa)), closes [#31](https://github.com/cenk1cenk2/listr2/issues/31)
|
||||
|
||||
### Features
|
||||
|
||||
- **renderer:** added hook and stdout support ([bd73c68](https://github.com/cenk1cenk2/listr2/commit/bd73c68b9eb21cd100a266ce05ba36af0c727a4f)), closes [#31](https://github.com/cenk1cenk2/listr2/issues/31)
|
||||
|
||||
## [2.0.4](https://github.com/cenk1cenk2/listr2/compare/v2.0.3...v2.0.4) (2020-05-20)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **types:** match version of uuid ([33a1e80](https://github.com/cenk1cenk2/listr2/commit/33a1e8007a82015171ca55c86a71fbbc017d6e4d))
|
||||
- **uuid:** added implicit tests for 13.6, rollback to uuid working version ([75ade63](https://github.com/cenk1cenk2/listr2/commit/75ade636b63606ee243e2591e60e8e72b5f1c1ca)), closes [#28](https://github.com/cenk1cenk2/listr2/issues/28)
|
||||
|
||||
## [2.0.3](https://github.com/cenk1cenk2/listr2/compare/v2.0.2...v2.0.3) (2020-05-19)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** exchange uuid with nanoid ([2048b3d](https://github.com/cenk1cenk2/listr2/commit/2048b3d953ab5cab0cf67ffe26fa24fb987e6b6e)), closes [#25](https://github.com/cenk1cenk2/listr2/issues/25)
|
||||
|
||||
## [2.0.2](https://github.com/cenk1cenk2/listr2/compare/v2.0.1...v2.0.2) (2020-05-18)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **deps:** rollback uuid to ^7 ([9ba257d](https://github.com/cenk1cenk2/listr2/commit/9ba257d9b19ce4534982baac358096fedb21f2b1)), closes [#25](https://github.com/cenk1cenk2/listr2/issues/25)
|
||||
|
||||
## [2.0.1](https://github.com/cenk1cenk2/listr2/compare/v2.0.0...v2.0.1) (2020-05-06)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **manager:** fixed manager types ([10d74e9](https://github.com/cenk1cenk2/listr2/commit/10d74e9f481fee689f103a08c42c3c60d0fb2bc1)), closes [#22](https://github.com/cenk1cenk2/listr2/issues/22)
|
||||
- **manager:** fixed types for manager ([033c7d1](https://github.com/cenk1cenk2/listr2/commit/033c7d180431a7039c9c38a8537b43fc5615f50e))
|
||||
|
||||
# [2.0.0](https://github.com/cenk1cenk2/listr2/compare/v1.3.12...v2.0.0) (2020-05-06)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **default-renderer:** added back cli truncate ([22132a5](https://github.com/cenk1cenk2/listr2/commit/22132a5b022ef58a4a463e48af062f54631a3b9d))
|
||||
- **error-collection:** fixed error collection on non-failing tasks ([4239094](https://github.com/cenk1cenk2/listr2/commit/4239094a7947cf60d8d030c45aaf75710637a40c))
|
||||
- **manager:** added error context ([4f8f387](https://github.com/cenk1cenk2/listr2/commit/4f8f387a576bc83947fd90e83f27de827b9f9d08))
|
||||
- **manager:** fixed manager ([57dcd7f](https://github.com/cenk1cenk2/listr2/commit/57dcd7f8362589f2a43b645920cf158c2cb8d591))
|
||||
- **types:** fix ([b3ee9be](https://github.com/cenk1cenk2/listr2/commit/b3ee9be0f895e8927c825b3993cc847d360e709d))
|
||||
- fixed types for isolated renderer options ([4521832](https://github.com/cenk1cenk2/listr2/commit/452183240c55984db57551082aa049e4799a2425))
|
||||
|
||||
### Features
|
||||
|
||||
- **release:** ready to update to new version ([50fb773](https://github.com/cenk1cenk2/listr2/commit/50fb773128073b1ec312fea3121a2f93e9270271)), closes [#19](https://github.com/cenk1cenk2/listr2/issues/19) [#18](https://github.com/cenk1cenk2/listr2/issues/18)
|
||||
- **renderer-options:** started to isolate the renderer options instead of writing them directly ([95f7f87](https://github.com/cenk1cenk2/listr2/commit/95f7f8749445e45a90d3f4346eb4cd0625e9593e))
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
- **release:** - Renderer Options
|
||||
- Reason: _This was changed because of having all the renderer options that are mangled together and not respecting which renderer has been choosen. It also allows for custom renderers to have their own logic by exposing their options in a single class file rather than expecting that functionality from the project itself._
|
||||
- Before <v1.3.12:
|
||||
```typescript
|
||||
new Listr<Ctx>([
|
||||
{
|
||||
task: async (ctx, task): Promise<void> => {
|
||||
},
|
||||
persistentOutput: true
|
||||
}
|
||||
], {
|
||||
concurrent: [secure],
|
||||
collapse: true
|
||||
```
|
||||
- After <v1.3.12:
|
||||
```typescript
|
||||
new Listr<Ctx>(
|
||||
[
|
||||
{
|
||||
task: async (ctx, task): Promise<void> => {},
|
||||
options: { persistentOutput: true } // per task based options are moved to their own key
|
||||
}
|
||||
],
|
||||
{
|
||||
concurrent: [secure],
|
||||
rendererOptions: { collapse: [secure] }
|
||||
// global renderer options moved to their own key
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
* Some of the types has been changed.
|
||||
|
||||
- Reason: _Some of the types had to be changed due to compatability reasons with new autocomplete functionality of the dynamic renderer options._
|
||||
- Before <v1.3.12:
|
||||
|
||||
```typescript
|
||||
let task: Listr<Ctx>
|
||||
|
||||
task = new Listr(..., { renderer: 'verbose' })
|
||||
```
|
||||
|
||||
- After <v1.3.12:
|
||||
|
||||
```typescript
|
||||
// this without the indication of verbose will now fail due to default renderer being 'default' for autocompleting goodness of the IDEs.
|
||||
// So you have to overwrite it manually to 'verbose'.
|
||||
// If it does not have a default you had to explicitly write { renderer: 'default' } everytime to have the auto complete feature
|
||||
let task: Listr<Ctx, 'verbose'>
|
||||
|
||||
task = new Listr(..., { renderer: 'verbose' })
|
||||
```
|
||||
|
||||
* Test renderer removed.
|
||||
- Reason: _On non-tty environments that the verbose renderer is intended for there is no need to show icons. Since icons are now optional with the default being disabled for the verbose renderer, there is no need for a renderer that does have the same functionality since verbose and test are now basically the same thing. Verbose seemed a better name then test, so I had to remove test from the equation._
|
||||
- Before <v1.3.12:
|
||||
```typescript
|
||||
const task = new Listr(..., { renderer: 'test' })
|
||||
```
|
||||
- After <v1.3.12:
|
||||
```typescript
|
||||
const task = new Listr(..., { renderer: 'verbose' })
|
||||
```
|
||||
|
||||
## [1.3.12](https://github.com/cenk1cenk2/listr2/compare/v1.3.11...v1.3.12) (2020-04-30)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **ignore:** note to self dont do late night commits ([56ff7b7](https://github.com/cenk1cenk2/listr2/commit/56ff7b79b010606c593348e6b27fcd455d1c2dcd))
|
||||
|
||||
## [1.3.11](https://github.com/cenk1cenk2/listr2/compare/v1.3.10...v1.3.11) (2020-04-30)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **build:** ignored tests files ([16d8d93](https://github.com/cenk1cenk2/listr2/commit/16d8d9336fabbfb311a821744707e8ae55e80334))
|
||||
|
||||
## [1.3.10](https://github.com/cenk1cenk2/listr2/compare/v1.3.9...v1.3.10) (2020-04-30)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **tests:** add tests to npm ignore ([83cd9d3](https://github.com/cenk1cenk2/listr2/commit/83cd9d3c1270dc8f48458d329b01ed638eff6340))
|
||||
|
||||
## [1.3.9](https://github.com/cenk1cenk2/listr2/compare/v1.3.8...v1.3.9) (2020-04-30)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- added e2e and unit tests, not comprehensive ([4d3076b](https://github.com/cenk1cenk2/listr2/commit/4d3076b80c2adb7a22388178f3e31690dec37534))
|
||||
|
||||
### Reverts
|
||||
|
||||
- **task:** revert back to enable boolean for not breaking compatability ([45b6c32](https://github.com/cenk1cenk2/listr2/commit/45b6c32fe451e138bad36f95d4d9ade1b49f45a2))
|
21
CyLukTs/lukan/node_modules/listr2/LICENSE
generated
vendored
Normal file
21
CyLukTs/lukan/node_modules/listr2/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Cenk Kilic <cenk@kilic.dev> (https://srcs.kilic.dev), Sam Verschueren <sam.verschueren@gmail.com> (github.com/SamVerschueren)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
17
CyLukTs/lukan/node_modules/listr2/README.md
generated
vendored
Normal file
17
CyLukTs/lukan/node_modules/listr2/README.md
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
# listr2
|
||||
|
||||
[](https://drone.kilic.dev/cenk1cenk2/listr2) [](https://npmjs.org/package/listr2) [](https://npmjs.org/package/listr2) [](https://codecov.io/gh/cenk1cenk2/listr2) [](https://npmjs.org/package/listr2) [](https://github.com/semantic-release/semantic-release)
|
||||
|
||||
**Create beautiful CLI interfaces via easy and logical to implement task lists that feel alive and interactive.**
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
# Documentation
|
||||
|
||||
**[Read the documentation...](https://listr2.kilic.dev)**
|
||||
|
||||
# API Endpoints
|
||||
|
||||
**All the endpoints can be found [here](./docs/README.md).**
|
2
CyLukTs/lukan/node_modules/listr2/dist/constants/clearline-regex.constants.d.ts
generated
vendored
Normal file
2
CyLukTs/lukan/node_modules/listr2/dist/constants/clearline-regex.constants.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export declare const CLEAR_LINE_REGEX = "(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+";
|
||||
export declare const BELL_REGEX: RegExp;
|
6
CyLukTs/lukan/node_modules/listr2/dist/constants/clearline-regex.constants.js
generated
vendored
Normal file
6
CyLukTs/lukan/node_modules/listr2/dist/constants/clearline-regex.constants.js
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.BELL_REGEX = exports.CLEAR_LINE_REGEX = void 0;
|
||||
/* eslint-disable no-control-regex */
|
||||
exports.CLEAR_LINE_REGEX = '(?:\\u001b|\\u009b)\\[[\\=><~/#&.:=?%@~_-]*[0-9]*[\\a-ln-tqyz=><~/#&.:=?%@~_-]+';
|
||||
exports.BELL_REGEX = /\u0007/;
|
9
CyLukTs/lukan/node_modules/listr2/dist/constants/event.constants.d.ts
generated
vendored
Normal file
9
CyLukTs/lukan/node_modules/listr2/dist/constants/event.constants.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
/** Type of listr internal events. */
|
||||
export declare enum ListrEventType {
|
||||
TITLE = "TITLE",
|
||||
STATE = "STATE",
|
||||
ENABLED = "ENABLED",
|
||||
SUBTASK = "SUBTASK",
|
||||
DATA = "DATA",
|
||||
MESSAGE = "MESSAGE"
|
||||
}
|
13
CyLukTs/lukan/node_modules/listr2/dist/constants/event.constants.js
generated
vendored
Normal file
13
CyLukTs/lukan/node_modules/listr2/dist/constants/event.constants.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ListrEventType = void 0;
|
||||
/** Type of listr internal events. */
|
||||
var ListrEventType;
|
||||
(function (ListrEventType) {
|
||||
ListrEventType["TITLE"] = "TITLE";
|
||||
ListrEventType["STATE"] = "STATE";
|
||||
ListrEventType["ENABLED"] = "ENABLED";
|
||||
ListrEventType["SUBTASK"] = "SUBTASK";
|
||||
ListrEventType["DATA"] = "DATA";
|
||||
ListrEventType["MESSAGE"] = "MESSAGE";
|
||||
})(ListrEventType = exports.ListrEventType || (exports.ListrEventType = {}));
|
2
CyLukTs/lukan/node_modules/listr2/dist/constants/index.d.ts
generated
vendored
Normal file
2
CyLukTs/lukan/node_modules/listr2/dist/constants/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export * from './state.constants';
|
||||
export * from './event.constants';
|
14
CyLukTs/lukan/node_modules/listr2/dist/constants/index.js
generated
vendored
Normal file
14
CyLukTs/lukan/node_modules/listr2/dist/constants/index.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./state.constants"), exports);
|
||||
__exportStar(require("./event.constants"), exports);
|
10
CyLukTs/lukan/node_modules/listr2/dist/constants/state.constants.d.ts
generated
vendored
Normal file
10
CyLukTs/lukan/node_modules/listr2/dist/constants/state.constants.d.ts
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
/** Available task states. */
|
||||
export declare enum ListrTaskState {
|
||||
PENDING = "PENDING",
|
||||
COMPLETED = "COMPLETED",
|
||||
FAILED = "FAILED",
|
||||
SKIPPED = "SKIPPED",
|
||||
ROLLING_BACK = "ROLLING_BACK",
|
||||
ROLLED_BACK = "ROLLED_BACK",
|
||||
RETRY = "RETRY"
|
||||
}
|
14
CyLukTs/lukan/node_modules/listr2/dist/constants/state.constants.js
generated
vendored
Normal file
14
CyLukTs/lukan/node_modules/listr2/dist/constants/state.constants.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ListrTaskState = void 0;
|
||||
/** Available task states. */
|
||||
var ListrTaskState;
|
||||
(function (ListrTaskState) {
|
||||
ListrTaskState["PENDING"] = "PENDING";
|
||||
ListrTaskState["COMPLETED"] = "COMPLETED";
|
||||
ListrTaskState["FAILED"] = "FAILED";
|
||||
ListrTaskState["SKIPPED"] = "SKIPPED";
|
||||
ListrTaskState["ROLLING_BACK"] = "ROLLING_BACK";
|
||||
ListrTaskState["ROLLED_BACK"] = "ROLLED_BACK";
|
||||
ListrTaskState["RETRY"] = "RETRY";
|
||||
})(ListrTaskState = exports.ListrTaskState || (exports.ListrTaskState = {}));
|
9
CyLukTs/lukan/node_modules/listr2/dist/index.d.ts
generated
vendored
Normal file
9
CyLukTs/lukan/node_modules/listr2/dist/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
export * from './listr';
|
||||
export * from './manager';
|
||||
export * from './constants/index';
|
||||
export * from './interfaces/index';
|
||||
export * from './utils/logger';
|
||||
export * from './utils/logger.constants';
|
||||
export * from './utils/prompt.interface';
|
||||
export * from './utils/prompt';
|
||||
export * from './utils/figures';
|
21
CyLukTs/lukan/node_modules/listr2/dist/index.js
generated
vendored
Normal file
21
CyLukTs/lukan/node_modules/listr2/dist/index.js
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./listr"), exports);
|
||||
__exportStar(require("./manager"), exports);
|
||||
__exportStar(require("./constants/index"), exports);
|
||||
__exportStar(require("./interfaces/index"), exports);
|
||||
__exportStar(require("./utils/logger"), exports);
|
||||
__exportStar(require("./utils/logger.constants"), exports);
|
||||
__exportStar(require("./utils/prompt.interface"), exports);
|
||||
__exportStar(require("./utils/prompt"), exports);
|
||||
__exportStar(require("./utils/figures"), exports);
|
4
CyLukTs/lukan/node_modules/listr2/dist/interfaces/index.d.ts
generated
vendored
Normal file
4
CyLukTs/lukan/node_modules/listr2/dist/interfaces/index.d.ts
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
export * from './listr.interface';
|
||||
export * from './listr-error.interface';
|
||||
export * from './task.interface';
|
||||
export * from './renderer.interface';
|
16
CyLukTs/lukan/node_modules/listr2/dist/interfaces/index.js
generated
vendored
Normal file
16
CyLukTs/lukan/node_modules/listr2/dist/interfaces/index.js
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
||||
}) : (function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}));
|
||||
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__exportStar(require("./listr.interface"), exports);
|
||||
__exportStar(require("./listr-error.interface"), exports);
|
||||
__exportStar(require("./task.interface"), exports);
|
||||
__exportStar(require("./renderer.interface"), exports);
|
29
CyLukTs/lukan/node_modules/listr2/dist/interfaces/listr-error.interface.d.ts
generated
vendored
Normal file
29
CyLukTs/lukan/node_modules/listr2/dist/interfaces/listr-error.interface.d.ts
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
import { ListrRendererFactory } from './renderer.interface';
|
||||
import { Task } from '../lib/task';
|
||||
/** The internal error handling mechanism.. */
|
||||
export declare class ListrError<Ctx extends Record<PropertyKey, any> = Record<PropertyKey, any>> extends Error {
|
||||
error: Error;
|
||||
type?: ListrErrorTypes;
|
||||
ctx?: Ctx;
|
||||
task?: Task<Ctx, ListrRendererFactory>;
|
||||
constructor(error: Error, type?: ListrErrorTypes, ctx?: Ctx, task?: Task<Ctx, ListrRendererFactory>);
|
||||
}
|
||||
/**
|
||||
* The actual error type that is collected and to help identify where the error is triggered from.
|
||||
*/
|
||||
export declare enum ListrErrorTypes {
|
||||
/** Task has failed and will try to retry. */
|
||||
WILL_RETRY = "WILL_RETRY",
|
||||
/** Task has failed and will try to rollback. */
|
||||
WILL_ROLLBACK = "WILL_ROLLBACK",
|
||||
/** Task has failed, ran the rollback action but the rollback action itself has failed. */
|
||||
HAS_FAILED_TO_ROLLBACK = "HAS_FAILED_TO_ROLLBACK",
|
||||
/** Task has failed. */
|
||||
HAS_FAILED = "HAS_FAILED",
|
||||
/** Task has failed, but exitOnError is set to false, so will ignore this error. */
|
||||
HAS_FAILED_WITHOUT_ERROR = "HAS_FAILED_WITHOUT_ERROR"
|
||||
}
|
||||
/** The internal error handling mechanism for prompts only. */
|
||||
export declare class PromptError extends Error {
|
||||
constructor(message: string);
|
||||
}
|
40
CyLukTs/lukan/node_modules/listr2/dist/interfaces/listr-error.interface.js
generated
vendored
Normal file
40
CyLukTs/lukan/node_modules/listr2/dist/interfaces/listr-error.interface.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.PromptError = exports.ListrErrorTypes = exports.ListrError = void 0;
|
||||
/** The internal error handling mechanism.. */
|
||||
class ListrError extends Error {
|
||||
constructor(error, type, ctx, task) {
|
||||
super(error.message);
|
||||
this.error = error;
|
||||
this.type = type;
|
||||
this.ctx = ctx;
|
||||
this.task = task;
|
||||
this.stack = error === null || error === void 0 ? void 0 : error.stack;
|
||||
this.name = 'ListrError';
|
||||
}
|
||||
}
|
||||
exports.ListrError = ListrError;
|
||||
/**
|
||||
* The actual error type that is collected and to help identify where the error is triggered from.
|
||||
*/
|
||||
var ListrErrorTypes;
|
||||
(function (ListrErrorTypes) {
|
||||
/** Task has failed and will try to retry. */
|
||||
ListrErrorTypes["WILL_RETRY"] = "WILL_RETRY";
|
||||
/** Task has failed and will try to rollback. */
|
||||
ListrErrorTypes["WILL_ROLLBACK"] = "WILL_ROLLBACK";
|
||||
/** Task has failed, ran the rollback action but the rollback action itself has failed. */
|
||||
ListrErrorTypes["HAS_FAILED_TO_ROLLBACK"] = "HAS_FAILED_TO_ROLLBACK";
|
||||
/** Task has failed. */
|
||||
ListrErrorTypes["HAS_FAILED"] = "HAS_FAILED";
|
||||
/** Task has failed, but exitOnError is set to false, so will ignore this error. */
|
||||
ListrErrorTypes["HAS_FAILED_WITHOUT_ERROR"] = "HAS_FAILED_WITHOUT_ERROR";
|
||||
})(ListrErrorTypes = exports.ListrErrorTypes || (exports.ListrErrorTypes = {}));
|
||||
/** The internal error handling mechanism for prompts only. */
|
||||
class PromptError extends Error {
|
||||
constructor(message) {
|
||||
super(message);
|
||||
this.name = 'PromptError';
|
||||
}
|
||||
}
|
||||
exports.PromptError = PromptError;
|
170
CyLukTs/lukan/node_modules/listr2/dist/interfaces/listr.interface.d.ts
generated
vendored
Normal file
170
CyLukTs/lukan/node_modules/listr2/dist/interfaces/listr.interface.d.ts
generated
vendored
Normal file
@ -0,0 +1,170 @@
|
||||
/// <reference types="node" />
|
||||
import type * as Enquirer from 'enquirer';
|
||||
import type { Observable } from 'rxjs';
|
||||
import { Readable } from 'stream';
|
||||
import { ListrDefaultNonTTYRendererOptions, ListrDefaultRendererOptions, ListrDefaultRendererValue, ListrFallbackRendererValue, ListrGetRendererTaskOptions, ListrRendererFactory, ListrRendererValue } from './renderer.interface';
|
||||
import { ListrEventType } from '../constants/event.constants';
|
||||
import { Task } from '../lib/task';
|
||||
import { TaskWrapper } from '../lib/task-wrapper';
|
||||
import { Listr } from '../listr';
|
||||
/** Listr Default Context */
|
||||
export declare type ListrContext = any | undefined;
|
||||
/**
|
||||
* ListrTask.
|
||||
*
|
||||
* Defines the task, conditions and options to run a specific task in the listr.
|
||||
*/
|
||||
export interface ListrTask<Ctx = ListrContext, Renderer extends ListrRendererFactory = any> {
|
||||
/**
|
||||
* Title of the task.
|
||||
*
|
||||
* Give this task a title if you want to track it by name in the current renderer.
|
||||
*
|
||||
* Tasks without a title will hide in the default renderer and are useful for running a background instance.
|
||||
* On verbose renderer, state changes from these tasks will log as 'Task without a title.'
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* The task itself.
|
||||
*
|
||||
* Task can be a sync or async function, an Observable, or a Stream.
|
||||
* Task will be executed, if the certain criteria of the state are met and whenever the time for that specific task has come.
|
||||
*/
|
||||
task: (ctx: Ctx, task: TaskWrapper<Ctx, Renderer>) => void | ListrTaskResult<Ctx>;
|
||||
/**
|
||||
* Skip this task depending on the context.
|
||||
*
|
||||
* The function that has been passed in will be evaluated at the runtime when the task tries to initially run.
|
||||
*/
|
||||
skip?: boolean | string | ((ctx: Ctx) => boolean | string | Promise<boolean | string>);
|
||||
/**
|
||||
* Enable a task depending on the context.
|
||||
*
|
||||
* The function that has been passed in will be evaluated at the initial creation of the Listr class for rendering purposes,
|
||||
* as well as re-evaluated when the time for that specific task has come.
|
||||
*/
|
||||
enabled?: boolean | ((ctx: Ctx) => boolean | Promise<boolean>);
|
||||
/**
|
||||
* Adds the given number of retry attempts to the task if the task fails.
|
||||
*/
|
||||
retry?: number;
|
||||
/**
|
||||
* Runs a specific event if the current task or any of the subtasks has failed.
|
||||
*
|
||||
* Mostly useful for rollback purposes for subtasks.
|
||||
* But can also be useful whenever a task is failed and some measures have to be taken to ensure the state is not changed.
|
||||
*/
|
||||
rollback?: (ctx: Ctx, task: TaskWrapper<Ctx, Renderer>) => void | ListrTaskResult<Ctx>;
|
||||
/**
|
||||
* Set exit on the error option from task-level instead of setting it for all the subtasks.
|
||||
*/
|
||||
exitOnError?: boolean | ((ctx: Ctx) => boolean | Promise<boolean>);
|
||||
/**
|
||||
* Per task options, that depends on the selected renderer.
|
||||
*
|
||||
* These options depend on the implementation of the selected renderer. If the selected renderer has no options it will
|
||||
* be displayed as never.
|
||||
*/
|
||||
options?: ListrGetRendererTaskOptions<Renderer>;
|
||||
}
|
||||
/**
|
||||
* Options to set the behavior of this base task.
|
||||
*/
|
||||
export interface ListrOptions<Ctx = ListrContext> {
|
||||
/**
|
||||
* To inject a context through this options wrapper. Context can also be defined in run time.
|
||||
*
|
||||
* @default {}
|
||||
*/
|
||||
ctx?: Ctx;
|
||||
/**
|
||||
* Concurrency sets how many tasks will be run at the same time in parallel.
|
||||
*
|
||||
* @default false > Default is to run everything synchronously.
|
||||
*
|
||||
* `true` will set it to `Infinity`, `false` will set it to synchronous.
|
||||
*
|
||||
* If you pass in a `number` it will limit it to that number.
|
||||
*/
|
||||
concurrent?: boolean | number;
|
||||
/**
|
||||
* Determine the default behavior of exiting on errors.
|
||||
*
|
||||
* @default true > exit on any error coming from the tasks.
|
||||
*/
|
||||
exitOnError?: boolean;
|
||||
/**
|
||||
* Determine the behavior of exiting after rollback actions.
|
||||
*
|
||||
* This is independent of exitOnError, since failure of a rollback can be a more critical operation comparing to
|
||||
* failing a single task.
|
||||
*
|
||||
* @default true > exit after rolling back tasks
|
||||
*/
|
||||
exitAfterRollback?: boolean;
|
||||
/**
|
||||
* By default, Listr2 will track SIGINIT signal to update the renderer one last time before completely failing.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
registerSignalListeners?: boolean;
|
||||
/**
|
||||
* Determine the certain condition required to use the non-TTY renderer.
|
||||
*
|
||||
* @default null > handled internally
|
||||
*/
|
||||
rendererFallback?: boolean | (() => boolean);
|
||||
/**
|
||||
* Determine the certain condition required to use the silent renderer.
|
||||
*
|
||||
* @default null > handled internally
|
||||
*/
|
||||
rendererSilent?: boolean | (() => boolean);
|
||||
/**
|
||||
* Disabling the color, useful for tests and such.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
disableColor?: boolean;
|
||||
/**
|
||||
* Inject data directly to TaskWrapper.
|
||||
*/
|
||||
injectWrapper?: {
|
||||
enquirer?: Enquirer<object>;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Task can be set of sync or async function, an Observable or a stream.
|
||||
*/
|
||||
export declare type ListrTaskResult<Ctx> = string | Promise<any> | Listr<Ctx, ListrRendererValue, any> | Readable | NodeJS.ReadableStream | Observable<any>;
|
||||
/**
|
||||
* Parent class options.
|
||||
*
|
||||
* Parent class has more options where you can also select the and set renderer and non-tty renderer.
|
||||
*
|
||||
* Any subtasks will respect those options so they will be stripped of that properties.
|
||||
*/
|
||||
export declare type ListrBaseClassOptions<Ctx = ListrContext, Renderer extends ListrRendererValue = ListrDefaultRendererValue, FallbackRenderer extends ListrRendererValue = ListrFallbackRendererValue> = ListrOptions<Ctx> & ListrDefaultRendererOptions<Renderer> & ListrDefaultNonTTYRendererOptions<FallbackRenderer>;
|
||||
/**
|
||||
* Sub class options.
|
||||
*
|
||||
* Subtasks has reduced set options where the missing ones are explicitly set by the base class.
|
||||
*/
|
||||
export declare type ListrSubClassOptions<Ctx = ListrContext, Renderer extends ListrRendererValue = ListrDefaultRendererValue> = ListrOptions<Ctx> & Omit<ListrDefaultRendererOptions<Renderer>, 'renderer'>;
|
||||
/** The internal communication event. */
|
||||
export declare type ListrEvent = {
|
||||
type: Exclude<ListrEventType, 'MESSAGE' | 'DATA'>;
|
||||
data?: string | boolean;
|
||||
} | {
|
||||
type: ListrEventType.DATA;
|
||||
data: string;
|
||||
} | {
|
||||
type: ListrEventType.MESSAGE;
|
||||
data: Task<any, any>['message'];
|
||||
};
|
||||
/**
|
||||
* Used to match event.type to ListrEvent permutations
|
||||
*/
|
||||
export declare type ListrEventFromType<T extends ListrEventType, E = ListrEvent> = E extends {
|
||||
type: infer U;
|
||||
} ? T extends U ? E : never : never;
|
2
CyLukTs/lukan/node_modules/listr2/dist/interfaces/listr.interface.js
generated
vendored
Normal file
2
CyLukTs/lukan/node_modules/listr2/dist/interfaces/listr.interface.js
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
92
CyLukTs/lukan/node_modules/listr2/dist/interfaces/renderer.interface.d.ts
generated
vendored
Normal file
92
CyLukTs/lukan/node_modules/listr2/dist/interfaces/renderer.interface.d.ts
generated
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
import { Subject } from 'rxjs';
|
||||
import { Task } from '../lib/task';
|
||||
import { DefaultRenderer } from '../renderer/default.renderer';
|
||||
import { SilentRenderer } from '../renderer/silent.renderer';
|
||||
import { SimpleRenderer } from '../renderer/simple.renderer';
|
||||
import { VerboseRenderer } from '../renderer/verbose.renderer';
|
||||
/** The default renderer value used in Listr2 applications */
|
||||
export declare type ListrDefaultRendererValue = 'default';
|
||||
/** Type of default renderer */
|
||||
export declare type ListrDefaultRenderer = typeof DefaultRenderer;
|
||||
/** Name of default fallback renderer */
|
||||
export declare type ListrFallbackRendererValue = 'verbose';
|
||||
/** Type of default fallback renderer */
|
||||
export declare type ListrFallbackRenderer = typeof VerboseRenderer;
|
||||
/** Silent rendere for internal usage */
|
||||
export declare type ListrSilentRendererValue = 'silent';
|
||||
/** Typeof silent renderer */
|
||||
export declare type ListrSilentRenderer = typeof SilentRenderer;
|
||||
/** Simple renderer that simplifies things */
|
||||
export declare type ListrSimpleRendererValue = 'simple';
|
||||
/** Typeof simple renderer */
|
||||
export declare type ListrSimpleRenderer = typeof SimpleRenderer;
|
||||
/**
|
||||
* Listr2 can process either the integrated renderers as string aliases,
|
||||
* or utilize a compatible style renderer that extends the ListrRenderer abstract class.
|
||||
*/
|
||||
export declare type ListrRendererValue = ListrSilentRendererValue | ListrDefaultRendererValue | ListrSimpleRendererValue | ListrFallbackRendererValue | ListrRendererFactory;
|
||||
/**
|
||||
* Returns the class type from friendly names of the renderers.
|
||||
*/
|
||||
export declare type ListrGetRendererClassFromValue<T extends ListrRendererValue> = T extends ListrDefaultRendererValue ? ListrDefaultRenderer : T extends ListrSimpleRendererValue ? ListrSimpleRenderer : T extends ListrFallbackRendererValue ? ListrFallbackRenderer : T extends ListrSilentRenderer ? ListrSilentRenderer : T extends ListrRendererFactory ? T : never;
|
||||
/**
|
||||
* Returns the friendly names from the type of renderer classes.
|
||||
*/
|
||||
export declare type ListrGetRendererValueFromClass<T extends ListrRendererFactory> = T extends DefaultRenderer ? ListrDefaultRendererValue : T extends SimpleRenderer ? ListrSimpleRendererValue : T extends VerboseRenderer ? ListrFallbackRendererValue : T extends SilentRenderer ? ListrSilentRenderer : T extends ListrRendererFactory ? T : never;
|
||||
/**
|
||||
* Returns renderer global options depending on the renderer type.
|
||||
*/
|
||||
export declare type ListrGetRendererOptions<T extends ListrRendererValue> = T extends ListrDefaultRendererValue ? ListrDefaultRenderer['rendererOptions'] : T extends ListrSimpleRendererValue ? ListrSimpleRenderer['rendererOptions'] : T extends ListrFallbackRendererValue ? ListrFallbackRenderer['rendererOptions'] : T extends ListrSilentRenderer ? ListrSilentRenderer['rendererOptions'] : T extends ListrRendererFactory ? T['rendererOptions'] : never;
|
||||
/**
|
||||
* Returns renderer per task options depending on the renderer type.
|
||||
*/
|
||||
export declare type ListrGetRendererTaskOptions<T extends ListrRendererValue> = T extends ListrDefaultRendererValue ? ListrDefaultRenderer['rendererTaskOptions'] : T extends ListrSimpleRendererValue ? ListrSimpleRenderer : T extends ListrFallbackRendererValue ? ListrFallbackRenderer['rendererTaskOptions'] : T extends ListrSilentRenderer ? ListrSilentRenderer['rendererTaskOptions'] : T extends ListrRendererFactory ? T['rendererTaskOptions'] : never;
|
||||
/** Select renderer as default renderer */
|
||||
export interface ListrDefaultRendererOptions<T extends ListrRendererValue> {
|
||||
/** the default renderer */
|
||||
renderer?: T;
|
||||
/** Renderer options depending on the current renderer */
|
||||
rendererOptions?: ListrGetRendererOptions<T>;
|
||||
}
|
||||
/** Select a fallback renderer to fallback to in non-tty conditions */
|
||||
export interface ListrDefaultNonTTYRendererOptions<T extends ListrRendererValue> {
|
||||
/** the fallback renderer to fallback to on non-tty conditions */
|
||||
nonTTYRenderer?: T;
|
||||
/** Renderer options depending on the current renderer */
|
||||
nonTTYRendererOptions?: ListrGetRendererOptions<T>;
|
||||
}
|
||||
/** Renderer options for the base class, including setup for selecting default and fallback renderers. */
|
||||
export declare type ListrRendererOptions<Renderer extends ListrRendererValue, FallbackRenderer extends ListrRendererValue> = ListrDefaultRendererOptions<Renderer> & ListrDefaultNonTTYRendererOptions<FallbackRenderer>;
|
||||
/** The bones of a listr renderer. */
|
||||
export declare class ListrRenderer {
|
||||
/** designate renderer global options that is specific to the current renderer */
|
||||
static rendererOptions: Record<PropertyKey, any>;
|
||||
/** designate renderer per task options that is specific to the current renderer */
|
||||
static rendererTaskOptions: Record<PropertyKey, any>;
|
||||
/** designate whether this renderer can work in non-tty environments */
|
||||
static nonTTY: boolean;
|
||||
/** A function to what to do on render */
|
||||
render: () => void;
|
||||
/** A function to what to do on end of the render */
|
||||
end: (err?: Error) => void;
|
||||
/** create a new renderer */
|
||||
constructor(tasks: readonly Task<any, ListrRendererFactory>[], options: typeof ListrRenderer.rendererOptions, renderHook$?: Subject<void>);
|
||||
}
|
||||
/** Exported for javascript applications to extend the base renderer */
|
||||
export declare class ListrBaseRenderer implements ListrRenderer {
|
||||
static rendererOptions: Record<PropertyKey, any>;
|
||||
static rendererTaskOptions: Record<PropertyKey, any>;
|
||||
static nonTTY: boolean;
|
||||
tasks: Task<any, typeof ListrBaseRenderer>[];
|
||||
options: typeof ListrBaseRenderer.rendererOptions;
|
||||
render: () => void;
|
||||
end: (err?: Error) => void;
|
||||
constructor(tasks: Task<any, typeof ListrBaseRenderer>[], options: typeof ListrBaseRenderer.rendererOptions);
|
||||
}
|
||||
/** A renderer factory from the current type */
|
||||
export declare type ListrRendererFactory = typeof ListrRenderer;
|
||||
/** Supported type of renderers for each type in the listr. */
|
||||
export interface SupportedRenderer {
|
||||
renderer: ListrRendererFactory;
|
||||
nonTTY: boolean;
|
||||
}
|
2
CyLukTs/lukan/node_modules/listr2/dist/interfaces/renderer.interface.js
generated
vendored
Normal file
2
CyLukTs/lukan/node_modules/listr2/dist/interfaces/renderer.interface.js
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
4
CyLukTs/lukan/node_modules/listr2/dist/interfaces/task.interface.d.ts
generated
vendored
Normal file
4
CyLukTs/lukan/node_modules/listr2/dist/interfaces/task.interface.d.ts
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import type { Task } from '../lib/task';
|
||||
import type { TaskWrapper } from '../lib/task-wrapper';
|
||||
export { Task as ListrTaskObject };
|
||||
export { TaskWrapper as ListrTaskWrapper };
|
2
CyLukTs/lukan/node_modules/listr2/dist/interfaces/task.interface.js
generated
vendored
Normal file
2
CyLukTs/lukan/node_modules/listr2/dist/interfaces/task.interface.js
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
51
CyLukTs/lukan/node_modules/listr2/dist/lib/task-wrapper.d.ts
generated
vendored
Normal file
51
CyLukTs/lukan/node_modules/listr2/dist/lib/task-wrapper.d.ts
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
/// <reference types="node" />
|
||||
import { ListrError, ListrErrorTypes } from '../interfaces/listr-error.interface';
|
||||
import { ListrBaseClassOptions, ListrSubClassOptions, ListrTask } from '../interfaces/listr.interface';
|
||||
import { ListrRendererFactory } from '../interfaces/renderer.interface';
|
||||
import { Task } from './task';
|
||||
import { Listr } from '../listr';
|
||||
import { PromptOptions } from '../utils/prompt.interface';
|
||||
/**
|
||||
* Extend the task to have more functionality while accesing from the outside.
|
||||
*/
|
||||
export declare class TaskWrapper<Ctx, Renderer extends ListrRendererFactory> {
|
||||
task: Task<Ctx, ListrRendererFactory>;
|
||||
errors: ListrError<Ctx>[];
|
||||
private options;
|
||||
constructor(task: Task<Ctx, ListrRendererFactory>, errors: ListrError<Ctx>[], options: ListrBaseClassOptions<Ctx, any, any>);
|
||||
/** Change the title of the current task. */
|
||||
set title(data: string);
|
||||
/** Get the title of the current task. */
|
||||
get title(): string;
|
||||
/** Send a output to the output channel. */
|
||||
set output(data: string);
|
||||
/** Get the output from the output channel. */
|
||||
get output(): string;
|
||||
/** Create a new subtask with given renderer selection from the parent task. */
|
||||
newListr<NewCtx = Ctx>(task: ListrTask<NewCtx, Renderer> | ListrTask<NewCtx, Renderer>[] | ((parent: Omit<this, 'skip' | 'enabled'>) => ListrTask<NewCtx, Renderer> | ListrTask<NewCtx, Renderer>[]), options?: ListrSubClassOptions<NewCtx, Renderer>): Listr<NewCtx, any, any>;
|
||||
/** Report a error in process for error collection. */
|
||||
report(error: Error, type: ListrErrorTypes): void;
|
||||
/** Skip current task. */
|
||||
skip(message?: string): void;
|
||||
/** Get the number of retrying, else returns false */
|
||||
isRetrying(): Task<Ctx, Renderer>['retry'];
|
||||
/**
|
||||
* Create a new Enquirer prompt using prompt options.
|
||||
*
|
||||
* Since process.stdout is controlled by Listr, this will passthrough all Enquirer data through internal stdout.
|
||||
*/
|
||||
prompt<T = any>(options: PromptOptions | PromptOptions<true>[]): Promise<T>;
|
||||
/** Cancels the current prompt attach to this task. */
|
||||
cancelPrompt(throwError?: boolean): void;
|
||||
/**
|
||||
* Pass stream of data to internal stdout.
|
||||
*
|
||||
* Since Listr2 takes control of process.stdout utilizing the default renderer, any data outputted to process.stdout
|
||||
* will corupt its looks.
|
||||
*
|
||||
* This returns a fake stream to pass any stream inside Listr as task data.
|
||||
*/
|
||||
stdout(): NodeJS.WriteStream & NodeJS.WritableStream;
|
||||
/** Run this task. */
|
||||
run(ctx: Ctx): Promise<void>;
|
||||
}
|
101
CyLukTs/lukan/node_modules/listr2/dist/lib/task-wrapper.js
generated
vendored
Normal file
101
CyLukTs/lukan/node_modules/listr2/dist/lib/task-wrapper.js
generated
vendored
Normal file
@ -0,0 +1,101 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.TaskWrapper = void 0;
|
||||
const through = require("through");
|
||||
const clearline_regex_constants_1 = require("../constants/clearline-regex.constants");
|
||||
const state_constants_1 = require("../constants/state.constants");
|
||||
const listr_error_interface_1 = require("../interfaces/listr-error.interface");
|
||||
const listr_1 = require("../listr");
|
||||
const general_1 = require("../utils/general");
|
||||
const prompt_1 = require("../utils/prompt");
|
||||
/**
|
||||
* Extend the task to have more functionality while accesing from the outside.
|
||||
*/
|
||||
class TaskWrapper {
|
||||
constructor(task, errors, options) {
|
||||
this.task = task;
|
||||
this.errors = errors;
|
||||
this.options = options;
|
||||
}
|
||||
/** Change the title of the current task. */
|
||||
set title(data) {
|
||||
this.task.title$ = data;
|
||||
}
|
||||
/** Get the title of the current task. */
|
||||
get title() {
|
||||
return this.task.title;
|
||||
}
|
||||
/** Send a output to the output channel. */
|
||||
set output(data) {
|
||||
this.task.output$ = data;
|
||||
}
|
||||
/** Get the output from the output channel. */
|
||||
get output() {
|
||||
return this.task.output;
|
||||
}
|
||||
/** Create a new subtask with given renderer selection from the parent task. */
|
||||
newListr(task, options) {
|
||||
let tasks;
|
||||
if (typeof task === 'function') {
|
||||
tasks = task(this);
|
||||
}
|
||||
else {
|
||||
tasks = task;
|
||||
}
|
||||
return new listr_1.Listr(tasks, options);
|
||||
}
|
||||
/** Report a error in process for error collection. */
|
||||
report(error, type) {
|
||||
var _a, _b, _c;
|
||||
this.errors.push(new listr_error_interface_1.ListrError(error, type, (0, general_1.cloneObject)(this.task.listr.ctx), (0, general_1.cloneObject)(this.task)));
|
||||
this.task.message$ = { error: (_c = (_a = error.message) !== null && _a !== void 0 ? _a : (_b = this.task) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : 'Task with no title.' };
|
||||
}
|
||||
/** Skip current task. */
|
||||
skip(message) {
|
||||
var _a, _b;
|
||||
this.task.state$ = state_constants_1.ListrTaskState.SKIPPED;
|
||||
if (message) {
|
||||
this.task.message$ = { skip: (_b = message !== null && message !== void 0 ? message : (_a = this.task) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : 'Task with no title.' };
|
||||
}
|
||||
}
|
||||
/** Get the number of retrying, else returns false */
|
||||
isRetrying() {
|
||||
return this.task.isRetrying() ? this.task.retry : { count: 0 };
|
||||
}
|
||||
/**
|
||||
* Create a new Enquirer prompt using prompt options.
|
||||
*
|
||||
* Since process.stdout is controlled by Listr, this will passthrough all Enquirer data through internal stdout.
|
||||
*/
|
||||
async prompt(options) {
|
||||
var _a;
|
||||
return prompt_1.createPrompt.bind(this)(options, { ...(_a = this.options) === null || _a === void 0 ? void 0 : _a.injectWrapper });
|
||||
}
|
||||
/** Cancels the current prompt attach to this task. */
|
||||
cancelPrompt(throwError = false) {
|
||||
return prompt_1.destroyPrompt.bind(this)(throwError);
|
||||
}
|
||||
/**
|
||||
* Pass stream of data to internal stdout.
|
||||
*
|
||||
* Since Listr2 takes control of process.stdout utilizing the default renderer, any data outputted to process.stdout
|
||||
* will corupt its looks.
|
||||
*
|
||||
* This returns a fake stream to pass any stream inside Listr as task data.
|
||||
*/
|
||||
stdout() {
|
||||
return through((chunk) => {
|
||||
chunk = chunk.toString();
|
||||
chunk = chunk.replace(new RegExp(clearline_regex_constants_1.CLEAR_LINE_REGEX, 'gmi'), '');
|
||||
chunk = chunk.replace(new RegExp(clearline_regex_constants_1.BELL_REGEX, 'gmi'), '');
|
||||
if (chunk !== '') {
|
||||
this.output = chunk;
|
||||
}
|
||||
});
|
||||
}
|
||||
/** Run this task. */
|
||||
run(ctx) {
|
||||
return this.task.run(ctx, this);
|
||||
}
|
||||
}
|
||||
exports.TaskWrapper = TaskWrapper;
|
98
CyLukTs/lukan/node_modules/listr2/dist/lib/task.d.ts
generated
vendored
Normal file
98
CyLukTs/lukan/node_modules/listr2/dist/lib/task.d.ts
generated
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
import { Subject } from 'rxjs';
|
||||
import { TaskWrapper } from './task-wrapper';
|
||||
import { ListrTaskState } from '../constants/state.constants';
|
||||
import { PromptError } from '../interfaces/listr-error.interface';
|
||||
import { ListrEvent, ListrOptions, ListrTask, ListrTaskResult } from '../interfaces/listr.interface';
|
||||
import { ListrGetRendererOptions, ListrGetRendererTaskOptions, ListrRendererFactory } from '../interfaces/renderer.interface';
|
||||
import { Listr } from '../listr';
|
||||
import { PromptInstance } from '../utils/prompt.interface';
|
||||
/**
|
||||
* Create a task from the given set of variables and make it runnable.
|
||||
*/
|
||||
export declare class Task<Ctx, Renderer extends ListrRendererFactory> extends Subject<ListrEvent> {
|
||||
listr: Listr<Ctx, any, any>;
|
||||
tasks: ListrTask<Ctx, any>;
|
||||
options: ListrOptions;
|
||||
rendererOptions: ListrGetRendererOptions<Renderer>;
|
||||
/** Unique id per task, randomly generated in the uuid v4 format */
|
||||
id: string;
|
||||
/** The current state of the task. */
|
||||
state: string;
|
||||
/** The task object itself, to further utilize it. */
|
||||
task: (ctx: Ctx, task: TaskWrapper<Ctx, Renderer>) => void | ListrTaskResult<Ctx>;
|
||||
/** Extend current task with multiple subtasks. */
|
||||
subtasks: Task<Ctx, any>[];
|
||||
/** Title of the task */
|
||||
title?: string;
|
||||
/** Untouched unchanged title of the task */
|
||||
initialTitle?: string;
|
||||
/** Output data from the task. */
|
||||
output?: string;
|
||||
/** Skip current task. */
|
||||
skip: boolean | string | ((ctx: Ctx) => boolean | string | Promise<boolean | string>);
|
||||
/** Current retry number of the task if retrying */
|
||||
retry?: {
|
||||
count: number;
|
||||
withError?: any;
|
||||
};
|
||||
/**
|
||||
* A channel for messages.
|
||||
*
|
||||
* This requires a separate channel for messages like error, skip or runtime messages to further utilize in the renderers.
|
||||
*/
|
||||
message: {
|
||||
/** Run time of the task, if it has been successfully resolved. */
|
||||
duration?: number;
|
||||
/** Error message of the task, if it has been failed. */
|
||||
error?: string;
|
||||
/** Skip message of the task, if it has been skipped. */
|
||||
skip?: string;
|
||||
/** Rollback message of the task, if the rollback finishes */
|
||||
rollback?: string;
|
||||
/** Retry messages */
|
||||
retry?: {
|
||||
count: number;
|
||||
withError?: any;
|
||||
};
|
||||
};
|
||||
/** Per task options for the current renderer of the task. */
|
||||
rendererTaskOptions: ListrGetRendererTaskOptions<Renderer>;
|
||||
/** This will be triggered each time a new render should happen. */
|
||||
renderHook$: Subject<void>;
|
||||
prompt: undefined | PromptInstance | PromptError;
|
||||
private enabled;
|
||||
private enabledFn;
|
||||
constructor(listr: Listr<Ctx, any, any>, tasks: ListrTask<Ctx, any>, options: ListrOptions, rendererOptions: ListrGetRendererOptions<Renderer>);
|
||||
set state$(state: ListrTaskState);
|
||||
set output$(data: string);
|
||||
set message$(data: Task<Ctx, Renderer>['message']);
|
||||
set title$(title: string);
|
||||
/**
|
||||
* A function to check whether this task should run at all via enable.
|
||||
*/
|
||||
check(ctx: Ctx): Promise<void>;
|
||||
/** Returns whether this task has subtasks. */
|
||||
hasSubtasks(): boolean;
|
||||
/** Returns whether this task is in progress. */
|
||||
isPending(): boolean;
|
||||
/** Returns whether this task is skipped. */
|
||||
isSkipped(): boolean;
|
||||
/** Returns whether this task has been completed. */
|
||||
isCompleted(): boolean;
|
||||
/** Returns whether this task has been failed. */
|
||||
hasFailed(): boolean;
|
||||
/** Returns whether this task has an active rollback task going on. */
|
||||
isRollingBack(): boolean;
|
||||
/** Returns whether the rollback action was successful. */
|
||||
hasRolledBack(): boolean;
|
||||
/** Returns whether this task has an actively retrying task going on. */
|
||||
isRetrying(): boolean;
|
||||
/** Returns whether enabled function resolves to true. */
|
||||
isEnabled(): boolean;
|
||||
/** Returns whether this task actually has a title. */
|
||||
hasTitle(): boolean;
|
||||
/** Returns whether this task has a prompt inside. */
|
||||
isPrompt(): boolean;
|
||||
/** Run the current task. */
|
||||
run(context: Ctx, wrapper: TaskWrapper<Ctx, Renderer>): Promise<void>;
|
||||
}
|
281
CyLukTs/lukan/node_modules/listr2/dist/lib/task.js
generated
vendored
Normal file
281
CyLukTs/lukan/node_modules/listr2/dist/lib/task.js
generated
vendored
Normal file
@ -0,0 +1,281 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Task = void 0;
|
||||
const rxjs_1 = require("rxjs");
|
||||
const stream_1 = require("stream");
|
||||
const event_constants_1 = require("../constants/event.constants");
|
||||
const state_constants_1 = require("../constants/state.constants");
|
||||
const listr_error_interface_1 = require("../interfaces/listr-error.interface");
|
||||
const listr_1 = require("../listr");
|
||||
const assert_1 = require("../utils/assert");
|
||||
const renderer_1 = require("../utils/renderer");
|
||||
const uuid_1 = require("../utils/uuid");
|
||||
/**
|
||||
* Create a task from the given set of variables and make it runnable.
|
||||
*/
|
||||
class Task extends rxjs_1.Subject {
|
||||
constructor(listr, tasks, options, rendererOptions) {
|
||||
var _a, _b, _c, _d, _e, _f;
|
||||
super();
|
||||
this.listr = listr;
|
||||
this.tasks = tasks;
|
||||
this.options = options;
|
||||
this.rendererOptions = rendererOptions;
|
||||
/**
|
||||
* A channel for messages.
|
||||
*
|
||||
* This requires a separate channel for messages like error, skip or runtime messages to further utilize in the renderers.
|
||||
*/
|
||||
this.message = {};
|
||||
// this kind of randomness is enough for task ids
|
||||
this.id = (0, uuid_1.generateUUID)();
|
||||
this.title = (_a = this.tasks) === null || _a === void 0 ? void 0 : _a.title;
|
||||
this.initialTitle = (_b = this.tasks) === null || _b === void 0 ? void 0 : _b.title;
|
||||
this.task = this.tasks.task;
|
||||
// parse functions
|
||||
this.skip = (_d = (_c = this.tasks) === null || _c === void 0 ? void 0 : _c.skip) !== null && _d !== void 0 ? _d : false;
|
||||
this.enabledFn = (_f = (_e = this.tasks) === null || _e === void 0 ? void 0 : _e.enabled) !== null && _f !== void 0 ? _f : true;
|
||||
// task options
|
||||
this.rendererTaskOptions = this.tasks.options;
|
||||
this.renderHook$ = this.listr.renderHook$;
|
||||
this.subscribe(() => {
|
||||
this.renderHook$.next();
|
||||
});
|
||||
}
|
||||
set state$(state) {
|
||||
this.state = state;
|
||||
this.next({
|
||||
type: event_constants_1.ListrEventType.STATE,
|
||||
data: state
|
||||
});
|
||||
// cancel the subtasks if this has already failed
|
||||
if (this.hasSubtasks() && this.hasFailed()) {
|
||||
for (const subtask of this.subtasks) {
|
||||
if (subtask.state === state_constants_1.ListrTaskState.PENDING) {
|
||||
subtask.state$ = state_constants_1.ListrTaskState.FAILED;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
set output$(data) {
|
||||
this.output = data;
|
||||
this.next({
|
||||
type: event_constants_1.ListrEventType.DATA,
|
||||
data
|
||||
});
|
||||
}
|
||||
set message$(data) {
|
||||
this.message = { ...this.message, ...data };
|
||||
this.next({
|
||||
type: event_constants_1.ListrEventType.MESSAGE,
|
||||
data
|
||||
});
|
||||
}
|
||||
set title$(title) {
|
||||
this.title = title;
|
||||
this.next({
|
||||
type: event_constants_1.ListrEventType.TITLE,
|
||||
data: title
|
||||
});
|
||||
}
|
||||
/**
|
||||
* A function to check whether this task should run at all via enable.
|
||||
*/
|
||||
async check(ctx) {
|
||||
// Check if a task is enabled or disabled
|
||||
if (this.state === undefined) {
|
||||
this.enabled = await (0, assert_1.assertFunctionOrSelf)(this.enabledFn, ctx);
|
||||
this.next({
|
||||
type: event_constants_1.ListrEventType.ENABLED,
|
||||
data: this.enabled
|
||||
});
|
||||
}
|
||||
}
|
||||
/** Returns whether this task has subtasks. */
|
||||
hasSubtasks() {
|
||||
var _a;
|
||||
return ((_a = this.subtasks) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
||||
}
|
||||
/** Returns whether this task is in progress. */
|
||||
isPending() {
|
||||
return this.state === state_constants_1.ListrTaskState.PENDING;
|
||||
}
|
||||
/** Returns whether this task is skipped. */
|
||||
isSkipped() {
|
||||
return this.state === state_constants_1.ListrTaskState.SKIPPED;
|
||||
}
|
||||
/** Returns whether this task has been completed. */
|
||||
isCompleted() {
|
||||
return this.state === state_constants_1.ListrTaskState.COMPLETED;
|
||||
}
|
||||
/** Returns whether this task has been failed. */
|
||||
hasFailed() {
|
||||
return this.state === state_constants_1.ListrTaskState.FAILED;
|
||||
}
|
||||
/** Returns whether this task has an active rollback task going on. */
|
||||
isRollingBack() {
|
||||
return this.state === state_constants_1.ListrTaskState.ROLLING_BACK;
|
||||
}
|
||||
/** Returns whether the rollback action was successful. */
|
||||
hasRolledBack() {
|
||||
return this.state === state_constants_1.ListrTaskState.ROLLED_BACK;
|
||||
}
|
||||
/** Returns whether this task has an actively retrying task going on. */
|
||||
isRetrying() {
|
||||
return this.state === state_constants_1.ListrTaskState.RETRY;
|
||||
}
|
||||
/** Returns whether enabled function resolves to true. */
|
||||
isEnabled() {
|
||||
return this.enabled;
|
||||
}
|
||||
/** Returns whether this task actually has a title. */
|
||||
hasTitle() {
|
||||
return typeof (this === null || this === void 0 ? void 0 : this.title) === 'string';
|
||||
}
|
||||
/** Returns whether this task has a prompt inside. */
|
||||
isPrompt() {
|
||||
return !!this.prompt;
|
||||
}
|
||||
/** Run the current task. */
|
||||
async run(context, wrapper) {
|
||||
var _a, _b, _c, _d, _e;
|
||||
const handleResult = (result) => {
|
||||
if (result instanceof listr_1.Listr) {
|
||||
// Detect the subtask
|
||||
// assign options
|
||||
result.options = { ...this.options, ...result.options };
|
||||
// switch to silent renderer since already rendering
|
||||
result.rendererClass = (0, renderer_1.getRenderer)('silent').renderer;
|
||||
result.renderHook$.subscribe(() => {
|
||||
this.renderHook$.next();
|
||||
});
|
||||
// assign subtasks
|
||||
this.subtasks = result.tasks;
|
||||
result.err = this.listr.err;
|
||||
this.next({ type: event_constants_1.ListrEventType.SUBTASK });
|
||||
result = result.run(context);
|
||||
}
|
||||
else if (this.isPrompt()) {
|
||||
// do nothing, it is already being handled
|
||||
}
|
||||
else if (result instanceof Promise) {
|
||||
// Detect promise
|
||||
result = result.then(handleResult);
|
||||
}
|
||||
else if (result instanceof stream_1.Readable) {
|
||||
// Detect stream
|
||||
result = new Promise((resolve, reject) => {
|
||||
result.on('data', (data) => {
|
||||
this.output$ = data.toString();
|
||||
});
|
||||
result.on('error', (error) => reject(error));
|
||||
result.on('end', () => resolve(null));
|
||||
});
|
||||
}
|
||||
else if (result instanceof rxjs_1.Observable) {
|
||||
// Detect Observable
|
||||
result = new Promise((resolve, reject) => {
|
||||
result.subscribe({
|
||||
next: (data) => {
|
||||
this.output$ = data;
|
||||
},
|
||||
error: reject,
|
||||
complete: resolve
|
||||
});
|
||||
});
|
||||
}
|
||||
return result;
|
||||
};
|
||||
const startTime = Date.now();
|
||||
// finish the task first
|
||||
this.state$ = state_constants_1.ListrTaskState.PENDING;
|
||||
// check if this function wants to be skipped
|
||||
const skipped = await (0, assert_1.assertFunctionOrSelf)(this.skip, context);
|
||||
if (skipped) {
|
||||
if (typeof skipped === 'string') {
|
||||
this.message$ = { skip: skipped };
|
||||
}
|
||||
else if (this.hasTitle()) {
|
||||
this.message$ = { skip: this.title };
|
||||
}
|
||||
else {
|
||||
this.message$ = { skip: 'Skipped task without a title.' };
|
||||
}
|
||||
this.state$ = state_constants_1.ListrTaskState.SKIPPED;
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// add retry functionality
|
||||
const retryCount = ((_a = this.tasks) === null || _a === void 0 ? void 0 : _a.retry) && ((_b = this.tasks) === null || _b === void 0 ? void 0 : _b.retry) > 0 ? this.tasks.retry + 1 : 1;
|
||||
for (let retries = 1; retries <= retryCount; retries++) {
|
||||
try {
|
||||
// handle the results
|
||||
await handleResult(this.task(context, wrapper));
|
||||
break;
|
||||
}
|
||||
catch (err) {
|
||||
if (retries !== retryCount) {
|
||||
this.retry = { count: retries, withError: err };
|
||||
this.message$ = { retry: this.retry };
|
||||
this.title$ = this.initialTitle;
|
||||
this.output = undefined;
|
||||
wrapper.report(err, listr_error_interface_1.ListrErrorTypes.WILL_RETRY);
|
||||
this.state$ = state_constants_1.ListrTaskState.RETRY;
|
||||
}
|
||||
else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.isPending() || this.isRetrying()) {
|
||||
this.message$ = { duration: Date.now() - startTime };
|
||||
this.state$ = state_constants_1.ListrTaskState.COMPLETED;
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
// catch prompt error, this was the best i could do without going crazy
|
||||
if (this.prompt instanceof listr_error_interface_1.PromptError) {
|
||||
// eslint-disable-next-line no-ex-assign
|
||||
error = new Error(this.prompt.message);
|
||||
}
|
||||
// execute the task on error function
|
||||
if ((_c = this.tasks) === null || _c === void 0 ? void 0 : _c.rollback) {
|
||||
wrapper.report(error, listr_error_interface_1.ListrErrorTypes.WILL_ROLLBACK);
|
||||
try {
|
||||
this.state$ = state_constants_1.ListrTaskState.ROLLING_BACK;
|
||||
await this.tasks.rollback(context, wrapper);
|
||||
this.state$ = state_constants_1.ListrTaskState.ROLLED_BACK;
|
||||
this.message$ = { rollback: this.title };
|
||||
}
|
||||
catch (err) {
|
||||
this.state$ = state_constants_1.ListrTaskState.FAILED;
|
||||
wrapper.report(err, listr_error_interface_1.ListrErrorTypes.HAS_FAILED_TO_ROLLBACK);
|
||||
throw err;
|
||||
}
|
||||
if (((_d = this.listr.options) === null || _d === void 0 ? void 0 : _d.exitAfterRollback) !== false) {
|
||||
// Do not exit when explicitly set to `false`
|
||||
throw new Error(this.title);
|
||||
}
|
||||
}
|
||||
else {
|
||||
// mark task as failed
|
||||
this.state$ = state_constants_1.ListrTaskState.FAILED;
|
||||
if (this.listr.options.exitOnError !== false && await (0, assert_1.assertFunctionOrSelf)((_e = this.tasks) === null || _e === void 0 ? void 0 : _e.exitOnError, context) !== false) {
|
||||
// Do not exit when explicitly set to `false`
|
||||
// report error
|
||||
wrapper.report(error, listr_error_interface_1.ListrErrorTypes.HAS_FAILED);
|
||||
throw error;
|
||||
}
|
||||
else if (!this.hasSubtasks()) {
|
||||
// subtasks will handle and report their own errors
|
||||
wrapper.report(error, listr_error_interface_1.ListrErrorTypes.HAS_FAILED_WITHOUT_ERROR);
|
||||
}
|
||||
}
|
||||
}
|
||||
finally {
|
||||
// Mark the observable as completed
|
||||
this.complete();
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.Task = Task;
|
24
CyLukTs/lukan/node_modules/listr2/dist/listr.d.ts
generated
vendored
Normal file
24
CyLukTs/lukan/node_modules/listr2/dist/listr.d.ts
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
import { ListrError } from './interfaces/listr-error.interface';
|
||||
import { ListrBaseClassOptions, ListrContext, ListrTask } from './interfaces/listr.interface';
|
||||
import { ListrDefaultRendererValue, ListrFallbackRendererValue, ListrGetRendererClassFromValue, ListrGetRendererOptions, ListrRendererFactory, ListrRendererValue } from './interfaces/renderer.interface';
|
||||
import { Task } from './lib/task';
|
||||
/**
|
||||
* Creates a new set of Listr2 task list.
|
||||
*/
|
||||
export declare class Listr<Ctx = ListrContext, Renderer extends ListrRendererValue = ListrDefaultRendererValue, FallbackRenderer extends ListrRendererValue = ListrFallbackRendererValue> {
|
||||
task: ListrTask<Ctx, ListrGetRendererClassFromValue<Renderer>> | ListrTask<Ctx, ListrGetRendererClassFromValue<Renderer>>[];
|
||||
options?: ListrBaseClassOptions<Ctx, Renderer, FallbackRenderer>;
|
||||
tasks: Task<Ctx, ListrGetRendererClassFromValue<Renderer>>[];
|
||||
err: ListrError<Ctx>[];
|
||||
ctx: Ctx;
|
||||
rendererClass: ListrRendererFactory;
|
||||
rendererClassOptions: ListrGetRendererOptions<ListrRendererFactory>;
|
||||
renderHook$: Task<any, any>['renderHook$'];
|
||||
private concurrency;
|
||||
private renderer;
|
||||
constructor(task: ListrTask<Ctx, ListrGetRendererClassFromValue<Renderer>> | ListrTask<Ctx, ListrGetRendererClassFromValue<Renderer>>[], options?: ListrBaseClassOptions<Ctx, Renderer, FallbackRenderer>);
|
||||
add(task: ListrTask<Ctx, ListrGetRendererClassFromValue<Renderer>> | ListrTask<Ctx, ListrGetRendererClassFromValue<Renderer>>[]): void;
|
||||
run(context?: Ctx): Promise<Ctx>;
|
||||
private checkAll;
|
||||
private runTask;
|
||||
}
|
122
CyLukTs/lukan/node_modules/listr2/dist/listr.js
generated
vendored
Normal file
122
CyLukTs/lukan/node_modules/listr2/dist/listr.js
generated
vendored
Normal file
@ -0,0 +1,122 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Listr = void 0;
|
||||
const pMap = require("p-map");
|
||||
const rxjs_1 = require("rxjs");
|
||||
const state_constants_1 = require("./constants/state.constants");
|
||||
const task_1 = require("./lib/task");
|
||||
const task_wrapper_1 = require("./lib/task-wrapper");
|
||||
const renderer_1 = require("./utils/renderer");
|
||||
/**
|
||||
* Creates a new set of Listr2 task list.
|
||||
*/
|
||||
class Listr {
|
||||
constructor(task, options) {
|
||||
var _a, _b, _c;
|
||||
this.task = task;
|
||||
this.options = options;
|
||||
this.tasks = [];
|
||||
this.err = [];
|
||||
this.renderHook$ = new rxjs_1.Subject();
|
||||
// assign over default options
|
||||
this.options = {
|
||||
...{
|
||||
concurrent: false,
|
||||
renderer: 'default',
|
||||
nonTTYRenderer: 'verbose',
|
||||
exitOnError: true,
|
||||
exitAfterRollback: true,
|
||||
registerSignalListeners: true
|
||||
},
|
||||
...options
|
||||
};
|
||||
// define parallel options
|
||||
if (this.options.concurrent === true) {
|
||||
this.concurrency = Infinity;
|
||||
}
|
||||
else if (typeof this.options.concurrent === 'number') {
|
||||
this.concurrency = this.options.concurrent;
|
||||
}
|
||||
else {
|
||||
this.concurrency = 1;
|
||||
}
|
||||
// get renderer class
|
||||
const renderer = (0, renderer_1.getRenderer)(this.options.renderer, this.options.nonTTYRenderer, (_a = this.options) === null || _a === void 0 ? void 0 : _a.rendererFallback, (_b = this.options) === null || _b === void 0 ? void 0 : _b.rendererSilent);
|
||||
this.rendererClass = renderer.renderer;
|
||||
// depending on the result pass the given options in
|
||||
if (!renderer.nonTTY) {
|
||||
this.rendererClassOptions = this.options.rendererOptions;
|
||||
}
|
||||
else {
|
||||
this.rendererClassOptions = this.options.nonTTYRendererOptions;
|
||||
}
|
||||
// parse and add tasks
|
||||
/* istanbul ignore next */
|
||||
this.add(task !== null && task !== void 0 ? task : []);
|
||||
// Graceful interrupt for render cleanup
|
||||
/* istanbul ignore if */
|
||||
if (this.options.registerSignalListeners) {
|
||||
process
|
||||
.once('SIGINT', () => {
|
||||
this.tasks.forEach(async (task) => {
|
||||
if (task.isPending()) {
|
||||
task.state$ = state_constants_1.ListrTaskState.FAILED;
|
||||
}
|
||||
});
|
||||
this.renderer.end(new Error('Interrupted.'));
|
||||
process.exit(127);
|
||||
})
|
||||
.setMaxListeners(0);
|
||||
}
|
||||
// disable color programatically for CI purposes
|
||||
/* istanbul ignore if */
|
||||
if ((_c = this.options) === null || _c === void 0 ? void 0 : _c.disableColor) {
|
||||
process.env.LISTR_DISABLE_COLOR = '1';
|
||||
}
|
||||
}
|
||||
add(task) {
|
||||
const tasks = Array.isArray(task) ? task : [task];
|
||||
tasks.forEach((task) => {
|
||||
this.tasks.push(new task_1.Task(this, task, this.options, { ...this.rendererClassOptions, ...task.options }));
|
||||
});
|
||||
}
|
||||
async run(context) {
|
||||
var _a, _b, _c;
|
||||
// start the renderer
|
||||
if (!this.renderer) {
|
||||
this.renderer = new this.rendererClass(this.tasks, this.rendererClassOptions, this.renderHook$);
|
||||
}
|
||||
this.renderer.render();
|
||||
// create a new context
|
||||
this.ctx = (_c = (_b = (_a = this.options) === null || _a === void 0 ? void 0 : _a.ctx) !== null && _b !== void 0 ? _b : context) !== null && _c !== void 0 ? _c : {};
|
||||
// check if the items are enabled
|
||||
await this.checkAll(this.ctx);
|
||||
// run tasks
|
||||
try {
|
||||
await pMap(this.tasks, async (task) => {
|
||||
// check this item is enabled, conditions may change depending on context
|
||||
await task.check(this.ctx);
|
||||
return this.runTask(task, this.ctx, this.err);
|
||||
}, { concurrency: this.concurrency });
|
||||
this.renderer.end();
|
||||
}
|
||||
catch (err) {
|
||||
if (this.options.exitOnError !== false) {
|
||||
this.renderer.end(err);
|
||||
// Do not exit when explicitly set to `false`
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
return this.ctx;
|
||||
}
|
||||
checkAll(context) {
|
||||
return Promise.all(this.tasks.map((task) => task.check(context)));
|
||||
}
|
||||
runTask(task, context, errors) {
|
||||
if (!task.isEnabled()) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
return new task_wrapper_1.TaskWrapper(task, errors, this.options).run(context);
|
||||
}
|
||||
}
|
||||
exports.Listr = Listr;
|
22
CyLukTs/lukan/node_modules/listr2/dist/manager.d.ts
generated
vendored
Normal file
22
CyLukTs/lukan/node_modules/listr2/dist/manager.d.ts
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
import { Listr } from './listr';
|
||||
import { ListrError } from './interfaces/listr-error.interface';
|
||||
import { ListrBaseClassOptions, ListrContext, ListrSubClassOptions, ListrTask } from './interfaces/listr.interface';
|
||||
import { ListrGetRendererClassFromValue, ListrRendererValue } from './interfaces/renderer.interface';
|
||||
/**
|
||||
* Creates a new Listr2 task manager.
|
||||
*
|
||||
* Useful for creating a single instace of Listr2 with pre-set settings.
|
||||
*/
|
||||
export declare class Manager<Ctx = ListrContext, Renderer extends ListrRendererValue = 'default', FallbackRenderer extends ListrRendererValue = 'verbose'> {
|
||||
options?: ListrBaseClassOptions<Ctx, Renderer, FallbackRenderer>;
|
||||
err: ListrError[];
|
||||
private tasks;
|
||||
constructor(options?: ListrBaseClassOptions<Ctx, Renderer, FallbackRenderer>);
|
||||
set ctx(ctx: Ctx);
|
||||
add<InjectCtx = Ctx>(tasks: ListrTask<InjectCtx, ListrGetRendererClassFromValue<Renderer>>[] | ((ctx?: InjectCtx) => ListrTask<InjectCtx, ListrGetRendererClassFromValue<Renderer>>[]), options?: ListrSubClassOptions<InjectCtx, Renderer>): void;
|
||||
runAll<InjectCtx = Ctx>(options?: ListrBaseClassOptions<InjectCtx, Renderer, FallbackRenderer>): Promise<InjectCtx>;
|
||||
newListr<InjectCtx, InjectRenderer extends ListrRendererValue = Renderer, InjectFallbackRenderer extends ListrRendererValue = FallbackRenderer>(tasks: ListrTask<InjectCtx, ListrGetRendererClassFromValue<InjectRenderer>>[], options?: ListrBaseClassOptions<InjectCtx, InjectRenderer, InjectFallbackRenderer>): Listr<InjectCtx, InjectRenderer, InjectFallbackRenderer>;
|
||||
indent<InjectCtx = Ctx>(tasks: ListrTask<InjectCtx, ListrGetRendererClassFromValue<Renderer>>[] | ((ctx?: InjectCtx) => ListrTask<InjectCtx, ListrGetRendererClassFromValue<Renderer>>[]), options?: ListrBaseClassOptions<InjectCtx, Renderer, FallbackRenderer>, taskOptions?: Omit<ListrTask<InjectCtx, ListrGetRendererClassFromValue<Renderer>>, 'task'>): ListrTask<InjectCtx, ListrGetRendererClassFromValue<Renderer>>;
|
||||
run<InjectCtx = Ctx>(tasks: ListrTask<InjectCtx, ListrGetRendererClassFromValue<Renderer>>[], options?: ListrBaseClassOptions<InjectCtx, Renderer, FallbackRenderer>): Promise<InjectCtx>;
|
||||
getRuntime(pipetime: number): string;
|
||||
}
|
67
CyLukTs/lukan/node_modules/listr2/dist/manager.js
generated
vendored
Normal file
67
CyLukTs/lukan/node_modules/listr2/dist/manager.js
generated
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Manager = void 0;
|
||||
const listr_1 = require("./listr");
|
||||
/**
|
||||
* Creates a new Listr2 task manager.
|
||||
*
|
||||
* Useful for creating a single instace of Listr2 with pre-set settings.
|
||||
*/
|
||||
class Manager {
|
||||
constructor(options) {
|
||||
this.options = options;
|
||||
this.err = [];
|
||||
this.tasks = [];
|
||||
}
|
||||
set ctx(ctx) {
|
||||
this.options.ctx = ctx;
|
||||
}
|
||||
add(tasks, options) {
|
||||
options = { ...this.options, ...options };
|
||||
this.tasks = [...this.tasks, this.indent(tasks, options)];
|
||||
}
|
||||
async runAll(options) {
|
||||
options = { ...this.options, ...options };
|
||||
const ctx = await this.run(this.tasks, options);
|
||||
// clear out queues
|
||||
this.tasks = [];
|
||||
return ctx;
|
||||
}
|
||||
newListr(tasks, options) {
|
||||
return new listr_1.Listr(tasks, options);
|
||||
}
|
||||
indent(tasks, options, taskOptions) {
|
||||
options = { ...this.options, ...options };
|
||||
let newTask;
|
||||
// type function or directly
|
||||
if (typeof tasks === 'function') {
|
||||
newTask = {
|
||||
...taskOptions,
|
||||
task: (ctx) => this.newListr(tasks(ctx), options)
|
||||
};
|
||||
}
|
||||
else {
|
||||
newTask = {
|
||||
...taskOptions,
|
||||
task: () => this.newListr(tasks, options)
|
||||
};
|
||||
}
|
||||
return newTask;
|
||||
}
|
||||
async run(tasks, options) {
|
||||
options = { ...this.options, ...options };
|
||||
// create task
|
||||
const task = this.newListr(tasks, options);
|
||||
// run task
|
||||
const ctx = await task.run();
|
||||
// reset error queue
|
||||
this.err = task.err;
|
||||
return ctx;
|
||||
}
|
||||
// general utils
|
||||
/* istanbul ignore next */
|
||||
getRuntime(pipetime) {
|
||||
return `${Math.round(Date.now() - pipetime) / 1000}s`;
|
||||
}
|
||||
}
|
||||
exports.Manager = Manager;
|
160
CyLukTs/lukan/node_modules/listr2/dist/renderer/default.renderer.d.ts
generated
vendored
Normal file
160
CyLukTs/lukan/node_modules/listr2/dist/renderer/default.renderer.d.ts
generated
vendored
Normal file
@ -0,0 +1,160 @@
|
||||
import { ListrRenderer } from '../interfaces/renderer.interface';
|
||||
import { Task } from '../lib/task';
|
||||
/** Default updating renderer for Listr2 */
|
||||
export declare class DefaultRenderer implements ListrRenderer {
|
||||
tasks: Task<any, typeof DefaultRenderer>[];
|
||||
options: typeof DefaultRenderer['rendererOptions'];
|
||||
renderHook$?: Task<any, any>['renderHook$'];
|
||||
/** designates whether this renderer can output to a non-tty console */
|
||||
static nonTTY: boolean;
|
||||
/** renderer options for the defauult renderer */
|
||||
static rendererOptions: {
|
||||
/**
|
||||
* indentation per level of subtask
|
||||
*
|
||||
* @default 2
|
||||
*/
|
||||
indentation?: number;
|
||||
/**
|
||||
* clear all the output generated by the renderer when the task finishes its execution
|
||||
*
|
||||
* @default false
|
||||
* @global global option that can not be temperated with subtasks
|
||||
*/
|
||||
clearOutput?: boolean;
|
||||
/**
|
||||
* show the subtasks of the current task
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
showSubtasks?: boolean;
|
||||
/**
|
||||
* collapse subtasks after current task completes its execution
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
collapse?: boolean;
|
||||
/**
|
||||
* show skip messages or show the original title of the task, this will also disable collapseSkips mode
|
||||
*
|
||||
* You can disable showing the skip messages, even though you passed in a message by settings this option,
|
||||
* if you want to keep the original task title intact.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
showSkipMessage?: boolean;
|
||||
/**
|
||||
* collapse skip messages into a single message and overwrite the task title
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
collapseSkips?: boolean;
|
||||
/**
|
||||
* suffix skip messages with [SKIPPED] when in collapseSkips mode
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
suffixSkips?: boolean;
|
||||
/**
|
||||
* shows the thrown error message or show the original title of the task, this will also disable collapseErrors mode
|
||||
* You can disable showing the error messages, even though you passed in a message by settings this option,
|
||||
* if you want to keep the original task title intact.
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
showErrorMessage?: boolean;
|
||||
/**
|
||||
* collapse error messages into a single message and overwrite the task title
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
collapseErrors?: boolean;
|
||||
/**
|
||||
* suffix retry messages with [RETRY-${COUNT}] when retry is enabled for a task
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
suffixRetries?: boolean;
|
||||
/**
|
||||
* only update through triggers from renderhook
|
||||
*
|
||||
* useful for tests and stuff. this will disable showing spinner and only update the screen if something else has
|
||||
* happened in the task worthy to show
|
||||
*
|
||||
* @default false
|
||||
* @global global option that can not be temperated with subtasks
|
||||
*/
|
||||
lazy?: boolean;
|
||||
/**
|
||||
* show duration for all tasks
|
||||
*
|
||||
* @default false
|
||||
* @global global option that can not be temperated with subtasks
|
||||
*/
|
||||
showTimer?: boolean;
|
||||
/**
|
||||
* removes empty lines from the data output
|
||||
*
|
||||
* @default true
|
||||
*/
|
||||
removeEmptyLines?: boolean;
|
||||
/**
|
||||
* formats data output depending on your requirements.
|
||||
*
|
||||
* @default 'truncate'
|
||||
* @global global option that can not be temperated with subtasks
|
||||
*/
|
||||
formatOutput?: 'truncate' | 'wrap';
|
||||
};
|
||||
/** per task options for the default renderer */
|
||||
static rendererTaskOptions: {
|
||||
/**
|
||||
* write task output to the bottom bar instead of the gap under the task title itself.
|
||||
* useful for a stream of data.
|
||||
* @default false
|
||||
*
|
||||
* `true` only keep 1 line of the latest data outputted by the task.
|
||||
* `false` only keep 1 line of the latest data outputted by the task.
|
||||
* `number` will keep designated data of the latest data outputted by the task.
|
||||
*/
|
||||
bottomBar?: boolean | number;
|
||||
/**
|
||||
* keep output after task finishes
|
||||
* @default false
|
||||
*
|
||||
* works both for the bottom bar and the default behavior
|
||||
*/
|
||||
persistentOutput?: boolean;
|
||||
/**
|
||||
* show the task time if it was successful
|
||||
*/
|
||||
showTimer?: boolean;
|
||||
};
|
||||
private id?;
|
||||
private bottomBar;
|
||||
private promptBar;
|
||||
private readonly spinner;
|
||||
private spinnerPosition;
|
||||
constructor(tasks: Task<any, typeof DefaultRenderer>[], options: typeof DefaultRenderer['rendererOptions'], renderHook$?: Task<any, any>['renderHook$']);
|
||||
getTaskOptions(task: Task<any, typeof DefaultRenderer>): typeof DefaultRenderer['rendererTaskOptions'];
|
||||
isBottomBar(task: Task<any, typeof DefaultRenderer>): boolean;
|
||||
hasPersistentOutput(task: Task<any, typeof DefaultRenderer>): boolean;
|
||||
hasTimer(task: Task<any, typeof DefaultRenderer>): boolean;
|
||||
getSelfOrParentOption<T extends keyof typeof DefaultRenderer['rendererOptions']>(task: Task<any, typeof DefaultRenderer>, key: T): typeof DefaultRenderer['rendererOptions'][T];
|
||||
getTaskTime(task: Task<any, typeof DefaultRenderer>): string;
|
||||
createRender(options?: {
|
||||
tasks?: boolean;
|
||||
bottomBar?: boolean;
|
||||
prompt?: boolean;
|
||||
}): string;
|
||||
render(): void;
|
||||
end(): void;
|
||||
private multiLineRenderer;
|
||||
private renderBottomBar;
|
||||
private renderPrompt;
|
||||
private dumpData;
|
||||
private formatString;
|
||||
private indentMultilineOutput;
|
||||
private getSymbol;
|
||||
private addSuffixToMessage;
|
||||
}
|
363
CyLukTs/lukan/node_modules/listr2/dist/renderer/default.renderer.js
generated
vendored
Normal file
363
CyLukTs/lukan/node_modules/listr2/dist/renderer/default.renderer.js
generated
vendored
Normal file
@ -0,0 +1,363 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.DefaultRenderer = void 0;
|
||||
const cliTruncate = require("cli-truncate");
|
||||
const logUpdate = require("log-update");
|
||||
const os_1 = require("os");
|
||||
const cliWrap = require("wrap-ansi");
|
||||
const colorette_1 = require("../utils/colorette");
|
||||
const figures_1 = require("../utils/figures");
|
||||
const indent_string_1 = require("../utils/indent-string");
|
||||
const is_unicode_supported_1 = require("../utils/is-unicode-supported");
|
||||
const parse_time_1 = require("../utils/parse-time");
|
||||
/** Default updating renderer for Listr2 */
|
||||
class DefaultRenderer {
|
||||
constructor(tasks, options, renderHook$) {
|
||||
this.tasks = tasks;
|
||||
this.options = options;
|
||||
this.renderHook$ = renderHook$;
|
||||
this.bottomBar = {};
|
||||
this.spinner = !(0, is_unicode_supported_1.isUnicodeSupported)() ? ['-', '\\', '|', '/'] : ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
||||
this.spinnerPosition = 0;
|
||||
this.options = { ...DefaultRenderer.rendererOptions, ...this.options };
|
||||
}
|
||||
getTaskOptions(task) {
|
||||
return { ...DefaultRenderer.rendererTaskOptions, ...task.rendererTaskOptions };
|
||||
}
|
||||
isBottomBar(task) {
|
||||
const bottomBar = this.getTaskOptions(task).bottomBar;
|
||||
return typeof bottomBar === 'number' && bottomBar !== 0 || typeof bottomBar === 'boolean' && bottomBar !== false;
|
||||
}
|
||||
hasPersistentOutput(task) {
|
||||
return this.getTaskOptions(task).persistentOutput === true;
|
||||
}
|
||||
hasTimer(task) {
|
||||
return this.getTaskOptions(task).showTimer === true;
|
||||
}
|
||||
getSelfOrParentOption(task, key) {
|
||||
var _a, _b, _c;
|
||||
return (_b = (_a = task === null || task === void 0 ? void 0 : task.rendererOptions) === null || _a === void 0 ? void 0 : _a[key]) !== null && _b !== void 0 ? _b : (_c = this.options) === null || _c === void 0 ? void 0 : _c[key];
|
||||
}
|
||||
/* istanbul ignore next */
|
||||
getTaskTime(task) {
|
||||
return colorette_1.default.dim(`[${(0, parse_time_1.parseTaskTime)(task.message.duration)}]`);
|
||||
}
|
||||
createRender(options) {
|
||||
options = {
|
||||
...{
|
||||
tasks: true,
|
||||
bottomBar: true,
|
||||
prompt: true
|
||||
},
|
||||
...options
|
||||
};
|
||||
const render = [];
|
||||
const renderTasks = this.multiLineRenderer(this.tasks);
|
||||
const renderBottomBar = this.renderBottomBar();
|
||||
const renderPrompt = this.renderPrompt();
|
||||
if (options.tasks && (renderTasks === null || renderTasks === void 0 ? void 0 : renderTasks.trim().length) > 0) {
|
||||
render.push(renderTasks);
|
||||
}
|
||||
if (options.bottomBar && (renderBottomBar === null || renderBottomBar === void 0 ? void 0 : renderBottomBar.trim().length) > 0) {
|
||||
render.push((render.length > 0 ? os_1.EOL : '') + renderBottomBar);
|
||||
}
|
||||
if (options.prompt && (renderPrompt === null || renderPrompt === void 0 ? void 0 : renderPrompt.trim().length) > 0) {
|
||||
render.push((render.length > 0 ? os_1.EOL : '') + renderPrompt);
|
||||
}
|
||||
return render.length > 0 ? render.join(os_1.EOL) : '';
|
||||
}
|
||||
render() {
|
||||
var _a;
|
||||
// Do not render if we are already rendering
|
||||
if (this.id) {
|
||||
return;
|
||||
}
|
||||
const updateRender = () => logUpdate(this.createRender());
|
||||
/* istanbul ignore if */
|
||||
if (!((_a = this.options) === null || _a === void 0 ? void 0 : _a.lazy)) {
|
||||
this.id = setInterval(() => {
|
||||
this.spinnerPosition = ++this.spinnerPosition % this.spinner.length;
|
||||
updateRender();
|
||||
}, 100);
|
||||
}
|
||||
this.renderHook$.subscribe(() => {
|
||||
updateRender();
|
||||
});
|
||||
}
|
||||
end() {
|
||||
clearInterval(this.id);
|
||||
if (this.id) {
|
||||
this.id = undefined;
|
||||
}
|
||||
// clear log updater
|
||||
logUpdate.clear();
|
||||
logUpdate.done();
|
||||
// directly write to process.stdout, since logupdate only can update the seen height of terminal
|
||||
if (!this.options.clearOutput) {
|
||||
process.stdout.write(this.createRender({ prompt: false }) + os_1.EOL);
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line
|
||||
multiLineRenderer(tasks, level = 0) {
|
||||
var _a, _b;
|
||||
let output = [];
|
||||
for (const task of tasks) {
|
||||
if (task.isEnabled()) {
|
||||
// Current Task Title
|
||||
if (task.hasTitle()) {
|
||||
if (!(tasks.some((task) => task.hasFailed()) && !task.hasFailed() && task.options.exitOnError !== false && !(task.isCompleted() || task.isSkipped()))) {
|
||||
// if task is skipped
|
||||
if (task.hasFailed() && this.getSelfOrParentOption(task, 'collapseErrors')) {
|
||||
// current task title and skip change the title
|
||||
output = [
|
||||
...output,
|
||||
this.formatString(!task.hasSubtasks() && task.message.error && this.getSelfOrParentOption(task, 'showErrorMessage') ? task.message.error : task.title, this.getSymbol(task), level)
|
||||
];
|
||||
}
|
||||
else if (task.isSkipped() && this.getSelfOrParentOption(task, 'collapseSkips')) {
|
||||
// current task title and skip change the title
|
||||
output = [
|
||||
...output,
|
||||
this.formatString(this.addSuffixToMessage(task.message.skip && this.getSelfOrParentOption(task, 'showSkipMessage') ? task.message.skip : task.title, 'SKIPPED', this.getSelfOrParentOption(task, 'suffixSkips')), this.getSymbol(task), level)
|
||||
];
|
||||
}
|
||||
else if (task.isRetrying() && this.getSelfOrParentOption(task, 'suffixRetries')) {
|
||||
output = [...output, this.formatString(this.addSuffixToMessage(task.title, `RETRYING-${task.message.retry.count}`), this.getSymbol(task), level)];
|
||||
}
|
||||
else if (task.isCompleted() && task.hasTitle() && (this.getSelfOrParentOption(task, 'showTimer') || this.hasTimer(task))) {
|
||||
// task with timer
|
||||
output = [...output, this.formatString(`${task === null || task === void 0 ? void 0 : task.title} ${this.getTaskTime(task)}`, this.getSymbol(task), level)];
|
||||
}
|
||||
else {
|
||||
// normal state
|
||||
output = [...output, this.formatString(task.title, this.getSymbol(task), level)];
|
||||
}
|
||||
}
|
||||
else {
|
||||
// some sibling task but self has failed and this has stopped
|
||||
output = [...output, this.formatString(task.title, colorette_1.default.red(figures_1.figures.squareSmallFilled), level)];
|
||||
}
|
||||
}
|
||||
// task should not have subtasks since subtasks will handle the error already
|
||||
// maybe it is a better idea to show the error or skip messages when show subtasks is disabled.
|
||||
if (!task.hasSubtasks() || !this.getSelfOrParentOption(task, 'showSubtasks')) {
|
||||
// without the collapse option for skip and errors
|
||||
if (task.hasFailed() &&
|
||||
this.getSelfOrParentOption(task, 'collapseErrors') === false &&
|
||||
(this.getSelfOrParentOption(task, 'showErrorMessage') || !this.getSelfOrParentOption(task, 'showSubtasks'))) {
|
||||
// show skip data if collapsing is not defined
|
||||
output = [...output, this.dumpData(task, level, 'error')];
|
||||
}
|
||||
else if (task.isSkipped() &&
|
||||
this.getSelfOrParentOption(task, 'collapseSkips') === false &&
|
||||
(this.getSelfOrParentOption(task, 'showSkipMessage') || !this.getSelfOrParentOption(task, 'showSubtasks'))) {
|
||||
// show skip data if collapsing is not defined
|
||||
output = [...output, this.dumpData(task, level, 'skip')];
|
||||
}
|
||||
}
|
||||
// Current Task Output
|
||||
if (task === null || task === void 0 ? void 0 : task.output) {
|
||||
if ((task.isPending() || task.isRetrying() || task.isRollingBack()) && task.isPrompt()) {
|
||||
// data output to prompt bar if prompt
|
||||
this.promptBar = task.output;
|
||||
}
|
||||
else if (this.isBottomBar(task) || !task.hasTitle()) {
|
||||
// data output to bottom bar
|
||||
const data = [this.dumpData(task, -1)];
|
||||
// create new if there is no persistent storage created for bottom bar
|
||||
if (!this.bottomBar[task.id]) {
|
||||
this.bottomBar[task.id] = {};
|
||||
this.bottomBar[task.id].data = [];
|
||||
const bottomBar = this.getTaskOptions(task).bottomBar;
|
||||
if (typeof bottomBar === 'boolean') {
|
||||
this.bottomBar[task.id].items = 1;
|
||||
}
|
||||
else {
|
||||
this.bottomBar[task.id].items = bottomBar;
|
||||
}
|
||||
}
|
||||
// persistent bottom bar and limit items in it
|
||||
if (!((_b = (_a = this.bottomBar[task.id]) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.some((element) => data.includes(element))) && !task.isSkipped()) {
|
||||
this.bottomBar[task.id].data = [...this.bottomBar[task.id].data, ...data];
|
||||
}
|
||||
}
|
||||
else if (task.isPending() || task.isRetrying() || task.isRollingBack() || this.hasPersistentOutput(task)) {
|
||||
// keep output if persistent output is set
|
||||
output = [...output, this.dumpData(task, level)];
|
||||
}
|
||||
}
|
||||
// render subtasks, some complicated conditionals going on
|
||||
if (
|
||||
// check if renderer option is on first
|
||||
this.getSelfOrParentOption(task, 'showSubtasks') !== false &&
|
||||
// if it doesnt have subtasks no need to check
|
||||
task.hasSubtasks() &&
|
||||
(task.isPending() ||
|
||||
task.hasFailed() ||
|
||||
task.isCompleted() && !task.hasTitle() ||
|
||||
// have to be completed and have subtasks
|
||||
task.isCompleted() && this.getSelfOrParentOption(task, 'collapse') === false && !task.subtasks.some((subtask) => subtask.rendererOptions.collapse === true) ||
|
||||
// if any of the subtasks have the collapse option of
|
||||
task.subtasks.some((subtask) => subtask.rendererOptions.collapse === false) ||
|
||||
// if any of the subtasks has failed
|
||||
task.subtasks.some((subtask) => subtask.hasFailed()) ||
|
||||
// if any of the subtasks rolled back
|
||||
task.subtasks.some((subtask) => subtask.hasRolledBack()))) {
|
||||
// set level
|
||||
const subtaskLevel = !task.hasTitle() ? level : level + 1;
|
||||
// render the subtasks as in the same way
|
||||
const subtaskRender = this.multiLineRenderer(task.subtasks, subtaskLevel);
|
||||
if ((subtaskRender === null || subtaskRender === void 0 ? void 0 : subtaskRender.trim()) !== '' && !task.subtasks.every((subtask) => !subtask.hasTitle())) {
|
||||
output = [...output, subtaskRender];
|
||||
}
|
||||
}
|
||||
// after task is finished actions
|
||||
if (task.isCompleted() || task.hasFailed() || task.isSkipped() || task.hasRolledBack()) {
|
||||
// clean up prompts
|
||||
this.promptBar = null;
|
||||
// clean up bottom bar items if not indicated otherwise
|
||||
if (!this.hasPersistentOutput(task)) {
|
||||
delete this.bottomBar[task.id];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
output = output.filter(Boolean);
|
||||
if (output.length > 0) {
|
||||
return output.join(os_1.EOL);
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
renderBottomBar() {
|
||||
// parse through all objects return only the last mentioned items
|
||||
if (Object.keys(this.bottomBar).length > 0) {
|
||||
this.bottomBar = Object.keys(this.bottomBar).reduce((o, key) => {
|
||||
if (!(o === null || o === void 0 ? void 0 : o[key])) {
|
||||
o[key] = {};
|
||||
}
|
||||
o[key] = this.bottomBar[key];
|
||||
this.bottomBar[key].data = this.bottomBar[key].data.slice(-this.bottomBar[key].items);
|
||||
o[key].data = this.bottomBar[key].data;
|
||||
return o;
|
||||
}, {});
|
||||
return Object.values(this.bottomBar)
|
||||
.reduce((o, value) => o = [...o, ...value.data], [])
|
||||
.filter(Boolean)
|
||||
.join(os_1.EOL);
|
||||
}
|
||||
}
|
||||
renderPrompt() {
|
||||
if (this.promptBar) {
|
||||
return this.promptBar;
|
||||
}
|
||||
}
|
||||
dumpData(task, level, source = 'output') {
|
||||
let data;
|
||||
switch (source) {
|
||||
case 'output':
|
||||
data = task.output;
|
||||
break;
|
||||
case 'skip':
|
||||
data = task.message.skip;
|
||||
break;
|
||||
case 'error':
|
||||
data = task.message.error;
|
||||
break;
|
||||
}
|
||||
// dont return anything on some occasions
|
||||
if (task.hasTitle() && source === 'error' && data === task.title) {
|
||||
return;
|
||||
}
|
||||
if (typeof data === 'string') {
|
||||
return this.formatString(data, this.getSymbol(task, true), level + 1);
|
||||
}
|
||||
}
|
||||
formatString(str, icon, level) {
|
||||
// we dont like empty data around here
|
||||
if (str.trim() === '') {
|
||||
return;
|
||||
}
|
||||
str = `${icon} ${str}`;
|
||||
let parsedStr;
|
||||
let columns = process.stdout.columns ? process.stdout.columns : 80;
|
||||
columns = columns - level * this.options.indentation - 2;
|
||||
switch (this.options.formatOutput) {
|
||||
case 'truncate':
|
||||
parsedStr = str.split(os_1.EOL).map((s, i) => {
|
||||
return cliTruncate(this.indentMultilineOutput(s, i), columns);
|
||||
});
|
||||
break;
|
||||
case 'wrap':
|
||||
parsedStr = cliWrap(str, columns, { hard: true })
|
||||
.split(os_1.EOL)
|
||||
.map((s, i) => this.indentMultilineOutput(s, i));
|
||||
break;
|
||||
default:
|
||||
throw new Error('Format option for the renderer is wrong.');
|
||||
}
|
||||
// this removes the empty lines
|
||||
if (this.options.removeEmptyLines) {
|
||||
parsedStr = parsedStr.filter(Boolean);
|
||||
}
|
||||
return (0, indent_string_1.indentString)(parsedStr.join(os_1.EOL), level * this.options.indentation);
|
||||
}
|
||||
indentMultilineOutput(str, i) {
|
||||
return i > 0 ? (0, indent_string_1.indentString)(str.trim(), 2) : str.trim();
|
||||
}
|
||||
// eslint-disable-next-line complexity
|
||||
getSymbol(task, data = false) {
|
||||
var _a, _b, _c;
|
||||
if (task.isPending() && !data) {
|
||||
return ((_a = this.options) === null || _a === void 0 ? void 0 : _a.lazy) || this.getSelfOrParentOption(task, 'showSubtasks') !== false && task.hasSubtasks() && !task.subtasks.every((subtask) => !subtask.hasTitle())
|
||||
? colorette_1.default.yellow(figures_1.figures.pointer)
|
||||
: colorette_1.default.yellowBright(this.spinner[this.spinnerPosition]);
|
||||
}
|
||||
else if (task.isCompleted() && !data) {
|
||||
return task.hasSubtasks() && task.subtasks.some((subtask) => subtask.hasFailed()) ? colorette_1.default.yellow(figures_1.figures.warning) : colorette_1.default.green(figures_1.figures.tick);
|
||||
}
|
||||
else if (task.isRetrying() && !data) {
|
||||
return ((_b = this.options) === null || _b === void 0 ? void 0 : _b.lazy) ? colorette_1.default.yellow(figures_1.figures.warning) : colorette_1.default.yellow(this.spinner[this.spinnerPosition]);
|
||||
}
|
||||
else if (task.isRollingBack() && !data) {
|
||||
return ((_c = this.options) === null || _c === void 0 ? void 0 : _c.lazy) ? colorette_1.default.red(figures_1.figures.warning) : colorette_1.default.red(this.spinner[this.spinnerPosition]);
|
||||
}
|
||||
else if (task.hasRolledBack() && !data) {
|
||||
return colorette_1.default.red(figures_1.figures.arrowLeft);
|
||||
}
|
||||
else if (task.hasFailed() && !data) {
|
||||
return task.hasSubtasks() ? colorette_1.default.red(figures_1.figures.pointer) : colorette_1.default.red(figures_1.figures.cross);
|
||||
}
|
||||
else if (task.isSkipped() && !data && this.getSelfOrParentOption(task, 'collapseSkips') === false) {
|
||||
return colorette_1.default.yellow(figures_1.figures.warning);
|
||||
}
|
||||
else if (task.isSkipped() && (data || this.getSelfOrParentOption(task, 'collapseSkips'))) {
|
||||
return colorette_1.default.yellow(figures_1.figures.arrowDown);
|
||||
}
|
||||
return !data ? colorette_1.default.dim(figures_1.figures.squareSmallFilled) : figures_1.figures.pointerSmall;
|
||||
}
|
||||
addSuffixToMessage(message, suffix, condition) {
|
||||
return (condition !== null && condition !== void 0 ? condition : true) ? message + colorette_1.default.dim(` [${suffix}]`) : message;
|
||||
}
|
||||
}
|
||||
exports.DefaultRenderer = DefaultRenderer;
|
||||
/** designates whether this renderer can output to a non-tty console */
|
||||
DefaultRenderer.nonTTY = false;
|
||||
/** renderer options for the defauult renderer */
|
||||
DefaultRenderer.rendererOptions = {
|
||||
indentation: 2,
|
||||
clearOutput: false,
|
||||
showSubtasks: true,
|
||||
collapse: true,
|
||||
collapseSkips: true,
|
||||
showSkipMessage: true,
|
||||
suffixSkips: true,
|
||||
collapseErrors: true,
|
||||
showErrorMessage: true,
|
||||
suffixRetries: true,
|
||||
lazy: false,
|
||||
showTimer: false,
|
||||
removeEmptyLines: true,
|
||||
formatOutput: 'truncate'
|
||||
};
|
15
CyLukTs/lukan/node_modules/listr2/dist/renderer/silent.renderer.d.ts
generated
vendored
Normal file
15
CyLukTs/lukan/node_modules/listr2/dist/renderer/silent.renderer.d.ts
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import { ListrRenderer } from '../interfaces/renderer.interface';
|
||||
import { Task } from '../lib/task';
|
||||
export declare class SilentRenderer implements ListrRenderer {
|
||||
tasks: Task<any, typeof SilentRenderer>[];
|
||||
options: typeof SilentRenderer['rendererOptions'];
|
||||
/** designates whether this renderer can output to a non-tty console */
|
||||
static nonTTY: boolean;
|
||||
/** renderer options for the silent renderer */
|
||||
static rendererOptions: never;
|
||||
/** per task options for the silent renderer */
|
||||
static rendererTaskOptions: never;
|
||||
constructor(tasks: Task<any, typeof SilentRenderer>[], options: typeof SilentRenderer['rendererOptions']);
|
||||
render(): void;
|
||||
end(): void;
|
||||
}
|
14
CyLukTs/lukan/node_modules/listr2/dist/renderer/silent.renderer.js
generated
vendored
Normal file
14
CyLukTs/lukan/node_modules/listr2/dist/renderer/silent.renderer.js
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SilentRenderer = void 0;
|
||||
class SilentRenderer {
|
||||
constructor(tasks, options) {
|
||||
this.tasks = tasks;
|
||||
this.options = options;
|
||||
}
|
||||
render() { }
|
||||
end() { }
|
||||
}
|
||||
exports.SilentRenderer = SilentRenderer;
|
||||
/** designates whether this renderer can output to a non-tty console */
|
||||
SilentRenderer.nonTTY = true;
|
48
CyLukTs/lukan/node_modules/listr2/dist/renderer/simple.renderer.d.ts
generated
vendored
Normal file
48
CyLukTs/lukan/node_modules/listr2/dist/renderer/simple.renderer.d.ts
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
import { ListrEventType } from '../constants/event.constants';
|
||||
import { ListrEventFromType } from '../interfaces/listr.interface';
|
||||
import { ListrRenderer } from '../interfaces/renderer.interface';
|
||||
import { Task } from '../lib/task';
|
||||
/**
|
||||
* This is the default renderer which is neither verbose or updating.
|
||||
* It provides short output like update renderer, but does not disturb
|
||||
* stdin during execution of listr tasks
|
||||
*/
|
||||
export declare class SimpleRenderer implements ListrRenderer {
|
||||
readonly tasks: Task<any, typeof SimpleRenderer>[];
|
||||
options: typeof SimpleRenderer['rendererOptions'];
|
||||
static nonTTY: boolean;
|
||||
static rendererOptions: {
|
||||
/**
|
||||
* if true this will add
|
||||
* timestamp at the begin of the rendered line
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* ```bash
|
||||
* [12:33:44] ✔ Do something important
|
||||
* ```
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
prefixWithTimestamp?: boolean;
|
||||
/**
|
||||
* choose between process.stdout and process.stderr
|
||||
*
|
||||
* @default stdout
|
||||
*/
|
||||
output?: 'stdout' | 'stderr';
|
||||
};
|
||||
static rendererTaskOptions: never;
|
||||
/**
|
||||
* Event type renderer map contains functions to process different task events
|
||||
*/
|
||||
eventTypeRendererMap: Partial<{
|
||||
[P in ListrEventType]: (t: Task<any, typeof SimpleRenderer>, event: ListrEventFromType<P>) => void;
|
||||
}>;
|
||||
constructor(tasks: Task<any, typeof SimpleRenderer>[], options: typeof SimpleRenderer['rendererOptions']);
|
||||
static now(): Date;
|
||||
static formatTitle(task?: Task<any, typeof SimpleRenderer>): string;
|
||||
log(output?: string): void;
|
||||
end(): void;
|
||||
render(tasks?: Task<any, typeof SimpleRenderer>[]): void;
|
||||
}
|
119
CyLukTs/lukan/node_modules/listr2/dist/renderer/simple.renderer.js
generated
vendored
Normal file
119
CyLukTs/lukan/node_modules/listr2/dist/renderer/simple.renderer.js
generated
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.SimpleRenderer = void 0;
|
||||
const log_update_1 = require("log-update");
|
||||
const os_1 = require("os");
|
||||
const event_constants_1 = require("../constants/event.constants");
|
||||
const colorette_1 = require("../utils/colorette");
|
||||
const figures_1 = require("../utils/figures");
|
||||
/**
|
||||
* This is the default renderer which is neither verbose or updating.
|
||||
* It provides short output like update renderer, but does not disturb
|
||||
* stdin during execution of listr tasks
|
||||
*/
|
||||
class SimpleRenderer {
|
||||
constructor(tasks, options) {
|
||||
this.tasks = tasks;
|
||||
this.options = options;
|
||||
/**
|
||||
* Event type renderer map contains functions to process different task events
|
||||
*/
|
||||
this.eventTypeRendererMap = {
|
||||
[event_constants_1.ListrEventType.SUBTASK]: (task) => {
|
||||
if (task.hasTitle()) {
|
||||
// if Task has subtasks where we want to log the group indication
|
||||
this.log(`${colorette_1.default.blue(figures_1.figures.pointer)} ${task.title}`);
|
||||
}
|
||||
if (task.hasSubtasks()) {
|
||||
this.render(task.subtasks);
|
||||
}
|
||||
},
|
||||
[event_constants_1.ListrEventType.STATE]: (task) => {
|
||||
if (task.isCompleted() && task.hasTitle()) {
|
||||
// The title is only logged at the end of the task execution
|
||||
this.log(`${colorette_1.default.green(figures_1.figures.tick)} ${task.title}`);
|
||||
}
|
||||
},
|
||||
[event_constants_1.ListrEventType.DATA]: (task, event) => {
|
||||
// ! This is where it gets dirty
|
||||
// * We want the prompt to stay visible after confirmation
|
||||
if (task.isPrompt() && !String(event.data).match(/^\n$/)) {
|
||||
(0, log_update_1.stderr)(`${event.data}`);
|
||||
}
|
||||
else {
|
||||
this.log(`${figures_1.figures.pointerSmall} ${event.data}`);
|
||||
}
|
||||
},
|
||||
[event_constants_1.ListrEventType.MESSAGE]: (task, event) => {
|
||||
if (event.data.error) {
|
||||
// error message
|
||||
const title = SimpleRenderer.formatTitle(task);
|
||||
this.log(`${colorette_1.default.red(figures_1.figures.cross)}${title}: ${event.data.error}`);
|
||||
}
|
||||
else if (event.data.skip) {
|
||||
// Skip message
|
||||
const title = SimpleRenderer.formatTitle(task);
|
||||
const skip = task.title !== event.data.skip ? `: ${event.data.skip}` : '';
|
||||
this.log(`${colorette_1.default.yellow(figures_1.figures.arrowDown)}${title} [${colorette_1.default.yellow(`skipped${skip}`)}]`);
|
||||
}
|
||||
else if (event.data.rollback) {
|
||||
// rollback message
|
||||
const title = SimpleRenderer.formatTitle(task);
|
||||
this.log(`${colorette_1.default.red(figures_1.figures.arrowLeft)}${title}: ${event.data.rollback}`);
|
||||
}
|
||||
else if (event.data.retry) {
|
||||
// Retry Message
|
||||
const title = SimpleRenderer.formatTitle(task);
|
||||
this.log(`[${colorette_1.default.yellow(`${event.data.retry.count}`)}]${title}`);
|
||||
}
|
||||
}
|
||||
// * We do not log out initial title. Only the final one.
|
||||
// [ListrEventType.TITLE]: (t, e) => this.renderTitle(t, e),
|
||||
};
|
||||
this.options = { ...SimpleRenderer.rendererOptions, ...options };
|
||||
}
|
||||
// This is used for mocks, since mocking Date is cumbesome
|
||||
static now() {
|
||||
return new Date();
|
||||
}
|
||||
// Used to sanitize title output
|
||||
static formatTitle(task) {
|
||||
return (task === null || task === void 0 ? void 0 : task.title) ? ` ${task.title}` : '';
|
||||
}
|
||||
// Writes sanitized output
|
||||
log(output) {
|
||||
const logOut = (msg) => {
|
||||
// Need appent \n to mimic console.log
|
||||
process[this.options.output].write(msg.endsWith(os_1.EOL) ? msg : `${msg}${os_1.EOL}`);
|
||||
};
|
||||
if (!this.options.prefixWithTimestamp) {
|
||||
logOut(`${output}`);
|
||||
return;
|
||||
}
|
||||
const now = SimpleRenderer.now();
|
||||
const timestamp = String(now.getHours()).padStart(2, '0') + ':' + String(now.getMinutes()).padStart(2, '0') + ':' + String(now.getSeconds()).padStart(2, '0');
|
||||
logOut(`${colorette_1.default.dim(`[${timestamp}]`)} ${output}`);
|
||||
}
|
||||
// eslint-disable-next-line
|
||||
end() { }
|
||||
// yes this is a misuse :)
|
||||
render(tasks) {
|
||||
if (tasks === null || tasks === void 0 ? void 0 : tasks.length) {
|
||||
tasks.forEach((task) => {
|
||||
task.subscribe((event) => {
|
||||
var _a, _b;
|
||||
// Here event type will match event.type anyway
|
||||
(_b = (_a = this.eventTypeRendererMap)[event.type]) === null || _b === void 0 ? void 0 : _b.call(_a, task, event);
|
||||
}, this.log);
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.render(this.tasks);
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.SimpleRenderer = SimpleRenderer;
|
||||
// Designate this renderer as tty or nonTTY
|
||||
SimpleRenderer.nonTTY = true;
|
||||
// designate your renderer options that will be showed inside the `ListrOptions` as rendererOptions
|
||||
SimpleRenderer.rendererOptions = { prefixWithTimestamp: false, output: 'stdout' };
|
47
CyLukTs/lukan/node_modules/listr2/dist/renderer/verbose.renderer.d.ts
generated
vendored
Normal file
47
CyLukTs/lukan/node_modules/listr2/dist/renderer/verbose.renderer.d.ts
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
import { ListrRenderer } from '../interfaces/renderer.interface';
|
||||
import { Task } from '../lib/task';
|
||||
import { Logger } from '../utils/logger';
|
||||
export declare class VerboseRenderer implements ListrRenderer {
|
||||
tasks: Task<any, typeof VerboseRenderer>[];
|
||||
options: typeof VerboseRenderer['rendererOptions'];
|
||||
/** designates whether this renderer can output to a non-tty console */
|
||||
static nonTTY: boolean;
|
||||
/** renderer options for the verbose renderer */
|
||||
static rendererOptions: ({
|
||||
/**
|
||||
* useIcons instead of text for log level
|
||||
* @default false
|
||||
*/
|
||||
useIcons?: boolean;
|
||||
/**
|
||||
* log tasks with empty titles
|
||||
* @default true
|
||||
*/
|
||||
logEmptyTitle?: boolean;
|
||||
/**
|
||||
* log title changes
|
||||
* @default true
|
||||
*/
|
||||
logTitleChange?: boolean;
|
||||
/**
|
||||
* show duration for all tasks
|
||||
*/
|
||||
showTimer?: boolean;
|
||||
} & {
|
||||
/**
|
||||
* inject a custom logger
|
||||
*/
|
||||
logger?: new (...args: any) => Logger;
|
||||
/**
|
||||
* inject options to custom logger
|
||||
*/
|
||||
options?: any;
|
||||
});
|
||||
/** per task options for the verbose renderer */
|
||||
static rendererTaskOptions: never;
|
||||
private logger;
|
||||
constructor(tasks: Task<any, typeof VerboseRenderer>[], options: typeof VerboseRenderer['rendererOptions']);
|
||||
render(): void;
|
||||
end(): void;
|
||||
private verboseRenderer;
|
||||
}
|
94
CyLukTs/lukan/node_modules/listr2/dist/renderer/verbose.renderer.js
generated
vendored
Normal file
94
CyLukTs/lukan/node_modules/listr2/dist/renderer/verbose.renderer.js
generated
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.VerboseRenderer = void 0;
|
||||
const event_constants_1 = require("../constants/event.constants");
|
||||
const logger_1 = require("../utils/logger");
|
||||
const parse_time_1 = require("../utils/parse-time");
|
||||
class VerboseRenderer {
|
||||
constructor(tasks, options) {
|
||||
var _a, _b, _c, _d;
|
||||
this.tasks = tasks;
|
||||
this.options = options;
|
||||
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.logger) && ((_b = this.options) === null || _b === void 0 ? void 0 : _b.options)) {
|
||||
this.logger = new this.options.logger(this.options.options);
|
||||
}
|
||||
else if ((_c = this.options) === null || _c === void 0 ? void 0 : _c.logger) {
|
||||
this.logger = new this.options.logger();
|
||||
}
|
||||
else {
|
||||
this.logger = new logger_1.Logger({ useIcons: (_d = this.options) === null || _d === void 0 ? void 0 : _d.useIcons });
|
||||
}
|
||||
this.options = { ...VerboseRenderer.rendererOptions, ...this.options };
|
||||
}
|
||||
render() {
|
||||
this.verboseRenderer(this.tasks);
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
end() { }
|
||||
// verbose renderer multi-level
|
||||
verboseRenderer(tasks) {
|
||||
return tasks === null || tasks === void 0 ? void 0 : tasks.forEach((task) => {
|
||||
task.subscribe(
|
||||
// eslint-disable-next-line complexity
|
||||
(event) => {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h;
|
||||
if (task.isEnabled()) {
|
||||
// render depending on the state
|
||||
const taskTitle = task.hasTitle() ? task.title : 'Task without title.';
|
||||
if (event.type === event_constants_1.ListrEventType.SUBTASK && task.hasSubtasks()) {
|
||||
// render lower level if multi-level
|
||||
this.verboseRenderer(task.subtasks);
|
||||
}
|
||||
else if (event.type === event_constants_1.ListrEventType.STATE) {
|
||||
if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.logEmptyTitle) !== false || task.hasTitle()) {
|
||||
if (task.isPending()) {
|
||||
this.logger.start(taskTitle);
|
||||
}
|
||||
else if (task.isCompleted()) {
|
||||
this.logger.success(taskTitle + (((_b = this.options) === null || _b === void 0 ? void 0 : _b.showTimer) && ((_c = task.message) === null || _c === void 0 ? void 0 : _c.duration) ? ` [${(0, parse_time_1.parseTaskTime)(task.message.duration)}]` : ''));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (event.type === event_constants_1.ListrEventType.DATA && !!event.data) {
|
||||
this.logger.data(String(event.data));
|
||||
}
|
||||
else if (event.type === event_constants_1.ListrEventType.TITLE) {
|
||||
if (((_d = this.options) === null || _d === void 0 ? void 0 : _d.logTitleChange) !== false) {
|
||||
this.logger.title(String(event.data));
|
||||
}
|
||||
}
|
||||
else if (event.type === event_constants_1.ListrEventType.MESSAGE) {
|
||||
if ((_e = event.data) === null || _e === void 0 ? void 0 : _e.error) {
|
||||
// error message
|
||||
this.logger.fail(String(event.data.error));
|
||||
}
|
||||
else if ((_f = event.data) === null || _f === void 0 ? void 0 : _f.skip) {
|
||||
// skip message
|
||||
this.logger.skip(String(event.data.skip));
|
||||
}
|
||||
else if ((_g = event.data) === null || _g === void 0 ? void 0 : _g.rollback) {
|
||||
// rollback message
|
||||
this.logger.rollback(String(event.data.rollback));
|
||||
}
|
||||
else if ((_h = event.data) === null || _h === void 0 ? void 0 : _h.retry) {
|
||||
// inform of retry count
|
||||
this.logger.retry(`[${event.data.retry.count}] ` + String(taskTitle));
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* istanbul ignore next */ (err) => {
|
||||
this.logger.fail(err);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.VerboseRenderer = VerboseRenderer;
|
||||
/** designates whether this renderer can output to a non-tty console */
|
||||
VerboseRenderer.nonTTY = true;
|
||||
/** renderer options for the verbose renderer */
|
||||
VerboseRenderer.rendererOptions = {
|
||||
useIcons: false,
|
||||
logEmptyTitle: true,
|
||||
logTitleChange: true
|
||||
};
|
6
CyLukTs/lukan/node_modules/listr2/dist/utils/assert.d.ts
generated
vendored
Normal file
6
CyLukTs/lukan/node_modules/listr2/dist/utils/assert.d.ts
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* This function asserts the given value as a function or itself.
|
||||
* If the value itself is a function it will evaluate it with the passed in arguments,
|
||||
* elsewise it will directly return itself.
|
||||
*/
|
||||
export declare function assertFunctionOrSelf<T>(functionOrSelf: T, ...args: T extends (...args: any[]) => any ? Parameters<T> : never): T extends (...args: any[]) => any ? ReturnType<T> : T;
|
17
CyLukTs/lukan/node_modules/listr2/dist/utils/assert.js
generated
vendored
Normal file
17
CyLukTs/lukan/node_modules/listr2/dist/utils/assert.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.assertFunctionOrSelf = void 0;
|
||||
/**
|
||||
* This function asserts the given value as a function or itself.
|
||||
* If the value itself is a function it will evaluate it with the passed in arguments,
|
||||
* elsewise it will directly return itself.
|
||||
*/
|
||||
function assertFunctionOrSelf(functionOrSelf, ...args) {
|
||||
if (typeof functionOrSelf === 'function') {
|
||||
return functionOrSelf(...args);
|
||||
}
|
||||
else {
|
||||
return functionOrSelf;
|
||||
}
|
||||
}
|
||||
exports.assertFunctionOrSelf = assertFunctionOrSelf;
|
3
CyLukTs/lukan/node_modules/listr2/dist/utils/colorette.d.ts
generated
vendored
Normal file
3
CyLukTs/lukan/node_modules/listr2/dist/utils/colorette.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/// <reference types="colorette" />
|
||||
declare const _default: import("colorette").Colorette;
|
||||
export default _default;
|
5
CyLukTs/lukan/node_modules/listr2/dist/utils/colorette.js
generated
vendored
Normal file
5
CyLukTs/lukan/node_modules/listr2/dist/utils/colorette.js
generated
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
"use strict";
|
||||
var _a;
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const colorette_1 = require("colorette");
|
||||
exports.default = (0, colorette_1.createColors)({ useColor: ((_a = process.env) === null || _a === void 0 ? void 0 : _a.LISTR_DISABLE_COLOR) !== '1' });
|
12
CyLukTs/lukan/node_modules/listr2/dist/utils/figures.d.ts
generated
vendored
Normal file
12
CyLukTs/lukan/node_modules/listr2/dist/utils/figures.d.ts
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
export declare const figures: {
|
||||
warning: string;
|
||||
cross: string;
|
||||
arrowDown: string;
|
||||
tick: string;
|
||||
arrowRight: string;
|
||||
pointer: string;
|
||||
checkboxOn: string;
|
||||
arrowLeft: string;
|
||||
squareSmallFilled: string;
|
||||
pointerSmall: string;
|
||||
};
|
26
CyLukTs/lukan/node_modules/listr2/dist/utils/figures.js
generated
vendored
Normal file
26
CyLukTs/lukan/node_modules/listr2/dist/utils/figures.js
generated
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.figures = void 0;
|
||||
const is_unicode_supported_1 = require("./is-unicode-supported");
|
||||
const FIGURES_MAIN = {
|
||||
warning: '⚠',
|
||||
cross: '✖',
|
||||
arrowDown: '↓',
|
||||
tick: '✔',
|
||||
arrowRight: '→',
|
||||
pointer: '❯',
|
||||
checkboxOn: '☒',
|
||||
arrowLeft: '←',
|
||||
squareSmallFilled: '◼',
|
||||
pointerSmall: '›'
|
||||
};
|
||||
const FIGURES_FALLBACK = {
|
||||
...FIGURES_MAIN,
|
||||
warning: '‼',
|
||||
cross: '×',
|
||||
tick: '√',
|
||||
pointer: '>',
|
||||
checkboxOn: '[×]',
|
||||
squareSmallFilled: '■'
|
||||
};
|
||||
exports.figures = (0, is_unicode_supported_1.isUnicodeSupported)() ? FIGURES_MAIN : FIGURES_FALLBACK;
|
4
CyLukTs/lukan/node_modules/listr2/dist/utils/general.d.ts
generated
vendored
Normal file
4
CyLukTs/lukan/node_modules/listr2/dist/utils/general.d.ts
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
/**
|
||||
* Deep clones a object in the most easiest manner.
|
||||
*/
|
||||
export declare function cloneObject<T extends Record<PropertyKey, any>>(obj: T): T;
|
12
CyLukTs/lukan/node_modules/listr2/dist/utils/general.js
generated
vendored
Normal file
12
CyLukTs/lukan/node_modules/listr2/dist/utils/general.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.cloneObject = void 0;
|
||||
const rfdc = require("rfdc");
|
||||
const clone = rfdc({ circles: true });
|
||||
/**
|
||||
* Deep clones a object in the most easiest manner.
|
||||
*/
|
||||
function cloneObject(obj) {
|
||||
return clone(obj);
|
||||
}
|
||||
exports.cloneObject = cloneObject;
|
1
CyLukTs/lukan/node_modules/listr2/dist/utils/indent-string.d.ts
generated
vendored
Normal file
1
CyLukTs/lukan/node_modules/listr2/dist/utils/indent-string.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare function indentString(string: string, count: number): string;
|
7
CyLukTs/lukan/node_modules/listr2/dist/utils/indent-string.js
generated
vendored
Normal file
7
CyLukTs/lukan/node_modules/listr2/dist/utils/indent-string.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.indentString = void 0;
|
||||
function indentString(string, count) {
|
||||
return string.replace(/^(?!\s*$)/gm, ' '.repeat(count));
|
||||
}
|
||||
exports.indentString = indentString;
|
1
CyLukTs/lukan/node_modules/listr2/dist/utils/is-unicode-supported.d.ts
generated
vendored
Normal file
1
CyLukTs/lukan/node_modules/listr2/dist/utils/is-unicode-supported.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare function isUnicodeSupported(): boolean;
|
11
CyLukTs/lukan/node_modules/listr2/dist/utils/is-unicode-supported.js
generated
vendored
Normal file
11
CyLukTs/lukan/node_modules/listr2/dist/utils/is-unicode-supported.js
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.isUnicodeSupported = void 0;
|
||||
function isUnicodeSupported() {
|
||||
if (process.platform !== 'win32') {
|
||||
return true;
|
||||
}
|
||||
/* istanbul ignore next */
|
||||
return (Boolean(process.env.CI) || Boolean(process.env.WT_SESSION) || process.env.TERM_PROGRAM === 'vscode' || process.env.TERM === 'xterm-256color' || process.env.TERM === 'alacritty');
|
||||
}
|
||||
exports.isUnicodeSupported = isUnicodeSupported;
|
12
CyLukTs/lukan/node_modules/listr2/dist/utils/logger.constants.d.ts
generated
vendored
Normal file
12
CyLukTs/lukan/node_modules/listr2/dist/utils/logger.constants.d.ts
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
/** Default loglevels for the logger */
|
||||
export declare enum LogLevels {
|
||||
SILENT = "SILENT",
|
||||
FAILED = "FAILED",
|
||||
SKIPPED = "SKIPPED",
|
||||
SUCCESS = "SUCCESS",
|
||||
DATA = "DATA",
|
||||
STARTED = "STARTED",
|
||||
TITLE = "TITLE",
|
||||
RETRY = "RETRY",
|
||||
ROLLBACK = "ROLLBACK"
|
||||
}
|
16
CyLukTs/lukan/node_modules/listr2/dist/utils/logger.constants.js
generated
vendored
Normal file
16
CyLukTs/lukan/node_modules/listr2/dist/utils/logger.constants.js
generated
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.LogLevels = void 0;
|
||||
/** Default loglevels for the logger */
|
||||
var LogLevels;
|
||||
(function (LogLevels) {
|
||||
LogLevels["SILENT"] = "SILENT";
|
||||
LogLevels["FAILED"] = "FAILED";
|
||||
LogLevels["SKIPPED"] = "SKIPPED";
|
||||
LogLevels["SUCCESS"] = "SUCCESS";
|
||||
LogLevels["DATA"] = "DATA";
|
||||
LogLevels["STARTED"] = "STARTED";
|
||||
LogLevels["TITLE"] = "TITLE";
|
||||
LogLevels["RETRY"] = "RETRY";
|
||||
LogLevels["ROLLBACK"] = "ROLLBACK";
|
||||
})(LogLevels = exports.LogLevels || (exports.LogLevels = {}));
|
23
CyLukTs/lukan/node_modules/listr2/dist/utils/logger.d.ts
generated
vendored
Normal file
23
CyLukTs/lukan/node_modules/listr2/dist/utils/logger.d.ts
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
import { LogLevels } from './logger.constants';
|
||||
import { LoggerOptions } from './logger.interface';
|
||||
/**
|
||||
* A internal logger for using in the verbose renderer mostly.
|
||||
*/
|
||||
export declare class Logger {
|
||||
private options?;
|
||||
constructor(options?: LoggerOptions);
|
||||
fail(message: string): void;
|
||||
skip(message: string): void;
|
||||
success(message: string): void;
|
||||
data(message: string): void;
|
||||
start(message: string): void;
|
||||
title(message: string): void;
|
||||
retry(message: string): void;
|
||||
rollback(message: string): void;
|
||||
protected parseMessage(level: LogLevels, message: string): string;
|
||||
protected logColoring({ level, message }: {
|
||||
level: LogLevels;
|
||||
message: string;
|
||||
}): string;
|
||||
private wrapInBrackets;
|
||||
}
|
6
CyLukTs/lukan/node_modules/listr2/dist/utils/logger.interface.d.ts
generated
vendored
Normal file
6
CyLukTs/lukan/node_modules/listr2/dist/utils/logger.interface.d.ts
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Options for the logger
|
||||
*/
|
||||
export interface LoggerOptions {
|
||||
useIcons: boolean;
|
||||
}
|
2
CyLukTs/lukan/node_modules/listr2/dist/utils/logger.interface.js
generated
vendored
Normal file
2
CyLukTs/lukan/node_modules/listr2/dist/utils/logger.interface.js
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
159
CyLukTs/lukan/node_modules/listr2/dist/utils/logger.js
generated
vendored
Normal file
159
CyLukTs/lukan/node_modules/listr2/dist/utils/logger.js
generated
vendored
Normal file
@ -0,0 +1,159 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Logger = void 0;
|
||||
/* eslint-disable no-console */
|
||||
const figures_1 = require("./figures");
|
||||
const logger_constants_1 = require("./logger.constants");
|
||||
const colorette_1 = require("./colorette");
|
||||
/**
|
||||
* A internal logger for using in the verbose renderer mostly.
|
||||
*/
|
||||
class Logger {
|
||||
constructor(options) {
|
||||
this.options = options;
|
||||
}
|
||||
fail(message) {
|
||||
message = this.parseMessage(logger_constants_1.LogLevels.FAILED, message);
|
||||
console.error(message);
|
||||
}
|
||||
skip(message) {
|
||||
message = this.parseMessage(logger_constants_1.LogLevels.SKIPPED, message);
|
||||
console.info(message);
|
||||
}
|
||||
success(message) {
|
||||
message = this.parseMessage(logger_constants_1.LogLevels.SUCCESS, message);
|
||||
console.log(message);
|
||||
}
|
||||
data(message) {
|
||||
message = this.parseMessage(logger_constants_1.LogLevels.DATA, message);
|
||||
console.info(message);
|
||||
}
|
||||
start(message) {
|
||||
message = this.parseMessage(logger_constants_1.LogLevels.STARTED, message);
|
||||
console.log(message);
|
||||
}
|
||||
title(message) {
|
||||
message = this.parseMessage(logger_constants_1.LogLevels.TITLE, message);
|
||||
console.info(message);
|
||||
}
|
||||
retry(message) {
|
||||
message = this.parseMessage(logger_constants_1.LogLevels.RETRY, message);
|
||||
console.warn(message);
|
||||
}
|
||||
rollback(message) {
|
||||
message = this.parseMessage(logger_constants_1.LogLevels.ROLLBACK, message);
|
||||
console.warn(message);
|
||||
}
|
||||
parseMessage(level, message) {
|
||||
// parse multi line messages
|
||||
let multiLineMessage;
|
||||
try {
|
||||
multiLineMessage = message.split('\n');
|
||||
}
|
||||
catch /* istanbul ignore next */ {
|
||||
multiLineMessage = [message];
|
||||
}
|
||||
multiLineMessage = multiLineMessage.map((msg) => {
|
||||
// format messages
|
||||
return this.logColoring({
|
||||
level,
|
||||
message: msg
|
||||
});
|
||||
});
|
||||
// join back multi line messages
|
||||
message = multiLineMessage.join('\n');
|
||||
return message;
|
||||
}
|
||||
logColoring({ level, message }) {
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h;
|
||||
let icon;
|
||||
// do the coloring
|
||||
let coloring = (input) => {
|
||||
return input;
|
||||
};
|
||||
switch (level) {
|
||||
case logger_constants_1.LogLevels.FAILED:
|
||||
/* istanbul ignore if */
|
||||
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.useIcons) {
|
||||
coloring = colorette_1.default.red;
|
||||
icon = figures_1.figures.cross;
|
||||
}
|
||||
else {
|
||||
icon = this.wrapInBrackets(level);
|
||||
}
|
||||
break;
|
||||
case logger_constants_1.LogLevels.SKIPPED:
|
||||
/* istanbul ignore if */
|
||||
if ((_b = this.options) === null || _b === void 0 ? void 0 : _b.useIcons) {
|
||||
coloring = colorette_1.default.yellow;
|
||||
icon = figures_1.figures.arrowDown;
|
||||
}
|
||||
else {
|
||||
icon = this.wrapInBrackets(level);
|
||||
}
|
||||
break;
|
||||
case logger_constants_1.LogLevels.SUCCESS:
|
||||
/* istanbul ignore if */
|
||||
if ((_c = this.options) === null || _c === void 0 ? void 0 : _c.useIcons) {
|
||||
coloring = colorette_1.default.green;
|
||||
icon = figures_1.figures.tick;
|
||||
}
|
||||
else {
|
||||
icon = this.wrapInBrackets(level);
|
||||
}
|
||||
break;
|
||||
case logger_constants_1.LogLevels.DATA:
|
||||
/* istanbul ignore if */
|
||||
if ((_d = this.options) === null || _d === void 0 ? void 0 : _d.useIcons) {
|
||||
icon = figures_1.figures.arrowRight;
|
||||
}
|
||||
else {
|
||||
icon = this.wrapInBrackets(level);
|
||||
}
|
||||
break;
|
||||
case logger_constants_1.LogLevels.STARTED:
|
||||
/* istanbul ignore if */
|
||||
if ((_e = this.options) === null || _e === void 0 ? void 0 : _e.useIcons) {
|
||||
icon = figures_1.figures.pointer;
|
||||
}
|
||||
else {
|
||||
icon = this.wrapInBrackets(level);
|
||||
}
|
||||
break;
|
||||
case logger_constants_1.LogLevels.TITLE:
|
||||
/* istanbul ignore if */
|
||||
if ((_f = this.options) === null || _f === void 0 ? void 0 : _f.useIcons) {
|
||||
icon = figures_1.figures.checkboxOn;
|
||||
}
|
||||
else {
|
||||
icon = this.wrapInBrackets(level);
|
||||
}
|
||||
break;
|
||||
case logger_constants_1.LogLevels.RETRY:
|
||||
/* istanbul ignore if */
|
||||
if ((_g = this.options) === null || _g === void 0 ? void 0 : _g.useIcons) {
|
||||
coloring = colorette_1.default.yellow;
|
||||
icon = figures_1.figures.pointer;
|
||||
}
|
||||
else {
|
||||
icon = this.wrapInBrackets(level);
|
||||
}
|
||||
break;
|
||||
case logger_constants_1.LogLevels.ROLLBACK:
|
||||
/* istanbul ignore if */
|
||||
if ((_h = this.options) === null || _h === void 0 ? void 0 : _h.useIcons) {
|
||||
coloring = colorette_1.default.red;
|
||||
icon = figures_1.figures.arrowLeft;
|
||||
}
|
||||
else {
|
||||
icon = this.wrapInBrackets(level);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return coloring(`${icon} ${message}`);
|
||||
}
|
||||
wrapInBrackets(level) {
|
||||
return `[${level}]`;
|
||||
}
|
||||
}
|
||||
exports.Logger = Logger;
|
1
CyLukTs/lukan/node_modules/listr2/dist/utils/parse-time.d.ts
generated
vendored
Normal file
1
CyLukTs/lukan/node_modules/listr2/dist/utils/parse-time.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare function parseTaskTime(duration: number): string;
|
19
CyLukTs/lukan/node_modules/listr2/dist/utils/parse-time.js
generated
vendored
Normal file
19
CyLukTs/lukan/node_modules/listr2/dist/utils/parse-time.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.parseTaskTime = void 0;
|
||||
function parseTaskTime(duration) {
|
||||
const seconds = Math.floor(duration / 1000);
|
||||
const minutes = Math.floor(seconds / 60);
|
||||
let parsedTime;
|
||||
if (seconds === 0 && minutes === 0) {
|
||||
parsedTime = `0.${Math.floor(duration / 100)}s`;
|
||||
}
|
||||
if (seconds > 0) {
|
||||
parsedTime = `${seconds % 60}s`;
|
||||
}
|
||||
if (minutes > 0) {
|
||||
parsedTime = `${minutes}m${parsedTime}`;
|
||||
}
|
||||
return parsedTime;
|
||||
}
|
||||
exports.parseTaskTime = parseTaskTime;
|
12
CyLukTs/lukan/node_modules/listr2/dist/utils/prompt.d.ts
generated
vendored
Normal file
12
CyLukTs/lukan/node_modules/listr2/dist/utils/prompt.d.ts
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import { PromptOptions, PromptSettings } from './prompt.interface';
|
||||
import { TaskWrapper } from '../lib/task-wrapper';
|
||||
/**
|
||||
* Create a new prompt with Enquirer externally.
|
||||
* This extends enquirer so you dont have to give a name to single prompts and such so it is also
|
||||
* useful to use externally.
|
||||
* @param this
|
||||
* @param options
|
||||
* @param settings
|
||||
*/
|
||||
export declare function createPrompt(this: any, options: PromptOptions | PromptOptions<true>[], settings?: PromptSettings): Promise<any>;
|
||||
export declare function destroyPrompt(this: TaskWrapper<any, any>, throwError?: boolean): void;
|
129
CyLukTs/lukan/node_modules/listr2/dist/utils/prompt.interface.d.ts
generated
vendored
Normal file
129
CyLukTs/lukan/node_modules/listr2/dist/utils/prompt.interface.d.ts
generated
vendored
Normal file
@ -0,0 +1,129 @@
|
||||
/// <reference types="node" />
|
||||
import * as Enquirer from 'enquirer';
|
||||
import { WriteStream } from 'fs';
|
||||
import { Writable } from 'stream';
|
||||
import { PromptError } from '../interfaces/listr-error.interface';
|
||||
/** Returns all the prompt options depending on the type selected. */
|
||||
export declare type PromptOptions<T extends boolean = false> = Unionize<{
|
||||
[K in PromptTypes]-?: T extends true ? {
|
||||
type: K;
|
||||
} & PromptOptionsType<K> & {
|
||||
name: string | (() => string);
|
||||
} : {
|
||||
type: K;
|
||||
} & PromptOptionsType<K>;
|
||||
}> | ({
|
||||
type: string;
|
||||
} & T extends true ? PromptOptionsType<string> & {
|
||||
name: string | (() => string);
|
||||
} : PromptOptionsType<string>);
|
||||
export declare type Unionize<T extends Record<PropertyKey, unknown>> = {
|
||||
[P in keyof T]: T[P];
|
||||
}[keyof T];
|
||||
interface BasePromptOptions {
|
||||
message: string | (() => string) | (() => Promise<string>);
|
||||
initial?: boolean | number | number[] | string | (() => string) | (() => Promise<string>);
|
||||
required?: boolean;
|
||||
stdin?: NodeJS.ReadStream;
|
||||
stdout?: NodeJS.WriteStream;
|
||||
header?: string;
|
||||
footer?: string;
|
||||
skip?(value: any): boolean | Promise<boolean>;
|
||||
format?(value: any): any | Promise<any>;
|
||||
result?(value: any): any | Promise<any>;
|
||||
validate?(value: any, state: any): boolean | Promise<boolean> | string | Promise<string> | Promise<string | boolean>;
|
||||
onSubmit?(name: any, value: any, prompt: Enquirer.Prompt): boolean | Promise<boolean>;
|
||||
onCancel?(name: any, value: any, prompt: Enquirer.Prompt): boolean | Promise<boolean>;
|
||||
}
|
||||
interface BasePromptOptionsWithName extends BasePromptOptions {
|
||||
name: string | (() => string);
|
||||
}
|
||||
interface ArrayPromptOptions extends BasePromptOptions {
|
||||
choices: string[] | BasePromptOptionsWithName[];
|
||||
maxChoices?: number;
|
||||
multiple?: boolean;
|
||||
initial?: number | number[];
|
||||
delay?: number;
|
||||
separator?: boolean;
|
||||
sort?: boolean;
|
||||
linebreak?: boolean;
|
||||
edgeLength?: number;
|
||||
align?: 'left' | 'right';
|
||||
scroll?: boolean;
|
||||
}
|
||||
interface BooleanPromptOptions extends BasePromptOptions {
|
||||
initial?: boolean | (() => string) | (() => Promise<string>);
|
||||
}
|
||||
interface StringPromptOptions extends BasePromptOptions {
|
||||
initial?: string;
|
||||
multiline?: boolean;
|
||||
}
|
||||
interface ScalePromptOptions extends ArrayPromptOptions {
|
||||
scale: StringPromptOptions[];
|
||||
margin?: [number, number, number, number];
|
||||
}
|
||||
interface NumberPromptOptions extends BasePromptOptions {
|
||||
min?: number;
|
||||
max?: number;
|
||||
delay?: number;
|
||||
float?: boolean;
|
||||
round?: boolean;
|
||||
major?: number;
|
||||
minor?: number;
|
||||
initial?: number;
|
||||
}
|
||||
interface SnippetPromptOptions extends BasePromptOptions {
|
||||
newline?: string;
|
||||
fields: Partial<BasePromptOptionsWithName>[];
|
||||
template: string;
|
||||
}
|
||||
interface SortPromptOptions extends BasePromptOptions {
|
||||
hint?: string;
|
||||
drag?: boolean;
|
||||
numbered?: boolean;
|
||||
}
|
||||
interface SurveyPromptOptions extends ArrayPromptOptions {
|
||||
scale: BasePromptOptionsWithName[];
|
||||
margin: [number, number, number, number];
|
||||
}
|
||||
interface QuizPromptOptions extends ArrayPromptOptions {
|
||||
correctChoice: number;
|
||||
}
|
||||
interface TogglePromptOptions extends BasePromptOptions {
|
||||
enabled?: string;
|
||||
disabled?: string;
|
||||
}
|
||||
export declare type PromptTypes = 'AutoComplete' | 'BasicAuth' | 'Confirm' | 'Editable' | 'Form' | 'Input' | 'Invisible' | 'List' | 'MultiSelect' | 'Numeral' | 'Password' | 'Quiz' | 'Scale' | 'Select' | 'Snippet' | 'Sort' | 'Survey' | 'Text' | 'Toggle';
|
||||
export declare type PromptOptionsType<T> = T extends keyof PromptOptionsMap ? PromptOptionsMap[T] : T extends string ? BasePromptOptions & Record<PropertyKey, unknown> : any;
|
||||
export declare class PromptOptionsMap implements Record<PromptTypes, Record<PropertyKey, any>> {
|
||||
AutoComplete: ArrayPromptOptions;
|
||||
BasicAuth: StringPromptOptions;
|
||||
Confirm: BooleanPromptOptions;
|
||||
Editable: ArrayPromptOptions;
|
||||
Form: ArrayPromptOptions;
|
||||
Input: StringPromptOptions;
|
||||
Invisible: StringPromptOptions;
|
||||
List: ArrayPromptOptions;
|
||||
MultiSelect: ArrayPromptOptions;
|
||||
Numeral: NumberPromptOptions;
|
||||
Password: StringPromptOptions;
|
||||
Quiz: QuizPromptOptions;
|
||||
Scale: ScalePromptOptions;
|
||||
Select: ArrayPromptOptions;
|
||||
Snippet: SnippetPromptOptions;
|
||||
Sort: SortPromptOptions;
|
||||
Survey: SurveyPromptOptions;
|
||||
Text: StringPromptOptions;
|
||||
Toggle: TogglePromptOptions;
|
||||
}
|
||||
export interface PromptSettings {
|
||||
error?: boolean;
|
||||
cancelCallback?: (settings?: PromptSettings) => string | Error | PromptError | void;
|
||||
stdout?: WriteStream | Writable;
|
||||
enquirer?: Enquirer;
|
||||
}
|
||||
export interface PromptInstance extends Omit<BasePromptOptions, 'onCancel' | 'onSubmit'> {
|
||||
submit(): void;
|
||||
cancel(err?: string): void;
|
||||
}
|
||||
export {};
|
2
CyLukTs/lukan/node_modules/listr2/dist/utils/prompt.interface.js
generated
vendored
Normal file
2
CyLukTs/lukan/node_modules/listr2/dist/utils/prompt.interface.js
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
110
CyLukTs/lukan/node_modules/listr2/dist/utils/prompt.js
generated
vendored
Normal file
110
CyLukTs/lukan/node_modules/listr2/dist/utils/prompt.js
generated
vendored
Normal file
@ -0,0 +1,110 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.destroyPrompt = exports.createPrompt = void 0;
|
||||
const event_constants_1 = require("../constants/event.constants");
|
||||
const state_constants_1 = require("../constants/state.constants");
|
||||
const listr_error_interface_1 = require("../interfaces/listr-error.interface");
|
||||
const task_wrapper_1 = require("../lib/task-wrapper");
|
||||
/**
|
||||
* Create a new prompt with Enquirer externally.
|
||||
* This extends enquirer so you dont have to give a name to single prompts and such so it is also
|
||||
* useful to use externally.
|
||||
* @param this
|
||||
* @param options
|
||||
* @param settings
|
||||
*/
|
||||
async function createPrompt(options, settings) {
|
||||
// override cancel callback
|
||||
let cancelCallback;
|
||||
/* istanbul ignore if */
|
||||
if (settings === null || settings === void 0 ? void 0 : settings.cancelCallback) {
|
||||
cancelCallback = settings.cancelCallback;
|
||||
} /* istanbul ignore next */
|
||||
else {
|
||||
cancelCallback = defaultCancelCallback;
|
||||
}
|
||||
// assign default if there is single prompt
|
||||
if (!Array.isArray(options)) {
|
||||
options = [{ ...options, name: 'default' }];
|
||||
} /* istanbul ignore next */
|
||||
else if (options.length === 1) {
|
||||
options = options.reduce((o, option) => {
|
||||
return [...o, Object.assign(option, { name: 'default' })];
|
||||
}, []);
|
||||
}
|
||||
// assign default enquirer options
|
||||
options = options.reduce((o, option) => {
|
||||
var _a;
|
||||
return [
|
||||
...o,
|
||||
Object.assign(option, {
|
||||
// this is for outside calls, if it is not called from taskwrapper with bind
|
||||
stdout: this instanceof task_wrapper_1.TaskWrapper ? (_a = settings === null || settings === void 0 ? void 0 : settings.stdout) !== null && _a !== void 0 ? _a : this.stdout() : process.stdout,
|
||||
onCancel: cancelCallback.bind(this, settings)
|
||||
})
|
||||
];
|
||||
}, []);
|
||||
let enquirer;
|
||||
if (settings === null || settings === void 0 ? void 0 : settings.enquirer) {
|
||||
// injected enquirer
|
||||
enquirer = settings.enquirer;
|
||||
}
|
||||
else {
|
||||
try {
|
||||
enquirer = new (await Promise.resolve().then(() => require('enquirer')))();
|
||||
} /* istanbul ignore next */
|
||||
catch (e) {
|
||||
this.task.prompt = new listr_error_interface_1.PromptError('Enquirer is a peer dependency that must be installed separately.');
|
||||
throw new Error(e);
|
||||
}
|
||||
}
|
||||
// i use this externally as well, this is a bandaid
|
||||
if (this instanceof task_wrapper_1.TaskWrapper) {
|
||||
// Capture the prompt instance so we can use it later
|
||||
enquirer.on('prompt', (prompt) => this.task.prompt = prompt);
|
||||
// Clear the prompt instance once it's submitted
|
||||
// Can't use on cancel, since that might hold a PromptError object
|
||||
enquirer.on('submit', () => this.task.prompt = undefined);
|
||||
this.task.subscribe((event) => {
|
||||
if (event.type === event_constants_1.ListrEventType.STATE && event.data === state_constants_1.ListrTaskState.SKIPPED) {
|
||||
if (this.task.prompt && !(this.task.prompt instanceof listr_error_interface_1.PromptError)) {
|
||||
this.task.prompt.submit();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
const response = (await enquirer.prompt(options));
|
||||
// return default name if it is single prompt
|
||||
if (options.length === 1) {
|
||||
return response.default;
|
||||
}
|
||||
else {
|
||||
return response;
|
||||
}
|
||||
}
|
||||
exports.createPrompt = createPrompt;
|
||||
function destroyPrompt(throwError = false) {
|
||||
if (!this.task.prompt || this.task.prompt instanceof listr_error_interface_1.PromptError) {
|
||||
// If there's no prompt, can't cancel
|
||||
return;
|
||||
}
|
||||
if (throwError) {
|
||||
this.task.prompt.cancel();
|
||||
}
|
||||
else {
|
||||
this.task.prompt.submit();
|
||||
}
|
||||
}
|
||||
exports.destroyPrompt = destroyPrompt;
|
||||
function defaultCancelCallback(settings) {
|
||||
const errorMsg = 'Cancelled prompt.';
|
||||
if (this instanceof task_wrapper_1.TaskWrapper) {
|
||||
this.task.prompt = new listr_error_interface_1.PromptError(errorMsg);
|
||||
} /* istanbul ignore next */
|
||||
else if ((settings === null || settings === void 0 ? void 0 : settings.error) !== false) {
|
||||
throw new Error(errorMsg);
|
||||
} /* istanbul ignore next */
|
||||
else {
|
||||
return errorMsg;
|
||||
}
|
||||
}
|
3
CyLukTs/lukan/node_modules/listr2/dist/utils/renderer.d.ts
generated
vendored
Normal file
3
CyLukTs/lukan/node_modules/listr2/dist/utils/renderer.d.ts
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import { ListrOptions } from '../interfaces/listr.interface';
|
||||
import { SupportedRenderer, ListrRendererValue } from '../interfaces/renderer.interface';
|
||||
export declare function getRenderer(renderer: ListrRendererValue, fallbackRenderer?: ListrRendererValue, fallbackCondition?: ListrOptions['rendererFallback'], silentCondition?: ListrOptions['rendererSilent']): SupportedRenderer;
|
40
CyLukTs/lukan/node_modules/listr2/dist/utils/renderer.js
generated
vendored
Normal file
40
CyLukTs/lukan/node_modules/listr2/dist/utils/renderer.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getRenderer = void 0;
|
||||
const default_renderer_1 = require("../renderer/default.renderer");
|
||||
const silent_renderer_1 = require("../renderer/silent.renderer");
|
||||
const simple_renderer_1 = require("../renderer/simple.renderer");
|
||||
const verbose_renderer_1 = require("../renderer/verbose.renderer");
|
||||
const assert_1 = require("./assert");
|
||||
const renderers = {
|
||||
default: default_renderer_1.DefaultRenderer,
|
||||
simple: simple_renderer_1.SimpleRenderer,
|
||||
verbose: verbose_renderer_1.VerboseRenderer,
|
||||
silent: silent_renderer_1.SilentRenderer
|
||||
};
|
||||
function isRendererSupported(renderer) {
|
||||
return process.stdout.isTTY === true || renderer.nonTTY === true;
|
||||
}
|
||||
function getRendererClass(renderer) {
|
||||
if (typeof renderer === 'string') {
|
||||
return renderers[renderer] || renderers.default;
|
||||
}
|
||||
return typeof renderer === 'function' ? renderer : renderers.default;
|
||||
}
|
||||
function getRenderer(renderer, fallbackRenderer, fallbackCondition, silentCondition) {
|
||||
let returnValue;
|
||||
let ret = getRendererClass(renderer);
|
||||
returnValue = { renderer: ret, nonTTY: false };
|
||||
const evaluateSilent = (0, assert_1.assertFunctionOrSelf)(silentCondition);
|
||||
const evaluateFallback = (0, assert_1.assertFunctionOrSelf)(fallbackCondition);
|
||||
if (evaluateSilent) {
|
||||
ret = getRendererClass('silent');
|
||||
returnValue = { renderer: ret, nonTTY: true };
|
||||
}
|
||||
else if (!isRendererSupported(ret) || evaluateFallback) {
|
||||
ret = getRendererClass(fallbackRenderer);
|
||||
returnValue = { renderer: ret, nonTTY: true };
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
exports.getRenderer = getRenderer;
|
2
CyLukTs/lukan/node_modules/listr2/dist/utils/uuid.d.ts
generated
vendored
Normal file
2
CyLukTs/lukan/node_modules/listr2/dist/utils/uuid.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/** Generate a basic uuid with no requirement of being unbelievable unique. */
|
||||
export declare function generateUUID(): string;
|
12
CyLukTs/lukan/node_modules/listr2/dist/utils/uuid.js
generated
vendored
Normal file
12
CyLukTs/lukan/node_modules/listr2/dist/utils/uuid.js
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.generateUUID = void 0;
|
||||
/** Generate a basic uuid with no requirement of being unbelievable unique. */
|
||||
function generateUUID() {
|
||||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
||||
const r = Math.random() * 16 || 0;
|
||||
const v = c === 'x' ? r : r && 0x3 || 0x8;
|
||||
return v.toString(16);
|
||||
});
|
||||
}
|
||||
exports.generateUUID = generateUUID;
|
117
CyLukTs/lukan/node_modules/listr2/package.json
generated
vendored
Normal file
117
CyLukTs/lukan/node_modules/listr2/package.json
generated
vendored
Normal file
@ -0,0 +1,117 @@
|
||||
{
|
||||
"name": "listr2",
|
||||
"version": "3.14.0",
|
||||
"description": "Terminal task list reborn! Create beautiful CLI interfaces via easy and logical to implement task lists that feel alive and interactive.",
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/cenk1cenk2/listr2",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"author": {
|
||||
"name": "Cenk Kilic",
|
||||
"email": "cenk@kilic.dev",
|
||||
"url": "https://srcs.kilic.dev"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"prebuild": "rimraf tsconfig*.tsbuildinfo && rimraf dist/",
|
||||
"build": "tsc -P tsconfig.build.json",
|
||||
"postbuild": "tsconfig-replace-paths --project tsconfig.build.json",
|
||||
"dev:build": "yarn prebuild && tsc -p tsconfig.json && yarn postbuild",
|
||||
"dev:start": "yarn dev:build && tsc-watch --noClear --onSuccess \"yarn postbuild\"",
|
||||
"example": "ts-node -r tsconfig-paths/register",
|
||||
"read-snapshot": "./tests/read-terminal-snapshots.sh",
|
||||
"clean": "rimraf node_modules yarn.lock",
|
||||
"lint": "prettier --loglevel warn --write src/ tests/ examples/ && eslint --ext .ts,.js,.tsx,.jsx --fix src/ tests/ examples/",
|
||||
"lint:check": "eslint --ext .ts,.js,.tsx,.jsx src/",
|
||||
"test": "LISTR_DISABLE_COLOR=1 ts-node -P tests/tsconfig.json -r tsconfig-paths/register node_modules/jest/bin/jest.js --config ./tests/jest.config.js",
|
||||
"test:cov": "LISTR_DISABLE_COLOR=1 ts-node -P tests/tsconfig.json -r tsconfig-paths/register node_modules/jest/bin/jest.js --coverage --config ./tests/jest.config.js",
|
||||
"dev:test": "LISTR_DISABLE_COLOR=1 TS_NODE_PROJECT=tests/tsconfig.json node --inspect=0.0.0.0:${DEBUG_PORT:-9229} -r tsconfig-paths/register -r ts-node/register node_modules/jest/bin/jest.js --verbose --watchAll --config ./tests/jest.config.js",
|
||||
"docs": "typedoc --options .typedoc.json --hideInPageTOC --hideBreadcrumbs"
|
||||
},
|
||||
"simple-git-hooks": {
|
||||
"pre-commit": "yarn exec lint-staged",
|
||||
"prepare-commit-msg": "[ -t 1 ] && exec < /dev/tty && git cz --hook || true",
|
||||
"pre-push": "yarn test"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{ts,js,tsx,jsx,spec.ts}": [
|
||||
"prettier --loglevel warn --write",
|
||||
"eslint --fix"
|
||||
],
|
||||
"*.{json,md}": [
|
||||
"prettier --loglevel warn --write"
|
||||
]
|
||||
},
|
||||
"keywords": [
|
||||
"listr",
|
||||
"cli",
|
||||
"task",
|
||||
"list",
|
||||
"tasklist",
|
||||
"terminal",
|
||||
"term",
|
||||
"console",
|
||||
"ascii",
|
||||
"unicode",
|
||||
"loading",
|
||||
"indicator",
|
||||
"progress",
|
||||
"busy",
|
||||
"wait",
|
||||
"idle"
|
||||
],
|
||||
"dependencies": {
|
||||
"cli-truncate": "^2.1.0",
|
||||
"colorette": "^2.0.16",
|
||||
"log-update": "^4.0.0",
|
||||
"p-map": "^4.0.0",
|
||||
"rfdc": "^1.3.0",
|
||||
"rxjs": "^7.5.1",
|
||||
"through": "^2.3.8",
|
||||
"wrap-ansi": "^7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cenk1cenk2/cz-cc": "^1.4.11",
|
||||
"@cenk1cenk2/eslint-config": "^1.0.9",
|
||||
"@types/clone": "^2.1.1",
|
||||
"@types/jest": "^27.4.0",
|
||||
"@types/node": "^17.0.7",
|
||||
"@types/rewire": "^2.5.28",
|
||||
"@types/through": "^0.0.30",
|
||||
"@types/wrap-ansi": "^3.0.0",
|
||||
"delay": "^5.0.0",
|
||||
"enquirer": "^2.3.6",
|
||||
"eslint": "^8.6.0",
|
||||
"jest": "^27.4.5",
|
||||
"jest-mock-process": "^1.4.1",
|
||||
"lint-staged": "^11.2.6",
|
||||
"prettier": "^2.5.1",
|
||||
"rewire": "^6.0.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"simple-git-hooks": "^2.7.0",
|
||||
"ts-jest": "^27.1.2",
|
||||
"ts-node": "^10.4.0",
|
||||
"tsc-watch": "^4.6.0",
|
||||
"tsconfig-paths": "^3.12.0",
|
||||
"tsconfig-replace-paths": "^0.0.11",
|
||||
"tscpaths": "^0.0.9",
|
||||
"typedoc": "^0.22.10",
|
||||
"typedoc-plugin-markdown": "^3.11.8",
|
||||
"typescript": "^4.5.4"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"enquirer": ">= 2.3.0 < 3"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"enquirer": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "./node_modules/@cenk1cenk2/cz-cc"
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user