@hotmeshio/hotmesh 0.3.26 → 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.
- package/README.md +1 -1
- package/build/modules/key.js +1 -1
- package/build/modules/utils.js +1 -1
- package/build/package.json +1 -1
- package/build/services/activities/activity.js +1 -1
- package/build/services/activities/await.js +1 -1
- package/build/services/activities/cycle.js +1 -1
- package/build/services/activities/hook.js +1 -1
- package/build/services/activities/index.js +1 -1
- package/build/services/activities/interrupt.js +1 -1
- package/build/services/activities/signal.js +1 -1
- package/build/services/activities/trigger.js +1 -1
- package/build/services/activities/worker.js +1 -1
- package/build/services/collator/index.js +1 -1
- package/build/services/compiler/deployer.js +1 -1
- package/build/services/compiler/index.js +1 -1
- package/build/services/compiler/validator.js +1 -1
- package/build/services/engine/index.js +1 -1
- package/build/services/exporter/index.js +1 -1
- package/build/services/mapper/index.js +1 -1
- package/build/services/meshflow/exporter.js +1 -1
- package/build/services/pipe/functions/array.js +1 -1
- package/build/services/pipe/functions/bitwise.js +1 -1
- package/build/services/pipe/functions/conditional.js +1 -1
- package/build/services/pipe/functions/cron.js +1 -1
- package/build/services/pipe/functions/date.js +1 -1
- package/build/services/pipe/functions/index.js +1 -1
- package/build/services/pipe/functions/json.js +1 -1
- package/build/services/pipe/functions/logical.js +1 -1
- package/build/services/pipe/functions/math.js +1 -1
- package/build/services/pipe/functions/number.js +1 -1
- package/build/services/pipe/functions/object.js +1 -1
- package/build/services/pipe/functions/string.js +1 -1
- package/build/services/pipe/functions/symbol.js +1 -1
- package/build/services/pipe/functions/unary.js +1 -1
- package/build/services/pipe/index.js +1 -1
- package/build/services/quorum/index.js +1 -1
- package/build/services/reporter/index.js +1 -1
- package/build/services/router/index.js +1 -1
- package/build/services/search/providers/postgres/postgres.js +1 -1
- package/build/services/search/providers/redis/ioredis.js +1 -1
- package/build/services/search/providers/redis/redis.js +1 -1
- package/build/services/serializer/index.js +1 -1
- package/build/services/store/providers/postgres/kvsql.js +1 -1
- package/build/services/store/providers/postgres/kvtables.js +1 -1
- package/build/services/store/providers/postgres/kvtransaction.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
- package/build/services/store/providers/postgres/kvtypes/zset.js +1 -1
- package/build/services/store/providers/postgres/postgres.js +1 -1
- package/build/services/store/providers/redis/_base.js +1 -1
- package/build/services/store/providers/redis/ioredis.js +1 -1
- package/build/services/store/providers/redis/redis.js +1 -1
- package/build/services/store/providers/store-initializable.js +1 -1
- package/build/services/stream/providers/nats/nats.js +1 -1
- package/build/services/stream/providers/postgres/postgres.js +1 -1
- package/build/services/stream/providers/redis/ioredis.js +1 -1
- package/build/services/stream/providers/redis/redis.js +1 -1
- package/build/services/stream/providers/stream-initializable.js +1 -1
- package/build/services/sub/providers/nats/nats.js +1 -1
- package/build/services/sub/providers/postgres/postgres.js +1 -1
- package/build/services/sub/providers/redis/ioredis.js +1 -1
- package/build/services/sub/providers/redis/redis.js +1 -1
- package/build/services/task/index.js +1 -1
- package/build/services/telemetry/index.js +1 -1
- package/build/services/worker/index.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const w=b;(function(c,d){const v=b,e=c();while(!![]){try{const f=-parseInt(v(0xb7))/0x1+-parseInt(v(0xe2))/0x2*(parseInt(v(0x110))/0x3)+parseInt(v(0xb5))/0x4*(-parseInt(v(0xeb))/0x5)+-parseInt(v(0xd8))/0x6+-parseInt(v(0x137))/0x7*(parseInt(v(0x100))/0x8)+-parseInt(v(0x14d))/0x9+parseInt(v(0xab))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x7bc55));var __createBinding=this&&this[w(0xa4)]||(Object['create']?function(c,d,e,f){const x=w;if(f===undefined)f=e;var g=Object[x(0xb2)](d,e);(!g||('get'in g?!d[x(0x157)]:g['writable']||g['configurable']))&&(g={'enumerable':!![],'get':function(){return d[e];}}),Object[x(0x13b)](c,f,g);}:function(c,d,e,f){if(f===undefined)f=e;c[f]=d[e];}),__setModuleDefault=this&&this[w(0x164)]||(Object[w(0x11c)]?function(c,d){const y=w;Object[y(0x13b)](c,y(0x161),{'enumerable':!![],'value':d});}:function(c,d){c['default']=d;}),__importStar=this&&this['__importStar']||function(c){const z=w;if(c&&c[z(0x157)])return c;var d={};if(c!=null){for(var e in c)if(e!==z(0x161)&&Object[z(0x15a)]['hasOwnProperty'][z(0x13a)](c,e))__createBinding(d,c,e);}return __setModuleDefault(d,c),d;};Object[w(0x13b)](exports,w(0x157),{'value':!![]}),exports[w(0x132)]=void 0x0;function a(){const aP=['then','SerializerService','hsetnx','JOB_DEPENDENTS','namespace\x20not\x20set','suppress','setTransitions','\x20not\x20found','4390137AOjVOJ','min','general','KEYS','APP','getSubscriptions','VALSEP','namespace','getSymbolValues','throw','__esModule','rpush','commands','prototype','max','getApps','hget','HMSH_SCOUT_INTERVAL_SECONDS','Job\x20','cache','default','push','rename','__setModuleDefault','ACTIVITY','getSchema','init','MATCH','INTERRUPT','MAX_DELAY','message','metadata/js','setStatus','JOB','del','activated:','version','hincrbyfloat','invalidate','StoreService','SIGNALS','HOTMESH','hmget','toString','\x20does\x20not\x20exist\x20for\x20app\x20','HMSH_CODE_INTERRUPT','getQueryState','getJobIds','getApp','__createBinding','collateSynthetic','registerAppVersion','getSymbolKeys','setSettings','getStatus','HMSH_SIGNAL_EXPIRE','44738060nNBPZh','KeyType','removeWorkItem','LEFT','active','EXPIRE','lrange','getOwnPropertyDescriptor','../../../../modules/key','../../../serializer','301288AkgOty','hGetAllResult','177202rCxMpw','zRangeByScore','expire','deployed:','deleteProcessedTaskQueue','metadata/err','seedSymbols','setWorkItem','resetSymbols','reserveScoutRole','settings\x20not\x20found','JOB_STATE',':cursor','DEL','../..','JOB_STATS_GENERAL','getJobStats','HSCAN','hgetall','GetStateError','getSubscription','all','setSymbolValues','THROTTLE_RATE','stringify','length','\x20already\x20completed','startsWith','seedJobSymbols','deleteHookSignal','guid','getSymbols','stack','4857408oERfcv','versions/','setThrottleRate','setApp','../../../../modules/errors','serializer','getSymKey','setnxex','addTaskQueues','0.0.0','96516huoNKi','activateAppVersion','logger','../../../../modules/utils','COUNT','transact','hincrby','SUBSCRIPTION_PATTERNS','keys','35lElIqa','delistSignalKey','HOOKS','setHookSignal','getSettings','TYPSEP','reserveSymbolRange','abbreviate','getHookSignal','isArray','mintKey','seedActivitySymbols','join','package','getSchemas','deleteSymbols','parse','reason','getThrottleRate','zrem','lpop','4176pDWLkP','SYMVALS',']\x20interrupted','Cache','hset','SUBSCRIPTIONS','?:?','HMNS','get','setSymbols','zAdd','split','map','formatISODate','SCAN','invalidateCache','63QpWIWP','getThrottleRates','../../../../modules/enums','getRaw','zrangebyscore','unpackage','interrupt','now','getDependencies','resolveTaskKeyContext','setHookRules','exec','create','topic','RIGHT','appId','forEach','metadata/','Version\x20','sleepFor','debug','WORK_ITEMS','TIME_RANGE','zadd','storeClient','setSchemas','slice','JOB_STATS_INDEX','setSubscriptions','entries','getTransitions','MDATA_SYMBOLS','collate','getHookRules','RedisStoreBase','index','delist','../../../../package.json','addSymbolValues','12761hNJPQa','addSymbols','SYMKEYS','call','defineProperty','KeyService','getActiveTaskQueue','deleteSymbolValues','isSuccessful','setState','job\x20[','getNextTask','findJobs','SCHEMAS'];a=function(){return aP;};return a();}function b(c,d){const e=a();return b=function(f,g){f=f-0x8b;let h=e[f];return h;},b(c,d);}const errors_1=require(w(0xdc)),key_1=require(w(0xb3)),serializer_1=require(w(0xb4)),utils_1=require(w(0xe5)),enums_1=require(w(0x112)),cache_1=require('../../cache'),__1=require(w(0xc5));class RedisStoreBase extends __1[w(0x9a)]{constructor(c){const A=w;super(c),this[A(0x159)]={},this[A(0x128)]=c;}async[w(0x8d)](c=key_1[w(0x107)],d,e){const B=w;this['namespace']=c,this[B(0x11f)]=d,this['logger']=e;const f=await this[B(0xef)](!![]);return this[B(0x160)]=new cache_1[(B(0x103))](d,f),this[B(0xdd)]=new serializer_1[(B(0x146))](),await this[B(0xa3)](d),this['cache'][B(0x15c)]();}[w(0x13f)](c){return c>0x0||c==='OK'||c===!![];}async[w(0xec)](c,d){const C=w;await this[C(0x128)][this['commands'][C(0x95)]](c+':'+d);}async[w(0x10a)](c,d,e,f){const D=w;return await(f||this[D(0x128)])[this[D(0x159)][D(0x127)]](c,d,e);}async[w(0xb8)](c,d,e){const E=w,f=await this[E(0x128)][this['commands'][E(0x114)]](c,d,e);if(f?.[E(0xd0)]>0x0)return f[0x0];return null;}[w(0xf5)](c,d){const F=w;if(!this[F(0x154)])throw new Error(F(0x149));return key_1[F(0x13c)][F(0xf5)](this[F(0x154)],c,d);}[w(0x10f)](){const G=w;this[G(0x160)][G(0x99)]();}async[w(0xc0)](c,d=enums_1[w(0x15e)]){const H=w,e=this['mintKey'](key_1['KeyType'][H(0x125)],{'appId':this[H(0x11f)],'scoutType':c}),f=await this[H(0x11b)]('SET',e,c+':'+(0x0,utils_1['formatISODate'])(new Date()),'NX','EX',''+(d-0x1));return this[H(0x13f)](f);}async['releaseScoutRole'](c){const I=w,d=this[I(0xf5)](key_1[I(0xac)][I(0x125)],{'appId':this[I(0x11f)],'scoutType':c}),e=await this[I(0x11b)](I(0xc4),d);return this['isSuccessful'](e);}async['getSettings'](c=![]){const J=w;let d=this['cache']?.['getSettings']();if(d)return d;else{if(c){const e=await Promise['resolve']()[J(0x145)](()=>__importStar(require(J(0x135)))),f=e['version']||J(0xe1);return d={'namespace':key_1[J(0x107)],'version':f},await this[J(0xa8)](d),d;}}throw new Error(J(0xc1));}async[w(0xa8)](c){const K=w,d={},e=this['mintKey'](key_1[K(0xac)][K(0x9c)],d);return await this['storeClient'][this[K(0x159)][K(0x104)]](e,c);}async['reserveSymbolRange'](c,d,e,f=0x1){const L=w,g=this[L(0xf5)](key_1[L(0xac)]['SYMKEYS'],{'appId':this[L(0x11f)]}),h=this[L(0xf5)](key_1[L(0xac)][L(0x139)],{'activityId':c,'appId':this['appId']}),i=await this[L(0x128)][this[L(0x159)][L(0x147)]](g,c,L(0x106));if(i){const j=await this['storeClient'][this[L(0x159)][L(0xe8)]](g,L(0xc3),d),k=j-d,l=k+':'+(j-0x1);await this[L(0x128)][this[L(0x159)][L(0x104)]](g,c,l);const m=this[L(0xbd)](c,e,k);return await this[L(0x128)][this[L(0x159)][L(0x104)]](h,m),[k+serializer_1['MDATA_SYMBOLS']['SLOTS'],j-0x1,{}];}else{const n=await this[L(0x128)][this[L(0x159)][L(0x15d)]](g,c),[o]=n[L(0x10b)](':');if(o==='?'){await(0x0,utils_1[L(0x123)])(f*0x3e8);if(f<0x5)return this[L(0xf1)](c,d,e,f+0x1);else throw new Error('Symbol\x20range\x20reservation\x20failed\x20due\x20to\x20deployment\x20contention');}else{const p=parseInt(o,0xa),q=await this[L(0x128)][this[L(0x159)][L(0xc9)]](h),r=Object[L(0xea)](q)[L(0xd0)],s=p+serializer_1[L(0x12f)]['SLOTS']+r,t=Number(p+d-0x1);return[s,t,q];}}}async['getAllSymbols'](){const M=w,c=this['mintKey'](key_1[M(0xac)][M(0x139)],{'appId':this['appId']}),d=await this[M(0x128)][this['commands']['hgetall']](c),e=Object[M(0xea)](d)['sort']();delete e[M(0xc3)];const f=this[M(0xe7)]();for(const i of e){const j=this[M(0xf5)](key_1['KeyType'][M(0x139)],{'activityId':i,'appId':this[M(0x11f)]});f[this['commands'][M(0xc9)]](j);}const g=await f['exec'](),h={};return g[M(0x120)]((k,l)=>{const N=M;if(k){let m;Array[N(0xf4)](k)&&k[N(0xd0)]===0x2?m=k[0x1]:m=k;for(const [n,o]of Object['entries'](m)){h[o]=n['startsWith'](e[l])?n:e[l]+'/'+n;}}}),h;}async[w(0xd6)](c){const O=w;let d=this['cache']['getSymbols'](this[O(0x11f)],c);if(d)return d;else{const e={'activityId':c,'appId':this[O(0x11f)]},f=this['mintKey'](key_1[O(0xac)][O(0x139)],e);return d=await this['storeClient'][this[O(0x159)][O(0xc9)]](f),this[O(0x160)][O(0x109)](this[O(0x11f)],c,d),d;}}async[w(0x138)](c,d){const P=w;if(!d||!Object[P(0xea)](d)[P(0xd0)])return![];const e={'activityId':c,'appId':this[P(0x11f)]},f=this['mintKey'](key_1[P(0xac)][P(0x139)],e),g=await this[P(0x128)][this['commands']['hset']](f,d);return this[P(0x160)][P(0xfa)](this[P(0x11f)],c),g>0x0;}['seedSymbols'](c,d,e){const Q=w;if(d===Q(0x94))return this[Q(0xd3)](e);return this[Q(0xf6)](e,c);}[w(0xd3)](c){const R=w,d={};return serializer_1[R(0x12f)][R(0x94)]['KEYS'][R(0x120)](e=>{const S=R;d[S(0x121)+e]=(0x0,utils_1[S(0xde)])(c),c++;}),d;}['seedActivitySymbols'](c,d){const T=w,e={};return serializer_1[T(0x12f)][T(0x8b)][T(0x150)][T(0x120)](f=>{e[d+'/output/metadata/'+f]=(0x0,utils_1['getSymKey'])(c),c++;}),e;}async[w(0x155)](){const U=w;let c=this[U(0x160)][U(0x155)](this[U(0x11f)]);if(c)return c;else{const d=this['mintKey'](key_1[U(0xac)][U(0x101)],{'appId':this['appId']});return c=await this[U(0x128)][this[U(0x159)][U(0xc9)]](d),this['cache'][U(0xcd)](this['appId'],c),c;}}async[w(0x136)](c){const V=w;if(!c||!Object[V(0xea)](c)['length'])return![];const d=this[V(0xf5)](key_1[V(0xac)][V(0x101)],{'appId':this[V(0x11f)]}),e=await this[V(0x128)][this[V(0x159)]['hset']](d,c);return this[V(0x160)][V(0x13e)](this[V(0x11f)]),this[V(0x13f)](e);}async[w(0xa7)](c){const W=w,d=[];for(const g of c){d[W(0x162)](this[W(0xd6)](g));}const e=await Promise[W(0xcc)](d),f={};for(const h of c){f[h]=e['shift']();}return f;}async[w(0xa3)](c,d=![]){const X=w;let f=this[X(0x160)][X(0xa3)](c);if(d||!(f&&Object[X(0xea)](f)[X(0xd0)]>0x0)){const g={'appId':c},h=this['mintKey'](key_1['KeyType'][X(0x151)],g),i=await this['storeClient'][this[X(0x159)][X(0xc9)]](h);if(!i)return null;f={};for(const j in i){try{j===X(0xaf)?f[j]=i[j]==='true':f[j]=i[j];}catch(k){f[j]=i[j];}}this['cache'][X(0xdb)](c,f);}return f;}async[w(0xdb)](c,d){const Y=w,e={'appId':c},f=this[Y(0xf5)](key_1[Y(0xac)]['APP'],e),g=Y(0xd9)+d,h={'id':c,'version':d,[g]:Y(0xba)+(0x0,utils_1[Y(0x10d)])(new Date())};return await this[Y(0x128)][this[Y(0x159)][Y(0x104)]](f,h),this[Y(0x160)]['setApp'](c,h),h;}async[w(0xe3)](c,d){const Z=w,e={'appId':c},f=this['mintKey'](key_1['KeyType']['APP'],e),g=Z(0xd9)+d,h=await this[Z(0xa3)](c,!![]);if(h&&h[g]){const i={'id':c,'version':d[Z(0x9e)](),[g]:Z(0x96)+(0x0,utils_1[Z(0x10d)])(new Date()),'active':!![]};return Object[Z(0x12d)](i)[Z(0x120)](([j,k])=>{const a0=Z;i[j]=k[a0(0x9e)]();}),await this[Z(0x128)][this['commands'][Z(0x104)]](f,i),!![];}throw new Error(Z(0x122)+d+Z(0x9f)+c);}async[w(0xa6)](c,d){const a1=w,e={'appId':c},f=this[a1(0xf5)](key_1['KeyType'][a1(0x151)],e),g={'id':c,'version':d['toString'](),[a1(0xd9)+d]:(0x0,utils_1[a1(0x10d)])(new Date())};return await this[a1(0x128)][this[a1(0x159)][a1(0x104)]](f,g);}async['setStats'](c,d,e,f,g,h){const a2=w,i={'appId':g['id'],'jobId':d,'jobKey':c,'dateTime':e},j=h||this[a2(0xe7)]();if(f[a2(0x14f)][a2(0xd0)]){const k=this[a2(0xf5)](key_1[a2(0xac)][a2(0xc6)],i);for(const {target:l,value:m}of f[a2(0x14f)]){j[this[a2(0x159)][a2(0x98)]](k,l,m);}}for(const {target:n,value:o}of f[a2(0x133)]){const p={...i,'facet':n},q=this[a2(0xf5)](key_1['KeyType'][a2(0x12b)],p);j[this[a2(0x159)]['rpush']](q,o[a2(0x9e)]());}for(const {target:r,value:s}of f['median']){const t={...i,'facet':r},u=this[a2(0xf5)](key_1[a2(0xac)]['JOB_STATS_MEDIAN'],t);this[a2(0x10a)](u,s,r,j);}if(!h)return await j['exec']();}[w(0xb6)](c){return c;}async[w(0xc7)](c){const a3=w,d=this['transact']();for(const g of c){d[this['commands'][a3(0xc9)]](g);}const e=await d[a3(0x11b)](),f={};for(const [h,i]of e[a3(0x12d)]()){const j=c[h],k=this[a3(0xb6)](i);if(k&&Object[a3(0xea)](k)[a3(0xd0)]>0x0){const l={...k};for(const [m,n]of Object[a3(0x12d)](l)){l[m]=Number(n);}f[j]=l;}else f[j]={};}return f;}async[w(0xa2)](c,d){const a4=w,e=this['transact']();for(const h of c){e[this[a4(0x159)][a4(0xb1)]](h,d[0x0],d[0x1]);}const f=await e['exec'](),g={};for(const [i,j]of f['entries']()){const k=c[i],l=j[0x1]||j;l&&l[a4(0xd0)]>0x0?g[k]=l:g[k]=[];}return g;}async[w(0x93)](c,d,e,f){const a5=w,g=this['mintKey'](key_1[a5(0xac)][a5(0xc2)],{'appId':e,'jobId':d});return await(f||this[a5(0x128)])[this[a5(0x159)]['hincrbyfloat']](g,':',c);}async[w(0xa9)](c,d){const a6=w,e=this[a6(0xf5)](key_1[a6(0xac)][a6(0xc2)],{'appId':d,'jobId':c}),f=await this[a6(0x128)][this[a6(0x159)][a6(0x15d)]](e,':');if(f===null)throw new Error(a6(0x15f)+c+a6(0x14c));return Number(f);}async[w(0x140)]({...c},d,e,f,g,h){const a7=w;delete c[a7(0x92)];const i=this['mintKey'](key_1[a7(0xac)][a7(0xc2)],{'appId':this[a7(0x11f)],'jobId':e}),j=await this[a7(0xa7)](f),k=await this[a7(0x155)]();this[a7(0xdd)][a7(0xbf)](j,k,g);const l=this[a7(0xdd)][a7(0xf8)](c,f);return d!==null?l[':']=d[a7(0x9e)]():delete l[':'],await(h||this['storeClient'])[this['commands'][a7(0x104)]](i,l),e;}async[w(0xa1)](c,d){const a8=w,e=this['mintKey'](key_1[a8(0xac)]['JOB_STATE'],{'appId':this[a8(0x11f)],'jobId':c}),f=d[a8(0x10c)](i=>{const a9=a8;if(i[a9(0xd2)]('\x22'))return i[a9(0x12a)](0x1,-0x1);return'_'+i;}),g=await this['storeClient'][this[a8(0x159)][a8(0x9d)]](e,f),h={};return d['forEach']((i,j)=>{const aa=a8;i['startsWith']('\x22')&&(i=i[aa(0x12a)](0x1,-0x1)),h[i]=g[j];}),h;}async['getState'](c,d,e){const ab=w,f=this[ab(0xf5)](key_1[ab(0xac)][ab(0xc2)],{'appId':this[ab(0x11f)],'jobId':c}),g=Object[ab(0xea)](d),h=await this[ab(0xa7)](g);this[ab(0xdd)][ab(0xbf)](h,{},e);const i=this['serializer'][ab(0xf2)](d,g,[':']),j=await this[ab(0x128)][this[ab(0x159)][ab(0x9d)]](f,i),k={};let l=![];i[ab(0x120)]((m,n)=>{j[n]&&(l=!![]),k[m]=j[n];});if(l){const m=await this[ab(0x155)]();this[ab(0xdd)]['resetSymbols'](h,m,e);const n=this[ab(0xdd)][ab(0x115)](k,g);let o=0x0;return n[':']&&(o=Number(n[':']),n[ab(0x92)]=o,delete n[':']),[n,o];}else throw new errors_1['GetStateError'](c);}async[w(0x113)](c){const ac=w,d=this[ac(0xf5)](key_1[ac(0xac)]['JOB_STATE'],{'appId':this[ac(0x11f)],'jobId':c}),e=await this['storeClient'][this[ac(0x159)][ac(0xc9)]](d);if(!e)throw new errors_1[(ac(0xca))](c);return e;}async[w(0x130)](c,d,e,f,g){const ad=w,h=this[ad(0xf5)](key_1[ad(0xac)][ad(0xc2)],{'appId':this['appId'],'jobId':c}),i=d+'/output/metadata/as',j=[d],k=await this['getSymbolKeys'](j),l=await this['getSymbolValues']();this[ad(0xdd)][ad(0xbf)](k,l,f);const m={[i]:e[ad(0x9e)]()},n=this[ad(0xdd)]['package'](m,j),o=Object[ad(0xea)](n)[0x0];return await(g||this[ad(0x128)])[this[ad(0x159)][ad(0x98)]](h,o,e);}async[w(0xa5)](c,d,e,f){const ae=w,g=this['mintKey'](key_1[ae(0xac)]['JOB_STATE'],{'appId':this[ae(0x11f)],'jobId':c});return await(f||this[ae(0x128)])[this[ae(0x159)][ae(0x98)]](g,d,e[ae(0x9e)]());}async['setStateNX'](c,d,e){const af=w,f=this[af(0xf5)](key_1['KeyType'][af(0xc2)],{'appId':d,'jobId':c}),g=await this[af(0x128)][this[af(0x159)]['hsetnx']](f,':',e?.[af(0x9e)]()??'1');return this[af(0x13f)](g);}async[w(0x8c)](c,d){const ag=w,e=this[ag(0x160)][ag(0x8c)](d['id'],d['version'],c);if(e)return e;else{const f=await this[ag(0xf9)](d);return f[c];}}async[w(0xf9)](c){const ah=w;let d=this[ah(0x160)][ah(0xf9)](c['id'],c[ah(0x97)]);if(d&&Object['keys'](d)[ah(0xd0)]>0x0)return d;else{const e={'appId':c['id'],'appVersion':c['version']},f=this[ah(0xf5)](key_1[ah(0xac)]['SCHEMAS'],e);d={};const g=await this['storeClient'][this[ah(0x159)][ah(0xc9)]](f);return Object[ah(0x12d)](g)['forEach'](([h,i])=>{d[h]=JSON['parse'](i);}),this[ah(0x160)][ah(0x129)](c['id'],c[ah(0x97)],d),d;}}async[w(0x129)](c,d){const ai=w,e={'appId':d['id'],'appVersion':d['version']},f=this['mintKey'](key_1['KeyType'][ai(0x144)],e),g={...c};Object['entries'](g)['forEach'](([i,j])=>{g[i]=JSON['stringify'](j);});const h=await this['storeClient'][this[ai(0x159)][ai(0x104)]](f,g);return this[ai(0x160)]['setSchemas'](d['id'],d[ai(0x97)],c),h;}async[w(0x12c)](c,d){const aj=w,e={'appId':d['id'],'appVersion':d[aj(0x97)]},f=this['mintKey'](key_1[aj(0xac)][aj(0x105)],e),g={...c};Object['entries'](g)[aj(0x120)](([i,j])=>{const ak=aj;g[i]=JSON[ak(0xcf)](j);});const h=await this[aj(0x128)][this[aj(0x159)][aj(0x104)]](f,g);return this[aj(0x160)]['setSubscriptions'](d['id'],d[aj(0x97)],c),this[aj(0x13f)](h);}async[w(0x152)](c){const al=w;let d=this[al(0x160)]['getSubscriptions'](c['id'],c['version']);if(d&&Object[al(0xea)](d)[al(0xd0)]>0x0)return d;else{const e={'appId':c['id'],'appVersion':c[al(0x97)]},f=this['mintKey'](key_1[al(0xac)][al(0x105)],e);return d=await this[al(0x128)][this['commands'][al(0xc9)]](f)||{},Object[al(0x12d)](d)[al(0x120)](([g,h])=>{const am=al;d[g]=JSON[am(0xfb)](h);}),this[al(0x160)]['setSubscriptions'](c['id'],c['version'],d),d;}}async[w(0xcb)](c,d){const e=await this['getSubscriptions'](d);return e[c];}async[w(0x14b)](c,d){const an=w,e={'appId':d['id'],'appVersion':d['version']},f=this[an(0xf5)](key_1[an(0xac)][an(0xe9)],e),g={...c};Object['entries'](g)['forEach'](([h,i])=>{const ao=an;g[h]=JSON[ao(0xcf)](i);});if(Object['keys'](g)[an(0xd0)]!==0x0){const h=await this[an(0x128)][this['commands']['hset']](f,g);return this[an(0x160)][an(0x14b)](d['id'],d[an(0x97)],c),h;}}async[w(0x12e)](c){const ap=w;let d=this[ap(0x160)][ap(0x12e)](c['id'],c[ap(0x97)]);if(d&&Object[ap(0xea)](d)[ap(0xd0)]>0x0)return d;else{const e={'appId':c['id'],'appVersion':c[ap(0x97)]},f=this[ap(0xf5)](key_1[ap(0xac)][ap(0xe9)],e);d={};const g=await this[ap(0x128)][this[ap(0x159)][ap(0xc9)]](f);return Object['entries'](g)[ap(0x120)](([h,i])=>{const aq=ap;d[h]=JSON[aq(0xfb)](i);}),this[ap(0x160)][ap(0x14b)](c['id'],c['version'],d),d;}}async['setHookRules'](c){const ar=w,d=this[ar(0xf5)](key_1[ar(0xac)][ar(0xed)],{'appId':this['appId']}),e={};Object[ar(0x12d)](c)[ar(0x120)](([f,g])=>{const as=ar;e[f[as(0x9e)]()]=JSON['stringify'](g);});if(Object['keys'](e)['length']!==0x0){const f=await this[ar(0x128)][this['commands'][ar(0x104)]](d,e);return this[ar(0x160)][ar(0x11a)](this[ar(0x11f)],c),f;}}async[w(0x131)](){const at=w;let c=this[at(0x160)]['getHookRules'](this[at(0x11f)]);if(c&&Object[at(0xea)](c)[at(0xd0)]>0x0)return c;else{const d=this['mintKey'](key_1[at(0xac)][at(0xed)],{'appId':this[at(0x11f)]}),e=await this[at(0x128)][this['commands'][at(0xc9)]](d);return c={},Object[at(0x12d)](e)['forEach'](([f,g])=>{const au=at;c[f]=JSON[au(0xfb)](g);}),this[at(0x160)][at(0x11a)](this['appId'],c),c;}}async[w(0xee)](c,d){const av=w,e=this['mintKey'](key_1[av(0xac)]['SIGNALS'],{'appId':this[av(0x11f)]}),{topic:f,resolved:g,jobId:h}=c,i=f+':'+g;await this[av(0xdf)](e+':'+i,h,Math[av(0x15b)](c[av(0xb9)],enums_1[av(0xaa)]));}async[w(0xf3)](c,d){const aw=w,e=this[aw(0xf5)](key_1[aw(0xac)]['SIGNALS'],{'appId':this[aw(0x11f)]}),f=await this['storeClient'][this[aw(0x159)][aw(0x108)]](e+':'+c+':'+d);return f?f[aw(0x9e)]():undefined;}async[w(0xd4)](c,d){const ax=w,e=this[ax(0xf5)](key_1[ax(0xac)][ax(0x9b)],{'appId':this[ax(0x11f)]}),f=await this['storeClient'][this[ax(0x159)][ax(0x95)]](e+':'+c+':'+d);return f?Number(f):undefined;}async[w(0xe0)](c){const ay=w,d=this['transact'](),e=this[ay(0xf5)](key_1['KeyType'][ay(0x125)],{'appId':this[ay(0x11f)]});for(const f of c){d[this[ay(0x159)][ay(0x127)]](e,{'score':Date[ay(0x117)]()['toString'](),'value':f},{'NX':!![]});}await d[ay(0x11b)]();}async[w(0x13d)](){const az=w;let c=this[az(0x160)][az(0x13d)](this['appId'])||null;if(!c){const d=this[az(0xf5)](key_1[az(0xac)][az(0x125)],{'appId':this[az(0x11f)]}),e=await this[az(0x128)][this[az(0x159)]['zrange']](d,0x0,0x0);c=e['length']>0x0?e[0x0]:null,c&&this[az(0x160)][az(0xbe)](this[az(0x11f)],c);}return c;}async[w(0xbb)](c,d,e,f=![]){const aA=w,g=this[aA(0xf5)](key_1['KeyType'][aA(0x125)],{'appId':this[aA(0x11f)]}),h=await this[aA(0x128)][this[aA(0x159)]['zrem']](g,c);h&&(f?(this[aA(0x128)][this[aA(0x159)][aA(0xb9)]](e,0x0),this[aA(0x128)][this[aA(0x159)][aA(0xb9)]](d[aA(0x10b)](':')['slice'](0x0,0x5)[aA(0xf7)](':'),0x0)):await this['storeClient'][this['commands'][aA(0x163)]](e,d)),this[aA(0x160)][aA(0xad)](this[aA(0x11f)]);}async['processTaskQueue'](c,d){const aB=w;return await this[aB(0x128)][this['commands']['lmove']](c,d,aB(0xae),aB(0x11e));}async['expireJob'](c,d,e){const aC=w;if(!isNaN(d)&&d>0x0){const f=this[aC(0xf5)](key_1['KeyType'][aC(0xc2)],{'appId':this[aC(0x11f)],'jobId':c});await(e||this['storeClient'])[this[aC(0x159)][aC(0xb9)]](f,d);}}async[w(0x118)](c){const aD=w,d={'appId':this[aD(0x11f)],'jobId':c},e=this[aD(0xf5)](key_1[aD(0xac)][aD(0x148)],d);return this[aD(0x128)][this[aD(0x159)][aD(0xb1)]](e,0x0,-0x1);}async['registerTimeHook'](c,d,e,f,g,h,i){const aE=w,j=this[aE(0xf5)](key_1[aE(0xac)][aE(0x126)],{'appId':this[aE(0x11f)],'timeValue':g}),k=[f,e,d,h,c][aE(0xf7)](key_1['VALSEP']),l=await(i||this[aE(0x128)])[this[aE(0x159)][aE(0x158)]](j,k);if(i||l===0x1){const m=this[aE(0xf5)](key_1[aE(0xac)][aE(0x126)],{'appId':this[aE(0x11f)]});await this['zAdd'](m,g[aE(0x9e)](),j,i);}}async[w(0x142)](c){const aF=w,d=this['mintKey'](key_1[aF(0xac)]['TIME_RANGE'],{'appId':this[aF(0x11f)]});c=c||await this[aF(0xb8)](d,0x0,Date[aF(0x117)]());if(c){let [e,f]=this['resolveTaskKeyContext'](c);const g=await this['storeClient'][this['commands'][aF(0xff)]](f);if(g){let [h,i,j,k,...l]=g['split'](key_1[aF(0x153)]);const m=l['join'](key_1[aF(0x153)]);if(h===aF(0x134))e=aF(0x134);else{if(h==='child')e='child';else h==='expire-child'&&(h=aF(0xb9));}return[c,m,j,i,e];}return await this[aF(0x128)][this[aF(0x159)][aF(0xfe)]](d,c),!![];}return![];}[w(0x119)](c){const aG=w;if(c[aG(0xd2)](key_1[aG(0xf0)]+aG(0x8f)))return[aG(0x116),c[aG(0x10b)](key_1[aG(0xf0)])[0x2]];else return c[aG(0xd2)](key_1[aG(0xf0)]+aG(0xb0))?[aG(0xb9),c['split'](key_1['TYPSEP'])[0x2]]:['sleep',c];}async[w(0x116)](c,d,f={}){const aH=w;try{const g=await this['getStatus'](d,this['appId']);if(g<=0x0)throw new Error(aH(0x15f)+d+aH(0xd1));const h=-0x3b9aca00,i=this[aH(0xf5)](key_1['KeyType']['JOB_STATE'],{'appId':this[aH(0x11f)],'jobId':d}),j=await this[aH(0x128)][this['commands'][aH(0x98)]](i,':',h);if(j<=h)throw new Error(aH(0x15f)+d+aH(0xd1));if(f[aH(0x156)]!==![]){const k=aH(0xbc),l=['$'+c],m=await this['getSymbolKeys'](l),n=await this[aH(0x155)]();this[aH(0xdd)]['resetSymbols'](m,n,{});const o=JSON[aH(0xcf)]({'code':f['code']??enums_1[aH(0xa0)],'message':f[aH(0xfc)]??aH(0x141)+d+aH(0x102),'stack':f[aH(0xd7)]??'','job_id':d}),p={[k]:h[aH(0x9e)]()},q=this[aH(0xdd)][aH(0xf8)](p,l),r=Object[aH(0xea)](q)[0x0];await this[aH(0x128)][this[aH(0x159)][aH(0x104)]](i,r,o);}}catch(s){if(!f[aH(0x14a)])throw s;else this[aH(0xe4)][aH(0x124)]('suppressed-interrupt',{'message':s[aH(0x91)]});}}async['scrub'](c){const aI=w,d=this['mintKey'](key_1[aI(0xac)][aI(0xc2)],{'appId':this['appId'],'jobId':c});await this[aI(0x128)][this['commands'][aI(0x95)]](d);}async[w(0x143)](c='*',d=0x3e8,e=0x3e8,f='0'){const aJ=w,g=this[aJ(0xf5)](key_1[aJ(0xac)][aJ(0xc2)],{'appId':this['appId'],'jobId':c});let h;const i=[];do{const j=await this[aJ(0x11b)](aJ(0x10e),f,'MATCH',g,aJ(0xe6),e[aJ(0x9e)]());if(Array['isArray'](j)){[f,h]=j;for(const k of[...h]){i[aJ(0x162)](k);}if(i[aJ(0xd0)]>=d)break;}else break;}while(f!=='0');return[f,i];}async['findJobFields'](c,d='*',e=0x3e8,f=0x3e8,g='0'){const aK=w;let h=[];const j={},k=this[aK(0xf5)](key_1[aK(0xac)][aK(0xc2)],{'appId':this[aK(0x11f)],'jobId':c});let l=0x0;do{const m=await this[aK(0x11b)](aK(0xc8),k,g,aK(0x8e),d,'COUNT',f['toString']());if(Array['isArray'](m)){[g,h]=m;for(let n=0x0;n<h[aK(0xd0)];n+=0x2){l++,j[h[n]]=h[n+0x1];}}else break;}while(g!=='0'&&l<e);return[g,j];}async[w(0xda)](c){const aL=w,d=this[aL(0xf5)](key_1[aL(0xac)][aL(0xce)],{'appId':this[aL(0x11f)]});if(c[aL(0xd5)])return;const e=c['throttle'][aL(0x9e)]();if(c[aL(0x11d)])await this[aL(0x128)][this[aL(0x159)][aL(0x104)]](d,{[c[aL(0x11d)]]:e});else{const f=this[aL(0xe7)]();f[this['commands'][aL(0x95)]](d),f[this[aL(0x159)]['hset']](d,{':':e}),await f['exec']();}}async[w(0x111)](){const aM=w,c=this[aM(0xf5)](key_1[aM(0xac)][aM(0xce)],{'appId':this['appId']}),d=await this['storeClient'][this['commands'][aM(0xc9)]](c);return d??{};}async[w(0xfd)](c){const aO=w,d=(g,h)=>{const aN=b,i=h in g?Number(g[h]):0x0;if(isNaN(i))return 0x0;if(i==-0x1)return enums_1[aN(0x90)];return Math[aN(0x15b)](Math[aN(0x14e)](i,enums_1[aN(0x90)]),0x0);},e=await this[aO(0x111)](),f=d(e,':');if(c===':'||!(c in e))return f;return d(e,c);}}exports[w(0x132)]=RedisStoreBase;
|
|
1
|
+
'use strict';const w=b;(function(c,d){const v=b,e=c();while(!![]){try{const f=-parseInt(v(0xd0))/0x1*(-parseInt(v(0xb2))/0x2)+parseInt(v(0xd4))/0x3+-parseInt(v(0x141))/0x4*(-parseInt(v(0x124))/0x5)+-parseInt(v(0x16d))/0x6*(parseInt(v(0x15e))/0x7)+parseInt(v(0xee))/0x8+parseInt(v(0x163))/0x9*(parseInt(v(0x10c))/0xa)+parseInt(v(0x108))/0xb*(-parseInt(v(0xb4))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xd9505));var __createBinding=this&&this[w(0x14a)]||(Object[w(0xae)]?function(c,d,e,f){const x=w;if(f===undefined)f=e;var g=Object[x(0xdd)](d,e);(!g||('get'in g?!d[x(0x11e)]:g[x(0xf9)]||g[x(0x15a)]))&&(g={'enumerable':!![],'get':function(){return d[e];}}),Object['defineProperty'](c,f,g);}:function(c,d,e,f){if(f===undefined)f=e;c[f]=d[e];}),__setModuleDefault=this&&this[w(0x10b)]||(Object[w(0xae)]?function(c,d){Object['defineProperty'](c,'default',{'enumerable':!![],'value':d});}:function(c,d){const y=w;c[y(0x14f)]=d;}),__importStar=this&&this['__importStar']||function(c){const z=w;if(c&&c['__esModule'])return c;var d={};if(c!=null){for(var e in c)if(e!==z(0x14f)&&Object[z(0xaf)][z(0xc3)][z(0xba)](c,e))__createBinding(d,c,e);}return __setModuleDefault(d,c),d;};function b(c,d){const e=a();return b=function(f,g){f=f-0x92;let h=e[f];return h;},b(c,d);}Object[w(0xe9)](exports,w(0x11e),{'value':!![]}),exports[w(0xa7)]=void 0x0;function a(){const aQ=['hset','exec','namespace','init','seedActivitySymbols','setHookRules','hasOwnProperty','metadata/','all','activateAppVersion','startsWith','RIGHT','hmget','reserveSymbolRange','getThrottleRates','COUNT','logger','setSubscriptions','setThrottleRate','1041826jgeUHi','lrange','getStatus','entries','3836991yZuXIT','\x20already\x20completed','SET','/output/metadata/as','SCHEMAS','stack','length','../../../../modules/key','max','getOwnPropertyDescriptor','getJobStats','join','addSymbols','TYPSEP','split','expire','index','reason','message','code','EXPIRE','defineProperty','interrupt','version','invalidate','hget','13022488qYkuBf','reserveScoutRole','zrem','throttle','getApps','JOB_DEPENDENTS','Job\x20','../../../../modules/utils','sleep','keys','SYMKEYS','writable','../../../../modules/enums','deployed:','setTransitions','JOB','sort','zadd','then','setSettings','deleteSymbols','isSuccessful','rename','cache','VALSEP','getHookRules','341hXiIwY','getActiveTaskQueue','shift','__setModuleDefault','7800quqSuV','deleteSymbolValues','zrange','THROTTLE_RATE','setHookSignal','JOB_STATS_INDEX','delist','MDATA_SYMBOLS','WORK_ITEMS','ACTIVITY','APP','general','HMNS','JOB_STATE','setSchemas','../../../serializer','setApp','commands','__esModule','0.0.0','push','getSubscriptions','topic','registerAppVersion','7909610ytbztN','getQueryState','activated:','KeyType','debug','metadata/js','?:?','setWorkItem','seedSymbols','setnxex','getSymKey','SYMVALS','getSymbolValues','JOB_STATS_GENERAL','HMSH_SIGNAL_EXPIRE','\x20does\x20not\x20exist\x20for\x20app\x20','KEYS','unpackage','getNextTask','getApp','hsetnx','JOB_STATS_MEDIAN','SUBSCRIPTION_PATTERNS','getJobIds','Symbol\x20range\x20reservation\x20failed\x20due\x20to\x20deployment\x20contention','forEach','toString','\x20not\x20found','guid','4MswdSt','collate','delistSignalKey','HSCAN','namespace\x20not\x20set','GetStateError','package','zRangeByScore','serializer','__createBinding','suppress','SerializerService','hgetall','lpop','default','Version\x20','getState','deleteHookSignal','zAdd','getSymbols','del','transact','min','seedJobSymbols','setSymbols','configurable','setState','LEFT',']\x20interrupted','1178422WqdrBM','hincrbyfloat','child','settings\x20not\x20found','../..','4518UPUAZm','storeClient','collateSynthetic','/output/metadata/','metadata/err','parse','expireJob','TIME_RANGE','MATCH','resolveTaskKeyContext','18MYxGAH','appId','setSymbolValues','SIGNALS','getSettings','addTaskQueues','../../../../modules/errors','KeyService','mintKey','HOOKS','lmove','isArray','get','versions/','getRaw','DEL','HMSH_CODE_INTERRUPT','expire-child','rpush','getSchema','stringify','registerTimeHook','getTransitions','SUBSCRIPTIONS','RedisStoreBase','zrangebyscore','deleteProcessedTaskQueue','formatISODate','map','getSchemas','getAllSymbols','create','prototype','setStatus','resetSymbols','2TnBAqk','getSymbolKeys','1752372vFxkyY','SLOTS','hGetAllResult','scrub','now','slice','call','MAX_DELAY','Cache'];a=function(){return aQ;};return a();}const errors_1=require(w(0x95)),key_1=require(w(0xdb)),serializer_1=require(w(0x11b)),utils_1=require(w(0xf5)),enums_1=require(w(0xfa)),cache_1=require('../../cache'),__1=require(w(0x162));class RedisStoreBase extends __1['StoreService']{constructor(c){const A=w;super(c),this['commands']={},this[A(0x164)]=c;}async[w(0xc0)](c=key_1[w(0x118)],d,e){const B=w;this[B(0xbf)]=c,this[B(0x16e)]=d,this['logger']=e;const f=await this['getSettings'](!![]);return this[B(0x105)]=new cache_1[(B(0xbc))](d,f),this['serializer']=new serializer_1[(B(0x14c))](),await this[B(0x137)](d),this[B(0x105)][B(0xf2)]();}[w(0x103)](c){return c>0x0||c==='OK'||c===!![];}async[w(0x143)](c,d){const C=w;await this[C(0x164)][this[C(0x11d)]['del']](c+':'+d);}async[w(0x153)](c,d,e,f){const D=w;return await(f||this[D(0x164)])[this[D(0x11d)][D(0xff)]](c,d,e);}async[w(0x148)](c,d,e){const E=w,f=await this[E(0x164)][this[E(0x11d)][E(0xa8)]](c,d,e);if(f?.['length']>0x0)return f[0x0];return null;}[w(0x97)](c,d){const F=w;if(!this[F(0xbf)])throw new Error(F(0x145));return key_1[F(0x96)][F(0x97)](this[F(0xbf)],c,d);}['invalidateCache'](){const G=w;this[G(0x105)][G(0xec)]();}async[w(0xef)](c,d=enums_1['HMSH_SCOUT_INTERVAL_SECONDS']){const H=w,e=this['mintKey'](key_1[H(0x127)][H(0x114)],{'appId':this['appId'],'scoutType':c}),f=await this[H(0xbe)](H(0xd6),e,c+':'+(0x0,utils_1[H(0xaa)])(new Date()),'NX','EX',''+(d-0x1));return this['isSuccessful'](f);}async['releaseScoutRole'](c){const I=w,d=this['mintKey'](key_1[I(0x127)][I(0x114)],{'appId':this[I(0x16e)],'scoutType':c}),e=await this['exec'](I(0x9e),d);return this[I(0x103)](e);}async[w(0x93)](c=![]){const J=w;let d=this['cache']?.['getSettings']();if(d)return d;else{if(c){const e=await Promise['resolve']()[J(0x100)](()=>__importStar(require('../../../../package.json'))),f=e['version']||J(0x11f);return d={'namespace':key_1['HMNS'],'version':f},await this[J(0x101)](d),d;}}throw new Error(J(0x161));}async[w(0x101)](c){const K=w,d={},e=this[K(0x97)](key_1[K(0x127)]['HOTMESH'],d);return await this['storeClient'][this[K(0x11d)]['hset']](e,c);}async[w(0xca)](c,d,e,f=0x1){const L=w,g=this[L(0x97)](key_1[L(0x127)]['SYMKEYS'],{'appId':this[L(0x16e)]}),h=this[L(0x97)](key_1['KeyType']['SYMKEYS'],{'activityId':c,'appId':this[L(0x16e)]}),i=await this[L(0x164)][this[L(0x11d)][L(0x138)]](g,c,L(0x12a));if(i){const j=await this[L(0x164)][this['commands']['hincrby']](g,':cursor',d),k=j-d,l=k+':'+(j-0x1);await this[L(0x164)][this[L(0x11d)][L(0xbd)]](g,c,l);const m=this[L(0x12c)](c,e,k);return await this[L(0x164)][this[L(0x11d)][L(0xbd)]](h,m),[k+serializer_1['MDATA_SYMBOLS'][L(0xb5)],j-0x1,{}];}else{const n=await this['storeClient'][this[L(0x11d)]['hget']](g,c),[o]=n[L(0xe2)](':');if(o==='?'){await(0x0,utils_1['sleepFor'])(f*0x3e8);if(f<0x5)return this[L(0xca)](c,d,e,f+0x1);else throw new Error(L(0x13c));}else{const p=parseInt(o,0xa),q=await this['storeClient'][this[L(0x11d)][L(0x14d)]](h),r=Object[L(0xf7)](q)[L(0xda)],s=p+serializer_1[L(0x113)][L(0xb5)]+r,t=Number(p+d-0x1);return[s,t,q];}}}async[w(0xad)](){const M=w,c=this[M(0x97)](key_1[M(0x127)]['SYMKEYS'],{'appId':this['appId']}),d=await this['storeClient'][this[M(0x11d)][M(0x14d)]](c),e=Object['keys'](d)[M(0xfe)]();delete e[':cursor'];const f=this[M(0x156)]();for(const i of e){const j=this['mintKey'](key_1[M(0x127)][M(0xf8)],{'activityId':i,'appId':this[M(0x16e)]});f[this[M(0x11d)]['hgetall']](j);}const g=await f[M(0xbe)](),h={};return g[M(0x13d)]((k,l)=>{const N=M;if(k){let m;Array[N(0x9a)](k)&&k[N(0xda)]===0x2?m=k[0x1]:m=k;for(const [n,o]of Object[N(0xd3)](m)){h[o]=n['startsWith'](e[l])?n:e[l]+'/'+n;}}}),h;}async['getSymbols'](c){const O=w;let d=this[O(0x105)][O(0x154)](this['appId'],c);if(d)return d;else{const e={'activityId':c,'appId':this[O(0x16e)]},f=this[O(0x97)](key_1[O(0x127)][O(0xf8)],e);return d=await this[O(0x164)][this[O(0x11d)]['hgetall']](f),this['cache'][O(0x159)](this[O(0x16e)],c,d),d;}}async[w(0xe0)](c,d){const P=w;if(!d||!Object[P(0xf7)](d)[P(0xda)])return![];const e={'activityId':c,'appId':this[P(0x16e)]},f=this[P(0x97)](key_1[P(0x127)]['SYMKEYS'],e),g=await this[P(0x164)][this['commands'][P(0xbd)]](f,d);return this['cache'][P(0x102)](this[P(0x16e)],c),g>0x0;}['seedSymbols'](c,d,e){const Q=w;if(d===Q(0xfd))return this[Q(0x158)](e);return this['seedActivitySymbols'](e,c);}['seedJobSymbols'](c){const R=w,d={};return serializer_1[R(0x113)][R(0xfd)]['KEYS']['forEach'](e=>{const S=R;d[S(0xc4)+e]=(0x0,utils_1['getSymKey'])(c),c++;}),d;}[w(0xc1)](c,d){const T=w,e={};return serializer_1[T(0x113)][T(0x115)][T(0x134)][T(0x13d)](f=>{const U=T;e[d+U(0x166)+f]=(0x0,utils_1[U(0x12e)])(c),c++;}),e;}async['getSymbolValues'](){const V=w;let c=this['cache'][V(0x130)](this['appId']);if(c)return c;else{const d=this[V(0x97)](key_1['KeyType'][V(0x12f)],{'appId':this[V(0x16e)]});return c=await this[V(0x164)][this[V(0x11d)][V(0x14d)]](d),this[V(0x105)][V(0x16f)](this[V(0x16e)],c),c;}}async['addSymbolValues'](c){const W=w;if(!c||!Object[W(0xf7)](c)[W(0xda)])return![];const d=this[W(0x97)](key_1[W(0x127)]['SYMVALS'],{'appId':this[W(0x16e)]}),e=await this[W(0x164)][this[W(0x11d)][W(0xbd)]](d,c);return this['cache'][W(0x10d)](this[W(0x16e)]),this['isSuccessful'](e);}async[w(0xb3)](c){const X=w,d=[];for(const g of c){d[X(0x120)](this[X(0x154)](g));}const e=await Promise[X(0xc5)](d),f={};for(const h of c){f[h]=e[X(0x10a)]();}return f;}async['getApp'](c,d=![]){const Y=w;let f=this['cache'][Y(0x137)](c);if(d||!(f&&Object[Y(0xf7)](f)[Y(0xda)]>0x0)){const g={'appId':c},h=this[Y(0x97)](key_1[Y(0x127)]['APP'],g),i=await this[Y(0x164)][this[Y(0x11d)]['hgetall']](h);if(!i)return null;f={};for(const j in i){try{j==='active'?f[j]=i[j]==='true':f[j]=i[j];}catch(k){f[j]=i[j];}}this['cache'][Y(0x11c)](c,f);}return f;}async[w(0x11c)](c,d){const Z=w,e={'appId':c},f=this[Z(0x97)](key_1[Z(0x127)]['APP'],e),g=Z(0x9c)+d,h={'id':c,'version':d,[g]:Z(0xfb)+(0x0,utils_1['formatISODate'])(new Date())};return await this[Z(0x164)][this[Z(0x11d)][Z(0xbd)]](f,h),this[Z(0x105)][Z(0x11c)](c,h),h;}async[w(0xc6)](c,d){const a0=w,e={'appId':c},f=this[a0(0x97)](key_1[a0(0x127)][a0(0x116)],e),g=a0(0x9c)+d,h=await this[a0(0x137)](c,!![]);if(h&&h[g]){const i={'id':c,'version':d[a0(0x13e)](),[g]:a0(0x126)+(0x0,utils_1[a0(0xaa)])(new Date()),'active':!![]};return Object[a0(0xd3)](i)[a0(0x13d)](([j,k])=>{const a1=a0;i[j]=k[a1(0x13e)]();}),await this[a0(0x164)][this[a0(0x11d)][a0(0xbd)]](f,i),!![];}throw new Error(a0(0x150)+d+a0(0x133)+c);}async[w(0x123)](c,d){const a2=w,e={'appId':c},f=this[a2(0x97)](key_1[a2(0x127)]['APP'],e),g={'id':c,'version':d['toString'](),[a2(0x9c)+d]:(0x0,utils_1[a2(0xaa)])(new Date())};return await this['storeClient'][this['commands']['hset']](f,g);}async['setStats'](c,d,e,f,g,h){const a3=w,i={'appId':g['id'],'jobId':d,'jobKey':c,'dateTime':e},j=h||this[a3(0x156)]();if(f['general'][a3(0xda)]){const k=this[a3(0x97)](key_1['KeyType'][a3(0x131)],i);for(const {target:l,value:m}of f[a3(0x117)]){j[this[a3(0x11d)][a3(0x15f)]](k,l,m);}}for(const {target:n,value:o}of f[a3(0xe4)]){const p={...i,'facet':n},q=this[a3(0x97)](key_1[a3(0x127)][a3(0x111)],p);j[this[a3(0x11d)][a3(0xa1)]](q,o[a3(0x13e)]());}for(const {target:r,value:s}of f['median']){const t={...i,'facet':r},u=this[a3(0x97)](key_1[a3(0x127)][a3(0x139)],t);this[a3(0x153)](u,s,r,j);}if(!h)return await j['exec']();}[w(0xb6)](c){return c;}async[w(0xde)](c){const a4=w,d=this[a4(0x156)]();for(const g of c){d[this['commands'][a4(0x14d)]](g);}const e=await d['exec'](),f={};for(const [h,i]of e[a4(0xd3)]()){const j=c[h],k=this['hGetAllResult'](i);if(k&&Object[a4(0xf7)](k)['length']>0x0){const l={...k};for(const [m,n]of Object[a4(0xd3)](l)){l[m]=Number(n);}f[j]=l;}else f[j]={};}return f;}async[w(0x13b)](c,d){const a5=w,e=this[a5(0x156)]();for(const h of c){e[this[a5(0x11d)][a5(0xd1)]](h,d[0x0],d[0x1]);}const f=await e[a5(0xbe)](),g={};for(const [i,j]of f['entries']()){const k=c[i],l=j[0x1]||j;l&&l[a5(0xda)]>0x0?g[k]=l:g[k]=[];}return g;}async[w(0xb0)](c,d,e,f){const a6=w,g=this[a6(0x97)](key_1[a6(0x127)]['JOB_STATE'],{'appId':e,'jobId':d});return await(f||this[a6(0x164)])[this[a6(0x11d)][a6(0x15f)]](g,':',c);}async[w(0xd2)](c,d){const a7=w,e=this[a7(0x97)](key_1[a7(0x127)][a7(0x119)],{'appId':d,'jobId':c}),f=await this[a7(0x164)][this[a7(0x11d)][a7(0xed)]](e,':');if(f===null)throw new Error(a7(0xf4)+c+a7(0x13f));return Number(f);}async[w(0x15b)]({...c},d,e,f,g,h){const a8=w;delete c[a8(0x129)];const i=this['mintKey'](key_1[a8(0x127)][a8(0x119)],{'appId':this[a8(0x16e)],'jobId':e}),j=await this[a8(0xb3)](f),k=await this[a8(0x130)]();this[a8(0x149)][a8(0xb1)](j,k,g);const l=this[a8(0x149)][a8(0x147)](c,f);return d!==null?l[':']=d[a8(0x13e)]():delete l[':'],await(h||this[a8(0x164)])[this[a8(0x11d)][a8(0xbd)]](i,l),e;}async[w(0x125)](c,d){const a9=w,e=this[a9(0x97)](key_1['KeyType'][a9(0x119)],{'appId':this[a9(0x16e)],'jobId':c}),f=d[a9(0xab)](i=>{const aa=a9;if(i[aa(0xc7)]('\x22'))return i[aa(0xb9)](0x1,-0x1);return'_'+i;}),g=await this['storeClient'][this[a9(0x11d)][a9(0xc9)]](e,f),h={};return d[a9(0x13d)]((i,j)=>{const ab=a9;i[ab(0xc7)]('\x22')&&(i=i[ab(0xb9)](0x1,-0x1)),h[i]=g[j];}),h;}async[w(0x151)](c,d,e){const ac=w,f=this[ac(0x97)](key_1[ac(0x127)][ac(0x119)],{'appId':this[ac(0x16e)],'jobId':c}),g=Object[ac(0xf7)](d),h=await this[ac(0xb3)](g);this[ac(0x149)]['resetSymbols'](h,{},e);const i=this[ac(0x149)]['abbreviate'](d,g,[':']),j=await this['storeClient'][this[ac(0x11d)][ac(0xc9)]](f,i),k={};let l=![];i[ac(0x13d)]((m,n)=>{j[n]&&(l=!![]),k[m]=j[n];});if(l){const m=await this[ac(0x130)]();this['serializer'][ac(0xb1)](h,m,e);const n=this['serializer'][ac(0x135)](k,g);let o=0x0;return n[':']&&(o=Number(n[':']),n[ac(0x129)]=o,delete n[':']),[n,o];}else throw new errors_1[(ac(0x146))](c);}async[w(0x9d)](c){const ad=w,d=this[ad(0x97)](key_1['KeyType']['JOB_STATE'],{'appId':this[ad(0x16e)],'jobId':c}),e=await this['storeClient'][this[ad(0x11d)][ad(0x14d)]](d);if(!e)throw new errors_1[(ad(0x146))](c);return e;}async[w(0x142)](c,d,e,f,g){const ae=w,h=this[ae(0x97)](key_1[ae(0x127)][ae(0x119)],{'appId':this[ae(0x16e)],'jobId':c}),i=d+ae(0xd7),j=[d],k=await this[ae(0xb3)](j),l=await this[ae(0x130)]();this[ae(0x149)][ae(0xb1)](k,l,f);const m={[i]:e[ae(0x13e)]()},n=this[ae(0x149)][ae(0x147)](m,j),o=Object[ae(0xf7)](n)[0x0];return await(g||this['storeClient'])[this[ae(0x11d)]['hincrbyfloat']](h,o,e);}async[w(0x165)](c,d,e,f){const af=w,g=this['mintKey'](key_1[af(0x127)]['JOB_STATE'],{'appId':this[af(0x16e)],'jobId':c});return await(f||this[af(0x164)])[this['commands'][af(0x15f)]](g,d,e['toString']());}async['setStateNX'](c,d,e){const ag=w,f=this[ag(0x97)](key_1[ag(0x127)][ag(0x119)],{'appId':d,'jobId':c}),g=await this[ag(0x164)][this[ag(0x11d)]['hsetnx']](f,':',e?.['toString']()??'1');return this[ag(0x103)](g);}async[w(0xa2)](c,d){const ah=w,e=this[ah(0x105)]['getSchema'](d['id'],d[ah(0xeb)],c);if(e)return e;else{const f=await this[ah(0xac)](d);return f[c];}}async[w(0xac)](c){const ai=w;let d=this['cache'][ai(0xac)](c['id'],c[ai(0xeb)]);if(d&&Object[ai(0xf7)](d)['length']>0x0)return d;else{const e={'appId':c['id'],'appVersion':c[ai(0xeb)]},f=this[ai(0x97)](key_1[ai(0x127)][ai(0xd8)],e);d={};const g=await this['storeClient'][this[ai(0x11d)][ai(0x14d)]](f);return Object[ai(0xd3)](g)[ai(0x13d)](([h,i])=>{const aj=ai;d[h]=JSON[aj(0x168)](i);}),this['cache'][ai(0x11a)](c['id'],c[ai(0xeb)],d),d;}}async[w(0x11a)](c,d){const ak=w,e={'appId':d['id'],'appVersion':d[ak(0xeb)]},f=this[ak(0x97)](key_1[ak(0x127)][ak(0xd8)],e),g={...c};Object[ak(0xd3)](g)[ak(0x13d)](([i,j])=>{const al=ak;g[i]=JSON[al(0xa3)](j);});const h=await this[ak(0x164)][this[ak(0x11d)][ak(0xbd)]](f,g);return this[ak(0x105)]['setSchemas'](d['id'],d[ak(0xeb)],c),h;}async[w(0xce)](c,d){const am=w,e={'appId':d['id'],'appVersion':d['version']},f=this[am(0x97)](key_1[am(0x127)][am(0xa6)],e),g={...c};Object[am(0xd3)](g)['forEach'](([i,j])=>{const an=am;g[i]=JSON[an(0xa3)](j);});const h=await this[am(0x164)][this['commands'][am(0xbd)]](f,g);return this[am(0x105)][am(0xce)](d['id'],d['version'],c),this['isSuccessful'](h);}async[w(0x121)](c){const ao=w;let d=this[ao(0x105)]['getSubscriptions'](c['id'],c[ao(0xeb)]);if(d&&Object[ao(0xf7)](d)['length']>0x0)return d;else{const e={'appId':c['id'],'appVersion':c[ao(0xeb)]},f=this[ao(0x97)](key_1[ao(0x127)][ao(0xa6)],e);return d=await this[ao(0x164)][this['commands'][ao(0x14d)]](f)||{},Object['entries'](d)['forEach'](([g,h])=>{const ap=ao;d[g]=JSON[ap(0x168)](h);}),this['cache'][ao(0xce)](c['id'],c[ao(0xeb)],d),d;}}async['getSubscription'](c,d){const aq=w,e=await this[aq(0x121)](d);return e[c];}async['setTransitions'](c,d){const ar=w,e={'appId':d['id'],'appVersion':d[ar(0xeb)]},f=this[ar(0x97)](key_1[ar(0x127)][ar(0x13a)],e),g={...c};Object[ar(0xd3)](g)[ar(0x13d)](([h,i])=>{const as=ar;g[h]=JSON[as(0xa3)](i);});if(Object[ar(0xf7)](g)[ar(0xda)]!==0x0){const h=await this['storeClient'][this[ar(0x11d)][ar(0xbd)]](f,g);return this['cache'][ar(0xfc)](d['id'],d[ar(0xeb)],c),h;}}async['getTransitions'](c){const at=w;let d=this[at(0x105)][at(0xa5)](c['id'],c[at(0xeb)]);if(d&&Object[at(0xf7)](d)['length']>0x0)return d;else{const e={'appId':c['id'],'appVersion':c[at(0xeb)]},f=this[at(0x97)](key_1['KeyType'][at(0x13a)],e);d={};const g=await this[at(0x164)][this[at(0x11d)]['hgetall']](f);return Object[at(0xd3)](g)['forEach'](([h,i])=>{d[h]=JSON['parse'](i);}),this[at(0x105)][at(0xfc)](c['id'],c['version'],d),d;}}async[w(0xc2)](c){const au=w,d=this[au(0x97)](key_1['KeyType'][au(0x98)],{'appId':this['appId']}),e={};Object['entries'](c)[au(0x13d)](([f,g])=>{const av=au;e[f[av(0x13e)]()]=JSON[av(0xa3)](g);});if(Object[au(0xf7)](e)['length']!==0x0){const f=await this['storeClient'][this[au(0x11d)][au(0xbd)]](d,e);return this['cache'][au(0xc2)](this['appId'],c),f;}}async[w(0x107)](){const aw=w;let c=this[aw(0x105)][aw(0x107)](this[aw(0x16e)]);if(c&&Object[aw(0xf7)](c)[aw(0xda)]>0x0)return c;else{const d=this[aw(0x97)](key_1[aw(0x127)][aw(0x98)],{'appId':this[aw(0x16e)]}),e=await this['storeClient'][this[aw(0x11d)][aw(0x14d)]](d);return c={},Object['entries'](e)[aw(0x13d)](([f,g])=>{c[f]=JSON['parse'](g);}),this['cache'][aw(0xc2)](this[aw(0x16e)],c),c;}}async[w(0x110)](c,d){const ax=w,e=this['mintKey'](key_1[ax(0x127)][ax(0x92)],{'appId':this[ax(0x16e)]}),{topic:f,resolved:g,jobId:h}=c,i=f+':'+g;await this[ax(0x12d)](e+':'+i,h,Math[ax(0xdc)](c['expire'],enums_1[ax(0x132)]));}async['getHookSignal'](c,d){const ay=w,e=this[ay(0x97)](key_1['KeyType'][ay(0x92)],{'appId':this[ay(0x16e)]}),f=await this['storeClient'][this['commands'][ay(0x9b)]](e+':'+c+':'+d);return f?f[ay(0x13e)]():undefined;}async[w(0x152)](c,d){const az=w,e=this[az(0x97)](key_1[az(0x127)]['SIGNALS'],{'appId':this[az(0x16e)]}),f=await this[az(0x164)][this[az(0x11d)]['del']](e+':'+c+':'+d);return f?Number(f):undefined;}async[w(0x94)](c){const aA=w,d=this[aA(0x156)](),e=this[aA(0x97)](key_1[aA(0x127)]['WORK_ITEMS'],{'appId':this[aA(0x16e)]});for(const f of c){d[this[aA(0x11d)][aA(0xff)]](e,{'score':Date[aA(0xb8)]()[aA(0x13e)](),'value':f},{'NX':!![]});}await d[aA(0xbe)]();}async[w(0x109)](){const aB=w;let c=this[aB(0x105)][aB(0x109)](this[aB(0x16e)])||null;if(!c){const d=this['mintKey'](key_1['KeyType'][aB(0x114)],{'appId':this[aB(0x16e)]}),e=await this[aB(0x164)][this[aB(0x11d)][aB(0x10e)]](d,0x0,0x0);c=e['length']>0x0?e[0x0]:null,c&&this[aB(0x105)][aB(0x12b)](this['appId'],c);}return c;}async[w(0xa9)](c,d,e,f=![]){const aC=w,g=this[aC(0x97)](key_1[aC(0x127)][aC(0x114)],{'appId':this['appId']}),h=await this[aC(0x164)][this[aC(0x11d)][aC(0xf0)]](g,c);h&&(f?(this[aC(0x164)][this[aC(0x11d)][aC(0xe3)]](e,0x0),this[aC(0x164)][this[aC(0x11d)]['expire']](d[aC(0xe2)](':')[aC(0xb9)](0x0,0x5)[aC(0xdf)](':'),0x0)):await this['storeClient'][this[aC(0x11d)][aC(0x104)]](e,d)),this['cache']['removeWorkItem'](this['appId']);}async['processTaskQueue'](c,d){const aD=w;return await this[aD(0x164)][this['commands'][aD(0x99)]](c,d,aD(0x15c),aD(0xc8));}async[w(0x169)](c,d,e){const aE=w;if(!isNaN(d)&&d>0x0){const f=this['mintKey'](key_1[aE(0x127)][aE(0x119)],{'appId':this['appId'],'jobId':c});await(e||this[aE(0x164)])[this[aE(0x11d)][aE(0xe3)]](f,d);}}async['getDependencies'](c){const aF=w,d={'appId':this[aF(0x16e)],'jobId':c},e=this[aF(0x97)](key_1['KeyType'][aF(0xf3)],d);return this[aF(0x164)][this[aF(0x11d)][aF(0xd1)]](e,0x0,-0x1);}async[w(0xa4)](c,d,e,f,g,h,i){const aG=w,j=this[aG(0x97)](key_1[aG(0x127)]['TIME_RANGE'],{'appId':this['appId'],'timeValue':g}),k=[f,e,d,h,c][aG(0xdf)](key_1[aG(0x106)]),l=await(i||this[aG(0x164)])[this['commands'][aG(0xa1)]](j,k);if(i||l===0x1){const m=this[aG(0x97)](key_1[aG(0x127)]['TIME_RANGE'],{'appId':this[aG(0x16e)]});await this[aG(0x153)](m,g[aG(0x13e)](),j,i);}}async[w(0x136)](c){const aH=w,d=this[aH(0x97)](key_1[aH(0x127)][aH(0x16a)],{'appId':this[aH(0x16e)]});c=c||await this[aH(0x148)](d,0x0,Date['now']());if(c){let [e,f]=this[aH(0x16c)](c);const g=await this[aH(0x164)][this[aH(0x11d)][aH(0x14e)]](f);if(g){let [h,i,j,k,...l]=g[aH(0xe2)](key_1['VALSEP']);const m=l[aH(0xdf)](key_1[aH(0x106)]);if(h==='delist')e=aH(0x112);else{if(h===aH(0x160))e=aH(0x160);else h===aH(0xa0)&&(h=aH(0xe3));}return[c,m,j,i,e];}return await this[aH(0x164)][this[aH(0x11d)]['zrem']](d,c),!![];}return![];}['resolveTaskKeyContext'](c){const aI=w;if(c[aI(0xc7)](key_1['TYPSEP']+'INTERRUPT'))return[aI(0xea),c[aI(0xe2)](key_1['TYPSEP'])[0x2]];else return c['startsWith'](key_1[aI(0xe1)]+aI(0xe8))?[aI(0xe3),c[aI(0xe2)](key_1['TYPSEP'])[0x2]]:[aI(0xf6),c];}async[w(0xea)](c,d,f={}){const aJ=w;try{const g=await this[aJ(0xd2)](d,this['appId']);if(g<=0x0)throw new Error(aJ(0xf4)+d+aJ(0xd5));const h=-0x3b9aca00,i=this[aJ(0x97)](key_1[aJ(0x127)][aJ(0x119)],{'appId':this[aJ(0x16e)],'jobId':d}),j=await this[aJ(0x164)][this[aJ(0x11d)][aJ(0x15f)]](i,':',h);if(j<=h)throw new Error('Job\x20'+d+'\x20already\x20completed');if(f['throw']!==![]){const k=aJ(0x167),l=['$'+c],m=await this[aJ(0xb3)](l),n=await this[aJ(0x130)]();this[aJ(0x149)][aJ(0xb1)](m,n,{});const o=JSON[aJ(0xa3)]({'code':f[aJ(0xe7)]??enums_1[aJ(0x9f)],'message':f[aJ(0xe5)]??'job\x20['+d+aJ(0x15d),'stack':f[aJ(0xd9)]??'','job_id':d}),p={[k]:h['toString']()},q=this[aJ(0x149)]['package'](p,l),r=Object['keys'](q)[0x0];await this[aJ(0x164)][this['commands'][aJ(0xbd)]](i,r,o);}}catch(s){if(!f[aJ(0x14b)])throw s;else this[aJ(0xcd)][aJ(0x128)]('suppressed-interrupt',{'message':s[aJ(0xe6)]});}}async[w(0xb7)](c){const aK=w,d=this['mintKey'](key_1[aK(0x127)][aK(0x119)],{'appId':this['appId'],'jobId':c});await this[aK(0x164)][this[aK(0x11d)][aK(0x155)]](d);}async['findJobs'](c='*',d=0x3e8,e=0x3e8,f='0'){const aL=w,g=this['mintKey'](key_1['KeyType']['JOB_STATE'],{'appId':this[aL(0x16e)],'jobId':c});let h;const i=[];do{const j=await this['exec']('SCAN',f,aL(0x16b),g,aL(0xcc),e['toString']());if(Array['isArray'](j)){[f,h]=j;for(const k of[...h]){i[aL(0x120)](k);}if(i[aL(0xda)]>=d)break;}else break;}while(f!=='0');return[f,i];}async['findJobFields'](c,d='*',e=0x3e8,f=0x3e8,g='0'){const aM=w;let h=[];const j={},k=this[aM(0x97)](key_1[aM(0x127)][aM(0x119)],{'appId':this[aM(0x16e)],'jobId':c});let l=0x0;do{const m=await this[aM(0xbe)](aM(0x144),k,g,aM(0x16b),d,'COUNT',f['toString']());if(Array[aM(0x9a)](m)){[g,h]=m;for(let n=0x0;n<h['length'];n+=0x2){l++,j[h[n]]=h[n+0x1];}}else break;}while(g!=='0'&&l<e);return[g,j];}async[w(0xcf)](c){const aN=w,d=this[aN(0x97)](key_1['KeyType'][aN(0x10f)],{'appId':this[aN(0x16e)]});if(c[aN(0x140)])return;const e=c[aN(0xf1)][aN(0x13e)]();if(c[aN(0x122)])await this[aN(0x164)][this[aN(0x11d)][aN(0xbd)]](d,{[c[aN(0x122)]]:e});else{const f=this[aN(0x156)]();f[this['commands'][aN(0x155)]](d),f[this['commands'][aN(0xbd)]](d,{':':e}),await f[aN(0xbe)]();}}async[w(0xcb)](){const aO=w,c=this['mintKey'](key_1['KeyType'][aO(0x10f)],{'appId':this['appId']}),d=await this[aO(0x164)][this['commands'][aO(0x14d)]](c);return d??{};}async['getThrottleRate'](c){const d=(g,h)=>{const aP=b,i=h in g?Number(g[h]):0x0;if(isNaN(i))return 0x0;if(i==-0x1)return enums_1[aP(0xbb)];return Math[aP(0xdc)](Math[aP(0x157)](i,enums_1[aP(0xbb)]),0x0);},e=await this['getThrottleRates'](),f=d(e,':');if(c===':'||!(c in e))return f;return d(e,c);}}exports[w(0xa7)]=RedisStoreBase;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const n=b;(function(c,d){const m=b,e=c();while(!![]){try{const f=parseInt(m(
|
|
1
|
+
'use strict';const n=b;(function(c,d){const m=b,e=c();while(!![]){try{const f=parseInt(m(0x1e1))/0x1+parseInt(m(0x1dc))/0x2*(-parseInt(m(0x1c4))/0x3)+parseInt(m(0x1d2))/0x4+-parseInt(m(0x1f6))/0x5+parseInt(m(0x1e5))/0x6*(parseInt(m(0x1e2))/0x7)+-parseInt(m(0x1f3))/0x8+-parseInt(m(0x1f4))/0x9;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xbd3fc));Object['defineProperty'](exports,n(0x1cf),{'value':!![]}),exports['IORedisStoreService']=void 0x0;const key_1=require(n(0x1cb)),enums_1=require('../../../../modules/enums'),_base_1=require(n(0x1c2));function b(c,d){const e=a();return b=function(f,g){f=f-0x1c1;let h=e[f];return h;},b(c,d);}function a(){const N=['6jtOrMD','push','scan','sendCommand','every','890045otPltK','455987mkkSdz','command','xgroup','114VjyMEN','set','hGetAllResult','zrank','now','transact','mintKey','hdel','args','commands','HMSH_IS_CLUSTER','hmget','setnxex','storeClient','4500728AeltWL','11174148vuYdZm','hincrbyfloat','2504200NYTkKC','lmove','forEach','length','hincrby','rpush','hset','del','IORedisStoreService','xdel','WORK_ITEMS','addTaskQueues','toString','./_base','appId','325617QySiao','xadd','multi','map','hscan','expire','zrange','../../../../modules/key','hget','xclaim','exec','__esModule','zrem','xlen','5112240MsLVSm','hgetall','RedisStoreBase','zrangebyscore','isArray','isSuccessful','rename','zadd','apply','xack'];a=function(){return N;};return a();}class IORedisStoreService extends _base_1[n(0x1d4)]{constructor(c){const o=n;super(c),this[o(0x1ee)]={'get':'get','set':o(0x1e6),'setnx':'setnx','del':'del','expire':'expire','hset':o(0x1fc),'hscan':o(0x1c8),'hsetnx':'hsetnx','hincrby':o(0x1fa),'hdel':o(0x1ec),'hget':o(0x1cc),'hmget':'hmget','hgetall':o(0x1d3),'hincrbyfloat':o(0x1f5),'zrank':o(0x1e8),'zrange':o(0x1ca),'zrangebyscore_withscores':'zrangebyscore','zrangebyscore':o(0x1d5),'zrem':o(0x1d0),'zadd':o(0x1d9),'lmove':o(0x1f7),'lpop':'lpop','lrange':'lrange','rename':o(0x1d8),'rpush':o(0x1fb),'scan':o(0x1de),'xack':o(0x1db),'xdel':'xdel'};}[n(0x1ea)](){const p=n,c=this;if(enums_1[p(0x1ef)]){const d=[],e=(g,h)=>{const q=p;return d[q(0x1dd)]({'command':g,'args':h}),f;},f={'sendCommand'(g){const r=p;return c[r(0x1f2)][r(0x1df)](g);},async 'exec'(){const s=p;if(d[s(0x1f9)]===0x0)return[];const g=d[s(0x1e0)](h=>{const t=s;return h[t(0x1ed)][0x0]===d[0x0]['args'][0x0];});if(g){const h=c[s(0x1f2)][s(0x1c6)]();d[s(0x1f8)](j=>h[j[s(0x1e3)]](...j['args']));const i=await h[s(0x1ce)]();return i[s(0x1c7)](j=>j);}else return Promise['all'](d[s(0x1c7)](j=>c[s(0x1f2)][j['command']](...j[s(0x1ed)])));},'xadd'(g,h,i,j){const u=p;return e(u(0x1c5),[g,h,i,j]);},'xack'(g,h,i){const v=p;return e(v(0x1db),[g,h,i]);},'xdel'(g,h){const w=p;return e(w(0x1ff),[g,h]);},'xlen'(g){const x=p;return e(x(0x1d1),[g]);},'xpending'(g,h,i,j,k,l){return e('xpending',[g,h,i,j,k,l]);},'xclaim'(g,h,i,j,k,...l){const y=p;return e(y(0x1cd),[g,h,i,j,k,...l]);},'del'(g){const z=p;return e(z(0x1fd),[g]);},'expire':function(g,h){const A=p;return e(A(0x1c9),[g,h]);},'hdel'(g,h){const B=p;return e(B(0x1ec),[g,h]);},'hget'(g,h){const C=p;return e(C(0x1cc),[g,h]);},'hgetall'(g){const D=p;return e(D(0x1d3),[g]);},'hincrbyfloat'(g,h,i){const E=p;return e(E(0x1f5),[g,h,i]);},'hmget'(g,h){const F=p;return e(F(0x1f0),[g,h]);},'hset'(g,h){const G=p;return e(G(0x1fc),[g,h]);},'lrange'(g,h,i){return e('lrange',[g,h,i]);},'rpush'(g,h){const H=p;return e(H(0x1fb),[g,h]);},'zadd'(...g){const I=p;return e(I(0x1d9),g);},'xgroup'(g,h,i,j,k){const J=p;return e(J(0x1e4),[g,h,i,j,k]);}};return f;}return this[p(0x1f2)][p(0x1c6)]();}async[n(0x1ce)](...c){const K=n,d=await this[K(0x1f2)]['call'][K(0x1da)](this[K(0x1f2)],c);if(typeof d==='string')return d;else{if(Array[K(0x1d6)](d)){if(Array['isArray'](d[0x0]))return d;return d;}}return d;}async[n(0x1f1)](c,d,e){const L=n,f=await this[L(0x1f2)][this[L(0x1ee)][L(0x1e6)]](c,d,'NX','EX',e[L(0x1c1)]());return this[L(0x1d7)](f);}[n(0x1e7)](c){return c[0x1];}async[n(0x201)](c){const M=n,d=this['storeClient'][M(0x1c6)](),e=this[M(0x1eb)](key_1['KeyType'][M(0x200)],{'appId':this[M(0x1c3)]});for(const f of c){d[M(0x1d9)](e,'NX',Date[M(0x1e9)](),f);}await d[M(0x1ce)]();}}exports[n(0x1fe)]=IORedisStoreService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const n=b;(function(c,d){const m=b,e=c();while(!![]){try{const f
|
|
1
|
+
'use strict';const n=b;(function(c,d){const m=b,e=c();while(!![]){try{const f=parseInt(m(0xba))/0x1*(parseInt(m(0x8f))/0x2)+parseInt(m(0xac))/0x3*(parseInt(m(0xa0))/0x4)+parseInt(m(0x97))/0x5*(parseInt(m(0x92))/0x6)+-parseInt(m(0x9b))/0x7+-parseInt(m(0xa4))/0x8*(parseInt(m(0x91))/0x9)+-parseInt(m(0xbf))/0xa*(-parseInt(m(0xb4))/0xb)+-parseInt(m(0x8b))/0xc;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x7ebcd));Object[n(0x9d)](exports,'__esModule',{'value':!![]}),exports['RedisStoreService']=void 0x0;const enums_1=require(n(0xb0)),_base_1=require(n(0x8c));function b(c,d){const e=a();return b=function(f,g){f=f-0x86;let h=e[f];return h;},b(c,d);}function a(){const V=['every','ZRANGE','7690ifkqre','push','HSCAN','transact','4027296nkAYlA','SETNX','defineProperty','toString','HMSH_IS_CLUSTER','1051784xddBTK','LRANGE','all','args','56EqDXJg','HGETALL','commands','XDEL','Function\x20not\x20implemented.','RedisStoreService','ZADD','XGROUP','9vtALFa','HSET','HGET','toUpperCase','../../../../modules/enums','zRangeByScore','forEach','RPUSH','788953MtEybf','HINCRBYFLOAT','ZRANGEBYSCORE','RENAME','storeClient','command','1tXzCVw','zrangebyscore','HMGET','XCLAIM','exec','110KnXgYx','XADD','LMOVE','EXPIRE','XPENDING','zadd','RedisStoreBase','map','ZRANGEBYSCORE_WITHSCORES','set','DEL','length','XLEN','HDEL','1302564EeTbfG','./_base','isSuccessful','setnxex','992260kNWclh','SCAN','1129653Gczrlz','30ByPDEo','SET','sendCommand'];a=function(){return V;};return a();}class RedisStoreService extends _base_1[n(0xc5)]{constructor(c){const o=n;super(c),this[o(0xa6)]={'get':'GET','set':o(0x93),'setnx':o(0x9c),'del':o(0x87),'expire':o(0xc2),'hscan':o(0x99),'hset':'HSET','hsetnx':'HSETNX','hincrby':'HINCRBY','hdel':o(0x8a),'hget':o(0xae),'hmget':'HMGET','hgetall':o(0xa5),'hincrbyfloat':o(0xb5),'zrange':o(0x96),'zrangebyscore_withscores':o(0xc7),'zrangebyscore':o(0xb6),'zrem':'ZREM','zadd':'ZADD','lmove':o(0xc1),'lrange':o(0xa1),'lpop':'LPOP','rename':o(0xb7),'rpush':o(0xb3),'scan':o(0x90),'xack':'XACK','xdel':o(0xa7),'xlen':o(0x89)};}[n(0x9a)](){const p=n,c=this;if(enums_1[p(0x9f)]){const d=[],e=(g,h)=>{const q=p;return d[q(0x98)]({'command':g[q(0xaf)](),'args':h}),f;},f={'sendCommand'(g,...h){const r=p;return c[r(0xb8)]['sendCommand']([g,...h]);},async 'exec'(){const s=p;if(d[s(0x88)]===0x0)return[];const g=d[s(0x95)](h=>{const t=s;return h['args'][0x0]===d[0x0][t(0xa3)][0x0];});if(g){const h=c[s(0xb8)]['multi']();d[s(0xb2)](j=>{const u=s;if(j[u(0xb9)]===u(0xaa))return h[u(0xaa)](j['args'][0x0],j[u(0xa3)][0x1],j[u(0xa3)][0x2]);return h[j[u(0xb9)]](...j[u(0xa3)]);});const i=await h[s(0xbe)]();return i['map'](j=>j);}else return Promise[s(0xa2)](d[s(0xc6)](j=>{const v=s;if(j[v(0xb9)]===v(0xaa))return c[v(0xb8)][v(0xaa)](j[v(0xa3)][0x0],j[v(0xa3)][0x1],j['args'][0x2]);return c[v(0xb8)][j[v(0xb9)]](...j[v(0xa3)]);}));},'XADD'(g,h,i,j){const w=p;return e(w(0xc0),[g,h,i,j]);},'XACK'(g,h,i){return e('XACK',[g,h,i]);},'XDEL'(g,h){const x=p;return e(x(0xa7),[g,h]);},'XLEN'(g){const y=p;return e(y(0x89),[g]);},'XCLAIM'(g,h,i,j,k,...l){const z=p;return e(z(0xbd),[g,h,i,j,k,...l]);},'XPENDING'(g,h,i,j,k,l){const A=p;return e(A(0xc3),[g,h,i,j,k,l]);},'DEL':function(g){const B=p;return e(B(0x87),[g]);},'EXPIRE':function(g,h){const C=p;return e(C(0xc2),[g,h]);},'HDEL'(g,h){const D=p;return e(D(0x8a),[g,h]);},'HGET'(g,h){const E=p;return e(E(0xae),[g,h]);},'HGETALL'(g){return e('HGETALL',[g]);},'HINCRBYFLOAT'(g,h,i){return e('HINCRBYFLOAT',[g,h,i]);},'HMGET'(g,h){const F=p;return e(F(0xbc),[g,h]);},'HSET'(g,h){const G=p;return e(G(0xad),[g,h]);},'LRANGE'(g,h,i){const H=p;return e(H(0xa1),[g,h,i]);},'RPUSH'(g,h){const I=p;return e(I(0xb3),[g,h]);},'ZADD'(g,h,i){const J=p;return e(J(0xaa),[g,h,i]);},'XGROUP'(g,h,i,j,k){const K=p;return e(K(0xab),[g,h,i,j,k]);},'EXISTS':function(g){const L=p;throw new Error(L(0xa8));},'HMPUSH':function(g,h){const M=p;throw new Error(M(0xa8));},'LPUSH':function(g,h){const N=p;throw new Error(N(0xa8));},'SET':function(g,h){const O=p;throw new Error(O(0xa8));},'ZRANGE_WITHSCORES':function(g,h,i){const P=p;throw new Error(P(0xa8));},'ZRANK':function(g,h){const Q=p;throw new Error(Q(0xa8));},'ZSCORE':function(g,h){throw new Error('Function\x20not\x20implemented.');}};return f;}return this[p(0xb8)]['multi']();}async[n(0xbe)](...c){const R=n;return await this[R(0xb8)][R(0x94)](c);}async[n(0x8e)](c,d,e){const S=n,f=await this[S(0xb8)][this[S(0xa6)][S(0x86)]](c,d,{'NX':!![],'EX':e});return this[S(0x8d)](f);}async['zAdd'](c,d,e,f){const T=n;return await(f||this[T(0xb8)])[this[T(0xa6)][T(0xc4)]](c,{'score':d,'value':e[T(0x9e)]()});}async[n(0xb1)](c,d,e){const U=n,f=await this[U(0xb8)][this[U(0xa6)][U(0xbb)]](c,d,e);if(f?.[U(0x88)]>0x0)return f[0x0];return null;}}exports[n(0xa9)]=RedisStoreService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var i=b;(function(c,d){var h=b,e=c();while(!![]){try{var f=-parseInt(h(0xd3))/0x1+parseInt(h(0xd9))/0x2*(parseInt(h(0xd8))/0x3)+parseInt(h(0xd4))/0x4*(-parseInt(h(0xda))/0x5)+parseInt(h(0xdb))/0x6+parseInt(h(0xd7))/0x7+-parseInt(h(0xdc))/0x8+parseInt(h(0xdd))/0x9;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x8ac2e));Object[i(0xd6)](exports,i(0xd5),{'value':!![]});function b(c,d){var e=a();return b=function(f,g){f=f-0xd3;var h=e[f];return h;},b(c,d);}function a(){var j=['11215vfKgEK','4351524trDoBX','3868344hFkGPZ','9797778qqywtA','755705RTLiat','1076QHpbug','__esModule','defineProperty','2303434ofVIWo','38289PUelLp','42EMtWXg'];a=function(){return j;};return a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const n=b;(function(c,d){const m=b,e=c();while(!![]){try{const f=-parseInt(m(
|
|
1
|
+
'use strict';const n=b;(function(c,d){const m=b,e=c();while(!![]){try{const f=-parseInt(m(0xb6))/0x1+parseInt(m(0xad))/0x2+-parseInt(m(0x86))/0x3*(-parseInt(m(0xa7))/0x4)+parseInt(m(0x91))/0x5*(-parseInt(m(0x92))/0x6)+-parseInt(m(0xba))/0x7*(parseInt(m(0x8f))/0x8)+parseInt(m(0xc0))/0x9+parseInt(m(0x83))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xb1faa));function b(c,d){const e=a();return b=function(f,g){f=f-0x80;let h=e[f];return h;},b(c,d);}Object[n(0x8b)](exports,n(0xc6),{'value':!![]}),exports[n(0xc3)]=void 0x0;const index_1=require('../../index'),key_1=require(n(0xa1)),enums_1=require('../../../../modules/enums'),utils_1=require('../../../../modules/utils');class NatsStreamService extends index_1[n(0x85)]{constructor(c,d,e={}){const o=n;super(c,d,e),this['jetstream']=c[o(0xac)]();}async[n(0xae)](c,d,e){const p=n;this[p(0xb1)]=c,this[p(0xa9)]=e,this[p(0xb8)]=d,this['jsm']=await this['jetstream'][p(0x9c)]();}[n(0xca)](c,d){const q=n;if(!this[q(0xb1)])throw new Error(q(0xa2));return key_1['KeyService'][q(0xca)](this['namespace'],c,{...d,'appId':this[q(0xb8)]});}[n(0x82)](){return{};}async[n(0xb0)](c){const r=n;try{const d={'name':c,'subjects':[c+'.*'],'retention':r(0x93),'storage':'memory','num_replicas':0x1};return await this[r(0xa0)][r(0x89)][r(0x95)](d),!![];}catch(e){this[r(0xa9)][r(0xb9)](r(0xaa)+c,{'error':e});throw e;}}async[n(0x8e)](c){const s=n;try{return await this['jsm']['streams'][s(0xc4)](c),!![];}catch(d){this['logger']['error'](s(0x96)+c,{'error':d});throw d;}}async[n(0x9d)](c,d){const t=n;try{const e={'durable_name':d,'deliver_group':d,'ack_policy':'explicit','ack_wait':0x1e*0x3e8,'max_deliver':0xa};return await this[t(0xa0)]['consumers'][t(0x95)](c,e),!![];}catch(f){this[t(0xa9)][t(0xb9)](t(0xb3)+d+t(0x97)+c,{'error':f});throw f;}}async[n(0x88)](c,d){const u=n;try{return await this[u(0xa0)][u(0xa3)][u(0xc4)](c,d),!![];}catch(e){this[u(0xa9)][u(0xb9)]('Error\x20deleting\x20consumer\x20group\x20'+d+u(0x97)+c,{'error':e});throw e;}}async[n(0xbc)](c,d,e){const v=n;try{const f=d[v(0xb5)](async h=>{const w=v,i=c+w(0xab),j=await this[w(0xac)][w(0x87)](i,Buffer[w(0xa6)](h));return j;}),g=await Promise[v(0xc9)](f);return g[v(0xb5)](h=>h[v(0xc2)][v(0xc5)]());}catch(h){this['logger']['error'](v(0xa8)+c,{'error':h});throw h;}}async[n(0x8c)](c,d,e,f){const x=n;try{const g=await this[x(0xac)][x(0xa3)][x(0x99)](c,d),h=[],i={'max_messages':f?.[x(0x84)]||0x1,'expires':f?.[x(0x8d)]||enums_1[x(0x81)]},j=await g['fetch'](i);for await(const k of j){h[x(0xbb)]({'id':k[x(0xc2)][x(0xc5)](),'data':(0x0,utils_1[x(0xa5)])(k[x(0x90)]())});}return h;}catch(l){this[x(0xa9)][x(0xb9)](x(0x9a)+c,{'error':l});throw l;}}async['ackAndDelete'](c,d,e){const y=n;try{return await this[y(0x80)](c,d,e),e[y(0xa4)];}catch(f){this[y(0xa9)]['error']('Error\x20in\x20ack\x20and\x20delete\x20for\x20stream\x20'+c,{'error':f});throw f;}}async['acknowledgeMessages'](c,d,e,f){return e['length'];}async['deleteMessages'](c,d,e,f){const z=n;try{return await Promise[z(0xc9)](e[z(0xb5)](g=>this[z(0xa0)][z(0x89)][z(0xbf)](c,parseInt(g)))),e[z(0xa4)];}catch(g){this[z(0xa9)][z(0xb9)]('Error\x20deleting\x20messages\x20from\x20'+c,{'error':g});throw g;}}async[n(0x94)](c,d,e){return[];}async[n(0x9f)](c){const A=n;try{const d=await this[A(0xa0)]['streams']['info'](c);return{'messageCount':d['state'][A(0x98)]};}catch(e){this['logger'][A(0xb9)]('Error\x20getting\x20stats\x20for\x20'+c,{'error':e});throw e;}}async[n(0xbd)](c){const B=n;try{const d=await this['jsm']['streams'][B(0x9b)](c);return d[B(0xb7)][B(0x98)];}catch(e){this[B(0xa9)][B(0xb9)]('Error\x20getting\x20depth\x20for\x20'+c,{'error':e});throw e;}}async[n(0xaf)](c){const C=n;try{const d=await Promise[C(0xc9)](c[C(0xb5)](async({stream:e})=>({'stream':e,'depth':await this[C(0xbd)](e)})));return d;}catch(e){this[C(0xa9)][C(0xb9)]('Error\x20getting\x20multiple\x20stream\x20depths',{'error':e});throw e;}}async[n(0xb2)](c,d){const D=n;try{const e=await this[D(0xa0)][D(0x89)][D(0x9b)](c),f={...e[D(0xc8)]};return d[D(0xc1)]!==undefined&&(f[D(0x8a)]=d[D(0xc1)]),d[D(0x9e)]!==undefined&&(f[D(0xb4)]=d['maxAge']*0x3b9aca00),await this[D(0xa0)][D(0x89)][D(0xbe)](c,f),0x0;}catch(g){this[D(0xa9)]['error'](D(0xc7)+c,{'error':g});throw g;}}['getProviderSpecificFeatures'](){return{'supportsBatching':!![],'supportsDeadLetterQueue':!![],'supportsOrdering':!![],'supportsTrimming':!![],'supportsRetry':![],'maxMessageSize':0x400*0x400,'maxBatchSize':0x100};}}exports[n(0xc3)]=NatsStreamService;function a(){const E=['workqueue','retryMessages','add','Error\x20deleting\x20stream\x20','\x20for\x20stream\x20','messages','get','Error\x20consuming\x20messages\x20from\x20','info','jetstreamManager','createConsumerGroup','maxAge','getStreamStats','jsm','../../../../modules/key','namespace\x20not\x20set','consumers','length','parseStreamMessage','from','28rmuQlL','Error\x20publishing\x20messages\x20to\x20','logger','Error\x20creating\x20stream\x20','.message','jetstream','1437818iJRUJk','init','getStreamDepths','createStream','namespace','trimStream','Error\x20creating\x20consumer\x20group\x20','max_age','map','1166030DcbIud','state','appId','error','7TKWFor','push','publishMessages','getStreamDepth','update','deleteMessage','5154966ErLJMA','maxLen','seq','NatsStreamService','delete','toString','__esModule','Error\x20trimming\x20stream\x20','config','all','mintKey','acknowledgeMessages','HMSH_BLOCK_TIME_MS','transact','7421990GpRHIR','batchSize','StreamService','489003WHIBCI','publish','deleteConsumerGroup','streams','max_msgs','defineProperty','consumeMessages','blockTimeout','deleteStream','3398904xMAhbN','string','610710GZhMWT','42qciUaX'];a=function(){return E;};return a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const o=b;function a(){const J=['consumeMessages','deleteConsumerGroup','endsWith','.streams','maxLen','1676079haAXVP','\x27)\x20AS\x20table','getAdvisoryLockId','locked','unlocked','Error\x20deleting\x20consumer\x20group\x20','59624prJRyY','.streams\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20id\x20BIGSERIAL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20stream_name\x20TEXT\x20NOT\x20NULL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20group_name\x20TEXT\x20NOT\x20NULL\x20DEFAULT\x20\x27ENGINE\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20message\x20TEXT\x20NOT\x20NULL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20created_at\x20TIMESTAMPTZ\x20DEFAULT\x20NOW(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20reserved_at\x20TIMESTAMPTZ,\x0a\x20\x20\x20\x20\x20\x20\x20\x20reserved_by\x20TEXT,\x0a\x20\x20\x20\x20\x20\x20\x20\x20PRIMARY\x20KEY\x20(stream_name,\x20id)\x0a\x20\x20\x20\x20\x20\x20)\x20PARTITION\x20BY\x20HASH\x20(stream_name)','map','connect','query','ackAndDelete','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20FOR\x20VALUES\x20WITH\x20(modulus\x208,\x20remainder\x20','getStreamDepths','StreamService','deleteMessages','retryMessages','transact','delay','deleteStream','\x20t\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SET\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20reserved_at\x20=\x20NOW(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20reserved_by\x20=\x20$4\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20selected_messages\x20s\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20t.stream_name\x20=\x20$1\x20AND\x20t.id\x20=\x20s.id\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20RETURNING\x20t.id,\x20t.message\x0a\x20\x20\x20\x20\x20\x20\x20\x20)\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20*\x20FROM\x20update_reservation','appId','createTables','safeName','release','DELETE\x20FROM\x20','array','defineProperty','hashStringToInt','ENGINE','\x20RETURNING\x20id','PostgresStreamService','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20stream_name\x20=\x20$1\x20AND\x20created_at\x20<\x20NOW()\x20-\x20INTERVAL\x20\x27','table','HMSH_DEPLOYMENT_PAUSE','SELECT\x20pg_try_advisory_lock($1)\x20AS\x20locked','4179300pZKqVf','getProviderSpecificFeatures','1211JmcpmM','SELECT\x20NOT\x20EXISTS\x20(SELECT\x201\x20FROM\x20pg_locks\x20WHERE\x20locktype\x20=\x20\x27advisory\x27\x20AND\x20objid\x20=\x20$1::bigint)\x20AS\x20unlocked','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20stream_name\x20=\x20$1\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20id\x20ASC\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20OFFSET\x20$2\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20)','checkIfTablesExist','../../../../modules/enums','rows','3797775cYmueM','.streams_part_','4281SBquQe','getTableName','trimStream','\x20PARTITION\x20OF\x20','KeyService','COMMIT','logger','stream','BEGIN','34467570dakLLA','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20stream_name\x20=\x20$1\x20AND\x20id\x20=\x20ANY($2::bigint[])\x20AND\x20group_name\x20=\x20$3','replace','publishMessages','\x20(stream_name,\x20group_name,\x20message)\x20VALUES\x20','stream_name','7364838SGuKDO','HMSH_DEPLOYMENT_DELAY','2yVpmfZ','namespace','../../index','\x20WHERE\x20stream_name\x20=\x20$1\x20AND\x20group_name\x20=\x20$2','_publishMessages','CREATE\x20SCHEMA\x20IF\x20NOT\x20EXISTS\x20','Timeout\x20waiting\x20for\x20table\x20creation','772tJbjxS','message','SELECT\x20to_regclass(\x27','init','transaction','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20stream_name\x20=\x20$1\x20AND\x20id\x20IN\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20id\x20FROM\x20','Error\x20publishing\x20messages\x20to\x20','CREATE\x20TABLE\x20','length','deploy','charCodeAt','Error\x20getting\x20stats\x20for\x20','__esModule','($1,\x20$2,\x20$','getStreamStats','getStreamDepth','Error\x20deleting\x20messages\x20from\x20','streamClient','error','round','reservationTimeout','addCommand','toString','maxAge','join','CREATE\x20INDEX\x20idx_streams_group_stream_reserved_at_id\x20\x0a\x20\x20\x20\x20\x20\x20\x20ON\x20','Error\x20getting\x20multiple\x20stream\x20depths','createConsumerGroup','count','SELECT\x20COUNT(*)\x20AS\x20count\x20FROM\x20','messageCount','batchSize','Error\x20deploying\x20tables','parseStreamMessage','rowCount'];a=function(){return J;};return a();}(function(c,d){const n=b,e=c();while(!![]){try{const f=-parseInt(n(0x17b))/0x1*(parseInt(n(0x1ba))/0x2)+parseInt(n(0x1a9))/0x3*(parseInt(n(0x1c1))/0x4)+-parseInt(n(0x19f))/0x5+-parseInt(n(0x1b8))/0x6+parseInt(n(0x1a1))/0x7*(parseInt(n(0x181))/0x8)+-parseInt(n(0x1a7))/0x9+parseInt(n(0x1b2))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xcf8e6));Object[o(0x196)](exports,o(0x1cd),{'value':!![]}),exports[o(0x19a)]=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0x164;let h=e[f];return h;},b(c,d);}const key_1=require('../../../../modules/key'),utils_1=require('../../../../modules/utils'),index_1=require(o(0x1bc)),enums_1=require(o(0x1a5));class PostgresStreamService extends index_1[o(0x189)]{constructor(c,d,e={}){super(c,d,e);}async[o(0x1c4)](c,d,e){const p=o;this[p(0x1bb)]=c,this['appId']=d,this[p(0x1af)]=e,await this[p(0x1ca)]();}async[o(0x1ca)](){const q=o,c=this[q(0x164)];let d,e=![];'connect'in c&&q(0x193)in c?(d=await c[q(0x184)](),e=!![]):d=c;try{const f=this[q(0x17d)](),g=await d[q(0x185)](q(0x19e),[f]);if(g['rows'][0x0][q(0x17e)]){await d[q(0x185)](q(0x1b1));const h=await this[q(0x1a4)](d);!h&&await this[q(0x191)](d),await d['query'](q(0x1ae)),await d[q(0x185)]('SELECT\x20pg_advisory_unlock($1)',[f]);}else{let i=0x0;const j=Math[q(0x166)](enums_1[q(0x1b9)]/enums_1['HMSH_DEPLOYMENT_PAUSE']);while(i<j){await this['delay'](enums_1[q(0x19d)]);const k=await d[q(0x185)](q(0x1a2),[f]);if(k[q(0x1a6)][0x0][q(0x17f)]){const l=await this[q(0x1a4)](d);if(l)break;}i++;}if(i===j)throw new Error(q(0x1c0));}}catch(m){this[q(0x1af)]['error'](q(0x173),{'error':m});throw m;}finally{e&&await d['release']();}}[o(0x17d)](){const r=o;return this['hashStringToInt'](this[r(0x190)]);}[o(0x197)](c){const s=o;let d=0x0;for(let e=0x0;e<c[s(0x1c9)];e++){d=(d<<0x5)-d+c[s(0x1cb)](e),d|=0x0;}return Math['abs'](d);}async['checkIfTablesExist'](c){const t=o,d=await c[t(0x185)](t(0x1c3)+this[t(0x1aa)]()+t(0x17c));return d[t(0x1a6)][0x0][t(0x19c)]!==null;}['safeName'](c){const u=o;return c[u(0x1b4)](/[^a-zA-Z0-9_]/g,'_');}[o(0x1aa)](){const v=o;return this['safeName'](this[v(0x190)])+v(0x179);}async[o(0x191)](c){const w=o,d=this[w(0x192)](this[w(0x190)]),e=this[w(0x1aa)]();await c[w(0x185)](w(0x1b1)),await c[w(0x185)](w(0x1bf)+d+';'),await c[w(0x185)]('CREATE\x20TABLE\x20'+d+w(0x182));for(let f=0x0;f<0x8;f++){const g=d+w(0x1a8)+f;await c[w(0x185)](w(0x1c8)+g+w(0x1ac)+e+w(0x187)+f+')');}await c['query'](w(0x16c)+e+'\x20(group_name,\x20stream_name,\x20reserved_at,\x20id)'),await c['query'](w(0x1ae));}[o(0x18d)](c){return new Promise(d=>setTimeout(d,c));}['mintKey'](c,d){const x=o;if(!this[x(0x1bb)])throw new Error('namespace\x20not\x20set');return key_1[x(0x1ad)]['mintKey'](this[x(0x1bb)],c,{...d,'appId':this['appId']});}[o(0x18c)](){return{};}async['createStream'](c){return!![];}async[o(0x18e)](c){const y=o,d=this[y(0x164)],e=this[y(0x1aa)]();try{return c==='*'?await d['query'](y(0x194)+e):await d['query'](y(0x194)+e+'\x20WHERE\x20stream_name\x20=\x20$1',[c]),!![];}catch(f){this['logger'][y(0x165)]('Error\x20deleting\x20stream\x20'+c,{'error':f});throw f;}}async[o(0x16e)](c,d){return!![];}async[o(0x177)](c,d){const z=o,e=this[z(0x164)],f=this['getTableName']();try{return await e[z(0x185)](z(0x194)+f+z(0x1bd),[c,d]),!![];}catch(g){this[z(0x1af)][z(0x165)](z(0x180)+d+'\x20for\x20stream\x20'+c,{'error':g});throw g;}}async[o(0x1b5)](c,d,e){const A=o,{sql:f,params:g}=this[A(0x1be)](c,d);if(e?.[A(0x1c5)]&&typeof e[A(0x1c5)]['addCommand']==='function')return e['transaction'][A(0x168)](f,g,A(0x195),h=>h[A(0x183)](i=>i['id'][A(0x169)]())),e[A(0x1c5)];else try{const h=[],i=await this[A(0x164)][A(0x185)](f,g);for(const j of i[A(0x1a6)]){h['push'](j['id'][A(0x169)]());}return h;}catch(k){this[A(0x1af)][A(0x165)](A(0x1c7)+c,{'error':k});throw k;}}['_publishMessages'](c,d){const B=o,e=this[B(0x1aa)](),f=c[B(0x178)](':')?B(0x198):'WORKER',g=d['map']((h,i)=>B(0x1ce)+(i+0x3)+')')[B(0x16b)](',\x20');return{'sql':'INSERT\x20INTO\x20'+e+B(0x1b6)+g+B(0x199),'params':[c,f,...d]};}async[o(0x176)](c,d,e,f){const C=o,g=this['streamClient'],h=this[C(0x1aa)]();try{const i=f?.[C(0x172)]||0x1,j=f?.[C(0x167)]||0x1e,k=await g[C(0x185)]('WITH\x20selected_messages\x20AS\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20id,\x20message\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20'+h+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20stream_name\x20=\x20$1\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20group_name\x20=\x20$2\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20COALESCE(reserved_at,\x20\x271970-01-01\x27)\x20<\x20NOW()\x20-\x20INTERVAL\x20\x27'+j+'\x20seconds\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20id\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20LIMIT\x20$3\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FOR\x20UPDATE\x20SKIP\x20LOCKED\x0a\x20\x20\x20\x20\x20\x20\x20\x20),\x0a\x20\x20\x20\x20\x20\x20\x20\x20update_reservation\x20AS\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20UPDATE\x20'+h+C(0x18f),[c,d,i,e]),l=k['rows']['map'](m=>({'id':m['id']['toString'](),'data':(0x0,utils_1[C(0x174)])(m[C(0x1c2)])}));return l;}catch(m){this[C(0x1af)][C(0x165)]('Error\x20consuming\x20messages\x20from\x20'+c,{'error':m});throw m;}}async[o(0x186)](c,d,e){const D=o;return await this[D(0x18a)](c,d,e);}async['acknowledgeMessages'](c,d,e,f){return e['length'];}async[o(0x18a)](c,d,e,f){const E=o,g=this[E(0x164)],h=this[E(0x1aa)]();try{const i=e[E(0x183)](j=>parseInt(j));return await g[E(0x185)]('DELETE\x20FROM\x20'+h+E(0x1b3),[c,i,d]),e[E(0x1c9)];}catch(j){this[E(0x1af)][E(0x165)](E(0x1d1)+c,{'error':j});throw j;}}async[o(0x18b)](c,d,e){return[];}async[o(0x1cf)](c){const F=o,d=this[F(0x164)],e=this[F(0x1aa)]();try{const f=await d['query'](F(0x170)+e+'\x20WHERE\x20stream_name\x20=\x20$1',[c]);return{'messageCount':parseInt(f[F(0x1a6)][0x0][F(0x16f)],0xa)};}catch(g){this[F(0x1af)][F(0x165)](F(0x1cc)+c,{'error':g});throw g;}}async[o(0x1d0)](c){const G=o,d=await this[G(0x1cf)](c);return d[G(0x171)];}async[o(0x188)](c){const H=o,d=this[H(0x164)],e=this[H(0x1aa)]();try{const f=c[H(0x183)](i=>i[H(0x1b0)]),g=await d[H(0x185)]('SELECT\x20stream_name,\x20COUNT(*)\x20AS\x20count\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20'+e+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20stream_name\x20=\x20ANY($1::text[])\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20GROUP\x20BY\x20stream_name',[f]),h=g['rows'][H(0x183)](i=>({'stream':i[H(0x1b7)],'depth':parseInt(i[H(0x16f)],0xa)}));return h;}catch(i){this[H(0x1af)][H(0x165)](H(0x16d),{'error':i});throw i;}}async[o(0x1ab)](c,d){const I=o,e=this['streamClient'],f=this['getTableName']();try{let g=0x0;if(d['maxLen']!==undefined){const h=await e[I(0x185)]('DELETE\x20FROM\x20'+f+I(0x1c6)+f+I(0x1a3),[c,d[I(0x17a)]]);g+=h['rowCount'];}if(d['maxAge']!==undefined){const i=await e['query']('DELETE\x20FROM\x20'+f+I(0x19b)+d[I(0x16a)]+'\x20milliseconds\x27',[c]);g+=i[I(0x175)];}return g;}catch(j){this[I(0x1af)][I(0x165)]('Error\x20trimming\x20stream\x20'+c,{'error':j});throw j;}}[o(0x1a0)](){return{'supportsBatching':!![],'supportsDeadLetterQueue':![],'supportsOrdering':!![],'supportsTrimming':!![],'supportsRetry':![],'maxMessageSize':0x400*0x400,'maxBatchSize':0x100};}}exports[o(0x19a)]=PostgresStreamService;
|
|
1
|
+
'use strict';function a(){const K=['mintKey','\x20t\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SET\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20reserved_at\x20=\x20NOW(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20reserved_by\x20=\x20$4\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20selected_messages\x20s\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20t.stream_name\x20=\x20$1\x20AND\x20t.id\x20=\x20s.id\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20RETURNING\x20t.id,\x20t.message\x0a\x20\x20\x20\x20\x20\x20\x20\x20)\x0a\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20*\x20FROM\x20update_reservation','abs','CREATE\x20INDEX\x20idx_streams_group_stream_reserved_at_id\x20\x0a\x20\x20\x20\x20\x20\x20\x20ON\x20','Error\x20getting\x20stats\x20for\x20','../../index','map','3093195zOCzAZ','batchSize','1848900nVItGv','replace','function','endsWith','namespace','COMMIT','704080TuBeTS','.streams\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20id\x20BIGSERIAL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20stream_name\x20TEXT\x20NOT\x20NULL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20group_name\x20TEXT\x20NOT\x20NULL\x20DEFAULT\x20\x27ENGINE\x27,\x0a\x20\x20\x20\x20\x20\x20\x20\x20message\x20TEXT\x20NOT\x20NULL,\x0a\x20\x20\x20\x20\x20\x20\x20\x20created_at\x20TIMESTAMPTZ\x20DEFAULT\x20NOW(),\x0a\x20\x20\x20\x20\x20\x20\x20\x20reserved_at\x20TIMESTAMPTZ,\x0a\x20\x20\x20\x20\x20\x20\x20\x20reserved_by\x20TEXT,\x0a\x20\x20\x20\x20\x20\x20\x20\x20PRIMARY\x20KEY\x20(stream_name,\x20id)\x0a\x20\x20\x20\x20\x20\x20)\x20PARTITION\x20BY\x20HASH\x20(stream_name)','141012cCucWs','Error\x20deleting\x20messages\x20from\x20','deleteConsumerGroup','Error\x20publishing\x20messages\x20to\x20','WORKER','deleteMessages','locked','__esModule','SELECT\x20pg_advisory_unlock($1)','maxAge','messageCount','KeyService','addCommand','\x20(group_name,\x20stream_name,\x20reserved_at,\x20id)','\x20(stream_name,\x20group_name,\x20message)\x20VALUES\x20','getProviderSpecificFeatures','../../../../modules/enums','ackAndDelete','../../../../modules/utils','defineProperty','getStreamDepths','hashStringToInt','Error\x20trimming\x20stream\x20','getAdvisoryLockId','1059952KzZOPz','StreamService','getStreamStats','error','2wsSIRg','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20stream_name\x20=\x20ANY($1::text[])\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20GROUP\x20BY\x20stream_name','createConsumerGroup','CREATE\x20TABLE\x20','2837688qpPjnV','\x20PARTITION\x20OF\x20','rows','HMSH_DEPLOYMENT_PAUSE','Timeout\x20waiting\x20for\x20table\x20creation','getTableName','delay','deleteStream','logger','charCodeAt','SELECT\x20pg_try_advisory_lock($1)\x20AS\x20locked','toString','query','INSERT\x20INTO\x20','message','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20stream_name\x20=\x20$1\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20group_name\x20=\x20$2\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20AND\x20COALESCE(reserved_at,\x20\x271970-01-01\x27)\x20<\x20NOW()\x20-\x20INTERVAL\x20\x27','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20stream_name\x20=\x20$1\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20id\x20ASC\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20OFFSET\x20$2\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20)','join','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20stream_name\x20=\x20$1\x20AND\x20id\x20=\x20ANY($2::bigint[])\x20AND\x20group_name\x20=\x20$3','safeName','transaction','streamClient','publishMessages','array','SELECT\x20COUNT(*)\x20AS\x20count\x20FROM\x20','Error\x20deleting\x20consumer\x20group\x20','init','getStreamDepth','DELETE\x20FROM\x20','\x20seconds\x27\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20ORDER\x20BY\x20id\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20LIMIT\x20$3\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FOR\x20UPDATE\x20SKIP\x20LOCKED\x0a\x20\x20\x20\x20\x20\x20\x20\x20),\x0a\x20\x20\x20\x20\x20\x20\x20\x20update_reservation\x20AS\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20UPDATE\x20','length','\x20for\x20stream\x20','($1,\x20$2,\x20$','\x20WHERE\x20stream_name\x20=\x20$1','acknowledgeMessages','unlocked','\x20RETURNING\x20id','stream_name','appId','consumeMessages','369451MGuXUs','BEGIN','count','deploy','WITH\x20selected_messages\x20AS\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20id,\x20message\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20','checkIfTablesExist','HMSH_DEPLOYMENT_DELAY','Error\x20deploying\x20tables','connect','round','SELECT\x20NOT\x20EXISTS\x20(SELECT\x201\x20FROM\x20pg_locks\x20WHERE\x20locktype\x20=\x20\x27advisory\x27\x20AND\x20objid\x20=\x20$1::bigint)\x20AS\x20unlocked','ENGINE','.streams_part_','Error\x20getting\x20multiple\x20stream\x20depths','.streams','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20FOR\x20VALUES\x20WITH\x20(modulus\x208,\x20remainder\x20','\x27)\x20AS\x20table','PostgresStreamService','release','rowCount','table'];a=function(){return K;};return a();}const o=b;(function(c,d){const n=b,e=c();while(!![]){try{const f=parseInt(n(0x1e7))/0x1*(parseInt(n(0x1bb))/0x2)+parseInt(n(0x19f))/0x3+parseInt(n(0x19d))/0x4+-parseInt(n(0x197))/0x5+-parseInt(n(0x1bf))/0x6+parseInt(n(0x195))/0x7+parseInt(n(0x1b7))/0x8;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x4f21e));Object[o(0x1b2)](exports,o(0x1a6),{'value':!![]}),exports[o(0x18a)]=void 0x0;const key_1=require('../../../../modules/key'),utils_1=require(o(0x1b1)),index_1=require(o(0x193)),enums_1=require(o(0x1af));function b(c,d){const e=a();return b=function(f,g){f=f-0x17a;let h=e[f];return h;},b(c,d);}class PostgresStreamService extends index_1[o(0x1b8)]{constructor(c,d,e={}){super(c,d,e);}async[o(0x1d9)](c,d,e){const p=o;this[p(0x19b)]=c,this[p(0x1e5)]=d,this['logger']=e,await this['deploy']();}async[o(0x17c)](){const q=o,c=this[q(0x1d4)];let d,e=![];q(0x181)in c&&q(0x18b)in c?(d=await c[q(0x181)](),e=!![]):d=c;try{const f=this['getAdvisoryLockId'](),g=await d[q(0x1cb)](q(0x1c9),[f]);if(g[q(0x1c1)][0x0][q(0x1a5)]){await d['query'](q(0x17a));const h=await this['checkIfTablesExist'](d);!h&&await this['createTables'](d),await d['query']('COMMIT'),await d[q(0x1cb)](q(0x1a7),[f]);}else{let i=0x0;const j=Math[q(0x182)](enums_1[q(0x17f)]/enums_1[q(0x1c2)]);while(i<j){await this[q(0x1c5)](enums_1[q(0x1c2)]);const k=await d[q(0x1cb)](q(0x183),[f]);if(k['rows'][0x0][q(0x1e2)]){const l=await this[q(0x17e)](d);if(l)break;}i++;}if(i===j)throw new Error(q(0x1c3));}}catch(m){this[q(0x1c7)][q(0x1ba)](q(0x180),{'error':m});throw m;}finally{e&&await d[q(0x18b)]();}}[o(0x1b6)](){const r=o;return this['hashStringToInt'](this[r(0x1e5)]);}[o(0x1b4)](c){const s=o;let d=0x0;for(let e=0x0;e<c[s(0x1dd)];e++){d=(d<<0x5)-d+c[s(0x1c8)](e),d|=0x0;}return Math[s(0x190)](d);}async['checkIfTablesExist'](c){const t=o,d=await c['query']('SELECT\x20to_regclass(\x27'+this[t(0x1c4)]()+t(0x189));return d['rows'][0x0][t(0x18d)]!==null;}['safeName'](c){const u=o;return c[u(0x198)](/[^a-zA-Z0-9_]/g,'_');}['getTableName'](){const v=o;return this[v(0x1d2)](this[v(0x1e5)])+v(0x187);}async['createTables'](c){const w=o,d=this[w(0x1d2)](this[w(0x1e5)]),e=this[w(0x1c4)]();await c[w(0x1cb)]('BEGIN'),await c[w(0x1cb)]('CREATE\x20SCHEMA\x20IF\x20NOT\x20EXISTS\x20'+d+';'),await c['query'](w(0x1be)+d+w(0x19e));for(let f=0x0;f<0x8;f++){const g=d+w(0x185)+f;await c[w(0x1cb)](w(0x1be)+g+w(0x1c0)+e+w(0x188)+f+')');}await c[w(0x1cb)](w(0x191)+e+w(0x1ac)),await c[w(0x1cb)](w(0x19c));}[o(0x1c5)](c){return new Promise(d=>setTimeout(d,c));}[o(0x18e)](c,d){const x=o;if(!this['namespace'])throw new Error('namespace\x20not\x20set');return key_1[x(0x1aa)][x(0x18e)](this[x(0x19b)],c,{...d,'appId':this['appId']});}['transact'](){return{};}async['createStream'](c){return!![];}async[o(0x1c6)](c){const y=o,d=this['streamClient'],e=this['getTableName']();try{return c==='*'?await d[y(0x1cb)](y(0x1db)+e):await d[y(0x1cb)]('DELETE\x20FROM\x20'+e+y(0x1e0),[c]),!![];}catch(f){this[y(0x1c7)][y(0x1ba)]('Error\x20deleting\x20stream\x20'+c,{'error':f});throw f;}}async[o(0x1bd)](c,d){return!![];}async[o(0x1a1)](c,d){const z=o,e=this[z(0x1d4)],f=this[z(0x1c4)]();try{return await e['query']('DELETE\x20FROM\x20'+f+'\x20WHERE\x20stream_name\x20=\x20$1\x20AND\x20group_name\x20=\x20$2',[c,d]),!![];}catch(g){this[z(0x1c7)][z(0x1ba)](z(0x1d8)+d+z(0x1de)+c,{'error':g});throw g;}}async[o(0x1d5)](c,d,e){const A=o,{sql:f,params:g}=this['_publishMessages'](c,d);if(e?.['transaction']&&typeof e[A(0x1d3)][A(0x1ab)]===A(0x199))return e[A(0x1d3)][A(0x1ab)](f,g,A(0x1d6),h=>h[A(0x194)](i=>i['id'][A(0x1ca)]())),e[A(0x1d3)];else try{const h=[],i=await this[A(0x1d4)][A(0x1cb)](f,g);for(const j of i['rows']){h['push'](j['id']['toString']());}return h;}catch(k){this[A(0x1c7)]['error'](A(0x1a2)+c,{'error':k});throw k;}}['_publishMessages'](c,d){const B=o,e=this[B(0x1c4)](),f=c[B(0x19a)](':')?B(0x184):B(0x1a3),g=d[B(0x194)]((h,i)=>B(0x1df)+(i+0x3)+')')[B(0x1d0)](',\x20');return{'sql':B(0x1cc)+e+B(0x1ad)+g+B(0x1e3),'params':[c,f,...d]};}async[o(0x1e6)](c,d,e,f){const C=o,g=this[C(0x1d4)],h=this[C(0x1c4)]();try{const i=f?.[C(0x196)]||0x1,j=f?.['reservationTimeout']||0x1e,k=await g[C(0x1cb)](C(0x17d)+h+C(0x1ce)+j+C(0x1dc)+h+C(0x18f),[c,d,i,e]),l=k[C(0x1c1)][C(0x194)](m=>({'id':m['id'][C(0x1ca)](),'data':(0x0,utils_1['parseStreamMessage'])(m[C(0x1cd)])}));return l;}catch(m){this[C(0x1c7)][C(0x1ba)]('Error\x20consuming\x20messages\x20from\x20'+c,{'error':m});throw m;}}async[o(0x1b0)](c,d,e){const D=o;return await this[D(0x1a4)](c,d,e);}async[o(0x1e1)](c,d,e,f){const E=o;return e[E(0x1dd)];}async[o(0x1a4)](c,d,e,f){const F=o,g=this[F(0x1d4)],h=this[F(0x1c4)]();try{const i=e[F(0x194)](j=>parseInt(j));return await g[F(0x1cb)](F(0x1db)+h+F(0x1d1),[c,i,d]),e[F(0x1dd)];}catch(j){this['logger'][F(0x1ba)](F(0x1a0)+c,{'error':j});throw j;}}async['retryMessages'](c,d,e){return[];}async[o(0x1b9)](c){const G=o,d=this[G(0x1d4)],e=this[G(0x1c4)]();try{const f=await d[G(0x1cb)](G(0x1d7)+e+'\x20WHERE\x20stream_name\x20=\x20$1',[c]);return{'messageCount':parseInt(f['rows'][0x0][G(0x17b)],0xa)};}catch(g){this[G(0x1c7)]['error'](G(0x192)+c,{'error':g});throw g;}}async[o(0x1da)](c){const H=o,d=await this[H(0x1b9)](c);return d[H(0x1a9)];}async[o(0x1b3)](c){const I=o,d=this[I(0x1d4)],e=this['getTableName']();try{const f=c['map'](i=>i['stream']),g=await d[I(0x1cb)]('SELECT\x20stream_name,\x20COUNT(*)\x20AS\x20count\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20FROM\x20'+e+I(0x1bc),[f]),h=g['rows'][I(0x194)](i=>({'stream':i[I(0x1e4)],'depth':parseInt(i['count'],0xa)}));return h;}catch(i){this[I(0x1c7)]['error'](I(0x186),{'error':i});throw i;}}async['trimStream'](c,d){const J=o,e=this[J(0x1d4)],f=this[J(0x1c4)]();try{let g=0x0;if(d['maxLen']!==undefined){const h=await e[J(0x1cb)](J(0x1db)+f+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20stream_name\x20=\x20$1\x20AND\x20id\x20IN\x20(\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20SELECT\x20id\x20FROM\x20'+f+J(0x1cf),[c,d['maxLen']]);g+=h['rowCount'];}if(d[J(0x1a8)]!==undefined){const i=await e[J(0x1cb)](J(0x1db)+f+'\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20WHERE\x20stream_name\x20=\x20$1\x20AND\x20created_at\x20<\x20NOW()\x20-\x20INTERVAL\x20\x27'+d['maxAge']+'\x20milliseconds\x27',[c]);g+=i[J(0x18c)];}return g;}catch(j){this[J(0x1c7)][J(0x1ba)](J(0x1b5)+c,{'error':j});throw j;}}[o(0x1ae)](){return{'supportsBatching':!![],'supportsDeadLetterQueue':![],'supportsOrdering':!![],'supportsTrimming':!![],'supportsRetry':![],'maxMessageSize':0x400*0x400,'maxBatchSize':0x100};}}exports['PostgresStreamService']=PostgresStreamService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const n=b;(function(c,d){const m=b,e=c();while(!![]){try{const f
|
|
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-
|
|
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';var i=b;(function(c,d){var h=b,e=c();while(!![]){try{var f
|
|
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(
|
|
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(
|
|
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;
|
|
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';function a(){const
|
|
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;
|