@dnax/core 0.70.4 → 0.70.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.
package/app/hono.ts CHANGED
@@ -578,7 +578,7 @@ function HonoInstance(): typeof app {
578
578
 
579
579
  // find
580
580
  if (action == "find") {
581
- if (col?.cache?.fetch && useCache) {
581
+ if (!col?.cache?.fetch && useCache) {
582
582
  // la fonctionnalité de cache n'est pas configuré
583
583
  return fn.error(`Cache features not configured`, 400);
584
584
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.70.4",
3
+ "version": "0.70.6",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {},
package/utils/index.ts CHANGED
@@ -551,10 +551,10 @@ function containsForbiddenOperators(
551
551
  }
552
552
 
553
553
  // create key hash with bun hash
554
- async function useKey(
554
+ function useKey(
555
555
  key: object | string,
556
556
  algorithm: SupportedCryptoAlgorithms = "sha256"
557
- ) {
557
+ ): string {
558
558
  if (!key) throw new Error("key is required");
559
559
  let hashKey = null;
560
560
  if (typeof key == "string") {
@@ -567,6 +567,7 @@ async function useKey(
567
567
  let hasher = new Bun.CryptoHasher(algorithm || "sha256");
568
568
  hasher.update(hashKey as any);
569
569
  let n = hasher.digest("base64");
570
+ return n;
570
571
  }
571
572
 
572
573
  const contextError = ContextError;