@golemio/core 1.6.6 → 1.6.7-dev.846525251

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.
Files changed (84) hide show
  1. package/README.md +0 -1
  2. package/bin/import-test-data.js +0 -72
  3. package/dist/helpers/HealthCheck.d.ts +0 -1
  4. package/dist/helpers/HealthCheck.js +0 -1
  5. package/dist/helpers/HealthCheck.js.map +1 -1
  6. package/dist/integration-engine/config/IntegrationEngineConfiguration.d.ts +0 -1
  7. package/dist/integration-engine/config/IntegrationEngineConfiguration.js +0 -1
  8. package/dist/integration-engine/config/IntegrationEngineConfiguration.js.map +1 -1
  9. package/dist/integration-engine/config/abstract.d.ts +0 -1
  10. package/dist/integration-engine/connectors/index.d.ts +0 -6
  11. package/dist/integration-engine/connectors/index.js +1 -6
  12. package/dist/integration-engine/connectors/index.js.map +1 -1
  13. package/dist/integration-engine/datasources/IDataSource.d.ts +2 -2
  14. package/dist/integration-engine/ioc/ContainerToken.d.ts +0 -1
  15. package/dist/integration-engine/ioc/ContainerToken.js +0 -1
  16. package/dist/integration-engine/ioc/ContainerToken.js.map +1 -1
  17. package/dist/integration-engine/ioc/Di.js +0 -2
  18. package/dist/integration-engine/ioc/Di.js.map +1 -1
  19. package/dist/integration-engine/models/IModel.d.ts +0 -12
  20. package/dist/integration-engine/models/PostgresModel.js +1 -1
  21. package/dist/integration-engine/models/PostgresModel.js.map +1 -1
  22. package/dist/integration-engine/models/index.d.ts +0 -1
  23. package/dist/integration-engine/models/index.js +0 -1
  24. package/dist/integration-engine/models/index.js.map +1 -1
  25. package/dist/monitoring/opentelemetry/instrumentation/configs/index.d.ts +0 -1
  26. package/dist/monitoring/opentelemetry/instrumentation/configs/index.js +1 -3
  27. package/dist/monitoring/opentelemetry/instrumentation/configs/index.js.map +1 -1
  28. package/dist/monitoring/opentelemetry/instrumentation/index.d.ts +1 -2
  29. package/dist/monitoring/opentelemetry/instrumentation/index.js +0 -2
  30. package/dist/monitoring/opentelemetry/instrumentation/index.js.map +1 -1
  31. package/dist/monitoring/sentry/sentry-provider.js +0 -1
  32. package/dist/monitoring/sentry/sentry-provider.js.map +1 -1
  33. package/dist/output-gateway/Geo.d.ts +1 -1
  34. package/dist/output-gateway/config/OutputGatewayConfiguration.d.ts +0 -3
  35. package/dist/output-gateway/config/OutputGatewayConfiguration.js +0 -11
  36. package/dist/output-gateway/config/OutputGatewayConfiguration.js.map +1 -1
  37. package/dist/output-gateway/database/index.d.ts +1 -30
  38. package/dist/output-gateway/database/index.js +1 -6
  39. package/dist/output-gateway/database/index.js.map +1 -1
  40. package/dist/output-gateway/ioc/ContainerToken.d.ts +0 -1
  41. package/dist/output-gateway/ioc/ContainerToken.js +0 -1
  42. package/dist/output-gateway/ioc/ContainerToken.js.map +1 -1
  43. package/dist/output-gateway/ioc/Di.js +0 -2
  44. package/dist/output-gateway/ioc/Di.js.map +1 -1
  45. package/dist/output-gateway/models/index.d.ts +0 -3
  46. package/dist/output-gateway/models/index.js +0 -3
  47. package/dist/output-gateway/models/index.js.map +1 -1
  48. package/dist/output-gateway/routes/index.d.ts +0 -2
  49. package/dist/output-gateway/routes/index.js +0 -2
  50. package/dist/output-gateway/routes/index.js.map +1 -1
  51. package/package.json +3 -6
  52. package/dist/integration-engine/connectors/MongoConnector.d.ts +0 -15
  53. package/dist/integration-engine/connectors/MongoConnector.js +0 -89
  54. package/dist/integration-engine/connectors/MongoConnector.js.map +0 -1
  55. package/dist/integration-engine/connectors/interfaces/IMongoConnector.d.ts +0 -7
  56. package/dist/integration-engine/connectors/interfaces/IMongoConnector.js +0 -3
  57. package/dist/integration-engine/connectors/interfaces/IMongoConnector.js.map +0 -1
  58. package/dist/integration-engine/models/MongoModel.d.ts +0 -42
  59. package/dist/integration-engine/models/MongoModel.js +0 -245
  60. package/dist/integration-engine/models/MongoModel.js.map +0 -1
  61. package/dist/monitoring/opentelemetry/instrumentation/configs/mongoose.d.ts +0 -2
  62. package/dist/monitoring/opentelemetry/instrumentation/configs/mongoose.js +0 -20
  63. package/dist/monitoring/opentelemetry/instrumentation/configs/mongoose.js.map +0 -1
  64. package/dist/output-gateway/database/MongoDatabase.d.ts +0 -19
  65. package/dist/output-gateway/database/MongoDatabase.js +0 -89
  66. package/dist/output-gateway/database/MongoDatabase.js.map +0 -1
  67. package/dist/output-gateway/models/GeoJsonModel.d.ts +0 -56
  68. package/dist/output-gateway/models/GeoJsonModel.js +0 -188
  69. package/dist/output-gateway/models/GeoJsonModel.js.map +0 -1
  70. package/dist/output-gateway/models/HistoryModel.d.ts +0 -30
  71. package/dist/output-gateway/models/HistoryModel.js +0 -96
  72. package/dist/output-gateway/models/HistoryModel.js.map +0 -1
  73. package/dist/output-gateway/models/MongoModel.d.ts +0 -74
  74. package/dist/output-gateway/models/MongoModel.js +0 -87
  75. package/dist/output-gateway/models/MongoModel.js.map +0 -1
  76. package/dist/output-gateway/routes/HistoryRouter.d.ts +0 -7
  77. package/dist/output-gateway/routes/HistoryRouter.js +0 -46
  78. package/dist/output-gateway/routes/HistoryRouter.js.map +0 -1
  79. package/dist/output-gateway/routes/RouterBuilder.d.ts +0 -70
  80. package/dist/output-gateway/routes/RouterBuilder.js +0 -92
  81. package/dist/output-gateway/routes/RouterBuilder.js.map +0 -1
  82. package/dist/shared/mongoose.d.ts +0 -2
  83. package/dist/shared/mongoose.js +0 -7
  84. package/dist/shared/mongoose.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/database/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gCAAiE;AAIjE;;GAEG;AACH,MAAM,kBAAkB,GAAG,4BAAsB,CAAC,OAAO,CAAgB,oBAAc,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE,CAAC;AAWxG,gDAAkB;AAV3B;;GAEG;AACH,MAAM,mBAAmB,GAAG,4BAAsB,CAAC,OAAO,CAAY,oBAAc,CAAC,mBAAmB,CAAC,CAAC;AAO7E,kDAAmB;AANhD;;GAEG;AACH,MAAM,2BAA2B,GAAG,4BAAsB,CAAC,OAAO,CAAY,oBAAc,CAAC,2BAA2B,CAAC,CAAC;AAGxE,kEAA2B;AAD7E,oDAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/database/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gCAAiE;AAGjE;;GAEG;AACH,MAAM,mBAAmB,GAAG,4BAAsB,CAAC,OAAO,CAAY,oBAAc,CAAC,mBAAmB,CAAC,CAAC;AAOjG,kDAAmB;AAN5B;;GAEG;AACH,MAAM,2BAA2B,GAAG,4BAAsB,CAAC,OAAO,CAAY,oBAAc,CAAC,2BAA2B,CAAC,CAAC;AAG5F,kEAA2B;AADzD,oDAAkC"}
