Compare commits

...

278 Commits

Author SHA1 Message Date
c9e92e9549 update description 2024-05-29 14:14:18 +02:00
0309e037a0 9.0.2 2024-04-24 18:30:06 +02:00
872385dbc4 fix(core): update 2024-04-24 18:30:06 +02:00
922591d45d update tsconfig 2024-04-14 17:51:52 +02:00
a39a2bdfa8 update npmextra.json: githost 2024-04-01 21:36:09 +02:00
93128628cc update npmextra.json: githost 2024-04-01 19:58:46 +02:00
023b3ff377 update npmextra.json: githost 2024-03-30 21:47:45 +01:00
8e3f65061a switch to new org scheme 2023-07-10 10:02:44 +02:00
1f9bfcc856 9.0.1 2023-07-09 17:38:18 +02:00
04686b810f fix(core): update 2023-07-09 17:38:18 +02:00
f9afc486f3 9.0.0 2022-10-26 18:41:30 +02:00
ce6bdb984c BREAKING CHANGE(core): switch to esm 2022-10-26 18:41:30 +02:00
10fa0af94c 8.0.9 2022-10-26 18:41:05 +02:00
0a3f6da174 fix(core): update 2022-10-26 18:41:04 +02:00
9073d9a7f8 8.0.8 2020-06-11 10:38:37 +00:00
890cd463d5 fix(core): update 2020-06-11 10:38:37 +00:00
186766df3d 8.0.7 2020-06-11 10:38:19 +00:00
62ff7ec717 fix(core): update 2020-06-11 10:38:19 +00:00
ca3286625d 8.0.6 2020-06-11 10:35:21 +00:00
ff33c9597a fix(core): update 2020-06-11 10:35:20 +00:00
65604d4ec0 8.0.5 2020-06-05 10:29:06 +00:00
f83c8feb3e fix(core): update 2020-06-05 10:29:06 +00:00
2b7a4ff07a 8.0.4 2020-06-05 09:35:43 +00:00
1c59952bb5 fix(core): update 2020-06-05 09:35:42 +00:00
bb48d3cb04 8.0.3 2020-06-05 02:01:12 +00:00
64a555748e fix(core): update 2020-06-05 02:01:12 +00:00
34fd838e80 8.0.2 2019-06-07 12:05:45 +02:00
b48b2a77b0 fix(tests): let -> const 2019-06-07 12:05:44 +02:00
99c2c2e84f 8.0.1 2019-06-07 12:02:01 +02:00
bf791d732c fix(core): cleaned up dev dependencies 2019-06-07 12:02:01 +02:00
e5e7f00353 8.0.0 2019-06-07 12:00:59 +02:00
78bd0605aa BREAKING CHANGE(ora): remove support for ora which is now handled in smartlog-source-ora 2019-06-07 12:00:58 +02:00
f1e3ca6014 7.0.5 2018-11-10 23:29:36 +01:00
0712d47155 fix(dependencies): remove smartenv 2018-11-10 23:29:35 +01:00
2a9b686e94 7.0.4 2018-11-04 18:23:41 +01:00
a9180878d5 fix(core): update 2018-11-04 18:23:41 +01:00
4a1214a87f 7.0.3 2018-11-04 13:36:50 +01:00
d85878713e fix(package.json): update author 2018-11-04 13:36:49 +01:00
9d65e37a60 7.0.2 2018-11-04 13:26:56 +01:00
5dd07e34ed fix(core): update 2018-11-04 13:26:56 +01:00
ba7727dc55 7.0.1 2018-11-04 13:22:45 +01:00
7c85387c85 fix(core): update 2018-11-04 13:22:45 +01:00
c978ada06c fix(structure): update smartlog compatibility 2018-07-05 23:40:33 +02:00
ca749d45b1 update 2018-07-04 23:11:03 +02:00
89efae2eb7 7.0.0 2018-07-04 22:50:47 +02:00
5da96c42c6 BREAKING CHANGE(package.json): switch scope and name to smartlog-destination-local 2018-07-04 22:50:46 +02:00
127476c86e system change 2018-03-03 13:57:55 +01:00
7c1eb711da 6.1.12 2018-03-01 01:06:20 +01:00
0edaa51679 update to latest standards 2018-03-01 01:06:12 +01:00
db46fca769 6.1.11 2017-08-28 13:14:42 +02:00
824efb1fc8 update ci 2017-08-28 13:14:35 +02:00
9d386f7c45 6.1.10 2017-04-22 13:38:44 +02:00
be3bdde24b fix ci 2017-04-22 13:38:40 +02:00
271fd4817e 6.1.9 2017-04-22 13:30:23 +02:00
5288a1583d fix ci 2017-04-22 13:30:20 +02:00
21979e431d fix docs 2017-04-22 13:26:11 +02:00
fdd3498d78 fix README 2017-04-22 13:25:46 +02:00
f93317bd02 6.1.8 2017-04-22 13:24:16 +02:00
0e0a8dfebd fix README 2017-04-22 13:24:08 +02:00
06c29f97b1 6.1.7 2017-04-22 13:23:05 +02:00
8e3dc5b003 update docs 2017-04-22 13:22:56 +02:00
07d19416fd update readme 2017-04-21 23:59:21 +02:00
2c011ae852 6.1.6 2017-04-21 23:39:28 +02:00
b6c0b17ef8 update README 2017-04-21 23:38:51 +02:00
f72f5a0765 update ci 2017-03-11 17:43:10 +01:00
b6d6766c91 add npmextra.json 2017-03-11 15:47:34 +01:00
7b238535c8 update gitlab ci 2017-03-11 15:11:37 +01:00
0b94ab3a04 6.1.5 2017-03-11 12:31:42 +01:00
224ed76018 6.1.4 2017-03-11 12:30:20 +01:00
382d00cfa6 fix remote logging 2017-03-11 12:30:18 +01:00
f6b9e7a4db 6.1.3 2017-03-10 19:27:25 +01:00
ffe65ff1bc update README 2017-03-10 19:26:45 +01:00
6eb2f8d623 6.1.2 2017-03-10 10:52:38 +01:00
0244885479 update README 2017-03-10 10:52:35 +01:00
615e1fe077 6.1.1 2017-01-22 11:42:07 +01:00
62f2f23522 improve README and test registerRemote 2017-01-22 11:42:04 +01:00
56a7ab7858 6.1.0 2017-01-21 23:15:37 +01:00
a343f715aa remove loggly 2017-01-21 23:15:34 +01:00
7e4012ccf7 6.0.8 2017-01-21 23:13:02 +01:00
a42dd0ed45 update to latest standards 2017-01-21 23:12:39 +01:00
b68eba502f 6.0.7 2017-01-21 21:11:44 +01:00
9f20a533be switch to blue for info 2017-01-21 21:11:41 +01:00
2d472b3097 6.0.6 2017-01-21 20:39:36 +01:00
6c93946215 add better colors 2017-01-21 20:39:33 +01:00
dcc0eef2fd 6.0.5 2017-01-21 19:52:34 +01:00
f0a3aef9cc update colors 2017-01-21 19:52:31 +01:00
5f1ff6e3ff 6.0.4 2017-01-21 19:33:17 +01:00
afaeaee114 fix 2017-01-21 19:33:14 +01:00
96ea0eb7b2 6.0.3 2017-01-21 19:29:24 +01:00
4487fa6937 improve Ora 2017-01-21 19:29:20 +01:00
e705141f6d improve figlet coloring 2017-01-21 19:04:40 +01:00
cbfc000f7c 6.0.2 2017-01-21 18:40:42 +01:00
bd0790fec6 switch to beautycolor 2017-01-21 18:40:40 +01:00
643a302aeb clean 2017-01-21 01:07:44 +01:00
70bc355cc1 6.0.1 2017-01-21 01:06:05 +01:00
79361eefbc lighten up beautylog 2017-01-21 01:05:28 +01:00
2c8f5d2c49 cleanup (+1 squashed commit)
Squashed commits:
[192abb9] cleanup
2016-12-31 20:02:04 +01:00
b0406a941d 6.0.0 2016-10-16 02:26:47 +02:00
80799156ab update to version 2 2016-10-16 02:26:43 +02:00
8aa178e576 5.0.23 2016-09-02 17:26:59 +02:00
2079a6df88 add coverage 2016-09-02 17:26:55 +02:00
03d1a62f8d 5.0.22 2016-09-02 12:57:38 +02:00
f1aab3c3ea fix gitlab yml 2016-09-02 12:57:33 +02:00
1e32e9816a 5.0.21 2016-09-02 12:52:39 +02:00
44e6401472 fix README 2016-09-02 12:52:35 +02:00
efeb2507bc integrate npmpage 2016-09-02 12:50:07 +02:00
92c4ca336d 5.0.20 2016-08-03 12:04:00 +02:00
59cd6da99b update type versions 2016-08-03 12:03:55 +02:00
b02e6ff951 5.0.19 2016-08-03 11:44:26 +02:00
1d92e1a4bf fix dependencies 2016-08-03 11:44:18 +02:00
92bf5cb6c0 5.0.18 2016-07-24 01:47:41 +02:00
f19df7db78 imrpove some variable naming 2016-07-24 01:47:35 +02:00
d3d722b352 5.0.17 2016-07-24 01:30:35 +02:00
ba6dbc3915 fix README 2016-07-24 01:30:30 +02:00
35fd765546 5.0.16 2016-07-24 01:21:38 +02:00
234ce34f4b fix 2016-07-24 01:21:35 +02:00
69eb73f8c1 5.0.15 2016-07-24 01:18:01 +02:00
a0ba51718c now has working logging 2016-07-24 01:17:38 +02:00
818df0c367 fix README 2016-07-23 20:01:30 +02:00
3ecea716b9 remove unnecessary dev dependencies 2016-07-23 19:55:29 +02:00
80cf15c234 Start integration of loggly 2016-07-23 19:47:23 +02:00
67d6dc2601 remove appveyor 2016-07-14 23:06:50 +02:00
5ef0d6a405 5.0.14 2016-07-14 23:01:22 +02:00
f673f7ab26 update @types dependency version to better work with flat npm3 structure 2016-07-14 23:01:08 +02:00
9b5eed2f76 clean README 2016-07-06 03:29:51 +02:00
772ec5e941 5.0.13 2016-07-01 06:17:17 +02:00
087ee94af8 update 2016-07-01 06:17:12 +02:00
edc3a09bf0 5.0.12 2016-06-16 23:57:54 +02:00
6907a72f0b add .logReduced, closes #2 2016-06-16 23:57:49 +02:00
da44542100 5.0.11 2016-06-16 02:17:32 +02:00
93b6ab03cd implements .newLine(), closes #1 2016-06-16 02:17:28 +02:00
5b1e406aeb 5.0.10 2016-06-12 01:16:11 +02:00
50ea38db85 fix gitlab yml 2016-06-12 01:16:07 +02:00
a91a9d3d0a 5.0.9 2016-06-12 01:13:32 +02:00
2caaf95fe9 update dependencies, now using npmts-g 2016-06-12 01:13:16 +02:00
9c5d7b382c 5.0.8 2016-05-30 06:42:47 +02:00
40b77759f5 update package.json links 2016-05-30 06:42:42 +02:00
4251b4c3b4 5.0.7 2016-05-30 06:40:45 +02:00
7efb424550 update deps and badges 2016-05-30 06:40:39 +02:00
667e3c39d5 update badges 2016-05-30 06:40:03 +02:00
81e42a9b13 add .gitlab-ci.yml 2016-05-30 06:14:21 +02:00
Philipp Kunz
fb20d0ff90 compiled tests 2016-05-23 16:22:20 +02:00
Philipp Kunz
d11fe70827 add typings-test 2016-05-23 14:30:58 +02:00
132c0bc8b7 Update README.md 2016-05-23 10:21:10 +02:00
f17637b69c 5.0.6 2016-05-23 09:29:26 +02:00
ee4ad0bde2 5.0.5 2016-05-23 09:29:15 +02:00
3db36e95ea update README 2016-05-23 09:27:49 +02:00
1a7f4ab04c now using typings-global 2016-05-23 09:10:30 +02:00
956278a3ce 5.0.4 2016-05-19 19:45:39 +02:00
86d8816ebc fix function call issue 2016-05-19 19:45:31 +02:00
38684f2a88 update .travis.yml 2016-05-19 19:30:38 +02:00
2d69cbe4b5 5.0.3 2016-05-19 19:28:03 +02:00
939121c63b Merge branch 'master' of github.com:pushrocks/beautylog 2016-05-19 19:27:41 +02:00
bdd3723af8 5.0.2 2016-05-19 19:27:17 +02:00
e7cc9b0e00 now injects console.log 2016-05-19 19:27:09 +02:00
ebe1499daa Update README.md 2016-05-19 06:53:51 +02:00
d8d9fef7e8 Update README.md 2016-05-19 06:33:33 +02:00
05b5e8ddb1 Create appveyor.yml 2016-05-19 06:31:34 +02:00
4eb1bf4fe1 5.0.1 2016-05-17 00:25:24 +02:00
b319ec41f0 normal log function now respects an active Ora. 2016-05-17 00:24:56 +02:00
cfd116421c 5.0.0 2016-05-14 23:58:50 +02:00
de2e538e11 updated to export classes directly 2016-05-14 23:58:40 +02:00
57dd2586fd 4.2.2 2016-05-14 17:51:41 +02:00
542db5a2cf fixed small issue with optional params 2016-05-14 17:51:35 +02:00
5f24ae865a Ora.start() now accepts same params as constructor; 2016-05-14 17:48:02 +02:00
13622b4ed7 4.2.1 2016-05-14 16:37:57 +02:00
68567c5e41 modified test a bit 2016-05-14 16:37:47 +02:00
a790c3fc8e beautylog.ora now supports intermediate log messages. 2016-05-14 16:26:38 +02:00
f5b51e2747 4.2.0 2016-05-14 01:18:50 +02:00
fc1b61e7de added ora 2016-05-14 01:18:44 +02:00
LosslessBot
234c393749 4.1.6 2016-05-03 23:10:03 +02:00
LosslessBot
6875881cf3 updated README 2016-05-03 23:09:57 +02:00
LosslessBot
043639ebff 4.1.5 2016-05-03 22:42:32 +02:00
LosslessBot
a70a96edfd update exports of main module to work better with ES6 syntax 2016-05-03 22:42:28 +02:00
LosslessBot
011de8362b 4.1.4 2016-05-02 02:51:42 +02:00
LosslessBot
d9fc0d333c added typings to package.json 2016-05-02 02:51:37 +02:00
LosslessBot
256caf4e65 4.1.3 2016-05-02 02:23:51 +02:00
LosslessBot
128a81150e now bundles typings 2016-05-02 02:23:40 +02:00
LosslessBot
e80a20be70 update travis.yml 2016-05-02 01:41:21 +02:00
309b951383 4.1.2 2016-04-05 01:02:34 +02:00
ccc9444d90 updated deps 2016-04-05 01:02:34 +02:00
f01ad2724b 4.1.1 2016-04-05 00:53:09 +02:00
a11a1a11ba update deps 2016-04-05 00:53:06 +02:00
61a7fb7541 remove false dependency 2016-04-05 00:52:28 +02:00
f41d6fd45e 4.1.0 2016-04-05 00:09:36 +02:00
6f9fe13d28 update deps 2016-04-05 00:08:59 +02:00
28a2745ca0 4.0.1 2016-04-04 23:33:22 +02:00
409b92ed6a 4.0.0 2016-04-04 23:15:37 +02:00
9ca282c07b remove hlight 2016-04-04 23:15:29 +02:00
978f125d8b 3.1.6 2016-04-04 23:14:35 +02:00
dd4be7ef8b readd hlight for compatibility 2016-04-04 23:14:24 +02:00
dde45628a3 3.1.5 2016-04-04 23:10:44 +02:00
6fbbb074eb update deps 2016-04-04 23:10:19 +02:00
ad75199ffb 3.1.4 2016-04-04 22:52:51 +02:00
ef732bd178 update git ignore 2016-04-04 22:52:05 +02:00
51976b9e2f 3.1.3 2016-04-04 22:37:54 +02:00
c6a6b7aee4 cleanup 2016-04-04 22:37:47 +02:00
584dd97941 remove overboarding code highlight function 2016-04-04 22:36:54 +02:00
fdc4a3bfde cleanup 2016-04-04 22:17:56 +02:00
a28f3ecc1d 3.1.2 2016-02-23 16:34:49 +01:00
75524afafb update deps 2016-02-23 16:34:41 +01:00
3745ac97b5 cleanup 2016-02-23 16:00:40 +01:00
ebc1fd65f1 3.1.1 2016-02-23 16:00:06 +01:00
f80cba0037 fix js module reference 2016-02-23 15:59:57 +01:00
6bc072d4a3 update travis 2016-02-23 15:44:22 +01:00
43799144a4 3.1.0 2016-02-23 15:40:24 +01:00
075c71ebe4 changed to commonjs setup 2016-02-23 15:40:18 +01:00
9d5ed74e6c 3.0.3 2016-02-23 14:36:35 +01:00
249287fc9d update deps 2016-02-23 14:35:28 +01:00
387f7bb608 switch to common js 2016-02-23 14:34:40 +01:00
1577333a76 3.0.2 2016-02-20 10:57:49 +01:00
b75fcde83b update deps 2016-02-20 10:57:45 +01:00
6a9aaebcf6 3.0.1 2016-02-20 10:52:49 +01:00
499d7604fb update deps 2016-02-20 10:52:23 +01:00
24422f2a7e 3.0.0 2016-02-20 10:29:52 +01:00
d0064fadd9 2.1.2 2016-02-20 10:29:41 +01:00
70ca8fa3e9 update smartenv dependency 2016-02-20 10:29:35 +01:00
7ae750c70e 2.1.1 2016-02-11 18:59:13 +01:00
cdbc6a4e7f now has sync and async functions for figlet 2016-02-11 18:59:02 +01:00
1691b89fcf 2.1.0 2016-02-11 04:05:29 +01:00
aa4f3d980a added figlet 2016-02-11 04:04:49 +01:00
5c52e6f9ed imprive .gitignore 2016-02-11 02:26:15 +01:00
5f6c94c167 cleanup 2016-02-11 02:25:52 +01:00
f1e50a0c08 before integrating figlet 2016-02-11 02:25:30 +01:00
155ba55674 2.0.7 2016-02-02 21:38:06 +01:00
165d6c515d update deps 2016-02-02 21:37:53 +01:00
ed1b6a9a65 updated tests 2016-02-02 16:49:16 +01:00
88e91bfc29 update deps 2016-02-02 16:15:09 +01:00
9a6c88c544 2.0.6 2016-02-02 15:02:49 +01:00
423f634622 fix deps 2016-02-02 15:02:41 +01:00
f7bb7184ac 2.0.5 2016-02-02 14:49:25 +01:00
22c486a16b update to hlight 2016-02-02 14:49:08 +01:00
6340dea34a 2.0.4 2016-01-30 06:20:12 +01:00
ea06f32ce0 add code function 2016-01-30 06:19:44 +01:00
1f9a2257fc add .npmignore 2016-01-25 01:03:25 +01:00
bebb694591 update travis to use lossless account 2016-01-25 01:02:29 +01:00
f61bc4cfe5 2.0.3 2016-01-25 01:01:33 +01:00
1ffe180376 move to use npmts 2016-01-25 01:01:07 +01:00
Phil Kunz
14bae9cbfd 2.0.2 2015-12-26 18:48:01 +01:00
Phil Kunz
17313ea79a 2.0.1 2015-12-26 01:52:01 +01:00
Phil Kunz
cce4cd3472 upped version number 2015-12-26 01:51:38 +01:00
Phil Kunz
c256c4b840 added automatic env detection 2015-12-26 01:51:04 +01:00
Phil Kunz
6163e9f57d update travis node version 2015-12-20 23:23:17 +01:00
Phil Kunz
2adf0e2bd3 updated compile process 2015-12-20 23:22:38 +01:00
Phil Kunz
6ae05de2b1 1.0.7 2015-12-20 23:14:41 +01:00
Phil Kunz
9c72b86d29 added custom type to table class 2015-12-20 23:14:22 +01:00
Philipp Kunz
bbe7ac0a28 1.0.6 2015-12-02 16:24:44 +01:00
Philipp Kunz
d79714a2e1 1.0.5 2015-12-02 16:23:45 +01:00
Philipp Kunz
4f0185a1aa small fix for better pipelog support 2015-12-02 16:23:39 +01:00
Philipp Kunz
0aafb76046 cleaned up 2015-11-24 00:19:20 +01:00
Philipp Kunz
5b8fce66fe added bithound 2015-11-23 23:54:14 +01:00
Philipp Kunz
5f26196ef5 1.0.4 2015-11-16 23:44:16 +01:00
Philipp Kunz
63c020b84e updated Readme 2015-11-16 23:43:11 +01:00
Philipp Kunz
ea5c96ec49 updated Readme 2015-11-16 23:41:50 +01:00
Philipp Kunz
60d6cddea7 updated Readme 2015-11-16 23:32:40 +01:00
Philipp Kunz
7a5d1469ba 1.0.3 2015-11-15 06:21:59 +01:00
Philipp Kunz
be71cdb472 closes #3 2015-11-15 06:15:20 +01:00
Philipp Kunz
fd5f02d6c7 starting #3 2015-11-13 22:53:28 +01:00
Philipp Kunz
3e048da0df 1.0.2 2015-11-01 22:07:35 +01:00
Philipp Kunz
d04f5ece8e fix 2015-11-01 22:07:29 +01:00
Philipp Kunz
915b3d5f5e 1.0.1 2015-11-01 22:00:13 +01:00
Philipp Kunz
8e74e71911 version update 2015-11-01 22:00:07 +01:00
Phil Kunz
8035a6b17d 0.0.15 2015-10-12 22:37:18 +02:00
Phil Kunz
9a36c8e08c fix bug 2015-10-12 22:37:12 +02:00
Phil Kunz
52a315c0e0 0.0.14 2015-10-12 20:01:01 +02:00
Phil Kunz
b4e4113550 add beautylog.info and beautylog.dir 2015-10-12 20:00:41 +02:00
Phil Kunz
44415e602b 0.0.13 2015-10-12 13:14:25 +02:00
Phil Kunz
602f68f93a Merge branch 'master' of github.com:pushrocks/beautylog 2015-10-12 13:14:25 +02:00
Phil Kunz
4dbc481ef8 new warn and ok messages 2015-10-12 13:14:16 +02:00
Phil Kunz
b92f92dfbd Merge pull request #1 from pushrocks/greenkeeper-pin
Pinned all dependencies
2015-10-02 23:51:16 +02:00
greenkeeperio-bot
f79c2c329f chore(package): pin dependencies
http://greenkeeper.io/
2015-10-02 23:49:32 +02:00
Phil Kunz
0d3dc7e606 0.0.12 2015-10-02 23:37:59 +02:00
Phil Kunz
de45e44c0d added release script 2015-10-02 23:37:49 +02:00
Phil Kunz
b9247614cb 0.0.11 2015-09-30 17:28:05 +02:00
Phil Kunz
23887bc129 Update README.md 2015-09-30 17:27:01 +02:00
Phil Kunz
a7ae3ad84c 0.0.10 2015-09-30 17:08:10 +02:00
Phil Kunz
a69e5fc653 Update README.md 2015-09-27 17:23:32 +02:00
Phil Kunz
e03afcb843 Update README.md 2015-09-27 17:16:43 +02:00
30 changed files with 5680 additions and 2453 deletions

