@golemio/core 1.2.17-dev.622549513 → 1.2.17-dev.623758334
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/dist/integration-engine/connectors/MongoConnector.js +4 -9
- package/dist/integration-engine/connectors/MongoConnector.js.map +1 -1
- package/dist/output-gateway/database/MongoDatabase.js +3 -5
- package/dist/output-gateway/database/MongoDatabase.js.map +1 -1
- package/dist/output-gateway/models/MongoModel.d.ts +3 -1
- package/dist/schema-definitions/ErrorLog.d.ts +25 -1
- package/package.json +3 -3
|
@@ -24,17 +24,12 @@ class MyMongoose {
|
|
|
24
24
|
if (!config_1.config.MONGO_CONN) {
|
|
25
25
|
throw new errors_1.CustomError("The ENV variable MONGO_CONN cannot be undefined.", true, this.constructor.name, 6003);
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
bufferMaxEntries: 0,
|
|
27
|
+
const connectOptions = {
|
|
28
|
+
bufferCommands: false,
|
|
30
29
|
connectTimeoutMS: 90000,
|
|
31
|
-
reconnectInterval: 5000,
|
|
32
|
-
reconnectTries: Number.MAX_VALUE,
|
|
33
30
|
socketTimeoutMS: 90000,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
useNewUrlParser: true,
|
|
37
|
-
});
|
|
31
|
+
};
|
|
32
|
+
yield mongoose_1.default.connect(config_1.config.MONGO_CONN, connectOptions);
|
|
38
33
|
mongoose_1.default.connection.on("disconnected", () => {
|
|
39
34
|
helpers_1.log.error("MongoDB disconnected!");
|
|
40
35
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MongoConnector.js","sourceRoot":"","sources":["../../../src/integration-engine/connectors/MongoConnector.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4CAA4D;AAC5D,
|
|
1
|
+
{"version":3,"file":"MongoConnector.js","sourceRoot":"","sources":["../../../src/integration-engine/connectors/MongoConnector.ts"],"names":[],"mappings":";;;;;;;;;;;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AAE,IAAI,EAAE,GAAG,CAAC,CAAC;aACxG;QACL,CAAC,CAAA,CAAC;QAEK,kBAAa,GAAG,GAAwB,EAAE;YAC7C,IAAI,kBAAQ,CAAC,UAAU,CAAC,UAAU,KAAK,CAAC,EAAE;gBACtC,MAAM,IAAI,oBAAW,CACjB,kEAAkE,EAClE,KAAK,EACL,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,IAAI,CACP,CAAC;aACL;YACD,OAAO,kBAAQ,CAAC,UAAU,CAAC;QAC/B,CAAC,CAAC;QAEK,gBAAW,GAAG,GAA2B,EAAE;YAC9C,OAAO,kBAAQ,CAAC,UAAU,CAAC,UAAU,KAAK,CAAC,CAAC;QAChD,CAAC,CAAA,CAAC;QAEK,eAAU,GAAG,GAAwB,EAAE;YAC1C,aAAG,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;YACtC,OAAO,kBAAQ,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACvC,CAAC,CAAA,CAAC;IACN,CAAC;CAAA;AAED,MAAM,cAAc,GAAG,IAAI,UAAU,EAAE,CAAC;AAE/B,wCAAc"}
|
|
@@ -29,13 +29,11 @@ class MongoDatabase {
|
|
|
29
29
|
if (!this.connectionString || this.connectionString === "YOUR CONNECTION STRING GOES HERE") {
|
|
30
30
|
throw new Error("Undefined connection string.");
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
const connectOptions = {
|
|
33
33
|
connectTimeoutMS: this.connectTimeoutMS,
|
|
34
34
|
serverSelectionTimeoutMS: this.connectTimeoutMS,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
useUnifiedTopology: true,
|
|
38
|
-
});
|
|
35
|
+
};
|
|
36
|
+
yield mongoose_1.default.connect(this.connectionString, connectOptions);
|
|
39
37
|
mongoose_1.default.connection.on("disconnected", () => {
|
|
40
38
|
Logger_1.log.error("Mongo DB disconnected!");
|
|
41
39
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MongoDatabase.js","sourceRoot":"","sources":["../../../src/output-gateway/database/MongoDatabase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4CAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"MongoDatabase.js","sourceRoot":"","sources":["../../../src/output-gateway/database/MongoDatabase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4CAA8C;AAC9C,wDAAoD;AACpD,sCAAoC;AACpC,sCAAiC;AAEjC;;GAEG;AACH,MAAa,aAAa;IAItB,+BAA+B;IAC/B;QAKA,qBAAqB;QACd,YAAO,GAAG,GAAuC,EAAE;YACtD,IAAI;gBACA,IAAI,CAAC,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,gBAAgB,KAAK,kCAAkC,EAAE;oBACxF,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;iBACnD;gBACD,MAAM,cAAc,GAAmB;oBACnC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;oBACvC,wBAAwB,EAAE,IAAI,CAAC,gBAAgB;iBAClD,CAAC;gBAEF,MAAM,kBAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;gBAE9D,kBAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,cAAc,EAAE,GAAG,EAAE;oBACxC,YAAG,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;gBACxC,CAAC,CAAC,CAAC;gBAEH,kBAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,aAAa,EAAE,GAAG,EAAE;oBACvC,YAAG,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;gBAC5D,CAAC,CAAC,CAAC;gBAEH,kBAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;oBACpC,YAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACnB,CAAC,CAAC,CAAC;gBAEH,YAAG,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;gBACnC,OAAO,kBAAQ,CAAC,UAAU,CAAC;aAC9B;YAAC,OAAO,GAAG,EAAE;gBACV,YAAG,CAAC,KAAK,CAAC,uBAAuB,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC;gBAC3D,MAAM,IAAI,oBAAW,CAAC,oCAAoC,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;aAClG;QACL,CAAC,CAAA,CAAC;QAEK,gBAAW,GAAG,GAA2B,EAAE;YAC9C,OAAO,kBAAQ,CAAC,UAAU,CAAC,UAAU,KAAK,CAAC,CAAC;QAChD,CAAC,CAAA,CAAC;QAEK,eAAU,GAAG,GAAwB,EAAE;YAC1C,YAAG,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;YACtC,OAAO,kBAAQ,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACvC,CAAC,CAAA,CAAC;QA5CE,IAAI,CAAC,gBAAgB,GAAG,eAAM,CAAC,gBAAgB,CAAC;QAChD,IAAI,CAAC,gBAAgB,GAAG,eAAM,CAAC,aAAa,CAAC;IACjD,CAAC;CA2CJ;AAnDD,sCAmDC;AAED,MAAM,kBAAkB,GAAG,IAAI,aAAa,EAAE,CAAC,OAAO,EAAE,CAAC;AAEhD,gDAAkB"}
|
|
@@ -28,7 +28,9 @@ export declare abstract class MongoModel extends BaseModel {
|
|
|
28
28
|
/**
|
|
29
29
|
* Returns current schema of the data
|
|
30
30
|
*/
|
|
31
|
-
GetSchema: () => Promise<Schema<
|
|
31
|
+
GetSchema: () => Promise<Schema<any, Model<any, any, any, any, any>, {}, {}, {}, {}, "type", {
|
|
32
|
+
[x: string]: any;
|
|
33
|
+
}>>;
|
|
32
34
|
/**
|
|
33
35
|
* Specifies where is the primary ID of the entity.
|
|
34
36
|
* Searches by this selection in FindOne()
|
|
@@ -1,9 +1,33 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
1
24
|
/// <reference types="mongoose" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
2
26
|
import { ModelAttributes } from "sequelize";
|
|
3
27
|
declare const forExport: {
|
|
4
28
|
name: string;
|
|
5
29
|
outputMongooseSchemaObject: {
|
|
6
|
-
[path: string]:
|
|
30
|
+
[path: string]: import("mongoose").SchemaDefinitionProperty<undefined>;
|
|
7
31
|
};
|
|
8
32
|
outputSequelizeAttributes: ModelAttributes<any, any>;
|
|
9
33
|
pgTableName: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/core",
|
|
3
|
-
"version": "1.2.17-dev.
|
|
3
|
+
"version": "1.2.17-dev.623758334",
|
|
4
4
|
"description": "Golemio Core Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@golemio/errors": "^1.0.1",
|
|
68
68
|
"@golemio/utils": "^1.0.0",
|
|
69
|
-
"@golemio/validator": "0.2.
|
|
69
|
+
"@golemio/validator": "0.2.4-dev.623627646",
|
|
70
70
|
"@google-cloud/storage": "^5.18.0",
|
|
71
71
|
"@opentelemetry/api": "1.0.4",
|
|
72
72
|
"@opentelemetry/exporter-jaeger": "^1.2.0",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"luxon": "^2.3.2",
|
|
108
108
|
"moment-timezone": "^0.5.26",
|
|
109
109
|
"mongodb-restore-dump": "1.0.1",
|
|
110
|
-
"mongoose": "^5.3
|
|
110
|
+
"mongoose": "^6.5.3",
|
|
111
111
|
"morgan": "^1.10.0",
|
|
112
112
|
"opentelemetry-instrumentation-mongoose": "^0.27.1",
|
|
113
113
|
"opentelemetry-instrumentation-sequelize": "^0.27.1",
|