@dnax/core 0.7.6 → 0.7.8

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.
@@ -1,11 +1,11 @@
1
1
  import type { Tenant } from "../../types";
2
-
2
+ import { encode, decode, parse, stringify } from "urlencode";
3
3
  import { MongoClient } from "mongodb";
4
4
  import { consola } from "consola";
5
5
  async function connectToMongo(t: Tenant) {
6
6
  return new Promise(async (resolve, reject) => {
7
7
  let client = new MongoClient(
8
- t?.database?.uri || "mongodb://localhost:27017",
8
+ encode(t?.database?.uri) || "mongodb://localhost:27017",
9
9
  {
10
10
  ...(t?.database?.options || {}),
11
11
  }
@@ -790,7 +790,10 @@ class useRest {
790
790
  update = omit(update, omitUpdate);
791
791
 
792
792
  if (update.$set) {
793
+ // update.$set = deepSetId(col, update.$set);
793
794
  update.$set = deepSetId(col, update.$set);
795
+ update.$set = transformAllDate(update.$set);
796
+ update.$set = await hashPasswordAuto(update.$set, col);
794
797
  var { valid, output, error } = this.validator(
795
798
  collection,
796
799
  update.$set,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.7.6",
3
+ "version": "0.7.8",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {
@@ -38,9 +38,10 @@
38
38
  "mongodb": "^6.8.0",
39
39
  "nodemailer": "^6.9.14",
40
40
  "radash": "^12.1.0",
41
- "signaldb": "^0.15.0",
41
+ "signaldb": "^0.18.0",
42
42
  "socket.io": "^4.7.5",
43
43
  "ufo": "^1.5.3",
44
+ "urlencode": "^2.0.0",
44
45
  "uuid": "^10.0.0"
45
46
  }
46
47
  }