22
.gitignore vendored
View File

@ -1,2 +1,20 @@
.idea/
node_modules
.nogit/
# artifacts
coverage/
public/
pages/
# installs
node_modules/
# caches
.yarn/
.cache/
.rpt2_cache
# builds
dist/
dist_*/
# custom

128
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,128 @@
# gitzone ci_default
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache:
paths:
- .npmci_cache/
key: '$CI_BUILD_STAGE'
stages:
- security
- test
- release
- metadata
before_script:
- pnpm install -g pnpm
- pnpm install -g @shipzone/npmci
- npmci npm prepare
# ====================
# security stage
# ====================
# ====================
# security stage
# ====================
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --prod
tags:
- lossless
- docker
allow_failure: true
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci command npm config set registry https://registry.npmjs.org
- npmci command pnpm audit --audit-level=high --dev
tags:
- lossless
- docker
allow_failure: true
# ====================
# test stage
# ====================
testStable:
stage: test
script:
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
testBuild:
stage: test
script:
- npmci node install stable
- npmci npm install
- npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
release:
stage: release
script:
- npmci node install stable
- npmci npm publish
only:
- tags
tags:
- lossless
- docker
- notpriv
# ====================
# metadata stage
# ====================
codequality:
stage: metadata
allow_failure: true
only:
- tags
script:
- npmci command npm install -g typescript
- npmci npm prepare
- npmci npm install
tags:
- lossless
- docker
- priv
trigger:
stage: metadata
script:
- npmci trigger
only:
- tags
tags:
- lossless
- docker
- notpriv
pages:
stage: metadata
script:
- npmci node install stable
- npmci npm install
- npmci command npm run buildDocs
tags:
- lossless
- docker
- notpriv
only:
- tags
artifacts:
expire_in: 1 week
paths:
- public
allow_failure: true

