@hotmeshio/hotmesh 0.3.25 → 0.3.27

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 (79) hide show
  1. package/README.md +1 -1
  2. package/build/modules/enums.d.ts +1 -0
  3. package/build/modules/enums.js +2 -1
  4. package/build/modules/key.js +1 -1
  5. package/build/modules/utils.d.ts +0 -1
  6. package/build/modules/utils.js +1 -1
  7. package/build/package.json +2 -2
  8. package/build/services/activities/activity.js +1 -1
  9. package/build/services/activities/await.js +1 -1
  10. package/build/services/activities/cycle.js +1 -1
  11. package/build/services/activities/hook.js +1 -1
  12. package/build/services/activities/index.js +1 -1
  13. package/build/services/activities/interrupt.js +1 -1
  14. package/build/services/activities/signal.js +1 -1
  15. package/build/services/activities/trigger.js +1 -1
  16. package/build/services/activities/worker.js +1 -1
  17. package/build/services/collator/index.js +1 -1
  18. package/build/services/compiler/deployer.js +1 -1
  19. package/build/services/compiler/index.js +1 -1
  20. package/build/services/compiler/validator.js +1 -1
  21. package/build/services/connector/providers/nats.js +1 -1
  22. package/build/services/connector/providers/postgres.js +1 -1
  23. package/build/services/engine/index.js +1 -1
  24. package/build/services/exporter/index.js +1 -1
  25. package/build/services/logger/index.d.ts +0 -1
  26. package/build/services/logger/index.js +21 -39
  27. package/build/services/mapper/index.js +1 -1
  28. package/build/services/meshcall/index.js +2 -2
  29. package/build/services/meshflow/client.js +3 -3
  30. package/build/services/meshflow/exporter.js +1 -1
  31. package/build/services/meshflow/search.js +4 -4
  32. package/build/services/pipe/functions/array.js +1 -1
  33. package/build/services/pipe/functions/bitwise.js +1 -1
  34. package/build/services/pipe/functions/conditional.js +1 -1
  35. package/build/services/pipe/functions/cron.js +1 -1
  36. package/build/services/pipe/functions/date.js +1 -1
  37. package/build/services/pipe/functions/index.js +1 -1
  38. package/build/services/pipe/functions/json.js +1 -1
  39. package/build/services/pipe/functions/logical.js +1 -1
  40. package/build/services/pipe/functions/math.js +1 -1
  41. package/build/services/pipe/functions/number.js +1 -1
  42. package/build/services/pipe/functions/object.js +1 -1
  43. package/build/services/pipe/functions/string.js +1 -1
  44. package/build/services/pipe/functions/symbol.js +1 -1
  45. package/build/services/pipe/functions/unary.js +1 -1
  46. package/build/services/pipe/index.js +1 -1
  47. package/build/services/quorum/index.js +1 -1
  48. package/build/services/reporter/index.js +1 -1
  49. package/build/services/router/index.js +1 -1
  50. package/build/services/search/providers/postgres/postgres.js +1 -1
  51. package/build/services/search/providers/redis/ioredis.js +1 -1
  52. package/build/services/search/providers/redis/redis.js +1 -1
  53. package/build/services/serializer/index.js +1 -1
  54. package/build/services/store/providers/postgres/kvsql.js +1 -1
  55. package/build/services/store/providers/postgres/kvtables.js +1 -1
  56. package/build/services/store/providers/postgres/kvtransaction.js +1 -1
  57. package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
  58. package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
  59. package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
  60. package/build/services/store/providers/postgres/kvtypes/zset.js +1 -1
  61. package/build/services/store/providers/postgres/postgres.js +1 -1
  62. package/build/services/store/providers/redis/_base.js +1 -1
  63. package/build/services/store/providers/redis/ioredis.js +1 -1
  64. package/build/services/store/providers/redis/redis.js +1 -1
  65. package/build/services/store/providers/store-initializable.js +1 -1
  66. package/build/services/stream/providers/nats/nats.js +1 -1
  67. package/build/services/stream/providers/postgres/postgres.js +1 -1
  68. package/build/services/stream/providers/redis/ioredis.js +1 -1
  69. package/build/services/stream/providers/redis/redis.js +1 -1
  70. package/build/services/stream/providers/stream-initializable.js +1 -1
  71. package/build/services/sub/providers/nats/nats.js +1 -1
  72. package/build/services/sub/providers/postgres/postgres.js +1 -1
  73. package/build/services/sub/providers/redis/ioredis.js +1 -1
  74. package/build/services/sub/providers/redis/redis.js +1 -1
  75. package/build/services/task/index.js +1 -1
  76. package/build/services/telemetry/index.d.ts +2 -0
  77. package/build/services/telemetry/index.js +1 -1
  78. package/build/services/worker/index.js +1 -1
  79. package/package.json +2 -2
