Compare commits

...

26 Commits

Author SHA1 Message Date
f678c43b80 1.0.12 2024-05-30 17:59:50 +02:00
596a33bbd7 fix(core): update 2024-05-30 17:59:50 +02:00
6f18f28d20 update 2024-05-30 17:59:42 +02:00
dbe2919883 1.0.11 2024-05-30 17:58:36 +02:00
0e8eca784a fix(core): update 2024-05-30 17:58:35 +02:00
fed8809fd5 update description 2024-05-29 14:14:12 +02:00
a39dc80699 update tsconfig 2024-04-14 17:50:18 +02:00
45295e0dd2 update npmextra.json: githost 2024-04-01 21:36:04 +02:00
59f4f0df63 update npmextra.json: githost 2024-04-01 19:58:43 +02:00
8e4a5dab51 update npmextra.json: githost 2024-03-30 21:47:42 +01:00
bff7dd233b switch to new org scheme 2023-07-11 01:02:06 +02:00
9c5d8a83d8 switch to new org scheme 2023-07-10 10:02:38 +02:00
a476118a16 1.0.10 2020-07-10 00:37:19 +00:00
a676d6774a fix(core): update 2020-07-10 00:37:18 +00:00
ab08b67fb3 1.0.9 2020-07-10 00:28:55 +00:00
690c4a9020 fix(core): update 2020-07-10 00:28:54 +00:00
0a3222ce9a 1.0.8 2020-06-05 12:28:18 +00:00
93dd523278 fix(core): update 2020-06-05 12:28:17 +00:00
1b13da477f 1.0.7 2018-11-13 01:58:55 +01:00
69ee84e657 fix(core): update 2018-11-13 01:58:54 +01:00
91f2d4a1b7 1.0.6 2018-11-13 01:46:16 +01:00
e845dcc34a fix(core): update 2018-11-13 01:46:15 +01:00
22699dec8e 1.0.5 2018-11-13 01:40:22 +01:00
73e5b5610c fix(core): update 2018-11-13 01:40:21 +01:00
f615454b2d 1.0.4 2018-11-13 01:32:40 +01:00
fb7fc19e4d fix(core): update 2018-11-13 01:32:39 +01:00
103 changed files with 7397 additions and 607 deletions
.cache
03
08
11
12
1c
1e
1f
27
2a
2b
2c
2f
34
3d
49
4a
51
5b
5f
60
64
67
6b
6e
70
73
74
75
76
77
7a
7c
7e
7f
80
8a
8c
91
9a
9f
a1
a3
a9
ae
af
b2
b4
b7
bb
bd
c7
ca
cb
d0
d4
d7
d9
da
e8
ec
f7
f8
fa
fe
.gitea/workflows
.gitignore.gitlab-ci.yml
.vscode
dist
npmextra.jsonpackage.jsonpnpm-lock.yamlreadme.hints.mdreadme.md
test
ts

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
{"id":"../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/util/support/isBufferBrowser.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/package.json","includedInParent":true,"mtime":1542067438335},{"name":"/Users/philkunz/.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/util/package.json","includedInParent":true,"mtime":1542068254007}],"generated":{"js":"module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}","map":{"mappings":[{"source":"../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/util/support/isBufferBrowser.js","original":{"line":1,"column":0},"generated":{"line":1,"column":0}},{"source":"../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/util/support/isBufferBrowser.js","original":{"line":2,"column":0},"generated":{"line":2,"column":0}},{"source":"../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/util/support/isBufferBrowser.js","original":{"line":3,"column":0},"generated":{"line":3,"column":0}},{"source":"../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/util/support/isBufferBrowser.js","original":{"line":4,"column":0},"generated":{"line":4,"column":0}},{"source":"../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/util/support/isBufferBrowser.js","original":{"line":5,"column":0},"generated":{"line":5,"column":0}},{"source":"../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/util/support/isBufferBrowser.js","original":{"line":6,"column":0},"generated":{"line":6,"column":0}}],"sources":{"../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/node_modules/util/support/isBufferBrowser.js":"module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}"},"lineCount":6}},"hash":"675efd9e484666eb16388744d24ad002","cacheData":{"env":{}}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
{"id":"node_modules/chai/index.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/package.json","includedInParent":true,"mtime":1542067438335},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/package.json","includedInParent":true,"mtime":1542058764034},{"name":"./lib/chai","loc":{"line":1,"column":25},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/index.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/lib/chai.js"}],"generated":{"js":"module.exports = require('./lib/chai');","map":{"mappings":[{"name":"module","generated":{"line":1,"column":0},"source":"node_modules/chai/index.js","original":{"line":1,"column":0}},{"generated":{"line":1,"column":6},"source":"node_modules/chai/index.js","original":{"line":1,"column":6}},{"name":"exports","generated":{"line":1,"column":7},"source":"node_modules/chai/index.js","original":{"line":1,"column":7}},{"generated":{"line":1,"column":14},"source":"node_modules/chai/index.js","original":{"line":1,"column":0}},{"name":"require","generated":{"line":1,"column":17},"source":"node_modules/chai/index.js","original":{"line":1,"column":17}},{"generated":{"line":1,"column":24},"source":"node_modules/chai/index.js","original":{"line":1,"column":24}},{"generated":{"line":1,"column":25},"source":"node_modules/chai/index.js","original":{"line":1,"column":25}},{"generated":{"line":1,"column":37},"source":"node_modules/chai/index.js","original":{"line":1,"column":24}},{"generated":{"line":1,"column":38},"source":"node_modules/chai/index.js","original":{"line":1,"column":0}}],"sources":{"node_modules/chai/index.js":"module.exports = require('./lib/chai');\n"},"lineCount":null}},"hash":"a24824cef3517c348f0fe2e4410c0ab9","cacheData":{"env":{}}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
{"id":"node_modules/@pushrocks/tapbundle/dist/tapbundle.classes.tapwrap.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/tapbundle/ts/tapbundle.classes.tapwrap.ts","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/package.json","includedInParent":true,"mtime":1542067438335},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/tapbundle/package.json","includedInParent":true,"mtime":1542063791802}],"generated":{"js":"\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass TapWrap {\n /**\n * the constructor\n */\n constructor(wrapFunctionArg) {\n // nothing here\n this.wrapFunction = wrapFunctionArg;\n }\n /**\n * run the wrapFunction\n */\n run() {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.wrapFunction();\n });\n }\n}\nexports.TapWrap = TapWrap;\n","map":{"version":3,"file":"tapbundle.classes.tapwrap.js","sourceRoot":"","sources":["../ts/tapbundle.classes.tapwrap.ts"],"names":[],"mappings":";;;;;;;;;;AAMA,MAAa,OAAO;IAGlB;;OAEG;IACH,YAAY,eAAiC;QAC3C,eAAe;QACf,IAAI,CAAC,YAAY,GAAG,eAAe,CAAC;IACtC,CAAC;IAED;;OAEG;IACG,GAAG;;YACP,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;QAC5B,CAAC;KAAA;CACF;AAjBD,0BAiBC","sourcesContent":["import * as plugins from './tapbundle.plugins';\n\nexport interface ITapWrapFunction {\n (): Promise<any>;\n}\n\nexport class TapWrap {\n wrapFunction: ITapWrapFunction;\n\n /**\n * the constructor\n */\n constructor(wrapFunctionArg: ITapWrapFunction) {\n // nothing here\n this.wrapFunction = wrapFunctionArg;\n }\n\n /**\n * run the wrapFunction\n */\n async run() {\n await this.wrapFunction();\n }\n}\n"]}},"hash":"a8afbab5f1edfb468f3b8f7eefdb3d67","cacheData":{"env":{}}}

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
{"id":"../node_modules/@pushrocks/smartlog/dist/smartlog.classes.logrouter.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/smartlog/ts/smartlog.classes.logrouter.ts","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/package.json","includedInParent":true,"mtime":1542069011329},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/smartlog/package.json","includedInParent":true,"mtime":1542058764035}],"generated":{"js":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nclass LogRouter {\n constructor() {\n /**\n * all log destinations\n */\n this.logDestinations = [];\n }\n addLogDestination(logDestination) {\n this.logDestinations.push(logDestination);\n }\n // routes the log according to added logDestinations\n routeLog(logPackageArg) {\n for (const logDestination of this.logDestinations) {\n logDestination.handleLog(logPackageArg);\n }\n }\n}\nexports.LogRouter = LogRouter;\n","map":{"version":3,"file":"smartlog.classes.logrouter.js","sourceRoot":"","sources":["../ts/smartlog.classes.logrouter.ts"],"names":[],"mappings":";;AAIA,MAAa,SAAS;IAMpB;QALA;;WAEG;QACK,oBAAe,GAAsB,EAAE,CAAC;IAEjC,CAAC;IAET,iBAAiB,CAAC,cAA+B;QACtD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC5C,CAAC;IAED,oDAAoD;IACpD,QAAQ,CAAC,aAA0B;QACjC,KAAK,MAAM,cAAc,IAAI,IAAI,CAAC,eAAe,EAAE;YACjD,cAAc,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;SACzC;IACH,CAAC;CACF;AAlBD,8BAkBC","sourcesContent":["import * as plugins from './smartlog.plugins';\n\nimport { ILogDestination, ILogPackage } from '@pushrocks/smartlog-interfaces';\n\nexport class LogRouter {\n /**\n * all log destinations\n */\n private logDestinations: ILogDestination[] = [];\n\n constructor() {}\n\n public addLogDestination(logDestination: ILogDestination) {\n this.logDestinations.push(logDestination);\n }\n\n // routes the log according to added logDestinations\n routeLog(logPackageArg: ILogPackage) {\n for (const logDestination of this.logDestinations) {\n logDestination.handleLog(logPackageArg);\n }\n }\n}\n"]}},"hash":"5a4057d085fe5f908691337f03ea8a98","cacheData":{"env":{}}}

