fix(core): update

This commit is contained in:
Philipp Kunz 2020-06-11 10:38:19 +00:00
parent ca3286625d
commit 62ff7ec717
9 changed files with 130 additions and 90 deletions

4
.gitignore vendored
View File

@ -15,8 +15,6 @@ node_modules/
# builds # builds
dist/ dist/
dist_web/ dist_*/
dist_serve/
dist_ts_web/
# custom # custom

View File

@ -1,16 +1,16 @@
# gitzone ci_default # gitzone ci_default
image: hosttoday/ht-docker-node:npmci image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache: cache:
paths: paths:
- .npmci_cache/ - .npmci_cache/
key: "$CI_BUILD_STAGE" key: '$CI_BUILD_STAGE'
stages: stages:
- security - security
- test - test
- release - release
- metadata - metadata
# ==================== # ====================
# security stage # security stage
@ -20,17 +20,20 @@ mirror:
script: script:
- npmci git mirror - npmci git mirror
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
snyk: audit:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security stage: security
script: script:
- npmci npm prepare - npmci npm prepare
- npmci command npm install -g snyk
- npmci command npm 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 - notpriv
@ -38,19 +41,7 @@ snyk:
# test stage # test stage
# ==================== # ====================
testLTS: testStable:
stage: test
script:
- npmci npm prepare
- npmci node install lts
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
testSTABLE:
stage: test stage: test
script: script:
- npmci npm prepare - npmci npm prepare
@ -59,6 +50,20 @@ testSTABLE:
- npmci npm test - npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/ coverage: /\d+.?\d+?\%\s*coverage/
tags: tags:
- lossless
- 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 - docker
- notpriv - notpriv
@ -70,6 +75,7 @@ release:
only: only:
- tags - tags
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
@ -81,9 +87,11 @@ codequality:
allow_failure: true allow_failure: true
script: script:
- npmci command npm install -g tslint typescript - npmci command npm install -g tslint typescript
- npmci npm prepare
- npmci npm install - npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts" - npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags: tags:
- lossless
- docker - docker
- priv - priv
@ -94,18 +102,20 @@ trigger:
only: only:
- tags - tags
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
pages: pages:
image: hosttoday/ht-docker-node:npmci
stage: metadata stage: metadata
script: script:
- npmci node install lts
- npmci command npm install -g @gitzone/tsdoc - npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare - npmci npm prepare
- npmci npm install - npmci npm install
- npmci command tsdoc - npmci command tsdoc
tags: tags:
- lossless
- docker - docker
- notpriv - notpriv
only: only:

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

@ -0,0 +1,29 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "current file",
"type": "node",
"request": "launch",
"args": [
"${relativeFile}"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "test.ts",
"type": "node",
"request": "launch",
"args": [
"test/test.ts"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
}
]
}

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

View File

