caravaggio
Advanced tools
Comparing version 2.0.0 to 2.0.1
# Changelog | ||
## 2.0.1 | ||
- Fix memory persistor, now MB are MB, not kB! | ||
- A favicon is correctly shown | ||
- Minor fixes | ||
## 2.0.0 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "caravaggio", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "A blazing fast image processor service", | ||
@@ -26,2 +26,4 @@ "main": "index.js", | ||
"image", | ||
"proxy", | ||
"manipulation", | ||
"processor", | ||
@@ -51,2 +53,3 @@ "service" | ||
"eslint-config-airbnb-base": "^12.1.0", | ||
"eslint-import-resolver-jest": "^2.0.0", | ||
"eslint-plugin-import": "^2.8.0", | ||
@@ -53,0 +56,0 @@ "eslint-plugin-jest": "^21.7.0", |
@@ -12,3 +12,3 @@ [![caravaggio logo](https://res.cloudinary.com/ramiel/image/upload/c_scale,r_0,w_100/v1517679412/caravaggio-logo_xdwpin.jpg)](https://res.cloudinary.com/ramiel/image/upload/c_scale,r_0,w_100/v1517679412/caravaggio-logo_xdwpin.jpg) | ||
From version `2.x` this project is ready for production. If you have still version 1.x, upgrade. There is no migration guide since | ||
From version `2.x` this project is ready for production. If you have still version 1.x, upgrade please. There is no migration guide since | ||
the first version was intended for test only | ||
@@ -52,3 +52,3 @@ | ||
Please, refer to the [documentation](http://localhost:3000/caravaggio/docs/general-usage.html) to know what are the available operations | ||
Please, refer to the [documentation](https://ramiel.gitlab.io/caravaggio/docs/docs.html) to know what are the available operations | ||
@@ -55,0 +55,0 @@ |
@@ -7,2 +7,4 @@ | ||
const BToMB = B => Math.round((B / 1024 / 1024) * 100) / 100; | ||
const checkMemory = (limit, filename) => { | ||
@@ -21,4 +23,3 @@ if (limit && limit > 0) { | ||
const increaseSize = (length) => { | ||
const lengthInMb = Math.round((length / 1024) * 100) / 100; | ||
persisted.size += lengthInMb; | ||
persisted.size += BToMB(length); | ||
}; | ||
@@ -25,0 +26,0 @@ |
const { router, get } = require('microrouter'); | ||
const indexRoute = require('./routes/index'); | ||
const favicon = require('./routes/favicon'); | ||
const Cache = require('./cache'); | ||
@@ -8,8 +9,11 @@ const errorHandler = require('./middlewares/errorHandler'); | ||
module.exports = config => ({ persistor, whitelist }) => router(get( | ||
'/*/*', | ||
compose( | ||
errorHandler, | ||
domainWhitelist(whitelist), | ||
)(indexRoute(config)(Cache(persistor))), | ||
)); | ||
module.exports = config => async ({ persistor, whitelist }) => router( | ||
get('/favicon.ico', await favicon()), | ||
get( | ||
'/*/*', | ||
compose( | ||
errorHandler, | ||
domainWhitelist(whitelist), | ||
)(indexRoute(config)(Cache(persistor))), | ||
), | ||
); |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
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
53869
58
1337
9
4
2