@ -0,0 +1 @@
{"id":"node_modules/smartchai/dist/index.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/smartchai/ts/index.ts","includedInParent":true,"mtime":1519768627000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/package.json","includedInParent":true,"mtime":1542067438335},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/smartchai/package.json","includedInParent":true,"mtime":1542058764034},{"name":"chai","loc":{"line":3,"column":21},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/smartchai/dist/index.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai/index.js"},{"name":"chai-as-promised","loc":{"line":4,"column":31},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/smartchai/dist/index.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai-as-promised/lib/chai-as-promised.js"},{"name":"chai-string","loc":{"line":5,"column":27},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/smartchai/dist/index.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/chai-string/chai-string.js"}],"generated":{"js":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst chai = require(\"chai\");\nconst chaiAsPromised = require(\"chai-as-promised\");\nconst chaiString = require(\"chai-string\");\nchai.use(chaiAsPromised);\nchai.use(chaiString);\nexports.expect = chai.expect;\n","map":{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,mDAAmD;AACnD,0CAA0C;AAE1C,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;AACxB,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;AACP,QAAA,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA","sourcesContent":["import chai = require('chai')\nimport chaiAsPromised = require('chai-as-promised')\nimport chaiString = require('chai-string')\n\nchai.use(chaiAsPromised)\nchai.use(chaiString)\nexport const expect = chai.expect\n\n"]}},"hash":"21aa04ed10be7085ca9a9ab2ec5bb77b","cacheData":{"env":{}}}

@ -0,0 +1 @@
{"id":"../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/src/builtins/_empty.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/package.json","includedInParent":true,"mtime":1542067438335},{"name":"/Users/philkunz/.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/package.json","includedInParent":true,"mtime":1542068253946},{"name":"/Users/philkunz/.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/src/.babelrc","includedInParent":true,"mtime":1539263651000}],"generated":{"js":"","map":{"mappings":[],"sources":{"../../../.nvm/versions/node/v10.13.0/lib/node_modules/parcel-bundler/src/builtins/_empty.js":""},"lineCount":null}},"hash":"718c624fd453acf0b14664556811b6c5","cacheData":{"env":{}}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
{"id":"index.html","dependencies":[{"name":"./test/browsertest.ts","dynamic":true,"resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/test/browsertest.ts","parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/index.html"}],"generated":{"html":"<head>\n <script src=\"/642eee4354410daef039cd5aebe08f22.js\"></script>\n</head>\n<body></body>"},"hash":"5af05728e9f448754239e1756c865ba8","cacheData":{}}

@ -0,0 +1 @@
{"id":"node_modules/@pushrocks/tapbundle/dist/tapbundle.plugins.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/tapbundle/ts/tapbundle.plugins.ts","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/package.json","includedInParent":true,"mtime":1542067438335},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/tapbundle/package.json","includedInParent":true,"mtime":1542063791802},{"name":"@pushrocks/early","loc":{"line":3,"column":22},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/tapbundle/dist/tapbundle.plugins.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/early/dist/index.js"},{"name":"leakage","loc":{"line":5,"column":24},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/tapbundle/dist/tapbundle.plugins.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/leakage/lib/index.js"},{"name":"@pushrocks/smartdelay","loc":{"line":7,"column":27},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/tapbundle/dist/tapbundle.plugins.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/smartdelay/dist/index.js"},{"name":"@pushrocks/smartpromise","loc":{"line":9,"column":29},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/tapbundle/dist/tapbundle.plugins.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/smartpromise/dist/index.js"}],"generated":{"js":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst early = require(\"@pushrocks/early\");\nexports.early = early;\nconst leakage = require(\"leakage\");\nexports.leakage = leakage;\nconst smartdelay = require(\"@pushrocks/smartdelay\");\nexports.smartdelay = smartdelay;\nconst smartpromise = require(\"@pushrocks/smartpromise\");\nexports.smartpromise = smartpromise;\n","map":{"version":3,"file":"tapbundle.plugins.js","sourceRoot":"","sources":["../ts/tapbundle.plugins.ts"],"names":[],"mappings":";;AAAA,0CAA0C;AAKjC,sBAAK;AAJd,mCAAmC;AAIO,0BAAO;AAHjD,oDAAoD;AAGpC,gCAAU;AAF1B,wDAAwD;AAE5B,oCAAY","sourcesContent":["import * as early from '@pushrocks/early';\nimport * as leakage from 'leakage';\nimport * as smartdelay from '@pushrocks/smartdelay';\nimport * as smartpromise from '@pushrocks/smartpromise';\n\nexport { early, smartdelay, smartpromise, leakage };\n"]}},"hash":"6ac15ba135e740ff960815ed6392ec31","cacheData":{"env":{}}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
{"id":"../node_modules/@pushrocks/smartlog/dist/index.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/smartlog/ts/index.ts","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/package.json","includedInParent":true,"mtime":1542069011329},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/smartlog/package.json","includedInParent":true,"mtime":1542058764035},{"name":"./smartlog.classes.smartlog","loc":{"line":3,"column":44},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/smartlog/dist/index.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/smartlog/dist/smartlog.classes.smartlog.js"}],"generated":{"js":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst smartlog_classes_smartlog_1 = require(\"./smartlog.classes.smartlog\");\nexports.Smartlog = smartlog_classes_smartlog_1.Smartlog;\nconst defaultLogger = new smartlog_classes_smartlog_1.Smartlog({\n logContext: {\n company: 'undefined',\n companyunit: 'undefefined',\n containerName: 'undefined',\n environment: 'local',\n runtime: 'node',\n zone: 'undefined'\n }\n});\nexports.defaultLogger = defaultLogger;\n","map":{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";;AACA,2EAAuD;AAY9C,mBAZA,oCAAQ,CAYA;AAXjB,MAAM,aAAa,GAAa,IAAI,oCAAQ,CAAC;IAC3C,UAAU,EAAE;QACV,OAAO,EAAE,WAAW;QACpB,WAAW,EAAE,aAAa;QAC1B,aAAa,EAAE,WAAW;QAC1B,WAAW,EAAE,OAAO;QACpB,OAAO,EAAE,MAAM;QACf,IAAI,EAAE,WAAW;KAClB;CACF,CAAC,CAAC;AAEgB,sCAAa","sourcesContent":["import * as plugins from './smartlog.plugins';\nimport { Smartlog } from './smartlog.classes.smartlog';\nconst defaultLogger: Smartlog = new Smartlog({\n logContext: {\n company: 'undefined',\n companyunit: 'undefefined',\n containerName: 'undefined',\n environment: 'local',\n runtime: 'node',\n zone: 'undefined'\n }\n});\n\nexport { Smartlog, defaultLogger };\n"]}},"hash":"b4d12976864646a10b900c5e00c95d81","cacheData":{"env":{}}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
{"id":"node_modules/@pushrocks/tapbundle/dist/index.js","dependencies":[{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/tapbundle/ts/index.ts","includedInParent":true,"mtime":499162500000},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/package.json","includedInParent":true,"mtime":1542067438335},{"name":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/tapbundle/package.json","includedInParent":true,"mtime":1542063791802},{"name":"smartchai","loc":{"line":3,"column":26},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/tapbundle/dist/index.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/smartchai/dist/index.js"},{"name":"./tapbundle.classes.tap","loc":{"line":5,"column":38},"parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/tapbundle/dist/index.js","resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/node_modules/@pushrocks/tapbundle/dist/tapbundle.classes.tap.js"}],"generated":{"js":"\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar smartchai_1 = require(\"smartchai\");\nexports.expect = smartchai_1.expect;\nvar tapbundle_classes_tap_1 = require(\"./tapbundle.classes.tap\");\nexports.tap = tapbundle_classes_tap_1.tap;\n","map":{"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":";;AAAA,uCAAmC;AAA1B,6BAAA,MAAM,CAAA;AACf,iEAA8C;AAArC,sCAAA,GAAG,CAAA","sourcesContent":["export { expect } from 'smartchai';\nexport { tap } from './tapbundle.classes.tap';\n"]}},"hash":"4ead2420c13db587be4c38c24e4fc306","cacheData":{"env":{}}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
{"id":"index.html","dependencies":[{"name":"./browsertest.ts","dynamic":true,"resolved":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/test/browsertest.ts","parent":"/Users/philkunz/gitlab/pushrocks_meta/smartlog-destination-devtools/test/index.html"}],"generated":{"html":"<head>\n <script src=\"/2552bba4981d8242b8167b98d8c67eb9.js\"></script>\n</head>\n<body></body>"},"hash":"f59eeb5a6b3163ef5bface39377ac9c9","cacheData":{}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,66 @@
name: Default (not tags)
on:
push:
tags-ignore:
- '**'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Install pnpm and npmci
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
- name: Run npm prepare
run: npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build

@ -0,0 +1,124 @@
name: Default (tags)
on:
push:
tags:
- '*'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build
release:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Release
run: |
npmci node install stable
npmci npm publish
metadata:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Code quality
run: |
npmci command npm install -g typescript
npmci npm install
- name: Trigger
run: npmci trigger
- name: Build docs and upload artifacts
run: |
npmci node install stable
npmci npm install
pnpm install -g @git.zone/tsdoc
npmci command tsdoc
continue-on-error: true

17
.gitignore vendored

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

@ -1,95 +1,127 @@
# gitzone standard # gitzone ci_default
image: hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache: cache:
paths: paths:
- .yarn/ - .npmci_cache/
key: "$CI_BUILD_STAGE" key: '$CI_BUILD_STAGE'
stages: stages:
- security - security
- test - test
- release - release
- trigger - metadata
- pages
# ====================
# security stage
# ====================
mirror: mirror:
stage: security stage: security
script: script:
- npmci git mirror - npmci git mirror
tags: tags:
- lossless
- docker - docker
- notpriv
snyk: audit:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci command yarn global add snyk - npmci npm prepare
- npmci command yarn install --ignore-scripts - npmci command npm install --ignore-scripts
- npmci command snyk test - npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high
tags: tags:
- lossless
- docker - docker
- notpriv
testLEGACY: # ====================
stage: test # test stage
script: # ====================
- npmci node install legacy
- npmci npm install testStable:
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
allow_failure: true
testLTS:
stage: test
script:
- npmci node install lts
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
testSTABLE:
stage: test stage: test
script: script:
- npmci npm prepare
- npmci node install stable - npmci node install stable
- npmci npm install - npmci npm install
- npmci npm test - npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- lossless
- docker - docker
- priv
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- lossless
- docker
- notpriv
release: release:
stage: release stage: release
script: script:
- npmci npm prepare - npmci node install stable
- npmci npm publish - npmci npm publish
only: only:
- tags - tags
tags: tags:
- lossless
- docker - docker
- notpriv
# ====================
# metadata stage
# ====================
codequality:
stage: metadata
allow_failure: true
script:
- npmci command npm install -g tslint typescript
- npmci npm prepare
- npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags:
- lossless
- docker
- priv
trigger: trigger:
stage: trigger stage: metadata
script: script:
- npmci trigger - npmci trigger
only: only:
- tags - tags
tags: tags:
- lossless
- docker - docker
- notpriv
pages: pages:
image: hosttoday/ht-docker-node:npmci stage: metadata
stage: pages
script: script:
- npmci command yarn global add npmpage - npmci node install lts
- npmci command npmpage - npmci command npm install -g @git.zone/tsdoc
- npmci npm prepare
- npmci npm install
- npmci command tsdoc
tags: tags:
- lossless
- docker - docker
- notpriv
only: only:
- tags - tags
artifacts: artifacts:
expire_in: 1 week expire_in: 1 week
paths: paths:
- public - public
allow_failure: true

11
.vscode/launch.json vendored Normal 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

@ -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"]
}
}
}
}
}
}
]
}