@ -1,26 +0,0 @@
# @pushrocks/smartlog-destination-local
a smartlog destination targeting the local console
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartlog-destination-local)
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartlog-destination-local)
* [github.com (source mirror)](https://github.com/pushrocks/smartlog-destination-local)
* [docs (typedoc)](https://pushrocks.gitlab.io/smartlog-destination-local/)
## Status for master
[![build status](https://gitlab.com/pushrocks/smartlog-destination-local/badges/master/build.svg)](https://gitlab.com/pushrocks/smartlog-destination-local/commits/master)
[![coverage report](https://gitlab.com/pushrocks/smartlog-destination-local/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartlog-destination-local/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartlog-destination-local.svg)](https://www.npmjs.com/package/@pushrocks/smartlog-destination-local)
[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartlog-destination-local/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartlog-destination-local)
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/)
## Usage
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://maintainedby.lossless.com)

View File

@ -4,6 +4,7 @@
"npmAccessLevel": "public" "npmAccessLevel": "public"
}, },
"gitzone": { "gitzone": {
"projectType": "npm",
"module": { "module": {
"githost": "gitlab.com", "githost": "gitlab.com",
"gitscope": "pushrocks", "gitscope": "pushrocks",

View File

@ -40,11 +40,13 @@
"tslint-config-prettier": "^1.18.0" "tslint-config-prettier": "^1.18.0"
}, },
"files": [ "files": [
"ts/*", "ts/**/*",
"ts_web/*", "ts_web/**/*",
"dist/*", "dist/**/*",
"dist_web/*", "dist_*/**/*",
"assets/*", "dist_ts/**/*",
"dist_ts_web/**/*",
"assets/**/*",
"cli.js", "cli.js",
"npmextra.json", "npmextra.json",
"readme.md" "readme.md"

View File

@ -46,13 +46,13 @@ export class DestinationLocal implements ILogDestination {
containerName: 'undefined', containerName: 'undefined',
environment: 'test', environment: 'test',
runtime: 'node', runtime: 'node',
zone: 'undefined', zone: 'undefined'
}, },
message: logTextArg, message: logTextArg,
correlation: { correlation: {
id: 'none', id: 'none',
type: 'none', type: 'none'
}, }
}); });
} }
} }
@ -87,49 +87,49 @@ export class DestinationLocal implements ILogDestination {
} = { } = {
silly: { silly: {
prefix: plugins.consolecolor.coloredString(' silly ', 'white', 'blue') + ' ', prefix: plugins.consolecolor.coloredString(' silly ', 'white', 'blue') + ' ',
textColor: 'blue', textColor: 'blue'
}, },
error: { error: {
prefix: prefix:
plugins.consolecolor.coloredString(' ', 'red', 'red') + plugins.consolecolor.coloredString(' ', 'red', 'red') +
plugins.consolecolor.coloredString(' ERROR! ', 'red', 'black') + plugins.consolecolor.coloredString(' ERROR! ', 'red', 'black') +
' ', ' ',
textColor: 'red', textColor: 'red'
}, },
info: { info: {
prefix: prefix:
plugins.consolecolor.coloredString(' ', 'blue', 'blue') + plugins.consolecolor.coloredString(' ', 'blue', 'blue') +
plugins.consolecolor.coloredString(' info: ', 'blue', 'black') + plugins.consolecolor.coloredString(' info: ', 'blue', 'black') +
' ', ' ',
textColor: 'white', textColor: 'white'
}, },
note: { note: {
prefix: prefix:
plugins.consolecolor.coloredString(' ', 'pink', 'pink') + plugins.consolecolor.coloredString(' ', 'pink', 'pink') +
plugins.consolecolor.coloredString(' note -> ', 'pink', 'black') + plugins.consolecolor.coloredString(' note -> ', 'pink', 'black') +
' ', ' ',
textColor: 'pink', textColor: 'pink'
}, },
ok: { ok: {
prefix: prefix:
plugins.consolecolor.coloredString(' ', 'green', 'green') + plugins.consolecolor.coloredString(' ', 'green', 'green') +
plugins.consolecolor.coloredString(' ok ', 'green', 'black') + plugins.consolecolor.coloredString(' ok ', 'green', 'black') +
' ', ' ',
textColor: 'green', textColor: 'green'
}, },
success: { success: {
prefix: prefix:
plugins.consolecolor.coloredString(' ', 'green', 'green') + plugins.consolecolor.coloredString(' ', 'green', 'green') +
plugins.consolecolor.coloredString(' SUCCESS! ', 'green', 'black') + plugins.consolecolor.coloredString(' SUCCESS! ', 'green', 'black') +
' ', ' ',
textColor: 'green', textColor: 'green'
}, },
warn: { warn: {
prefix: prefix:
plugins.consolecolor.coloredString(' ', 'orange', 'orange') + plugins.consolecolor.coloredString(' ', 'orange', 'orange') +
plugins.consolecolor.coloredString(' WARN -> ', 'orange', 'black') + plugins.consolecolor.coloredString(' WARN -> ', 'orange', 'black') +
' ', ' ',
textColor: 'orange', textColor: 'orange'
}, }
}; };
} }

View File

@ -2,4 +2,4 @@ import * as consolecolor from '@pushrocks/consolecolor';
import * as smartlogInterfaces from '@pushrocks/smartlog-interfaces'; import * as smartlogInterfaces from '@pushrocks/smartlog-interfaces';
import * as smartpromise from '@pushrocks/smartpromise'; import * as smartpromise from '@pushrocks/smartpromise';
export { consolecolor, smartlogInterfaces, smartpromise}; export { consolecolor, smartlogInterfaces, smartpromise };