11
.npmignore Normal file
View File

@ -0,0 +1,11 @@
node_modules/
coverage/
pages/
public/
ts/
docs/
.nogit/

View File

@ -1,19 +0,0 @@
language: node_js
before_install:
- nvm install stable
- node -v
- npm -v
- npm install -g gulp
- npm install gulp
- npm install gulp-typescript
deploy:
provider: npm
email: npm@smart-coordination.com
api_key:
secure: S47eRu6ZdNqKq+g3/fHHqODr+9agOk+rqaJ7i25Es8lZCFsAP4KpHbqLuKKC/mhCxKZ/ToWWWO8N03DkeOIgolpOzl1phfYECzI/Pkt7g0LLn1RIt+d+4U8XgBdqVkEsWHidKXj31Tgzp0Km1z2pNsJburI72hcdoHryXayGUNbpw8gHAUKiBha7wRz8dqC1msNWCkBxkwPcYZdVlnAIuAhX5OeFKpn0NNKJn8Ip9XizGfo/gulYdRxt2KtOpM22rAvD9RdU5PhWKPlb2+oVYV/K3IZx3KYE8lnLSrrQm9dCLuUCGKNs010HfFX5x9zwZNALzMhzW+KduHIXrghXBuVbTYxbDAE2QC/XoBcrza5p2E8mZyAGsFnWDCQhDHPiQB0rBJQqwITsKcvu73H5axxcD8KsxVX5hUStUEPSLz9tDLdA85/1nXuvzm6X6k2HD4f9jqA8KmOCiWBGkDe4CSMC1Qigt2E6thm1i82rMIkD67AvBP/NsU6xQaZHYm0Ol5Wc0oakYRvLaLZ+6+VaZiFt9tXz4wxTUkHbYI8OwXq5e1sASkWZcpAVCYK4amGBno+Q2M4qRMiofd4ewlF5G3eyzWF1q5YadArds92nGvWdj+tuymfo6zC2hWSKVN3pkshT8bcUyLRsqwQCDXJ5CDVvXiVQE18FpVEbUCyixig=
on:
tags: true
repo: pushrocks/beautylog
notifications:
slack:
secure: VBAcnFNkROLEa0vrp0qu8rBC8OlOvxpnYwqv3NMIbLie3Cq1YS03DwhqX0YV1hEBiGqh5cBe3s3PxtY8LHF5QjB4/82nQJSUHdcUxPTLh9Eq6IZaKCnSEFhMKPbZw0TwULIlbLv1RV/te1+G+fVKguCn4+f5TqTRxntYErVQu/0ovDa9ln3vtlqhDg9lYk3FBFqOszbHL81Xr2KpDj2DN/15nRmxEGGpnhzQV44HZg/W93EaUqTyF+NCtStPCbpOKno0s89rYRXMosuP+1odpNcSouVqWscEZSNCIg1NTTLY0N8T51pX1g8Lw9Qz80OMRnn8D83mVvNNqLJx5vQ8THz96/L77Syih6a5Qr0AyE7hGcbNrfG+3LvomHDARQ9Tv2KqDcrkiTdh7NtXYiQogxdWYx9OzTUOau4z8K5tr9lLlqFa6WYkFFaoc/+49IFAkgoUXg65gTYUMkP76xu/MC0XEOTU2+jvXLyyTpacD7nWRcbrI8XG7oCvT3BUc/boe4DSIqCwgaffqDVxld+dnVju2xKHedRC/OwhKXMnrBqFSlF2OTn67yFjxeq5DKxzyfwBKv9ia9FPqADSPTqaRJuE4eydM6u4cTdU1+8yQJNaPk0NRMmhksH2vscwaAdxX3kyUxi7DrS8qxpg1FZCA34YSmXyk88Ov8ZNPBL82xI=