@ -1,2 +0,0 @@
import * as smartlogInterfaces from 'smartlog-interfaces';
export { smartlogInterfaces };

@ -1,5 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const smartlogInterfaces = require("smartlog-interfaces");
exports.smartlogInterfaces = smartlogInterfaces;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmVhdXR5YnJvd3Nlci5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvYmVhdXR5YnJvd3Nlci5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsMERBQTBEO0FBQ2pELGdEQUFrQiJ9

13
dist/index.d.ts vendored

@ -1,13 +0,0 @@
import { ILogDestination, ILogPackage } from 'smartlog-interfaces';
export interface IBeautyLogObject {
logType: string;
logString: string;
}
export declare class BeautyBrowser implements ILogDestination {
handleLog(logPackage: ILogPackage): void;
/**
* parse logs for display
*/
private parseLog;
private logInBrowser(beautyLogObjectArg);
}

56
dist/index.js vendored

@ -1,56 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class BeautyBrowser {
constructor() {
/**
* parse logs for display
*/
this.parseLog = (stringToParseArg) => {
const parseLogRegex = /^(success|ok|info|warn|error):\s(.*)/;
const regexResult = parseLogRegex.exec(stringToParseArg);
if (regexResult && regexResult.length === 3) {
return {
logType: regexResult[1],
logString: regexResult[2]
};
}
else {
return {
logType: 'log',
logString: stringToParseArg
};
}
};
}
handleLog(logPackage) {
this.logInBrowser(this.parseLog(logPackage.message));
}
logInBrowser(beautyLogObjectArg) {
const { logType, logString } = beautyLogObjectArg;
switch (logType) {
case 'error':
console.log('%c Error: %c ' + logString, 'background:#000000;color:#800000;', 'color:#000000;');
break;
case 'info':
console.log('%c Info: %c ' + logString, 'background:#EC407A;color:#ffffff;', 'color:#EC407A;');
break;
case 'ok':
console.log('%c OK: %c ' + logString, 'background:#000000;color:#8BC34A;', 'color:#000000;');
break;
case 'success':
console.log('%c Success: %c ' + logString, 'background:#8BC34A;color:#ffffff;', 'color:#8BC34A;');
break;
case 'warn':
console.log('%c Warn: %c ' + logString, 'background:#000000;color:#FB8C00;', 'color:#000000;');
break;
case 'log':
console.log('%c Log: %c ' + logString, 'background:#42A5F5;color:#ffffff', 'color:#42A5F5;');
break;
default:
console.log('unknown logType for "' + logString + '"');
break;
}
}
}
exports.BeautyBrowser = BeautyBrowser;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQVFBO0lBQUE7UUFLRTs7V0FFRztRQUNLLGFBQVEsR0FBRyxDQUFDLGdCQUF3QixFQUFvQixFQUFFO1lBQ2hFLE1BQU0sYUFBYSxHQUFHLHNDQUFzQyxDQUFDO1lBQzdELE1BQU0sV0FBVyxHQUFHLGFBQWEsQ0FBQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsQ0FBQztZQUN6RCxFQUFFLENBQUEsQ0FBQyxXQUFXLElBQUksV0FBVyxDQUFDLE1BQU0sS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDO2dCQUMzQyxNQUFNLENBQUM7b0JBQ0wsT0FBTyxFQUFFLFdBQVcsQ0FBQyxDQUFDLENBQUM7b0JBQ3ZCLFNBQVMsRUFBRSxXQUFXLENBQUMsQ0FBQyxDQUFDO2lCQUMxQixDQUFBO1lBQ0gsQ0FBQztZQUFDLElBQUksQ0FBQyxDQUFDO2dCQUNOLE1BQU0sQ0FBQztvQkFDTCxPQUFPLEVBQUUsS0FBSztvQkFDZCxTQUFTLEVBQUUsZ0JBQWdCO2lCQUM1QixDQUFBO1lBQ0gsQ0FBQztRQUNILENBQUMsQ0FBQztJQTRDSixDQUFDO0lBakVDLFNBQVMsQ0FBQyxVQUF1QjtRQUMvQixJQUFJLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsVUFBVSxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUM7SUFDdkQsQ0FBQztJQXFCTyxZQUFZLENBQUMsa0JBQW9DO1FBQ3ZELE1BQU0sRUFBQyxPQUFPLEVBQUUsU0FBUyxFQUFDLEdBQUcsa0JBQWtCLENBQUM7UUFDaEQsTUFBTSxDQUFDLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQztZQUNoQixLQUFLLE9BQU87Z0JBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FDVCxlQUFlLEdBQUcsU0FBUyxFQUMzQixtQ0FBbUMsRUFDbkMsZ0JBQWdCLENBQ2pCLENBQUM7Z0JBQ0YsS0FBSyxDQUFDO1lBQ1IsS0FBSyxNQUFNO2dCQUNULE9BQU8sQ0FBQyxHQUFHLENBQ1QsY0FBYyxHQUFHLFNBQVMsRUFDMUIsbUNBQW1DLEVBQ25DLGdCQUFnQixDQUNqQixDQUFDO2dCQUNGLEtBQUssQ0FBQztZQUNSLEtBQUssSUFBSTtnQkFDUCxPQUFPLENBQUMsR0FBRyxDQUFDLFlBQVksR0FBRyxTQUFTLEVBQUUsbUNBQW1DLEVBQUUsZ0JBQWdCLENBQUMsQ0FBQztnQkFDN0YsS0FBSyxDQUFDO1lBQ1IsS0FBSyxTQUFTO2dCQUNaLE9BQU8sQ0FBQyxHQUFHLENBQ1QsaUJBQWlCLEdBQUcsU0FBUyxFQUM3QixtQ0FBbUMsRUFDbkMsZ0JBQWdCLENBQ2pCLENBQUM7Z0JBQ0YsS0FBSyxDQUFDO1lBQ1IsS0FBSyxNQUFNO2dCQUNULE9BQU8sQ0FBQyxHQUFHLENBQ1QsY0FBYyxHQUFHLFNBQVMsRUFDMUIsbUNBQW1DLEVBQ25DLGdCQUFnQixDQUNqQixDQUFDO2dCQUNGLEtBQUssQ0FBQztZQUNSLEtBQUssS0FBSztnQkFDUixPQUFPLENBQUMsR0FBRyxDQUFDLGFBQWEsR0FBRyxTQUFTLEVBQUUsa0NBQWtDLEVBQUUsZ0JBQWdCLENBQUMsQ0FBQztnQkFDN0YsS0FBSyxDQUFDO1lBQ1I7Z0JBQ0UsT0FBTyxDQUFDLEdBQUcsQ0FBQyx1QkFBdUIsR0FBRyxTQUFTLEdBQUcsR0FBRyxDQUFDLENBQUM7Z0JBQ3ZELEtBQUssQ0FBQztRQUNWLENBQUM7SUFDSCxDQUFDO0NBQ0Y7QUFsRUQsc0NBa0VDIn0=

