@dnax/core 0.7.8 → 0.8.0
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/driver/mongo/connect.ts +2 -2
- package/package.json +1 -1
- package/utils/index.ts +2 -0
package/driver/mongo/connect.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Tenant } from "../../types";
|
|
2
|
-
|
|
2
|
+
|
|
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
|
-
|
|
8
|
+
t?.database?.uri || "mongodb://localhost:27017",
|
|
9
9
|
{
|
|
10
10
|
...(t?.database?.options || {}),
|
|
11
11
|
}
|
package/package.json
CHANGED
package/utils/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ import generateUniqueId from "generate-unique-id";
|
|
|
9
9
|
import dayjs from "dayjs";
|
|
10
10
|
import { Otp } from "../lib/opt";
|
|
11
11
|
import collect from "collect.js";
|
|
12
|
+
import * as urlencode from "urlencode";
|
|
12
13
|
|
|
13
14
|
const JWT_SECRET = process?.env?.JWT_SECRET || "secret-libv";
|
|
14
15
|
import * as _ from "radash";
|
|
@@ -315,4 +316,5 @@ export {
|
|
|
315
316
|
omit, // Omit utils
|
|
316
317
|
collect, // Collect utils
|
|
317
318
|
Otp, // Otp utils
|
|
319
|
+
urlencode,
|
|
318
320
|
};
|