@dnax/core 0.14.2 → 0.14.4

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.
@@ -23,6 +23,11 @@ async function connectToMongo(t: Tenant) {
23
23
  console.error(error?.message);
24
24
  t.database.isConnected = false;
25
25
  });
26
+
27
+ client.on("close", () => {
28
+ t.database.isConnected = false;
29
+ connectToMongo(t);
30
+ });
26
31
  });
27
32
  }
28
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.14.2",
3
+ "version": "0.14.4",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {
@@ -34,6 +34,7 @@
34
34
  "consola": "^3.2.3",
35
35
  "cookie": "^0.6.0",
36
36
  "croner": "^8.1.1",
37
+ "deepcopy": "^2.1.0",
37
38
  "dot-object": "^2.1.5",
38
39
  "find-open-port": "^2.0.3",
39
40
  "fs-extra": "^11.2.0",
@@ -41,7 +42,7 @@
41
42
  "groq-sdk": "^0.8.0",
42
43
  "hono": "^4.6.3",
43
44
  "joi": "^17.13.3",
44
- "json-joy": "^16.8.0",
45
+ "json-joy": "16.8.0",
45
46
  "jsonwebtoken": "^9.0.2",
46
47
  "mime-types": "^2.1.35",
47
48
  "mingo": "^6.4.15",
@@ -52,6 +53,7 @@
52
53
  "openai": "^4.72.0",
53
54
  "pidusage": "^3.0.2",
54
55
  "radash": "^12.1.0",
56
+ "rfc6902": "^5.1.2",
55
57
  "sharp": "^0.33.5",
56
58
  "signaldb": "^0.18.0",
57
59
  "socket.io": "^4.8.1",
package/utils/index.ts CHANGED
@@ -12,14 +12,18 @@ import collect from "collect.js";
12
12
  import * as uuid from "uuid";
13
13
  import * as urlencode from "urlencode";
14
14
  import dotJson from "dot-object";
15
- import deepClone from "deep-clone";
15
+ import deepCopy from "deepcopy";
16
+ import { applyPatch, createPatch, Pointer } from "rfc6902";
16
17
 
17
18
  const JWT_SECRET = process?.env?.JWT_SECRET || "secret-libv";
18
19
  import * as _ from "radash";
19
20
  import { email } from "../lib/mail";
20
21
 
22
+ import { deepEqual } from "json-joy/lib/json-equal/deepEqual";
23
+ //import {applyPatch} from "json-joy/lib/json-patch"
24
+
21
25
  function copy(data: object): object | any {
22
- return deepClone(data);
26
+ return deepCopy(data);
23
27
  }
24
28
 
25
29
  const jwt = {
@@ -349,4 +353,7 @@ export {
349
353
  urlencode,
350
354
  stringToBoolean,
351
355
  copy,
356
+ deepEqual,
357
+ applyPatch,
358
+ createPatch,
352
359
  };