@ -1,7 +1,33 @@
{ {
"npmci": { "npmci": {
"npmGlobalTools": [ "npmGlobalTools": [],
"npmts" "npmAccessLevel": "public"
},
"gitzone": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "smartlog-destination-devtools",
"shortDescription": "beautiful logging for the browser",
"npmPackagename": "@push.rocks/smartlog-destination-devtools",
"license": "MIT",
"description": "A library enabling enhanced logging in browser development tools.",
"keywords": [
"logging",
"browser",
"development tools",
"typescript",
"npm package",
"browser console",
"log management",
"visual logging",
"smartlog",
"devtools"
] ]
} }
},
"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"
}
} }

@ -1,20 +1,61 @@
{ {
"name": "beautybrowser", "name": "@push.rocks/smartlog-destination-devtools",
"version": "1.0.3", "version": "1.0.12",
"description": "beautiful logging for the browser", "private": false,
"main": "dist/index.js", "description": "A library enabling enhanced logging in browser development tools.",
"typings": "dist/index.d.ts", "main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"author": "Lossless GmbH", "author": "Lossless GmbH",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "(npmts)", "test": "(tstest test/ --web)",
"format": "(gitzone format)" "build": "(tsbuild --web)",
"buildDocs": "tsdoc"
}, },
"devDependencies": { "devDependencies": {
"smartlog": "^1.0.3", "@git.zone/tsbuild": "^2.1.66",
"tapbundle": "^2.0.0" "@git.zone/tstest": "^1.0.77",
"@push.rocks/smartlog": "^3.0.2",
"@push.rocks/tapbundle": "^5.0.8",
"@types/node": "^20.12.12"
}, },
"dependencies": { "dependencies": {
"smartlog-interfaces": "^1.0.8" "@push.rocks/smartlog-interfaces": "^3.0.0"
} },
"browserslist": [
"last 1 chrome versions"
],
"files": [
"ts/**/*",
"ts_web/**/*",
"dist/**/*",
"dist_*/**/*",
"dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
"npmextra.json",
"readme.md"
],
"keywords": [
"logging",
"browser",
"development tools",
"typescript",
"npm package",
"browser console",
"log management",
"visual logging",
"smartlog",
"devtools"
],
"repository": {
"type": "git",
"url": "git+https://code.foss.global/push.rocks/smartlog-destination-devtools.git"
},
"bugs": {
"url": "https://code.foss.global/push.rocks/smartlog-destination-devtools/issues"
},
"homepage": "https://code.foss.global/push.rocks/smartlog-destination-devtools#readme",
"type": "module"
} }

