caravaggio
Advanced tools
Comparing version 1.3.0 to 1.3.1
# Changelog | ||
## 1.3.1 | ||
- Cli global program | ||
- Documentation on master | ||
## 1.3.0 | ||
@@ -4,0 +9,0 @@ |
@@ -78,3 +78,3 @@ /** | ||
* Logger definition. Define how the application should log event | ||
* level: The log level. One among: fatal, error, warn, info, debug | ||
* level: The log level. One among: fatal, error, warn, info, debug, trace, silent | ||
* The log will appear from your choosen level and upon, i.e. | ||
@@ -84,2 +84,3 @@ * (error -> error, fatal) | ||
* stream: Where to stream the log. Can be `stdout`, `stderr` or a file path | ||
* pretty: Print a pretty out instead of the json one | ||
*/ | ||
@@ -89,2 +90,3 @@ logger: { | ||
stream: 'stdout', | ||
pretty: false, | ||
}, | ||
@@ -91,0 +93,0 @@ |
{ | ||
"name": "caravaggio", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "A blazing fast image processor service", | ||
"main": "index.js", | ||
"bin": "bin/caravaggio", | ||
"scripts": { | ||
"start": "NODE_ENV=production node .", | ||
"dev": "NODE_ENV=development micro-dev src/ -s | bunyan", | ||
"dev": "NODE_ENV=development micro-dev src/ -s | pino", | ||
"test": "npm run lint && npm run test-only -- --coverage --colors=false", | ||
@@ -28,5 +29,4 @@ "test-only": "NODE_ENV=test ALLOW_CONFIG_MUTATIONS=true jest", | ||
}, | ||
"homepage": "https://gitlab.com/ramiel/caravaggio#README", | ||
"homepage": "https://gitlab.com/ramiel/caravaggio", | ||
"dependencies": { | ||
"bunyan": "^1.8.12", | ||
"config": "^1.29.2", | ||
@@ -39,3 +39,5 @@ "configuration": "^0.1.1", | ||
"node-fetch": "^2.0.0-alpha.9", | ||
"sharp": "^0.19.0" | ||
"pino": "^4.10.4", | ||
"sharp": "^0.19.0", | ||
"yargs": "^11.0.0" | ||
}, | ||
@@ -42,0 +44,0 @@ "devDependencies": { |
const config = require('config'); | ||
const bunyan = require('bunyan'); | ||
const pino = require('pino'); | ||
const { level, stream } = config.get('logger'); | ||
const streams = ['stderr', 'stdout'].indexOf(stream.toLowerCase()) | ||
? [{ | ||
level, | ||
stream: process[stream.toLowerCase()], | ||
}] | ||
: [{ | ||
level, | ||
path: stream, | ||
}]; | ||
const { level, stream, pretty } = config.get('logger'); | ||
const outStream = ['stderr', 'stdout'].indexOf(stream.toLowerCase()) | ||
? process[stream.toLowerCase()] | ||
: process.stdout; | ||
module.exports = bunyan.createLogger({ | ||
module.exports = pino({ | ||
name: 'caravaggio', | ||
streams, | ||
}); | ||
level, | ||
prettyPrint: pretty, | ||
}, outStream); | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1315239
1
10
46
883
+ Addedpino@^4.10.4
+ Addedyargs@^11.0.0
+ Addedansi-regex@2.1.13.0.1(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedcamelcase@4.1.0(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcliui@4.1.0(transitive)
+ Addedcode-point-at@1.1.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addedcross-spawn@6.0.6(transitive)
+ Addeddecamelize@1.2.0(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedexeca@1.0.0(transitive)
+ Addedfast-json-parse@1.0.3(transitive)
+ Addedfast-safe-stringify@1.2.3(transitive)
+ Addedfind-up@2.1.0(transitive)
+ Addedflatstr@1.0.12(transitive)
+ Addedget-caller-file@1.0.3(transitive)
+ Addedget-stream@4.1.0(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedinvert-kv@2.0.0(transitive)
+ Addedis-fullwidth-code-point@1.0.02.0.0(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedlcid@2.0.0(transitive)
+ Addedlocate-path@2.0.0(transitive)
+ Addedmap-age-cleaner@0.1.3(transitive)
+ Addedmem@4.3.0(transitive)
+ Addedmimic-fn@2.1.0(transitive)
+ Addednice-try@1.0.5(transitive)
+ Addednpm-run-path@2.0.2(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedos-locale@3.1.0(transitive)
+ Addedp-defer@1.0.0(transitive)
+ Addedp-finally@1.0.0(transitive)
+ Addedp-is-promise@2.1.0(transitive)
+ Addedp-limit@1.3.0(transitive)
+ Addedp-locate@2.0.0(transitive)
+ Addedp-try@1.0.0(transitive)
+ Addedpath-exists@3.0.0(transitive)
+ Addedpath-key@2.0.1(transitive)
+ Addedpino@4.17.6(transitive)
+ Addedpino-std-serializers@2.5.0(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedquick-format-unescaped@1.1.2(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedrequire-directory@2.1.1(transitive)
+ Addedrequire-main-filename@1.0.1(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedshebang-command@1.2.0(transitive)
+ Addedshebang-regex@1.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsplit2@2.2.0(transitive)
+ Addedstring-width@1.0.22.1.1(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-ansi@3.0.14.0.0(transitive)
+ Addedstrip-eof@1.0.0(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedthrough2@2.0.5(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwhich-module@2.0.1(transitive)
+ Addedwrap-ansi@2.1.0(transitive)
+ Addedxtend@4.0.2(transitive)
+ Addedy18n@3.2.2(transitive)
+ Addedyargs@11.1.1(transitive)
+ Addedyargs-parser@9.0.2(transitive)
- Removedbunyan@^1.8.12
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedbunyan@1.8.15(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddtrace-provider@0.8.8(transitive)
- Removedglob@6.0.4(transitive)
- Removedinflight@1.0.6(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedmoment@2.30.1(transitive)
- Removedmv@2.1.1(transitive)
- Removedncp@2.0.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedrimraf@2.4.5(transitive)
- Removedsafe-json-stringify@1.2.0(transitive)