@scalecube/utils
Advanced tools
Comparing version 0.0.2-snapshot.1563375651.10 to 0.0.2-snapshot.1563376995.11
@@ -156,18 +156,22 @@ var assert = function (predicate, msg) { | ||
function workerEventHandler(ev) { | ||
if (!ev.data.workerId) { | ||
ev.data.workerId = 1; | ||
if (ev.data.type === 'ConnectWorkerEvent') { | ||
// @ts-ignore | ||
workersMap[ev.data.detail.whoAmI] = this; | ||
} | ||
else { | ||
var propogateTo = workersMap[ev.data.detail.to] || workersMap[ev.data.detail.address]; // discoveryEvents || rsocketEvents | ||
// console.log('worker -> propogateTo', ev.data); | ||
if (propogateTo) { | ||
// @ts-ignore | ||
propogateTo.postMessage(ev.data, ev.ports || undefined); | ||
if (ev.data && ev.data.detail && ev.data.type) { | ||
if (!ev.data.workerId) { | ||
ev.data.workerId = 1; | ||
if (ev.data.type === 'ConnectWorkerEvent') { | ||
if (ev.data.detail.whoAmI) { | ||
// @ts-ignore | ||
workersMap[ev.data.detail.whoAmI] = this; | ||
} | ||
} | ||
else { | ||
// @ts-ignore | ||
postMessage(ev.data, '*', ev.ports || undefined); | ||
var propogateTo = workersMap[ev.data.detail.to] || workersMap[ev.data.detail.address]; // discoveryEvents || rsocketEvents | ||
// console.log('worker -> propogateTo', ev.data); | ||
if (propogateTo) { | ||
// @ts-ignore | ||
propogateTo.postMessage(ev.data, ev.ports || undefined); | ||
} | ||
else { | ||
// @ts-ignore | ||
postMessage(ev.data, '*', ev.ports || undefined); | ||
} | ||
} | ||
@@ -174,0 +178,0 @@ } |
@@ -160,18 +160,22 @@ 'use strict'; | ||
function workerEventHandler(ev) { | ||
if (!ev.data.workerId) { | ||
ev.data.workerId = 1; | ||
if (ev.data.type === 'ConnectWorkerEvent') { | ||
// @ts-ignore | ||
workersMap[ev.data.detail.whoAmI] = this; | ||
} | ||
else { | ||
var propogateTo = workersMap[ev.data.detail.to] || workersMap[ev.data.detail.address]; // discoveryEvents || rsocketEvents | ||
// console.log('worker -> propogateTo', ev.data); | ||
if (propogateTo) { | ||
// @ts-ignore | ||
propogateTo.postMessage(ev.data, ev.ports || undefined); | ||
if (ev.data && ev.data.detail && ev.data.type) { | ||
if (!ev.data.workerId) { | ||
ev.data.workerId = 1; | ||
if (ev.data.type === 'ConnectWorkerEvent') { | ||
if (ev.data.detail.whoAmI) { | ||
// @ts-ignore | ||
workersMap[ev.data.detail.whoAmI] = this; | ||
} | ||
} | ||
else { | ||
// @ts-ignore | ||
postMessage(ev.data, '*', ev.ports || undefined); | ||
var propogateTo = workersMap[ev.data.detail.to] || workersMap[ev.data.detail.address]; // discoveryEvents || rsocketEvents | ||
// console.log('worker -> propogateTo', ev.data); | ||
if (propogateTo) { | ||
// @ts-ignore | ||
propogateTo.postMessage(ev.data, ev.ports || undefined); | ||
} | ||
else { | ||
// @ts-ignore | ||
postMessage(ev.data, '*', ev.ports || undefined); | ||
} | ||
} | ||
@@ -178,0 +182,0 @@ } |
{ | ||
"name": "@scalecube/utils", | ||
"version": "0.0.2-snapshot.1563375651.10+3624ead", | ||
"version": "0.0.2-snapshot.1563376995.11+3b85f70", | ||
"private": false, | ||
@@ -39,3 +39,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "3624ead74227f7b2ae51cd367fbc2b8eba74f207" | ||
"gitHead": "3b85f70eb5dcf7eded7c2baceab779d6984a64a7" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
32739
450