@resolveio/server-lib 5.0.12-debug-1 → 5.0.12-newrole
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.
|
@@ -22,13 +22,6 @@ var schema = {
|
|
|
22
22
|
type: Date,
|
|
23
23
|
optional: true
|
|
24
24
|
},
|
|
25
|
-
readonly: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
optional: true
|
|
28
|
-
},
|
|
29
|
-
active: {
|
|
30
|
-
type: Boolean
|
|
31
|
-
},
|
|
32
25
|
attempts: {
|
|
33
26
|
type: Number,
|
|
34
27
|
optional: true
|
|
@@ -65,53 +58,67 @@ var schema = {
|
|
|
65
58
|
type: String
|
|
66
59
|
},
|
|
67
60
|
roles: {
|
|
61
|
+
type: Object
|
|
62
|
+
},
|
|
63
|
+
'roles.super_admin': {
|
|
64
|
+
type: Boolean
|
|
65
|
+
},
|
|
66
|
+
'roles.approvals': {
|
|
68
67
|
type: Array
|
|
69
68
|
},
|
|
70
|
-
'roles.$': {
|
|
69
|
+
'roles.approvals.$': {
|
|
70
|
+
type: Object
|
|
71
|
+
},
|
|
72
|
+
'roles.approvals.$.name': {
|
|
71
73
|
type: String
|
|
72
74
|
},
|
|
73
|
-
|
|
74
|
-
type: String
|
|
75
|
-
optional: true
|
|
75
|
+
'roles.approvals.$.type': {
|
|
76
|
+
type: String
|
|
76
77
|
},
|
|
77
|
-
|
|
78
|
-
type:
|
|
79
|
-
blackbox: true,
|
|
80
|
-
optional: true
|
|
78
|
+
'roles.approvals.$.accounting_code': {
|
|
79
|
+
type: String
|
|
81
80
|
},
|
|
82
|
-
|
|
83
|
-
type: Array
|
|
84
|
-
optional: true
|
|
81
|
+
'roles.groups': {
|
|
82
|
+
type: Array
|
|
85
83
|
},
|
|
86
|
-
'
|
|
84
|
+
'roles.groups.$': {
|
|
87
85
|
type: Object
|
|
88
86
|
},
|
|
89
|
-
'
|
|
87
|
+
'roles.groups.$.name': {
|
|
90
88
|
type: String
|
|
91
89
|
},
|
|
92
|
-
'
|
|
93
|
-
type:
|
|
90
|
+
'roles.groups.$.views': {
|
|
91
|
+
type: Array
|
|
94
92
|
},
|
|
95
|
-
'
|
|
93
|
+
'roles.groups.$.views.$': {
|
|
96
94
|
type: String
|
|
97
95
|
},
|
|
98
|
-
'
|
|
99
|
-
type: String
|
|
96
|
+
'roles.groups.$.yard': {
|
|
97
|
+
type: String,
|
|
98
|
+
optional: true
|
|
99
|
+
},
|
|
100
|
+
'roles.notifications': {
|
|
101
|
+
type: Array
|
|
100
102
|
},
|
|
101
|
-
'
|
|
103
|
+
'roles.notifications.$': {
|
|
102
104
|
type: String
|
|
103
105
|
},
|
|
104
|
-
'
|
|
105
|
-
type:
|
|
106
|
+
'roles.miscs': {
|
|
107
|
+
type: Array
|
|
106
108
|
},
|
|
107
|
-
'
|
|
108
|
-
type:
|
|
109
|
-
optional: true
|
|
109
|
+
'roles.miscs.$': {
|
|
110
|
+
type: String
|
|
110
111
|
},
|
|
111
|
-
|
|
112
|
+
active: Boolean,
|
|
113
|
+
phonenumber: {
|
|
112
114
|
type: String,
|
|
113
115
|
optional: true
|
|
114
116
|
},
|
|
117
|
+
other: {
|
|
118
|
+
type: Object,
|
|
119
|
+
optional: true,
|
|
120
|
+
blackbox: true
|
|
121
|
+
},
|
|
115
122
|
customers: {
|
|
116
123
|
type: Array,
|
|
117
124
|
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 active_subscription_collection_1 = require("../collections/active-subscription.collection");
|
|
41
40
|
var mongoose_1 = require("mongoose");
|
|
41
|
+
var active_subscription_collection_1 = require("../collections/active-subscription.collection");
|
|
42
42
|
function loadServerInit() {
|
|
43
43
|
return __awaiter(this, void 0, void 0, function () {
|
|
44
44
|
var appVersion;
|
|
@@ -933,7 +933,6 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
933
933
|
hasError: false,
|
|
934
934
|
data: this._subCache.filter(function (a) { return a.publication === subscription.publication && JSON.stringify(a.subscriptionData) === JSON.stringify(subscription.subscriptionData); })[0].res
|
|
935
935
|
};
|
|
936
|
-
console.log('Cache1: ' + 'Found - ' + subscription.publication + ' - ' + common_1.getBinarySize(JSON.stringify(this._subCache)));
|
|
937
936
|
this.sendWS(ws, serverRes);
|
|
938
937
|
}
|
|
939
938
|
else {
|
|
@@ -951,11 +950,9 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
951
950
|
break;
|
|
952
951
|
}
|
|
953
952
|
}
|
|
954
|
-
console.log('Cache1: ' + 'Too Big - ' + subscription.publication + ' - ' + common_1.getBinarySize(JSON.stringify(_this._subCache)));
|
|
955
953
|
_this._subCache.splice(0, neededSizeIndex);
|
|
956
954
|
}
|
|
957
955
|
_this._subCache.push({ collection: collection, publication: subscription.publication, subscriptionData: subscription.subscriptionData, res: res });
|
|
958
|
-
console.log('Cache1: ' + 'Create - ' + subscription.publication + ' - ' + common_1.getBinarySize(JSON.stringify(_this._subCache)));
|
|
959
956
|
var serverRes = {
|
|
960
957
|
messageId: messageId,
|
|
961
958
|
hasError: false,
|
|
@@ -1011,7 +1008,6 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
1011
1008
|
hasError: false,
|
|
1012
1009
|
data: _this._subCache.filter(function (a) { return a.publication === subscription.publication && JSON.stringify(a.subscriptionData) === JSON.stringify(subscription.subscriptionData); })[0].res
|
|
1013
1010
|
};
|
|
1014
|
-
console.log('Cache: ' + 'Found - ' + subscription.publication + ' - ' + common_1.getBinarySize(JSON.stringify(_this._subCache)));
|
|
1015
1011
|
_this.sendWS(ws, serverRes);
|
|
1016
1012
|
}
|
|
1017
1013
|
});
|
|
@@ -1032,11 +1028,9 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
1032
1028
|
break;
|
|
1033
1029
|
}
|
|
1034
1030
|
}
|
|
1035
|
-
console.log('Cache: ' + 'Too Big - ' + subscription.publication + ' - ' + common_1.getBinarySize(JSON.stringify(_this._subCache)));
|
|
1036
1031
|
_this._subCache.splice(0, neededSizeIndex);
|
|
1037
1032
|
}
|
|
1038
1033
|
_this._subCache.push({ collection: collection, publication: subscription.publication, subscriptionData: subscription.subscriptionData, res: res });
|
|
1039
|
-
console.log('Cache: ' + 'Create - ' + subscription.publication + ' - ' + common_1.getBinarySize(JSON.stringify(_this._subCache)));
|
|
1040
1034
|
subscription.clients.forEach(function (client) {
|
|
1041
1035
|
that._wss.clients.forEach(function (ws) {
|
|
1042
1036
|
if (ws['id_socket'] === client.id_socket) {
|