@brimble/models 1.3.19 → 1.3.20
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/.turbo/turbo-build.log +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -2
- package/index.ts +5 -1
- package/package.json +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
[32m@brimble/models:build: [0mcache hit, replaying output [
|
|
1
|
+
[32m@brimble/models:build: [0mcache hit, replaying output [2mb985931a71ed5fe9[0m
|
|
2
2
|
[32m@brimble/models:build: [0m$ tsc -p .
|
package/dist/index.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ export { default as Token } from "./token";
|
|
|
8
8
|
export { IUser, IGit, IProject, IFollowing, IIntegration, IEnv, IDomain, IToken, } from "./types";
|
|
9
9
|
export { GIT_TYPE, INTEGRATION_TYPE, OAUTH_PERMISSIONS, ENVIRONMENT } from "./enum";
|
|
10
10
|
export declare const connectToMongo: (mongoUrl: string) => Promise<void>;
|
|
11
|
+
export declare const closeMongo: () => void;
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.connectToMongo = void 0;
|
|
15
|
+
exports.closeMongo = exports.connectToMongo = void 0;
|
|
16
16
|
var user_1 = require("./user");
|
|
17
17
|
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return user_1.default; } });
|
|
18
18
|
var project_1 = require("./project");
|
|
@@ -34,7 +34,7 @@ Object.defineProperty(exports, "OAUTH_PERMISSIONS", { enumerable: true, get: fun
|
|
|
34
34
|
Object.defineProperty(exports, "ENVIRONMENT", { enumerable: true, get: function () { return enum_1.ENVIRONMENT; } });
|
|
35
35
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
36
36
|
const utils_1 = require("@brimble/utils");
|
|
37
|
-
// Connection to Mongo
|
|
37
|
+
// Connection to Mongo
|
|
38
38
|
exports.connectToMongo = (mongoUrl) => __awaiter(void 0, void 0, void 0, function* () {
|
|
39
39
|
const options = { useNewUrlParser: true, useUnifiedTopology: true };
|
|
40
40
|
mongoose_1.default.set("useFindAndModify", false);
|
|
@@ -51,3 +51,6 @@ exports.connectToMongo = (mongoUrl) => __awaiter(void 0, void 0, void 0, functio
|
|
|
51
51
|
return process.exit(1);
|
|
52
52
|
});
|
|
53
53
|
});
|
|
54
|
+
exports.closeMongo = () => {
|
|
55
|
+
mongoose_1.default.connection.close(true);
|
|
56
|
+
};
|
package/index.ts
CHANGED
|
@@ -20,7 +20,7 @@ export { GIT_TYPE, INTEGRATION_TYPE, OAUTH_PERMISSIONS, ENVIRONMENT } from "./en
|
|
|
20
20
|
import mongoose from "mongoose";
|
|
21
21
|
import { log } from "@brimble/utils";
|
|
22
22
|
|
|
23
|
-
// Connection to Mongo
|
|
23
|
+
// Connection to Mongo
|
|
24
24
|
export const connectToMongo = async (mongoUrl: string): Promise<void> => {
|
|
25
25
|
const options = { useNewUrlParser: true, useUnifiedTopology: true };
|
|
26
26
|
mongoose.set("useFindAndModify", false);
|
|
@@ -40,3 +40,7 @@ export const connectToMongo = async (mongoUrl: string): Promise<void> => {
|
|
|
40
40
|
return process.exit(1);
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
|
+
|
|
44
|
+
export const closeMongo = () => {
|
|
45
|
+
mongoose.connection.close(true);
|
|
46
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brimble/models",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.20",
|
|
4
4
|
"description": "Brimble models",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@brimble/utils": "^1.3.
|
|
31
|
+
"@brimble/utils": "^1.3.8",
|
|
32
32
|
"dotenv": "^8.2.0",
|
|
33
33
|
"mongoose": "^5.8.11",
|
|
34
34
|
"uuid": "^8.3.2"
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"ts-node": "^8.10.2",
|
|
44
44
|
"typescript": "^3.9.5"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "f94a643b9b48a4c5f16186507e6986822d498647"
|
|
47
47
|
}
|