@@ -8,7 +8,6 @@ declare const ContainerToken: {
8
8
  SequelizeConnection: symbol;
9
9
  RedisConnector: symbol;
10
10
  CacheMiddleware: symbol;
11
- MongoDatabase: symbol;
12
11
  FeatureFlagService: symbol;
13
12
  FeatureFlagServiceWrapper: symbol;
14
13
  };
@@ -11,7 +11,6 @@ const ContainerToken = {
11
11
  SequelizeConnection: Symbol(),
12
12
  RedisConnector: Symbol(),
13
13
  CacheMiddleware: Symbol(),
14
- MongoDatabase: Symbol(),
15
14
  FeatureFlagService: Symbol(),
16
15
  FeatureFlagServiceWrapper: Symbol(),
17
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ContainerToken.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/ContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,cAAc,GAAG;IACnB,MAAM,EAAE,MAAM,EAAE;IAChB,MAAM,EAAE,MAAM,EAAE;IAChB,YAAY,EAAE,MAAM,EAAE;IACtB,aAAa,EAAE,MAAM,EAAE;IACvB,gBAAgB,EAAE,MAAM,EAAE;IAC1B,2BAA2B,EAAE,MAAM,EAAE;IACrC,mBAAmB,EAAE,MAAM,EAAE;IAC7B,cAAc,EAAE,MAAM,EAAE;IACxB,eAAe,EAAE,MAAM,EAAE;IACzB,aAAa,EAAE,MAAM,EAAE;IACvB,kBAAkB,EAAE,MAAM,EAAE;IAC5B,yBAAyB,EAAE,MAAM,EAAE;CACtC,CAAC;AAEO,wCAAc"}
1
+ {"version":3,"file":"ContainerToken.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/ContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,cAAc,GAAG;IACnB,MAAM,EAAE,MAAM,EAAE;IAChB,MAAM,EAAE,MAAM,EAAE;IAChB,YAAY,EAAE,MAAM,EAAE;IACtB,aAAa,EAAE,MAAM,EAAE;IACvB,gBAAgB,EAAE,MAAM,EAAE;IAC1B,2BAA2B,EAAE,MAAM,EAAE;IACrC,mBAAmB,EAAE,MAAM,EAAE;IAC7B,cAAc,EAAE,MAAM,EAAE;IACxB,eAAe,EAAE,MAAM,EAAE;IACzB,kBAAkB,EAAE,MAAM,EAAE;IAC5B,yBAAyB,EAAE,MAAM,EAAE;CACtC,CAAC;AAEO,wCAAc"}
@@ -5,7 +5,6 @@ const _helpers_1 = require("../../helpers");
5
5
  const Di_1 = require("../../helpers/ioc/Di");
6
6
  const OutputGatewayConfiguration_1 = require("../config/OutputGatewayConfiguration");
7
7
  const FeatureFlagServiceWrapper_1 = require("../data-access/FeatureFlagServiceWrapper");
8
- const MongoDatabase_1 = require("../database/MongoDatabase");
9
8
  const PostgreDatabase_1 = require("../database/PostgreDatabase");
10
9
  const CacheMiddleware_1 = require("../redis/CacheMiddleware");
11
10
  const RedisConnector_1 = require("../redis/RedisConnector");
@@ -35,7 +34,6 @@ OutputGatewayContainer.register(ContainerToken_1.ContainerToken.PostgresDatabase
35
34
  .register(ContainerToken_1.ContainerToken.SequelizeConnection, {
36
35
  useFactory: (0, tsyringe_1.instanceCachingFactory)((c) => c.resolve(ContainerToken_1.ContainerToken.PostgresDatabase).connect(config.postgres_connection || "")),
37
36
  })
38
- .registerSingleton(ContainerToken_1.ContainerToken.MongoDatabase, MongoDatabase_1.MongoDatabase)
39
37
  .registerSingleton(ContainerToken_1.ContainerToken.RedisConnector, RedisConnector_1.RedisConnector)
40
38
  .registerSingleton(ContainerToken_1.ContainerToken.CacheMiddleware, CacheMiddleware_1.CacheMiddleware)
41
39
  .register(ContainerToken_1.ContainerToken.FeatureFlagServiceWrapper, FeatureFlagServiceWrapper_1.FeatureFlagServiceWrapper, singletonOptions)
@@ -1 +1 @@
1
- {"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,4CAAsE;AACtE,6CAAkD;AAClD,qFAAmF;AACnF,wFAAsF;AACtF,6DAA2D;AAC3D,iEAAgE;AAChE,8DAA4D;AAC5D,4DAA0D;AAC1D,uCAA6D;AAC7D,qDAAkD;AAElD,wBAAwB;AACxB,MAAM,gBAAgB,GAAG,EAAE,SAAS,EAAE,oBAAS,CAAC,SAAS,EAAE,CAAC;AAC5D,MAAM,sBAAsB,GAAG,oBAAe,CAAC,oBAAoB,EAAE,CAAC;AAgD7D,wDAAsB;AA/C/B,YAAY;AAEZ,iBAAiB;AACjB,sBAAsB,CAAC,iBAAiB,CAAC,+BAAc,CAAC,MAAM,EAAE,uDAA0B,CAAC,CAAC;AAC5F,MAAM,MAAM,GAAG,sBAAsB,CAAC,OAAO,CAA6B,+BAAc,CAAC,MAAM,CAAC,CAAC;AAEjG,sBAAsB,CAAC,QAAQ,CAAU,+BAAc,CAAC,MAAM,EAAE;IAC5D,UAAU,EAAE,IAAA,iCAAsB,EAAC,GAAG,EAAE,CACpC,IAAA,uBAAY,EAAC;QACT,WAAW,EAAE,gBAAgB;QAC7B,OAAO,EAAE,MAAM,CAAC,QAAQ;QACxB,QAAQ,EAAE,MAAM,CAAC,SAAS;KAC7B,CAAC,CACL;CACJ,CAAC,CAAC,gBAAgB,CACf,+BAAc,CAAC,aAAa,EAC5B,IAAA,8BAAmB,EAAC,MAAM,CAAC,QAAQ,EAA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,EAAC,CAAC,CAAC,EAAE,EAAE,CACrC,CAAC,CAAC,OAAO,CAAmB,+BAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,6BAA6B,IAAI,EAAE,CAAC,CACnH;CACJ,CAAC;KACD,QAAQ,CAAC,+BAAc,CAAC,mBAAmB,EAAE;IAC1C,UAAU,EAAE,IAAA,iCAAsB,EAAC,CAAC,CAAC,EAAE,EAAE,CACrC,CAAC,CAAC,OAAO,CAAmB,+BAAc,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,mBAAmB,IAAI,EAAE,CAAC,CACzG;CACJ,CAAC;KACD,iBAAiB,CAAC,+BAAc,CAAC,cAAc,EAAE,+BAAc,CAAC;KAChE,iBAAiB,CAAC,+BAAc,CAAC,eAAe,EAAE,iCAAe,CAAC;KAClE,QAAQ,CAAC,+BAAc,CAAC,yBAAyB,EAAE,qDAAyB,EAAE,gBAAgB,CAAC;KAC/F,QAAQ,CAAC,+BAAc,CAAC,kBAAkB,EAAE;IACzC,UAAU,EAAE,IAAA,iCAAsB,EAC9B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAA4B,+BAAc,CAAC,yBAAyB,CAAC,CAAC,OAAO,CAChG;CACJ,CAAC,CAAC"}
@@ -1,6 +1,3 @@
1
1
  export * from "./BaseModel";
2
2
  export * from "./SequelizeModel";
3
- export * from "./MongoModel";
4
- export * from "./GeoJsonModel";
5
- export * from "./HistoryModel";
6
3
  export * from "./response";
@@ -16,8 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./BaseModel"), exports);
18
18
  __exportStar(require("./SequelizeModel"), exports);
19
- __exportStar(require("./MongoModel"), exports);
20
- __exportStar(require("./GeoJsonModel"), exports);
21
- __exportStar(require("./HistoryModel"), exports);
22
19
  __exportStar(require("./response"), exports);
23
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,mDAAiC;AACjC,+CAA6B;AAC7B,iDAA+B;AAC/B,iDAA+B;AAC/B,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,mDAAiC;AACjC,6CAA2B"}
@@ -1,4 +1,2 @@
1
1
  export * from "./GeoJsonRouter";
2
- export * from "./HistoryRouter";
3
- export * from "./RouterBuilder";
4
2
  export * from "./interfaces/IGeoJsonAllFilterParameters";
@@ -15,7 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./GeoJsonRouter"), exports);
18
- __exportStar(require("./HistoryRouter"), exports);
19
- __exportStar(require("./RouterBuilder"), exports);
20
18
  __exportStar(require("./interfaces/IGeoJsonAllFilterParameters"), exports);
21
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/routes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,kDAAgC;AAChC,kDAAgC;AAChC,2EAAyD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/routes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,2EAAyD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/core",
3
- "version": "1.6.6",
3
+ "version": "1.6.7-dev.846525251",
4
4
  "description": "Golemio Core Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  "engines": {
30
30
  "node": ">=18.0.0",
31
31
  "npm": ">=8.0.0",
32
- "yarn": "Use npm!"
32
+ "yarn": ">=1.22.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@commitlint/cli": "^16.2.1",
@@ -73,7 +73,7 @@
73
73
  "@abraham/reflection": "^0.10.0",
74
74
  "@azure/storage-blob": "^12.11.0",
75
75
  "@golemio/errors": "1.1.1",
76
- "@golemio/validator": "0.3.1",
76
+ "@golemio/validator": "0.3.2-dev.833945190",
77
77
  "@google-cloud/storage": "^5.18.0",
78
78
  "@opentelemetry/api": "1.0.4",
79
79
  "@opentelemetry/exporter-jaeger": "^1.2.0",
@@ -114,9 +114,6 @@
114
114
  "lightship": "^6.7.2",
115
115
  "luxon": "^2.5.2",
116
116
  "moment-timezone": "^0.5.26",
117
- "mongodb-restore-dump": "1.0.1",
118
- "mongoose": "^6.6.5",
119
- "opentelemetry-instrumentation-mongoose": "^0.27.1",
120
117
  "opentelemetry-instrumentation-sequelize": "^0.27.1",
121
118
  "path-to-regexp": "^6.2.0",
122
119
  "pg": "^8.6.0",
@@ -1,15 +0,0 @@
1
- import { ILogger } from "../../helpers";
2
- import { IConfiguration } from "../config";
3
- import mongoose from "mongoose";
4
- import { Disposable } from "tsyringe";
5
- import { IMongoConnector } from "./interfaces/IMongoConnector";
6
- export declare class MongoConnector implements IMongoConnector, Disposable {
7
- private readonly log;
8
- private mongoConn;
9
- constructor(config: IConfiguration, log: ILogger);
10
- connect: () => Promise<mongoose.Connection>;
11
- getConnection: () => mongoose.Connection;
12
- isConnected: () => Promise<boolean>;
13
- disconnect: () => Promise<void>;
14
- dispose: () => Promise<void>;
15
- }
@@ -1,89 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- var __importDefault = (this && this.__importDefault) || function (mod) {
24
- return (mod && mod.__esModule) ? mod : { "default": mod };
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.MongoConnector = void 0;
28
- const ioc_1 = require("../ioc");
29
- const errors_1 = require("@golemio/errors");
30
- const mongoose_1 = __importDefault(require("mongoose"));
31
- const tsyringe_1 = require("tsyringe");
32
- let MongoConnector = class MongoConnector {
33
- constructor(config, log) {
34
- this.log = log;
35
- this.connect = () => __awaiter(this, void 0, void 0, function* () {
36
- try {
37
- if (!this.mongoConn) {
38
- throw new errors_1.CustomError("The ENV variable MONGO_CONN cannot be undefined.", true, this.constructor.name, 6003);
39
- }
40
- const connectOptions = {
41
- bufferCommands: false,
42
- connectTimeoutMS: 90000,
43
- socketTimeoutMS: 90000,
44
- };
45
- yield mongoose_1.default.connect(this.mongoConn, connectOptions);
46
- mongoose_1.default.connection.on("disconnected", () => {
47
- this.log.error("MongoDB disconnected!");
48
- });
49
- mongoose_1.default.connection.on("reconnected", () => {
50
- this.log.warn("MongoDB reconnected after connection lost.");
51
- });
52
- mongoose_1.default.connection.on("error", (err) => {
53
- this.log.error(err);
54
- });
55
- this.log.info("Connected to MongoDB!");
56
- return mongoose_1.default.connection;
57
- }
58
- catch (err) {
59
- this.log.error("Could not connect to " + this.mongoConn);
60
- throw new errors_1.CustomError("Error while connecting to MongoDB.", false, this.constructor.name, 1001, err);
61
- }
62
- });
63
- this.getConnection = () => {
64
- if (mongoose_1.default.connection.readyState !== 1) {
65
- throw new errors_1.CustomError("Mongoose connection does not exist. First call connect() method.", false, this.constructor.name, 1002);
66
- }
67
- return mongoose_1.default.connection;
68
- };
69
- this.isConnected = () => __awaiter(this, void 0, void 0, function* () {
70
- return mongoose_1.default.connection.readyState === 1;
71
- });
72
- this.disconnect = () => __awaiter(this, void 0, void 0, function* () {
73
- this.log.info("MongoDB disconnect called");
74
- return mongoose_1.default.connection.close();
75
- });
76
- this.dispose = () => __awaiter(this, void 0, void 0, function* () {
77
- yield this.disconnect();
78
- });
79
- this.mongoConn = config.MONGO_CONN;
80
- }
81
- };
82
- MongoConnector = __decorate([
83
- (0, tsyringe_1.injectable)(),
84
- __param(0, (0, tsyringe_1.inject)(ioc_1.ContainerToken.Config)),
85
- __param(1, (0, tsyringe_1.inject)(ioc_1.ContainerToken.Logger)),
86
- __metadata("design:paramtypes", [Object, Object])
87
- ], MongoConnector);
88
- exports.MongoConnector = MongoConnector;
89
- //# sourceMappingURL=MongoConnector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MongoConnector.js","sourceRoot":"","sources":["../../../src/integration-engine/connectors/MongoConnector.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,gCAAyC;AACzC,4CAA8C;AAC9C,wDAAoD;AACpD,uCAA0D;AAI1D,IAAa,cAAc,GAA3B,MAAa,cAAc;IAGvB,YACmC,MAAsB,EACL,GAAY;QAAZ,QAAG,GAAH,GA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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,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;YAC3C,OAAO,kBAAQ,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACvC,CAAC,CAAA,CAAC;QAEK,YAAO,GAAG,GAAwB,EAAE;YACvC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QAC5B,CAAC,CAAA,CAAC;QA3DE,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC;IACvC,CAAC;CA2DJ,CAAA;AAnEY,cAAc;IAD1B,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,oBAAc,CAAC,MAAM,CAAC,CAAA;IAC7B,WAAA,IAAA,iBAAM,EAAC,oBAAc,CAAC,MAAM,CAAC,CAAA;;GALzB,cAAc,CAmE1B;AAnEY,wCAAc"}
@@ -1,7 +0,0 @@
1
- import mongoose from "mongoose";
2
- export interface IMongoConnector {
3
- connect(): Promise<mongoose.Connection>;
4
- getConnection(): mongoose.Connection;
5
- isConnected(): Promise<boolean>;
6
- disconnect(): Promise<void>;
7
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=IMongoConnector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IMongoConnector.js","sourceRoot":"","sources":["../../../../src/integration-engine/connectors/interfaces/IMongoConnector.ts"],"names":[],"mappings":""}
@@ -1,42 +0,0 @@
1
- import { IModel, IMongooseSettings } from "./";
2
- import { Validator } from "@golemio/validator";
3
- import mongoose from "mongoose";
4
- export declare class MongoModel implements IModel {
5
- /** Model name */
6
- name: string;
7
- /** The schema which contains schemaObject for creating the Mongoose Schema */
8
- protected schema: mongoose.Schema;
9
- /** The Mongoose Model */
10
- protected mongooseModel: mongoose.Model<any>;
11
- /** The Mongoose Model for temporary collection */
12
- protected tmpMongooseModel?: mongoose.Model<any>;
13
- /** Validation helper */
14
- protected validator: Validator;
15
- /** Path where to look for ID - identifier to search by */
16
- protected searchPath: Function;
17
- /** Path to the sub-property which contains the identifier (separated by dot), e.g. "properties.id" */
18
- protected identifierPath: string;
19
- /** Path to the sub-property which contains the results (separated by dot), e.g. "properties" */
20
- protected resultsPath: string;
21
- /** String to specify selection of DB query. */
22
- protected select: string;
23
- /** Type/Strategy of saving the data */
24
- protected savingType: "readOnly" | "insertOnly" | "insertOrUpdate";
25
- /** Function to specify which values can be updated */
26
- protected updateValues: ((dbData: any, newData: any) => any) | null;
27
- constructor(name: string, settings: IMongooseSettings, validator: Validator);
28
- save: (data: any, useTmpTable?: boolean) => Promise<any>;
29
- updateOne: (opts: any, data: any, useTmpTable?: boolean) => Promise<any>;
30
- updateOneById: (id: any, data: any, useTmpTable?: boolean) => Promise<any>;
31
- truncate: (useTmpTable?: boolean) => Promise<any>;
32
- delete: (opts: object, useTmpTable?: boolean) => Promise<any>;
33
- find: (opts: object, useTmpTable?: boolean) => Promise<any>;
34
- findOne: (opts: object, useTmpTable?: boolean) => Promise<any>;
35
- findOneById: (id: string | number, useTmpTable?: boolean) => Promise<any>;
36
- aggregate: (aggregation: any[], useTmpTable?: boolean) => Promise<any>;
37
- replaceOrigCollectionByTempCollection: () => Promise<void>;
38
- private insertOnly;
39
- private insertOrUpdate;
40
- private insertOrUpdateOne;
41
- private getMongooseModelSafely;
42
- }
@@ -1,245 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.MongoModel = void 0;
16
- const utils_1 = require("../../helpers/utils");
17
- const Logger_1 = require("../helpers/Logger");
18
- const errors_1 = require("@golemio/errors");
19
- const mongoose_1 = __importDefault(require("mongoose"));
20
- class MongoModel {
21
- constructor(name, settings, validator) {
22
- var _a;
23
- this.save = (data, useTmpTable = false) => __awaiter(this, void 0, void 0, function* () {
24
- if (this.savingType === "readOnly") {
25
- throw new errors_1.CustomError("The model saving type is read only.", true, this.name);
26
- }
27
- // data validation
28
- if (this.validator) {
29
- try {
30
- yield this.validator.Validate(data);
31
- }
32
- catch (err) {
33
- throw new errors_1.CustomError("Error while validating data.", true, this.name, 4005, err);
34
- }
35
- }
36
- else {
37
- Logger_1.log.warn(this.name + ": Model validator is not set.");
38
- }
39
- const model = this.getMongooseModelSafely(useTmpTable);
40
- // calling the method based on savingType (this.insertOnly() or this.insertOrUpdate())
41
- return this[this.savingType](model, data);
42
- });
43
- this.updateOne = (opts, data, useTmpTable = false) => __awaiter(this, void 0, void 0, function* () {
44
- if (this.savingType === "readOnly") {
45
- throw new errors_1.CustomError("The model saving type is read only.", true, this.name);
46
- }
47
- const model = this.getMongooseModelSafely(useTmpTable);
48
- return model.updateOne(opts, data, { runValidators: true }).exec();
49
- });
50
- this.updateOneById = (id, data, useTmpTable = false) => __awaiter(this, void 0, void 0, function* () {
51
- if (this.savingType === "readOnly") {
52
- throw new errors_1.CustomError("The model saving type is read only.", true, this.name);
53
- }
54
- const model = this.getMongooseModelSafely(useTmpTable);
55
- return model.updateOne(this.searchPath(id), data, { runValidators: true }).exec();
56
- });
57
- this.truncate = (useTmpTable = false) => __awaiter(this, void 0, void 0, function* () {
58
- if (this.savingType === "readOnly") {
59
- throw new errors_1.CustomError("The model saving type is read only.", true, this.name);
60
- }
61
- const model = this.getMongooseModelSafely(useTmpTable);
62
- try {
63
- yield model.deleteMany({}).exec();
64
- }
65
- catch (err) {
66
- throw new errors_1.CustomError("Error while truncating data.", true, this.name, 4002, err);
67
- }
68
- });
69
- this.delete = (opts, useTmpTable = false) => __awaiter(this, void 0, void 0, function* () {
70
- if (this.savingType === "readOnly") {
71
- throw new errors_1.CustomError("The model saving type is read only.", true, this.name);
72
- }
73
- const model = this.getMongooseModelSafely(useTmpTable);
74
- try {
75
- return yield model.deleteMany(opts).exec();
76
- }
77
- catch (err) {
78
- throw new errors_1.CustomError("Error while deleting data.", true, this.name, 4002, err);
79
- }
80
- });
81
- this.find = (opts, useTmpTable = false) => __awaiter(this, void 0, void 0, function* () {
82
- const model = this.getMongooseModelSafely(useTmpTable);
83
- try {
84
- return yield model.find(opts);
85
- }
86
- catch (err) {
87
- throw new errors_1.CustomError("Error while getting from database.", true, this.name, 4004, err);
88
- }
89
- });
90
- this.findOne = (opts, useTmpTable = false) => __awaiter(this, void 0, void 0, function* () {
91
- const model = this.getMongooseModelSafely(useTmpTable);
92
- try {
93
- return yield model.findOne(opts);
94
- }
95
- catch (err) {
96
- throw new errors_1.CustomError("Error while getting from database.", true, this.name, 4004, err);
97
- }
98
- });
99
- this.findOneById = (id, useTmpTable = false) => __awaiter(this, void 0, void 0, function* () {
100
- const model = this.getMongooseModelSafely(useTmpTable);
101
- try {
102
- const data = yield model.findOne(this.searchPath(id)).exec();
103
- if (!data) {
104
- throw new errors_1.CustomError("Model data was not found.", true, this.name, 1014);
105
- }
106
- else {
107
- return data;
108
- }
109
- }
110
- catch (err) {
111
- throw new errors_1.CustomError("Error while getting from database.", true, this.name, 4004, err);
112
- }
113
- });
114
- this.aggregate = (aggregation, useTmpTable = false) => __awaiter(this, void 0, void 0, function* () {
115
- const model = this.getMongooseModelSafely(useTmpTable);
116
- try {
117
- return model.aggregate(aggregation).exec();
118
- }
119
- catch (err) {
120
- throw new errors_1.CustomError("Error while getting from database.", true, this.name, 4004, err);
121
- }
122
- });
123
- this.replaceOrigCollectionByTempCollection = () => __awaiter(this, void 0, void 0, function* () {
124
- if (this.savingType === "readOnly") {
125
- throw new errors_1.CustomError("The model saving type is read only.", true, this.name);
126
- }
127
- if (!this.tmpMongooseModel) {
128
- throw new errors_1.CustomError("Temporary model is not defined.", true, this.name);
129
- }
130
- try {
131
- yield mongoose_1.default.connection.db
132
- .collection(this.mongooseModel.collection.name)
133
- .rename("old_" + this.mongooseModel.collection.name);
134
- }
135
- catch (err) {
136
- Logger_1.log.warn("Collection " + this.mongooseModel.collection.name + "does not exist.");
137
- }
138
- try {
139
- yield mongoose_1.default.connection.db
140
- .collection(this.tmpMongooseModel.collection.name)
141
- .rename(this.mongooseModel.collection.name);
142
- }
143
- catch (err) {
144
- Logger_1.log.warn("Collection tmp_" + this.tmpMongooseModel.collection.name + "does not exist.");
145
- }
146
- try {
147
- yield mongoose_1.default.connection.db.collection("old_" + this.mongooseModel.collection.name).drop();
148
- }
149
- catch (err) {
150
- Logger_1.log.warn("Collection old_" + this.mongooseModel.collection.name + "does not exist.");
151
- }
152
- });
153
- this.insertOnly = (model, data) => __awaiter(this, void 0, void 0, function* () {
154
- try {
155
- if (data instanceof Array) {
156
- return model.insertMany(data);
157
- }
158
- else {
159
- return model.create(data);
160
- }
161
- }
162
- catch (err) {
163
- throw new errors_1.CustomError("Error while saving to database.", true, this.name, 4001, err);
164
- }
165
- });
166
- this.insertOrUpdate = (model, data) => __awaiter(this, void 0, void 0, function* () {
167
- try {
168
- if (data instanceof Array) {
169
- const promises = data.map((item) => {
170
- return this.insertOrUpdateOne(model, item);
171
- });
172
- return Promise.all(promises);
173
- }
174
- else {
175
- return this.insertOrUpdateOne(model, data);
176
- }
177
- }
178
- catch (err) {
179
- throw new errors_1.CustomError("Error while saving to database.", true, this.name, 4001, err);
180
- }
181
- });
182
- this.insertOrUpdateOne = (model, newData) => __awaiter(this, void 0, void 0, function* () {
183
- if (!this.updateValues) {
184
- throw new errors_1.CustomError("Method updateValues() is not defined.", true, this.name);
185
- }
186
- try {
187
- let dbData = yield model.findOne(this.searchPath((0, utils_1.getSubProperty)(this.identifierPath, newData))).exec();
188
- if (!dbData) {
189
- throw new errors_1.CustomError("Model data was not found.", true, this.name, 1014);
190
- }
191
- dbData = this.updateValues(dbData, newData);
192
- dbData.markModified("properties"); // TODO zkontrolovat jestli funguje na vsechny pripady
193
- return dbData.save();
194
- }
195
- catch (err) {
196
- if (err instanceof errors_1.CustomError && err.code === 1014) {
197
- return model.create(newData);
198
- }
199
- else {
200
- throw new errors_1.CustomError("Error while saving to database.", true, this.name, 4001, err);
201
- }
202
- }
203
- });
204
- this.getMongooseModelSafely = (useTmpTable) => {
205
- let model = this.mongooseModel;
206
- if (useTmpTable && this.tmpMongooseModel) {
207
- model = this.tmpMongooseModel;
208
- }
209
- else if (useTmpTable && !this.tmpMongooseModel) {
210
- throw new errors_1.CustomError("Temporary model is not defined.", true, this.name);
211
- }
212
- return model;
213
- };
214
- this.name = name;
215
- this.schema = new mongoose_1.default.Schema(settings.outputMongooseSchemaObject, { bufferCommands: false });
216
- try {
217
- this.mongooseModel = mongoose_1.default.model(this.name);
218
- }
219
- catch (error) {
220
- this.mongooseModel = mongoose_1.default.model(this.name, this.schema, settings.mongoCollectionName);
221
- }
222
- if (settings.tmpMongoCollectionName) {
223
- try {
224
- this.tmpMongooseModel = mongoose_1.default.model("tmp" + this.name);
225
- }
226
- catch (error) {
227
- this.tmpMongooseModel = mongoose_1.default.model("tmp" + this.name, this.schema, settings.tmpMongoCollectionName);
228
- }
229
- }
230
- this.validator = validator;
231
- this.savingType = settings.savingType;
232
- this.updateValues = settings.updateValues || null;
233
- this.searchPath = settings.searchPath
234
- ? settings.searchPath
235
- : (id, multiple = false) => (multiple ? { id: { $in: id } } : { id });
236
- this.resultsPath = settings.resultsPath || "";
237
- this.identifierPath = settings.identifierPath;
238
- this.select = settings.select || "-_id -__v";
239
- if ((_a = this.validator) === null || _a === void 0 ? void 0 : _a.setLogger) {
240
- this.validator.setLogger(Logger_1.log);
241
- }
242
- }
243
- }
244
- exports.MongoModel = MongoModel;
245
- //# sourceMappingURL=MongoModel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MongoModel.js","sourceRoot":"","sources":["../../../src/integration-engine/models/MongoModel.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAgD;AAChD,8CAAyC;AAEzC,4CAA8C;AAE9C,wDAAgC;AAEhC,MAAa,UAAU;IAwBnB,YAAY,IAAY,EAAE,QAA2B,EAAE,SAAoB;;QAiCpE,SAAI,GAAG,CAAO,IAAS,EAAE,cAAuB,KAAK,EAAgB,EAAE;YAC1E,IAAI,IAAI,CAAC,UAAU,KAAK,UAAU,EAAE;gBAChC,MAAM,IAAI,oBAAW,CAAC,qCAAqC,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;aACjF;YAED,kBAAkB;YAClB,IAAI,IAAI,CAAC,SAAS,EAAE;gBAChB,IAAI;oBACA,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;iBACvC;gBAAC,OAAO,GAAG,EAAE;oBACV,MAAM,IAAI,oBAAW,CAAC,8BAA8B,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;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AI,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;QACtC,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,YAAY,IAAI,IAAI,CAAC;QAClD,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU;YACjC,CAAC,CAAC,QAAQ,CAAC,UAAU;YACrB,CAAC,CAAC,CAAC,EAAO,EAAE,QAAQ,GAAG,KAAK,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC/E,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,WAAW,IAAI,EAAE,CAAC;QAC9C,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,WAAW,CAAC;QAE7C,IAAI,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,EAAE;YAC3B,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,YAAG,CAAC,CAAC;SACjC;IACL,CAAC;CAoMJ;AA3PD,gCA2PC"}
@@ -1,2 +0,0 @@
1
- import { MongooseInstrumentationConfig } from "opentelemetry-instrumentation-mongoose";
2
- export declare const mongooseConfig: MongooseInstrumentationConfig;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.mongooseConfig = void 0;
4
- const mongooseSerializer = (operation, payload) => {
5
- try {
6
- const { options } = payload;
7
- if (options && typeof options === "object" && Object.keys(options).length === 0) {
8
- delete payload.options;
9
- }
10
- return JSON.stringify(payload);
11
- }
12
- catch (_a) {
13
- return "";
14
- }
15
- };
16
- exports.mongooseConfig = {
17
- suppressInternalInstrumentation: true,
18
- dbStatementSerializer: mongooseSerializer,
19
- };
20
- //# sourceMappingURL=mongoose.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mongoose.js","sourceRoot":"","sources":["../../../../../src/monitoring/opentelemetry/instrumentation/configs/mongoose.ts"],"names":[],"mappings":";;;AAEA,MAAM,kBAAkB,GAA0B,CAAC,SAAiB,EAAE,OAA0B,EAAU,EAAE;IACxG,IAAI;QACA,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QAC5B,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE;YAC7E,OAAO,OAAO,CAAC,OAAO,CAAC;SAC1B;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;KAClC;IAAC,WAAM;QACJ,OAAO,EAAE,CAAC;KACb;AACL,CAAC,CAAC;AAEW,QAAA,cAAc,GAAkC;IACzD,+BAA+B,EAAE,IAAI;IACrC,qBAAqB,EAAE,kBAAkB;CAC5C,CAAC"}
@@ -1,19 +0,0 @@
1
- import { ILogger } from "../../helpers";
2
- import { OutputGatewayConfiguration } from "../config/OutputGatewayConfiguration";
3
- import mongoose from "mongoose";
4
- import { Disposable } from "tsyringe";
5
- /**
6
- * Class for connection to MongoDB database. Using mongoose https://www.npmjs.com/package/mongoose
7
- */
8
- export declare class MongoDatabase implements Disposable {
9
- private readonly log;
10
- private readonly connectionString;
11
- private readonly connectTimeoutMS;
12
- /** Set up connection string */
13
- constructor(config: OutputGatewayConfiguration, log: ILogger);
14
- /** Connects to db */
15
- connect: () => Promise<mongoose.Connection>;
16
- isConnected: () => Promise<boolean>;
17
- disconnect: () => Promise<void>;
18
- dispose: () => Promise<void>;
19
- }