6699
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

1
readme.hints.md Normal file

@ -0,0 +1 @@

107
readme.md Normal file

@ -0,0 +1,107 @@
# @push.rocks/smartlog-destination-devtools
beautiful logging for the browser
## Install
To install `@push.rocks/smartlog-destination-devtools`, use the following command in your project:
```sh
npm install @push.rocks/smartlog-destination-devtools --save
```
This will add `smartlog-destination-devtools` as a dependency to your project and you can start using it to enhance your logging in the browser.
## Usage
`@push.rocks/smartlog-destination-devtools` provides a seamless way to output beautified log messages directly to your browser's console, making use of the `@push.rocks/smartlog` ecosystem for structured and meaningful logging.
### Getting Started
First, ensure you have `@push.rocks/smartlog` installed in your project. If not, install it alongside `smartlog-destination-devtools`:
```sh
npm install @push.rocks/smartlog @push.rocks/smartlog-destination-devtools --save
```
Now, let's set up the basic usage of `smartlog-destination-devtools` within a TypeScript project.
### Initialization
Import the required modules and initialize `Smartlog` and `SmartlogDestinationDevtools`.
```typescript
import { Smartlog, ISmartlogOptions, ILogContext } from '@push.rocks/smartlog';
import { SmartlogDestinationDevtools } from '@push.rocks/smartlog-destination-devtools';
// Define your log context
const logContext: ILogContext = {
company: 'Your Company',
companyunit: 'Your Company Unit',
containerName: 'YourContainerName',
environment: 'development',
runtime: 'browser',
zone: 'frontend',
};
// Set up Smartlog options
const smartlogOptions: ISmartlogOptions = {
minimumLogLevel: 'info',
logContext: logContext,
};
// Initialize Smartlog with options
const smartlogInstance = new Smartlog(smartlogOptions);
// Initialize the DevTools destination
const devtoolsDestination = new SmartlogDestinationDevtools();
// Add the DevTools destination to Smartlog
smartlogInstance.addDestination(devtoolsDestination);
```
### Logging
Now that setup is complete, you can start logging messages. `@push.rocks/smartlog` uses a structured format for logs, which `@push.rocks/smartlog-destination-devtools` will beautifully display in the console.
```typescript
// Log an information message
smartlogInstance.info('This is an informational message', { optional: 'additional data' });
// Log a warning
smartlogInstance.warn('This is a warning message', { check: 'some warning data' });
// Log an error
smartlogInstance.error('This is an error message', new Error('Something went wrong'));
```
### Customization
`SmartlogDestinationDevtools` class is designed to automatically handle log messages sent through `@push.rocks/smartlog` and print them to the browser's console in a visually structured and highlighted manner. Currently, it translates different log levels (`info`, `warn`, `error`, `note`, `success`) to different styles in the DevTools console.
Since the core feature of `smartlog-destination-devtools` is to enhance the visual feedback of logs in the development environment, further customization can be achieved by altering the source code of the `handleLog` method within the class to fit your styling needs or by extending the class with your own implementation.
### Advanced Usage
For more advanced scenarios like filtering logs or integrating with other logging systems, refer to the `@push.rocks/smartlog` documentation, as `smartlog-destination-devtools` acts as a destination for the logs managed by `@push.rocks/smartlog`.
---
By integrating `@push.rocks/smartlog-destination-devtools`, you're equipped to make your browser-based debugging and logging more effective and visually appealing, leveraging the structured logging capabilities of `@push.rocks/smartlog`.
## 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.

