@resolveio/server-lib 20.7.120 → 20.7.121
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/client-server-app.js +51 -1
- package/client-server-app.js.map +1 -1
- package/collections/app-status.collection.js +51 -1
- package/collections/app-status.collection.js.map +1 -1
- package/collections/counter.collection.js +55 -1
- package/collections/counter.collection.js.map +1 -1
- package/collections/cron-job-history.collection.js +136 -1
- package/collections/cron-job-history.collection.js.map +1 -1
- package/collections/cron-job.collection.js +87 -1
- package/collections/cron-job.collection.js.map +1 -1
- package/collections/email-history.collection.js +98 -1
- package/collections/email-history.collection.js.map +1 -1
- package/collections/email-verified.collection.js +60 -1
- package/collections/email-verified.collection.js.map +1 -1
- package/collections/file.collection.js +73 -1
- package/collections/file.collection.js.map +1 -1
- package/collections/flag-update.collection.js +56 -1
- package/collections/flag-update.collection.js.map +1 -1
- package/collections/flag.collection.js +56 -1
- package/collections/flag.collection.js.map +1 -1
- package/collections/log-method-latency.collection.js +72 -1
- package/collections/log-method-latency.collection.js.map +1 -1
- package/collections/log-subscription.collection.js +75 -1
- package/collections/log-subscription.collection.js.map +1 -1
- package/collections/log.collection.js +87 -1
- package/collections/log.collection.js.map +1 -1
- package/collections/logged-in-users.collection.js +66 -1
- package/collections/logged-in-users.collection.js.map +1 -1
- package/collections/monitor-cpu.collection.js +64 -1
- package/collections/monitor-cpu.collection.js.map +1 -1
- package/collections/monitor-function.collection.js +73 -1
- package/collections/monitor-function.collection.js.map +1 -1
- package/collections/monitor-memory.collection.js +76 -1
- package/collections/monitor-memory.collection.js.map +1 -1
- package/collections/monitor-mongo.collection.js +70 -1
- package/collections/monitor-mongo.collection.js.map +1 -1
- package/collections/notification.collection.js +56 -1
- package/collections/notification.collection.js.map +1 -1
- package/collections/report-builder-dashboard-builder.collection.js +108 -1
- package/collections/report-builder-dashboard-builder.collection.js.map +1 -1
- package/collections/report-builder-library.collection.js +86 -1
- package/collections/report-builder-library.collection.js.map +1 -1
- package/collections/report-builder-report.collection.js +148 -1
- package/collections/report-builder-report.collection.js.map +1 -1
- package/collections/user-group.collection.js +88 -1
- package/collections/user-group.collection.js.map +1 -1
- package/collections/user-guide.collection.js +56 -1
- package/collections/user-guide.collection.js.map +1 -1
- package/collections/user.collection.js +265 -1
- package/collections/user.collection.js.map +1 -1
- package/cron/cron.js +97 -1
- package/cron/cron.js.map +1 -1
- package/fixtures/cron-jobs.js +95 -1
- package/fixtures/cron-jobs.js.map +1 -1
- package/fixtures/init.js +78 -1
- package/fixtures/init.js.map +1 -1
- package/http/auth.js +869 -1
- package/http/auth.js.map +1 -1
- package/http/health.js +11 -1
- package/http/health.js.map +1 -1
- package/http/home.js +114 -1
- package/http/home.js.map +1 -1
- package/index.js +18 -1
- package/index.js.map +1 -1
- package/managers/cron.manager.js +461 -1
- package/managers/cron.manager.js.map +1 -1
- package/managers/local-log.manager.js +79 -1
- package/managers/local-log.manager.js.map +1 -1
- package/managers/method.manager.js +1023 -1
- package/managers/method.manager.js.map +1 -1
- package/managers/mongo.manager.js +4223 -1
- package/managers/mongo.manager.js.map +1 -1
- package/managers/monitor.manager.js +534 -1
- package/managers/monitor.manager.js.map +1 -1
- package/managers/subscription.manager.js +1292 -1
- package/managers/subscription.manager.js.map +1 -1
- package/managers/websocket.manager.js +165 -1
- package/managers/websocket.manager.js.map +1 -1
- package/managers/worker-dispatcher.manager.js +335 -1
- package/managers/worker-dispatcher.manager.js.map +1 -1
- package/managers/worker-server.manager.js +292 -1
- package/managers/worker-server.manager.js.map +1 -1
- package/methods/accounts.js +302 -1
- package/methods/accounts.js.map +1 -1
- package/methods/aws.js +748 -1
- package/methods/aws.js.map +1 -1
- package/methods/collections.js +542 -1
- package/methods/collections.js.map +1 -1
- package/methods/counters.js +111 -1
- package/methods/counters.js.map +1 -1
- package/methods/cron-jobs.js +1476 -1
- package/methods/cron-jobs.js.map +1 -1
- package/methods/flag-updates.js +8 -1
- package/methods/flag-updates.js.map +1 -1
- package/methods/flags.js +8 -1
- package/methods/flags.js.map +1 -1
- package/methods/logs.js +417 -1
- package/methods/logs.js.map +1 -1
- package/methods/monitor.js +543 -1
- package/methods/monitor.js.map +1 -1
- package/methods/pdf.js +742 -1
- package/methods/pdf.js.map +1 -1
- package/methods/report-builder.js +840 -1
- package/methods/report-builder.js.map +1 -1
- package/methods/support.js +232 -1
- package/methods/support.js.map +1 -1
- package/models/app-status.model.js +3 -1
- package/models/app-status.model.js.map +1 -1
- package/models/billing-logged-in-users.model.js +3 -1
- package/models/billing-logged-in-users.model.js.map +1 -1
- package/models/collection-document.model.js +3 -1
- package/models/collection-document.model.js.map +1 -1
- package/models/counter.model.js +3 -1
- package/models/counter.model.js.map +1 -1
- package/models/cron-job-history.model.js +3 -1
- package/models/cron-job-history.model.js.map +1 -1
- package/models/cron-job.model.js +3 -1
- package/models/cron-job.model.js.map +1 -1
- package/models/dialog.model.js +3 -1
- package/models/dialog.model.js.map +1 -1
- package/models/email-history.model.js +15 -1
- package/models/email-history.model.js.map +1 -1
- package/models/email-verified.model.js +3 -1
- package/models/email-verified.model.js.map +1 -1
- package/models/file.model.js +3 -1
- package/models/file.model.js.map +1 -1
- package/models/flag-update.model.js +3 -1
- package/models/flag-update.model.js.map +1 -1
- package/models/flag.model.js +3 -1
- package/models/flag.model.js.map +1 -1
- package/models/log-method-latency.model.js +3 -1
- package/models/log-method-latency.model.js.map +1 -1
- package/models/log-subscription.model.js +3 -1
- package/models/log-subscription.model.js.map +1 -1
- package/models/log.model.js +3 -1
- package/models/log.model.js.map +1 -1
- package/models/logged-in-users.model.js +3 -1
- package/models/logged-in-users.model.js.map +1 -1
- package/models/method-response.model.js +3 -1
- package/models/method-response.model.js.map +1 -1
- package/models/method.model.d.ts +0 -1
- package/models/method.model.js +3 -1
- package/models/method.model.js.map +1 -1
- package/models/monitor-cpu.model.js +3 -1
- package/models/monitor-cpu.model.js.map +1 -1
- package/models/monitor-function.model.js +3 -1
- package/models/monitor-function.model.js.map +1 -1
- package/models/monitor-memory.model.js +3 -1
- package/models/monitor-memory.model.js.map +1 -1
- package/models/monitor-mongo.model.js +3 -1
- package/models/monitor-mongo.model.js.map +1 -1
- package/models/notification.model.js +3 -1
- package/models/notification.model.js.map +1 -1
- package/models/pagination.model.js +23 -1
- package/models/pagination.model.js.map +1 -1
- package/models/permission.model.js +3 -1
- package/models/permission.model.js.map +1 -1
- package/models/report-builder-dashboard-builder.model.js +3 -1
- package/models/report-builder-dashboard-builder.model.js.map +1 -1
- package/models/report-builder-library.model.js +3 -1
- package/models/report-builder-library.model.js.map +1 -1
- package/models/report-builder-report.model.js +3 -1
- package/models/report-builder-report.model.js.map +1 -1
- package/models/report-builder.model.js +3 -1
- package/models/report-builder.model.js.map +1 -1
- package/models/select-data-label.model.js +3 -1
- package/models/select-data-label.model.js.map +1 -1
- package/models/server-message.model.js +3 -1
- package/models/server-message.model.js.map +1 -1
- package/models/subscription.model.js +3 -1
- package/models/subscription.model.js.map +1 -1
- package/models/support-ticket.model.js +3 -1
- package/models/support-ticket.model.js.map +1 -1
- package/models/user-group.model.js +3 -1
- package/models/user-group.model.js.map +1 -1
- package/models/user-guide.model.js +3 -1
- package/models/user-guide.model.js.map +1 -1
- package/models/user.model.js +3 -1
- package/models/user.model.js.map +1 -1
- package/package.json +1 -1
- package/public_api.js +77 -1
- package/public_api.js.map +1 -1
- package/publications/app-status.js +16 -1
- package/publications/app-status.js.map +1 -1
- package/publications/cron-jobs.js +32 -1
- package/publications/cron-jobs.js.map +1 -1
- package/publications/files.js +36 -1
- package/publications/files.js.map +1 -1
- package/publications/flags-update.js +22 -1
- package/publications/flags-update.js.map +1 -1
- package/publications/flags.js +22 -1
- package/publications/flags.js.map +1 -1
- package/publications/logs.js +164 -1
- package/publications/logs.js.map +1 -1
- package/publications/notifications.js +16 -1
- package/publications/notifications.js.map +1 -1
- package/publications/report-builder-dashboard-builders.js +42 -1
- package/publications/report-builder-dashboard-builders.js.map +1 -1
- package/publications/report-builder-libraries.js +90 -1
- package/publications/report-builder-libraries.js.map +1 -1
- package/publications/report-builder-reports.js +50 -1
- package/publications/report-builder-reports.js.map +1 -1
- package/publications/super-admin.js +16 -1
- package/publications/super-admin.js.map +1 -1
- package/publications/user-groups.js +16 -1
- package/publications/user-groups.js.map +1 -1
- package/publications/user-guides.js +16 -1
- package/publications/user-guides.js.map +1 -1
- package/resolveio-server-app.js +176 -1
- package/resolveio-server-app.js.map +1 -1
- package/server-app.js +1159 -1
- package/server-app.js.map +1 -1
- package/util/common.js +632 -1
- package/util/common.js.map +1 -1
- package/util/schema-report-builder.js +454 -1
- package/util/schema-report-builder.js.map +1 -1
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadUserGuidePublications = void 0;
|
|
4
|
+
var user_guide_collection_1 = require("../collections/user-guide.collection");
|
|
5
|
+
function loadUserGuidePublications(subscriptionManager) {
|
|
6
|
+
subscriptionManager.publications({
|
|
7
|
+
userGuides: {
|
|
8
|
+
function: function () {
|
|
9
|
+
return user_guide_collection_1.UserGuides.find({}, { sort: { name: 1 } });
|
|
10
|
+
},
|
|
11
|
+
collections: ['user-guides']
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
exports.loadUserGuidePublications = loadUserGuidePublications;
|
|
16
|
+
|
|
2
17
|
//# sourceMappingURL=user-guides.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/publications/user-guides.ts"],"names":[
|
|
1
|
+
{"version":3,"sources":["../../src/publications/user-guides.ts"],"names":[],"mappings":";;;AAAA,8EAAkE;AAElE,SAAgB,yBAAyB,CAAC,mBAAmB;IAC5D,mBAAmB,CAAC,YAAY,CAAC;QAChC,UAAU,EAAE;YACX,QAAQ,EAAE;gBACT,OAAO,kCAAU,CAAC,IAAI,CAAC,EAAE,EAAE,EAAC,IAAI,EAAE,EAAC,IAAI,EAAE,CAAC,EAAC,EAAC,CAAC,CAAC;YAC/C,CAAC;YACD,WAAW,EAAE,CAAC,aAAa,CAAC;SAC5B;KACD,CAAC,CAAC;AACJ,CAAC;AATD,8DASC","file":"user-guides.js","sourcesContent":["import { UserGuides } from '../collections/user-guide.collection';\n\nexport function loadUserGuidePublications(subscriptionManager) {\n\tsubscriptionManager.publications({\n\t\tuserGuides: {\n\t\t\tfunction: function() {\n\t\t\t\treturn UserGuides.find({}, {sort: {name: 1}});\n\t\t\t},\n\t\t\tcollections: ['user-guides']\n\t\t}\n\t});\n}"]}
|
package/resolveio-server-app.js
CHANGED
|
@@ -1,2 +1,177 @@
|
|
|
1
|
-
"use strict";
|
|
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 (g && (g = 0, op[0] && (_ = 0)), _) 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
|
+
exports.ResolveIOServer = void 0;
|
|
40
|
+
var mongodb_1 = require("mongodb");
|
|
41
|
+
var ResolveIOServer = /** @class */ (function () {
|
|
42
|
+
function ResolveIOServer() {
|
|
43
|
+
}
|
|
44
|
+
ResolveIOServer.create = function (serverConfig, clientRoutes, client, clientDir, sesMail, standardProgram) {
|
|
45
|
+
if (sesMail === void 0) { sesMail = true; }
|
|
46
|
+
if (standardProgram === void 0) { standardProgram = false; }
|
|
47
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
+
var resolveioServer;
|
|
49
|
+
return __generator(this, function (_a) {
|
|
50
|
+
switch (_a.label) {
|
|
51
|
+
case 0:
|
|
52
|
+
resolveioServer = new ResolveIOServer();
|
|
53
|
+
return [4 /*yield*/, resolveioServer.initialize(serverConfig, clientRoutes, client, clientDir, sesMail, standardProgram)];
|
|
54
|
+
case 1:
|
|
55
|
+
_a.sent();
|
|
56
|
+
return [2 /*return*/, resolveioServer];
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
ResolveIOServer.prototype.initialize = function (serverConfig, clientRoutes, client, clientDir, sesMail, standardProgram) {
|
|
62
|
+
if (sesMail === void 0) { sesMail = true; }
|
|
63
|
+
if (standardProgram === void 0) { standardProgram = false; }
|
|
64
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
65
|
+
var dbConnection, LocalLogManager_1, localLogManager, MongoManager_1, mongoManager, serverApp, app, err_1;
|
|
66
|
+
return __generator(this, function (_a) {
|
|
67
|
+
switch (_a.label) {
|
|
68
|
+
case 0:
|
|
69
|
+
ResolveIOServer._serverConfig = serverConfig;
|
|
70
|
+
ResolveIOServer._clientRoutes = clientRoutes;
|
|
71
|
+
ResolveIOServer._client = client;
|
|
72
|
+
ResolveIOServer._clientDir = clientDir;
|
|
73
|
+
ResolveIOServer._sesMail = sesMail;
|
|
74
|
+
ResolveIOServer._standardProgram = standardProgram;
|
|
75
|
+
_a.label = 1;
|
|
76
|
+
case 1:
|
|
77
|
+
_a.trys.push([1, 8, , 9]);
|
|
78
|
+
return [4 /*yield*/, mongodb_1.MongoClient.connect(ResolveIOServer.getServerConfig()['MONGO_URL'])];
|
|
79
|
+
case 2:
|
|
80
|
+
dbConnection = _a.sent();
|
|
81
|
+
process.removeAllListeners('unhandledRejection');
|
|
82
|
+
ResolveIOServer.setMongoConnection(dbConnection);
|
|
83
|
+
ResolveIOServer.setMainDB(dbConnection.db(ResolveIOServer.getServerConfig()['DATABASE']));
|
|
84
|
+
return [4 /*yield*/, Promise.resolve().then(function () { return require('./managers/local-log.manager'); })];
|
|
85
|
+
case 3:
|
|
86
|
+
LocalLogManager_1 = (_a.sent()).LocalLogManager;
|
|
87
|
+
localLogManager = LocalLogManager_1.create();
|
|
88
|
+
ResolveIOServer.setLocalLogManager(localLogManager);
|
|
89
|
+
return [4 /*yield*/, Promise.resolve().then(function () { return require('./managers/mongo.manager'); })];
|
|
90
|
+
case 4:
|
|
91
|
+
MongoManager_1 = (_a.sent()).MongoManager;
|
|
92
|
+
return [4 /*yield*/, MongoManager_1.create()];
|
|
93
|
+
case 5:
|
|
94
|
+
mongoManager = _a.sent();
|
|
95
|
+
ResolveIOServer.setMongoManager(mongoManager);
|
|
96
|
+
return [4 /*yield*/, Promise.resolve().then(function () { return require('./server-app'); })];
|
|
97
|
+
case 6:
|
|
98
|
+
serverApp = (_a.sent()).ResolveIOMainServer;
|
|
99
|
+
return [4 /*yield*/, serverApp.create()];
|
|
100
|
+
case 7:
|
|
101
|
+
app = _a.sent();
|
|
102
|
+
ResolveIOServer.setMainServer(app);
|
|
103
|
+
return [2 /*return*/, true];
|
|
104
|
+
case 8:
|
|
105
|
+
err_1 = _a.sent();
|
|
106
|
+
err_1.message = 'Error in ResolveIOServer (initialize): Mongo Client Connect And Run ResolveIO Server App Library - ' + err_1.message;
|
|
107
|
+
process.exit(1);
|
|
108
|
+
return [3 /*break*/, 9];
|
|
109
|
+
case 9: return [2 /*return*/];
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
ResolveIOServer.getClientName = function () {
|
|
115
|
+
return this._client;
|
|
116
|
+
};
|
|
117
|
+
ResolveIOServer.getMainServer = function () {
|
|
118
|
+
return ResolveIOServer._mainServer;
|
|
119
|
+
};
|
|
120
|
+
ResolveIOServer.setMainServer = function (mainServer) {
|
|
121
|
+
ResolveIOServer._mainServer = mainServer;
|
|
122
|
+
};
|
|
123
|
+
ResolveIOServer.setMongoConnection = function (mongoConnection) {
|
|
124
|
+
ResolveIOServer._mongoConnection = mongoConnection;
|
|
125
|
+
};
|
|
126
|
+
ResolveIOServer.getMongoConnection = function () {
|
|
127
|
+
return ResolveIOServer._mongoConnection;
|
|
128
|
+
};
|
|
129
|
+
ResolveIOServer.getMainDB = function () {
|
|
130
|
+
return ResolveIOServer._mainDB;
|
|
131
|
+
};
|
|
132
|
+
ResolveIOServer.setMainDB = function (mainDB) {
|
|
133
|
+
ResolveIOServer._mainDB = mainDB;
|
|
134
|
+
};
|
|
135
|
+
ResolveIOServer.getMongoManager = function () {
|
|
136
|
+
return ResolveIOServer._mongoManager;
|
|
137
|
+
};
|
|
138
|
+
ResolveIOServer.setMongoManager = function (mongoManager) {
|
|
139
|
+
ResolveIOServer._mongoManager = mongoManager;
|
|
140
|
+
};
|
|
141
|
+
ResolveIOServer.getLocalLogManager = function () {
|
|
142
|
+
return ResolveIOServer._localLogManager;
|
|
143
|
+
};
|
|
144
|
+
ResolveIOServer.setLocalLogManager = function (localLogManager) {
|
|
145
|
+
ResolveIOServer._localLogManager = localLogManager;
|
|
146
|
+
};
|
|
147
|
+
ResolveIOServer.getServerConfig = function () {
|
|
148
|
+
return ResolveIOServer._serverConfig;
|
|
149
|
+
};
|
|
150
|
+
ResolveIOServer.getClientRoutes = function () {
|
|
151
|
+
return ResolveIOServer._clientRoutes;
|
|
152
|
+
};
|
|
153
|
+
ResolveIOServer.getClientDir = function () {
|
|
154
|
+
return ResolveIOServer._clientDir;
|
|
155
|
+
};
|
|
156
|
+
ResolveIOServer.getSESMail = function () {
|
|
157
|
+
return ResolveIOServer._sesMail;
|
|
158
|
+
};
|
|
159
|
+
ResolveIOServer.getStandardProgram = function () {
|
|
160
|
+
return ResolveIOServer._standardProgram;
|
|
161
|
+
};
|
|
162
|
+
ResolveIOServer._serverConfig = null;
|
|
163
|
+
ResolveIOServer._clientRoutes = [];
|
|
164
|
+
ResolveIOServer._mongoConnection = null;
|
|
165
|
+
ResolveIOServer._mainDB = null;
|
|
166
|
+
ResolveIOServer._mainServer = null;
|
|
167
|
+
ResolveIOServer._localLogManager = null;
|
|
168
|
+
ResolveIOServer._mongoManager = null;
|
|
169
|
+
ResolveIOServer._client = '';
|
|
170
|
+
ResolveIOServer._clientDir = '';
|
|
171
|
+
ResolveIOServer._sesMail = true;
|
|
172
|
+
ResolveIOServer._standardProgram = false;
|
|
173
|
+
return ResolveIOServer;
|
|
174
|
+
}());
|
|
175
|
+
exports.ResolveIOServer = ResolveIOServer;
|
|
176
|
+
|
|
2
177
|
//# sourceMappingURL=resolveio-server-app.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/resolveio-server-app.ts"],"names":[
|
|
1
|
+
{"version":3,"sources":["../../src/resolveio-server-app.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA0C;AAK1C;IAaC;IAAe,CAAC;IAEI,sBAAM,GAA1B,UAA2B,YAAY,EAAE,YAAsB,EAAE,MAAc,EAAE,SAAS,EAAE,OAAc,EAAE,eAAuB;QAAvC,wBAAA,EAAA,cAAc;QAAE,gCAAA,EAAA,uBAAuB;;;;;;wBAC5H,eAAe,GAAG,IAAI,eAAe,EAAE,CAAC;wBAC9C,qBAAM,eAAe,CAAC,UAAU,CAAC,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,eAAe,CAAC,EAAA;;wBAAzG,SAAyG,CAAC;wBAC1G,sBAAO,eAAe,EAAC;;;;KACvB;IAEa,oCAAU,GAAxB,UAAyB,YAAY,EAAE,YAAsB,EAAE,MAAc,EAAE,SAAS,EAAE,OAAc,EAAE,eAAuB;QAAvC,wBAAA,EAAA,cAAc;QAAE,gCAAA,EAAA,uBAAuB;;;;;;wBAChI,eAAe,CAAC,aAAa,GAAG,YAAY,CAAC;wBAC7C,eAAe,CAAC,aAAa,GAAG,YAAY,CAAC;wBAC7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gB,CAAC;IACzC,CAAC;IAhIc,6BAAa,GAAG,IAAI,CAAC;IACrB,6BAAa,GAAG,EAAE,CAAC;IACnB,gCAAgB,GAAgB,IAAI,CAAC;IACrC,uBAAO,GAAO,IAAI,CAAC;IACnB,2BAAW,GAAG,IAAI,CAAC;IACnB,gCAAgB,GAAG,IAAI,CAAC;IACxB,6BAAa,GAAG,IAAI,CAAC;IACrB,uBAAO,GAAG,EAAE,CAAC;IACb,0BAAU,GAAG,EAAE,CAAC;IAChB,wBAAQ,GAAG,IAAI,CAAC;IAChB,gCAAgB,GAAG,KAAK,CAAC;IAuHzC,sBAAC;CAlID,AAkIC,IAAA;AAlIY,0CAAe","file":"resolveio-server-app.js","sourcesContent":["import { Db, MongoClient } from 'mongodb';\nimport { LocalLogManager } from './managers/local-log.manager';\nimport { MongoManager } from './managers/mongo.manager';\nimport { ResolveIOMainServer } from './server-app';\n\nexport class ResolveIOServer {\n\tprivate static _serverConfig = null;\n\tprivate static _clientRoutes = [];\n\tprivate static _mongoConnection: MongoClient = null;\n\tprivate static _mainDB: Db = null;\n\tprivate static _mainServer = null;\n\tprivate static _localLogManager = null;\n\tprivate static _mongoManager = null;\n\tprivate static _client = '';\n\tprivate static _clientDir = '';\n\tprivate static _sesMail = true;\n\tprivate static _standardProgram = false;\n\n\tconstructor() {}\n\t\n\tpublic static async create(serverConfig, clientRoutes: string[], client: string, clientDir, sesMail = true, standardProgram = false) {\n\t\tconst resolveioServer = new ResolveIOServer();\n\t\tawait resolveioServer.initialize(serverConfig, clientRoutes, client, clientDir, sesMail, standardProgram);\n\t\treturn resolveioServer;\n\t}\n\n\tprivate async initialize(serverConfig, clientRoutes: string[], client: string, clientDir, sesMail = true, standardProgram = false) {\n\t\tResolveIOServer._serverConfig = serverConfig;\n\t\tResolveIOServer._clientRoutes = clientRoutes;\n\t\tResolveIOServer._client = client;\n\t\tResolveIOServer._clientDir = clientDir;\n\t\tResolveIOServer._sesMail = sesMail;\n\t\tResolveIOServer._standardProgram = standardProgram;\n\t\t\n\t\ttry {\n\t\t\tlet dbConnection = await MongoClient.connect(ResolveIOServer.getServerConfig()['MONGO_URL']);\n\t\t\tprocess.removeAllListeners('unhandledRejection');\n\t\t\t\n\t\t\tResolveIOServer.setMongoConnection(dbConnection);\n\t\t\tResolveIOServer.setMainDB(dbConnection.db(ResolveIOServer.getServerConfig()['DATABASE']));\n\n\t\t\t// dbConnection\n\t\t\t// .on('error', error => {\n\t\t\t// \tif (typeof error.message === 'string' && error.message.includes('ns does not exist')) {\n\t\t\t// \t\treturn;\n\t\t\t// \t}\n\t\t\t\t\t\n\t\t\t// \t// Otherwise log normally\n\t\t\t// \tthrow error;\n\t\t\t// })\n\t\t\t// .on('close', () => process.exit(1));\n\t\n\t\t\tlet LocalLogManager = (await import('./managers/local-log.manager')).LocalLogManager;\n\t\t\tlet localLogManager = LocalLogManager.create();\n\t\t\tResolveIOServer.setLocalLogManager(localLogManager);\n\n\t\t\tlet MongoManager = (await import('./managers/mongo.manager')).MongoManager;\n\t\t\tlet mongoManager = await MongoManager.create();\n\t\t\tResolveIOServer.setMongoManager(mongoManager);\n\t\t\t\n\t\t\tlet serverApp = (await import('./server-app')).ResolveIOMainServer;\n\t\t\tlet app = await serverApp.create();\n\t\t\tResolveIOServer.setMainServer(app);\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\tcatch (err) {\n\t\t\terr.message = 'Error in ResolveIOServer (initialize): Mongo Client Connect And Run ResolveIO Server App Library - ' + err.message;\n\t\t\tprocess.exit(1);\n\t\t}\n\t}\n\n\tpublic static getClientName() {\n\t\treturn this._client;\n\t}\n\n\tpublic static getMainServer(): ResolveIOMainServer {\n\t\treturn ResolveIOServer._mainServer;\n\t}\n\n\tpublic static setMainServer(mainServer: ResolveIOMainServer) {\n\t\tResolveIOServer._mainServer = mainServer;\n\t}\n\n\tpublic static setMongoConnection(mongoConnection: MongoClient) {\n\t\tResolveIOServer._mongoConnection = mongoConnection;\n\t}\n\n\tpublic static getMongoConnection(): MongoClient {\n\t\treturn ResolveIOServer._mongoConnection;\n\t}\n\n\tpublic static getMainDB(): Db {\n\t\treturn ResolveIOServer._mainDB;\n\t}\n\n\tpublic static setMainDB(mainDB: Db) {\n\t\tResolveIOServer._mainDB = mainDB\n\t}\n\n\tpublic static getMongoManager(): MongoManager {\n\t\treturn ResolveIOServer._mongoManager;\n\t}\n\n\tpublic static setMongoManager(mongoManager: MongoManager) {\n\t\tResolveIOServer._mongoManager = mongoManager;\n\t}\n\n\tpublic static getLocalLogManager(): LocalLogManager {\n\t\treturn ResolveIOServer._localLogManager;\n\t}\n\n\tpublic static setLocalLogManager(localLogManager: LocalLogManager) {\n\t\tResolveIOServer._localLogManager = localLogManager;\n\t}\n\n\tpublic static getServerConfig() {\n\t\treturn ResolveIOServer._serverConfig;\n\t}\n\n\tpublic static getClientRoutes() {\n\t\treturn ResolveIOServer._clientRoutes;\n\t}\n\n\tpublic static getClientDir(): string {\n\t\treturn ResolveIOServer._clientDir;\n\t}\n\n\tpublic static getSESMail(): boolean {\n\t\treturn ResolveIOServer._sesMail;\n\t}\n\n\tpublic static getStandardProgram(): boolean {\n\t\treturn ResolveIOServer._standardProgram;\n\t}\n}"]}
|