@resolveio/server-lib 4.3.2-newrole → 4.3.3
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/collections/user.collection.js +32 -39
- package/fixtures/init.js +1 -1
- package/index.d.ts +1 -1
- package/managers/method.manager.d.ts +3 -3
- package/managers/method.manager.js +1 -1
- package/managers/subscription.manager.js +51 -98
- package/managers/support.manager.d.ts +2 -2
- package/managers/support.manager.js +1 -1
- package/package.json +1 -1
- package/server-app.js +4 -2
|
@@ -21,6 +21,13 @@ var schema = {
|
|
|
21
21
|
type: Date,
|
|
22
22
|
optional: true
|
|
23
23
|
},
|
|
24
|
+
readonly: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
optional: true
|
|
27
|
+
},
|
|
28
|
+
active: {
|
|
29
|
+
type: Boolean
|
|
30
|
+
},
|
|
24
31
|
attempts: {
|
|
25
32
|
type: Number,
|
|
26
33
|
optional: true
|
|
@@ -57,67 +64,53 @@ var schema = {
|
|
|
57
64
|
type: String
|
|
58
65
|
},
|
|
59
66
|
roles: {
|
|
60
|
-
type: Object
|
|
61
|
-
},
|
|
62
|
-
'roles.super_admin': {
|
|
63
|
-
type: Boolean
|
|
64
|
-
},
|
|
65
|
-
'roles.approvals': {
|
|
66
67
|
type: Array
|
|
67
68
|
},
|
|
68
|
-
'roles
|
|
69
|
-
type: Object
|
|
70
|
-
},
|
|
71
|
-
'roles.approvals.$.name': {
|
|
69
|
+
'roles.$': {
|
|
72
70
|
type: String
|
|
73
71
|
},
|
|
74
|
-
|
|
75
|
-
type: String
|
|
72
|
+
phonenumber: {
|
|
73
|
+
type: String,
|
|
74
|
+
optional: true
|
|
76
75
|
},
|
|
77
|
-
|
|
78
|
-
type:
|
|
76
|
+
other: {
|
|
77
|
+
type: Object,
|
|
78
|
+
blackbox: true,
|
|
79
|
+
optional: true
|
|
79
80
|
},
|
|
80
|
-
|
|
81
|
-
type: Array
|
|
81
|
+
assets: {
|
|
82
|
+
type: Array,
|
|
83
|
+
optional: true
|
|
82
84
|
},
|
|
83
|
-
'
|
|
85
|
+
'assets.$': {
|
|
84
86
|
type: Object
|
|
85
87
|
},
|
|
86
|
-
'
|
|
88
|
+
'assets.$.type': {
|
|
87
89
|
type: String
|
|
88
90
|
},
|
|
89
|
-
'
|
|
90
|
-
type: Array
|
|
91
|
-
},
|
|
92
|
-
'roles.groups.$.views.$': {
|
|
91
|
+
'assets.$.id_asset': {
|
|
93
92
|
type: String
|
|
94
93
|
},
|
|
95
|
-
'
|
|
96
|
-
type: String
|
|
97
|
-
optional: true
|
|
94
|
+
'assets.$.asset_number': {
|
|
95
|
+
type: String
|
|
98
96
|
},
|
|
99
|
-
'
|
|
100
|
-
type:
|
|
97
|
+
'assets.$.ownership': {
|
|
98
|
+
type: String
|
|
101
99
|
},
|
|
102
|
-
'
|
|
100
|
+
'assets.$.ownership_driver': {
|
|
103
101
|
type: String
|
|
104
102
|
},
|
|
105
|
-
'
|
|
106
|
-
type:
|
|
103
|
+
'assets.$.date_start': {
|
|
104
|
+
type: Date
|
|
107
105
|
},
|
|
108
|
-
'
|
|
109
|
-
type:
|
|
106
|
+
'assets.$.date_end': {
|
|
107
|
+
type: Date,
|
|
108
|
+
optional: true
|
|
110
109
|
},
|
|
111
|
-
|
|
112
|
-
phonenumber: {
|
|
110
|
+
id_function: {
|
|
113
111
|
type: String,
|
|
114
112
|
optional: true
|
|
115
113
|
},
|
|
116
|
-
other: {
|
|
117
|
-
type: Object,
|
|
118
|
-
optional: true,
|
|
119
|
-
blackbox: true
|
|
120
|
-
},
|
|
121
114
|
customers: {
|
|
122
115
|
type: Array,
|
|
123
116
|
optional: true,
|
package/fixtures/init.js
CHANGED
|
@@ -37,8 +37,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
38
|
var app_version_collection_1 = require("../collections/app-version.collection");
|
|
39
39
|
var logged_in_users_collection_1 = require("../collections/logged-in-users.collection");
|
|
40
|
-
var mongoose_1 = require("mongoose");
|
|
41
40
|
var active_subscription_collection_1 = require("../collections/active-subscription.collection");
|
|
41
|
+
var mongoose_1 = require("mongoose");
|
|
42
42
|
function loadServerInit() {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function () {
|
|
44
44
|
var appVersion;
|
package/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare class ResolveIOServer {
|
|
|
8
8
|
private static _clientDir;
|
|
9
9
|
private static _dontRunSupport;
|
|
10
10
|
constructor(serverConfig: any, client: string, clientDir: any, _dontRunSupport?: any);
|
|
11
|
-
static connectAndRun(): Promise<
|
|
11
|
+
static connectAndRun(): Promise<unknown>;
|
|
12
12
|
static getClientName(): string;
|
|
13
13
|
static getMainServer(): ResolveIOMainServer;
|
|
14
14
|
static getMainDB(): any;
|
|
@@ -16,13 +16,13 @@ export declare class MethodManager {
|
|
|
16
16
|
getMainServer(): ResolveIOMainServer;
|
|
17
17
|
methods(method: MethodModel): void;
|
|
18
18
|
callMethodCron(method: string, ...methodData: any[]): void;
|
|
19
|
-
callMethodQueue(update: QueueMethodModel): Promise<
|
|
19
|
+
callMethodQueue(update: QueueMethodModel): Promise<unknown>;
|
|
20
20
|
callMethod(id_methodLatency: string, ws: WebSocket, messageDate: Date, messageId: number, method: string, ...methodData: any[]): void;
|
|
21
21
|
callMethodInternal(method: any, ...methodData: any[]): Promise<any>;
|
|
22
22
|
callSupportMethodInternal(supportMethod: any, ...methodData: any[]): Promise<any>;
|
|
23
23
|
private sendWS;
|
|
24
24
|
sendEmail(sendTo: string, subject: string, text?: string, html?: string, attachments?: any[], send_from?: string): void;
|
|
25
25
|
getAWS(): aws.S3;
|
|
26
|
-
readFile(fileName: any): Promise<
|
|
27
|
-
readImage(fileName: any): Promise<
|
|
26
|
+
readFile(fileName: any): Promise<unknown>;
|
|
27
|
+
readImage(fileName: any): Promise<unknown>;
|
|
28
28
|
}
|
|
@@ -416,8 +416,8 @@ var MethodManager = /** @class */ (function () {
|
|
|
416
416
|
};
|
|
417
417
|
// Call/run method (Emit on Socket)
|
|
418
418
|
MethodManager.prototype.callMethod = function (id_methodLatency, ws, messageDate, messageId, method) {
|
|
419
|
-
var _this = this;
|
|
420
419
|
var _a;
|
|
420
|
+
var _this = this;
|
|
421
421
|
var methodData = [];
|
|
422
422
|
for (var _i = 5; _i < arguments.length; _i++) {
|
|
423
423
|
methodData[_i - 5] = arguments[_i];
|
|
@@ -137,7 +137,8 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
137
137
|
subscriptionData[_i - 4] = arguments[_i];
|
|
138
138
|
}
|
|
139
139
|
return __awaiter(this, void 0, void 0, function () {
|
|
140
|
-
var
|
|
140
|
+
var that, pub, valObj, valKeys, rootKeys, i, sub, _a, newActiveSub, begDate, endDate, billUser;
|
|
141
|
+
var _b;
|
|
141
142
|
return __generator(this, function (_c) {
|
|
142
143
|
switch (_c.label) {
|
|
143
144
|
case 0:
|
|
@@ -203,10 +204,10 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
203
204
|
// Send pub data to client who just subscribed only, don't want to send to existing clients since nothing has changed
|
|
204
205
|
that.sendPubDataOnce(ws, messageId, sub, 'newSub', that.getPublicationCollections(publication)[0]);
|
|
205
206
|
if (!(that._publications[sub.publication].preFunction && !sub.preSubscriptionData)) return [3 /*break*/, 3];
|
|
206
|
-
|
|
207
|
-
return [4 /*yield*/, (
|
|
207
|
+
_a = sub;
|
|
208
|
+
return [4 /*yield*/, (_b = that._publications[sub.publication]).preFunction.apply(_b, sub.subscriptionData)];
|
|
208
209
|
case 2:
|
|
209
|
-
|
|
210
|
+
_a.preSubscriptionData = _c.sent();
|
|
210
211
|
_c.label = 3;
|
|
211
212
|
case 3:
|
|
212
213
|
newActiveSub = new active_subscription_collection_1.ActiveSubscriptions({
|
|
@@ -504,38 +505,37 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
504
505
|
var _this = this;
|
|
505
506
|
var that = this;
|
|
506
507
|
setInterval(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
507
|
-
var
|
|
508
|
+
var oplogQueue, uniqueOplog_1, needIds_1, _loop_3, i;
|
|
508
509
|
var _this = this;
|
|
509
510
|
return __generator(this, function (_a) {
|
|
510
511
|
switch (_a.label) {
|
|
511
512
|
case 0:
|
|
512
513
|
if (!this._oplogQueue.length) return [3 /*break*/, 5];
|
|
513
|
-
|
|
514
|
+
oplogQueue = common_1.deepCopy(this._oplogQueue);
|
|
514
515
|
this._oplogQueue = [];
|
|
515
|
-
uniquePubs_1 = [];
|
|
516
516
|
uniqueOplog_1 = [];
|
|
517
517
|
needIds_1 = {};
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
518
|
+
console.log('----------------OPLOG QUEUE START BEFORE DATA--------------------', new Date(), oplogQueue.length);
|
|
519
|
+
oplogQueue.forEach(function (oplog) {
|
|
520
|
+
if (!uniqueOplog_1.filter(function (a) { return JSON.stringify(a) === JSON.stringify(oplog); }).length) {
|
|
521
|
+
uniqueOplog_1.push(oplog);
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
uniqueOplog_1.forEach(function (oplog) {
|
|
525
|
+
var schemaErrors = null;
|
|
526
|
+
try {
|
|
527
|
+
index_1.ResolveIOServer.getMainDB().model(oplog.collection)['simplschema'].validate(oplog.doc);
|
|
528
|
+
}
|
|
529
|
+
catch (errors) {
|
|
530
|
+
schemaErrors = errors;
|
|
531
|
+
}
|
|
532
|
+
if (schemaErrors) {
|
|
533
|
+
if (!needIds_1[oplog.collection]) {
|
|
534
|
+
needIds_1[oplog.collection] = [oplog.doc['_id']];
|
|
535
|
+
}
|
|
536
|
+
else {
|
|
537
|
+
if (!needIds_1[oplog.collection].filter(function (a) { return a === oplog.doc['_id']; })[0]) {
|
|
538
|
+
needIds_1[oplog.collection].push(oplog.doc['_id']);
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
541
|
}
|
|
@@ -550,7 +550,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
550
550
|
case 1:
|
|
551
551
|
docs = _a.sent();
|
|
552
552
|
needIds_1[collection].forEach(function (id_doc) {
|
|
553
|
-
|
|
553
|
+
uniqueOplog_1.filter(function (a) { return a.doc._id === id_doc; })[0].doc = docs.filter(function (a) { return a._id === id_doc; })[0];
|
|
554
554
|
});
|
|
555
555
|
return [2 /*return*/];
|
|
556
556
|
}
|
|
@@ -568,58 +568,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
568
568
|
i++;
|
|
569
569
|
return [3 /*break*/, 1];
|
|
570
570
|
case 4:
|
|
571
|
-
|
|
572
|
-
oplogQueue_1.forEach(function (oplog) { return __awaiter(_this, void 0, void 0, function () {
|
|
573
|
-
var _loop_4, i;
|
|
574
|
-
return __generator(this, function (_a) {
|
|
575
|
-
_loop_4 = function (i) {
|
|
576
|
-
var _a;
|
|
577
|
-
var sub = that._subscriptions[i];
|
|
578
|
-
if (sub.collections.includes(oplog.collection)) {
|
|
579
|
-
if (sub.preSubscriptionData) {
|
|
580
|
-
if (that._publications[sub.publication].fetchFunction(oplog.doc, sub.preSubscriptionData)) {
|
|
581
|
-
if (!uniquePubs_1.filter(function (a) { return a.publication === sub.publication && ((!a.subscriptionData && !sub.subscriptionData) || JSON.stringify(a.subscriptionData) === JSON.stringify(sub.subscriptionData)); })[0]) {
|
|
582
|
-
uniquePubs_1.push(sub);
|
|
583
|
-
uniqueOplog_1.push(oplog);
|
|
584
|
-
}
|
|
585
|
-
return "continue";
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
if (that._publications[sub.publication].preFunction) {
|
|
589
|
-
if (!uniquePubs_1.filter(function (a) { return a.publication === sub.publication && ((!a.subscriptionData && !sub.subscriptionData) || JSON.stringify(a.subscriptionData) === JSON.stringify(sub.subscriptionData)); })[0]) {
|
|
590
|
-
uniquePubs_1.push(sub);
|
|
591
|
-
uniqueOplog_1.push(oplog);
|
|
592
|
-
}
|
|
593
|
-
return "continue";
|
|
594
|
-
}
|
|
595
|
-
else {
|
|
596
|
-
if (that._publications[sub.publication].fetchFunction) {
|
|
597
|
-
if ((_a = that._publications[sub.publication]).fetchFunction.apply(_a, [oplog.doc].concat(sub.subscriptionData))) {
|
|
598
|
-
if (!uniquePubs_1.filter(function (a) { return a.publication === sub.publication && ((!a.subscriptionData && !sub.subscriptionData) || JSON.stringify(a.subscriptionData) === JSON.stringify(sub.subscriptionData)); })[0]) {
|
|
599
|
-
uniquePubs_1.push(sub);
|
|
600
|
-
uniqueOplog_1.push(oplog);
|
|
601
|
-
}
|
|
602
|
-
return "continue";
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
else {
|
|
606
|
-
if (!uniquePubs_1.filter(function (a) { return a.publication === sub.publication && ((!a.subscriptionData && !sub.subscriptionData) || JSON.stringify(a.subscriptionData) === JSON.stringify(sub.subscriptionData)); })[0]) {
|
|
607
|
-
uniquePubs_1.push(sub);
|
|
608
|
-
uniqueOplog_1.push(oplog);
|
|
609
|
-
}
|
|
610
|
-
return "continue";
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
};
|
|
615
|
-
// console.log('OPLOG QUEUE START - Oplog', oplog);
|
|
616
|
-
for (i = 0; i < that._subscriptions.length; i++) {
|
|
617
|
-
_loop_4(i);
|
|
618
|
-
}
|
|
619
|
-
return [2 /*return*/];
|
|
620
|
-
});
|
|
621
|
-
}); });
|
|
622
|
-
// // console.log('----------------OPLOG QUEUE END--------------------', new Date(), uniqueOplog.length);
|
|
571
|
+
console.log('----------------OPLOG QUEUE END--------------------', new Date(), uniqueOplog_1.length);
|
|
623
572
|
uniqueOplog_1.forEach(function (oplog) {
|
|
624
573
|
// console.log('OPLOG QUEUE END - Oplog', oplog);
|
|
625
574
|
_this.checkPubsForChanges(oplog.collection, oplog.doc, oplog.type);
|
|
@@ -654,24 +603,25 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
654
603
|
var _this = this;
|
|
655
604
|
var that = this;
|
|
656
605
|
that._subscriptions.filter(function (a) { return a.collections.includes(collection); }).forEach(function (sub) { return __awaiter(_this, void 0, void 0, function () {
|
|
657
|
-
var _a, _b
|
|
606
|
+
var _a, _b;
|
|
607
|
+
var _c, _d;
|
|
658
608
|
return __generator(this, function (_e) {
|
|
659
609
|
switch (_e.label) {
|
|
660
610
|
case 0:
|
|
661
611
|
if (!sub.preSubscriptionData) return [3 /*break*/, 2];
|
|
662
612
|
if (!that._publications[sub.publication].fetchFunction(document, sub.preSubscriptionData)) return [3 /*break*/, 2];
|
|
663
613
|
that.sendPubData(sub, type, collection);
|
|
664
|
-
|
|
665
|
-
return [4 /*yield*/, (
|
|
614
|
+
_a = sub;
|
|
615
|
+
return [4 /*yield*/, (_c = that._publications[sub.publication]).preFunction.apply(_c, sub.subscriptionData)];
|
|
666
616
|
case 1:
|
|
667
|
-
|
|
617
|
+
_a.preSubscriptionData = _e.sent();
|
|
668
618
|
_e.label = 2;
|
|
669
619
|
case 2:
|
|
670
620
|
if (!that._publications[sub.publication].preFunction) return [3 /*break*/, 4];
|
|
671
|
-
|
|
621
|
+
_b = sub;
|
|
672
622
|
return [4 /*yield*/, that._publications[sub.publication].preFunction(sub.subscriptionData)];
|
|
673
623
|
case 3:
|
|
674
|
-
|
|
624
|
+
_b.preSubscriptionData = _e.sent();
|
|
675
625
|
if (that._publications[sub.publication].fetchFunction(document, sub.preSubscriptionData)) {
|
|
676
626
|
that.sendPubData(sub, type, collection);
|
|
677
627
|
}
|
|
@@ -700,7 +650,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
700
650
|
}
|
|
701
651
|
else {
|
|
702
652
|
if (that._publications[sub.publication].fetchFunction) {
|
|
703
|
-
if ((
|
|
653
|
+
if ((_d = that._publications[sub.publication]).fetchFunction.apply(_d, [document].concat(sub.subscriptionData))) {
|
|
704
654
|
that.sendPubData(sub, type, collection);
|
|
705
655
|
}
|
|
706
656
|
// else
|
|
@@ -719,7 +669,8 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
719
669
|
var _this = this;
|
|
720
670
|
var that = this;
|
|
721
671
|
that._subscriptions.filter(function (a) { return a.collections.includes(collection); }).forEach(function (sub) { return __awaiter(_this, void 0, void 0, function () {
|
|
722
|
-
var
|
|
672
|
+
var schemaErrors, _a, _b;
|
|
673
|
+
var _c, _d, _e;
|
|
723
674
|
return __generator(this, function (_f) {
|
|
724
675
|
switch (_f.label) {
|
|
725
676
|
case 0:
|
|
@@ -739,17 +690,17 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
739
690
|
if (!sub.preSubscriptionData) return [3 /*break*/, 4];
|
|
740
691
|
if (!that._publications[sub.publication].fetchFunction(document, sub.preSubscriptionData)) return [3 /*break*/, 4];
|
|
741
692
|
that.sendPubData(sub, 'support', collection);
|
|
742
|
-
|
|
743
|
-
return [4 /*yield*/, (
|
|
693
|
+
_a = sub;
|
|
694
|
+
return [4 /*yield*/, (_c = that._publications[sub.publication]).preFunction.apply(_c, sub.subscriptionData)];
|
|
744
695
|
case 3:
|
|
745
|
-
|
|
696
|
+
_a.preSubscriptionData = _f.sent();
|
|
746
697
|
return [2 /*return*/];
|
|
747
698
|
case 4:
|
|
748
699
|
if (!that._publications[sub.publication].preFunction) return [3 /*break*/, 6];
|
|
749
|
-
|
|
750
|
-
return [4 /*yield*/, (
|
|
700
|
+
_b = sub;
|
|
701
|
+
return [4 /*yield*/, (_d = that._publications[sub.publication]).preFunction.apply(_d, sub.subscriptionData)];
|
|
751
702
|
case 5:
|
|
752
|
-
|
|
703
|
+
_b.preSubscriptionData = _f.sent();
|
|
753
704
|
if (that._publications[sub.publication].fetchFunction(document, sub.preSubscriptionData)) {
|
|
754
705
|
that.sendPubData(sub, 'support', collection);
|
|
755
706
|
}
|
|
@@ -778,7 +729,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
778
729
|
}
|
|
779
730
|
else {
|
|
780
731
|
if (that._publications[sub.publication].fetchFunction) {
|
|
781
|
-
if ((
|
|
732
|
+
if ((_e = that._publications[sub.publication]).fetchFunction.apply(_e, [document].concat(sub.subscriptionData))) {
|
|
782
733
|
that.sendPubData(sub, 'support', collection);
|
|
783
734
|
}
|
|
784
735
|
}
|
|
@@ -795,7 +746,8 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
795
746
|
// Fetch pub once, send to all clients linked to this pub
|
|
796
747
|
SubscriptionManager.prototype.sendPubDataOnce = function (ws, messageId, subscription, type, collection) {
|
|
797
748
|
return __awaiter(this, void 0, void 0, function () {
|
|
798
|
-
var
|
|
749
|
+
var that;
|
|
750
|
+
var _a, _b;
|
|
799
751
|
var _this = this;
|
|
800
752
|
return __generator(this, function (_c) {
|
|
801
753
|
that = this;
|
|
@@ -847,7 +799,8 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
847
799
|
// Fetch pub once, send to all clients linked to this pub
|
|
848
800
|
SubscriptionManager.prototype.sendPubData = function (subscription, type, collection) {
|
|
849
801
|
return __awaiter(this, void 0, void 0, function () {
|
|
850
|
-
var
|
|
802
|
+
var that;
|
|
803
|
+
var _a;
|
|
851
804
|
var _this = this;
|
|
852
805
|
return __generator(this, function (_b) {
|
|
853
806
|
that = this;
|
|
@@ -17,6 +17,6 @@ export declare class SupportManager {
|
|
|
17
17
|
callMethodInternal(method: any, ...methodData: any[]): Promise<any>;
|
|
18
18
|
private sendWS;
|
|
19
19
|
sendEmail(sendTo: string, subject: string, text?: string, html?: string, attachments?: any[], from?: string): void;
|
|
20
|
-
readFile(fileName: any): Promise<
|
|
21
|
-
readImage(fileName: any): Promise<
|
|
20
|
+
readFile(fileName: any): Promise<unknown>;
|
|
21
|
+
readImage(fileName: any): Promise<unknown>;
|
|
22
22
|
}
|
|
@@ -102,8 +102,8 @@ var SupportManager = /** @class */ (function () {
|
|
|
102
102
|
};
|
|
103
103
|
// Call/run method (Emit on Socket)
|
|
104
104
|
SupportManager.prototype.callSupportMethod = function (ws, messageId, supportMethod) {
|
|
105
|
-
var _this = this;
|
|
106
105
|
var _a;
|
|
106
|
+
var _this = this;
|
|
107
107
|
var methodData = [];
|
|
108
108
|
for (var _i = 3; _i < arguments.length; _i++) {
|
|
109
109
|
methodData[_i - 3] = arguments[_i];
|
package/package.json
CHANGED
package/server-app.js
CHANGED
|
@@ -254,7 +254,8 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
254
254
|
}, 10000);
|
|
255
255
|
// On data received (message)
|
|
256
256
|
ws.on('message', function (message) { return __awaiter(_this, void 0, void 0, function () {
|
|
257
|
-
var
|
|
257
|
+
var socketData, data, messageDate, messageId, type, subType, pub;
|
|
258
|
+
var _a, _b;
|
|
258
259
|
var _this = this;
|
|
259
260
|
return __generator(this, function (_c) {
|
|
260
261
|
socketData = JSON.parse(message, common_1.dateReviver);
|
|
@@ -329,7 +330,8 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
329
330
|
if (!!this._msgQueueRunning) return [3 /*break*/, 5];
|
|
330
331
|
this._msgQueueRunning = true;
|
|
331
332
|
_loop_1 = function (i) {
|
|
332
|
-
var
|
|
333
|
+
var msg, data, ws, messageDate, messageId, type, method, methodLatency, serverRes, query, methodCall, supportMethod, serverRes;
|
|
334
|
+
var _a, _b;
|
|
333
335
|
return __generator(this, function (_c) {
|
|
334
336
|
switch (_c.label) {
|
|
335
337
|
case 0:
|