@hotmeshio/hotmesh 0.3.27 → 0.3.28

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.
Files changed (71) hide show
  1. package/build/modules/key.js +1 -1
  2. package/build/modules/utils.js +1 -1
  3. package/build/package.json +1 -1
  4. package/build/services/activities/activity.js +1 -1
  5. package/build/services/activities/await.js +1 -1
  6. package/build/services/activities/cycle.js +1 -1
  7. package/build/services/activities/hook.js +1 -1
  8. package/build/services/activities/index.js +1 -1
  9. package/build/services/activities/interrupt.js +1 -1
  10. package/build/services/activities/signal.js +1 -1
  11. package/build/services/activities/trigger.js +1 -1
  12. package/build/services/activities/worker.js +1 -1
  13. package/build/services/collator/index.js +1 -1
  14. package/build/services/compiler/deployer.js +1 -1
  15. package/build/services/compiler/index.js +1 -1
  16. package/build/services/compiler/validator.js +1 -1
  17. package/build/services/engine/index.js +1 -1
  18. package/build/services/exporter/index.js +1 -1
  19. package/build/services/mapper/index.js +1 -1
  20. package/build/services/meshflow/exporter.js +1 -1
  21. package/build/services/pipe/functions/array.js +1 -1
  22. package/build/services/pipe/functions/bitwise.js +1 -1
  23. package/build/services/pipe/functions/conditional.js +1 -1
  24. package/build/services/pipe/functions/cron.js +1 -1
  25. package/build/services/pipe/functions/date.js +1 -1
  26. package/build/services/pipe/functions/index.js +1 -1
  27. package/build/services/pipe/functions/json.js +1 -1
  28. package/build/services/pipe/functions/logical.js +1 -1
  29. package/build/services/pipe/functions/math.js +1 -1
  30. package/build/services/pipe/functions/number.js +1 -1
  31. package/build/services/pipe/functions/object.js +1 -1
  32. package/build/services/pipe/functions/string.js +1 -1
  33. package/build/services/pipe/functions/symbol.js +1 -1
  34. package/build/services/pipe/functions/unary.js +1 -1
  35. package/build/services/pipe/index.js +1 -1
  36. package/build/services/quorum/index.js +1 -1
  37. package/build/services/reporter/index.js +1 -1
  38. package/build/services/router/index.js +1 -1
  39. package/build/services/search/providers/postgres/postgres.js +1 -1
  40. package/build/services/search/providers/redis/ioredis.js +1 -1
  41. package/build/services/search/providers/redis/redis.js +1 -1
  42. package/build/services/serializer/index.js +1 -1
  43. package/build/services/store/providers/postgres/kvsql.js +1 -1
  44. package/build/services/store/providers/postgres/kvtables.js +1 -1
  45. package/build/services/store/providers/postgres/kvtransaction.js +1 -1
  46. package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
  47. package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
  48. package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
  49. package/build/services/store/providers/postgres/kvtypes/zset.js +1 -1
  50. package/build/services/store/providers/postgres/postgres.js +1 -1
  51. package/build/services/store/providers/redis/_base.js +1 -1
  52. package/build/services/store/providers/redis/ioredis.js +1 -1
  53. package/build/services/store/providers/redis/redis.js +1 -1
  54. package/build/services/store/providers/store-initializable.js +1 -1
  55. package/build/services/stream/providers/nats/nats.js +1 -1
  56. package/build/services/stream/providers/postgres/kvtables.d.ts +2 -0
  57. package/build/services/stream/providers/postgres/kvtables.js +1 -0
  58. package/build/services/stream/providers/postgres/postgres.d.ts +2 -8
  59. package/build/services/stream/providers/postgres/postgres.js +1 -1
  60. package/build/services/stream/providers/redis/ioredis.js +1 -1
  61. package/build/services/stream/providers/redis/redis.js +1 -1
  62. package/build/services/stream/providers/stream-initializable.js +1 -1
  63. package/build/services/sub/providers/nats/nats.js +1 -1
  64. package/build/services/sub/providers/postgres/postgres.js +1 -1
  65. package/build/services/sub/providers/redis/ioredis.js +1 -1
  66. package/build/services/sub/providers/redis/redis.js +1 -1
  67. package/build/services/task/index.js +1 -1
  68. package/build/services/telemetry/index.d.ts +1 -1
  69. package/build/services/telemetry/index.js +1 -1
  70. package/build/services/worker/index.js +1 -1
  71. package/package.json +1 -1
