@resolveio/server-lib 7.0.4 → 7.1.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.
Files changed (48) hide show
  1. package/client-server-app.d.ts +1 -0
  2. package/client-server-app.js +56 -0
  3. package/client-server-app.js.map +1 -0
  4. package/collections/monitor-cpu.collection.d.ts +7 -0
  5. package/collections/monitor-cpu.collection.js +56 -0
  6. package/collections/monitor-cpu.collection.js.map +1 -0
  7. package/collections/monitor-https-inbound.collection.d.ts +7 -0
  8. package/collections/monitor-https-inbound.collection.js +66 -0
  9. package/collections/monitor-https-inbound.collection.js.map +1 -0
  10. package/collections/monitor-https-outbound.collection.d.ts +7 -0
  11. package/collections/monitor-https-outbound.collection.js +72 -0
  12. package/collections/monitor-https-outbound.collection.js.map +1 -0
  13. package/collections/monitor-memory.collection.d.ts +7 -0
  14. package/collections/monitor-memory.collection.js +71 -0
  15. package/collections/monitor-memory.collection.js.map +1 -0
  16. package/collections/monitor-mongo.collection.d.ts +7 -0
  17. package/collections/monitor-mongo.collection.js +63 -0
  18. package/collections/monitor-mongo.collection.js.map +1 -0
  19. package/index.d.ts +2 -1
  20. package/index.js +4 -2
  21. package/index.js.map +1 -1
  22. package/managers/method.manager.js +2 -0
  23. package/managers/method.manager.js.map +1 -1
  24. package/managers/monitor.manager.d.ts +7 -0
  25. package/managers/monitor.manager.js +244 -0
  26. package/managers/monitor.manager.js.map +1 -0
  27. package/methods/monitor.d.ts +2 -0
  28. package/methods/monitor.js +39 -0
  29. package/methods/monitor.js.map +1 -0
  30. package/models/monitor-cpu.model.d.ts +7 -0
  31. package/models/monitor-cpu.model.js +4 -0
  32. package/models/monitor-cpu.model.js.map +1 -0
  33. package/models/monitor-https-inbound.model.d.ts +10 -0
  34. package/models/monitor-https-inbound.model.js +4 -0
  35. package/models/monitor-https-inbound.model.js.map +1 -0
  36. package/models/monitor-https-outbound.model.d.ts +11 -0
  37. package/models/monitor-https-outbound.model.js +4 -0
  38. package/models/monitor-https-outbound.model.js.map +1 -0
  39. package/models/monitor-memory.model.d.ts +11 -0
  40. package/models/monitor-memory.model.js +4 -0
  41. package/models/monitor-memory.model.js.map +1 -0
  42. package/models/monitor-mongo.model.d.ts +9 -0
  43. package/models/monitor-mongo.model.js +4 -0
  44. package/models/monitor-mongo.model.js.map +1 -0
  45. package/package.json +3 -1
  46. package/server-app.d.ts +4 -1
  47. package/server-app.js +11 -4
  48. package/server-app.js.map +1 -1
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,56 @@
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 __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (_) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ var serverConfig = require('./settings.json');
40
+ var monitorAgent = null;
41
+ if (serverConfig['ROOT_URL'] !== 'http://localhost:4200') {
42
+ var appmetrics = require('appmetrics');
43
+ appmetrics.configure({
44
+ mqtt: 'off',
45
+ });
46
+ monitorAgent = appmetrics.monitor();
47
+ }
48
+ var index_1 = require("./index");
49
+ new index_1.ResolveIOServer(monitorAgent, serverConfig, 'ResolveIO Server Library', __dirname);
50
+ index_1.ResolveIOServer.connectAndRun().then(function () { return __awaiter(void 0, void 0, void 0, function () {
51
+ return __generator(this, function (_a) {
52
+ return [2 /*return*/];
53
+ });
54
+ }); });
55
+
56
+ //# sourceMappingURL=client-server-app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/client-server-app.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAI,YAAY,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC9C,IAAI,YAAY,GAAG,IAAI,CAAC;AACxB,IAAI,YAAY,CAAC,UAAU,CAAC,KAAK,uBAAuB,EAAE;IACzD,IAAI,UAAU,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IACvC,UAAU,CAAC,SAAS,CAAC;QACpB,IAAI,EAAE,KAAK;KAEX,CAAC,CAAC;IACH,YAAY,GAAG,UAAU,CAAC,OAAO,EAAE,CAAC;CACpC;AAED,iCAA0C;AAE1C,IAAI,uBAAe,CAAC,YAAY,EAAE,YAAY,EAAE,0BAA0B,EAAE,SAAS,CAAC,CAAC;AACvF,uBAAe,CAAC,aAAa,EAAE,CAAC,IAAI,CAAC;;;;KAEpC,CAAC,CAAC","file":"client-server-app.js","sourcesContent":["let serverConfig = require('./settings.json');\nlet monitorAgent = null;\nif (serverConfig['ROOT_URL'] !== 'http://localhost:4200') {\n\tlet appmetrics = require('appmetrics');\n\tappmetrics.configure({\n\t\tmqtt: 'off',\n\t\t// profiling: 'on'\n\t});\n\tmonitorAgent = appmetrics.monitor();\n}\n\nimport { ResolveIOServer } from './index';\n\nnew ResolveIOServer(monitorAgent, serverConfig, 'ResolveIO Server Library', __dirname);\nResolveIOServer.connectAndRun().then(async () => {\n\t\n});"]}
@@ -0,0 +1,7 @@
1
+ import { Model, Document } from 'mongoose';
2
+ import { MonitorCPUModel } from '../models/monitor-cpu.model';
3
+ interface ResolveIOModel extends MonitorCPUModel, Document {
4
+ }
5
+ export declare const MonitorCPUs: Model<ResolveIOModel>;
6
+ export declare const MonitorCPUVersions: Model<ResolveIOModel>;
7
+ export {};
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var mongoose_1 = require("mongoose");
4
+ var simpl_schema_1 = require("simpl-schema");
5
+ var index_1 = require("../index");
6
+ var schema = {
7
+ _id: {
8
+ type: String,
9
+ optional: true
10
+ },
11
+ __v: {
12
+ type: Number,
13
+ optional: true
14
+ },
15
+ updatedAt: {
16
+ type: Date,
17
+ optional: true
18
+ },
19
+ createdAt: {
20
+ type: Date,
21
+ optional: true
22
+ },
23
+ client: {
24
+ type: String
25
+ },
26
+ date: {
27
+ type: Date
28
+ },
29
+ app: {
30
+ type: Number
31
+ },
32
+ system: {
33
+ type: Number
34
+ }
35
+ };
36
+ var DefaultSchema = new mongoose_1.Schema(schema, {
37
+ skipVersioning: true,
38
+ versionKey: false,
39
+ timestamps: true
40
+ });
41
+ DefaultSchema.index({ client: 1, date: 1 });
42
+ DefaultSchema.index({ date: 1 });
43
+ exports.MonitorCPUs = index_1.ResolveIOServer.getMainDB().model('monitor-cpus', DefaultSchema);
44
+ exports.MonitorCPUs['simplschema'] = new simpl_schema_1.default(schema);
45
+ schema._id = {
46
+ type: mongoose_1.Schema.Types.Mixed
47
+ };
48
+ var VersionSchema = new mongoose_1.Schema(schema, {
49
+ skipVersioning: true,
50
+ versionKey: false,
51
+ timestamps: true
52
+ });
53
+ exports.MonitorCPUs['versionCollection'] = 'monitor-cpus.versions';
54
+ exports.MonitorCPUVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorCPUs['versionCollection'], VersionSchema);
55
+
56
+ //# sourceMappingURL=monitor-cpu.collection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/collections/monitor-cpu.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAa,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;AAC1C,aAAa,CAAC,KAAK,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;AAGlB,QAAA,WAAW,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;AAEnH,mBAAW,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,mBAAW,CAAC,mBAAmB,CAAC,GAAG,uBAAuB,CAAC;AAE9C,QAAA,kBAAkB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,mBAAW,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"monitor-cpu.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorCPUModel } from '../models/monitor-cpu.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tapp: {\n\t\ttype: Number\n\t},\n\tsystem: {\n\t\ttype: Number\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({client: 1, date: 1});\nDefaultSchema.index({date: 1});\n\ninterface ResolveIOModel extends MonitorCPUModel, Document {}\nexport const MonitorCPUs: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-cpus', DefaultSchema);\n\nMonitorCPUs['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nMonitorCPUs['versionCollection'] = 'monitor-cpus.versions';\n\nexport const MonitorCPUVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorCPUs['versionCollection'], VersionSchema);"]}
@@ -0,0 +1,7 @@
1
+ import { Model, Document } from 'mongoose';
2
+ import { MonitorHTTPSInboundModel } from '../models/monitor-https-inbound.model';
3
+ interface ResolveIOModel extends MonitorHTTPSInboundModel, Document {
4
+ }
5
+ export declare const MonitorHTTPSInbounds: Model<ResolveIOModel>;
6
+ export declare const MonitorHTTPInboundVersions: Model<ResolveIOModel>;
7
+ export {};
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var mongoose_1 = require("mongoose");
4
+ var simpl_schema_1 = require("simpl-schema");
5
+ var index_1 = require("../index");
6
+ var schema = {
7
+ _id: {
8
+ type: String,
9
+ optional: true
10
+ },
11
+ __v: {
12
+ type: Number,
13
+ optional: true
14
+ },
15
+ updatedAt: {
16
+ type: Date,
17
+ optional: true
18
+ },
19
+ createdAt: {
20
+ type: Date,
21
+ optional: true
22
+ },
23
+ client: {
24
+ type: String
25
+ },
26
+ date: {
27
+ type: Date
28
+ },
29
+ method: {
30
+ type: String
31
+ },
32
+ url: {
33
+ type: String
34
+ },
35
+ duration: {
36
+ type: Number
37
+ },
38
+ contentType: {
39
+ type: String
40
+ },
41
+ requestHeader: {
42
+ type: String
43
+ }
44
+ };
45
+ var DefaultSchema = new mongoose_1.Schema(schema, {
46
+ skipVersioning: true,
47
+ versionKey: false,
48
+ timestamps: true
49
+ });
50
+ DefaultSchema.index({ client: 1, date: 1, duration: 1 });
51
+ DefaultSchema.index({ client: 1, date: 1, method: 1, url: 1 });
52
+ DefaultSchema.index({ date: 1 });
53
+ exports.MonitorHTTPSInbounds = index_1.ResolveIOServer.getMainDB().model('monitor-https-inbounds', DefaultSchema);
54
+ exports.MonitorHTTPSInbounds['simplschema'] = new simpl_schema_1.default(schema);
55
+ schema._id = {
56
+ type: mongoose_1.Schema.Types.Mixed
57
+ };
58
+ var VersionSchema = new mongoose_1.Schema(schema, {
59
+ skipVersioning: true,
60
+ versionKey: false,
61
+ timestamps: true
62
+ });
63
+ exports.MonitorHTTPSInbounds['versionCollection'] = 'monitor-https-inbounds.versions';
64
+ exports.MonitorHTTPInboundVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorHTTPSInbounds['versionCollection'], VersionSchema);
65
+
66
+ //# sourceMappingURL=monitor-https-inbound.collection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/collections/monitor-https-inbound.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,Q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AAE,IAAI;CAChB,CAAC,CAAC;AAEH,4BAAoB,CAAC,mBAAmB,CAAC,GAAG,iCAAiC,CAAC;AAEjE,QAAA,0BAA0B,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,4BAAoB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"monitor-https-inbound.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorHTTPSInboundModel } from '../models/monitor-https-inbound.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\turl: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tcontentType: {\n\t\ttype: String\n\t},\n\trequestHeader: {\n\t\ttype: String\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({client: 1, date: 1, duration: 1});\nDefaultSchema.index({client: 1, date: 1, method: 1, url: 1});\nDefaultSchema.index({date: 1});\n\ninterface ResolveIOModel extends MonitorHTTPSInboundModel, Document {}\nexport const MonitorHTTPSInbounds: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-https-inbounds', DefaultSchema);\n\nMonitorHTTPSInbounds['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nMonitorHTTPSInbounds['versionCollection'] = 'monitor-https-inbounds.versions';\n\nexport const MonitorHTTPInboundVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorHTTPSInbounds['versionCollection'], VersionSchema);"]}
@@ -0,0 +1,7 @@
1
+ import { Model, Document } from 'mongoose';
2
+ import { MonitorHTTPSOutboundModel } from '../models/monitor-https-outbound.model';
3
+ interface ResolveIOModel extends MonitorHTTPSOutboundModel, Document {
4
+ }
5
+ export declare const MonitorHTTPSOutbounds: Model<ResolveIOModel>;
6
+ export declare const MonitorHTTPSOutboundVersions: Model<ResolveIOModel>;
7
+ export {};
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var mongoose_1 = require("mongoose");
4
+ var simpl_schema_1 = require("simpl-schema");
5
+ var index_1 = require("../index");
6
+ var schema = {
7
+ _id: {
8
+ type: String,
9
+ optional: true
10
+ },
11
+ __v: {
12
+ type: Number,
13
+ optional: true
14
+ },
15
+ updatedAt: {
16
+ type: Date,
17
+ optional: true
18
+ },
19
+ createdAt: {
20
+ type: Date,
21
+ optional: true
22
+ },
23
+ client: {
24
+ type: String
25
+ },
26
+ date: {
27
+ type: Date
28
+ },
29
+ method: {
30
+ type: String
31
+ },
32
+ url: {
33
+ type: String
34
+ },
35
+ duration: {
36
+ type: Number
37
+ },
38
+ status: {
39
+ type: String
40
+ },
41
+ contentType: {
42
+ type: String
43
+ },
44
+ requestHeaders: {
45
+ type: Object,
46
+ blackbox: true
47
+ }
48
+ };
49
+ var DefaultSchema = new mongoose_1.Schema(schema, {
50
+ skipVersioning: true,
51
+ versionKey: false,
52
+ timestamps: true
53
+ });
54
+ DefaultSchema.index({ client: 1, date: 1, duration: 1 });
55
+ DefaultSchema.index({ client: 1, date: 1, method: 1, url: 1, status: 1 });
56
+ DefaultSchema.index({ client: 1, date: 1, status: 1 });
57
+ DefaultSchema.index({ client: 1, status: 1 });
58
+ DefaultSchema.index({ date: 1 });
59
+ exports.MonitorHTTPSOutbounds = index_1.ResolveIOServer.getMainDB().model('monitor-https-outbounds', DefaultSchema);
60
+ exports.MonitorHTTPSOutbounds['simplschema'] = new simpl_schema_1.default(schema);
61
+ schema._id = {
62
+ type: mongoose_1.Schema.Types.Mixed
63
+ };
64
+ var VersionSchema = new mongoose_1.Schema(schema, {
65
+ skipVersioning: true,
66
+ versionKey: false,
67
+ timestamps: true
68
+ });
69
+ exports.MonitorHTTPSOutbounds['versionCollection'] = 'monitor-https-outbounds.versions';
70
+ exports.MonitorHTTPSOutboundVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorHTTPSOutbounds['versionCollection'], VersionSchema);
71
+
72
+ //# sourceMappingURL=monitor-https-outbound.collection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/collections/monitor-https-outbound.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,cAAc,EAAE;QACf,IAAI,EAAE,MAAM;QACZ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AC;AAEnE,QAAA,4BAA4B,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,6BAAqB,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"monitor-https-outbound.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorHTTPSOutboundModel } from '../models/monitor-https-outbound.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\turl: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tstatus: {\n\t\ttype: String\n\t},\n\tcontentType: {\n\t\ttype: String\n\t},\n\trequestHeaders: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({client: 1, date: 1, duration: 1});\nDefaultSchema.index({client: 1, date: 1, method: 1, url: 1, status: 1});\nDefaultSchema.index({client: 1, date: 1, status: 1});\nDefaultSchema.index({client: 1, status: 1});\nDefaultSchema.index({date: 1});\n\ninterface ResolveIOModel extends MonitorHTTPSOutboundModel, Document {}\nexport const MonitorHTTPSOutbounds: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-https-outbounds', DefaultSchema);\n\nMonitorHTTPSOutbounds['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nMonitorHTTPSOutbounds['versionCollection'] = 'monitor-https-outbounds.versions';\n\nexport const MonitorHTTPSOutboundVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorHTTPSOutbounds['versionCollection'], VersionSchema);"]}
@@ -0,0 +1,7 @@
1
+ import { Model, Document } from 'mongoose';
2
+ import { MonitorMemoryModel } from '../models/monitor-memory.model';
3
+ interface ResolveIOModel extends MonitorMemoryModel, Document {
4
+ }
5
+ export declare const MonitorMemorys: Model<ResolveIOModel>;
6
+ export declare const MonitorMemoryVersions: Model<ResolveIOModel>;
7
+ export {};
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var mongoose_1 = require("mongoose");
4
+ var simpl_schema_1 = require("simpl-schema");
5
+ var index_1 = require("../index");
6
+ var schema = {
7
+ _id: {
8
+ type: String,
9
+ optional: true
10
+ },
11
+ __v: {
12
+ type: Number,
13
+ optional: true
14
+ },
15
+ updatedAt: {
16
+ type: Date,
17
+ optional: true
18
+ },
19
+ createdAt: {
20
+ type: Date,
21
+ optional: true
22
+ },
23
+ client: {
24
+ type: String
25
+ },
26
+ date: {
27
+ type: Date
28
+ },
29
+ physical_total: {
30
+ type: Number
31
+ },
32
+ physical_used: {
33
+ type: Number
34
+ },
35
+ physical_free: {
36
+ type: Number
37
+ },
38
+ virtual: {
39
+ type: Number
40
+ },
41
+ private: {
42
+ type: Number
43
+ },
44
+ physical: {
45
+ type: Number
46
+ }
47
+ };
48
+ var DefaultSchema = new mongoose_1.Schema(schema, {
49
+ skipVersioning: true,
50
+ versionKey: false,
51
+ timestamps: true
52
+ });
53
+ DefaultSchema.index({ client: 1, date: 1, duration: 1 });
54
+ DefaultSchema.index({ client: 1, date: 1, method: 1, url: 1 });
55
+ DefaultSchema.index({ client: 1, date: 1, status: 1 });
56
+ DefaultSchema.index({ client: 1, status: 1 });
57
+ DefaultSchema.index({ date: 1 });
58
+ exports.MonitorMemorys = index_1.ResolveIOServer.getMainDB().model('monitor-memorys', DefaultSchema);
59
+ exports.MonitorMemorys['simplschema'] = new simpl_schema_1.default(schema);
60
+ schema._id = {
61
+ type: mongoose_1.Schema.Types.Mixed
62
+ };
63
+ var VersionSchema = new mongoose_1.Schema(schema, {
64
+ skipVersioning: true,
65
+ versionKey: false,
66
+ timestamps: true
67
+ });
68
+ exports.MonitorMemorys['versionCollection'] = 'monitor-memorys.versions';
69
+ exports.MonitorMemoryVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorMemorys['versionCollection'], VersionSchema);
70
+
71
+ //# sourceMappingURL=monitor-memory.collection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/collections/monitor-memory.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,cAAc,EAAE;QACf,IAAI,EAAE,MAAM;KACZ;IACD,aAAa,EAAE;QACd,IAAI,EAAE,MAAM;KACZ;IACD,aAAa,EAAE;QACd,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,C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C,EAAE,aAAa,CAAC,CAAC","file":"monitor-memory.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorMemoryModel } from '../models/monitor-memory.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tphysical_total: {\n\t\ttype: Number\n\t},\n\tphysical_used: {\n\t\ttype: Number\n\t},\n\tphysical_free: {\n\t\ttype: Number\n\t},\n\tvirtual: {\n\t\ttype: Number\n\t},\n\tprivate: {\n\t\ttype: Number\n\t},\n\tphysical: {\n\t\ttype: Number\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({client: 1, date: 1, duration: 1});\nDefaultSchema.index({client: 1, date: 1, method: 1, url: 1});\nDefaultSchema.index({client: 1, date: 1, status: 1});\nDefaultSchema.index({client: 1, status: 1});\nDefaultSchema.index({date: 1});\n\ninterface ResolveIOModel extends MonitorMemoryModel, Document {}\nexport const MonitorMemorys: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-memorys', DefaultSchema);\n\nMonitorMemorys['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nMonitorMemorys['versionCollection'] = 'monitor-memorys.versions';\n\nexport const MonitorMemoryVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorMemorys['versionCollection'], VersionSchema);"]}
@@ -0,0 +1,7 @@
1
+ import { Model, Document } from 'mongoose';
2
+ import { MonitorMongoModel } from '../models/monitor-mongo.model';
3
+ interface ResolveIOModel extends MonitorMongoModel, Document {
4
+ }
5
+ export declare const MonitorMongos: Model<ResolveIOModel>;
6
+ export declare const MonitorMongoVersions: Model<ResolveIOModel>;
7
+ export {};
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var mongoose_1 = require("mongoose");
4
+ var simpl_schema_1 = require("simpl-schema");
5
+ var index_1 = require("../index");
6
+ var schema = {
7
+ _id: {
8
+ type: String,
9
+ optional: true
10
+ },
11
+ __v: {
12
+ type: Number,
13
+ optional: true
14
+ },
15
+ updatedAt: {
16
+ type: Date,
17
+ optional: true
18
+ },
19
+ createdAt: {
20
+ type: Date,
21
+ optional: true
22
+ },
23
+ client: {
24
+ type: String
25
+ },
26
+ date: {
27
+ type: Date
28
+ },
29
+ method: {
30
+ type: String
31
+ },
32
+ doc_collection: {
33
+ type: String
34
+ },
35
+ duration: {
36
+ type: Number
37
+ },
38
+ query: {
39
+ type: Object,
40
+ blackbox: true
41
+ }
42
+ };
43
+ var DefaultSchema = new mongoose_1.Schema(schema, {
44
+ skipVersioning: true,
45
+ versionKey: false,
46
+ timestamps: true
47
+ });
48
+ DefaultSchema.index({ date: 1 });
49
+ DefaultSchema.index({ client: 1, date: 1, method: 1 });
50
+ exports.MonitorMongos = index_1.ResolveIOServer.getMainDB().model('monitor-mongos', DefaultSchema);
51
+ exports.MonitorMongos['simplschema'] = new simpl_schema_1.default(schema);
52
+ schema._id = {
53
+ type: mongoose_1.Schema.Types.Mixed
54
+ };
55
+ var VersionSchema = new mongoose_1.Schema(schema, {
56
+ skipVersioning: true,
57
+ versionKey: false,
58
+ timestamps: true
59
+ });
60
+ exports.MonitorMongos['versionCollection'] = 'monitor-cpus.versions';
61
+ exports.MonitorMongoVersions = index_1.ResolveIOServer.getMainDB().model(exports.MonitorMongos['versionCollection'], VersionSchema);
62
+
63
+ //# sourceMappingURL=monitor-mongo.collection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/collections/monitor-mongo.collection.ts"],"names":[],"mappings":";;AAAA,qCAAmD;AACnD,6CAAwC;AACxC,kCAA2C;AAG3C,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;KACZ;IACD,cAAc,EAAE;QACf,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAEF,IAAM,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACxC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,aAAa,CAAC,KAAK,CAAC,EAAC,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC;AAC/B,aAAa,CAAC,KAAK,CAAC,EAAC,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;AAGxC,QAAA,aAAa,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;AAEvH,qBAAa,CAAC,aAAa,CAAC,GAAG,IAAI,sBAAY,CAAC,MAAM,CAAC,CAAC;AAExD,MAAM,CAAC,GAAG,GAAG;IACZ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,KAAK;CACxB,CAAC;AAEF,IAAI,aAAa,GAAG,IAAI,iBAAM,CAAC,MAAM,EAAE;IACtC,cAAc,EAAE,IAAI;IACpB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,IAAI;CAChB,CAAC,CAAC;AAEH,qBAAa,CAAC,mBAAmB,CAAC,GAAG,uBAAuB,CAAC;AAEhD,QAAA,oBAAoB,GAA0B,uBAAe,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,qBAAa,CAAC,mBAAmB,CAAC,EAAE,aAAa,CAAC,CAAC","file":"monitor-mongo.collection.js","sourcesContent":["import { Schema, Model, Document } from 'mongoose';\nimport SimpleSchema from 'simpl-schema';\nimport { ResolveIOServer } from '../index';\nimport { MonitorMongoModel } from '../models/monitor-mongo.model';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tdoc_collection: {\n\t\ttype: String\n\t},\n\tduration: {\n\t\ttype: Number\n\t},\n\tquery: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t}\n};\n\nconst DefaultSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nDefaultSchema.index({date: 1});\nDefaultSchema.index({client: 1, date: 1, method: 1});\n\ninterface ResolveIOModel extends MonitorMongoModel, Document {}\nexport const MonitorMongos: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model('monitor-mongos', DefaultSchema);\n\nMonitorMongos['simplschema'] = new SimpleSchema(schema);\n\nschema._id = {\n\ttype: Schema.Types.Mixed\n};\n\nlet VersionSchema = new Schema(schema, {\n\tskipVersioning: true,\n\tversionKey: false,\n\ttimestamps: true\n});\n\nMonitorMongos['versionCollection'] = 'monitor-cpus.versions';\n\nexport const MonitorMongoVersions: Model<ResolveIOModel> = ResolveIOServer.getMainDB().model(MonitorMongos['versionCollection'], VersionSchema);"]}
package/index.d.ts CHANGED
@@ -1,13 +1,14 @@
1
1
  import * as mongoose from 'mongoose';
