@dnax/core 0.15.5 → 0.15.6

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.
Files changed (2) hide show
  1. package/app/hono.ts +2 -3
  2. package/package.json +1 -1
package/app/hono.ts CHANGED
@@ -503,9 +503,8 @@ function HonoInstance(): typeof app {
503
503
 
504
504
  // Obtenir le type MIME du fichier
505
505
  const mimeType = mime.lookup(filePath);
506
-
507
506
  // Si ce n'est pas une image, retourner le fichier original
508
- if (!mimeType || !mimeType.startsWith("image/")) {
507
+ if (!mimeType || !mimeType?.startsWith("image/")) {
509
508
  const originalFile = fs.readFileSync(filePath);
510
509
  return c.body(originalFile, 200, {
511
510
  "Content-Type": mimeType || "application/octet-stream",
@@ -518,7 +517,7 @@ function HonoInstance(): typeof app {
518
517
  .resize(width, height, {
519
518
  fit: crop || "contain",
520
519
  })
521
- .jpeg({ quality })
520
+ .png({ quality })
522
521
  .toBuffer();
523
522
 
524
523
  // Retourner l'image redimensionnée
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.15.5",
3
+ "version": "0.15.6",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {