@runnerpro/backend 1.6.30 → 1.6.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,11 +60,14 @@ const reduceSizeImage = (file, newWidth = 100, quality = 80) => __awaiter(void 0
60
60
  exports.reduceSizeImage = reduceSizeImage;
61
61
  const rotateOrientationImage = (image, file) => __awaiter(void 0, void 0, void 0, function* () {
62
62
  const orientation = yield exifr_1.default.orientation(file);
63
- // let rotate;
64
- // if ([7, 8].includes(orientation)) rotate = 90;
65
- // else if ([3].includes(orientation)) rotate = 180;
66
- // else if ([5, 8].includes(orientation)) rotate = -90;
67
- // if (rotate) image = await image.rotate(rotate);
68
- // return image;
69
- return image.rotate(90);
63
+ let rotate;
64
+ if ([6, 7].includes(orientation))
65
+ rotate = 90;
66
+ else if ([3].includes(orientation))
67
+ rotate = 180;
68
+ else if ([5, 8].includes(orientation))
69
+ rotate = -90;
70
+ if (rotate)
71
+ image = yield image.rotate(rotate);
72
+ return image;
70
73
  });
@@ -1 +1 @@
1
- {"version":3,"file":"reduceSizeImage.d.ts","sourceRoot":"","sources":["../../../../src/image/reduceSizeImage.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,eAAe,kEAqCpB,CAAC;AAcF,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"reduceSizeImage.d.ts","sourceRoot":"","sources":["../../../../src/image/reduceSizeImage.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,eAAe,kEAqCpB,CAAC;AAaF,OAAO,EAAE,eAAe,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runnerpro/backend",
3
- "version": "1.6.30",
3
+ "version": "1.6.32",
4
4
  "description": "A collection of common backend functions",
5
5
  "exports": {
6
6
  ".": "./lib/cjs/index.js"