2
2
  import ResolveIOMainServer from './server-app';
3
3
  export declare class ResolveIOServer {
4
+ private static _monitorAgent;
4
5
  private static _serverConfig;
5
6
  private static _mainDB;
6
7
  private static _mainServer;
7
8
  private static _client;
8
9
  private static _clientDir;
9
10
  private static _sesMail;
10
- constructor(serverConfig: any, client: string, clientDir: any, sesMail?: boolean);
11
+ constructor(monitoring: any, serverConfig: any, client: string, clientDir: any, sesMail?: boolean);
11
12
  static connectAndRun(): Promise<unknown>;
12
13
  static getClientName(): string;
13
14
  static getMainServer(): ResolveIOMainServer;
package/index.js CHANGED
@@ -38,8 +38,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
39
  var mongoose = require("mongoose");
40
40
  var ResolveIOServer = /** @class */ (function () {
41
- function ResolveIOServer(serverConfig, client, clientDir, sesMail) {
41
+ function ResolveIOServer(monitoring, serverConfig, client, clientDir, sesMail) {
42
42
  if (sesMail === void 0) { sesMail = true; }
43
+ ResolveIOServer._monitorAgent = monitoring;
43
44
  ResolveIOServer._serverConfig = serverConfig;
44
45
  ResolveIOServer._client = client;
45
46
  ResolveIOServer._clientDir = clientDir;
@@ -61,7 +62,7 @@ var ResolveIOServer = /** @class */ (function () {
61
62
  return [4 /*yield*/, Promise.resolve().then(function () { return require('./server-app'); })];
62
63
  case 1:
63
64
  serverApp = (_a.sent()).default;
64
- ResolveIOServer._mainServer = new serverApp(this, ResolveIOServer._serverConfig, this._clientDir, this._sesMail);
65
+ ResolveIOServer._mainServer = new serverApp(this, ResolveIOServer._monitorAgent, ResolveIOServer._serverConfig, this._clientDir, this._sesMail);
65
66
  resolve();
66
67
  return [2 /*return*/];
67
68
  }
@@ -81,6 +82,7 @@ var ResolveIOServer = /** @class */ (function () {
81
82
  ResolveIOServer.getMainDB = function () {
82
83
  return ResolveIOServer._mainDB;
83
84
  };
85
+ ResolveIOServer._monitorAgent = null;
84
86
  ResolveIOServer._serverConfig = null;
85
87
  ResolveIOServer._mainDB = null;
86
88
  ResolveIOServer._mainServer = null;
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAqC;AAGrC;IAQC,yBAAY,YAAY,EAAE,MAAc,EAAE,SAAS,EAAE,OAAc;QAAd,wBAAA,EAAA,cAAc;QAClE,eAAe,CAAC,aAAa,GAAG,YAAY,CAAC;QAC7C,eAAe,CAAC,OAAO,GAAG,MAAM,CAAC;QACjC,eAAe,CAAC,UAAU,GAAG,SAAS,CAAC;QACvC,eAAe,CAAC,QAAQ,GAAG,OAAO,CAAC;IACpC,CAAC;IAEa,6BAAa,GAA3B;QAAA,iBAkBC;QAjBA,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YAClC,QAAQ,CAAC,gBAAgB,CAAC,eAAe,CAAC,aAAa,CAAC,WAAW,CAAC,EAAO;gBAC1E,eAAe,EAAE,IAAI;gBACrB,cAAc,EAAE,IAAI;gBACpB,kBAAkB,EAAE,IAAI;aACxB,CAAC,CAAC,IAAI,CAAC,UAAO,MAAM;;;;;4BACpB,eAAe,CAAC,OAAO,GAAG,MAAM,CAAC;4BAEhB,yEAAa,cAAc,OAAC;;4BAAzC,SAAS,GAAG,CAAC,SAA4B,CAAC,CAAC,OAAO;4BACtD,eAAe,CAAC,WAAW,GAAG,IAAI,SAAS,CAAC,IAAI,EAAE,eAAe,CAAC,aAAa,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;4BAEjH,OAAO,EAAE,CAAC;;;;iBACV,EAAE,UAAC,GAAG;gBACN,OAAO,CAAC,IAAI,EAAE,CAAC;gBACf,MAAM,EAAE,CAAC;YACV,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;IAEa,6BAAa,GAA3B;QACC,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAEa,6BAAa,GAA3B;QACC,OAAO,eAAe,CAAC,WAAW,CAAC;IACpC,CAAC;IAEa,yBAAS,GAAvB;QACC,OAAO,eAAe,CAAC,OAAO,CAAC;IAChC,CAAC;IA5Cc,6BAAa,GAAG,IAAI,CAAC;IACrB,uBAAO,GAAwB,IAAI,CAAC;IACpC,2BAAW,GAAwB,IAAI,CAAC;IACxC,uBAAO,GAAG,EAAE,CAAC;IACb,0BAAU,GAAG,EAAE,CAAC;IAChB,wBAAQ,GAAG,IAAI,CAAC;IAwChC,sBAAC;CA9CD,AA8CC,IAAA;AA9CY,0CAAe","file":"index.js","sourcesContent":["import * as mongoose from 'mongoose';\nimport ResolveIOMainServer from './server-app';\n\nexport class ResolveIOServer {\n\tprivate static _serverConfig = null;\n\tprivate static _mainDB: mongoose.Connection = null;\n\tprivate static _mainServer: ResolveIOMainServer = null;\n\tprivate static _client = '';\n\tprivate static _clientDir = '';\n\tprivate static _sesMail = true;\n\n\tconstructor(serverConfig, client: string, clientDir, sesMail = true) {\n\t\tResolveIOServer._serverConfig = serverConfig;\n\t\tResolveIOServer._client = client;\n\t\tResolveIOServer._clientDir = clientDir;\n\t\tResolveIOServer._sesMail = sesMail;\n\t}\n\n\tpublic static connectAndRun() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tmongoose.createConnection(ResolveIOServer._serverConfig['MONGO_URL'], <any>{ \n\t\t\t\tuseNewUrlParser: true, \n\t\t\t\tuseCreateIndex: true, \n\t\t\t\tuseUnifiedTopology: true\n\t\t\t}).then(async (dbMain) => {\n\t\t\t\tResolveIOServer._mainDB = dbMain;\n\t\t\t\t\n\t\t\t\tlet serverApp = (await import('./server-app')).default;\n\t\t\t\tResolveIOServer._mainServer = new serverApp(this, ResolveIOServer._serverConfig, this._clientDir, this._sesMail);\n\n\t\t\t\tresolve();\n\t\t\t}, (err) => {\n\t\t\t\tprocess.exit();\n\t\t\t\treject();\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic static getClientName() {\n\t\treturn this._client;\n\t}\n\n\tpublic static getMainServer() {\n\t\treturn ResolveIOServer._mainServer;\n\t}\n\n\tpublic static getMainDB() {\n\t\treturn ResolveIOServer._mainDB;\n\t}\n}"]}
1
+ {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAqC;AAGrC;IASC,yBAAY,UAAU,EAAE,YAAY,EAAE,MAAc,EAAE,SAAS,EAAE,OAAc;QAAd,wBAAA,EAAA,cAAc;QAC9E,eAAe,CAAC,aAAa,GAAG,UAAU,CAAC;QAC3C,eAAe,CAAC,aAAa,GAAG,YAAY,CAAC;QAC7C,eAAe,CAAC,OAAO,GAAG,MAAM,CAAC;QACjC,eAAe,CAAC,UAAU,GAAG,SAAS,CAAC;QACvC,eAAe,CAAC,QAAQ,GAAG,OAAO,CAAC;IACpC,CAAC;IAEa,6BAAa,GAA3B;QAAA,iBAkBC;QAjBA,OAAO,IAAI,OAAO,CAAC,UAAC,OAAO,EAAE,MAAM;YAClC,QAAQ,CAAC,gBAAgB,CAAC,eAAe,CAAC,aAAa,CAAC,WAAW,CAAC,EAAO;gBAC1E,eAAe,EAAE,IAAI;gBACrB,cAAc,EAAE,IAAI;gBACpB,kBAAkB,EAAE,IAAI;aACxB,CAAC,CAAC,IAAI,CAAC,UAAO,MAAM;;;;;4BACpB,eAAe,CAAC,OAAO,GAAG,MAAM,CAAC;4BAEhB,yEAAa,cAAc,OAAC;;4BAAzC,SAAS,GAAG,CAAC,SAA4B,CAAC,CAAC,OAAO;4BACtD,eAAe,CAAC,WAAW,GAAG,IAAI,SAAS,CAAC,IAAI,EAAE,eAAe,CAAC,aAAa,EAAE,eAAe,CAAC,aAAa,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;4BAEhJ,OAAO,EAAE,CAAC;;;;iBACV,EAAE,UAAC,GAAG;gBACN,OAAO,CAAC,IAAI,EAAE,CAAC;gBACf,MAAM,EAAE,CAAC;YACV,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;IACJ,CAAC;IAEa,6BAAa,GAA3B;QACC,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAEa,6BAAa,GAA3B;QACC,OAAO,eAAe,CAAC,WAAW,CAAC;IACpC,CAAC;IAEa,yBAAS,GAAvB;QACC,OAAO,eAAe,CAAC,OAAO,CAAC;IAChC,CAAC;IA9Cc,6BAAa,GAAG,IAAI,CAAC;IACrB,6BAAa,GAAG,IAAI,CAAC;IACrB,uBAAO,GAAwB,IAAI,CAAC;IACpC,2BAAW,GAAwB,IAAI,CAAC;IACxC,uBAAO,GAAG,EAAE,CAAC;IACb,0BAAU,GAAG,EAAE,CAAC;IAChB,wBAAQ,GAAG,IAAI,CAAC;IAyChC,sBAAC;CAhDD,AAgDC,IAAA;AAhDY,0CAAe","file":"index.js","sourcesContent":["import * as mongoose from 'mongoose';\nimport ResolveIOMainServer from './server-app';\n\nexport class ResolveIOServer {\n\tprivate static _monitorAgent = null;\n\tprivate static _serverConfig = null;\n\tprivate static _mainDB: mongoose.Connection = null;\n\tprivate static _mainServer: ResolveIOMainServer = null;\n\tprivate static _client = '';\n\tprivate static _clientDir = '';\n\tprivate static _sesMail = true;\n\n\tconstructor(monitoring, serverConfig, client: string, clientDir, sesMail = true) {\n\t\tResolveIOServer._monitorAgent = monitoring;\n\t\tResolveIOServer._serverConfig = serverConfig;\n\t\tResolveIOServer._client = client;\n\t\tResolveIOServer._clientDir = clientDir;\n\t\tResolveIOServer._sesMail = sesMail;\n\t}\n\n\tpublic static connectAndRun() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tmongoose.createConnection(ResolveIOServer._serverConfig['MONGO_URL'], <any>{ \n\t\t\t\tuseNewUrlParser: true, \n\t\t\t\tuseCreateIndex: true, \n\t\t\t\tuseUnifiedTopology: true\n\t\t\t}).then(async (dbMain) => {\n\t\t\t\tResolveIOServer._mainDB = dbMain;\n\t\t\t\t\n\t\t\t\tlet serverApp = (await import('./server-app')).default;\n\t\t\t\tResolveIOServer._mainServer = new serverApp(this, ResolveIOServer._monitorAgent, ResolveIOServer._serverConfig, this._clientDir, this._sesMail);\n\n\t\t\t\tresolve();\n\t\t\t}, (err) => {\n\t\t\t\tprocess.exit();\n\t\t\t\treject();\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic static getClientName() {\n\t\treturn this._client;\n\t}\n\n\tpublic static getMainServer() {\n\t\treturn ResolveIOServer._mainServer;\n\t}\n\n\tpublic static getMainDB() {\n\t\treturn ResolveIOServer._mainDB;\n\t}\n}"]}
@@ -66,6 +66,7 @@ var log_method_latency_collection_1 = require("../collections/log-method-latency
66
66
  var moment = require("moment");
67
67
  var report_builder_1 = require("../methods/report-builder");
68
68
  var support_1 = require("../methods/support");
69
+ var monitor_1 = require("../methods/monitor");
69
70
  var MethodManager = /** @class */ (function () {
70
71
  function MethodManager(mainServer, serverConfig, clientDir) {
71
72
  var _this = this;
@@ -90,6 +91,7 @@ var MethodManager = /** @class */ (function () {
90
91
  flags_1.loadFlagMethods(this);
91
92
  report_builder_1.loadReportBuilderMethods(this);
92
93
  support_1.loadSupportMethods(this);
94
+ monitor_1.loadMonitorMethods(this);
93
95
  if (mainServer.sesMail) {
94
96
  this._mailer = nodemailer.createTransport({
95
97
  SES: new aws.SES({