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 1.3.2 to 1.3.3

2

package.json
{
"name": "caravaggio",
"version": "1.3.2",
"version": "1.3.3",
"description": "A blazing fast image processor service",

@@ -5,0 +5,0 @@ "main": "index.js",

module.exports = value => ({
transformations: [
[{
{
name: 'blur',
operation: 'blur',
params: [value && parseFloat(value, 10)],
}],
},
],
});
module.exports = value => ({
transformations: [
[
{
name: 'flip',
operation: !value || value.toLowerCase() === 'x' ? 'flop' : 'flip',
params: [true],
},
],
{
name: 'flip',
operation: !value || value.toLowerCase() === 'x' ? 'flop' : 'flip',
params: [true],
},
],
});

@@ -65,5 +65,5 @@ const blurNormalizer = require('./blur');

});
// console.log(JSON.stringify(result, null, ' '));
return result;
};
};
const logger = require('../logger');
const reducer = async (acc, { /* name, */ operation, params }) => acc.then(async (pipeline) => {
const reducer = async (acc, { name, operation, params }) => acc.then(async (pipeline) => {
if (operation instanceof Function) {
return (await operation(pipeline)).reduce(reducer, Promise.resolve(pipeline));
}
// console.log(acc, operation);
if (!pipeline.hasOperation(operation)) {
throw new Error(`Invalid operation: ${operation}`);
throw new Error(`Invalid operation: ${name}:${operation}`);
}

@@ -10,0 +11,0 @@ logger.debug(`Applying transformation "${operation}" with parameters: ${JSON.stringify(params, null, '')}`);

@@ -14,3 +14,3 @@ const { URL } = require('url');

const options = parseOptions(req.params._[0]);
const url = new URL(req.params._[1]);
const url = new URL(decodeURIComponent(req.params._[1]));
const resource = await cache.get(url, options);

@@ -17,0 +17,0 @@ if (resource) {

@@ -46,3 +46,3 @@ const redirect = require('micro-redirect');

}
res.setHeader('Content-type', await getMimeType(resource, options));
res.setHeader('content-type', await getMimeType(resource, options));
return send(res, 200, resource.buffer);

@@ -49,0 +49,0 @@ }

Sorry, the diff of this file is not supported yet

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