@file-storage/image-manipulation
Advanced tools
Comparing version 1.3.1 to 1.3.3
@@ -19,2 +19,3 @@ "use strict"; | ||
const config_1 = require("./config"); | ||
const { parse, format } = path_1.posix; | ||
const settings = { | ||
@@ -45,3 +46,3 @@ sizeOptimization: true, | ||
const thumbnailName = `thumbnail_${file.name}`; | ||
const parsedPath = path_1.parse(file.path); | ||
const parsedPath = parse(file.path); | ||
parsedPath.base = thumbnailName; | ||
@@ -57,3 +58,3 @@ return { | ||
buffer: newBuff, | ||
path: `${path_1.format(parsedPath)}`, | ||
path: `${format(parsedPath)}`, | ||
}; | ||
@@ -111,3 +112,3 @@ } | ||
const name = `${key}_${file.name}`; | ||
const parsedPath = path_1.parse(file.path); | ||
const parsedPath = parse(file.path); | ||
parsedPath.base = name; | ||
@@ -125,3 +126,3 @@ return { | ||
buffer: newBuff, | ||
path: `${path_1.format(parsedPath)}`, | ||
path: `${format(parsedPath)}`, | ||
}, | ||
@@ -128,0 +129,0 @@ }; |
{ | ||
"name": "@file-storage/image-manipulation", | ||
"version": "1.3.1", | ||
"version": "1.3.3", | ||
"description": "Image manipulation for file-storage", | ||
@@ -33,3 +33,3 @@ "author": "Dang Nguyen <haidang009@gmail.com>", | ||
"devDependencies": { | ||
"@file-storage/common": "^1.3.1", | ||
"@file-storage/common": "^1.3.3", | ||
"@types/sharp": "^0.28.5", | ||
@@ -39,3 +39,3 @@ "rimraf": "~3.0.2", | ||
}, | ||
"gitHead": "4c0f12f87f96a2fe42a15df89aa201808c3c3387" | ||
"gitHead": "4d470e71a9a24b7acc0d6f82ac536dacfdd19a4d" | ||
} |
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
13947
305