11
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "npm test",
"name": "Run npm test",
"request": "launch",
"type": "node-terminal"
}
]
}

26
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,26 @@
{
"json.schemas": [
{
"fileMatch": ["/npmextra.json"],
"schema": {
"type": "object",
"properties": {
"npmci": {
"type": "object",
"description": "settings for npmci"
},
"gitzone": {
"type": "object",
"description": "settings for gitzone",
"properties": {
"projectType": {
"type": "string",
"enum": ["website", "element", "service", "npm", "wcc"]
}
}
}
}
}
}
]
}

View File

@ -1,2 +0,0 @@
# beautylog
beautiful logging

74
docs/index.md Normal file
View File

@ -0,0 +1,74 @@
# beautylog
beautiful logging, TypeScript ready
## Availabililty
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/beautylog)
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/beautylog)
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/beautylog)
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/beautylog/)
## Status for master
[![build status](https://GitLab.com/pushrocks/beautylog/badges/master/build.svg)](https://GitLab.com/pushrocks/beautylog/commits/master)
[![coverage report](https://GitLab.com/pushrocks/beautylog/badges/master/coverage.svg)](https://GitLab.com/pushrocks/beautylog/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/beautylog.svg)](https://www.npmjs.com/package/beautylog)
[![Dependency Status](https://david-dm.org/pushrocks/beautylog.svg)](https://david-dm.org/pushrocks/beautylog)
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/beautylog/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/beautylog/master/dependencies/npm)
[![bitHound Code](https://www.bithound.io/github/pushrocks/beautylog/badges/code.svg)](https://www.bithound.io/github/pushrocks/beautylog)
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
## Quick Demo
[![asciicast](https://asciinema.org/a/46djsde96ecsho9wqibjx2zye.png)](https://asciinema.org/a/46djsde96ecsho9wqibjx2zye)
## Usage
Use TypeScript for best in class instellisense.
```javascript
beautylog.log('some log message'); // normal console log message
beautylog.info('some log message'); // info console log message
beautylog.ok('some log message'); // ok console log message
beautylog.warn('some log message'); // warn console log message
beautylog.success('some success message'); // success console log message
beautylog.error('some error message'); // error console log message
```
### Ora Integration
beautylog wraps the excellent ora module from npm to better work with beautylog. In general that means that you can log persistent messages WHILE you are actually having an active Ora object. beautylog handles all the fuss for you.
```javascript
beautylog.ora.start('Hi, this is some text!', 'blue');
beautylog.info('some persistent text'); //does not disturb ora
console.log('something'); // even this works because console.log is monkeypatched by beautylog
beautylog.ora.text('some updated text'); // switches the text
beautylog.ora.stop();
```
## Centralized remote logging
Beautylog makes it easy to have all your node applications log to a remote location.
```javascript
import { Loggly } from 'beautyremote';
let myLogglyRemote = new Loggly({
token: 'my_super_long_token_here',
});
beautylog.registerRemote(myLogglyRemote);
```
> Note: Beautylog monkeypatches all console log methods.
> There is no need to change anything in your code.
> Everything that is getting logged to your console by node will get logged to a remote as well.
For further information read the linked docs at the top of this README.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)

View File

@ -1,62 +0,0 @@
/// <reference path="./typings/tsd.d.ts" />
var colors = require("colors");
var bl;
bl = {};
/**
* object to append to all locally used params
* @type {{}}
*/
var localBl;
localBl = {};
localBl.normalPrefix = ' Log: '.bgCyan.white.bold + ' ';
localBl.errorPrefix = ' Error: '.bgRed.white.bold + ' ';
localBl.successPrefix = ' Success: '.bgGreen.white.bold + ' ';
/**
*
* @param logText
* @param logType
* @returns {boolean}
*/
bl.log = function (logText, logType) {
if (logText === void 0) { logText = 'empty log'; }
if (logType === void 0) { logType = 'normal'; }
try {
switch (logType) {
case 'normal':
logText = localBl.normalPrefix + logText.cyan.bold;
break;
case 'error':
logText = localBl.errorPrefix + logText.red.bold;
break;
case 'success':
logText = localBl.successPrefix + logText.green.bold;
break;
default:
logText.blue.bold;
console.log(('unknown logType for "' + logText + '"').red.bold);
}
console.log(logText);
return true;
}
catch (error) {
console.log(localBl.errorPrefix + 'You seem to have tried logging something strange'.red.bold + error);
return false;
}
};
/**
* logs an error to console
* @param logText
* @returns {boolean}
*/
bl.error = function (logText) {
return bl.log(logText, 'error');
};
/**
* logs a success to console
* @param logText string to log as error
* @returns {boolean}
*/
bl.success = function (logText) {
return bl.log(logText, 'success');
};
module.exports = bl;

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015 Push.Rocks
Copyright (c) 2015 Lossless GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

28
npmextra.json Normal file
View File

@ -0,0 +1,28 @@
{
"npmci": {
"globalNpmTools": [],
"npmAccessLevel": "public"
},
"gitzone": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "smartlog-destination-local",
"description": "a smartlog destination targeting the local console",
"npmPackagename": "@push.rocks/smartlog-destination-local",
"license": "MIT",
"keywords": [
"logging",
"console log",
"log management",
"developer tools",
"local logging",
"console output"
]
}
},
"tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
}
}

View File

@ -1,28 +1,59 @@
{
"name": "beautylog",
"version": "0.0.9",
"description": "beautiful logging",
"main": "index.js",
"name": "@push.rocks/smartlog-destination-local",
"private": false,
"version": "9.0.2",
"description": "a smartlog destination targeting the local console",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"scripts": {
"test": "cd ts/compile && gulp"
"test": "(tstest test/)",
"build": "(tsbuild --web)",
"buildDocs": "tsdoc"
},
"repository": {
"type": "git",
"url": "https://github.com/pushrocks/beautylog.git"
"url": "https://code.foss.global/push.rocks/smartlog-destination-local.git"
},
"keywords": [
"log",
"color",
"console",
"beautiful"
"logging",
"console log",
"log management",
"developer tools",
"local logging",
"console output"
],
"author": "Smart Coordination GmbH <office@push.rocks> (https://push.rocks)",
"author": "Lossless GmbH <hello@lossless.com> (https://lossless.com)",
"license": "MIT",
"bugs": {
"url": "https://github.com/pushrocks/beautylog/issues"
"url": "https://gitlab.com/pushrocks/beautylog/issues"
},
"homepage": "https://github.com/pushrocks/beautylog",
"homepage": "https://code.foss.global/push.rocks/smartlog-destination-local",
"dependencies": {
"colors": "latest"
}
}
"@push.rocks/consolecolor": "^2.0.1",
"@push.rocks/smartlog-interfaces": "^3.0.0",
"@push.rocks/smartpromise": "^4.0.2"
},
"devDependencies": {
"@git.zone/tsbuild": "^2.1.66",
"@git.zone/tsrun": "^1.2.42",
"@git.zone/tstest": "^1.0.74",
"@push.rocks/tapbundle": "^5.0.8",
"@types/node": "^20.4.1"
},
"files": [
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_*/**/*",
"dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"readme.md"
],
"type": "module",
"browserslist": [
"last 1 chrome versions"
]
}

5009
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

1
readme.hints.md Normal file
View File

@ -0,0 +1 @@

111
readme.md Normal file
View File

@ -0,0 +1,111 @@
# @push.rocks/smartlog-destination-local
a smartlog destination targeting the local console
## Install
To use `@push.rocks/smartlog-destination-local` in your project, you need to install it via npm. You can do this by running:
```bash
npm install @push.rocks/smartlog-destination-local --save
```
This command adds `@push.rocks/smartlog-destination-local` to your project's dependencies and enables you to start implementing its features in your application.
## Usage
The `@push.rocks/smartlog-destination-local` package provides a way to easily log messages to the local console with support for color coding and structured message formats. It is especially useful when combined with the `@push.rocks/smartlog` package to create a powerful logging solution that is both visually informative and structured for better logging practices.
### Importing and Setting Up
First, make sure to import the package where you intend to use it:
```typescript
import { DestinationLocal } from '@push.rocks/smartlog-destination-local';
```
Next, create an instance of `DestinationLocal`:
```typescript
const localLogDestination = new DestinationLocal();
```
### Logging Messages
The primary feature of `@push.rocks/smartlog-destination-local` is to log messages to the console. This can be done by preparing a log package and using the `handleLog` method.
#### Example Log Message
```typescript
import type { ILogPackage } from '@push.rocks/smartlog-interfaces';
const logPackage: ILogPackage = {
timestamp: Date.now(),
type: 'log', // or 'error', 'warn', etc. depending on the nature of the message
level: 'info', // determines the visibility and importance of the log
context: {
company: 'Your Company',
companyunit: 'Your Unit',
containerName: 'Your Container',
environment: 'development',
runtime: 'node',
zone: 'Your Zone'
},
message: 'This is a test log message.', // the actual message
correlation: {
id: 'uniqueId', // useful for tracing logs
type: 'requestId'
},
};
// Using the instance to log the message
localLogDestination.handleLog(logPackage);
```
This will output a structured, color-coded log message to your console, making it easier to differentiate between various log levels and to understand the context of the log messages at a glance.
### Log Reduction
For scenarios where repeated log messages may clutter your log output, `@push.rocks/smartlog-destination-local` offers a `logReduced` method. This method will throttle the output of identical consecutive messages according to the settings you provide.
#### Reducing Log Output
```typescript
// Log a message repeatedly, e.g., in a loop
for (let i = 0; i < 100; i++) {
localLogDestination.logReduced('Repeated message', 5); // only logs every 5th identical message
}
```
### Adding New Lines
You may want to improve the readability of your logs by inserting blank lines. This can be easily achieved:
```typescript
localLogDestination.newLine(2); // Inserts two empty lines in the log output
```
### Advanced Use Cases
The `@push.rocks/smartlog-destination-local` package is flexible and integrates seamlessly with other logging and monitoring solutions. It can be extended or customized to fit more complex logging requirements, such as filtering logs based on environment, enhancing log messages with additional metadata, or integrating with remote logging services for centralized log management.
### Conclusion
`@push.rocks/smartlog-destination-local` serves as a robust, easy-to-use solution for enhancing your application's logging capabilities. By following the examples and using the provided methods, you can quickly implement effective logging practices that improve debugging, monitoring, and analysis of your application's behavior in development and production environments.
## License and Legal Information
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
### Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
### Company Information
Task Venture Capital GmbH
Registered at District court Bremen HRB 35230 HB, Germany
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.

15
test.js
View File

@ -1,15 +0,0 @@
/// <reference path="./typings/tsd.d.ts" />
var beautyLog = require('./index.js');
console.log('*** start test ***');
console.log('');
console.log('declarative function calls:');
beautyLog.log('beautylog.log(), with normal logText, without logType');
beautyLog.error('beautylog.error(), with normal logText, without logType');
beautyLog.success('beautylog.success(), with normal logText, without logType');
console.log('');
console.log('logType String:');
beautyLog.log('beautylog.log(), with normal logText, without logType');
beautyLog.log('beautylog.log(), with normal logText, with logType "error"', 'error');
beautyLog.log('beautylog.log(), with normal logText, with logType "success"', 'success');
console.log('');
console.log('*** end test ***');

49
test/test.ts Normal file
View File

@ -0,0 +1,49 @@
import { tap, expect } from '@push.rocks/tapbundle';
import * as smartlogDesinationLocal from '../ts/index.js';
import type { ILogContext } from '@push.rocks/smartlog-interfaces';
const testLogContext: ILogContext = {
company: 'Lossless GmbH',
companyunit: 'Lossless.Cloud',
containerName: 'gitlabci',
environment: 'staging',
runtime: 'node',
zone: 'shipzone',
};
let testLocalInstance: smartlogDesinationLocal.DestinationLocal;
tap.test('should create a valid instance of DestinationLocal', async () => {
testLocalInstance = new smartlogDesinationLocal.DestinationLocal();
expect(testLocalInstance).toBeInstanceOf(smartlogDesinationLocal.DestinationLocal);
});
tap.test('.log(message) should print a blue Dir message', async () => {
testLocalInstance.handleLog({
timestamp: Date.now(),
type: 'log',
level: 'info',
context: testLogContext,
message: 'this is a info log message',
correlation: {
id: '123',
type: 'none',
},
});
});
tap.test('.logReduced(message) should only log two messages', async () => {
testLocalInstance.logReduced('Message 1');
testLocalInstance.logReduced('Message 1');
testLocalInstance.logReduced('Message 1');
testLocalInstance.logReduced('Message 1');
testLocalInstance.logReduced('Message 2');
testLocalInstance.logReduced('Message 2');
});
tap.test('.newLine(number) create specified amount of new lines', async () => {
testLocalInstance.newLine(1);
});
tap.start();

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@push.rocks/smartlog-destination-local',
version: '9.0.2',
description: 'a smartlog destination targeting the local console'
}

View File

@ -0,0 +1,135 @@
import * as plugins from './plugins.js';
import type { ILogDestination, ILogPackage, TLogLevel } from '@push.rocks/smartlog-interfaces';
// other beautylog classes
import { type TColorName } from '@push.rocks/consolecolor';
export class DestinationLocal implements ILogDestination {
/**
* handles a log according to the smartlog standard
* @param logPackage
*/
public async handleLog(logPackage: ILogPackage) {
this.logToConsole(logPackage);
}
/**
* creates a new empty line
* @param linesArg
* @returns void
*/
public newLine(linesArg: number = 1) {
for (let i = 0; i < linesArg; i++) {
console.log('\n');
}
}
/**
* logs a reduced log that only logs changes of consequential log messages
*/
public logReduced(logTextArg: string, repeatEveryTimesArg: number = 0) {
if (
logTextArg === this.previousMessage &&
(repeatEveryTimesArg === 0 || this.sameMessageCounter !== repeatEveryTimesArg)
) {
this.sameMessageCounter++;
} else {
this.sameMessageCounter = 0;
this.previousMessage = logTextArg;
this.logToConsole({
timestamp: Date.now(),
type: 'log',
level: 'info',
context: {
company: 'undefined',
companyunit: 'undefined',
containerName: 'undefined',
environment: 'test',
runtime: 'node',
zone: 'undefined',
},
message: logTextArg,
correlation: {
id: 'none',
type: 'none',
},
});
}
}
private previousMessage: string = '';
private sameMessageCounter: number = 0;
// default logging
private logToConsole(logPackageArg: ILogPackage) {
let logString: string;
try {
logString =
this.localBl[logPackageArg.level].prefix +
plugins.consolecolor.coloredString(
logPackageArg.message,
this.localBl[logPackageArg.level].textColor
);
console.log(logString);
return true;
} catch (error) {
console.log(
this.localBl.errorPrefix + 'You seem to have tried logging something strange' + error
);
return false;
}
}
private localBl: {
[key: string]: {
prefix: string;
textColor: TColorName;
};
} = {
silly: {
prefix: plugins.consolecolor.coloredString(' silly ', 'white', 'blue') + ' ',
textColor: 'blue',
},
error: {
prefix:
plugins.consolecolor.coloredString(' ', 'red', 'red') +
plugins.consolecolor.coloredString(' ERROR! ', 'red', 'black') +
' ',
textColor: 'red',
},
info: {
prefix:
plugins.consolecolor.coloredString(' ', 'blue', 'blue') +
plugins.consolecolor.coloredString(' info: ', 'blue', 'black') +
' ',
textColor: 'white',
},
note: {
prefix:
plugins.consolecolor.coloredString(' ', 'pink', 'pink') +
plugins.consolecolor.coloredString(' note -> ', 'pink', 'black') +
' ',
textColor: 'pink',
},
ok: {
prefix:
plugins.consolecolor.coloredString(' ', 'green', 'green') +
plugins.consolecolor.coloredString(' ok ', 'green', 'black') +
' ',
textColor: 'green',
},
success: {
prefix:
plugins.consolecolor.coloredString(' ', 'green', 'green') +
plugins.consolecolor.coloredString(' SUCCESS! ', 'green', 'black') +
' ',
textColor: 'green',
},
warn: {
prefix:
plugins.consolecolor.coloredString(' ', 'orange', 'orange') +
plugins.consolecolor.coloredString(' WARN -> ', 'orange', 'black') +
' ',
textColor: 'orange',
},
};
}

View File

@ -1,2 +0,0 @@
nvm use v0.12.7
gulp

View File

@ -1,25 +0,0 @@
// import gulp
var gulp = require("gulp"),
gulpTypescript = require("gulp-typescript");
gulp.task('compileTS', function() {
var stream = gulp.src('../index.ts')
.pipe(gulpTypescript({
out: "index.js"
}))
.pipe(gulp.dest("../../"));
return stream;
});
gulp.task('compileTSTest', function() {
var stream = gulp.src('../test.ts')
.pipe(gulpTypescript({
out: "test.js"
}))
.pipe(gulp.dest("../../"));
return stream;
});
gulp.task('default',['compileTS','compileTSTest'], function() {
console.log('Typescript compiled');
});

View File

@ -1,2 +0,0 @@
# How to compile.
Make sure gulp and gulp-taypescript from npm are available. Then run the gulpfile in this directory.

View File

@ -1,68 +1,2 @@
/// <reference path="./typings/tsd.d.ts" />
var colors = require("colors");
var bl:any;
bl = {}
/**
* object to append to all locally used params
* @type {{}}
*/
var localBl:any;
localBl = {};
localBl.normalPrefix = ' Log: '.bgCyan.white.bold + ' ';
localBl.errorPrefix = ' Error: '.bgRed.white.bold + ' ';
localBl.successPrefix = ' Success: '.bgGreen.white.bold + ' ';
/**
*
* @param logText
* @param logType
* @returns {boolean}
*/
bl.log = (logText:string = 'empty log',logType:string = 'normal') => {
try {
switch (logType) {
case 'normal':
logText = localBl.normalPrefix + logText.cyan.bold;
break;
case 'error':
logText = localBl.errorPrefix + logText.red.bold;
break;
case 'success':
logText = localBl.successPrefix + logText.green.bold;
break;
default:
logText.blue.bold;
console.log(('unknown logType for "' + logText + '"').red.bold);
}
console.log(logText);
return true;
}
catch(error) {
console.log(localBl.errorPrefix + 'You seem to have tried logging something strange'.red.bold + error);
return false;
}
};
/**
* logs an error to console
* @param logText
* @returns {boolean}
*/
bl.error = function(logText) {
return bl.log(logText, 'error');
};
/**
* logs a success to console
* @param logText string to log as error
* @returns {boolean}
*/
bl.success = function(logText) {
return bl.log(logText, 'success');
}
module.exports = bl;
// export classes
export { DestinationLocal } from './classes.destinationlocal.js';

5
ts/plugins.ts Normal file
View File

@ -0,0 +1,5 @@
import * as consolecolor from '@push.rocks/consolecolor';
import * as smartlogInterfaces from '@push.rocks/smartlog-interfaces';
import * as smartpromise from '@push.rocks/smartpromise';
export { consolecolor, smartlogInterfaces, smartpromise };

View File

@ -1,20 +0,0 @@
/// <reference path="./typings/tsd.d.ts" />
var beautyLog = require('./index.js');
console.log('*** start test ***');
console.log ('');
console.log('declarative function calls:');
beautyLog.log('beautylog.log(), with normal logText, without logType');
beautyLog.error('beautylog.error(), with normal logText, without logType');
beautyLog.success('beautylog.success(), with normal logText, without logType');
console.log('');
console.log('logType String:');
beautyLog.log('beautylog.log(), with normal logText, without logType');
beautyLog.log('beautylog.log(), with normal logText, with logType "error"','error');
beautyLog.log('beautylog.log(), with normal logText, with logType "success"','success');
console.log ('');
console.log('*** end test ***');

View File

@ -1,15 +0,0 @@
{
"version": "v4",
"repo": "borisyankov/DefinitelyTyped",
"ref": "master",
"path": "typings",
"bundle": "typings/tsd.d.ts",
"installed": {
"node/node.d.ts": {
"commit": "efa0c1196d7280640e624ac1e7fa604502e7bd63"
},
"colors/colors.d.ts": {
"commit": "273a567b0a0bcc34cbf2a2470b2febc95796b644"
}
}
}

View File

@ -1,123 +0,0 @@
// Type definitions for Colors.js 0.6.0-1
// Project: https://github.com/Marak/colors.js
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "colors" {
interface Color {
(text: string): string;
black: Color;
red: Color;
green: Color;
yellow: Color;
blue: Color;
magenta: Color;
cyan: Color;
white: Color;
gray: Color;
grey: Color;
bgBlack: Color;
bgRed: Color;
bgGreen: Color;
bgYellow: Color;
bgBlue: Color;
bgMagenta: Color;
bgCyan: Color;
bgWhite: Color;
reset: Color;
bold: Color;
dim: Color;
italic: Color;
underline: Color;
inverse: Color;
hidden: Color;
strikethrough: Color;
rainbow: Color;
zebra: Color;
america: Color;
trap: Color;
random: Color;
}
module e {
export function setTheme(theme:any): void;
export var black: Color;
export var red: Color;
export var green: Color;
export var yellow: Color;
export var blue: Color;
export var magenta: Color;
export var cyan: Color;
export var white: Color;
export var gray: Color;
export var grey: Color;
export var bgBlack: Color;
export var bgRed: Color;
export var bgGreen: Color;
export var bgYellow: Color;
export var bgBlue: Color;
export var bgMagenta: Color;
export var bgCyan: Color;
export var bgWhite: Color;
export var reset: Color;
export var bold: Color;
export var dim: Color;
export var italic: Color;
export var underline: Color;
export var inverse: Color;
export var hidden: Color;
export var strikethrough: Color;
export var rainbow: Color;
export var zebra: Color;
export var america: Color;
export var trap: Color;
export var random: Color;
}
export = e;
}
interface String {
black: string;
red: string;
green: string;
yellow: string;
blue: string;
magenta: string;
cyan: string;
white: string;
gray: string;
grey: string;
bgBlack: string;
bgRed: string;
bgGreen: string;
bgYellow: string;
bgBlue: string;
bgMagenta: string;
bgCyan: string;
bgWhite: string;
reset: string;
bold: string;
dim: string;
italic: string;
underline: string;
inverse: string;
hidden: string;
strikethrough: string;
rainbow: string;
zebra: string;
america: string;
trap: string;
random: string;
}

File diff suppressed because it is too large Load Diff

2
ts/typings/tsd.d.ts vendored
View File

@ -1,2 +0,0 @@
/// <reference path="node/node.d.ts" />
/// <reference path="colors/colors.d.ts" />

14
tsconfig.json Normal file
View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true
},
"exclude": [
"dist_*/**/*.d.ts"
]
}