57
test/test.browser.ts Normal file

@ -0,0 +1,57 @@
import { expect, tap } from '@push.rocks/tapbundle';
// preparation
import { type ILogContext } from '@push.rocks/smartlog-interfaces';
import * as smartlog from '@push.rocks/smartlog';
const logContext: ILogContext = {
company: 'Lossless GmbH',
companyunit: 'Lossless.Cloud',
containerName: 'testContainer',
environment: 'staging',
runtime: 'chrome',
zone: 'servezone',
};
const logger = new smartlog.Smartlog({
logContext,
});
// import the module to test
import * as smartlogDestinationDevtools from '../ts/index.js';
let testDestination: smartlogDestinationDevtools.SmartlogDestinationDevtools;
tap.test('first test', async () => {
testDestination = new smartlogDestinationDevtools.SmartlogDestinationDevtools();
});
tap.test('should log a normal message', async () => {
testDestination.handleLog({
timestamp: Date.now(),
type: 'log',
context: logContext,
level: 'info',
message: 'wait, what? Hi, this is a message!',
correlation: {
id: '123',
type: 'none',
},
});
});
tap.test('should log a success message', async () => {
testDestination.handleLog({
timestamp: Date.now(),
context: logContext,
type: 'log',
level: 'info',
message: 'success: Hi, this is a message!',
correlation: {
id: '123',
type: 'none',
},
});
});
tap.start();

