biz-email-builder-shared 1.6.89 → 1.6.90
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,3 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { ConnectOptions } from "mongoose";
|
|
2
|
+
export declare const connectDB: (mongoURI: string, options?: ConnectOptions) => Promise<void>;
|
|
2
3
|
export declare const disconnectDB: () => Promise<void>;
|
|
3
4
|
//# sourceMappingURL=db.config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.config.d.ts","sourceRoot":"","sources":["../../src/config/db.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"db.config.d.ts","sourceRoot":"","sources":["../../src/config/db.config.ts"],"names":[],"mappings":"AAAA,OAAiB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEpD,eAAO,MAAM,SAAS,aAAoB,MAAM,YAAY,cAAc,KAAG,OAAO,CAAC,IAAI,CAQxF,CAAC;AAEF,eAAO,MAAM,YAAY,QAAa,OAAO,CAAC,IAAI,CAOjD,CAAC"}
|
package/dist/config/db.config.js
CHANGED
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.disconnectDB = exports.connectDB = void 0;
|
|
7
7
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
8
|
-
const connectDB = async (mongoURI) => {
|
|
8
|
+
const connectDB = async (mongoURI, options) => {
|
|
9
9
|
try {
|
|
10
|
-
await mongoose_1.default.connect(mongoURI);
|
|
10
|
+
await mongoose_1.default.connect(mongoURI, options || {});
|
|
11
11
|
console.log("Connected to DB");
|
|
12
12
|
}
|
|
13
13
|
catch (error) {
|