@resolveio/server-lib 3.2.7-newrole → 3.2.8-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.
- package/collections/log.collection.js +1 -1
- package/managers/method.manager.js +2 -2
- package/managers/queue-method.manager.js +2 -2
- package/managers/support.manager.js +1 -1
- package/methods/collections.js +9 -9
- package/methods/logs.js +1 -1
- package/models/log.model.d.ts +1 -1
- package/package.json +1 -1
- package/server-app.js +5 -5
- package/support-methods/collections.js +5 -5
|
@@ -164,7 +164,7 @@ var MethodManager = /** @class */ (function () {
|
|
|
164
164
|
_this._mainServer.unsubscribeWS(ws);
|
|
165
165
|
}
|
|
166
166
|
});
|
|
167
|
-
if (sendItem.method !== 'generatePDF' && sendItem.method !== 'getWOOfflineData' && sendItem.method !== 'countQuery' && sendItem.method !== 'countCollectionWithQuery' && sendItem.method !== 'find' && sendItem.method !== 'findOne' && sendItem.method !== 'findWithOptions' && sendItem.method !== 'setWSAppVersion' && sendItem.method !== 'uploadFileAndSave') {
|
|
167
|
+
if (sendItem.method !== 'generatePDF' && sendItem.method !== 'getWOOfflineData' && sendItem.method !== 'countQuery' && sendItem.method !== 'countWithQuery' && sendItem.method !== 'countCollectionWithQuery' && sendItem.method !== 'find' && sendItem.method !== 'findOne' && sendItem.method !== 'findWithOptions' && sendItem.method !== 'setWSAppVersion' && sendItem.method !== 'uploadFileAndSave' && sendItem.method !== 'getDrivers') {
|
|
168
168
|
if (common_1.getBinarySize(JSON.stringify(sendItem.methodData)) < 200000 && common_1.getBinarySize(JSON.stringify(sendItem.data)) < 200000) {
|
|
169
169
|
log_collection_1.Logs.create({
|
|
170
170
|
_id: mongoose_1.Types.ObjectId().toHexString(),
|
|
@@ -172,7 +172,7 @@ var MethodManager = /** @class */ (function () {
|
|
|
172
172
|
type: 'client-response',
|
|
173
173
|
title: 'Client Response',
|
|
174
174
|
message: 'User: ' + ws['user'] + ', MessageId: ' + sendItem.data.messageId + ', Method: ' + sendItem.method,
|
|
175
|
-
payload:
|
|
175
|
+
payload: JSON.stringify([sendItem.methodData, sendItem.data]),
|
|
176
176
|
method: sendItem.method,
|
|
177
177
|
user: ws['user'],
|
|
178
178
|
messageId: sendItem.data.messageId
|
|
@@ -63,7 +63,7 @@ var QueueMethodManager = /** @class */ (function () {
|
|
|
63
63
|
_this._mainServer.unsubscribeWS(ws);
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
|
-
if (sendItem.method !== 'generatePDF' && sendItem.method !== 'getWOOfflineData' && sendItem.method !== 'countQuery' && sendItem.method !== 'countCollectionWithQuery' && sendItem.method !== 'find' && sendItem.method !== 'findOne' && sendItem.method !== 'findWithOptions' && sendItem.method !== 'setWSAppVersion' && sendItem.method !== 'uploadFileAndSave') {
|
|
66
|
+
if (sendItem.method !== 'generatePDF' && sendItem.method !== 'getWOOfflineData' && sendItem.method !== 'countQuery' && sendItem.method !== 'countWithQuery' && sendItem.method !== 'countCollectionWithQuery' && sendItem.method !== 'find' && sendItem.method !== 'findOne' && sendItem.method !== 'findWithOptions' && sendItem.method !== 'setWSAppVersion' && sendItem.method !== 'uploadFileAndSave' && sendItem.method !== 'getDrivers') {
|
|
67
67
|
if (common_1.getBinarySize(JSON.stringify(sendItem.methodData)) < 200000 && common_1.getBinarySize(JSON.stringify(sendItem.data)) < 200000) {
|
|
68
68
|
log_collection_1.Logs.create({
|
|
69
69
|
_id: mongoose_1.Types.ObjectId().toHexString(),
|
|
@@ -71,7 +71,7 @@ var QueueMethodManager = /** @class */ (function () {
|
|
|
71
71
|
type: 'client-response',
|
|
72
72
|
title: 'Client Response',
|
|
73
73
|
message: 'User: ' + ws['user'] + ', MessageId: ' + sendItem.messageId + ', Method: ' + sendItem.method,
|
|
74
|
-
payload:
|
|
74
|
+
payload: JSON.stringify([sendItem.methodData, sendItem.response]),
|
|
75
75
|
method: sendItem.method,
|
|
76
76
|
user: ws['user'],
|
|
77
77
|
messageId: sendItem.messageId
|
|
@@ -59,7 +59,7 @@ var SupportManager = /** @class */ (function () {
|
|
|
59
59
|
type: 'client-response',
|
|
60
60
|
title: 'Client Response - Support',
|
|
61
61
|
message: 'User: ' + ws['user'] + ', MessageId: ' + sendItem.data.messageId + ', Support Method: ' + sendItem.method,
|
|
62
|
-
payload:
|
|
62
|
+
payload: JSON.stringify([sendItem.methodData, sendItem.data]),
|
|
63
63
|
method: sendItem.method,
|
|
64
64
|
user: ws['user'],
|
|
65
65
|
messageId: sendItem.data.messageId
|
package/methods/collections.js
CHANGED
|
@@ -99,7 +99,7 @@ function loadCollectionMethods(methodManager) {
|
|
|
99
99
|
type: 'info',
|
|
100
100
|
title: 'Insert Document',
|
|
101
101
|
message: 'User: ' + _this.user + ', Collection Type: ' + collection,
|
|
102
|
-
payload: document,
|
|
102
|
+
payload: JSON.stringify(document),
|
|
103
103
|
method: 'insertDocument',
|
|
104
104
|
user: _this.user,
|
|
105
105
|
messageId: ''
|
|
@@ -191,7 +191,7 @@ function loadCollectionMethods(methodManager) {
|
|
|
191
191
|
type: 'info',
|
|
192
192
|
title: 'Update Document',
|
|
193
193
|
message: 'User: ' + _this.user + ', Collection Type: ' + collection,
|
|
194
|
-
payload: f_document,
|
|
194
|
+
payload: JSON.stringify(f_document),
|
|
195
195
|
method: 'updateDocument',
|
|
196
196
|
user: _this.user,
|
|
197
197
|
messageId: ''
|
|
@@ -335,7 +335,7 @@ function loadCollectionMethods(methodManager) {
|
|
|
335
335
|
type: 'info',
|
|
336
336
|
title: 'Update Document Props',
|
|
337
337
|
message: 'User: ' + _this.user + ', Collection Type: ' + collection + ', Id: ' + doc_id + ', ' + 'Version: ' + doc__v,
|
|
338
|
-
payload: updateParams,
|
|
338
|
+
payload: JSON.stringify(updateParams),
|
|
339
339
|
method: 'updateDocumentProps',
|
|
340
340
|
user: _this.user,
|
|
341
341
|
messageId: ''
|
|
@@ -468,7 +468,7 @@ function loadCollectionMethods(methodManager) {
|
|
|
468
468
|
type: 'info',
|
|
469
469
|
title: 'Update Document',
|
|
470
470
|
message: 'User: ' + _this.user + ', Collection Type: ' + collection,
|
|
471
|
-
payload: f_document,
|
|
471
|
+
payload: JSON.stringify(f_document),
|
|
472
472
|
method: 'updateDocumentOffline',
|
|
473
473
|
user: _this.user,
|
|
474
474
|
messageId: ''
|
|
@@ -490,7 +490,7 @@ function loadCollectionMethods(methodManager) {
|
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
492
|
else {
|
|
493
|
-
console.log('invalid version - ' + collection, currDoc.__v, f_document['__v']);
|
|
493
|
+
console.log('OFFLINE - invalid version - ' + collection, currDoc.__v, f_document['__v']);
|
|
494
494
|
var newCurrDocId = currDoc._id;
|
|
495
495
|
if (f_oldDocument) {
|
|
496
496
|
var versionDoc_3 = common_1.deepCopy(currDoc);
|
|
@@ -611,7 +611,7 @@ function loadCollectionMethods(methodManager) {
|
|
|
611
611
|
type: 'info',
|
|
612
612
|
title: 'Update Document Props',
|
|
613
613
|
message: 'User: ' + _this.user + ', Collection Type: ' + collection + ', Id: ' + doc_id + ', ' + 'Version: ' + doc__v,
|
|
614
|
-
payload: updateParams,
|
|
614
|
+
payload: JSON.stringify(updateParams),
|
|
615
615
|
method: 'updateDocumentPropsOffline',
|
|
616
616
|
user: _this.user,
|
|
617
617
|
messageId: ''
|
|
@@ -633,7 +633,7 @@ function loadCollectionMethods(methodManager) {
|
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
635
|
else {
|
|
636
|
-
console.log('invalid version - ' + collection, currDoc.__v, doc__v);
|
|
636
|
+
console.log('OFFLINE - invalid version - ' + collection, currDoc.__v, doc__v);
|
|
637
637
|
var newCurrDocId = currDoc._id;
|
|
638
638
|
if (f_oldDocument) {
|
|
639
639
|
var versionDoc_4 = common_1.deepCopy(currDoc);
|
|
@@ -694,7 +694,7 @@ function loadCollectionMethods(methodManager) {
|
|
|
694
694
|
type: 'info',
|
|
695
695
|
title: 'Remove Document',
|
|
696
696
|
message: 'User: ' + _this.user + ', Collection Type: ' + collection,
|
|
697
|
-
payload: { _id: doc_id },
|
|
697
|
+
payload: JSON.stringify({ _id: doc_id }),
|
|
698
698
|
method: 'removeDocument',
|
|
699
699
|
user: _this.user,
|
|
700
700
|
messageId: ''
|
|
@@ -729,7 +729,7 @@ function loadCollectionMethods(methodManager) {
|
|
|
729
729
|
type: 'info',
|
|
730
730
|
title: 'Remove Document (Query)',
|
|
731
731
|
message: 'User: ' + _this.user + ', Collection Type: ' + collection,
|
|
732
|
-
payload: { _id: query },
|
|
732
|
+
payload: JSON.stringify({ _id: query }),
|
|
733
733
|
method: 'removeDocumentWithQuery',
|
|
734
734
|
user: _this.user,
|
|
735
735
|
messageId: ''
|
package/methods/logs.js
CHANGED
package/models/log.model.d.ts
CHANGED
package/package.json
CHANGED
package/server-app.js
CHANGED
|
@@ -348,7 +348,7 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
348
348
|
ws.terminate();
|
|
349
349
|
}, 5000);
|
|
350
350
|
}
|
|
351
|
-
if (method !== 'generatePDF' && method !== 'getWOOfflineData' && method !== 'countQuery' && method !== 'countCollectionWithQuery' && method !== 'find' && method !== 'findOne' && method !== 'findWithOptions' && method !== 'setWSAppVersion') {
|
|
351
|
+
if (method !== 'generatePDF' && method !== 'getWOOfflineData' && method !== 'countQuery' && method !== 'countWithQuery' && method !== 'countCollectionWithQuery' && method !== 'find' && method !== 'findOne' && method !== 'findWithOptions' && method !== 'setWSAppVersion' && method !== 'getDrivers') {
|
|
352
352
|
if (common_1.getBinarySize(JSON.stringify(data)) < 200000) {
|
|
353
353
|
log_collection_1.Logs.create({
|
|
354
354
|
_id: mongoose_1.Types.ObjectId().toHexString(),
|
|
@@ -356,7 +356,7 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
356
356
|
type: 'client-request',
|
|
357
357
|
title: 'Client Request - Method',
|
|
358
358
|
message: 'User: ' + ws['user'] + ', Type: ' + type + ', MessageId: ' + messageId + ', Method: ' + method,
|
|
359
|
-
payload: data,
|
|
359
|
+
payload: JSON.stringify(data),
|
|
360
360
|
method: method,
|
|
361
361
|
user: ws['user'],
|
|
362
362
|
messageId: messageId
|
|
@@ -469,7 +469,7 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
469
469
|
case 7:
|
|
470
470
|
if (type === 'methodRetry') {
|
|
471
471
|
method = data.shift();
|
|
472
|
-
if (method !== 'generatePDF' && method !== 'getWOOfflineData' && method !== 'countQuery' && method !== 'countCollectionWithQuery' && method !== 'find' && method !== 'findOne' && method !== 'findWithOptions' && method !== 'setWSAppVersion') {
|
|
472
|
+
if (method !== 'generatePDF' && method !== 'getWOOfflineData' && method !== 'countQuery' && method !== 'countWithQuery' && method !== 'countCollectionWithQuery' && method !== 'find' && method !== 'findOne' && method !== 'findWithOptions' && method !== 'setWSAppVersion' && method !== 'getDrivers') {
|
|
473
473
|
if (common_1.getBinarySize(JSON.stringify(data)) < 200000) {
|
|
474
474
|
log_collection_1.Logs.create({
|
|
475
475
|
_id: mongoose_1.Types.ObjectId().toHexString(),
|
|
@@ -477,7 +477,7 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
477
477
|
type: 'client-request',
|
|
478
478
|
title: 'Client Request - Method Retry',
|
|
479
479
|
message: 'User: ' + ws['user'] + ', Type: ' + type + ', MessageId: ' + messageId + ', Method: ' + method,
|
|
480
|
-
payload: data,
|
|
480
|
+
payload: JSON.stringify(data),
|
|
481
481
|
method: method,
|
|
482
482
|
user: ws['user'],
|
|
483
483
|
messageId: messageId
|
|
@@ -564,7 +564,7 @@ var ResolveIOMainServer = /** @class */ (function () {
|
|
|
564
564
|
type: 'client-request',
|
|
565
565
|
title: 'Client Request - Support',
|
|
566
566
|
message: 'User: ' + ws['user'] + ', Type: ' + type + ', MessageId: ' + messageId + ', Support Method: ' + supportMethod,
|
|
567
|
-
payload: data,
|
|
567
|
+
payload: JSON.stringify(data),
|
|
568
568
|
method: supportMethod,
|
|
569
569
|
user: ws['user'],
|
|
570
570
|
messageId: messageId
|
|
@@ -95,7 +95,7 @@ function loadSupportCollectionMethods(supportManager) {
|
|
|
95
95
|
type: 'info',
|
|
96
96
|
title: 'Insert Document',
|
|
97
97
|
message: 'User: ' + _this.user + ', Collection Type: ' + collection,
|
|
98
|
-
payload: document,
|
|
98
|
+
payload: JSON.stringify(document),
|
|
99
99
|
method: 'insertDocument',
|
|
100
100
|
user: _this.user,
|
|
101
101
|
messageId: ''
|
|
@@ -186,7 +186,7 @@ function loadSupportCollectionMethods(supportManager) {
|
|
|
186
186
|
type: 'info',
|
|
187
187
|
title: 'Update Document',
|
|
188
188
|
message: 'User: ' + _this.user + ', Collection Type: ' + collection,
|
|
189
|
-
payload: f_document,
|
|
189
|
+
payload: JSON.stringify(f_document),
|
|
190
190
|
method: 'updateDocument',
|
|
191
191
|
user: _this.user,
|
|
192
192
|
messageId: ''
|
|
@@ -327,7 +327,7 @@ function loadSupportCollectionMethods(supportManager) {
|
|
|
327
327
|
type: 'info',
|
|
328
328
|
title: 'Update Document Props',
|
|
329
329
|
message: 'User: ' + _this.user + ', Collection Type: ' + collection + ', Id: ' + doc_id + ', ' + 'Version: ' + doc__v,
|
|
330
|
-
payload: updateParams,
|
|
330
|
+
payload: JSON.stringify(updateParams),
|
|
331
331
|
method: 'updateDocumentProps',
|
|
332
332
|
user: _this.user,
|
|
333
333
|
messageId: ''
|
|
@@ -415,7 +415,7 @@ function loadSupportCollectionMethods(supportManager) {
|
|
|
415
415
|
type: 'info',
|
|
416
416
|
title: 'Remove Document',
|
|
417
417
|
message: 'User: ' + _this.user + ', Collection Type: ' + collection,
|
|
418
|
-
payload: { _id: doc_id },
|
|
418
|
+
payload: JSON.stringify({ _id: doc_id }),
|
|
419
419
|
method: 'removeDocument',
|
|
420
420
|
user: _this.user,
|
|
421
421
|
messageId: ''
|
|
@@ -450,7 +450,7 @@ function loadSupportCollectionMethods(supportManager) {
|
|
|
450
450
|
type: 'info',
|
|
451
451
|
title: 'Remove Document (Query)',
|
|
452
452
|
message: 'User: ' + _this.user + ', Collection Type: ' + collection,
|
|
453
|
-
payload: { _id: query },
|
|
453
|
+
payload: JSON.stringify({ _id: query }),
|
|
454
454
|
method: 'removeDocumentWithQuery',
|
|
455
455
|
user: _this.user,
|
|
456
456
|
messageId: ''
|