@ -1,58 +0,0 @@
import { expect, tap } from 'tapbundle';
// preparation
import { ILogContext } from 'smartlog-interfaces';
import * as smartlog from 'smartlog'
const logger = smartlog.getDefaultLogger();
const logContext: ILogContext = {
company: 'Lossless GmbH',
companyunit: 'Lossless.Cloud',
containerName: 'testContainer',
environment: 'staging',
runtime: 'browser',
zone: 'serve.zone'
}
// import the module to test
import * as beautybrowser from '../ts/index';
let testBeautyBrowser: beautybrowser.BeautyBrowser;
tap.test('first test', async () => {
testBeautyBrowser = new beautybrowser.BeautyBrowser()
});
tap.test('should log a normal message', async () => {
testBeautyBrowser.handleLog({
logContext: logContext,
logLevel: 'info',
message: 'wait, what? Hi, this is a message!'
})
})
tap.test('should log a success message', async () => {
testBeautyBrowser.handleLog({
logContext: logContext,
logLevel: 'info',
message: 'success: Hi, this is a message!'
})
})
tap.test('should log a ok message', async () => {
testBeautyBrowser.handleLog({
logContext: logContext,
logLevel: 'info',
message: 'ok: Hi, this is a message!'
})
})
tap.test('should log a error message', async () => {
testBeautyBrowser.handleLog({
logContext: logContext,
logLevel: 'info',
message: 'error: Hi, this is a message!'
})
})
tap.start();

