caravaggio
Advanced tools
Comparing version 1.3.5 to 1.3.6
# Changelog | ||
## 1.3.6 | ||
- Removed now example link in documentation until it's clear what to do about it | ||
- Now deploy is easier | ||
- Publish on npm and docker hub automatically! | ||
## 1.3.5 | ||
@@ -4,0 +9,0 @@ |
@@ -17,4 +17,2 @@ /** | ||
const path = require('path'); | ||
const ONE_YEAR = 60 * 60 * 24 * 365; | ||
@@ -35,6 +33,4 @@ | ||
*/ | ||
type: 'file', | ||
options: { | ||
basePath: path.resolve(__dirname, '../cache'), | ||
}, | ||
type: 'memory', | ||
options: {}, | ||
@@ -52,3 +48,4 @@ /** | ||
* options: { | ||
* limit: 100, // The limit expressed in MB. Can be false for no limit | ||
* limit: 100, // The limit expressed in MB. Can be false for no limit. | ||
* // Default to 100 | ||
* } | ||
@@ -55,0 +52,0 @@ * |
{ | ||
"name": "caravaggio", | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"description": "A blazing fast image processor service", | ||
@@ -9,2 +9,3 @@ "main": "index.js", | ||
"start": "NODE_ENV=production node .", | ||
"now-start": "bin/caravaggio --cache memory", | ||
"dev": "NODE_ENV=development micro-dev src/ -s | pino", | ||
@@ -16,2 +17,6 @@ "test": "npm run lint && npm run test-only -- --coverage --colors=false", | ||
}, | ||
"now": { | ||
"public": true, | ||
"type": "npm" | ||
}, | ||
"repository": { | ||
@@ -18,0 +23,0 @@ "type": "git", |
@@ -5,3 +5,4 @@ const fs = require('fs-extra'); | ||
module.exports = ({ basePath, subdir } = { basePath: os.tmpdir(), subdir: 'caravaggioCache' }) => { | ||
module.exports = ({ basePath } = { basePath: os.tmpdir() }) => { | ||
const subdir = 'caravaggioCache'; | ||
const baseDir = path.join(basePath, subdir); | ||
@@ -8,0 +9,0 @@ const getCompleteFilename = filename => path.join(baseDir, filename); |
@@ -24,3 +24,3 @@ | ||
module.exports = ({ limit } = { limit: false }) => ({ | ||
module.exports = ({ limit } = { limit: 100 }) => ({ | ||
flush: () => { | ||
@@ -27,0 +27,0 @@ persisted.files = {}; |
@@ -46,3 +46,4 @@ const redirect = require('micro-redirect'); | ||
} | ||
res.setHeader('content-type', await getMimeType(resource, options)); | ||
res.setHeader('Content-Type', await getMimeType(resource, options)); | ||
res.setHeader('Content-Length', resource.buffer.length); | ||
return send(res, 200, resource.buffer); | ||
@@ -49,0 +50,0 @@ } |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
41599
3