@resolveio/server-lib 20.14.42 → 20.14.44
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/managers/subscription.manager.js +5 -4
- package/managers/subscription.manager.js.map +1 -1
- package/managers/websocket.manager.d.ts +4 -2
- package/managers/websocket.manager.js +6 -5
- package/managers/websocket.manager.js.map +1 -1
- package/managers/worker-dispatcher.manager.js +1 -1
- package/managers/worker-dispatcher.manager.js.map +1 -1
- package/package.json +1 -1
|
@@ -2255,7 +2255,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
2255
2255
|
dependencySnapshot = execution.snapshot;
|
|
2256
2256
|
this.updateSubscriptionDependencies(sub, dependencySnapshot);
|
|
2257
2257
|
if (execution.packedResult) {
|
|
2258
|
-
this._websocketManager.sendPackedBuffer(ws, messageId, false, execution.packedResult, execution.encoding || 'msgpack');
|
|
2258
|
+
this._websocketManager.sendPackedBuffer(ws, messageId, false, execution.packedResult, execution.encoding || 'msgpack', { passThrough: !!execution.workerUsed });
|
|
2259
2259
|
}
|
|
2260
2260
|
else {
|
|
2261
2261
|
serverRes = {
|
|
@@ -2320,7 +2320,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
2320
2320
|
// Fetch pub once, send to all clients linked to this pub
|
|
2321
2321
|
SubscriptionManager.prototype.sendDataToAll = function (sub, collection, type) {
|
|
2322
2322
|
return __awaiter(this, void 0, void 0, function () {
|
|
2323
|
-
var activeClients, _a, _b, client, ws, subIndex, monitor, res, dependencySnapshot, execution, packedRes, payloadBytes, shouldCache, cachedBuffer, isSame, sendStartMs, sentClients, activeClients_1, activeClients_1_1, entry, client, ws, serverRes, sendStartMs, sentClients, activeClients_2, activeClients_2_1, entry, client, ws, serverRes, nodeCacheSize, deleteCount, subArr, zz, err_2, _c, normalizedError, correlationId, _d, _e, client, ws, serverRes, errorPayload;
|
|
2323
|
+
var activeClients, _a, _b, client, ws, subIndex, monitor, res, dependencySnapshot, execution, packedRes, passThrough, payloadBytes, shouldCache, cachedBuffer, isSame, sendStartMs, sentClients, activeClients_1, activeClients_1_1, entry, client, ws, serverRes, sendStartMs, sentClients, activeClients_2, activeClients_2_1, entry, client, ws, serverRes, nodeCacheSize, deleteCount, subArr, zz, err_2, _c, normalizedError, correlationId, _d, _e, client, ws, serverRes, errorPayload;
|
|
2324
2324
|
var e_6, _f, e_7, _g, e_8, _h, e_9, _j;
|
|
2325
2325
|
var _k, _l;
|
|
2326
2326
|
return __generator(this, function (_m) {
|
|
@@ -2375,6 +2375,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
2375
2375
|
dependencySnapshot = execution.snapshot;
|
|
2376
2376
|
this.updateSubscriptionDependencies(sub, dependencySnapshot);
|
|
2377
2377
|
packedRes = (_k = execution.packedResult) !== null && _k !== void 0 ? _k : this.packCachePayload(res);
|
|
2378
|
+
passThrough = !!execution.workerUsed;
|
|
2378
2379
|
payloadBytes = packedRes ? packedRes.byteLength : null;
|
|
2379
2380
|
shouldCache = this.shouldCachePayload(sub, packedRes);
|
|
2380
2381
|
if (sub.cacheId) {
|
|
@@ -2388,7 +2389,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
2388
2389
|
entry = activeClients_1_1.value;
|
|
2389
2390
|
client = entry.client, ws = entry.ws;
|
|
2390
2391
|
if (packedRes) {
|
|
2391
|
-
this._websocketManager.sendPackedBuffer(ws, client.messageId, false, packedRes, execution.encoding || 'msgpack');
|
|
2392
|
+
this._websocketManager.sendPackedBuffer(ws, client.messageId, false, packedRes, execution.encoding || 'msgpack', { passThrough: passThrough });
|
|
2392
2393
|
}
|
|
2393
2394
|
else {
|
|
2394
2395
|
serverRes = {
|
|
@@ -2439,7 +2440,7 @@ var SubscriptionManager = /** @class */ (function () {
|
|
|
2439
2440
|
entry = activeClients_2_1.value;
|
|
2440
2441
|
client = entry.client, ws = entry.ws;
|
|
2441
2442
|
if (packedRes) {
|
|
2442
|
-
this._websocketManager.sendPackedBuffer(ws, client.messageId, false, packedRes, execution.encoding || 'msgpack');
|
|
2443
|
+
this._websocketManager.sendPackedBuffer(ws, client.messageId, false, packedRes, execution.encoding || 'msgpack', { passThrough: passThrough });
|
|
2443
2444
|
}
|
|
2444
2445
|
else {
|
|
2445
2446
|
serverRes = {
|