8
ts/00_commitinfo_data.ts Normal file

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@push.rocks/smartlog-destination-devtools',
version: '1.0.12',
description: 'A library enabling enhanced logging in browser development tools.'
}

@ -1,2 +0,0 @@
import * as smartlogInterfaces from 'smartlog-interfaces';
export { smartlogInterfaces };

@ -1,74 +1,57 @@
import * as plugins from './beautybrowser.plugins'; import * as plugins from './plugins.js';
import { ILogDestination, ILogPackage } from 'smartlog-interfaces'; import type { ILogDestination, ILogPackage } from '@push.rocks/smartlog-interfaces';
export interface IBeautyLogObject { export class SmartlogDestinationDevtools implements ILogDestination {
logType: string; public async handleLog(logPackageArg: ILogPackage) {
logString: string; await this.logInBrowser(logPackageArg);
} }
export class BeautyBrowser implements ILogDestination { private async logInBrowser(logPackage: ILogPackage) {
handleLog(logPackage: ILogPackage) { switch (logPackage.level) {
this.logInBrowser(this.parseLog(logPackage.message));
}
/**
* parse logs for display
*/
private parseLog = (stringToParseArg: string): IBeautyLogObject => {
const parseLogRegex = /^(success|ok|info|warn|error):\s(.*)/;
const regexResult = parseLogRegex.exec(stringToParseArg);
if(regexResult && regexResult.length === 3) {
return {
logType: regexResult[1],
logString: regexResult[2]
}
} else {
return {
logType: 'log',
logString: stringToParseArg
}
}
};
private logInBrowser(beautyLogObjectArg: IBeautyLogObject) {
const {logType, logString} = beautyLogObjectArg;
switch (logType) {
case 'error': case 'error':
console.log( console.log(
'%c Error: %c ' + logString, `%c Error: %c ${logPackage.message}`,
'background:#000000;color:#800000;', 'background:#000000;color:#800000;',
'color:#000000;' 'color:#000000;'
); );
break; break;
case 'info': case 'info':
console.log( console.log(
'%c Info: %c ' + logString, `%c Info: %c ${logPackage.message}`,
'background:#EC407A;color:#ffffff;', 'background:#EC407A;color:#ffffff;',
'color:#EC407A;' 'color:#EC407A;'
); );
break; break;
case 'ok': case 'ok':
console.log('%c OK: %c ' + logString, 'background:#000000;color:#8BC34A;', 'color:#000000;'); console.log(
`%c OK: %c ${logPackage.message}`,
'background:#000000;color:#8BC34A;',
'color:#000000;'
);
break; break;
case 'success': case 'success':
console.log( console.log(
'%c Success: %c ' + logString, `%c Success: %c ${logPackage.message}`,
'background:#8BC34A;color:#ffffff;', 'background:#8BC34A;color:#ffffff;',
'color:#8BC34A;' 'color:#8BC34A;'
); );
break; break;
case 'warn': case 'warn':
console.log( console.log(
'%c Warn: %c ' + logString, `%c Warn: %c ${logPackage.message}`,
'background:#000000;color:#FB8C00;', 'background:#000000;color:#FB8C00;',
'color:#000000;' 'color:#000000;'
); );
break; break;
case 'log': case 'note':
console.log('%c Log: %c ' + logString, 'background:#42A5F5;color:#ffffff', 'color:#42A5F5;'); console.log(
`%c Note: %c ${logPackage.message}`,
'background:#42A5F5;color:#ffffff',
'color:#42A5F5;'
);
break; break;
default: default:
console.log('unknown logType for "' + logString + '"'); console.log(`unknown logType for "${logPackage.message}"`);
break; break;
} }
} }

2
ts/plugins.ts Normal file

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

Some files were not shown because too many files have changed in this diff Show More