@vizydrop/logger
Advanced tools
+43
-33
| stages: | ||
| - prepare | ||
| - test | ||
| - publish | ||
| - prepare | ||
| - test | ||
| - publish | ||
| variables: | ||
| VERSION_OUTPUT_PATH: version.txt | ||
| VERSION_OUTPUT_PATH: version.txt | ||
| prepare:version: | ||
| stage: prepare | ||
| image: targetprocess/gitversion:latest | ||
| script: | ||
| - git-version '/showvariable' SemVer | tee ${VERSION_OUTPUT_PATH} | ||
| artifacts: | ||
| expire_in: 2 days | ||
| paths: | ||
| - ${VERSION_OUTPUT_PATH} | ||
| stage: prepare | ||
| image: apptiouw2.jfrog.io/targetprocess-docker/gitversion:latest | ||
| script: | ||
| - git-version '/showvariable' SemVer | tee ${VERSION_OUTPUT_PATH} | ||
| artifacts: | ||
| expire_in: 2 days | ||
| paths: | ||
| - ${VERSION_OUTPUT_PATH} | ||
| test:package: | ||
| stage: test | ||
| dependencies: | ||
| - prepare:version | ||
| image: node:10-alpine | ||
| script: | ||
| - yarn install | ||
| - yarn lint | ||
| - yarn test | ||
| stage: test | ||
| dependencies: | ||
| - prepare:version | ||
| image: node:10-alpine | ||
| script: | ||
| - yarn install | ||
| - yarn lint | ||
| - yarn test | ||
| cache: | ||
| key: "node_modules" | ||
| policy: pull # remove this to invalidate cache | ||
| paths: | ||
| - node_modules/ | ||
| artifacts: | ||
| expire_in: 2 days | ||
| reports: | ||
| junit: | ||
| - junit.xml | ||
| publish:npm: | ||
| stage: publish | ||
| dependencies: | ||
| - prepare:version | ||
| - test:package | ||
| image: node:10-alpine | ||
| rules: | ||
| - if: $PUBLISH | ||
| - if: $CI_COMMIT_TAG | ||
| script: | ||
| - APP_VERSION=`cat ${VERSION_OUTPUT_PATH}` | ||
| - sed "s/999.999.999/$APP_VERSION/g" "package.json" > temp_package.json && mv temp_package.json "package.json" | ||
| - echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ~/.npmrc | ||
| - npm publish | ||
| stage: publish | ||
| dependencies: | ||
| - prepare:version | ||
| - test:package | ||
| image: node:10-alpine | ||
| rules: | ||
| - if: $PUBLISH | ||
| - if: $CI_COMMIT_TAG | ||
| script: | ||
| - APP_VERSION=`cat ${VERSION_OUTPUT_PATH}` | ||
| - sed "s/999.999.999/$APP_VERSION/g" "package.json" > temp_package.json && mv temp_package.json "package.json" | ||
| - echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ~/.npmrc | ||
| - npm publish |
+11
-0
@@ -6,2 +6,7 @@ const winston = require(`winston`); | ||
| winston.addColors({ | ||
| trace: `bold blue`, | ||
| fatal: `bold red`, | ||
| }); | ||
| function getFormats(mode, correlationIdConfig) { | ||
@@ -64,3 +69,9 @@ const {format} = winston; | ||
| const levels = { | ||
| ...winston.config.cli.levels, | ||
| trace: 4, | ||
| fatal: 0, | ||
| }; | ||
| const logger = winston.createLogger({ | ||
| levels, | ||
| format: winston.format.combine( | ||
@@ -67,0 +78,0 @@ ...getFormats(mode, correlationIdConfig), |
@@ -38,5 +38,11 @@ const {convertErrors} = require(`./plugins/convertErrors`); | ||
| }, | ||
| trace(...params) { | ||
| return wrapper.log(`trace`, ...params); | ||
| }, | ||
| error(...params) { | ||
| return wrapper.log(`error`, ...params); | ||
| }, | ||
| fatal(...params) { | ||
| return wrapper.log(`fatal`, ...params); | ||
| }, | ||
| warn(...params) { | ||
@@ -43,0 +49,0 @@ return wrapper.log(`warn`, ...params); |
+2
-1
| { | ||
| "name": "@vizydrop/logger", | ||
| "version": "1.9.4", | ||
| "version": "1.10.0", | ||
| "description": "Vizydrop predefined logger based on winston v3", | ||
@@ -51,2 +51,3 @@ "main": "index.js", | ||
| "jest": "^25.3.0", | ||
| "jest-junit": "^12.0.0", | ||
| "koa": "^2.11.0", | ||
@@ -53,0 +54,0 @@ "koa-router": "^8.0.8", |
+1
-1
@@ -1,1 +0,1 @@ | ||
| 1.2.1-us352069-migrate-to-gitlab.51 | ||
| 1.10.0 |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
18277
2.81%400
4.17%0
-100%23
4.55%