@@ -1 +1 @@
1
- 'use strict';const o=b;(function(c,d){const n=b,e=c();while(!![]){try{const f=parseInt(n(0xce))/0x1*(-parseInt(n(0xdb))/0x2)+-parseInt(n(0xd0))/0x3+-parseInt(n(0xd8))/0x4+-parseInt(n(0xd1))/0x5*(-parseInt(n(0xc6))/0x6)+parseInt(n(0xdc))/0x7*(parseInt(n(0xc4))/0x8)+parseInt(n(0xda))/0x9+parseInt(n(0xd5))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xa66a1));Object[o(0xc0)](exports,o(0xc2),{'value':!![]}),exports[o(0xd7)]=void 0x0;const key_1=require(o(0xbc)),index_1=require('../../index');function a(){const B=['init','parse','SubService','defineProperty','psubscribe','__esModule','mintKey','24qtihhA','namespace','6PZQTba','transact','stringify','subscribe','eventClient','error','pmessage','Error\x20subscribing\x20to:\x20','4676AHnCDu','publish','3215892WYfXnW','1501715yYzpOE','KeyService','multi','engineId','9903760EAEBbz','HMNS','IORedisSubService','266776fywMzP','Error\x20parsing\x20message:\x20','7650891nVioTV','526wwzBeq','2121609jBfCGW','appId','punsubscribe','logger','unsubscribe','../../../../modules/key'];a=function(){return B;};return a();}class IORedisSubService extends index_1[o(0xbf)]{constructor(c,d){super(c,d);}async[o(0xbd)](c=key_1[o(0xd6)],d,e,f){const p=o;this[p(0xc5)]=c,this[p(0xba)]=f,this[p(0xdd)]=d,this[p(0xd4)]=e;}[o(0xc7)](){const q=o;return this[q(0xca)][q(0xd3)]();}[o(0xc3)](c,d){const r=o;if(!this[r(0xc5)])throw new Error('namespace\x20not\x20set');return key_1[r(0xd2)][r(0xc3)](this['namespace'],c,d);}async[o(0xc9)](c,d,e,f){const s=o,g=this,h=this['mintKey'](c,{'appId':e,'engineId':f});await this['eventClient'][s(0xc9)](h,i=>{const t=s;i&&g[t(0xba)][t(0xcb)](t(0xcd)+h,i);}),this[s(0xca)]['on']('message',(i,j)=>{const u=s;if(i===h)try{const k=JSON[u(0xbe)](j);d(h,k);}catch(l){g[u(0xba)][u(0xcb)](u(0xd9)+j,l);}});}async[o(0xbb)](c,d,e){const v=o,f=this[v(0xc3)](c,{'appId':d,'engineId':e});await this[v(0xca)]['unsubscribe'](f);}async['psubscribe'](c,d,e,f){const w=o,g=this,h=this['mintKey'](c,{'appId':e,'engineId':f});await this[w(0xca)][w(0xc1)](h,i=>{const x=w;i&&g[x(0xba)][x(0xcb)](x(0xcd)+h,i);}),this[w(0xca)]['on'](w(0xcc),(i,j,k)=>{const y=w;if(i===h)try{const l=JSON['parse'](k);d(j,l);}catch(m){g[y(0xba)]['error'](y(0xd9)+k,m);}});}async[o(0xb9)](c,d,e){const z=o,f=this[z(0xc3)](c,{'appId':d,'engineId':e});await this[z(0xca)][z(0xb9)](f);}async[o(0xcf)](c,d,e,f){const A=o,g=this[A(0xc3)](c,{'appId':e,'engineId':f}),h=await this['storeClient'][A(0xcf)](g,JSON[A(0xc8)](d));return h===0x1;}}function b(c,d){const e=a();return b=function(f,g){f=f-0xb9;let h=e[f];return h;},b(c,d);}exports[o(0xd7)]=IORedisSubService;
1
+ 'use strict';const o=b;(function(c,d){const n=b,e=c();while(!![]){try{const f=-parseInt(n(0xbb))/0x1*(parseInt(n(0xc3))/0x2)+-parseInt(n(0xb4))/0x3+parseInt(n(0xb3))/0x4+parseInt(n(0xbc))/0x5+-parseInt(n(0xa9))/0x6+parseInt(n(0xc7))/0x7*(parseInt(n(0xb0))/0x8)+parseInt(n(0xcb))/0x9;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x6543e));function b(c,d){const e=a();return b=function(f,g){f=f-0xa9;let h=e[f];return h;},b(c,d);}Object[o(0xb6)](exports,o(0xb8),{'value':!![]}),exports[o(0xab)]=void 0x0;function a(){const B=['62520vuezgI','transact','SubService','message','221865SkmprE','namespace','parse','../../../../modules/key','120573WbZEHh','1633422taJOaY','namespace\x20not\x20set','IORedisSubService','HMNS','eventClient','logger','multi','184amTyKl','engineId','publish','1415960eEhHSq','1682079fcLOsO','subscribe','defineProperty','error','__esModule','mintKey','psubscribe','14LEcbsN','2944900ozMmlv','Error\x20parsing\x20message:\x20','punsubscribe','stringify','storeClient','unsubscribe','Error\x20subscribing\x20to:\x20'];a=function(){return B;};return a();}const key_1=require(o(0xca)),index_1=require('../../index');class IORedisSubService extends index_1[o(0xc5)]{constructor(c,d){super(c,d);}async['init'](c=key_1[o(0xac)],d,e,f){const p=o;this[p(0xc8)]=c,this[p(0xae)]=f,this['appId']=d,this[p(0xb1)]=e;}[o(0xc4)](){const q=o;return this[q(0xad)][q(0xaf)]();}[o(0xb9)](c,d){const r=o;if(!this[r(0xc8)])throw new Error(r(0xaa));return key_1['KeyService'][r(0xb9)](this[r(0xc8)],c,d);}async[o(0xb5)](c,d,e,f){const s=o,g=this,h=this[s(0xb9)](c,{'appId':e,'engineId':f});await this['eventClient'][s(0xb5)](h,i=>{const t=s;i&&g['logger'][t(0xb7)](t(0xc2)+h,i);}),this['eventClient']['on'](s(0xc6),(i,j)=>{const u=s;if(i===h)try{const k=JSON[u(0xc9)](j);d(h,k);}catch(l){g[u(0xae)][u(0xb7)](u(0xbd)+j,l);}});}async['unsubscribe'](c,d,e){const v=o,f=this['mintKey'](c,{'appId':d,'engineId':e});await this[v(0xad)][v(0xc1)](f);}async[o(0xba)](c,d,e,f){const w=o,g=this,h=this[w(0xb9)](c,{'appId':e,'engineId':f});await this[w(0xad)][w(0xba)](h,i=>{const x=w;i&&g[x(0xae)]['error'](x(0xc2)+h,i);}),this[w(0xad)]['on']('pmessage',(i,j,k)=>{const y=w;if(i===h)try{const l=JSON[y(0xc9)](k);d(j,l);}catch(m){g['logger']['error'](y(0xbd)+k,m);}});}async[o(0xbe)](c,d,e){const z=o,f=this[z(0xb9)](c,{'appId':d,'engineId':e});await this[z(0xad)]['punsubscribe'](f);}async[o(0xb2)](c,d,e,f){const A=o,g=this['mintKey'](c,{'appId':e,'engineId':f}),h=await this[A(0xc0)][A(0xb2)](g,JSON[A(0xbf)](d));return h===0x1;}}exports[o(0xab)]=IORedisSubService;
@@ -1 +1 @@
1
- 'use strict';function a(){const x=['transact','namespace','storeClient','pUnsubscribe','logger','360796AVjvtE','7sVxqma','729037LUqvAK','9wEXGxQ','SubService','engineId','pSubscribe','publish','../../../../modules/key','eventClient','12nHYrOM','11021648EiWGYV','defineProperty','Error\x20parsing\x20message:\x20','__esModule','psubscribe','appId','KeyService','mintKey','1632600bbBtHe','2301105nSlvzz','namespace\x20not\x20set','6HyKFbG','33LqQEjX','stringify','RedisSubService','unsubscribe','subscribe','../../index','3933980YQoqGi','1713592JZhVZY','HMNS','parse'];a=function(){return x;};return a();}const n=b;(function(c,d){const m=b,e=c();while(!![]){try{const f=parseInt(m(0x1e1))/0x1+-parseInt(m(0x1f2))/0x2+-parseInt(m(0x1f6))/0x3*(parseInt(m(0x1df))/0x4)+-parseInt(m(0x1f3))/0x5*(-parseInt(m(0x1f5))/0x6)+-parseInt(m(0x1e0))/0x7*(parseInt(m(0x1fd))/0x8)+-parseInt(m(0x1e2))/0x9*(-parseInt(m(0x1fc))/0xa)+parseInt(m(0x1ea))/0xb*(parseInt(m(0x1e9))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x89310));Object[n(0x1eb)](exports,n(0x1ed),{'value':!![]}),exports[n(0x1f8)]=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0x1dc;let h=e[f];return h;},b(c,d);}const key_1=require(n(0x1e7)),index_1=require(n(0x1fb));class RedisSubService extends index_1[n(0x1e3)]{constructor(c,d){super(c,d);}async['init'](c=key_1[n(0x1fe)],d,e,f){const o=n;this['namespace']=c,this[o(0x1de)]=f,this[o(0x1ef)]=d,this[o(0x1e4)]=e;}[n(0x200)](){const p=n,c=this[p(0x1e8)]['multi']();return c;}['mintKey'](c,d){const q=n;if(!this[q(0x201)])throw new Error(q(0x1f4));return key_1[q(0x1f0)][q(0x1f1)](this[q(0x201)],c,d);}async[n(0x1fa)](c,d,e,f){if(this['eventClient']){const g=this,h=this['mintKey'](c,{'appId':e,'engineId':f});await this['eventClient']['subscribe'](h,i=>{const r=b;try{const j=JSON[r(0x1ff)](i);d(h,j);}catch(k){g[r(0x1de)]['error'](r(0x1ec)+i,k);}});}}async[n(0x1f9)](c,d,e){const s=n,f=this[s(0x1f1)](c,{'appId':d,'engineId':e});await this[s(0x1e8)][s(0x1f9)](f);}async[n(0x1ee)](c,d,e,f){const t=n;if(this[t(0x1e8)]){const g=this,h=this[t(0x1f1)](c,{'appId':e,'engineId':f});await this['eventClient'][t(0x1e5)](h,(i,j)=>{const u=t;try{const k=JSON[u(0x1ff)](i);d(j,k);}catch(l){g[u(0x1de)]['error'](u(0x1ec)+i,l);}});}}async['punsubscribe'](c,d,e){const v=n,f=this[v(0x1f1)](c,{'appId':d,'engineId':e});await this['eventClient'][v(0x1dd)](f);}async[n(0x1e6)](c,d,e,f){const w=n,g=this['mintKey'](c,{'appId':e,'engineId':f}),h=await this[w(0x1dc)][w(0x1e6)](g,JSON[w(0x1f7)](d));return h>0x0;}}exports[n(0x1f8)]=RedisSubService;
1
+ 'use strict';function b(c,d){const e=a();return b=function(f,g){f=f-0x84;let h=e[f];return h;},b(c,d);}const n=b;(function(c,d){const m=b,e=c();while(!![]){try{const f=-parseInt(m(0xa2))/0x1+-parseInt(m(0x96))/0x2+parseInt(m(0x8a))/0x3+parseInt(m(0x98))/0x4*(-parseInt(m(0x94))/0x5)+-parseInt(m(0xa0))/0x6*(parseInt(m(0x93))/0x7)+-parseInt(m(0x9e))/0x8*(parseInt(m(0x9b))/0x9)+parseInt(m(0x8b))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x7fac9));Object[n(0x97)](exports,n(0x84),{'value':!![]}),exports[n(0x9c)]=void 0x0;function a(){const x=['storeClient','namespace','14eYLQwC','5szmxjM','subscribe','1501460qbraiQ','defineProperty','1371316qSWbzr','mintKey','KeyService','18YbiABq','RedisSubService','namespace\x20not\x20set','1928032aVIssE','SubService','1486938VTUItS','stringify','358325ZopMJU','init','parse','eventClient','__esModule','../../../../modules/key','pUnsubscribe','HMNS','unsubscribe','publish','1643802fHuzzV','24045570IFaeqP','engineId','error','logger','transact','Error\x20parsing\x20message:\x20'];a=function(){return x;};return a();}const key_1=require(n(0x85)),index_1=require('../../index');class RedisSubService extends index_1[n(0x9f)]{constructor(c,d){super(c,d);}async[n(0xa3)](c=key_1[n(0x87)],d,e,f){const o=n;this[o(0x92)]=c,this[o(0x8e)]=f,this['appId']=d,this[o(0x8c)]=e;}[n(0x8f)](){const c=this['eventClient']['multi']();return c;}[n(0x99)](c,d){const p=n;if(!this[p(0x92)])throw new Error(p(0x9d));return key_1[p(0x9a)][p(0x99)](this['namespace'],c,d);}async[n(0x95)](c,d,e,f){const q=n;if(this[q(0xa5)]){const g=this,h=this[q(0x99)](c,{'appId':e,'engineId':f});await this[q(0xa5)][q(0x95)](h,i=>{const r=q;try{const j=JSON['parse'](i);d(h,j);}catch(k){g['logger']['error'](r(0x90)+i,k);}});}}async[n(0x88)](c,d,e){const s=n,f=this[s(0x99)](c,{'appId':d,'engineId':e});await this['eventClient'][s(0x88)](f);}async['psubscribe'](c,d,e,f){const t=n;if(this[t(0xa5)]){const g=this,h=this[t(0x99)](c,{'appId':e,'engineId':f});await this[t(0xa5)]['pSubscribe'](h,(i,j)=>{const u=t;try{const k=JSON[u(0xa4)](i);d(j,k);}catch(l){g['logger'][u(0x8d)](u(0x90)+i,l);}});}}async['punsubscribe'](c,d,e){const v=n,f=this[v(0x99)](c,{'appId':d,'engineId':e});await this[v(0xa5)][v(0x86)](f);}async[n(0x89)](c,d,e,f){const w=n,g=this[w(0x99)](c,{'appId':e,'engineId':f}),h=await this[w(0x91)][w(0x89)](g,JSON[w(0xa1)](d));return h>0x0;}}exports[n(0x9c)]=RedisSubService;
@@ -1 +1 @@
1
- 'use strict';const q=b;(function(c,d){const p=b,e=c();while(!![]){try{const f=-parseInt(p(0x1ec))/0x1*(-parseInt(p(0x1c7))/0x2)+-parseInt(p(0x1e4))/0x3+-parseInt(p(0x1b0))/0x4*(-parseInt(p(0x1ac))/0x5)+parseInt(p(0x1cc))/0x6+-parseInt(p(0x1c8))/0x7*(parseInt(p(0x1b5))/0x8)+-parseInt(p(0x1f5))/0x9*(parseInt(p(0x1ae))/0xa)+parseInt(p(0x1b3))/0xb*(parseInt(p(0x1bb))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x4821a));function a(){const E=['match','true','__esModule','mintKey','signal-not-found','getHookRule','XSleepFor','time','getNextTask','errorCount','sleepFor','split','addTaskQueues','registerTimeHook','isScout','conditions',':processed','Pipe','1670034CrnKOf','store','random','setHookSignal','HMSH_FIDELITY_SECONDS','processTimeHooks','warn','getHookRules','16671IKLlVh','parse','child','cancelCleanup','../../modules/utils','shouldScout','TaskService','cleanupTimeout','logger','4636737OmjiWT','actual','KeyType','5015aRVKFP','now','10HWFicw','getActiveTaskQueue','1572NRJSrk','HMSH_SCOUT_INTERVAL_SECONDS','../pipe','9410126yZXUsT','task-process-timehooks-error','3486152HgdQgj','registerWebHook','deleteWebHookSignal','delistSignalKey','processWebHookSignal','resolve','12VMStGl','signaler.process:error:\x20hook\x20rule\x20not\x20found','expireJob','isArray','join','jid','HMSH_EXPIRE_DURATION','timerId','delist','gid','SIGNALS','expected','36SyRgfy','7ThmXBI','defineProperty','promise','../../modules/key','1520202CDsnzF','processTaskQueue','WEBSEP','metadata','enqueueWorkItems','processWebHooks'];a=function(){return E;};return a();}Object[q(0x1c9)](exports,q(0x1d4),{'value':!![]}),exports[q(0x1f2)]=void 0x0;const enums_1=require('../../modules/enums'),utils_1=require(q(0x1f0)),pipe_1=require(q(0x1b2)),hotmesh_1=require('../../types/hotmesh'),key_1=require(q(0x1cb));class TaskService{constructor(c,d){const r=q;this[r(0x1f3)]=null,this[r(0x1e0)]=![],this[r(0x1db)]=0x0,this[r(0x1f4)]=d,this['store']=c;}async[q(0x1d1)](c){const s=q,d=await this['store'][s(0x1af)]();if(d){const [e,f,g,...h]=d[s(0x1dd)](key_1[s(0x1ce)]),i=JSON[s(0x1ed)](h[s(0x1bf)](key_1[s(0x1ce)])),j=f+s(0x1e2),k=await this['store'][s(0x1cd)](f,j);k?await c(e,{...i,'id':k}):await this[s(0x1e5)]['deleteProcessedTaskQueue'](d,f,j,g===s(0x1d3)),setImmediate(()=>this[s(0x1d1)](c));}}async[q(0x1d0)](c){const t=q;await this[t(0x1e5)][t(0x1de)](c);}async['registerJobForCleanup'](c,d=enums_1[q(0x1c1)],e){const u=q;d>0x0&&await this[u(0x1e5)][u(0x1bd)](c,d);}async[q(0x1df)](c,d,e,f,g=enums_1['HMSH_FIDELITY_SECONDS'],h,i){const v=q,j=Date[v(0x1ad)]()+g*0x3e8,k=enums_1[v(0x1e8)]*0x3e8,l=Math['floor'](j/k)*k;await this[v(0x1e5)][v(0x1df)](c,d,e,f,l,h,i);}async[q(0x1f1)](){const w=q,c=this[w(0x1e0)],d=c||(this[w(0x1e0)]=await this['store']['reserveScoutRole'](w(0x1d9)));if(d)return!c&&setTimeout(()=>{const x=w;this[x(0x1e0)]=![];},enums_1[w(0x1b1)]*0x3e8),!![];return![];}async[q(0x1e9)](c,d){const y=q;if(await this['shouldScout']())try{const e=await this[y(0x1e5)][y(0x1da)](d);if(Array[y(0x1be)](e)){const [f,g,h,i,j]=e;if(j===y(0x1ee)){}else{if(j===y(0x1c3)){const k=this[y(0x1e5)][y(0x1d5)](hotmesh_1[y(0x1ab)][y(0x1c5)],{'appId':this[y(0x1e5)]['appId']});await this[y(0x1e5)][y(0x1b8)](k,g);}else await c(g,h,i,j);}await(0x0,utils_1[y(0x1dc)])(0x0),this[y(0x1db)]=0x0,this[y(0x1e9)](c,f);}else{if(e)await(0x0,utils_1[y(0x1dc)])(0x0),this[y(0x1db)]=0x0,this[y(0x1e9)](c);else{const l=(0x0,utils_1[y(0x1d8)])(enums_1['HMSH_FIDELITY_SECONDS']*0x3e8);this['cleanupTimeout']=l[y(0x1c2)],await l[y(0x1ca)],this[y(0x1db)]=0x0,this['processTimeHooks'](c);}}}catch(m){this[y(0x1f4)][y(0x1ea)](y(0x1b4),m),await(0x0,utils_1[y(0x1dc)])(0x3e8*this[y(0x1db)]++),this[y(0x1db)]<0x5&&this[y(0x1e9)](c);}else{const n=(0x0,utils_1[y(0x1d8)])(enums_1[y(0x1b1)]*0x3e8*0x2*Math[y(0x1e6)]());this[y(0x1f3)]=n[y(0x1c2)],await n[y(0x1ca)],this[y(0x1e9)](c);}}[q(0x1ef)](){const z=q;this[z(0x1f3)]!==undefined&&(clearTimeout(this['cleanupTimeout']),this[z(0x1f3)]=undefined);}async[q(0x1d7)](c){const A=q,d=await this[A(0x1e5)][A(0x1eb)]();return d?.[c]?.[0x0];}async[q(0x1b6)](c,d,e,f,g){const B=q,h=await this[B(0x1d7)](c);if(h){const i=h[B(0x1e1)][B(0x1d2)][0x0][B(0x1c6)],j=pipe_1['Pipe']['resolve'](i,d),k=d[B(0x1cf)][B(0x1c0)],l=d['metadata'][B(0x1c4)],m=h['to'],n=[m,e,l,k][B(0x1bf)](key_1['WEBSEP']),o={'topic':c,'resolved':j,'jobId':n,'expire':f};return await this[B(0x1e5)][B(0x1e7)](o,g),k;}else throw new Error('signaler.registerWebHook:error:\x20hook\x20rule\x20not\x20found');}async[q(0x1b9)](c,d){const C=q,e=await this[C(0x1d7)](c);if(e){const f={'$self':{'hook':{'data':d}},'$hook':{'data':d}},g=e[C(0x1e1)][C(0x1d2)][0x0][C(0x1aa)],h=pipe_1[C(0x1e3)][C(0x1ba)](g,f),i=await this[C(0x1e5)]['getHookSignal'](c,h);if(!i)return undefined;const [j,k,l,...m]=i[C(0x1dd)](key_1[C(0x1ce)]);return[m[C(0x1bf)](key_1['WEBSEP']),e['to'],k,l];}else throw new Error(C(0x1d6));}async[q(0x1b7)](c,d){const D=q,e=await this[D(0x1d7)](c);if(e){const f={'$self':{'hook':{'data':d}},'$hook':{'data':d}},g=e[D(0x1e1)][D(0x1d2)][0x0]['actual'],h=pipe_1[D(0x1e3)][D(0x1ba)](g,f);return await this['store']['deleteHookSignal'](c,h);}else throw new Error(D(0x1bc));}}function b(c,d){const e=a();return b=function(f,g){f=f-0x1aa;let h=e[f];return h;},b(c,d);}exports['TaskService']=TaskService;
1
+ 'use strict';const q=b;function a(){const E=['processWebHookSignal','logger','SIGNALS','random','1164sKcnOO','warn','processTimeHooks','processWebHooks','isScout','shouldScout','2077170CFPKzX','146106VeByLG','HMSH_SCOUT_INTERVAL_SECONDS','jid','resolve','cleanupTimeout','match','1381526tttkaQ','join','true','getActiveTaskQueue','3286480BFCTOa','mintKey','enqueueWorkItems','registerTimeHook','106909AVuGHW','cancelCleanup','actual','__esModule','getHookRule','335TzYYeq','signal-not-found','child','deleteWebHookSignal','18RAZUpp','processTaskQueue','defineProperty','2153980sRckEE','5927362KLvsMQ','split','TaskService','8roncJV','timerId','Pipe','task-process-timehooks-error','HMSH_FIDELITY_SECONDS','getNextTask','gid','../../modules/enums','now','parse','KeyType','promise','store','4HbPvSi','../pipe','metadata','../../modules/utils','setHookSignal','sleepFor','../../types/hotmesh','appId','deleteProcessedTaskQueue','deleteHookSignal','expected','registerJobForCleanup','WEBSEP','isArray','conditions','delistSignalKey','errorCount',':processed','delist'];a=function(){return E;};return a();}(function(c,d){const p=b,e=c();while(!![]){try{const f=-parseInt(p(0x16d))/0x1+parseInt(p(0x171))/0x2+parseInt(p(0x166))/0x3*(-parseInt(p(0x149))/0x4)+-parseInt(p(0x17a))/0x5*(-parseInt(p(0x167))/0x6)+-parseInt(p(0x182))/0x7*(parseInt(p(0x185))/0x8)+parseInt(p(0x17e))/0x9*(-parseInt(p(0x181))/0xa)+-parseInt(p(0x175))/0xb*(-parseInt(p(0x160))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xd36e6));function b(c,d){const e=a();return b=function(f,g){f=f-0x13f;let h=e[f];return h;},b(c,d);}Object[q(0x180)](exports,q(0x178),{'value':!![]}),exports[q(0x184)]=void 0x0;const enums_1=require(q(0x143)),utils_1=require(q(0x14c)),pipe_1=require(q(0x14a)),hotmesh_1=require(q(0x14f)),key_1=require('../../modules/key');class TaskService{constructor(c,d){const r=q;this[r(0x16b)]=null,this[r(0x164)]=![],this[r(0x159)]=0x0,this[r(0x15d)]=d,this[r(0x148)]=c;}async['processWebHooks'](c){const s=q,d=await this[s(0x148)][s(0x170)]();if(d){const [e,f,g,...h]=d['split'](key_1[s(0x155)]),i=JSON[s(0x145)](h[s(0x16e)](key_1[s(0x155)])),j=f+s(0x15a),k=await this['store'][s(0x17f)](f,j);k?await c(e,{...i,'id':k}):await this[s(0x148)][s(0x151)](d,f,j,g===s(0x16f)),setImmediate(()=>this[s(0x163)](c));}}async[q(0x173)](c){const t=q;await this[t(0x148)]['addTaskQueues'](c);}async[q(0x154)](c,d=enums_1['HMSH_EXPIRE_DURATION'],e){const u=q;d>0x0&&await this[u(0x148)]['expireJob'](c,d);}async[q(0x174)](c,d,e,f,g=enums_1[q(0x140)],h,i){const v=q,j=Date[v(0x144)]()+g*0x3e8,k=enums_1['HMSH_FIDELITY_SECONDS']*0x3e8,l=Math['floor'](j/k)*k;await this[v(0x148)][v(0x174)](c,d,e,f,l,h,i);}async[q(0x165)](){const w=q,c=this[w(0x164)],d=c||(this[w(0x164)]=await this[w(0x148)]['reserveScoutRole']('time'));if(d)return!c&&setTimeout(()=>{const x=w;this[x(0x164)]=![];},enums_1['HMSH_SCOUT_INTERVAL_SECONDS']*0x3e8),!![];return![];}async['processTimeHooks'](c,d){const y=q;if(await this[y(0x165)]())try{const e=await this[y(0x148)][y(0x141)](d);if(Array[y(0x156)](e)){const [f,g,h,i,j]=e;if(j===y(0x17c)){}else{if(j===y(0x15b)){const k=this['store'][y(0x172)](hotmesh_1[y(0x146)][y(0x15e)],{'appId':this[y(0x148)][y(0x150)]});await this[y(0x148)][y(0x158)](k,g);}else await c(g,h,i,j);}await(0x0,utils_1[y(0x14e)])(0x0),this[y(0x159)]=0x0,this[y(0x162)](c,f);}else{if(e)await(0x0,utils_1[y(0x14e)])(0x0),this[y(0x159)]=0x0,this['processTimeHooks'](c);else{const l=(0x0,utils_1['XSleepFor'])(enums_1[y(0x140)]*0x3e8);this[y(0x16b)]=l[y(0x186)],await l[y(0x147)],this[y(0x159)]=0x0,this[y(0x162)](c);}}}catch(m){this[y(0x15d)][y(0x161)](y(0x13f),m),await(0x0,utils_1['sleepFor'])(0x3e8*this[y(0x159)]++),this[y(0x159)]<0x5&&this[y(0x162)](c);}else{const n=(0x0,utils_1['XSleepFor'])(enums_1[y(0x168)]*0x3e8*0x2*Math[y(0x15f)]());this[y(0x16b)]=n['timerId'],await n['promise'],this[y(0x162)](c);}}[q(0x176)](){const z=q;this[z(0x16b)]!==undefined&&(clearTimeout(this[z(0x16b)]),this[z(0x16b)]=undefined);}async['getHookRule'](c){const A=q,d=await this[A(0x148)]['getHookRules']();return d?.[c]?.[0x0];}async['registerWebHook'](c,d,e,f,g){const B=q,h=await this['getHookRule'](c);if(h){const i=h[B(0x157)][B(0x16c)][0x0][B(0x153)],j=pipe_1[B(0x187)][B(0x16a)](i,d),k=d['metadata'][B(0x169)],l=d[B(0x14b)][B(0x142)],m=h['to'],n=[m,e,l,k][B(0x16e)](key_1[B(0x155)]),o={'topic':c,'resolved':j,'jobId':n,'expire':f};return await this[B(0x148)][B(0x14d)](o,g),k;}else throw new Error('signaler.registerWebHook:error:\x20hook\x20rule\x20not\x20found');}async[q(0x15c)](c,d){const C=q,e=await this[C(0x179)](c);if(e){const f={'$self':{'hook':{'data':d}},'$hook':{'data':d}},g=e[C(0x157)][C(0x16c)][0x0]['actual'],h=pipe_1[C(0x187)][C(0x16a)](g,f),i=await this['store']['getHookSignal'](c,h);if(!i)return undefined;const [j,k,l,...m]=i[C(0x183)](key_1[C(0x155)]);return[m[C(0x16e)](key_1['WEBSEP']),e['to'],k,l];}else throw new Error(C(0x17b));}async[q(0x17d)](c,d){const D=q,e=await this[D(0x179)](c);if(e){const f={'$self':{'hook':{'data':d}},'$hook':{'data':d}},g=e['conditions'][D(0x16c)][0x0][D(0x177)],h=pipe_1[D(0x187)][D(0x16a)](g,f);return await this[D(0x148)][D(0x152)](c,h);}else throw new Error('signaler.process:error:\x20hook\x20rule\x20not\x20found');}}exports[q(0x184)]=TaskService;
@@ -23,7 +23,7 @@ declare class TelemetryService {
23
23
  static traceActivity(appId: string, attributes: StringScalarType, activityId: string, traceId: string, spanId: string, index?: number): Promise<boolean>;
24
24
  startActivitySpan(leg?: number): TelemetryService;
25
25
  startStreamSpan(data: StreamData, role: StreamRole): TelemetryService;
26
- startSpan(traceId: string, spanId: string, spanName: string, attributes: StringScalarType): Span;
26
+ startSpan(traceId: string, spanId: string, spanName: string, attributes: StringScalarType, bCreate?: boolean): Span;
27
27
  mapActivityAttributes(): void;
28
28
  setActivityAttributes(attributes: StringScalarType): void;
29
29
  setStreamAttributes(attributes: StringScalarType): void;
@@ -1 +1 @@
1
- 'use strict';const o=b;(function(c,d){const n=b,e=c();while(!![]){try{const f=parseInt(n(0x1bf))/0x1*(-parseInt(n(0x1d4))/0x2)+-parseInt(n(0x1ef))/0x3+parseInt(n(0x1b0))/0x4+parseInt(n(0x1f8))/0x5*(-parseInt(n(0x1c1))/0x6)+-parseInt(n(0x1b9))/0x7*(-parseInt(n(0x1a3))/0x8)+-parseInt(n(0x1e5))/0x9+-parseInt(n(0x1c2))/0xa*(-parseInt(n(0x1a4))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xe1c71));var __importDefault=this&&this['__importDefault']||function(c){return c&&c['__esModule']?c:{'default':c};};function a(){const U=['bindJobTelemetryToState','with','version','reduce','SYSTEM','bindActivityTelemetryToState','span','boolean','RESULT','StreamDataType','../../types/stream','trc','metadata/trc','EXECUTE','telemetry','87140MgePBg','MapperService','app.activity.','FANOUT','config','default','__esModule','SpanKind','type','../../modules/enums','active','metadata','/output/metadata/l1s','StreamRole','../../package.json','getJobParentSpanId','leg','7136820dKwRvZ','getActivityParentSpanId','getStreamSpanAttrs','RESPONSE','parent','startStreamSpan','string','startActivitySpan','defineProperty','traceId','2743926KIAmrz','/output/metadata/','setStatus','subscribes','setAttributes','includes','push','trigger','toUpperCase','371965YUEKio','setTelemetryContext','createNoopSpan','name','shouldCreateSpan','WORKER','$self','setJobAttributes','setStreamAttributes','getTracer','setStreamError','number','debug','worker','/output/metadata/l2s','endStreamSpan','l1s','spanContext','appId','24yGTmLa','288849QMiMYy','getSpanAttrs','CLIENT','output','endSpan','TRACE/','jobSpan','setActivityAttributes','signal','SpanStatusCode','spanId','spn','82092URjQCM','context','hook','FANIN','l2s','topic','getParentSpanContext','JOB/','getTraceId','3414040lJXLsV','setActivityError','app.stream.','ERROR','aid','startSpan','33xaBvaE','keys','18ajvosf','1070gFhZiM','setSpanContext','trace'];a=function(){return U;};return a();}Object[o(0x1ed)](exports,o(0x1da),{'value':!![]}),exports['TelemetryService']=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0x1a3;let h=e[f];return h;},b(c,d);}const package_json_1=__importDefault(require(o(0x1e2))),mapper_1=require('../mapper'),stream_1=require(o(0x1cf)),telemetry_1=require('../../types/telemetry'),enums_1=require(o(0x1dd));class TelemetryService{constructor(c,d,e,f){const p=o;this[p(0x1e4)]=0x1,this[p(0x20a)]=c,this[p(0x1d8)]=d,this[p(0x1df)]=e,this[p(0x1b1)]=f;}[o(0x1fc)](){const q=o;return enums_1['HMSH_TELEMETRY']===q(0x204)||this[q(0x1d8)]?.[q(0x1dc)]==='trigger'||this['config']?.[q(0x1dc)]===q(0x205);}static[o(0x1fa)](c,d){return{'spanContext'(){return{'traceId':c,'spanId':d,'isRemote':!![],'traceFlags':0x1};},'addEvent'(e,f,g){return this;},'setAttribute'(e,f){return this;},'setAttributes'(e){return this;},'setStatus'(e){return this;},'updateName'(e){return this;},'end'(e){},'isRecording'(){return![];},'recordException'(e,f){}};}[o(0x1e3)](){const r=o;return this[r(0x1b1)]['metadata'][r(0x1af)];}[o(0x1e6)](c){const s=o;return c===0x1?this['context'][this['config'][s(0x1e9)]][s(0x1a7)]?.['metadata']?.[s(0x1b4)]:this['context'][s(0x1fe)]['output']?.[s(0x1df)]?.[s(0x208)];}[o(0x1b8)](){const t=o;return this[t(0x1b1)][t(0x1df)][t(0x1d0)];}['startJobSpan'](){const u=o,c=u(0x1b7)+this[u(0x20a)]+'/'+this[u(0x1d8)][u(0x1f2)]+'/1',d=this[u(0x1b8)](),e=this['getJobParentSpanId'](),f=this[u(0x1a5)](0x1),g=this[u(0x1be)](d,e,c,f);return this['jobSpan']=g,this[u(0x1f9)](g,0x1),this;}static async['traceActivity'](c,d,e,f,g,h=0x0){const v=o,i=v(0x1a9)+c+'/'+e+'/'+h,j=telemetry_1[v(0x1c4)][v(0x201)](package_json_1[v(0x1d9)][v(0x1fb)],package_json_1[v(0x1d9)]['version']),k={'traceId':f,'spanId':g,'isRemote':!![],'traceFlags':0x1},l=telemetry_1['trace'][v(0x1c3)](telemetry_1[v(0x1b1)][v(0x1de)](),k);return telemetry_1[v(0x1b1)][v(0x1c6)](l,()=>{const w=v,m=j[w(0x1be)](i,{'kind':telemetry_1[w(0x1db)][w(0x1a6)],'attributes':d});return m[w(0x1f3)](d),m['end'](),!![];});}[o(0x1ec)](c=this[o(0x1e4)]){const x=o,d=this[x(0x1d8)][x(0x1dc)][x(0x1f7)]()+'/'+this[x(0x20a)]+'/'+this['metadata'][x(0x1bd)]+'/'+c,e=this[x(0x1b8)](),f=this['getActivityParentSpanId'](c),g=this[x(0x1a5)](c),h=this[x(0x1be)](e,f,d,g);return this[x(0x1cb)]=h,this[x(0x1f9)](h,c),this;}[o(0x1ea)](c,d){const y=o;let e;if(d===stream_1[y(0x1e1)][y(0x1c9)])e=y(0x1c9);else{if(d===stream_1['StreamRole'][y(0x1fd)])e=y(0x1d2);else c['type']===stream_1['StreamDataType'][y(0x1cd)]||c[y(0x1dc)]===stream_1[y(0x1ce)][y(0x1e8)]?e=y(0x1b3):e=y(0x1d7);}if(this[y(0x1fc)]()||e==='EXECUTE'||e===y(0x1c9)){const f=c[y(0x1df)][y(0x1b5)]?'/'+c[y(0x1df)]['topic']:'',g=e+'/'+this['appId']+'/'+c[y(0x1df)][y(0x1bd)]+f,h=this[y(0x1e7)](c);this[y(0x1cb)]=this[y(0x1be)](c['metadata'][y(0x1d0)],c[y(0x1df)][y(0x1af)],g,h);}else this[y(0x1ee)]=c[y(0x1df)][y(0x1d0)],this[y(0x1ae)]=c['metadata'][y(0x1af)],this[y(0x1cb)]=TelemetryService[y(0x1fa)](c[y(0x1df)][y(0x1d0)],c[y(0x1df)][y(0x1af)]);return this;}[o(0x1be)](c,d,e,f){const z=o;this[z(0x1ee)]=c,this['spanId']=d;if(!this[z(0x1fc)]())return TelemetryService[z(0x1fa)](c,d);const g=telemetry_1[z(0x1c4)]['getTracer'](package_json_1[z(0x1d9)][z(0x1fb)],package_json_1['default'][z(0x1c7)]),h=this[z(0x1b6)](),i=g['startSpan'](e,{'kind':telemetry_1[z(0x1db)][z(0x1a6)],'attributes':f,'root':!h},h);return i;}['mapActivityAttributes'](){const A=o;if(this[A(0x1d8)][A(0x1d3)]&&this[A(0x1cb)]){const c=new mapper_1[(A(0x1d5))](this['config'][A(0x1d3)],this[A(0x1b1)])['mapRules'](),d={...Object[A(0x1c0)](c)[A(0x1c8)]((e,f)=>{const B=A;return[B(0x1eb),B(0x1cc),B(0x203)][B(0x1f4)](typeof c[f])&&(e['app.activity.data.'+f]=c[f]),e;},{})};this[A(0x1cb)]['setAttributes'](d);}}[o(0x1ab)](c){const C=o;this[C(0x1cb)]?.[C(0x1f3)](c);}[o(0x200)](c){const D=o;this[D(0x1cb)]?.['setAttributes'](c);}[o(0x1ff)](c){const E=o;this['jobSpan']?.[E(0x1f3)](c);}['endJobSpan'](){const F=o;this[F(0x1a8)](this[F(0x1aa)]);}['endActivitySpan'](){const G=o;this[G(0x1a8)](this['span']);}[o(0x207)](){const H=o;this['endSpan'](this[H(0x1cb)]);}[o(0x1a8)](c){c&&c['end']();}[o(0x1b6)](){const I=o;if(this[I(0x1ee)]&&this[I(0x1ae)]){const c={'traceId':this['traceId'],'spanId':this['spanId'],'isRemote':!![],'traceFlags':0x1},d=telemetry_1['trace'][I(0x1c3)](telemetry_1[I(0x1b1)][I(0x1de)](),c);return d;}}['getSpanAttrs'](c){const J=o;return{...Object[J(0x1c0)](this[J(0x1b1)][J(0x1df)])['reduce']((d,e)=>{const K=J;return e!=='trc'&&(d['app.job.'+e]=this[K(0x1b1)][K(0x1df)][e]),d;},{}),...Object[J(0x1c0)](this[J(0x1df)])[J(0x1c8)]((d,e)=>{const L=J;return d[L(0x1d6)+e]=this[L(0x1df)][e],d;},{}),'app.activity.leg':c};}['getStreamSpanAttrs'](c){const M=o;return{...Object[M(0x1c0)](c[M(0x1df)])['reduce']((d,e)=>{const N=M;return e!==N(0x1d0)&&e!==N(0x1af)&&(d[N(0x1bb)+e]=c[N(0x1df)][e]),d;},{})};}[o(0x1f9)](c,d){const O=o;!this[O(0x1b1)]['metadata'][O(0x1d0)]&&(this[O(0x1b1)][O(0x1df)][O(0x1d0)]=c[O(0x209)]()[O(0x1ee)]),!this['context'][O(0x1fe)]['output']['metadata']&&(this[O(0x1b1)][O(0x1fe)][O(0x1a7)][O(0x1df)]={}),d===0x1?this[O(0x1b1)][O(0x1fe)][O(0x1a7)][O(0x1df)][O(0x208)]=c[O(0x209)]()['spanId']:this[O(0x1b1)][O(0x1fe)][O(0x1a7)][O(0x1df)][O(0x1b4)]=c[O(0x209)]()['spanId'];}[o(0x1ba)](c){const P=o;this[P(0x1cb)]?.[P(0x1f1)]({'code':telemetry_1[P(0x1ad)]['ERROR'],'message':c});}[o(0x202)](c){const Q=o;this[Q(0x1cb)]?.['setStatus']({'code':telemetry_1[Q(0x1ad)][Q(0x1bc)],'message':c});}static['addTargetTelemetryPaths'](c,d,e,f){const R=o;f===0x1?(!(d[R(0x1e9)]in c)&&(c[d[R(0x1e9)]]=[]),c[d['parent']][R(0x1f5)](d[R(0x1e9)]+R(0x206))):(!(e['aid']in c)&&(c[e['aid']]=[]),c[e[R(0x1bd)]][R(0x1f5)](e[R(0x1bd)]+'/output/metadata/l1s'));}static[o(0x1c5)](c,d,e){const S=o;d[S(0x1dc)]===S(0x1f6)&&(c[S(0x1d1)]=e['metadata'][S(0x1d0)]);}static[o(0x1ca)](c,d,e,f,g){const T=o;if(d[T(0x1dc)]===T(0x1f6))c[e[T(0x1bd)]+T(0x1e0)]=f['$self'][T(0x1a7)][T(0x1df)]['l1s'],c[e['aid']+T(0x206)]=f['$self'][T(0x1a7)]['metadata'][T(0x1b4)];else{if(d[T(0x1dc)]===T(0x1b2)&&g===0x1)c[e[T(0x1bd)]+T(0x1e0)]=f[T(0x1fe)][T(0x1a7)][T(0x1df)][T(0x208)],c[e[T(0x1bd)]+'/output/metadata/l2s']=f[T(0x1fe)][T(0x1a7)][T(0x1df)]['l1s'];else{if(d[T(0x1dc)]===T(0x1ac)&&g===0x1)c[e[T(0x1bd)]+T(0x1e0)]=f['$self'][T(0x1a7)][T(0x1df)]['l1s'],c[e[T(0x1bd)]+T(0x206)]=f[T(0x1fe)][T(0x1a7)][T(0x1df)][T(0x208)];else{const h='l'+g+'s';c[e['aid']+T(0x1f0)+h]=f[T(0x1fe)]['output'][T(0x1df)][h];}}}}}exports['TelemetryService']=TelemetryService;
1
+ 'use strict';const o=b;(function(c,d){const n=b,e=c();while(!![]){try{const f=-parseInt(n(0xbb))/0x1+parseInt(n(0xef))/0x2+-parseInt(n(0xf9))/0x3*(parseInt(n(0xc9))/0x4)+parseInt(n(0xbd))/0x5*(parseInt(n(0x10a))/0x6)+parseInt(n(0xe1))/0x7+parseInt(n(0xbc))/0x8*(-parseInt(n(0xda))/0x9)+parseInt(n(0xe5))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x99473));var __importDefault=this&&this[o(0xc8)]||function(c){const p=o;return c&&c[p(0x111)]?c:{'default':c};};Object[o(0xc4)](exports,'__esModule',{'value':!![]}),exports[o(0xcb)]=void 0x0;const package_json_1=__importDefault(require(o(0xfd))),mapper_1=require('../mapper'),stream_1=require(o(0xd1)),telemetry_1=require(o(0xf0)),enums_1=require('../../modules/enums');class TelemetryService{constructor(c,d,e,f){const q=o;this['leg']=0x1,this[q(0xed)]=c,this['config']=d,this['metadata']=e,this['context']=f;}['shouldCreateSpan'](){const r=o;return enums_1[r(0xba)]===r(0xe6)||this[r(0xe0)]?.[r(0xab)]==='trigger'||this['config']?.[r(0xab)]==='worker';}static['createNoopSpan'](c,d){return{'spanContext'(){return{'traceId':c,'spanId':d,'isRemote':!![],'traceFlags':0x1};},'addEvent'(e,f,g){return this;},'setAttribute'(e,f){return this;},'setAttributes'(e){return this;},'setStatus'(e){return this;},'updateName'(e){return this;},'end'(e){},'isRecording'(){return![];},'recordException'(e,f){}};}[o(0xdc)](){const s=o;return this[s(0xb3)][s(0xd3)]['spn'];}['getActivityParentSpanId'](c){const t=o;return c===0x1?this[t(0xb3)][this[t(0xe0)][t(0xff)]][t(0xeb)]?.[t(0xd3)]?.[t(0xfa)]:this[t(0xb3)]['$self']['output']?.[t(0xd3)]?.['l1s'];}[o(0xe4)](){const u=o;return this[u(0xb3)][u(0xd3)][u(0xde)];}[o(0xae)](){const v=o,c=v(0xf6)+this[v(0xed)]+'/'+this[v(0xe0)][v(0x104)]+'/1',d=this[v(0xe4)](),e=this['getJobParentSpanId'](),f=this['getSpanAttrs'](0x1),g=this[v(0xf7)](d,e,c,f);return this[v(0xcc)]=g,this['setTelemetryContext'](g,0x1),this;}static async[o(0xf8)](c,d,e,f,g,h=0x0){const w=o,i=w(0xaa)+c+'/'+e+'/'+h,j=telemetry_1['trace'][w(0xd8)](package_json_1[w(0xf3)]['name'],package_json_1[w(0xf3)]['version']),k={'traceId':f,'spanId':g,'isRemote':!![],'traceFlags':0x1},l=telemetry_1[w(0x10b)]['setSpanContext'](telemetry_1['context']['active'](),k);return telemetry_1[w(0xb3)][w(0xdd)](l,()=>{const x=w,m=j[x(0xf7)](i,{'kind':telemetry_1['SpanKind'][x(0x10f)],'attributes':d});return m[x(0xce)](d),m[x(0xf1)](),!![];});}[o(0xc0)](c=this[o(0x107)]){const y=o,d=this[y(0xe0)][y(0xab)]['toUpperCase']()+'/'+this[y(0xed)]+'/'+this['metadata']['aid']+'/'+c,e=this[y(0xe4)](),f=this[y(0xb4)](c),g=this[y(0xc2)](c),h=this[y(0xf7)](e,f,d,g);return this[y(0xca)]=h,this[y(0xb6)](h,c),this;}[o(0xc1)](c,d){const z=o;let e;if(d===stream_1[z(0x110)][z(0xee)])e='SYSTEM';else{if(d===stream_1[z(0x110)][z(0xcf)])e=z(0x106);else c[z(0xab)]===stream_1[z(0xbe)][z(0xd7)]||c[z(0xab)]===stream_1[z(0xbe)][z(0xd5)]?e=z(0xd4):e='FANOUT';}if(this[z(0xea)]()||e==='EXECUTE'||e===z(0xee)){const f=c[z(0xd3)][z(0xbf)]?'/'+c['metadata'][z(0xbf)]:'',g=e+'/'+this[z(0xed)]+'/'+c[z(0xd3)][z(0xdb)]+f,h=this[z(0xaf)](c);this[z(0xca)]=this[z(0xf7)](c['metadata']['trc'],c[z(0xd3)][z(0x108)],g,h,!![]);}else this[z(0x105)]=c[z(0xd3)][z(0xde)],this['spanId']=c['metadata'][z(0x108)],this['span']=TelemetryService[z(0x100)](c[z(0xd3)][z(0xde)],c[z(0xd3)]['spn']);return this;}['startSpan'](c,d,e,f,g=![]){const A=o;this['traceId']=c,this[A(0xf2)]=d;if(g||this[A(0xea)]()){const h=telemetry_1[A(0x10b)][A(0xd8)](package_json_1[A(0xf3)]['name'],package_json_1['default'][A(0xc5)]),i=this[A(0xdf)](),j=h[A(0xf7)](e,{'kind':telemetry_1[A(0xb2)][A(0x10f)],'attributes':f,'root':!i},i);return j;}return TelemetryService['createNoopSpan'](c,d);}[o(0xfc)](){const B=o;if(this[B(0xe0)][B(0xe9)]&&this['span']){const c=new mapper_1['MapperService'](this['config'][B(0xe9)],this[B(0xb3)])[B(0xc3)](),d={...Object[B(0xb0)](c)[B(0xe3)]((e,f)=>{const C=B;return[C(0xfe),C(0xb8),'number']['includes'](typeof c[f])&&(e['app.activity.data.'+f]=c[f]),e;},{})};this[B(0xca)]['setAttributes'](d);}}[o(0xd0)](c){const D=o;this[D(0xca)]?.[D(0xce)](c);}[o(0xad)](c){const E=o;this[E(0xca)]?.['setAttributes'](c);}[o(0xe8)](c){const F=o;this['jobSpan']?.[F(0xce)](c);}['endJobSpan'](){const G=o;this['endSpan'](this[G(0xcc)]);}[o(0xac)](){const H=o;this[H(0x10d)](this[H(0xca)]);}[o(0x102)](){const I=o;this['endSpan'](this[I(0xca)]);}[o(0x10d)](c){c&&c['end']();}[o(0xdf)](){const J=o;if(this['traceId']&&this[J(0xf2)]){const c={'traceId':this['traceId'],'spanId':this['spanId'],'isRemote':!![],'traceFlags':0x1},d=telemetry_1['trace'][J(0xe2)](telemetry_1[J(0xb3)][J(0xc6)](),c);return d;}}[o(0xc2)](c){const K=o;return{...Object['keys'](this[K(0xb3)][K(0xd3)])[K(0xe3)]((d,e)=>{const L=K;return e!==L(0xde)&&(d[L(0x101)+e]=this[L(0xb3)]['metadata'][e]),d;},{}),...Object[K(0xb0)](this[K(0xd3)])[K(0xe3)]((d,e)=>{const M=K;return d[M(0xa9)+e]=this[M(0xd3)][e],d;},{}),'app.activity.leg':c};}[o(0xaf)](c){const N=o;return{...Object[N(0xb0)](c[N(0xd3)])[N(0xe3)]((d,e)=>{const O=N;return e!==O(0xde)&&e!==O(0x108)&&(d[O(0xfb)+e]=c[O(0xd3)][e]),d;},{})};}[o(0xb6)](c,d){const P=o;!this[P(0xb3)][P(0xd3)][P(0xde)]&&(this[P(0xb3)][P(0xd3)][P(0xde)]=c[P(0x10c)]()['traceId']),!this[P(0xb3)][P(0xb1)][P(0xeb)][P(0xd3)]&&(this[P(0xb3)][P(0xb1)]['output'][P(0xd3)]={}),d===0x1?this['context'][P(0xb1)][P(0xeb)][P(0xd3)][P(0xe7)]=c['spanContext']()[P(0xf2)]:this[P(0xb3)][P(0xb1)][P(0xeb)][P(0xd3)][P(0xfa)]=c[P(0x10c)]()[P(0xf2)];}[o(0xd6)](c){const Q=o;this[Q(0xca)]?.[Q(0xd9)]({'code':telemetry_1[Q(0xcd)][Q(0xb5)],'message':c});}[o(0xb7)](c){const R=o;this[R(0xca)]?.[R(0xd9)]({'code':telemetry_1[R(0xcd)][R(0xb5)],'message':c});}static[o(0xd2)](c,d,e,f){const S=o;f===0x1?(!(d['parent']in c)&&(c[d[S(0xff)]]=[]),c[d['parent']][S(0x109)](d['parent']+S(0xf4))):(!(e[S(0xdb)]in c)&&(c[e['aid']]=[]),c[e[S(0xdb)]][S(0x109)](e['aid']+'/output/metadata/l1s'));}static[o(0x103)](c,d,e){const T=o;d[T(0xab)]===T(0xc7)&&(c['metadata/trc']=e['metadata'][T(0xde)]);}static[o(0xb9)](c,d,e,f,g){const U=o;if(d[U(0xab)]===U(0xc7))c[e[U(0xdb)]+U(0xec)]=f[U(0xb1)][U(0xeb)][U(0xd3)][U(0xe7)],c[e[U(0xdb)]+U(0xf4)]=f[U(0xb1)][U(0xeb)][U(0xd3)][U(0xfa)];else{if(d[U(0xab)]==='hook'&&g===0x1)c[e[U(0xdb)]+'/output/metadata/l1s']=f[U(0xb1)][U(0xeb)][U(0xd3)]['l1s'],c[e[U(0xdb)]+U(0xf4)]=f[U(0xb1)][U(0xeb)][U(0xd3)][U(0xe7)];else{if(d[U(0xab)]===U(0x10e)&&g===0x1)c[e[U(0xdb)]+U(0xec)]=f[U(0xb1)][U(0xeb)][U(0xd3)][U(0xe7)],c[e[U(0xdb)]+U(0xf4)]=f[U(0xb1)][U(0xeb)][U(0xd3)]['l1s'];else{const h='l'+g+'s';c[e[U(0xdb)]+U(0xf5)+h]=f[U(0xb1)]['output']['metadata'][h];}}}}}function b(c,d){const e=a();return b=function(f,g){f=f-0xa9;let h=e[f];return h;},b(c,d);}function a(){const V=['endActivitySpan','setStreamAttributes','startJobSpan','getStreamSpanAttrs','keys','$self','SpanKind','context','getActivityParentSpanId','ERROR','setTelemetryContext','setStreamError','boolean','bindActivityTelemetryToState','HMSH_TELEMETRY','987033RNfZiP','8dnWpPv','215AXeTXd','StreamDataType','topic','startActivitySpan','startStreamSpan','getSpanAttrs','mapRules','defineProperty','version','active','trigger','__importDefault','44KtcGJn','span','TelemetryService','jobSpan','SpanStatusCode','setAttributes','WORKER','setActivityAttributes','../../types/stream','addTargetTelemetryPaths','metadata','FANIN','RESPONSE','setActivityError','RESULT','getTracer','setStatus','9698868vnUFOr','aid','getJobParentSpanId','with','trc','getParentSpanContext','config','7128639sgVqti','setSpanContext','reduce','getTraceId','5872490VVxBhX','debug','l1s','setJobAttributes','telemetry','shouldCreateSpan','output','/output/metadata/l1s','appId','SYSTEM','876576mvOhiv','../../types/telemetry','end','spanId','default','/output/metadata/l2s','/output/metadata/','JOB/','startSpan','traceActivity','50091pKDFUH','l2s','app.stream.','mapActivityAttributes','../../package.json','string','parent','createNoopSpan','app.job.','endStreamSpan','bindJobTelemetryToState','subscribes','traceId','EXECUTE','leg','spn','push','116130bwTsPb','trace','spanContext','endSpan','signal','CLIENT','StreamRole','__esModule','app.activity.','TRACE/','type'];a=function(){return V;};return a();}exports[o(0xcb)]=TelemetryService;
@@ -1 +1 @@
1
- 'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=parseInt(l(0x1c6))/0x1*(-parseInt(l(0x1aa))/0x2)+-parseInt(l(0x1b0))/0x3*(parseInt(l(0x1ac))/0x4)+-parseInt(l(0x1c0))/0x5+parseInt(l(0x187))/0x6*(parseInt(l(0x1d1))/0x7)+-parseInt(l(0x196))/0x8*(-parseInt(l(0x1c2))/0x9)+-parseInt(l(0x1ce))/0xa*(parseInt(l(0x1ba))/0xb)+parseInt(l(0x199))/0xc;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x99c75));function a(){const z=['originator','10429ASBXrz','ceil','interval','identifyProvider','__esModule','signature','counts','ping','11022720IXNCiu','init','rollcall','7zniNVX','inited','publish','initClients','WorkerService','reclaimDelay','push','../connector/factory','throttle','ConnectorService','1354032NPDgHJ','initStreamChannel','reclaimCount','random','Router','WORKER','getSystemHealth','../sub/factory','topic','workers','StreamRole','HMSH_QUORUM_ROLLCALL_CYCLES','subscriptionHandler','STREAMS','guid','505072TYZeao','verifyWorkerFields','initSubChannel','31873380OqBTGr','cancelRollCall','toString','KeyType','../../modules/enums','mintKey','XSleepFor','StreamServiceFactory','store','consumeMessages','SubServiceFactory','rollCallInterval','../store/factory','logger','type','../../modules/utils','../../types/stream','114YCgqCU','appId','4mJNCdv','initStoreChannel','namespace','sub','7005CNIDBL','../router','initRouter','getThrottleRate','../stream/factory','StoreServiceFactory','sayPong','stop','QUORUM','debug','11rwQnjt','router','callback','max','worker\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields\x20along\x20with\x20a\x20callback\x20function\x20and\x20topic.','stream','3079920iePwWW','formatISODate','9iJLOrG','subscribe','doRollCall'];a=function(){return z;};return a();}Object['defineProperty'](exports,m(0x1ca),{'value':!![]}),exports['WorkerService']=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0x182;let h=e[f];return h;},b(c,d);}const key_1=require('../../modules/key'),utils_1=require(m(0x1a8)),factory_1=require(m(0x184)),router_1=require(m(0x1b1)),stream_1=require(m(0x1a9)),enums_1=require(m(0x19d)),factory_2=require(m(0x1b4)),factory_3=require(m(0x18e)),factory_4=require(m(0x1a5));class WorkerService{constructor(){this['reporting']=![];}static async[m(0x1cf)](c,d,e,f,g){const n=m,h=[];if(Array['isArray'](f['workers']))for(const i of f[n(0x190)]){await factory_1[n(0x186)][n(0x1d4)](i);const j=new WorkerService();j[n(0x197)](i),j[n(0x1ae)]=c,j['appId']=d,j[n(0x195)]=e,j[n(0x1bc)]=i['callback'],j['topic']=i[n(0x18f)],j['config']=f,j[n(0x1a6)]=g,await j['initStoreChannel'](j,i[n(0x1a1)]),await j[n(0x198)](j,i['sub'],i['pub']??i['store']),await j['subscribe'][n(0x1c3)](key_1['KeyType'][n(0x1b8)],j['subscriptionHandler'](),d),await j[n(0x1c3)][n(0x1c3)](key_1[n(0x19c)]['QUORUM'],j[n(0x193)](),d,j[n(0x18f)]),await j['subscribe'][n(0x1c3)](key_1['KeyType'][n(0x1b8)],j[n(0x193)](),d,j[n(0x195)]),await j[n(0x188)](j,i[n(0x1bf)],i[n(0x1a1)]),j[n(0x1bb)]=await j[n(0x1b2)](i,g);const k=j[n(0x1a1)]['mintKey'](key_1[n(0x19c)][n(0x194)],{'appId':j['appId'],'topic':i['topic']});await j[n(0x1bb)][n(0x1a2)](k,n(0x18c),j[n(0x195)],i[n(0x1bc)]),j[n(0x1d2)]=(0x0,utils_1[n(0x1c1)])(new Date()),h[n(0x183)](j);}return h;}[m(0x197)](c){const o=m;if(!(0x0,utils_1[o(0x1c9)])(c[o(0x1a1)])||!(0x0,utils_1[o(0x1c9)])(c[o(0x1bf)])||!(0x0,utils_1[o(0x1c9)])(c[o(0x1af)])||!(c[o(0x18f)]&&c['callback']))throw new Error(o(0x1be));}async[m(0x1ad)](c,d){const p=m;c[p(0x1a1)]=await factory_4[p(0x1b5)][p(0x1cf)](d,c['namespace'],c[p(0x1ab)],c['logger']);}async[m(0x198)](c,d,e){const q=m;c[q(0x1c3)]=await factory_3[q(0x1a3)][q(0x1cf)](d,e,c['namespace'],c[q(0x1ab)],c[q(0x195)],c[q(0x1a6)]);}async[m(0x188)](c,d,e){const r=m;c[r(0x1bf)]=await factory_2[r(0x1a0)]['init'](d,e,c[r(0x1ae)],c[r(0x1ab)],c[r(0x1a6)]);}async[m(0x1b2)](c,d){const s=m,e=await this[s(0x1a1)][s(0x1b3)](c[s(0x18f)]);return new router_1[(s(0x18b))]({'namespace':this[s(0x1ae)],'appId':this[s(0x1ab)],'guid':this[s(0x195)],'role':stream_1[s(0x191)][s(0x18c)],'topic':c[s(0x18f)],'reclaimDelay':c[s(0x182)],'reclaimCount':c[s(0x189)],'throttle':e},this['stream'],d);}[m(0x193)](){const c=this;return async(d,e)=>{const t=b;c[t(0x1a6)][t(0x1b9)]('worker-event-received',{'topic':d,'type':e[t(0x1a7)]});if(e[t(0x1a7)]===t(0x185))e[t(0x18f)]!==null&&c[t(0x185)](e[t(0x185)]);else{if(e['type']===t(0x1cd))c[t(0x1b6)](c[t(0x1ab)],c[t(0x195)],e[t(0x1c5)],e['details']);else e['type']===t(0x1d0)&&(e[t(0x18f)]!==null&&c[t(0x1c4)](e));}};}async[m(0x1c4)](c){const u=m;let d=0x0;const e=!isNaN(c['max'])?c[u(0x1bd)]:enums_1[u(0x192)];if(this[u(0x1a4)])clearTimeout(this['rollCallInterval']);const f=c[u(0x1c8)]/0x2,g=f+Math[u(0x1c7)](Math[u(0x18a)]()*f);do{await(0x0,utils_1['sleepFor'])(Math[u(0x1c7)](Math[u(0x18a)]()*0x3e8)),await this[u(0x1b6)](this[u(0x1ab)],this[u(0x195)],null,!![],c[u(0x1cb)]);if(!c['interval'])return;const {promise:h,timerId:i}=(0x0,utils_1[u(0x19f)])(g*0x3e8);this[u(0x1a4)]=i,await h;}while(this['rollCallInterval']&&d++<e-0x1);}[m(0x19a)](){const v=m;this[v(0x1a4)]&&(clearTimeout(this['rollCallInterval']),delete this[v(0x1a4)]);}[m(0x1b7)](){const w=m;this[w(0x19a)]();}async['sayPong'](c,d,e,f=![],g=![]){const x=m;let h;if(f){const i={'appId':this[x(0x1ab)],'topic':this['topic']};h={'engine_id':this[x(0x195)],'namespace':this[x(0x1ae)],'app_id':this[x(0x1ab)],'worker_topic':this['topic'],'stream':this[x(0x1a1)][x(0x19e)](key_1[x(0x19c)][x(0x194)],i),'counts':this[x(0x1bb)]?.[x(0x1cc)],'timestamp':(0x0,utils_1[x(0x1c1)])(new Date()),'inited':this[x(0x1d2)],'throttle':this[x(0x1bb)]?.[x(0x185)],'reclaimDelay':this[x(0x1bb)]?.[x(0x182)],'reclaimCount':this[x(0x1bb)]?.[x(0x189)],'system':await(0x0,utils_1[x(0x18d)])(),'signature':g?this[x(0x1bc)][x(0x19b)]():undefined};}this[x(0x1c3)][x(0x1d3)](key_1[x(0x19c)][x(0x1b8)],{'type':'pong','guid':d,'originator':e,'profile':h},c);}async[m(0x185)](c){const y=m;this[y(0x1bb)]?.['setThrottle'](c);}}exports[m(0x1d5)]=WorkerService;
1
+ 'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=parseInt(l(0x154))/0x1+-parseInt(l(0x159))/0x2*(-parseInt(l(0x14a))/0x3)+-parseInt(l(0x14b))/0x4+-parseInt(l(0x16d))/0x5+parseInt(l(0x121))/0x6*(-parseInt(l(0x155))/0x7)+-parseInt(l(0x125))/0x8+parseInt(l(0x163))/0x9;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x5e5a5));Object[m(0x15c)](exports,m(0x131),{'value':!![]}),exports[m(0x168)]=void 0x0;const key_1=require('../../modules/key'),utils_1=require(m(0x158)),factory_1=require('../connector/factory'),router_1=require(m(0x12a)),stream_1=require('../../types/stream'),enums_1=require('../../modules/enums'),factory_2=require(m(0x14c)),factory_3=require('../sub/factory'),factory_4=require(m(0x130));function b(c,d){const e=a();return b=function(f,g){f=f-0x120;let h=e[f];return h;},b(c,d);}class WorkerService{constructor(){const n=m;this[n(0x147)]=![];}static async[m(0x160)](c,d,e,f,g){const o=m,h=[];if(Array[o(0x13d)](f['workers']))for(const i of f[o(0x16b)]){await factory_1[o(0x122)][o(0x15a)](i);const j=new WorkerService();j[o(0x139)](i),j[o(0x13f)]=c,j[o(0x124)]=d,j[o(0x12b)]=e,j[o(0x138)]=i['callback'],j[o(0x132)]=i[o(0x132)],j[o(0x13c)]=f,j[o(0x12e)]=g,await j[o(0x128)](j,i[o(0x135)]),await j[o(0x15b)](j,i['sub'],i[o(0x13e)]??i[o(0x135)]),await j['subscribe'][o(0x144)](key_1[o(0x166)][o(0x145)],j[o(0x16a)](),d),await j[o(0x144)][o(0x144)](key_1[o(0x166)][o(0x145)],j[o(0x16a)](),d,j[o(0x132)]),await j[o(0x144)][o(0x144)](key_1[o(0x166)][o(0x145)],j[o(0x16a)](),d,j[o(0x12b)]),await j[o(0x146)](j,i[o(0x157)],i[o(0x135)]),j[o(0x164)]=await j['initRouter'](i,g);const k=j['store'][o(0x151)](key_1['KeyType'][o(0x15d)],{'appId':j['appId'],'topic':i[o(0x132)]});await j['router'][o(0x123)](k,o(0x127),j['guid'],i[o(0x138)]),j['inited']=(0x0,utils_1[o(0x14f)])(new Date()),h[o(0x14e)](j);}return h;}[m(0x139)](c){const p=m;if(!(0x0,utils_1[p(0x162)])(c[p(0x135)])||!(0x0,utils_1[p(0x162)])(c['stream'])||!(0x0,utils_1[p(0x162)])(c['sub'])||!(c['topic']&&c['callback']))throw new Error(p(0x16c));}async[m(0x128)](c,d){const q=m;c[q(0x135)]=await factory_4[q(0x133)]['init'](d,c[q(0x13f)],c[q(0x124)],c['logger']);}async[m(0x15b)](c,d,e){const r=m;c[r(0x144)]=await factory_3['SubServiceFactory'][r(0x160)](d,e,c[r(0x13f)],c[r(0x124)],c['guid'],c[r(0x12e)]);}async['initStreamChannel'](c,d,e){const s=m;c[s(0x157)]=await factory_2[s(0x143)][s(0x160)](d,e,c[s(0x13f)],c[s(0x124)],c['logger']);}async[m(0x150)](c,d){const t=m,e=await this['store'][t(0x120)](c[t(0x132)]);return new router_1[(t(0x169))]({'namespace':this['namespace'],'appId':this[t(0x124)],'guid':this[t(0x12b)],'role':stream_1['StreamRole']['WORKER'],'topic':c[t(0x132)],'reclaimDelay':c[t(0x14d)],'reclaimCount':c['reclaimCount'],'throttle':e},this[t(0x157)],d);}[m(0x16a)](){const c=this;return async(d,e)=>{const u=b;c[u(0x12e)][u(0x149)](u(0x161),{'topic':d,'type':e['type']});if(e['type']===u(0x134))e['topic']!==null&&c[u(0x134)](e[u(0x134)]);else{if(e['type']===u(0x13a))c[u(0x12f)](c[u(0x124)],c[u(0x12b)],e['originator'],e[u(0x129)]);else e[u(0x153)]==='rollcall'&&(e[u(0x132)]!==null&&c[u(0x15f)](e));}};}async[m(0x15f)](c){const v=m;let d=0x0;const e=!isNaN(c['max'])?c['max']:enums_1[v(0x13b)];if(this[v(0x12c)])clearTimeout(this[v(0x12c)]);const f=c['interval']/0x2,g=f+Math['ceil'](Math[v(0x165)]()*f);do{await(0x0,utils_1[v(0x156)])(Math[v(0x12d)](Math['random']()*0x3e8)),await this[v(0x12f)](this[v(0x124)],this['guid'],null,!![],c['signature']);if(!c[v(0x148)])return;const {promise:h,timerId:i}=(0x0,utils_1[v(0x15e)])(g*0x3e8);this[v(0x12c)]=i,await h;}while(this[v(0x12c)]&&d++<e-0x1);}['cancelRollCall'](){const w=m;this[w(0x12c)]&&(clearTimeout(this[w(0x12c)]),delete this[w(0x12c)]);}[m(0x126)](){const x=m;this[x(0x136)]();}async[m(0x12f)](c,d,e,f=![],g=![]){const y=m;let h;if(f){const i={'appId':this[y(0x124)],'topic':this[y(0x132)]};h={'engine_id':this[y(0x12b)],'namespace':this[y(0x13f)],'app_id':this['appId'],'worker_topic':this[y(0x132)],'stream':this['store'][y(0x151)](key_1[y(0x166)][y(0x15d)],i),'counts':this['router']?.['counts'],'timestamp':(0x0,utils_1['formatISODate'])(new Date()),'inited':this['inited'],'throttle':this[y(0x164)]?.[y(0x134)],'reclaimDelay':this[y(0x164)]?.[y(0x14d)],'reclaimCount':this[y(0x164)]?.[y(0x167)],'system':await(0x0,utils_1[y(0x142)])(),'signature':g?this[y(0x138)][y(0x141)]():undefined};}this[y(0x144)][y(0x152)](key_1[y(0x166)]['QUORUM'],{'type':y(0x137),'guid':d,'originator':e,'profile':h},c);}async['throttle'](c){const z=m;this[z(0x164)]?.[z(0x140)](c);}}exports['WorkerService']=WorkerService;function a(){const A=['config','isArray','pub','namespace','setThrottle','toString','getSystemHealth','StreamServiceFactory','subscribe','QUORUM','initStreamChannel','reporting','interval','debug','6603nPmBma','823128KlBkrn','../stream/factory','reclaimDelay','push','formatISODate','initRouter','mintKey','publish','type','272886jyybql','56441pgdtnQ','sleepFor','stream','../../modules/utils','198CeOSam','initClients','initSubChannel','defineProperty','STREAMS','XSleepFor','doRollCall','init','worker-event-received','identifyProvider','11464704riZsco','router','random','KeyType','reclaimCount','WorkerService','Router','subscriptionHandler','workers','worker\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields\x20along\x20with\x20a\x20callback\x20function\x20and\x20topic.','760075WbMbDc','getThrottleRate','210JRqPca','ConnectorService','consumeMessages','appId','5905360EgPHTb','stop','WORKER','initStoreChannel','details','../router','guid','rollCallInterval','ceil','logger','sayPong','../store/factory','__esModule','topic','StoreServiceFactory','throttle','store','cancelRollCall','pong','callback','verifyWorkerFields','ping','HMSH_QUORUM_ROLLCALL_CYCLES'];a=function(){return A;};return a();}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.3.27",
3
+ "version": "0.3.28",
4
4
  "description": "Serverless Workflow",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",