@@ -1 +1 @@
1
- 'use strict';const n=b;(function(c,d){const m=b,e=c();while(!![]){try{const f=-parseInt(m(0x164))/0x1+parseInt(m(0x167))/0x2+-parseInt(m(0x147))/0x3+-parseInt(m(0x180))/0x4*(parseInt(m(0x161))/0x5)+parseInt(m(0x186))/0x6+parseInt(m(0x174))/0x7*(parseInt(m(0x18a))/0x8)+parseInt(m(0x18e))/0x9;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x4b789));Object[n(0x16c)](exports,'__esModule',{'value':!![]}),exports['IORedisStreamService']=void 0x0;const index_1=require(n(0x141)),utils_1=require(n(0x17c)),key_1=require(n(0x15a)),enums_1=require(n(0x15d));class IORedisStreamService extends index_1[n(0x153)]{constructor(c,d,e={}){super(c,d,e);}async['init'](c,d,e){const o=n;this[o(0x145)]=c,this[o(0x146)]=e,this[o(0x13e)]=d;}[n(0x14a)](c,d){const p=n;if(!this[p(0x145)])throw new Error(p(0x142));return key_1[p(0x178)]['mintKey'](this[p(0x145)],c,{...d,'appId':this[p(0x13e)]});}[n(0x159)](){const q=n;return this[q(0x140)][q(0x16d)]();}async['createStream'](c){const r=n;try{const d=await this[r(0x140)][r(0x155)](c,'*','field',r(0x171));return await this['streamClient'][r(0x160)](c,d),!![];}catch(e){this[r(0x146)][r(0x170)]('Error\x20creating\x20stream\x20'+c,{...e});throw e;}}async[n(0x189)](c){const s=n;try{const d=await this['streamClient'][s(0x14d)](c);return d>0x0;}catch(e){this['logger'][s(0x170)](s(0x17e)+c,{...e});throw e;}}async[n(0x191)](c,d){const t=n;try{return await this['storeClient'][t(0x16b)]('CREATE',c,d,'$',t(0x176))==='OK';}catch(e){this[t(0x146)]['debug']('stream-mkstream-caught',{'key':c,'group':d});throw e;}}async[n(0x14e)](c,d){const u=n;try{const e=await this['streamClient'][u(0x16b)](u(0x185),c,d);return e===0x1;}catch(f){this[u(0x146)][u(0x170)]('Error\x20deleting\x20consumer\x20group\x20'+d+u(0x17a)+c,{...f});throw f;}}async[n(0x175)](c,d,e){const v=n;try{const f=e?.['transaction']||d[v(0x150)]>0x1&&this[v(0x188)][v(0x16d)]();let g;for(const h of d){g=await(f||this[v(0x188)])[v(0x155)](c,'*',v(0x166),h);}return f&&!e?.[v(0x18f)]?(await f[v(0x15b)]())[v(0x157)](i=>i[0x1]):[g];}catch(i){this[v(0x146)]['error'](v(0x187)+c,{...i});throw i;}}async[n(0x151)](c,d,e,f){const w=n;try{const g=await this[w(0x140)][w(0x183)](w(0x17d),d,e,w(0x14c),f?.[w(0x156)]??enums_1[w(0x143)],w(0x15e),c,'>'),h=[];if((0x0,utils_1[w(0x181)])(g)){const [[,i]]=g;for(const [j,k]of i){h['push']({'id':j,'data':(0x0,utils_1[w(0x148)])(k[0x1])});}}else return[];return h;}catch(l){this['logger']['error']('Error\x20consuming\x20messages\x20from\x20'+c,{'error':l});throw l;}}async['ackAndDelete'](c,d,e){const x=n,f=this[x(0x188)][x(0x16d)]();return this[x(0x177)](c,d,e,{'multi':f}),this[x(0x14b)](c,d,e,{'multi':f}),await f['exec'](),e[x(0x150)];}async[n(0x177)](c,d,e,f){const y=n;try{return f?.[y(0x16d)]?(f[y(0x16d)]['xack'](c,d,...e),f['multi']):await this['streamClient'][y(0x165)](c,d,...e);}catch(g){this[y(0x146)][y(0x170)](y(0x172)+e+y(0x179)+d+'\x20for\x20key:\x20'+c,{...g});throw g;}}async[n(0x14b)](c,d,e,f){const z=n;try{return f?.[z(0x16d)]?(f[z(0x16d)][z(0x160)](c,...e),f[z(0x16d)]):await this[z(0x140)][z(0x160)](c,...e);}catch(g){this[z(0x146)][z(0x170)]('Error\x20in\x20deleting\x20messages:\x20'+e+z(0x17b)+c,{...g});throw g;}}async[n(0x15f)](c,d,e,f){const A=n,g='-',h='+';try{const i=[c,d];if(g)i[A(0x18b)](g);if(h)i[A(0x18b)](h);if(e!==undefined)i[A(0x18b)](e['toString']());if(f)i[A(0x18b)](f);try{return await this[A(0x140)]['call'](A(0x149),...i);}catch(j){this[A(0x146)]['error']('err,\x20args',{...j},i);}}catch(k){this[A(0x146)]['error']('Error\x20in\x20retrieving\x20pending\x20messages\x20for\x20[stream\x20'+c+'],\x20[group\x20'+d+']',{...k});throw k;}}async['retryMessages'](c,d,e){const B=n;let f=[];const g=await this['getPendingMessages'](c,d,e?.['limit']);for(const h of g){if(Array[B(0x18c)](h)){const [i,,j,k]=h;if(j>e?.[B(0x13f)]){const l=await this[B(0x18d)](c,d,e?.[B(0x158)],e?.[B(0x13f)],i);f=f[B(0x17f)](l);}}}return f;}async[n(0x18d)](c,d,e,f,g,...h){const C=n;try{const i=await this['streamClient'][C(0x144)](c,d,e,f,g,...h);return{'id':i[0x0][0x0],'data':(0x0,utils_1['parseStreamMessage'])(i[0x0][0x1][0x1])};}catch(j){this[C(0x146)][C(0x170)](C(0x163)+g+C(0x16a)+d+'\x20for\x20key:\x20'+c,{...j});throw j;}}async[n(0x16e)](c){const D=n;return{'messageCount':await this[D(0x154)](c)};}async[n(0x154)](c,d){const E=n;try{if(d?.[E(0x16d)])return d[E(0x16d)]['xlen'](c),0x0;const e=await this[E(0x140)]['xlen'](c);return e;}catch(f){this['logger'][E(0x170)](E(0x15c)+c,{...f});throw f;}}async[n(0x152)](c){const F=n,d=this[F(0x188)][F(0x16d)](),e=new Map();c['forEach'](h=>{const G=F;!e[G(0x16f)](h[G(0x169)])&&(e[G(0x173)](h[G(0x169)],-0x1),this[G(0x154)](h['stream'],{'multi':d}));});const f=await d[F(0x15b)]();Array[F(0x184)](e[F(0x168)]())[F(0x182)]((h,i)=>{e['set'](h,f[i][0x1]);});const g=c[F(0x157)](h=>{const H=F;return{'stream':h['stream'],'depth':e[H(0x14f)](h['stream'])||0x0};});return g;}async['trimStream'](c,d){return 0x0;}[n(0x162)](){return{'supportsBatching':!![],'supportsDeadLetterQueue':![],'supportsOrdering':!![],'supportsTrimming':!![],'supportsRetry':!![],'maxMessageSize':0x200*0x400*0x400,'maxBatchSize':0x3e8};}}exports[n(0x190)]=IORedisStreamService;function b(c,d){const e=a();return b=function(f,g){f=f-0x13e;let h=e[f];return h;},b(c,d);}function a(){const I=['xclaim','namespace','logger','1438065beMmzk','parseStreamMessage','XPENDING','mintKey','deleteMessages','BLOCK','del','deleteConsumerGroup','get','length','consumeMessages','getStreamDepths','StreamService','getStreamDepth','xadd','blockTimeout','map','consumerName','transact','../../../../modules/key','exec','Error\x20getting\x20depth\x20for\x20','../../../../modules/enums','STREAMS','getPendingMessages','xdel','67030nMOoTO','getProviderSpecificFeatures','Error\x20in\x20claiming\x20message\x20with\x20id:\x20','201177UCtofb','xack','message','399726yNzAmn','keys','stream','\x20in\x20group:\x20','xgroup','defineProperty','multi','getStreamStats','has','error','value','Error\x20in\x20acknowledging\x20messages:\x20[','set','14413kZanMJ','publishMessages','MKSTREAM','acknowledgeMessages','KeyService',']\x20in\x20group:\x20','\x20for\x20stream\x20','\x20for\x20key:\x20','../../../../modules/utils','GROUP','Error\x20deleting\x20stream\x20','concat','4eMloAP','isStreamMessage','forEach','xreadgroup','from','DESTROY','626676OVonwz','ioredis-xadd-error\x20key:\x20','storeClient','deleteStream','824VrCThZ','push','isArray','claimMessage','4380129HDMjwU','transaction','IORedisStreamService','createConsumerGroup','appId','minIdleTime','streamClient','../../index','namespace\x20not\x20set','HMSH_BLOCK_TIME_MS'];a=function(){return I;};return a();}
1
+ 'use strict';const n=b;(function(c,d){const m=b,e=c();while(!![]){try{const f=-parseInt(m(0x11a))/0x1*(parseInt(m(0x148))/0x2)+parseInt(m(0x134))/0x3*(parseInt(m(0x153))/0x4)+parseInt(m(0x108))/0x5*(-parseInt(m(0x127))/0x6)+-parseInt(m(0x137))/0x7+-parseInt(m(0x117))/0x8+-parseInt(m(0x15a))/0x9*(-parseInt(m(0x126))/0xa)+parseInt(m(0x114))/0xb;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x50968));Object[n(0x12a)](exports,n(0x156),{'value':!![]}),exports[n(0x13e)]=void 0x0;const index_1=require(n(0x130)),utils_1=require('../../../../modules/utils'),key_1=require(n(0x11e)),enums_1=require(n(0x10f));class IORedisStreamService extends index_1['StreamService']{constructor(c,d,e={}){super(c,d,e);}async['init'](c,d,e){const o=n;this[o(0x11c)]=c,this[o(0x109)]=e,this['appId']=d;}[n(0x150)](c,d){const p=n;if(!this[p(0x11c)])throw new Error(p(0x142));return key_1[p(0x132)][p(0x150)](this['namespace'],c,{...d,'appId':this[p(0x13c)]});}['transact'](){const q=n;return this[q(0x128)][q(0x11d)]();}async['createStream'](c){const r=n;try{const d=await this[r(0x128)]['xadd'](c,'*',r(0x141),r(0x10e));return await this[r(0x128)]['xdel'](c,d),!![];}catch(e){this['logger'][r(0x129)](r(0x159)+c,{'error':e});throw e;}}async[n(0x146)](c){const s=n;try{const d=await this['streamClient'][s(0x119)](c);return d>0x0;}catch(e){this[s(0x109)][s(0x129)](s(0x10a)+c,{'error':e});throw e;}}async[n(0x10c)](c,d){const t=n;try{return await this[t(0x157)]['xgroup'](t(0x13a),c,d,'$',t(0x111))==='OK';}catch(e){this[t(0x109)]['debug']('stream-mkstream-caught',{'key':c,'group':d});throw e;}}async[n(0x116)](c,d){const u=n;try{const e=await this['streamClient'][u(0x13d)](u(0x13f),c,d);return e===0x1;}catch(f){this[u(0x109)][u(0x129)]('Error\x20deleting\x20consumer\x20group\x20'+d+u(0x14e)+c,{'error':f});throw f;}}async['publishMessages'](c,d,e){const v=n;try{const f=e?.[v(0x14c)]||d[v(0x113)]>0x1&&this[v(0x157)]['multi']();let g;for(const h of d){g=await(f||this[v(0x157)])['xadd'](c,'*',v(0x143),h);}return f&&!e?.[v(0x14c)]?(await f[v(0x147)]())['map'](i=>i[0x1]):[g];}catch(i){this[v(0x109)]['error']('ioredis-xadd-error\x20key:\x20'+c,{'error':i});throw i;}}async[n(0x124)](c,d,e,f){const w=n;try{const g=await this['streamClient'][w(0x120)](w(0x135),d,e,'BLOCK',f?.['blockTimeout']??enums_1[w(0x144)],w(0x121),c,'>'),h=[];if((0x0,utils_1[w(0x155)])(g)){const [[,i]]=g;for(const [j,k]of i){h[w(0x12b)]({'id':j,'data':(0x0,utils_1[w(0x136)])(k[0x1])});}}else return[];return h;}catch(l){this['logger']['error'](w(0x152)+c,{'error':l});throw l;}}async[n(0x10d)](c,d,e){const x=n,f=this[x(0x157)]['multi']();return this['acknowledgeMessages'](c,d,e,{'multi':f}),this['deleteMessages'](c,d,e,{'multi':f}),await f['exec'](),e['length'];}async[n(0x139)](c,d,e,f){const y=n;try{return f?.[y(0x11d)]?(f[y(0x11d)][y(0x133)](c,d,...e),f['multi']):await this[y(0x128)][y(0x133)](c,d,...e);}catch(g){this[y(0x109)][y(0x129)](y(0x12f)+e+y(0x138)+d+y(0x115)+c,{'error':g});throw g;}}async[n(0x14f)](c,d,e,f){const z=n;try{return f?.[z(0x11d)]?(f['multi'][z(0x11f)](c,...e),f['multi']):await this[z(0x128)][z(0x11f)](c,...e);}catch(g){this[z(0x109)]['error'](z(0x123)+e+'\x20for\x20key:\x20'+c,{'error':g});throw g;}}async[n(0x110)](c,d,e,f){const A=n,g='-',h='+';try{const i=[c,d];if(g)i[A(0x12b)](g);if(h)i[A(0x12b)](h);if(e!==undefined)i[A(0x12b)](e[A(0x151)]());if(f)i[A(0x12b)](f);try{return await this[A(0x128)][A(0x158)](A(0x122),...i);}catch(j){this[A(0x109)][A(0x129)](A(0x13b),{'error':j},i);}}catch(k){this[A(0x109)][A(0x129)](A(0x140)+c+'],\x20[group\x20'+d+']',{'error':k});throw k;}}async['retryMessages'](c,d,e){const B=n;let f=[];const g=await this[B(0x110)](c,d,e?.[B(0x11b)]);for(const h of g){if(Array[B(0x145)](h)){const [i,,j,k]=h;if(j>e?.[B(0x12c)]){const l=await this['claimMessage'](c,d,e?.['consumerName'],e?.['minIdleTime'],i);f=f[B(0x149)](l);}}}return f;}async[n(0x125)](c,d,e,f,g,...h){const C=n;try{const i=await this[C(0x128)]['xclaim'](c,d,e,f,g,...h);return{'id':i[0x0][0x0],'data':(0x0,utils_1[C(0x136)])(i[0x0][0x1][0x1])};}catch(j){this[C(0x109)]['error'](C(0x154)+g+'\x20in\x20group:\x20'+d+C(0x115)+c,{'error':j});throw j;}}async['getStreamStats'](c){const D=n;return{'messageCount':await this[D(0x107)](c)};}async[n(0x107)](c,d){const E=n;try{if(d?.[E(0x11d)])return d['multi'][E(0x131)](c),0x0;const e=await this['streamClient'][E(0x131)](c);return e;}catch(f){this[E(0x109)][E(0x129)]('Error\x20getting\x20depth\x20for\x20'+c,{'error':f});throw f;}}async[n(0x12d)](c){const G=n,d=this['storeClient']['multi'](),e=new Map();c['forEach'](h=>{const F=b;!e['has'](h[F(0x10b)])&&(e[F(0x12e)](h[F(0x10b)],-0x1),this[F(0x107)](h[F(0x10b)],{'multi':d}));});const f=await d[G(0x147)]();Array[G(0x112)](e[G(0x14b)]())['forEach']((h,i)=>{e['set'](h,f[i][0x1]);});const g=c[G(0x14d)](h=>{const H=G;return{'stream':h[H(0x10b)],'depth':e[H(0x118)](h['stream'])||0x0};});return g;}async[n(0x14a)](c,d){return 0x0;}['getProviderSpecificFeatures'](){return{'supportsBatching':!![],'supportsDeadLetterQueue':![],'supportsOrdering':!![],'supportsTrimming':!![],'supportsRetry':!![],'maxMessageSize':0x200*0x400*0x400,'maxBatchSize':0x3e8};}}function b(c,d){const e=a();return b=function(f,g){f=f-0x107;let h=e[f];return h;},b(c,d);}exports[n(0x13e)]=IORedisStreamService;function a(){const I=['getPendingMessages','MKSTREAM','from','length','9192810Pahegf','\x20for\x20key:\x20','deleteConsumerGroup','2875464dihMDu','get','del','40ChUoca','limit','namespace','multi','../../../../modules/key','xdel','xreadgroup','STREAMS','XPENDING','Error\x20in\x20deleting\x20messages:\x20','consumeMessages','claimMessage','10cMVJzJ','6LgnvPM','streamClient','error','defineProperty','push','minIdleTime','getStreamDepths','set','Error\x20in\x20acknowledging\x20messages:\x20[','../../index','xlen','KeyService','xack','39426EmNWym','GROUP','parseStreamMessage','1459255HnKGZv',']\x20in\x20group:\x20','acknowledgeMessages','CREATE','err,\x20args','appId','xgroup','IORedisStreamService','DESTROY','Error\x20in\x20retrieving\x20pending\x20messages\x20for\x20[stream\x20','field','namespace\x20not\x20set','message','HMSH_BLOCK_TIME_MS','isArray','deleteStream','exec','1998EPCzQG','concat','trimStream','keys','transaction','map','\x20for\x20stream\x20','deleteMessages','mintKey','toString','Error\x20consuming\x20messages\x20from\x20','64HSHCEZ','Error\x20in\x20claiming\x20message\x20with\x20id:\x20','isStreamMessage','__esModule','storeClient','call','Error\x20creating\x20stream\x20','1430658kelBWe','getStreamDepth','1334990FOuQzv','logger','Error\x20deleting\x20stream\x20','stream','createConsumerGroup','ackAndDelete','value','../../../../modules/enums'];a=function(){return I;};return a();}
@@ -1 +1 @@
1
- 'use strict';const r=b;function b(c,d){const e=a();return b=function(f,g){f=f-0x1da;let h=e[f];return h;},b(c,d);}(function(c,d){const q=b,e=c();while(!![]){try{const f=-parseInt(q(0x1dd))/0x1+-parseInt(q(0x214))/0x2*(-parseInt(q(0x1f6))/0x3)+-parseInt(q(0x222))/0x4+parseInt(q(0x21d))/0x5+parseInt(q(0x1f8))/0x6*(-parseInt(q(0x1ff))/0x7)+-parseInt(q(0x1e9))/0x8*(parseInt(q(0x211))/0x9)+parseInt(q(0x1f1))/0xa*(parseInt(q(0x218))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x7fc43));function a(){const M=['HMSH_BLOCK_TIME_MS','CREATE','620548VDAJWB','getStreamStats','XADD','join','push','XCLAIM','\x20and\x20group:\x20','namespace\x20not\x20set','isArray','namespace','../../../../modules/enums','xDel','error','GROUP','\x20in\x20key:\x20','multi','keys','Error\x20deleting\x20stream\x20','137851OAkQyF','StreamService','value','XREADGROUP','toString','XPENDING','XGROUP','init','deleteConsumerGroup','length','acknowledgeMessages','defineProperty','904IeeOME','parseStreamMessage','exec','transaction','blockTimeout','ioredis-xadd-error\x20key:\x20','minIdleTime','../../../../modules/utils','10ipcdur','BLOCK','consumeMessages','x-group-error\x20','XACK','47643xrsDny','isStreamMessage','18294JCYJri','limit','forEach','Error\x20creating\x20stream\x20','Error\x20in\x20deleting\x20messages\x20with\x20ids:\x20','../../../../modules/key','RedisStreamService','273THoUZl','getStreamDepth','../../index','createStream','XDEL','getProviderSpecificFeatures','publishMessages','storeClient','mintKey','__esModule','map','stream','Error\x20in\x20claiming\x20message\x20with\x20id:\x20','Error\x20in\x20acknowledging\x20messages\x20in\x20group:\x20','with\x20MKSTREAM','MKSTREAM','getPendingMessages','deleteMessages','74025beJDTf','sendCommand','transact','128lDiqJJ','set','streamClient','trimStream','1156474yVXROq','\x20for\x20key:\x20','appId','logger','retryMessages','3715685hvDLTz','error,\x20args','claimMessage'];a=function(){return M;};return a();}Object[r(0x1e8)](exports,r(0x208),{'value':!![]}),exports[r(0x1fe)]=void 0x0;const index_1=require(r(0x201)),utils_1=require(r(0x1f0)),key_1=require(r(0x1fd)),enums_1=require(r(0x22c));class RedisStreamService extends index_1[r(0x1de)]{constructor(c,d,e={}){super(c,d,e);}async[r(0x1e4)](c,d,e){const s=r;this[s(0x22b)]=c,this[s(0x21b)]=e,this[s(0x21a)]=d;}[r(0x207)](c,d){const t=r;if(!this[t(0x22b)])throw new Error(t(0x229));return key_1['KeyService'][t(0x207)](this['namespace'],c,{...d,'appId':this[t(0x21a)]});}[r(0x213)](){const u=r;return this[u(0x216)][u(0x1da)]();}async[r(0x202)](c){const v=r;try{const d=await this['streamClient'][v(0x224)](c,'*',{'field':v(0x1df)});return await this[v(0x216)][v(0x203)](c,d),!![];}catch(e){this['logger'][v(0x22e)](v(0x1fb)+c,{...e});throw e;}}async['deleteStream'](c){const w=r;try{const d=await this[w(0x216)]['DEL'](c);return d>0x0;}catch(e){this['logger']['error'](w(0x1dc)+c,{...e});throw e;}}async['createConsumerGroup'](c,d){const x=r;try{const e=await this[x(0x206)][x(0x212)]([x(0x1e3),x(0x221),c,d,'$',x(0x20e)]);return e==='OK';}catch(f){const g=x(0x20d);this[x(0x21b)]['debug'](x(0x1f4)+g+x(0x219)+c+x(0x228)+d,{...f});throw f;}}async[r(0x1e5)](c,d){const y=r;try{const e=await this[y(0x216)]['xGroupDestroy'](c,d);return e;}catch(f){this[y(0x21b)][y(0x22e)]('Error\x20deleting\x20consumer\x20group\x20'+d+'\x20for\x20stream\x20'+c,{...f});throw f;}}async[r(0x205)](c,d,e){const z=r;try{const f=e?.[z(0x1ec)]||d[z(0x1e6)]>0x1&&this['storeClient'][z(0x1da)]();let g;for(const h of d){g=await(f||this['storeClient'])[z(0x224)](c,'*',{'message':h});}return f&&!e?.[z(0x1ec)]?(await f['exec']())['map'](i=>i[0x1]):[g];}catch(i){this[z(0x21b)]['error'](z(0x1ee)+c,{...i});throw i;}}async[r(0x1f3)](c,d,e,f){const A=r,g=A(0x22f),h=A(0x1f2),i='STREAMS',j='>';try{const k=await this[A(0x216)][A(0x212)]([A(0x1e0),g,d,e,h,f?.[A(0x1ed)]?.[A(0x1e1)]()??enums_1[A(0x220)][A(0x1e1)](),i,c,j]),l=[];if((0x0,utils_1[A(0x1f7)])(k)){const [[,m]]=k;for(const [n,o]of m){l['push']({'id':n,'data':(0x0,utils_1[A(0x1ea)])(o[0x1])});}}else return[];return l;}catch(p){this[A(0x21b)][A(0x22e)]('Error\x20consuming\x20messages\x20from\x20'+c,{'error':p});throw p;}}async['ackAndDelete'](c,d,e){const B=r,f=this[B(0x206)][B(0x1da)]();return await this[B(0x1e7)](c,d,e,{'multi':f}),await this[B(0x210)](c,d,e,{'multi':f}),await f[B(0x1eb)](),e[B(0x1e6)];}async['acknowledgeMessages'](c,d,e,f){const C=r;try{return f?.[C(0x1da)]?(f['multi'][C(0x1f5)](c,d,e),f[C(0x1da)]):await this['streamClient'][C(0x1f5)](c,d,...e);}catch(g){this[C(0x21b)][C(0x22e)](C(0x20c)+d+C(0x219)+c,{...g});throw g;}}async['deleteMessages'](c,d,e,f){const D=r;try{return f?.[D(0x1da)]?(f[D(0x1da)][D(0x22d)](c,e),f[D(0x1da)]):await this[D(0x216)]['XDEL'](c,...e);}catch(g){this[D(0x21b)]['error'](D(0x1fc)+e[D(0x225)](',')+D(0x219)+c,{...g});throw g;}}async[r(0x20f)](c,d,e,f){const E=r;try{const g='-',h='+',i=[c,d];if(g)i[E(0x226)](g);if(h)i[E(0x226)](h);if(e!==undefined)i[E(0x226)](e['toString']());if(f)i[E(0x226)](f);try{return await this[E(0x216)][E(0x212)]([E(0x1e2),...i]);}catch(j){this[E(0x21b)][E(0x22e)](E(0x21e),{...j},i);}}catch(k){this[E(0x21b)][E(0x22e)]('Error\x20retrieving\x20pending\x20messages\x20for\x20group:\x20'+d+E(0x230)+c,{...k});throw k;}}async[r(0x21c)](c,d,e){const F=r;let f=[];const g=await this[F(0x20f)](c,d,e?.[F(0x1f9)]);for(const h of g){if(Array[F(0x22a)](h)){const [i,,j,k]=h;if(j>e?.[F(0x1ef)]){const l=await this[F(0x21f)](c,d,e?.['consumerName'],e?.[F(0x1ef)],i);f=f['concat'](l);}}}return f;}async[r(0x21f)](c,d,e,f,g,...h){const G=r;try{const i=await this[G(0x216)][G(0x212)]([G(0x227),c,d,e,f[G(0x1e1)](),g,...h]);return{'id':i[0x0][0x0],'data':(0x0,utils_1[G(0x1ea)])(i[0x0][0x1][0x1])};}catch(j){this[G(0x21b)][G(0x22e)](G(0x20b)+g+'\x20in\x20group:\x20'+d+G(0x219)+c,{...j});throw j;}}async[r(0x223)](c){const H=r;return{'messageCount':await this[H(0x200)](c)};}async['getStreamDepth'](c,d){const I=r;try{if(d?.[I(0x1da)])return d['multi']['XLEN'](c),0x0;const e=await this[I(0x216)]['XLEN'](c);return e;}catch(f){this[I(0x21b)][I(0x22e)]('Error\x20getting\x20depth\x20for\x20'+c,{...f});throw f;}}async['getStreamDepths'](c){const J=r,d=this['storeClient']['multi'](),e=new Map();c[J(0x1fa)](g=>{const K=J;!e['has'](g[K(0x20a)])&&(e[K(0x215)](g[K(0x20a)],-0x1),this[K(0x200)](g[K(0x20a)],{'multi':d}));});const f=await d['exec']();return Array['from'](e[J(0x1db)]())[J(0x1fa)]((g,h)=>{e['set'](g,f[h]);}),c[J(0x209)](g=>{const L=J;return{'stream':g[L(0x20a)],'depth':e['get'](g[L(0x20a)])||0x0};});}async[r(0x217)](c,d){return 0x0;}[r(0x204)](){return{'supportsBatching':!![],'supportsDeadLetterQueue':![],'supportsOrdering':!![],'supportsTrimming':!![],'supportsRetry':!![],'maxMessageSize':0x200*0x400*0x400,'maxBatchSize':0x3e8};}}exports[r(0x1fe)]=RedisStreamService;
1
+ 'use strict';const r=b;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(c,d){const q=b,e=c();while(!![]){try{const f=parseInt(q(0xdb))/0x1*(parseInt(q(0xf1))/0x2)+-parseInt(q(0xea))/0x3*(parseInt(q(0xda))/0x4)+parseInt(q(0xfc))/0x5*(-parseInt(q(0xe4))/0x6)+parseInt(q(0xad))/0x7*(-parseInt(q(0xc5))/0x8)+-parseInt(q(0xfb))/0x9+parseInt(q(0xbd))/0xa+-parseInt(q(0xc8))/0xb*(-parseInt(q(0xbb))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x1d7b9));function a(){const N=['Error\x20deleting\x20stream\x20','streamClient','trimStream','300qvodkk','Error\x20in\x20deleting\x20messages\x20with\x20ids:\x20','1328280itvLzx','exec','defineProperty','deleteConsumerGroup','getStreamDepth','namespace\x20not\x20set','KeyService','\x20for\x20stream\x20','3176VFNSup','xDel','get','239591bXDcBp','map','join','MKSTREAM','Error\x20getting\x20depth\x20for\x20','deleteMessages','../../../../modules/enums','from','\x20for\x20key:\x20','error','appId','stream','Error\x20consuming\x20messages\x20from\x20','limit','getStreamDepths','XGROUP','consumeMessages','xGroupDestroy','36Sgdxlh','254PuuMXY','../../../../modules/utils','STREAMS','getProviderSpecificFeatures','set','Error\x20in\x20claiming\x20message\x20with\x20id:\x20','error,\x20args','keys','push','831114xqjkYS','XCLAIM','\x20in\x20group:\x20','acknowledgeMessages','deleteStream','length','54123qAtAcX','createStream','BLOCK','consumerName','HMSH_BLOCK_TIME_MS','ioredis-xadd-error\x20key:\x20','XLEN','14YRpluE','StreamService','has','transact','XADD','ackAndDelete','getStreamStats','Error\x20in\x20acknowledging\x20messages\x20in\x20group:\x20','XACK','createConsumerGroup','402210zHUAzi','5rcWxHn','XPENDING','blockTimeout','XDEL','multi','mintKey','minIdleTime','toString','publishMessages','getPendingMessages','forEach','Error\x20creating\x20stream\x20','RedisStreamService','init','isStreamMessage','parseStreamMessage','value','namespace','claimMessage','3752ZwqewV','GROUP','DEL','XREADGROUP','Error\x20retrieving\x20pending\x20messages\x20for\x20group:\x20','CREATE','Error\x20deleting\x20consumer\x20group\x20','transaction','sendCommand','storeClient','logger'];a=function(){return N;};return a();}Object[r(0xbf)](exports,'__esModule',{'value':!![]}),exports['RedisStreamService']=void 0x0;const index_1=require('../../index'),utils_1=require(r(0xdc)),key_1=require('../../../../modules/key'),enums_1=require(r(0xce));class RedisStreamService extends index_1[r(0xf2)]{constructor(c,d,e={}){super(c,d,e);}async[r(0x109)](c,d,e){const s=r;this[s(0xab)]=c,this[s(0xb7)]=e,this[s(0xd2)]=d;}[r(0x101)](c,d){const t=r;if(!this[t(0xab)])throw new Error(t(0xc2));return key_1[t(0xc3)]['mintKey'](this[t(0xab)],c,{...d,'appId':this[t(0xd2)]});}[r(0xf4)](){const u=r;return this[u(0xb9)][u(0x100)]();}async[r(0xeb)](c){const v=r;try{const d=await this[v(0xb9)]['XADD'](c,'*',{'field':v(0xaa)});return await this[v(0xb9)]['XDEL'](c,d),!![];}catch(e){this[v(0xb7)][v(0xd1)](v(0x107)+c,{'error':e});throw e;}}async[r(0xe8)](c){const w=r;try{const d=await this[w(0xb9)][w(0xaf)](c);return d>0x0;}catch(e){this['logger'][w(0xd1)](w(0xb8)+c,{'error':e});throw e;}}async[r(0xfa)](c,d){const x=r;try{const e=await this[x(0xb6)][x(0xb5)]([x(0xd7),x(0xb2),c,d,'$',x(0xcb)]);return e==='OK';}catch(f){const g='with\x20MKSTREAM';this[x(0xb7)]['debug']('x-group-error\x20'+g+x(0xd0)+c+'\x20and\x20group:\x20'+d,{'error':f});throw f;}}async[r(0xc0)](c,d){const y=r;try{const e=await this['streamClient'][y(0xd9)](c,d);return e;}catch(f){this[y(0xb7)][y(0xd1)](y(0xb3)+d+y(0xc4)+c,{'error':f});throw f;}}async[r(0x104)](c,d,e){const z=r;try{const f=e?.['transaction']||d[z(0xe9)]>0x1&&this['storeClient'][z(0x100)]();let g;for(const h of d){g=await(f||this['storeClient'])[z(0xf5)](c,'*',{'message':h});}return f&&!e?.[z(0xb4)]?(await f[z(0xbe)]())['map'](i=>i[0x1]):[g];}catch(i){this[z(0xb7)][z(0xd1)](z(0xef)+c,{'error':i});throw i;}}async[r(0xd8)](c,d,e,f){const A=r,g=A(0xae),h=A(0xec),i=A(0xdd),j='>';try{const k=await this[A(0xb9)]['sendCommand']([A(0xb0),g,d,e,h,f?.[A(0xfe)]?.['toString']()??enums_1[A(0xee)][A(0x103)](),i,c,j]),l=[];if((0x0,utils_1[A(0x10a)])(k)){const [[,m]]=k;for(const [n,o]of m){l[A(0xe3)]({'id':n,'data':(0x0,utils_1[A(0xa9)])(o[0x1])});}}else return[];return l;}catch(p){this[A(0xb7)][A(0xd1)](A(0xd4)+c,{'error':p});throw p;}}async[r(0xf6)](c,d,e){const B=r,f=this['storeClient'][B(0x100)]();return await this['acknowledgeMessages'](c,d,e,{'multi':f}),await this[B(0xcd)](c,d,e,{'multi':f}),await f['exec'](),e[B(0xe9)];}async[r(0xe7)](c,d,e,f){const C=r;try{return f?.[C(0x100)]?(f['multi'][C(0xf9)](c,d,e),f['multi']):await this[C(0xb9)][C(0xf9)](c,d,...e);}catch(g){this[C(0xb7)][C(0xd1)](C(0xf8)+d+C(0xd0)+c,{'error':g});throw g;}}async['deleteMessages'](c,d,e,f){const D=r;try{return f?.['multi']?(f[D(0x100)][D(0xc6)](c,e),f['multi']):await this['streamClient'][D(0xff)](c,...e);}catch(g){this['logger']['error'](D(0xbc)+e[D(0xca)](',')+D(0xd0)+c,{'error':g});throw g;}}async[r(0x105)](c,d,e,f){const E=r;try{const g='-',h='+',i=[c,d];if(g)i['push'](g);if(h)i[E(0xe3)](h);if(e!==undefined)i[E(0xe3)](e[E(0x103)]());if(f)i[E(0xe3)](f);try{return await this[E(0xb9)][E(0xb5)]([E(0xfd),...i]);}catch(j){this[E(0xb7)]['error'](E(0xe1),{'error':j},i);}}catch(k){this['logger'][E(0xd1)](E(0xb1)+d+'\x20in\x20key:\x20'+c,{'error':k});throw k;}}async['retryMessages'](c,d,e){const F=r;let f=[];const g=await this[F(0x105)](c,d,e?.[F(0xd5)]);for(const h of g){if(Array['isArray'](h)){const [i,,j,k]=h;if(j>e?.[F(0x102)]){const l=await this[F(0xac)](c,d,e?.[F(0xed)],e?.[F(0x102)],i);f=f['concat'](l);}}}return f;}async[r(0xac)](c,d,e,f,g,...h){const G=r;try{const i=await this['streamClient']['sendCommand']([G(0xe5),c,d,e,f[G(0x103)](),g,...h]);return{'id':i[0x0][0x0],'data':(0x0,utils_1[G(0xa9)])(i[0x0][0x1][0x1])};}catch(j){this['logger'][G(0xd1)](G(0xe0)+g+G(0xe6)+d+G(0xd0)+c,{'error':j});throw j;}}async[r(0xf7)](c){const H=r;return{'messageCount':await this[H(0xc1)](c)};}async['getStreamDepth'](c,d){const I=r;try{if(d?.[I(0x100)])return d['multi'][I(0xf0)](c),0x0;const e=await this[I(0xb9)][I(0xf0)](c);return e;}catch(f){this[I(0xb7)][I(0xd1)](I(0xcc)+c,{'error':f});throw f;}}async[r(0xd6)](c){const J=r,d=this[J(0xb6)][J(0x100)](),e=new Map();c[J(0x106)](g=>{const K=J;!e[K(0xf3)](g[K(0xd3)])&&(e['set'](g[K(0xd3)],-0x1),this[K(0xc1)](g[K(0xd3)],{'multi':d}));});const f=await d[J(0xbe)]();return Array[J(0xcf)](e[J(0xe2)]())['forEach']((g,h)=>{const L=J;e[L(0xdf)](g,f[h]);}),c[J(0xc9)](g=>{const M=J;return{'stream':g[M(0xd3)],'depth':e[M(0xc7)](g[M(0xd3)])||0x0};});}async[r(0xba)](c,d){return 0x0;}[r(0xde)](){return{'supportsBatching':!![],'supportsDeadLetterQueue':![],'supportsOrdering':!![],'supportsTrimming':!![],'supportsRetry':!![],'maxMessageSize':0x200*0x400*0x400,'maxBatchSize':0x3e8};}}exports[r(0x108)]=RedisStreamService;
@@ -1 +1 @@
1
- 'use strict';function a(){var j=['defineProperty','488riuSjH','1266NXNkwx','58113gOyxxq','114143zdjPqP','332715sQqvzj','4872AhcaoW','821436MmvByp','90537MFcCwp','86070MLRYAT'];a=function(){return j;};return a();}var i=b;(function(c,d){var h=b,e=c();while(!![]){try{var f=parseInt(h(0x130))/0x1+parseInt(h(0x135))/0x2+-parseInt(h(0x134))/0x3+parseInt(h(0x133))/0x4+parseInt(h(0x131))/0x5+parseInt(h(0x12e))/0x6*(parseInt(h(0x132))/0x7)+-parseInt(h(0x137))/0x8*(parseInt(h(0x12f))/0x9);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x25148));function b(c,d){var e=a();return b=function(f,g){f=f-0x12e;var h=e[f];return h;},b(c,d);}Object[i(0x136)](exports,'__esModule',{'value':!![]});
1
+ 'use strict';var i=b;function b(c,d){var e=a();return b=function(f,g){f=f-0x1b2;var h=e[f];return h;},b(c,d);}function a(){var j=['23415ZhVfes','6326837CIADjX','1836360eLOIMm','2ZpVrDR','2201970HybukX','9GIPkzk','__esModule','6892304xobJvN','2569BnGMNN','379521hscXqc','48KQGRhq','defineProperty','76HOMjVd','4440JVxyGu'];a=function(){return j;};return a();}(function(c,d){var h=b,e=c();while(!![]){try{var f=-parseInt(h(0x1bb))/0x1*(parseInt(h(0x1b5))/0x2)+-parseInt(h(0x1b2))/0x3*(parseInt(h(0x1be))/0x4)+-parseInt(h(0x1b4))/0x5+parseInt(h(0x1bf))/0x6*(-parseInt(h(0x1ba))/0x7)+-parseInt(h(0x1b9))/0x8+parseInt(h(0x1b7))/0x9*(parseInt(h(0x1b6))/0xa)+parseInt(h(0x1b3))/0xb*(parseInt(h(0x1bc))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x78473));Object[i(0x1bd)](exports,i(0x1b8),{'value':!![]});
@@ -1 +1 @@
1
- 'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=-parseInt(l(0x1db))/0x1*(-parseInt(l(0x1ed))/0x2)+-parseInt(l(0x1e4))/0x3*(-parseInt(l(0x1c2))/0x4)+-parseInt(l(0x1c9))/0x5*(-parseInt(l(0x1d9))/0x6)+-parseInt(l(0x1bf))/0x7*(-parseInt(l(0x1d7))/0x8)+-parseInt(l(0x1e3))/0x9+-parseInt(l(0x1ec))/0xa+parseInt(l(0x1c8))/0xb*(-parseInt(l(0x1ca))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x70a16));Object[m(0x1d4)](exports,'__esModule',{'value':!![]}),exports['NatsSubService']=void 0x0;const key_1=require(m(0x1dc)),index_1=require(m(0x1e1));class NatsSubService extends index_1[m(0x1d5)]{constructor(c,d){const n=m;super(c,d),this[n(0x1bd)]=new Map();}async['init'](c=key_1[m(0x1c3)],d,e,f){const o=m;this[o(0x1c5)]=c,this['logger']=f,this['appId']=d,this[o(0x1d2)]=e;}[m(0x1e6)](){return{};}[m(0x1cd)](c,d){const p=m;if(!this[p(0x1c5)])throw new Error(p(0x1c7));return key_1[p(0x1d6)]['mintKey'](this[p(0x1c5)],c,d)[p(0x1e0)](/:/g,'.')[p(0x1e0)](/\.$/g,'.X');}async[m(0x1d8)](c,d,e,f){const q=m,g=this['mintKey'](c,{'appId':e,'engineId':f}),h=this[q(0x1e7)][q(0x1d8)](g);this[q(0x1bd)]['set'](g,h),this[q(0x1be)][q(0x1d1)](q(0x1ce)+g),(async()=>{const r=q;for await(const i of h){try{const j=JSON['parse'](i[r(0x1e5)][r(0x1da)]());d(g,j);}catch(k){this[r(0x1be)][r(0x1eb)]('nats-subscribe-message-parse-error:\x20'+i[r(0x1e5)]['toString'](),k);}}})()['catch'](i=>{const s=q;this[s(0x1be)]['error'](s(0x1c1)+g,i);});}async[m(0x1e2)](c,d,e){const t=m,f=this[t(0x1cd)](c,{'appId':d,'engineId':e}),g=this['subscriptions'][t(0x1cb)](f);g?(g[t(0x1e2)](),this[t(0x1bd)][t(0x1df)](f),this[t(0x1be)][t(0x1d1)](t(0x1cc)+f)):this['logger'][t(0x1cf)](t(0x1c0)+f);}async['psubscribe'](c,d,e,f){const u=m,g=this[u(0x1cd)](c,{'appId':e,'engineId':f}),h=this[u(0x1e7)][u(0x1d8)](g);this[u(0x1bd)][u(0x1c6)](g,h),this[u(0x1be)][u(0x1d1)]('nats-psubscribe\x20'+g),(async()=>{const v=u;for await(const i of h){try{const j=JSON[v(0x1de)](i['data'][v(0x1da)]());d(i['subject'],j);}catch(k){this[v(0x1be)][v(0x1eb)](v(0x1dd)+i[v(0x1e5)][v(0x1da)](),k);}}})()[u(0x1ea)](i=>{const w=u;this['logger'][w(0x1eb)]('nats-pattern-psubscription-error\x20'+g,i);});}async[m(0x1ee)](c,d,e){const x=m,f=this[x(0x1cd)](c,{'appId':d,'engineId':e}),g=this[x(0x1bd)]['get'](f);g?(g[x(0x1e2)](),this['subscriptions'][x(0x1df)](f),this[x(0x1be)][x(0x1d1)](x(0x1e9)+f)):this['logger'][x(0x1cf)](x(0x1e8)+f);}async['publish'](c,d,e,f){const y=m,g=this['mintKey'](c,{'appId':e,'engineId':f});try{return this[y(0x1d0)]['publish'](g,JSON['stringify'](d)),this['logger'][y(0x1d1)]('nats-publish\x20'+g),!![];}catch(h){return this[y(0x1be)][y(0x1eb)](y(0x1c4)+g,h),![];}}}exports[m(0x1d3)]=NatsSubService;function b(c,d){const e=a();return b=function(f,g){f=f-0x1bd;let h=e[f];return h;},b(c,d);}function a(){const z=['defineProperty','SubService','KeyService','176YhLfPH','subscribe','413598figBJS','toString','2117NLfcin','../../../../modules/key','nats-parse-psubscription-message-error\x20','parse','delete','replace','../../index','unsubscribe','2039490xYAhLv','945UTyUyK','data','transact','eventClient','nats-punsubscribe-error\x20','nats-punsubscribe\x20','catch','error','4873120VWgbVl','622vqwKjE','punsubscribe','subscriptions','logger','64267TZmEDI','nats-unsubscribe-error\x20','nats-subscribe-error\x20','8152EyKzFW','HMNS','nats-publish-error\x20','namespace','set','namespace\x20not\x20set','1738fLivQc','15tYypNI','40548wpZwPt','get','nats-unsubscribe\x20','mintKey','nats-subscribe\x20','warn','storeClient','debug','engineId','NatsSubService'];a=function(){return z;};return a();}
1
+ 'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=parseInt(l(0x1d2))/0x1+-parseInt(l(0x1d7))/0x2*(-parseInt(l(0x1c8))/0x3)+-parseInt(l(0x1e6))/0x4+-parseInt(l(0x1c1))/0x5*(-parseInt(l(0x1ca))/0x6)+-parseInt(l(0x1e0))/0x7+parseInt(l(0x1d3))/0x8*(-parseInt(l(0x1e9))/0x9)+parseInt(l(0x1bd))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x4b135));Object[m(0x1f1)](exports,'__esModule',{'value':!![]}),exports[m(0x1f0)]=void 0x0;const key_1=require(m(0x1e5)),index_1=require(m(0x1e8));class NatsSubService extends index_1[m(0x1d8)]{constructor(c,d){super(c,d),this['subscriptions']=new Map();}async['init'](c=key_1[m(0x1cb)],d,e,f){const n=m;this[n(0x1cc)]=c,this[n(0x1e3)]=f,this[n(0x1eb)]=d,this[n(0x1e7)]=e;}[m(0x1ef)](){return{};}[m(0x1f2)](c,d){const o=m;if(!this[o(0x1cc)])throw new Error(o(0x1c7));return key_1['KeyService'][o(0x1f2)](this[o(0x1cc)],c,d)[o(0x1ee)](/:/g,'.')[o(0x1ee)](/\.$/g,'.X');}async['subscribe'](c,d,e,f){const p=m,g=this[p(0x1f2)](c,{'appId':e,'engineId':f}),h=this[p(0x1d5)]['subscribe'](g);this[p(0x1f3)][p(0x1de)](g,h),this['logger'][p(0x1ed)](p(0x1dd)+g),(async()=>{const q=p;for await(const i of h){try{const j=JSON[q(0x1cf)](i['data']['toString']());d(g,j);}catch(k){this[q(0x1e3)][q(0x1c0)](q(0x1d6)+i[q(0x1ea)][q(0x1c9)](),k);}}})()['catch'](i=>{const r=p;this['logger'][r(0x1c0)](r(0x1c5)+g,i);});}async[m(0x1da)](c,d,e){const s=m,f=this[s(0x1f2)](c,{'appId':d,'engineId':e}),g=this[s(0x1f3)][s(0x1c3)](f);g?(g['unsubscribe'](),this[s(0x1f3)][s(0x1bf)](f),this['logger'][s(0x1ed)](s(0x1e2)+f)):this[s(0x1e3)][s(0x1dc)](s(0x1cd)+f);}async[m(0x1d0)](c,d,e,f){const t=m,g=this['mintKey'](c,{'appId':e,'engineId':f}),h=this['eventClient']['subscribe'](g);this['subscriptions']['set'](g,h),this['logger'][t(0x1ed)](t(0x1c4)+g),(async()=>{const u=t;for await(const i of h){try{const j=JSON[u(0x1cf)](i[u(0x1ea)]['toString']());d(i[u(0x1c2)],j);}catch(k){this['logger']['error'](u(0x1c6)+i[u(0x1ea)][u(0x1c9)](),k);}}})()[t(0x1d4)](i=>{const v=t;this[v(0x1e3)][v(0x1c0)](v(0x1d9)+g,i);});}async[m(0x1db)](c,d,e){const w=m,f=this[w(0x1f2)](c,{'appId':d,'engineId':e}),g=this[w(0x1f3)]['get'](f);g?(g['unsubscribe'](),this[w(0x1f3)][w(0x1bf)](f),this[w(0x1e3)][w(0x1ed)](w(0x1d1)+f)):this['logger'][w(0x1dc)](w(0x1df)+f);}async[m(0x1ec)](c,d,e,f){const x=m,g=this[x(0x1f2)](c,{'appId':e,'engineId':f});try{return this[x(0x1ce)]['publish'](g,JSON[x(0x1e4)](d)),this[x(0x1e3)]['debug'](x(0x1e1)+g),!![];}catch(h){return this[x(0x1e3)]['error'](x(0x1be)+g,h),![];}}}function b(c,d){const e=a();return b=function(f,g){f=f-0x1bd;let h=e[f];return h;},b(c,d);}exports[m(0x1f0)]=NatsSubService;function a(){const y=['8337470TypEKB','nats-publish-error\x20','delete','error','5285HFSESY','subject','get','nats-psubscribe\x20','nats-subscribe-error\x20','nats-parse-psubscription-message-error\x20','namespace\x20not\x20set','114McxBkM','toString','174VLLPjj','HMNS','namespace','nats-unsubscribe-error\x20','storeClient','parse','psubscribe','nats-punsubscribe\x20','14550zFqZyM','599152JlLecd','catch','eventClient','nats-subscribe-message-parse-error:\x20','28172zRyasU','SubService','nats-pattern-psubscription-error\x20','unsubscribe','punsubscribe','warn','nats-subscribe\x20','set','nats-punsubscribe-error\x20','3802617qVdOIJ','nats-publish\x20','nats-unsubscribe\x20','logger','stringify','../../../../modules/key','756032DlbgBl','engineId','../../index','45xGlblM','data','appId','publish','debug','replace','transact','NatsSubService','defineProperty','mintKey','subscriptions'];a=function(){return y;};return a();}
@@ -1 +1 @@
1
- 'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=-parseInt(l(0x1d4))/0x1*(parseInt(l(0x1f5))/0x2)+-parseInt(l(0x1ec))/0x3*(-parseInt(l(0x201))/0x4)+-parseInt(l(0x208))/0x5*(parseInt(l(0x1e9))/0x6)+-parseInt(l(0x1f9))/0x7*(-parseInt(l(0x1fc))/0x8)+parseInt(l(0x1df))/0x9+-parseInt(l(0x1f0))/0xa+parseInt(l(0x1e0))/0xb;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x2e9c2));function b(c,d){const e=a();return b=function(f,g){f=f-0x1d3;let h=e[f];return h;},b(c,d);}var __importDefault=this&&this[m(0x206)]||function(c){const n=m;return c&&c[n(0x1ff)]?c:{'default':c};};Object[m(0x1f2)](exports,'__esModule',{'value':!![]}),exports[m(0x1e1)]=void 0x0;const crypto_1=__importDefault(require(m(0x1dd))),key_1=require(m(0x20d)),index_1=require(m(0x1e3));class PostgresSubService extends index_1[m(0x20f)]{constructor(c,d){super(c,d);}async[m(0x20a)](c=key_1[m(0x202)],d,e,f){const o=m;this[o(0x20e)]=c,this[o(0x1e2)]=f,this[o(0x205)]=d,this[o(0x1f6)]=e;}[m(0x1d5)](){const p=m;throw new Error(p(0x1e7));}[m(0x20c)](c,d){const q=m;if(!this[q(0x20e)])throw new Error(q(0x1e8));return key_1[q(0x1ef)][q(0x20c)](this[q(0x20e)],c,d);}[m(0x1fd)](c,d){const r=m,e=this[r(0x20c)](c,d);if(e[r(0x1ed)]<=0x3f)return[e,e];const {appId:appId='',engineId:engineId=''}=d,f=this['namespace']+':'+appId+':'+c,g=0x3f-f[r(0x1ed)]-0x1,h=crypto_1[r(0x207)][r(0x200)](r(0x1dc))[r(0x1ea)](engineId)[r(0x1fb)](r(0x1e5))[r(0x1e6)](0x0,g),i=f+':'+h;return[e,i];}async[m(0x1eb)](c,d,e,f){const s=m,[g,h]=this[s(0x1fd)](c,{'appId':e,'engineId':f});await this[s(0x1d8)][s(0x1de)]('LISTEN\x20\x22'+h+'\x22'),this['logger'][s(0x1f3)](s(0x1d9),{'originalKey':g,'safeKey':h}),this[s(0x1d8)]['on'](s(0x1e4),i=>{const t=s;if(i[t(0x1da)]===h)try{const j=JSON[t(0x1ee)](i[t(0x1d3)]||'{}');d(h,j);}catch(k){this[t(0x1e2)]['error'](t(0x20b)+h+':',k);}});}async[m(0x1d6)](c,d,e){const u=m,[f,g]=this[u(0x1fd)](c,{'appId':d,'engineId':e});await this['eventClient'][u(0x1de)](u(0x1f4)+g+'\x22'),this[u(0x1e2)][u(0x1f3)](u(0x1d9),{'originalKey':f,'safeKey':g});}async[m(0x1f1)](c,d,e,f){const v=m,[g,h]=this['mintSafeKey'](c,{'appId':e,'engineId':f}),i=JSON[v(0x209)](d)[v(0x204)](/'/g,'\x27\x27');return await this[v(0x1d7)]['query'](v(0x1fe)+h+v(0x1fa)+i+'\x27'),this[v(0x1e2)][v(0x1f3)](v(0x1db),{'originalKey':g,'safeKey':h}),!![];}async[m(0x1f8)](){throw new Error('Pattern\x20subscriptions\x20are\x20not\x20supported\x20in\x20PostgreSQL');}async[m(0x1f7)](){const w=m;throw new Error(w(0x203));}}function a(){const x=['crypto','query','652491uvwfNz','6316651QsQsfz','PostgresSubService','logger','../../index','notification','hex','substring','Transactions\x20are\x20not\x20supported\x20in\x20lightweight\x20pub/sub','Namespace\x20not\x20set','6TIkVKM','update','subscribe','88845EGSkLo','length','parse','KeyService','495880tBmvHB','publish','defineProperty','debug','UNLISTEN\x20\x22','92lOQvqD','engineId','punsubscribe','psubscribe','194831QTRpQl','\x22,\x20\x27','digest','40JKEnNe','mintSafeKey','NOTIFY\x20\x22','__esModule','createHash','12rgoUeY','HMNS','Pattern\x20subscriptions\x20are\x20not\x20supported\x20in\x20PostgreSQL','replace','appId','__importDefault','default','1543300jxyBVy','stringify','init','Error\x20parsing\x20message\x20for\x20topic\x20','mintKey','../../../../modules/key','namespace','SubService','payload','7078XkWXnl','transact','unsubscribe','storeClient','eventClient','postgres-subscribe','channel','postgres-publish','sha256'];a=function(){return x;};return a();}exports[m(0x1e1)]=PostgresSubService;
1
+ 'use strict';const m=b;function b(c,d){const e=a();return b=function(f,g){f=f-0x10a;let h=e[f];return h;},b(c,d);}(function(c,d){const l=b,e=c();while(!![]){try{const f=-parseInt(l(0x115))/0x1*(parseInt(l(0x10c))/0x2)+parseInt(l(0x122))/0x3+-parseInt(l(0x134))/0x4*(-parseInt(l(0x136))/0x5)+-parseInt(l(0x116))/0x6+-parseInt(l(0x126))/0x7+-parseInt(l(0x124))/0x8*(parseInt(l(0x133))/0x9)+-parseInt(l(0x12d))/0xa*(-parseInt(l(0x120))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xcbb87));function a(){const x=['crypto','\x22,\x20\x27','debug','length','351154NwdGeK','mintSafeKey','digest','NOTIFY\x20\x22','update','eventClient','payload','UNLISTEN\x20\x22','transact','8xxzHLt','380112nzPgXz','__importDefault','appId','postgres-subscribe','Pattern\x20subscriptions\x20are\x20not\x20supported\x20in\x20PostgreSQL','defineProperty','mintKey','Error\x20parsing\x20message\x20for\x20topic\x20','namespace','engineId','319NpVhNE','publish','2301744jlvPbw','sha256','8nHTwLu','replace','1640618lShpay','logger','substring','PostgresSubService','init','subscribe','Namespace\x20not\x20set','532660yqGSLl','error','default','Transactions\x20are\x20not\x20supported\x20in\x20lightweight\x20pub/sub','query','storeClient','9269145PSQBca','1254724qcLoII','HMNS','20PHIxXX','__esModule'];a=function(){return x;};return a();}var __importDefault=this&&this[m(0x117)]||function(c){const n=m;return c&&c[n(0x137)]?c:{'default':c};};Object[m(0x11b)](exports,m(0x137),{'value':!![]}),exports['PostgresSubService']=void 0x0;const crypto_1=__importDefault(require(m(0x138))),key_1=require('../../../../modules/key'),index_1=require('../../index');class PostgresSubService extends index_1['SubService']{constructor(c,d){super(c,d);}async[m(0x12a)](c=key_1[m(0x135)],d,e,f){const o=m;this[o(0x11e)]=c,this[o(0x127)]=f,this[o(0x118)]=d,this[o(0x11f)]=e;}[m(0x114)](){const p=m;throw new Error(p(0x130));}[m(0x11c)](c,d){const q=m;if(!this[q(0x11e)])throw new Error(q(0x12c));return key_1['KeyService'][q(0x11c)](this[q(0x11e)],c,d);}[m(0x10d)](c,d){const r=m,e=this[r(0x11c)](c,d);if(e[r(0x10b)]<=0x3f)return[e,e];const {appId:appId='',engineId:engineId=''}=d,f=this[r(0x11e)]+':'+appId+':'+c,g=0x3f-f[r(0x10b)]-0x1,h=crypto_1[r(0x12f)]['createHash'](r(0x123))[r(0x110)](engineId)[r(0x10e)]('hex')[r(0x128)](0x0,g),i=f+':'+h;return[e,i];}async[m(0x12b)](c,d,e,f){const s=m,[g,h]=this[s(0x10d)](c,{'appId':e,'engineId':f});await this[s(0x111)]['query']('LISTEN\x20\x22'+h+'\x22'),this['logger']['debug'](s(0x119),{'originalKey':g,'safeKey':h}),this[s(0x111)]['on']('notification',i=>{const t=s;if(i['channel']===h)try{const j=JSON['parse'](i[t(0x112)]||'{}');d(h,j);}catch(k){this[t(0x127)][t(0x12e)](t(0x11d)+h+':',k);}});}async['unsubscribe'](c,d,e){const u=m,[f,g]=this['mintSafeKey'](c,{'appId':d,'engineId':e});await this[u(0x111)]['query'](u(0x113)+g+'\x22'),this[u(0x127)][u(0x10a)](u(0x119),{'originalKey':f,'safeKey':g});}async[m(0x121)](c,d,e,f){const v=m,[g,h]=this[v(0x10d)](c,{'appId':e,'engineId':f}),i=JSON['stringify'](d)[v(0x125)](/'/g,'\x27\x27');return await this[v(0x132)][v(0x131)](v(0x10f)+h+v(0x139)+i+'\x27'),this[v(0x127)][v(0x10a)]('postgres-publish',{'originalKey':g,'safeKey':h}),!![];}async['psubscribe'](){const w=m;throw new Error(w(0x11a));}async['punsubscribe'](){throw new Error('Pattern\x20subscriptions\x20are\x20not\x20supported\x20in\x20PostgreSQL');}}exports[m(0x129)]=PostgresSubService;
@@ -1 +1 @@
1
- 'use strict';const o=b;function a(){const B=['parse','1381870WdggQA','314CfcIpT','namespace','670aZmVij','mintKey','subscribe','unsubscribe','namespace\x20not\x20set','../../../../modules/key','message','HMNS','24MHUnNx','20913CVhReu','pmessage','storeClient','284592YGoHWO','multi','punsubscribe','init','6721170VZUSDT','Error\x20parsing\x20message:\x20','logger','673857LHzriF','error','psubscribe','KeyService','7YMpKqH','defineProperty','engineId','230901VIAufn','eventClient','IORedisSubService','stringify','Error\x20subscribing\x20to:\x20','publish','1627288ybMtLs'];a=function(){return B;};return a();}function b(c,d){const e=a();return b=function(f,g){f=f-0x125;let h=e[f];return h;},b(c,d);}(function(c,d){const n=b,e=c();while(!![]){try{const f=parseInt(n(0x138))/0x1+parseInt(n(0x12a))/0x2*(parseInt(n(0x135))/0x3)+-parseInt(n(0x127))/0x4+parseInt(n(0x129))/0x5+-parseInt(n(0x13c))/0x6*(-parseInt(n(0x143))/0x7)+parseInt(n(0x134))/0x8*(-parseInt(n(0x13f))/0x9)+parseInt(n(0x12c))/0xa*(-parseInt(n(0x146))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xb41ea));Object[o(0x144)](exports,'__esModule',{'value':!![]}),exports[o(0x148)]=void 0x0;const key_1=require(o(0x131)),index_1=require('../../index');class IORedisSubService extends index_1['SubService']{constructor(c,d){super(c,d);}async[o(0x13b)](c=key_1[o(0x133)],d,e,f){const p=o;this[p(0x12b)]=c,this[p(0x13e)]=f,this['appId']=d,this[p(0x145)]=e;}['transact'](){const q=o;return this[q(0x147)][q(0x139)]();}[o(0x12d)](c,d){const r=o;if(!this[r(0x12b)])throw new Error(r(0x130));return key_1[r(0x142)][r(0x12d)](this['namespace'],c,d);}async['subscribe'](c,d,e,f){const s=o,g=this,h=this[s(0x12d)](c,{'appId':e,'engineId':f});await this[s(0x147)][s(0x12e)](h,i=>{const t=s;i&&g['logger'][t(0x140)](t(0x125)+h,i);}),this['eventClient']['on'](s(0x132),(i,j)=>{const u=s;if(i===h)try{const k=JSON[u(0x128)](j);d(h,k);}catch(l){g[u(0x13e)][u(0x140)]('Error\x20parsing\x20message:\x20'+j,l);}});}async[o(0x12f)](c,d,e){const v=o,f=this[v(0x12d)](c,{'appId':d,'engineId':e});await this[v(0x147)][v(0x12f)](f);}async['psubscribe'](c,d,e,f){const w=o,g=this,h=this[w(0x12d)](c,{'appId':e,'engineId':f});await this['eventClient'][w(0x141)](h,i=>{const x=w;i&&g[x(0x13e)][x(0x140)]('Error\x20subscribing\x20to:\x20'+h,i);}),this[w(0x147)]['on'](w(0x136),(i,j,k)=>{const y=w;if(i===h)try{const l=JSON[y(0x128)](k);d(j,l);}catch(m){g[y(0x13e)]['error'](y(0x13d)+k,m);}});}async['punsubscribe'](c,d,e){const z=o,f=this[z(0x12d)](c,{'appId':d,'engineId':e});await this['eventClient'][z(0x13a)](f);}async[o(0x126)](c,d,e,f){const A=o,g=this[A(0x12d)](c,{'appId':e,'engineId':f}),h=await this[A(0x137)][A(0x126)](g,JSON[A(0x149)](d));return h===0x1;}}exports['IORedisSubService']=IORedisSubService;
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 +1 @@
1
- 'use strict';const n=b;(function(c,d){const m=b,e=c();while(!![]){try{const f=-parseInt(m(0x1db))/0x1*(parseInt(m(0x1ed))/0x2)+-parseInt(m(0x1f3))/0x3+parseInt(m(0x1e5))/0x4+-parseInt(m(0x1de))/0x5+parseInt(m(0x1eb))/0x6*(parseInt(m(0x1ef))/0x7)+parseInt(m(0x1ea))/0x8*(parseInt(m(0x1e2))/0x9)+parseInt(m(0x1f0))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xb6620));function b(c,d){const e=a();return b=function(f,g){f=f-0x1d6;let h=e[f];return h;},b(c,d);}Object[n(0x1f9)](exports,n(0x1ec),{'value':!![]}),exports['RedisSubService']=void 0x0;const key_1=require(n(0x1d6)),index_1=require(n(0x1d9));class RedisSubService extends index_1[n(0x1f8)]{constructor(c,d){super(c,d);}async[n(0x1f7)](c=key_1[n(0x1dc)],d,e,f){const o=n;this[o(0x1e9)]=c,this['logger']=f,this['appId']=d,this['engineId']=e;}[n(0x1d8)](){const p=n,c=this[p(0x1f1)][p(0x1e3)]();return c;}[n(0x1e1)](c,d){const q=n;if(!this[q(0x1e9)])throw new Error('namespace\x20not\x20set');return key_1[q(0x1e6)][q(0x1e1)](this[q(0x1e9)],c,d);}async[n(0x1ee)](c,d,e,f){const r=n;if(this[r(0x1f1)]){const g=this,h=this['mintKey'](c,{'appId':e,'engineId':f});await this[r(0x1f1)][r(0x1ee)](h,i=>{const s=r;try{const j=JSON[s(0x1e8)](i);d(h,j);}catch(k){g[s(0x1f2)][s(0x1dd)](s(0x1e4)+i,k);}});}}async[n(0x1da)](c,d,e){const t=n,f=this[t(0x1e1)](c,{'appId':d,'engineId':e});await this[t(0x1f1)]['unsubscribe'](f);}async[n(0x1e7)](c,d,e,f){const u=n;if(this[u(0x1f1)]){const g=this,h=this[u(0x1e1)](c,{'appId':e,'engineId':f});await this[u(0x1f1)]['pSubscribe'](h,(i,j)=>{const v=u;try{const k=JSON[v(0x1e8)](i);d(j,k);}catch(l){g['logger']['error'](v(0x1e4)+i,l);}});}}async[n(0x1f6)](c,d,e){const w=n,f=this[w(0x1e1)](c,{'appId':d,'engineId':e});await this[w(0x1f1)][w(0x1df)](f);}async['publish'](c,d,e,f){const x=n,g=this[x(0x1e1)](c,{'appId':e,'engineId':f}),h=await this[x(0x1d7)][x(0x1f4)](g,JSON[x(0x1f5)](d));return h>0x0;}}function a(){const y=['storeClient','transact','../../index','unsubscribe','929noAXBR','HMNS','error','227860oNOVzB','pUnsubscribe','RedisSubService','mintKey','9zztdvF','multi','Error\x20parsing\x20message:\x20','3482720MNkYVr','KeyService','psubscribe','parse','namespace','7091048xeAEKz','2098104pkpUzG','__esModule','1994Ywnztg','subscribe','21LdhkSu','2314290kgHSXj','eventClient','logger','3956151sXLYPv','publish','stringify','punsubscribe','init','SubService','defineProperty','../../../../modules/key'];a=function(){return y;};return a();}exports[n(0x1e0)]=RedisSubService;
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 +1 @@
1
- 'use strict';const q=b;(function(c,d){const p=b,e=c();while(!![]){try{const f=-parseInt(p(0x164))/0x1*(parseInt(p(0x189))/0x2)+parseInt(p(0x173))/0x3+parseInt(p(0x175))/0x4*(-parseInt(p(0x179))/0x5)+-parseInt(p(0x199))/0x6*(parseInt(p(0x19d))/0x7)+-parseInt(p(0x188))/0x8*(-parseInt(p(0x1a5))/0x9)+parseInt(p(0x16d))/0xa+parseInt(p(0x191))/0xb;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x2d3db));function a(){const D=['appId','getHookRule','3030330YPnGuY','logger','delistSignalKey','cleanupTimeout','now','jid','31092KbQmfD','HMSH_EXPIRE_DURATION','1210216ImPRgQ','../../modules/enums','errorCount','task-process-timehooks-error','5wlcrfh','__esModule','registerTimeHook','timerId','HMSH_SCOUT_INTERVAL_SECONDS','warn','shouldScout','resolve','conditions','../../modules/utils','parse','registerJobForCleanup','getHookSignal','isScout','child','326968xwseDI','2RnCsLr','mintKey','processTimeHooks','enqueueWorkItems','deleteWebHookSignal','deleteProcessedTaskQueue','sleepFor','metadata','4464537njkSKN','deleteHookSignal','getNextTask','getHookRules','HMSH_FIDELITY_SECONDS','registerWebHook','Pipe','WEBSEP','126kDpqOQ','actual','isArray','XSleepFor','95837vRynvO','split','KeyType','true','../../modules/key','processTaskQueue','expireJob','processWebHookSignal','18UYdaYy','time','floor','promise','../../types/hotmesh','signaler.process:error:\x20hook\x20rule\x20not\x20found',':processed','defineProperty','store','TaskService','random','match','processWebHooks','25634HhRgCU','cancelCleanup','reserveScoutRole','getActiveTaskQueue','signaler.registerWebHook:error:\x20hook\x20rule\x20not\x20found','join','signal-not-found'];a=function(){return D;};return a();}Object[q(0x1ac)](exports,q(0x17a),{'value':!![]}),exports['TaskService']=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0x162;let h=e[f];return h;},b(c,d);}const enums_1=require(q(0x176)),utils_1=require(q(0x182)),pipe_1=require('../pipe'),hotmesh_1=require(q(0x1a9)),key_1=require(q(0x1a1));class TaskService{constructor(c,d){const r=q;this[r(0x170)]=null,this[r(0x186)]=![],this[r(0x177)]=0x0,this[r(0x16e)]=d,this[r(0x1ad)]=c;}async[q(0x163)](c){const s=q,d=await this[s(0x1ad)][s(0x167)]();if(d){const [e,f,g,...h]=d[s(0x19e)](key_1[s(0x198)]),i=JSON[s(0x183)](h[s(0x169)](key_1[s(0x198)])),j=f+s(0x1ab),k=await this[s(0x1ad)][s(0x1a2)](f,j);k?await c(e,{...i,'id':k}):await this[s(0x1ad)][s(0x18e)](d,f,j,g===s(0x1a0)),setImmediate(()=>this[s(0x163)](c));}}async[q(0x18c)](c){await this['store']['addTaskQueues'](c);}async[q(0x184)](c,d=enums_1[q(0x174)],e){const t=q;d>0x0&&await this[t(0x1ad)][t(0x1a3)](c,d);}async[q(0x17b)](c,d,e,f,g=enums_1['HMSH_FIDELITY_SECONDS'],h,i){const u=q,j=Date[u(0x171)]()+g*0x3e8,k=enums_1[u(0x195)]*0x3e8,l=Math[u(0x1a7)](j/k)*k;await this[u(0x1ad)][u(0x17b)](c,d,e,f,l,h,i);}async[q(0x17f)](){const v=q,c=this[v(0x186)],d=c||(this[v(0x186)]=await this[v(0x1ad)][v(0x166)](v(0x1a6)));if(d)return!c&&setTimeout(()=>{const w=v;this[w(0x186)]=![];},enums_1[v(0x17d)]*0x3e8),!![];return![];}async[q(0x18b)](c,d){const x=q;if(await this[x(0x17f)]())try{const e=await this[x(0x1ad)][x(0x193)](d);if(Array[x(0x19b)](e)){const [f,g,h,i,j]=e;if(j===x(0x187)){}else{if(j==='delist'){const k=this[x(0x1ad)][x(0x18a)](hotmesh_1[x(0x19f)]['SIGNALS'],{'appId':this[x(0x1ad)][x(0x16b)]});await this['store'][x(0x16f)](k,g);}else await c(g,h,i,j);}await(0x0,utils_1[x(0x18f)])(0x0),this[x(0x177)]=0x0,this['processTimeHooks'](c,f);}else{if(e)await(0x0,utils_1[x(0x18f)])(0x0),this['errorCount']=0x0,this['processTimeHooks'](c);else{const l=(0x0,utils_1[x(0x19c)])(enums_1[x(0x195)]*0x3e8);this['cleanupTimeout']=l[x(0x17c)],await l[x(0x1a8)],this[x(0x177)]=0x0,this[x(0x18b)](c);}}}catch(m){this[x(0x16e)][x(0x17e)](x(0x178),m),await(0x0,utils_1[x(0x18f)])(0x3e8*this['errorCount']++),this[x(0x177)]<0x5&&this[x(0x18b)](c);}else{const n=(0x0,utils_1[x(0x19c)])(enums_1[x(0x17d)]*0x3e8*0x2*Math[x(0x1af)]());this[x(0x170)]=n['timerId'],await n[x(0x1a8)],this[x(0x18b)](c);}}[q(0x165)](){const y=q;this[y(0x170)]!==undefined&&(clearTimeout(this[y(0x170)]),this[y(0x170)]=undefined);}async[q(0x16c)](c){const z=q,d=await this[z(0x1ad)][z(0x194)]();return d?.[c]?.[0x0];}async[q(0x196)](c,d,e,f,g){const A=q,h=await this['getHookRule'](c);if(h){const i=h[A(0x181)]['match'][0x0]['expected'],j=pipe_1[A(0x197)][A(0x180)](i,d),k=d[A(0x190)][A(0x172)],l=d[A(0x190)]['gid'],m=h['to'],n=[m,e,l,k][A(0x169)](key_1[A(0x198)]),o={'topic':c,'resolved':j,'jobId':n,'expire':f};return await this[A(0x1ad)]['setHookSignal'](o,g),k;}else throw new Error(A(0x168));}async[q(0x1a4)](c,d){const B=q,e=await this[B(0x16c)](c);if(e){const f={'$self':{'hook':{'data':d}},'$hook':{'data':d}},g=e[B(0x181)][B(0x162)][0x0][B(0x19a)],h=pipe_1[B(0x197)][B(0x180)](g,f),i=await this[B(0x1ad)][B(0x185)](c,h);if(!i)return undefined;const [j,k,l,...m]=i[B(0x19e)](key_1[B(0x198)]);return[m[B(0x169)](key_1[B(0x198)]),e['to'],k,l];}else throw new Error(B(0x16a));}async[q(0x18d)](c,d){const C=q,e=await this[C(0x16c)](c);if(e){const f={'$self':{'hook':{'data':d}},'$hook':{'data':d}},g=e[C(0x181)][C(0x162)][0x0][C(0x19a)],h=pipe_1[C(0x197)][C(0x180)](g,f);return await this['store'][C(0x192)](c,h);}else throw new Error(C(0x1aa));}}exports[q(0x1ae)]=TaskService;
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;
@@ -14,6 +14,8 @@ declare class TelemetryService {
14
14
  context: JobState;
15
15
  leg: number;
16
16
  constructor(appId: string, config?: ActivityType, metadata?: ActivityMetadata, context?: JobState);
17
+ private shouldCreateSpan;
18
+ private static createNoopSpan;
17
19
  getJobParentSpanId(): string | undefined;
18
20
  getActivityParentSpanId(leg: number): string | undefined;
19
21
  getTraceId(): string | undefined;
@@ -1 +1 @@
1
- 'use strict';const o=b;function b(c,d){const e=a();return b=function(f,g){f=f-0xa1;let h=e[f];return h;},b(c,d);}(function(c,d){const n=b,e=c();while(!![]){try{const f=parseInt(n(0xa1))/0x1*(-parseInt(n(0xb3))/0x2)+-parseInt(n(0xde))/0x3+parseInt(n(0xaf))/0x4+parseInt(n(0xfc))/0x5+-parseInt(n(0xdd))/0x6*(parseInt(n(0x107))/0x7)+-parseInt(n(0xc1))/0x8+parseInt(n(0xf3))/0x9;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x79b82));var __importDefault=this&&this[o(0xf8)]||function(c){const p=o;return c&&c[p(0xe3)]?c:{'default':c};};Object[o(0x102)](exports,o(0xe3),{'value':!![]}),exports[o(0xd8)]=void 0x0;function a(){const V=['EXECUTE','traceId','/output/metadata/l2s','active','aid','bindActivityTelemetryToState','SYSTEM','setTelemetryContext','setActivityError','endActivitySpan','JOB/','/output/metadata/l1s','hook','4608904gQLXse','../../modules/utils','addTargetTelemetryPaths','getTracer','RESULT','setStreamError','app.activity.data.','type','getActivityParentSpanId','config','app.job.','resolveActivityType','StreamRole','ERROR','number','RESPONSE','leg','metadata','getSpanAttrs','keys','endJobSpan','mapRules','topic','TelemetryService','../../types/stream','app.activity.','trace','signal','1631442AabhWT','1521606toGHNf','TRACE/','span','appId','telemetry','__esModule','setActivityAttributes','trigger','bindJobTelemetryToState','parent','name','../mapper','../../types/telemetry','endStreamSpan','l2s','StreamDataType','FANIN','setStatus','context','app.stream.','CLIENT','10175040yLMLTz','spanContext','startStreamSpan','setSpanContext','spanId','__importDefault','SpanKind','version','../../package.json','3021365NCiDKF','getStreamSpanAttrs','FANOUT','getTraceId','getParentSpanContext','polyfill','defineProperty','startSpan','jobSpan','MapperService','trc','7xOzmUA','boolean','31YHiduU','setStreamAttributes','spn','endSpan','reduce','l1s','SpanStatusCode','$self','setAttributes','default','end','toUpperCase','output','push','3799376utWSNw','/output/metadata/','subscribes','includes','53606OhlWng'];a=function(){return V;};return a();}const package_json_1=__importDefault(require(o(0xfb))),mapper_1=require(o(0xe9)),stream_1=require(o(0xd9)),telemetry_1=require(o(0xea)),utils_1=require(o(0xc2));class TelemetryService{constructor(c,d,e,f){const q=o;this['leg']=0x1,this[q(0xe1)]=c,this[q(0xca)]=d,this[q(0xd2)]=e,this[q(0xf0)]=f;}['getJobParentSpanId'](){const r=o;return this[r(0xf0)][r(0xd2)]['spn'];}[o(0xc9)](c){const s=o;return c===0x1?this[s(0xf0)][this[s(0xca)][s(0xe7)]][s(0xad)]?.[s(0xd2)]?.[s(0xec)]:this['context'][s(0xa8)][s(0xad)]?.[s(0xd2)]?.[s(0xa6)];}[o(0xff)](){const t=o;return this['context'][t(0xd2)][t(0x106)];}['startJobSpan'](){const u=o,c=u(0xbe)+this[u(0xe1)]+'/'+this['config'][u(0xb1)]+'/1',d=this['getTraceId'](),e=this['getJobParentSpanId'](),f=this[u(0xd3)](0x1),g=this['startSpan'](d,e,c,f);return this[u(0x104)]=g,this['setTelemetryContext'](g,0x1),this;}static async['traceActivity'](c,d,e,f,g,h=0x0){const v=o,i=v(0xdf)+c+'/'+e+'/'+h,j=telemetry_1[v(0xdb)][v(0xc4)](package_json_1[v(0xaa)]['name'],package_json_1['default'][v(0xfa)]),k={'traceId':f,'spanId':g,'isRemote':!![],'traceFlags':0x1},l=telemetry_1[v(0xdb)][v(0xf6)](telemetry_1['context'][v(0xb7)](),k);return telemetry_1['context']['with'](l,()=>{const w=v,m=j[w(0x103)](i,{'kind':telemetry_1[w(0xf9)][w(0xf2)],'attributes':d});return m[w(0xa9)](d),m[w(0xab)](),!![];});}['startActivitySpan'](c=this[o(0xd1)]){const x=o,d=this['config']['type'][x(0xac)]()+'/'+this['appId']+'/'+this[x(0xd2)][x(0xb8)]+'/'+c,e=this[x(0xff)](),f=this[x(0xc9)](c),g=this[x(0xd3)](c),h=this[x(0x103)](e,f,d,g);return this[x(0xbb)](h,c),this[x(0xe0)]=h,this;}[o(0xf5)](c,d){const y=o;let e;if(d===stream_1['StreamRole']['SYSTEM'])e=y(0xba);else{if(d===stream_1[y(0xcd)]['WORKER'])e=y(0xb4);else c[y(0xc8)]===stream_1[y(0xed)][y(0xc5)]||c[y(0xc8)]===stream_1['StreamDataType'][y(0xd0)]?e=y(0xee):e=y(0xfe);}const f=c['metadata']['topic']?'/'+c[y(0xd2)][y(0xd7)]:'',g=e+'/'+this[y(0xe1)]+'/'+c[y(0xd2)][y(0xb8)]+f,h=this['getStreamSpanAttrs'](c),i=this['startSpan'](c[y(0xd2)][y(0x106)],c[y(0xd2)][y(0xa3)],g,h);return this[y(0xe0)]=i,this;}[o(0x103)](c,d,e,f){const z=o;this[z(0xb5)]=c,this[z(0xf7)]=d;const g=telemetry_1[z(0xdb)][z(0xc4)](package_json_1[z(0xaa)][z(0xe8)],package_json_1['default'][z(0xfa)]),h=this[z(0x100)](),i=g[z(0x103)](e,{'kind':telemetry_1[z(0xf9)]['CLIENT'],'attributes':f,'root':!h},h);return i;}['mapActivityAttributes'](){const A=o;if(this[A(0xca)][A(0xe2)]){const c=new mapper_1[(A(0x105))](this[A(0xca)][A(0xe2)],this['context'])[A(0xd6)](),d={...Object[A(0xd4)](c)[A(0xa5)]((e,f)=>{const B=A;return['string',B(0x108),B(0xcf)][B(0xb2)](typeof c[f])&&(e[B(0xc7)+f]=c[f]),e;},{})};this[A(0xe0)]?.[A(0xa9)](d);}}[o(0xe4)](c){const C=o;this[C(0xe0)]?.[C(0xa9)](c);}[o(0xa2)](c){const D=o;this['span']?.[D(0xa9)](c);}['setJobAttributes'](c){const E=o;this[E(0x104)]?.[E(0xa9)](c);}[o(0xd5)](){const F=o;this[F(0xa4)](this[F(0x104)]);}[o(0xbd)](){const G=o;this[G(0xa4)](this[G(0xe0)]);}[o(0xeb)](){const H=o;this[H(0xa4)](this[H(0xe0)]);}[o(0xa4)](c){const I=o;c&&c[I(0xab)]();}[o(0x100)](){const J=o;if(this[J(0xb5)]&&this[J(0xf7)]){const c={'traceId':this['traceId'],'spanId':this[J(0xf7)],'isRemote':!![],'traceFlags':0x1},d=telemetry_1['trace'][J(0xf6)](telemetry_1['context'][J(0xb7)](),c);return d;}}['getSpanAttrs'](c){const K=o;return{...Object[K(0xd4)](this[K(0xf0)][K(0xd2)])[K(0xa5)]((d,e)=>{const L=K;return e!=='trc'&&(d[L(0xcb)+e]=this[L(0xf0)][L(0xd2)][e]),d;},{}),...Object[K(0xd4)](this['metadata'])['reduce']((d,e)=>{const M=K;return d[M(0xda)+e]=this[M(0xd2)][e],d;},{}),'app.activity.leg':c};}[o(0xfd)](c){const N=o;return{...Object['keys'](c[N(0xd2)])[N(0xa5)]((d,e)=>{const O=N;return e!==O(0x106)&&e!=='spn'&&(d[O(0xf1)+e]=c[O(0xd2)][e]),d;},{})};}['setTelemetryContext'](c,d){const P=o;!this[P(0xf0)][P(0xd2)]['trc']&&(this[P(0xf0)]['metadata'][P(0x106)]=c[P(0xf4)]()[P(0xb5)]),d===0x1?(!this[P(0xf0)]['$self'][P(0xad)]['metadata']&&(this[P(0xf0)][P(0xa8)]['output'][P(0xd2)]={}),this['context']['$self'][P(0xad)]['metadata'][P(0xa6)]=c['spanContext']()['spanId']):(!this[P(0xf0)][P(0xa8)]['output'][P(0xd2)]&&(this[P(0xf0)]['$self'][P(0xad)][P(0xd2)]={}),this[P(0xf0)]['$self'][P(0xad)]['metadata'][P(0xec)]=c[P(0xf4)]()[P(0xf7)]);}[o(0xbc)](c){const Q=o;this[Q(0xe0)]?.[Q(0xef)]({'code':telemetry_1[Q(0xa7)][Q(0xce)],'message':c});}[o(0xc6)](c){const R=o;this['span']?.['setStatus']({'code':telemetry_1[R(0xa7)][R(0xce)],'message':c});}static[o(0xc3)](c,d,e,f){const S=o;f===0x1?(!(d[S(0xe7)]in c)&&(c[d[S(0xe7)]]=[]),c[d[S(0xe7)]][S(0xae)](d[S(0xe7)]+S(0xb6))):(!(e['aid']in c)&&(c[e[S(0xb8)]]=[]),c[e[S(0xb8)]]['push'](e[S(0xb8)]+S(0xbf)));}static[o(0xe6)](c,d,e){const T=o;d['type']===T(0xe5)&&(c['metadata/trc']=e['metadata'][T(0x106)]);}static[o(0xb9)](c,d,e,f,g){const U=o;if(d[U(0xc8)]===U(0xe5))c[e[U(0xb8)]+U(0xbf)]=f[U(0xa8)][U(0xad)]['metadata'][U(0xa6)],c[e[U(0xb8)]+'/output/metadata/l2s']=f['$self'][U(0xad)]['metadata'][U(0xec)];else{if(utils_1[U(0x101)][U(0xcc)](d[U(0xc8)])===U(0xc0)&&g===0x1)c[e[U(0xb8)]+'/output/metadata/l1s']=f[U(0xa8)][U(0xad)][U(0xd2)][U(0xa6)],c[e[U(0xb8)]+'/output/metadata/l2s']=f['$self'][U(0xad)]['metadata']['l1s'];else{if(d[U(0xc8)]===U(0xdc)&&g===0x1)c[e[U(0xb8)]+U(0xbf)]=f['$self'][U(0xad)]['metadata'][U(0xa6)],c[e[U(0xb8)]+U(0xb6)]=f[U(0xa8)][U(0xad)]['metadata'][U(0xa6)];else{const h='l'+g+'s';c[e[U(0xb8)]+U(0xb0)+h]=f[U(0xa8)]['output'][U(0xd2)][h];}}}}}exports['TelemetryService']=TelemetryService;
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 +1 @@
1
- 'use strict';function b(c,d){const e=a();return b=function(f,g){f=f-0x1e8;let h=e[f];return h;},b(c,d);}const m=b;function a(){const z=['../../modules/utils','max','SubServiceFactory','92652DaAceO','subscriptionHandler','logger','rollcall','consumeMessages','push','stream','../../types/stream','../../modules/key','cancelRollCall','throttle','STREAMS','1064380ntsOId','worker-event-received','45vBPfpN','KeyType','inited','StoreServiceFactory','isArray','appId','8KNeAAK','WorkerService','pub','25168ArLuDK','router','guid','debug','21DUPPkB','subscribe','topic','rollCallInterval','initSubChannel','QUORUM','684MavciC','setThrottle','HMSH_QUORUM_ROLLCALL_CYCLES','ceil','interval','verifyWorkerFields','ConnectorService','204074YTkttU','stop','pong','formatISODate','__esModule','toString','18eBLhkI','defineProperty','worker\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields\x20along\x20with\x20a\x20callback\x20function\x20and\x20topic.','callback','2672PcyFfT','StreamServiceFactory','XSleepFor','reclaimCount','ping','110670kaOqGN','321671rBnWXJ','type','reclaimDelay','sub','../store/factory','signature','doRollCall','workers','identifyProvider','Router','initStoreChannel','initStreamChannel','store','counts','mintKey','namespace','../../modules/enums','../connector/factory','random','sayPong','init','details','getThrottleRate','../router','publish'];a=function(){return z;};return a();}(function(c,d){const l=b,e=c();while(!![]){try{const f=parseInt(l(0x20b))/0x1+-parseInt(l(0x21a))/0x2+parseInt(l(0x1fe))/0x3*(-parseInt(l(0x215))/0x4)+-parseInt(l(0x1f1))/0x5*(parseInt(l(0x237))/0x6)+-parseInt(l(0x21b))/0x7*(-parseInt(l(0x1f7))/0x8)+parseInt(l(0x211))/0x9*(parseInt(l(0x1ef))/0xa)+-parseInt(l(0x1fa))/0xb*(parseInt(l(0x204))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x2097a));Object[m(0x212)](exports,m(0x20f),{'value':!![]}),exports['WorkerService']=void 0x0;const key_1=require(m(0x1eb)),utils_1=require(m(0x234)),factory_1=require(m(0x22c)),router_1=require(m(0x232)),stream_1=require(m(0x1ea)),enums_1=require(m(0x22b)),factory_2=require('../stream/factory'),factory_3=require('../sub/factory'),factory_4=require(m(0x21f));class WorkerService{constructor(){this['reporting']=![];}static async[m(0x22f)](c,d,e,f,g){const n=m,h=[];if(Array[n(0x1f5)](f['workers']))for(const i of f[n(0x222)]){await factory_1[n(0x20a)]['initClients'](i);const j=new WorkerService();j[n(0x209)](i),j[n(0x22a)]=c,j[n(0x1f6)]=d,j['guid']=e,j['callback']=i['callback'],j[n(0x200)]=i[n(0x200)],j['config']=f,j[n(0x239)]=g,await j[n(0x225)](j,i['store']),await j[n(0x202)](j,i[n(0x21e)],i[n(0x1f9)]??i[n(0x227)]),await j['subscribe']['subscribe'](key_1['KeyType'][n(0x203)],j[n(0x238)](),d),await j['subscribe'][n(0x1ff)](key_1[n(0x1f2)][n(0x203)],j[n(0x238)](),d,j[n(0x200)]),await j[n(0x1ff)]['subscribe'](key_1[n(0x1f2)][n(0x203)],j['subscriptionHandler'](),d,j[n(0x1fc)]),await j['initStreamChannel'](j,i[n(0x1e9)],i[n(0x227)]),j[n(0x1fb)]=await j['initRouter'](i,g);const k=j['store']['mintKey'](key_1[n(0x1f2)]['STREAMS'],{'appId':j['appId'],'topic':i['topic']});await j[n(0x1fb)][n(0x23b)](k,'WORKER',j[n(0x1fc)],i[n(0x214)]),j[n(0x1f3)]=(0x0,utils_1[n(0x20e)])(new Date()),h[n(0x1e8)](j);}return h;}['verifyWorkerFields'](c){const o=m;if(!(0x0,utils_1[o(0x223)])(c[o(0x227)])||!(0x0,utils_1[o(0x223)])(c[o(0x1e9)])||!(0x0,utils_1[o(0x223)])(c[o(0x21e)])||!(c['topic']&&c['callback']))throw new Error(o(0x213));}async['initStoreChannel'](c,d){const p=m;c[p(0x227)]=await factory_4[p(0x1f4)]['init'](d,c['namespace'],c[p(0x1f6)],c[p(0x239)]);}async[m(0x202)](c,d,e){const q=m;c[q(0x1ff)]=await factory_3[q(0x236)]['init'](d,e,c[q(0x22a)],c[q(0x1f6)],c[q(0x1fc)],c['logger']);}async[m(0x226)](c,d,e){const r=m;c[r(0x1e9)]=await factory_2[r(0x216)][r(0x22f)](d,e,c[r(0x22a)],c[r(0x1f6)],c[r(0x239)]);}async['initRouter'](c,d){const s=m,e=await this[s(0x227)][s(0x231)](c['topic']);return new router_1[(s(0x224))]({'namespace':this[s(0x22a)],'appId':this['appId'],'guid':this[s(0x1fc)],'role':stream_1['StreamRole']['WORKER'],'topic':c[s(0x200)],'reclaimDelay':c[s(0x21d)],'reclaimCount':c[s(0x218)],'throttle':e},this['stream'],d);}[m(0x238)](){const c=this;return async(d,e)=>{const t=b;c['logger'][t(0x1fd)](t(0x1f0),{'topic':d,'type':e[t(0x21c)]});if(e['type']==='throttle')e[t(0x200)]!==null&&c[t(0x1ed)](e[t(0x1ed)]);else{if(e[t(0x21c)]===t(0x219))c['sayPong'](c[t(0x1f6)],c[t(0x1fc)],e['originator'],e[t(0x230)]);else e[t(0x21c)]===t(0x23a)&&(e[t(0x200)]!==null&&c['doRollCall'](e));}};}async[m(0x221)](c){const u=m;let d=0x0;const e=!isNaN(c[u(0x235)])?c[u(0x235)]:enums_1[u(0x206)];if(this['rollCallInterval'])clearTimeout(this[u(0x201)]);const f=c['interval']/0x2,g=f+Math[u(0x207)](Math[u(0x22d)]()*f);do{await(0x0,utils_1['sleepFor'])(Math[u(0x207)](Math[u(0x22d)]()*0x3e8)),await this['sayPong'](this['appId'],this['guid'],null,!![],c[u(0x220)]);if(!c[u(0x208)])return;const {promise:h,timerId:i}=(0x0,utils_1[u(0x217)])(g*0x3e8);this[u(0x201)]=i,await h;}while(this[u(0x201)]&&d++<e-0x1);}[m(0x1ec)](){const v=m;this[v(0x201)]&&(clearTimeout(this['rollCallInterval']),delete this[v(0x201)]);}[m(0x20c)](){const w=m;this[w(0x1ec)]();}async[m(0x22e)](c,d,e,f=![],g=![]){const x=m;let h;if(f){const i={'appId':this[x(0x1f6)],'topic':this[x(0x200)]};h={'engine_id':this[x(0x1fc)],'namespace':this[x(0x22a)],'app_id':this['appId'],'worker_topic':this[x(0x200)],'stream':this['store'][x(0x229)](key_1[x(0x1f2)][x(0x1ee)],i),'counts':this[x(0x1fb)]?.[x(0x228)],'timestamp':(0x0,utils_1[x(0x20e)])(new Date()),'inited':this[x(0x1f3)],'throttle':this[x(0x1fb)]?.[x(0x1ed)],'reclaimDelay':this[x(0x1fb)]?.[x(0x21d)],'reclaimCount':this[x(0x1fb)]?.[x(0x218)],'system':await(0x0,utils_1['getSystemHealth'])(),'signature':g?this[x(0x214)][x(0x210)]():undefined};}this[x(0x1ff)][x(0x233)](key_1[x(0x1f2)]['QUORUM'],{'type':x(0x20d),'guid':d,'originator':e,'profile':h},c);}async['throttle'](c){const y=m;this[y(0x1fb)]?.[y(0x205)](c);}}exports[m(0x1f8)]=WorkerService;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.3.25",
3
+ "version": "0.3.27",
4
4
  "description": "Serverless Workflow",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -31,7 +31,7 @@
31
31
  "test:meshflow:collision": "NODE_ENV=test jest ./tests/meshflow/collision/*.test.ts --detectOpenHandles --forceExit --verbose",
32
32
  "test:meshflow:fatal": "NODE_ENV=test jest ./tests/meshflow/fatal/*.test.ts --detectOpenHandles --forceExit --verbose",
33
33
  "test:meshflow:goodbye": "NODE_ENV=test jest ./tests/meshflow/goodbye/*.test.ts --detectOpenHandles --forceExit --verbose",
34
- "test:meshflow:hello": "HMSH_LOGLEVEL=debug HMSH_IS_CLUSTER=true NODE_ENV=test jest ./tests/meshflow/helloworld/*.test.ts --detectOpenHandles --forceExit --verbose",
34
+ "test:meshflow:hello": "HMSH_TELEMETRY=debug HMSH_LOGLEVEL=debug HMSH_IS_CLUSTER=true NODE_ENV=test jest ./tests/meshflow/helloworld/*.test.ts --detectOpenHandles --forceExit --verbose",
35
35
  "test:meshflow:hook": "NODE_ENV=test jest ./tests/meshflow/hook/*.test.ts --detectOpenHandles --forceExit --verbose",
36
36
  "test:meshflow:interrupt": "NODE_ENV=test jest ./tests/meshflow/interrupt/*.test.ts --detectOpenHandles --forceExit --verbose",
37
37
  "test:meshflow:loopactivity": "NODE_ENV=test jest ./tests/meshflow/loopactivity/*.test.ts --detectOpenHandles --forceExit --verbose",