UNPKG

@hotmeshio/hotmesh

Version:

Serverless Workflow

1 lines 2.66 kB
'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;