@dnax/core 0.15.5 → 0.15.7

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.
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
@@ -775,7 +775,7 @@ class useRest {
775
775
  if (update?.$set) {
776
776
  update.$set = deepSetId(
777
777
  col,
778
- omit(update.$set, ["createdAt", "updatedAt"])
778
+ omit(update.$set, ["createdAt", "updatedAt", "_id"])
779
779
  );
780
780
  update.$set = transformAllDate(update.$set);
781
781
  update.$set = await hashPasswordAuto(update.$set, col);
@@ -783,7 +783,7 @@ class useRest {
783
783
  //update.$set = deepSetId(col, update.$set);
784
784
  var { valid, output, error } = this.validator(
785
785
  collection,
786
- dotJson.object(update?.$set),
786
+ dotJson.object(update.$set),
787
787
  {
788
788
  partial: true,
789
789
  }
@@ -1030,7 +1030,7 @@ class useRest {
1030
1030
  if (update.$set) {
1031
1031
  update.$set = deepSetId(
1032
1032
  col,
1033
- omit(update.$set, ["createdAt", "updatedAt"])
1033
+ omit(update.$set, ["createdAt", "updatedAt", "_id"])
1034
1034
  );
1035
1035
  update.$set = transformAllDate(update.$set);
1036
1036
  update.$set = await hashPasswordAuto(update.$set, col);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.15.5",
3
+ "version": "0.15.7",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {