@hotmeshio/hotmesh 0.3.31 → 0.3.32
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/build/modules/enums.d.ts +2 -0
- package/build/modules/enums.js +4 -2
- package/build/modules/key.js +1 -1
- package/build/modules/utils.js +1 -1
- package/build/package.json +1 -1
- package/build/services/activities/activity.js +1 -1
- package/build/services/activities/await.js +1 -1
- package/build/services/activities/cycle.js +1 -1
- package/build/services/activities/hook.js +1 -1
- package/build/services/activities/index.js +1 -1
- package/build/services/activities/interrupt.js +1 -1
- package/build/services/activities/signal.js +1 -1
- package/build/services/activities/trigger.js +1 -1
- package/build/services/activities/worker.js +1 -1
- package/build/services/collator/index.js +1 -1
- package/build/services/compiler/deployer.js +1 -1
- package/build/services/compiler/index.js +1 -1
- package/build/services/compiler/validator.js +1 -1
- package/build/services/engine/index.js +1 -1
- package/build/services/exporter/index.js +1 -1
- package/build/services/mapper/index.js +1 -1
- package/build/services/meshflow/exporter.js +1 -1
- package/build/services/pipe/functions/array.js +1 -1
- package/build/services/pipe/functions/bitwise.js +1 -1
- package/build/services/pipe/functions/conditional.js +1 -1
- package/build/services/pipe/functions/cron.js +1 -1
- package/build/services/pipe/functions/date.js +1 -1
- package/build/services/pipe/functions/index.js +1 -1
- package/build/services/pipe/functions/json.js +1 -1
- package/build/services/pipe/functions/logical.js +1 -1
- package/build/services/pipe/functions/math.js +1 -1
- package/build/services/pipe/functions/number.js +1 -1
- package/build/services/pipe/functions/object.js +1 -1
- package/build/services/pipe/functions/string.js +1 -1
- package/build/services/pipe/functions/symbol.js +1 -1
- package/build/services/pipe/functions/unary.js +1 -1
- package/build/services/pipe/index.js +1 -1
- package/build/services/quorum/index.js +1 -1
- package/build/services/reporter/index.js +1 -1
- package/build/services/router/index.js +1 -1
- package/build/services/search/providers/postgres/postgres.js +1 -1
- package/build/services/search/providers/redis/ioredis.js +1 -1
- package/build/services/search/providers/redis/redis.js +1 -1
- package/build/services/serializer/index.js +1 -1
- package/build/services/store/providers/postgres/kvsql.js +1 -1
- package/build/services/store/providers/postgres/kvtables.js +1 -1
- package/build/services/store/providers/postgres/kvtransaction.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/zset.js +1 -1
- package/build/services/store/providers/postgres/postgres.js +1 -1
- package/build/services/store/providers/redis/_base.js +1 -1
- package/build/services/store/providers/redis/ioredis.js +1 -1
- package/build/services/store/providers/redis/redis.js +1 -1
- package/build/services/store/providers/store-initializable.js +1 -1
- package/build/services/stream/providers/nats/nats.js +1 -1
- package/build/services/stream/providers/postgres/kvtables.js +1 -1
- package/build/services/stream/providers/postgres/postgres.js +1 -1
- package/build/services/stream/providers/redis/ioredis.js +1 -1
- package/build/services/stream/providers/redis/redis.js +1 -1
- package/build/services/stream/providers/stream-initializable.js +1 -1
- package/build/services/sub/providers/nats/nats.js +1 -1
- package/build/services/sub/providers/postgres/postgres.js +1 -1
- package/build/services/sub/providers/redis/ioredis.js +1 -1
- package/build/services/sub/providers/redis/redis.js +1 -1
- package/build/services/task/index.js +1 -1
- package/build/services/telemetry/index.js +1 -1
- package/build/services/worker/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const r=b;(function(c,d){const q=b,e=c();while(!![]){try{const f
|
|
1
|
+
'use strict';const r=b;(function(c,d){const q=b,e=c();while(!![]){try{const f=-parseInt(q(0x19a))/0x1+parseInt(q(0x182))/0x2+parseInt(q(0x18b))/0x3*(-parseInt(q(0x17c))/0x4)+parseInt(q(0x19b))/0x5+-parseInt(q(0x192))/0x6+parseInt(q(0x181))/0x7+-parseInt(q(0x188))/0x8;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x81f61));Object[r(0x19c)](exports,'__esModule',{'value':!0x0}),exports['IORedisSubService']=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0x17c;let h=e[f];return h;},b(c,d);}const key_1=require('../../../../modules/key'),index_1=require(r(0x196));function a(){const E=['publish','appId','894732VlLoPI','transact','parse','Error\x20subscribing\x20to:\x20','psubscribe','3664598TfCKAJ','1648488DuFKhs','subscribe','init','Error\x20parsing\x20message:\x20','SubService','namespace','3685248KdwMHI','punsubscribe','storeClient','3uqzljA','KeyService','eventClient','namespace\x20not\x20set','error','pmessage','unsubscribe','1899498hrzhIt','mintKey','message','multi','../../index','logger','IORedisSubService','stringify','20918LRjGfl','1032015PvbqVh','defineProperty'];a=function(){return E;};return a();}class IORedisSubService extends index_1[r(0x186)]{constructor(c,d){super(c,d);}async[r(0x184)](c=key_1['HMNS'],d,f,g){const s=r;this['namespace']=c,this[s(0x197)]=g,this[s(0x19e)]=d,this['engineId']=f;}[r(0x17d)](){const t=r;return this['eventClient'][t(0x195)]();}[r(0x193)](c,d){const u=r;if(!this['namespace'])throw new Error(u(0x18e));return key_1[u(0x18c)][u(0x193)](this[u(0x187)],c,d);}async[r(0x183)](c,d,f,g){const v=r,h=this,j=this[v(0x193)](c,{'appId':f,'engineId':g});await this[v(0x18d)][v(0x183)](j,k=>{const w=v;k&&h[w(0x197)][w(0x18f)](w(0x17f)+j,k);}),this[v(0x18d)]['on'](v(0x194),(k,l)=>{const x=v;if(k===j)try{const m=JSON[x(0x17e)](l);d(j,m);}catch(o){h[x(0x197)][x(0x18f)](x(0x185)+l,o);}});}async[r(0x191)](c,d,f){const y=r,g=this[y(0x193)](c,{'appId':d,'engineId':f});await this['eventClient'][y(0x191)](g);}async[r(0x180)](c,d,f,g){const z=r,h=this,j=this[z(0x193)](c,{'appId':f,'engineId':g});await this['eventClient'][z(0x180)](j,k=>{const A=z;k&&h[A(0x197)][A(0x18f)](A(0x17f)+j,k);}),this[z(0x18d)]['on'](z(0x190),(k,l,m)=>{const B=z;if(k===j)try{const o=JSON['parse'](m);d(l,o);}catch(p){h[B(0x197)][B(0x18f)]('Error\x20parsing\x20message:\x20'+m,p);}});}async[r(0x189)](c,d,f){const C=r,g=this[C(0x193)](c,{'appId':d,'engineId':f});await this[C(0x18d)]['punsubscribe'](g);}async[r(0x19d)](c,d,f,g){const D=r,h=this['mintKey'](c,{'appId':f,'engineId':g});return 0x1===await this[D(0x18a)]['publish'](h,JSON[D(0x199)](d));}}exports[r(0x198)]=IORedisSubService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const q=b;(function(c,d){const p=b,e=c();while(!![]){try{const f=parseInt(p(0x139))/0x1+-parseInt(p(0x149))/0x2*(parseInt(p(0x147))/0x3)+-parseInt(p(0x13b))/0x4*(-parseInt(p(0x148))/0x5)+-parseInt(p(0x12f))/0x6*(-parseInt(p(0x13c))/0x7)+parseInt(p(0x140))/0x8*(parseInt(p(0x143))/0x9)+parseInt(p(0x135))/0xa*(parseInt(p(0x13f))/0xb)+parseInt(p(0x131))/0xc*(-parseInt(p(0x141))/0xd);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xc0ea9));function a(){const B=['__esModule','pSubscribe','276947YrXzpE','24zZlHth','44291VMnCYT','HMNS','4148163JQnYrw','storeClient','KeyService','transact','129iUVrNB','5QgApFS','60062qsLKSO','engineId','../../../../modules/key','unsubscribe','multi','stringify','mintKey','publish','../../index','pUnsubscribe','init','5034360EkmvLd','RedisSubService','6276Aqeoyn','subscribe','eventClient','parse','20EUgSjj','error','namespace','logger','474607hBiMmF','punsubscribe','4466548UoAWnL','7EBJKzj'];a=function(){return B;};return a();}Object['defineProperty'](exports,q(0x13d),{'value':!0x0}),exports[q(0x130)]=void 0x0;const key_1=require(q(0x14b)),index_1=require(q(0x151));function b(c,d){const e=a();return b=function(f,g){f=f-0x12e;let h=e[f];return h;},b(c,d);}class RedisSubService extends index_1['SubService']{constructor(c,d){super(c,d);}async[q(0x12e)](c=key_1[q(0x142)],d,f,g){const r=q;this[r(0x137)]=c,this['logger']=g,this['appId']=d,this[r(0x14a)]=f;}[q(0x146)](){const s=q;return this['eventClient'][s(0x14d)]();}[q(0x14f)](c,d){const t=q;if(!this[t(0x137)])throw new Error('namespace\x20not\x20set');return key_1[t(0x145)][t(0x14f)](this[t(0x137)],c,d);}async['subscribe'](c,d,f,g){const u=q;if(this[u(0x133)]){const h=this,j=this[u(0x14f)](c,{'appId':f,'engineId':g});await this[u(0x133)][u(0x132)](j,k=>{const v=u;try{const l=JSON[v(0x134)](k);d(j,l);}catch(m){h[v(0x138)][v(0x136)]('Error\x20parsing\x20message:\x20'+k,m);}});}}async['unsubscribe'](c,d,f){const w=q,g=this['mintKey'](c,{'appId':d,'engineId':f});await this[w(0x133)][w(0x14c)](g);}async['psubscribe'](c,d,f,g){const x=q;if(this[x(0x133)]){const h=this,j=this[x(0x14f)](c,{'appId':f,'engineId':g});await this[x(0x133)][x(0x13e)](j,(k,l)=>{const y=x;try{const m=JSON['parse'](k);d(l,m);}catch(o){h['logger'][y(0x136)]('Error\x20parsing\x20message:\x20'+k,o);}});}}async[q(0x13a)](c,d,f){const z=q,g=this[z(0x14f)](c,{'appId':d,'engineId':f});await this[z(0x133)][z(0x152)](g);}async[q(0x150)](c,d,f,g){const A=q,h=this[A(0x14f)](c,{'appId':f,'engineId':g});return await this[A(0x144)][A(0x150)](h,JSON[A(0x14e)](d))>0x0;}}exports[q(0x130)]=RedisSubService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const y=b;(function(c,d){const x=b,e=c();while(!![]){try{const f=parseInt(x(
|
|
1
|
+
'use strict';const y=b;function a(){const M=[':processed','true','processTimeHooks','errorCount','284610zbHTiG','2eCyUsF','expireJob','split','registerWebHook','99928WalkYj','shouldScout','match','getHookSignal','now','appId','HMSH_FIDELITY_SECONDS','task-process-timehooks-error','../../modules/utils','store','KeyType','jid','reserveScoutRole','SIGNALS','deleteWebHookSignal','timerId','sleepFor','actual','HMSH_SCOUT_INTERVAL_SECONDS','promise','resolve','defineProperty','1795365TnLrPf','addTaskQueues','parse','4900CmjCXF','28kwqjEm','WEBSEP','signal-not-found','registerTimeHook','935832vQylHY','3NCjfbR','processWebHooks','TaskService','getNextTask','join','conditions','HMSH_EXPIRE_DURATION','deleteHookSignal','random','1733814wYpYPi','../../modules/key','getHookRules','../pipe','signaler.registerWebHook:error:\x20hook\x20rule\x20not\x20found','getActiveTaskQueue','child','XSleepFor','floor','metadata','getHookRule','isScout','25762iudotE','cleanupTimeout','mintKey','../../modules/enums','logger','delist','266263MFNkUX','cancelCleanup'];a=function(){return M;};return a();}(function(c,d){const x=b,e=c();while(!![]){try{const f=parseInt(x(0x11c))/0x1*(-parseInt(x(0xde))/0x2)+-parseInt(x(0x101))/0x3*(parseInt(x(0x100))/0x4)+-parseInt(x(0xdd))/0x5+-parseInt(x(0x10a))/0x6+parseInt(x(0xfc))/0x7*(parseInt(x(0xe2))/0x8)+-parseInt(x(0xf8))/0x9+-parseInt(x(0xfb))/0xa*(-parseInt(x(0x116))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x2518b));Object[y(0xf7)](exports,'__esModule',{'value':!0x0}),exports[y(0x103)]=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0xdb;let h=e[f];return h;},b(c,d);}const enums_1=require(y(0x119)),utils_1=require(y(0xea)),pipe_1=require(y(0x10d)),hotmesh_1=require('../../types/hotmesh'),key_1=require(y(0x10b));class TaskService{constructor(c,d){const z=y;this['cleanupTimeout']=null,this[z(0x115)]=!0x1,this[z(0xdc)]=0x0,this['logger']=d,this[z(0xeb)]=c;}async[y(0x102)](c){const A=y,d=await this[A(0xeb)][A(0x10f)]();if(d){const [f,g,h,...j]=d[A(0xe0)](key_1['WEBSEP']),k=JSON[A(0xfa)](j[A(0x105)](key_1['WEBSEP'])),l=g+A(0x11e),m=await this['store']['processTaskQueue'](g,l);m?await c(f,{...k,'id':m}):await this[A(0xeb)]['deleteProcessedTaskQueue'](d,g,l,A(0x11f)===h),setImmediate(()=>this['processWebHooks'](c));}}async['enqueueWorkItems'](c){const B=y;await this['store'][B(0xf9)](c);}async['registerJobForCleanup'](c,d=enums_1[y(0x107)],f){const C=y;d>0x0&&await this[C(0xeb)][C(0xdf)](c,d);}async[y(0xff)](d,f,g,h,j=enums_1[y(0xe8)],k,l){const D=y,m=Date[D(0xe6)]()+0x3e8*j,p=0x3e8*enums_1[D(0xe8)],q=Math[D(0x112)](m/p)*p;await this['store']['registerTimeHook'](d,f,g,h,q,k,l);}async[y(0xe3)](){const E=y,c=this[E(0x115)];return!(!c&&!(this[E(0x115)]=await this[E(0xeb)][E(0xee)]('time')))&&(c||setTimeout(()=>{const F=E;this[F(0x115)]=!0x1;},0x3e8*enums_1[E(0xf4)]),!0x0);}async[y(0xdb)](c,d){const G=y;if(await this[G(0xe3)]())try{const f=await this[G(0xeb)][G(0x104)](d);if(Array['isArray'](f)){const [g,h,j,k,l]=f;if(G(0x110)===l);else{if(G(0x11b)===l){const m=this[G(0xeb)][G(0x118)](hotmesh_1[G(0xec)][G(0xef)],{'appId':this[G(0xeb)][G(0xe7)]});await this[G(0xeb)]['delistSignalKey'](m,h);}else await c(h,j,k,l);}await(0x0,utils_1[G(0xf2)])(0x0),this[G(0xdc)]=0x0,this['processTimeHooks'](c,g);}else{if(f)await(0x0,utils_1[G(0xf2)])(0x0),this['errorCount']=0x0,this[G(0xdb)](c);else{const n=(0x0,utils_1[G(0x111)])(0x3e8*enums_1[G(0xe8)]);this[G(0x117)]=n[G(0xf1)],await n['promise'],this[G(0xdc)]=0x0,this[G(0xdb)](c);}}}catch(p){this[G(0x11a)]['warn'](G(0xe9),p),await(0x0,utils_1[G(0xf2)])(0x3e8*this[G(0xdc)]++),this[G(0xdc)]<0x5&&this[G(0xdb)](c);}else{const q=(0x0,utils_1[G(0x111)])(0x3e8*enums_1[G(0xf4)]*0x2*Math[G(0x109)]());this[G(0x117)]=q['timerId'],await q[G(0xf5)],this[G(0xdb)](c);}}[y(0x11d)](){const H=y;void 0x0!==this[H(0x117)]&&(clearTimeout(this[H(0x117)]),this['cleanupTimeout']=void 0x0);}async[y(0x114)](c){const I=y,d=await this['store'][I(0x10c)]();return d?.[c]?.[0x0];}async[y(0xe1)](d,f,g,h,j){const J=y,k=await this[J(0x114)](d);if(k){const m=k[J(0x106)][J(0xe4)][0x0]['expected'],p=pipe_1['Pipe']['resolve'](m,f),q=f[J(0x113)][J(0xed)],v=f[J(0x113)]['gid'],w={'topic':d,'resolved':p,'jobId':[k['to'],g,v,q][J(0x105)](key_1['WEBSEP']),'expire':h};return await this['store']['setHookSignal'](w,j),q;}throw new Error(J(0x10e));}async['processWebHookSignal'](d,f){const K=y,g=await this['getHookRule'](d);if(g){const h={'$self':{'hook':{'data':f}},'$hook':{'data':f}},j=g['conditions'][K(0xe4)][0x0]['actual'],k=pipe_1['Pipe'][K(0xf6)](j,h),m=await this[K(0xeb)][K(0xe5)](d,k);if(!m)return;const [p,q,v,...w]=m[K(0xe0)](key_1[K(0xfd)]);return[w[K(0x105)](key_1[K(0xfd)]),g['to'],q,v];}throw new Error(K(0xfe));}async[y(0xf0)](c,d){const L=y,f=await this[L(0x114)](c);if(f){const g={'$self':{'hook':{'data':d}},'$hook':{'data':d}},h=f['conditions'][L(0xe4)][0x0][L(0xf3)],j=pipe_1['Pipe'][L(0xf6)](h,g);return await this[L(0xeb)][L(0x108)](c,j);}throw new Error('signaler.process:error:\x20hook\x20rule\x20not\x20found');}}exports['TaskService']=TaskService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function b(c,d){const e=a();return b=function(f,g){f=f-0x169;let h=e[f];return h;},b(c,d);}const y=b;(function(c,d){const w=b,e=c();while(!![]){try{const f=-parseInt(w(0x1ab))/0x1+-parseInt(w(0x192))/0x2+parseInt(w(0x1be))/0x3*(parseInt(w(0x1a0))/0x4)+-parseInt(w(0x179))/0x5+-parseInt(w(0x176))/0x6*(parseInt(w(0x172))/0x7)+parseInt(w(0x1b2))/0x8*(-parseInt(w(0x1d1))/0x9)+parseInt(w(0x1d2))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x64e00));var __importDefault=this&&this['__importDefault']||function(c){const x=b;return c&&c[x(0x193)]?c:{'default':c};};Object[y(0x173)](exports,'__esModule',{'value':!0x0}),exports[y(0x16b)]=void 0x0;function a(){const a1=['toUpperCase','startActivitySpan','createNoopSpan','setActivityAttributes','topic','string','../../package.json','name','setAttributes','endActivitySpan','5031009ToamEB','17744960KESZRM','parent','trace','../mapper','getStreamSpanAttrs','TelemetryService','bindJobTelemetryToState','SYSTEM','reduce','WORKER','getJobParentSpanId','app.job.','876701YNHSHM','defineProperty','trc','JOB/','12CoFDuX','EXECUTE','version','1537720KzylQf','setActivityError','setStreamError','l1s','spanContext','type','setSpanContext','context','l2s','setJobAttributes','$self','StreamDataType','getTracer','app.stream.','app.activity.data.','../../types/stream','endStreamSpan','ERROR','trigger','config','traceId','HMSH_TELEMETRY','StreamRole','TRACE/','app.activity.','239772rWsXaM','__esModule','metadata','/output/metadata/l2s','jobSpan','debug','/output/metadata/','subscribes','number','FANOUT','keys','includes','telemetry','span','1588ndZXtO','traceActivity','end','SpanKind','spanId','push','SpanStatusCode','default','startSpan','signal','getTraceId','767138pviNDV','/output/metadata/l1s','hook','endSpan','output','bindActivityTelemetryToState','../../types/telemetry','8GJNWod','../../modules/enums','getSpanAttrs','MapperService','appId','spn','RESULT','active','CLIENT','boolean','setTelemetryContext','aid','4857hREGgy','addTargetTelemetryPaths','shouldCreateSpan','with','setStatus','endJobSpan','leg','getActivityParentSpanId','getParentSpanContext'];a=function(){return a1;};return a();}const package_json_1=__importDefault(require(y(0x1cd))),mapper_1=require(y(0x169)),stream_1=require(y(0x188)),telemetry_1=require(y(0x1b1)),enums_1=require(y(0x1b3));class TelemetryService{constructor(c,d,f,g){const z=y;this[z(0x1c4)]=0x1,this[z(0x1b6)]=c,this['config']=d,this[z(0x194)]=f,this[z(0x180)]=g;}['shouldCreateSpan'](){const A=y;return A(0x197)===enums_1[A(0x18e)]||A(0x18b)===this['config']?.[A(0x17e)]||'worker'===this['config']?.[A(0x17e)];}static['createNoopSpan'](c,d){return{'spanContext':()=>({'traceId':c,'spanId':d,'isRemote':!0x0,'traceFlags':0x1}),'addEvent'(f,g,h){return this;},'setAttribute'(f,g){return this;},'setAttributes'(f){return this;},'setStatus'(f){return this;},'updateName'(f){return this;},'end'(f){},'isRecording':()=>!0x1,'recordException'(f,g){}};}[y(0x170)](){const B=y;return this[B(0x180)][B(0x194)][B(0x1b7)];}[y(0x1c5)](c){const C=y;return 0x1===c?this[C(0x180)][this[C(0x18c)][C(0x1d3)]][C(0x1af)]?.['metadata']?.[C(0x181)]:this[C(0x180)]['$self'][C(0x1af)]?.[C(0x194)]?.[C(0x17c)];}[y(0x1aa)](){const D=y;return this[D(0x180)]['metadata'][D(0x174)];}['startJobSpan'](){const E=y,c=E(0x175)+this[E(0x1b6)]+'/'+this[E(0x18c)][E(0x199)]+'/1',d=this[E(0x1aa)](),f=this[E(0x170)](),g=this[E(0x1b4)](0x1),h=this['startSpan'](d,f,c,g);return this[E(0x196)]=h,this[E(0x1bc)](h,0x1),this;}static async[y(0x1a1)](c,f,g,h,j,k=0x0){const F=y,l=F(0x190)+c+'/'+g+'/'+k,m=telemetry_1[F(0x1d4)]['getTracer'](package_json_1[F(0x1a7)]['name'],package_json_1[F(0x1a7)][F(0x178)]),q={'traceId':h,'spanId':j,'isRemote':!0x0,'traceFlags':0x1},u=telemetry_1['trace'][F(0x17f)](telemetry_1[F(0x180)][F(0x1b9)](),q);return telemetry_1[F(0x180)][F(0x1c1)](u,()=>{const G=F,v=m[G(0x1a8)](l,{'kind':telemetry_1[G(0x1a3)][G(0x1ba)],'attributes':f});return v['setAttributes'](f),v[G(0x1a2)](),!0x0;});}[y(0x1c8)](c=this['leg']){const H=y,d=this['config'][H(0x17e)][H(0x1c7)]()+'/'+this[H(0x1b6)]+'/'+this[H(0x194)][H(0x1bd)]+'/'+c,f=this[H(0x1aa)](),g=this[H(0x1c5)](c),h=this[H(0x1b4)](c),j=this[H(0x1a8)](f,g,d,h);return this[H(0x19f)]=j,this[H(0x1bc)](j,c),this;}['startStreamSpan'](c,d){const I=y;let f;if(f=d===stream_1['StreamRole'][I(0x16d)]?I(0x16d):d===stream_1[I(0x18f)][I(0x16f)]?I(0x177):c[I(0x17e)]===stream_1[I(0x184)][I(0x1b8)]||c[I(0x17e)]===stream_1[I(0x184)]['RESPONSE']?'FANIN':I(0x19b),this[I(0x1c0)]()||I(0x177)===f||'SYSTEM'===f){const g=c[I(0x194)][I(0x1cb)]?'/'+c[I(0x194)][I(0x1cb)]:'',h=f+'/'+this[I(0x1b6)]+'/'+c[I(0x194)][I(0x1bd)]+g,i=this[I(0x16a)](c);this['span']=this[I(0x1a8)](c[I(0x194)]['trc'],c[I(0x194)][I(0x1b7)],h,i,!0x0);}else this[I(0x18d)]=c[I(0x194)][I(0x174)],this[I(0x1a4)]=c[I(0x194)][I(0x1b7)],this[I(0x19f)]=TelemetryService[I(0x1c9)](c[I(0x194)][I(0x174)],c[I(0x194)][I(0x1b7)]);return this;}['startSpan'](c,d,f,g,h=!0x1){const J=y;if(this['traceId']=c,this[J(0x1a4)]=d,h||this[J(0x1c0)]()){const i=telemetry_1[J(0x1d4)][J(0x185)](package_json_1['default'][J(0x1ce)],package_json_1[J(0x1a7)]['version']),j=this[J(0x1c6)]();return i['startSpan'](f,{'kind':telemetry_1['SpanKind'][J(0x1ba)],'attributes':g,'root':!j},j);}return TelemetryService[J(0x1c9)](c,d);}['mapActivityAttributes'](){const K=y;if(this[K(0x18c)]['telemetry']&&this['span']){const c=new mapper_1[(K(0x1b5))](this[K(0x18c)][K(0x19e)],this[K(0x180)])['mapRules'](),d={...Object['keys'](c)[K(0x16e)]((f,g)=>([K(0x1cc),K(0x1bb),K(0x19a)][K(0x19d)](typeof c[g])&&(f[K(0x187)+g]=c[g]),f),{})};this['span'][K(0x1cf)](d);}}[y(0x1ca)](c){const L=y;this[L(0x19f)]?.[L(0x1cf)](c);}['setStreamAttributes'](c){const M=y;this[M(0x19f)]?.[M(0x1cf)](c);}[y(0x182)](c){const N=y;this[N(0x196)]?.[N(0x1cf)](c);}[y(0x1c3)](){const O=y;this[O(0x1ae)](this[O(0x196)]);}[y(0x1d0)](){const P=y;this[P(0x1ae)](this['span']);}[y(0x189)](){const Q=y;this[Q(0x1ae)](this['span']);}[y(0x1ae)](c){const R=y;c&&c[R(0x1a2)]();}[y(0x1c6)](){const S=y;if(this[S(0x18d)]&&this[S(0x1a4)]){const c={'traceId':this[S(0x18d)],'spanId':this[S(0x1a4)],'isRemote':!0x0,'traceFlags':0x1};return telemetry_1[S(0x1d4)][S(0x17f)](telemetry_1['context'][S(0x1b9)](),c);}}['getSpanAttrs'](c){const T=y;return{...Object[T(0x19c)](this[T(0x180)]['metadata'])[T(0x16e)]((d,f)=>(T(0x174)!==f&&(d[T(0x171)+f]=this[T(0x180)][T(0x194)][f]),d),{}),...Object[T(0x19c)](this[T(0x194)])[T(0x16e)]((d,f)=>(d[T(0x191)+f]=this[T(0x194)][f],d),{}),'app.activity.leg':c};}[y(0x16a)](c){const U=y;return{...Object[U(0x19c)](c[U(0x194)])[U(0x16e)]((d,f)=>(U(0x174)!==f&&U(0x1b7)!==f&&(d[U(0x186)+f]=c['metadata'][f]),d),{})};}[y(0x1bc)](c,d){const V=y;this[V(0x180)][V(0x194)][V(0x174)]||(this['context'][V(0x194)][V(0x174)]=c['spanContext']()[V(0x18d)]),this['context'][V(0x183)]['output'][V(0x194)]||(this['context']['$self'][V(0x1af)][V(0x194)]={}),0x1===d?this[V(0x180)][V(0x183)][V(0x1af)][V(0x194)][V(0x17c)]=c[V(0x17d)]()[V(0x1a4)]:this[V(0x180)][V(0x183)]['output']['metadata']['l2s']=c[V(0x17d)]()[V(0x1a4)];}[y(0x17a)](c){const W=y;this['span']?.[W(0x1c2)]({'code':telemetry_1[W(0x1a6)]['ERROR'],'message':c});}[y(0x17b)](c){const X=y;this[X(0x19f)]?.[X(0x1c2)]({'code':telemetry_1[X(0x1a6)][X(0x18a)],'message':c});}static[y(0x1bf)](c,d,f,g){const Y=y;0x1===g?(d[Y(0x1d3)]in c||(c[d[Y(0x1d3)]]=[]),c[d[Y(0x1d3)]][Y(0x1a5)](d[Y(0x1d3)]+'/output/metadata/l2s')):(f[Y(0x1bd)]in c||(c[f['aid']]=[]),c[f[Y(0x1bd)]][Y(0x1a5)](f['aid']+Y(0x1ac)));}static[y(0x16c)](c,d,f){const Z=y;Z(0x18b)===d[Z(0x17e)]&&(c['metadata/trc']=f[Z(0x194)][Z(0x174)]);}static[y(0x1b0)](c,d,f,g,h){const a0=y;if(a0(0x18b)===d[a0(0x17e)])c[f[a0(0x1bd)]+a0(0x1ac)]=g[a0(0x183)]['output'][a0(0x194)]['l1s'],c[f[a0(0x1bd)]+a0(0x195)]=g['$self'][a0(0x1af)]['metadata']['l2s'];else{if(a0(0x1ad)===d['type']&&0x1===h)c[f[a0(0x1bd)]+a0(0x1ac)]=g[a0(0x183)][a0(0x1af)][a0(0x194)]['l1s'],c[f[a0(0x1bd)]+'/output/metadata/l2s']=g[a0(0x183)]['output'][a0(0x194)][a0(0x17c)];else{if(a0(0x1a9)===d['type']&&0x1===h)c[f[a0(0x1bd)]+a0(0x1ac)]=g[a0(0x183)][a0(0x1af)]['metadata']['l1s'],c[f[a0(0x1bd)]+'/output/metadata/l2s']=g[a0(0x183)][a0(0x1af)]['metadata']['l1s'];else{const i='l'+h+'s';c[f[a0(0x1bd)]+a0(0x198)+i]=g[a0(0x183)][a0(0x1af)]['metadata'][i];}}}}}exports['TelemetryService']=TelemetryService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const r=b;(function(c,d){const q=b,e=c();while(!![]){try{const f=-parseInt(q(
|
|
1
|
+
'use strict';function a(){const F=['store','isArray','rollCallInterval','defineProperty','initRouter','doRollCall','SubServiceFactory','guid','1089756ohnvKa','reclaimCount','../sub/factory','logger','subscriptionHandler','initSubChannel','router','appId','setThrottle','94764nuydeM','consumeMessages','max','ceil','HMSH_QUORUM_ROLLCALL_CYCLES','subscribe','originator','stop','WORKER','722010judZMi','identifyProvider','sayPong','initStreamChannel','interval','getThrottleRate','93270LSqRkH','279630CoFiWa','inited','stream','toString','ConnectorService','reclaimDelay','../../modules/utils','mintKey','STREAMS','topic','verifyWorkerFields','throttle','ping','cancelRollCall','StreamServiceFactory','../../modules/enums','pub','counts','96525LdHsts','signature','pong','__esModule','../stream/factory','config','type','callback','details','initClients','worker\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields\x20along\x20with\x20a\x20callback\x20function\x20and\x20topic.','namespace','init','306936XSbZdV','KeyType','QUORUM','WorkerService','initStoreChannel','worker-event-received','../connector/factory','reporting','formatISODate','StreamRole','random','StoreServiceFactory','../store/factory'];a=function(){return F;};return a();}const r=b;(function(c,d){const q=b,e=c();while(!![]){try{const f=-parseInt(q(0x1d9))/0x1+-parseInt(q(0x214))/0x2+-parseInt(q(0x213))/0x3+parseInt(q(0x1fb))/0x4+parseInt(q(0x20d))/0x5+-parseInt(q(0x204))/0x6+parseInt(q(0x1e6))/0x7;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x2b539));function b(c,d){const e=a();return b=function(f,g){f=f-0x1cb;let h=e[f];return h;},b(c,d);}Object[r(0x1f6)](exports,r(0x1dc),{'value':!0x0}),exports[r(0x1e9)]=void 0x0;const key_1=require('../../modules/key'),utils_1=require(r(0x1cd)),factory_1=require(r(0x1ec)),router_1=require('../router'),stream_1=require('../../types/stream'),enums_1=require(r(0x1d6)),factory_2=require(r(0x1dd)),factory_3=require(r(0x1fd)),factory_4=require(r(0x1f2));class WorkerService{constructor(){const s=r;this[s(0x1ed)]=!0x1;}static async['init'](c,d,f,g,h){const t=r,j=[];if(Array[t(0x1f4)](g['workers']))for(const k of g['workers']){await factory_1[t(0x1cb)][t(0x1e2)](k);const m=new WorkerService();m[t(0x1d1)](k),m[t(0x1e4)]=c,m[t(0x202)]=d,m[t(0x1fa)]=f,m[t(0x1e0)]=k['callback'],m['topic']=k['topic'],m[t(0x1de)]=g,m[t(0x1fe)]=h,await m['initStoreChannel'](m,k[t(0x1f3)]),await m[t(0x200)](m,k['sub'],k[t(0x1d7)]??k[t(0x1f3)]),await m[t(0x209)][t(0x209)](key_1[t(0x1e7)]['QUORUM'],m[t(0x1ff)](),d),await m[t(0x209)]['subscribe'](key_1[t(0x1e7)]['QUORUM'],m[t(0x1ff)](),d,m[t(0x1d0)]),await m[t(0x209)][t(0x209)](key_1[t(0x1e7)][t(0x1e8)],m[t(0x1ff)](),d,m[t(0x1fa)]),await m[t(0x210)](m,k[t(0x216)],k['store']),m[t(0x201)]=await m[t(0x1f7)](k,h);const p=m[t(0x1f3)][t(0x1ce)](key_1[t(0x1e7)][t(0x1cf)],{'appId':m[t(0x202)],'topic':k['topic']});await m[t(0x201)][t(0x205)](p,t(0x20c),m[t(0x1fa)],k[t(0x1e0)]),m[t(0x215)]=(0x0,utils_1[t(0x1ee)])(new Date()),j['push'](m);}return j;}[r(0x1d1)](c){const u=r;if(!((0x0,utils_1[u(0x20e)])(c[u(0x1f3)])&&(0x0,utils_1[u(0x20e)])(c[u(0x216)])&&(0x0,utils_1[u(0x20e)])(c['sub'])&&c['topic']&&c['callback']))throw new Error(u(0x1e3));}async[r(0x1ea)](c,d){const v=r;c[v(0x1f3)]=await factory_4[v(0x1f1)][v(0x1e5)](d,c[v(0x1e4)],c['appId'],c[v(0x1fe)]);}async[r(0x200)](c,d,f){const w=r;c[w(0x209)]=await factory_3[w(0x1f9)][w(0x1e5)](d,f,c[w(0x1e4)],c[w(0x202)],c[w(0x1fa)],c[w(0x1fe)]);}async[r(0x210)](c,d,f){const x=r;c[x(0x216)]=await factory_2[x(0x1d5)][x(0x1e5)](d,f,c[x(0x1e4)],c[x(0x202)],c[x(0x1fe)]);}async[r(0x1f7)](c,d){const y=r,f=await this['store'][y(0x212)](c[y(0x1d0)]);return new router_1['Router']({'namespace':this[y(0x1e4)],'appId':this[y(0x202)],'guid':this[y(0x1fa)],'role':stream_1[y(0x1ef)]['WORKER'],'topic':c[y(0x1d0)],'reclaimDelay':c[y(0x1cc)],'reclaimCount':c['reclaimCount'],'throttle':f},this['stream'],d);}[r(0x1ff)](){const c=this;return async(d,f)=>{const z=b;c['logger']['debug'](z(0x1eb),{'topic':d,'type':f['type']}),'throttle'===f[z(0x1df)]?null!==f[z(0x1d0)]&&c[z(0x1d2)](f[z(0x1d2)]):z(0x1d3)===f['type']?c[z(0x20f)](c[z(0x202)],c['guid'],f[z(0x20a)],f[z(0x1e1)]):'rollcall'===f[z(0x1df)]&&null!==f[z(0x1d0)]&&c[z(0x1f8)](f);};}async[r(0x1f8)](c){const A=r;let d=0x0;const f=isNaN(c[A(0x206)])?enums_1[A(0x208)]:c[A(0x206)];this[A(0x1f5)]&&clearTimeout(this[A(0x1f5)]);const g=c['interval']/0x2,h=g+Math[A(0x207)](Math[A(0x1f0)]()*g);do{if(await(0x0,utils_1['sleepFor'])(Math['ceil'](0x3e8*Math[A(0x1f0)]())),await this[A(0x20f)](this[A(0x202)],this['guid'],null,!0x0,c[A(0x1da)]),!c[A(0x211)])return;const {promise:j,timerId:k}=(0x0,utils_1['XSleepFor'])(0x3e8*h);this[A(0x1f5)]=k,await j;}while(this['rollCallInterval']&&d++<f-0x1);}[r(0x1d4)](){const B=r;this[B(0x1f5)]&&(clearTimeout(this[B(0x1f5)]),delete this['rollCallInterval']);}[r(0x20b)](){const C=r;this[C(0x1d4)]();}async[r(0x20f)](c,d,f,g=!0x1,h=!0x1){const D=r;let j;if(g){const k={'appId':this[D(0x202)],'topic':this[D(0x1d0)]};j={'engine_id':this[D(0x1fa)],'namespace':this[D(0x1e4)],'app_id':this[D(0x202)],'worker_topic':this['topic'],'stream':this[D(0x1f3)][D(0x1ce)](key_1[D(0x1e7)][D(0x1cf)],k),'counts':this[D(0x201)]?.[D(0x1d8)],'timestamp':(0x0,utils_1[D(0x1ee)])(new Date()),'inited':this[D(0x215)],'throttle':this[D(0x201)]?.['throttle'],'reclaimDelay':this[D(0x201)]?.['reclaimDelay'],'reclaimCount':this['router']?.[D(0x1fc)],'system':await(0x0,utils_1['getSystemHealth'])(),'signature':h?this['callback'][D(0x217)]():void 0x0};}this[D(0x209)]['publish'](key_1[D(0x1e7)]['QUORUM'],{'type':D(0x1db),'guid':d,'originator':f,'profile':j},c);}async[r(0x1d2)](c){const E=r;this[E(0x201)]?.[E(0x203)](c);}}exports[r(0x1e9)]=WorkerService;
|