@dnax/core 0.45.0 → 0.45.2

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
@@ -720,6 +720,7 @@ function HonoInstance(): typeof app {
720
720
  cleanPath("uploads/" + folder + "/public/"),
721
721
  filename
722
722
  );
723
+
723
724
  const width = parseInt(c.req.query("w")) || null;
724
725
  const height = parseInt(c.req.query("h")) || null;
725
726
  const quality = parseInt(c.req.query("q")) || 80;
@@ -731,6 +732,8 @@ function HonoInstance(): typeof app {
731
732
 
732
733
  // Obtenir le type MIME du fichier
733
734
  const mimeType = mime.lookup(filePath);
735
+ c.header("X-Frame-Options", "ALLOWALL"); // Autoriser tout le monde
736
+ c.header("Content-Security-Policy", "frame-ancestors *"); // Autoriser toutes les origines
734
737
 
735
738
  // Si ce n'est pas une image, retourner le fichier original
736
739
  if (!mimeType || !mimeType?.startsWith("image/")) {
@@ -810,6 +813,12 @@ function HonoInstance(): typeof app {
810
813
  });
811
814
  }
812
815
 
816
+ app.onError((err, c) => {
817
+ console.error(err?.message);
818
+ c.status(500);
819
+ return c.json({ message: err?.message });
820
+ });
821
+
813
822
  return app;
814
823
  }
815
824
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.45.0",
3
+ "version": "0.45.2",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {
package/types/index.ts CHANGED
@@ -56,6 +56,8 @@ export type Actions =
56
56
  | "aggregate"
57
57
  | "upload";
58
58
 
59
+ type omitWhenType = "insertOne" | "insertMany" | "updateOne" | "updateMany";
60
+
59
61
  export type Field = {
60
62
  name: string;
61
63
  type: