Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

caravaggio

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caravaggio - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

src/routes/favicon.js

6

CHANGELOG.md
# 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 @@

5

package.json
{
"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",

4

README.md

@@ -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))),
),
);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc