@hotmeshio/hotmesh 0.3.24 → 0.3.25
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';function
|
|
1
|
+
'use strict';function b(c,d){const e=a();return b=function(f,g){f=f-0x18f;let h=e[f];return h;},b(c,d);}const j=b;(function(c,d){const i=b,e=c();while(!![]){try{const f=-parseInt(i(0x18f))/0x1*(-parseInt(i(0x195))/0x2)+-parseInt(i(0x1bb))/0x3*(parseInt(i(0x1cf))/0x4)+-parseInt(i(0x1b3))/0x5*(-parseInt(i(0x191))/0x6)+-parseInt(i(0x1bd))/0x7+parseInt(i(0x1b7))/0x8*(-parseInt(i(0x1ab))/0x9)+parseInt(i(0x1ad))/0xa+-parseInt(i(0x19b))/0xb*(-parseInt(i(0x1c2))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x3babe));Object[j(0x1be)](exports,j(0x1ac),{'value':!![]}),exports[j(0x1b8)]=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require(j(0x1c3)),collator_1=require('../collator'),pipe_1=require(j(0x1a9)),telemetry_1=require(j(0x19a)),activity_1=require(j(0x1a2));function a(){const m=['36TbvUfQ','../../modules/utils','logger','leg','subtype','metadata','debug','startActivitySpan','InactiveJobError','guid','duplicate','process-event-generational-job-error','gid','128dREPot','store','2rTaHHm','authorizeReentry','1863462aSWdYF','await-inactive-job-error','jid','context','308160kafxQZ','Activity','data','$self','worker-process','../telemetry','1802911GXNPBx','worker-collation-overage','GetStateError','endActivitySpan','output','setActivityError','l1s','./activity','worker-get-state-error','retry','GenerationalError','router','config','error','../pipe','dad','4860xzvzKF','__esModule','533590AiQpLE','CollationError','Pipe','publishMessage','exec','verifyEntry','5smGiQf','resolve','engine','setState','6608dwKYJZ','Worker','aid','execActivity','30255elhpMg','transact','1054375zEJjpA','defineProperty','setStatus','TelemetryService','mapInputData'];a=function(){return m;};return a();}class Worker extends activity_1[j(0x196)]{constructor(c,d,e,f,g,h){super(c,d,e,f,g,h);}async['process'](){const k=j;this['logger']['debug'](k(0x199),{'jid':this['context'][k(0x1c7)][k(0x193)],'gid':this[k(0x194)][k(0x1c7)]['gid'],'aid':this[k(0x1c7)][k(0x1b9)]});let c;try{await this[k(0x1b2)](),c=new telemetry_1[(k(0x1c0))](this[k(0x1b5)]['appId'],this[k(0x1a7)],this[k(0x1c7)],this[k(0x194)]),c[k(0x1c9)](this[k(0x1c5)]),this[k(0x1c1)]();const d=this[k(0x1d0)][k(0x1bc)](),e=await this[k(0x1ba)](d);await collator_1['CollatorService'][k(0x190)](this,d),await this[k(0x1b6)](d),await this[k(0x1bf)](0x0,d);const f=await d[k(0x1b1)]();c['mapActivityAttributes']();const g=this['resolveStatus'](f);return c['setActivityAttributes']({'app.activity.mid':e,'app.job.jss':g}),this[k(0x194)]['metadata'][k(0x1b9)];}catch(h){if(h instanceof errors_1[k(0x1ca)]){this[k(0x1c4)][k(0x1a8)](k(0x192),{...h});return;}else{if(h instanceof errors_1[k(0x1a5)]){this[k(0x1c4)]['info'](k(0x1cd),{...h});return;}else{if(h instanceof errors_1[k(0x19d)]){this[k(0x1c4)]['error'](k(0x1a3),{...h});return;}else{if(h instanceof errors_1[k(0x1ae)]){if(h['fault']===k(0x1cc)){this['logger']['info'](k(0x19c),{'job_id':this['context'][k(0x1c7)][k(0x193)],'guid':this['context']['metadata'][k(0x1cb)]});return;}this[k(0x1c4)]['error']('worker-collation-error',{...h});}else this[k(0x1c4)]['error']('worker-process-error',{...h});}}}c?.[k(0x1a0)](h['message']);throw h;}finally{c?.[k(0x19e)](),this[k(0x1c4)][k(0x1c8)]('worker-process-end',{'jid':this[k(0x194)]['metadata'][k(0x193)],'gid':this['context'][k(0x1c7)][k(0x1ce)],'aid':this['metadata'][k(0x1b9)]});}}async[j(0x1ba)](c){const l=j,d=pipe_1[l(0x1af)][l(0x1b4)](this[l(0x1a7)][l(0x1c6)],this[l(0x194)]),e={'metadata':{'guid':(0x0,utils_1[l(0x1cb)])(),'jid':this[l(0x194)][l(0x1c7)][l(0x193)],'gid':this['context'][l(0x1c7)]['gid'],'dad':this[l(0x1c7)][l(0x1aa)],'aid':this[l(0x1c7)]['aid'],'topic':d,'spn':this[l(0x194)][l(0x198)][l(0x19f)][l(0x1c7)][l(0x1a1)],'trc':this['context'][l(0x1c7)]['trc']},'data':this[l(0x194)][l(0x197)]};return this[l(0x1a7)][l(0x1a4)]&&(e['policies']={'retry':this[l(0x1a7)][l(0x1a4)]}),await this['engine'][l(0x1a6)]?.[l(0x1b0)](d,e,c);}}exports[j(0x1b8)]=Worker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=parseInt(l(0xa0))/0x1*(-parseInt(l(0xab))/0x2)+parseInt(l(0xc3))/0x3+-parseInt(l(0xad))/0x4+-parseInt(l(0x9a))/0x5+parseInt(l(0x93))/0x6*(parseInt(l(0xc5))/0x7)+parseInt(l(0xc4))/0x8+-parseInt(l(0xb1))/0x9*(-parseInt(l(0xa3))/0xa);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x51ac6));Object[m(0x95)](exports,'__esModule',{'value':!![]}),exports['CollatorService']=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0x85;let h=e[f];return h;},b(c,d);}const errors_1=require(m(0xaa)),collator_1=require(m(0xba));function a(){const M=['ancestors','getSeed','2982385WDHrFf','forEach','type','authorizeReentry','compile','ancestor','1trPpBT','isArray','getDimensionsById','360qZEvtK','isDuplicate','notarizeEarlyExit','CollatorService','FORBIDDEN','indexOf','activities','../../modules/errors','1324450jRcmOF','getDimensionalAddress','1228308uxoZIQ','config','CollationFaultType','reverse','255888WUxdEO','cycle','notarizeEntry','verifySyntheticInteger','length','999000000000000','substring','getDimensionalIndex','verifyInteger','../../types/collator','collator-trigger-activity-not-found','exit','collate','notarizeInception','dad','collateSynthetic','context','trigger','1771656xkoTNx','882968sYpAhf','615433lsrHku','push','leg','lastIndexOf','getDimensionalSeed','MISSING','INVALID','jid','toString','getDigitAtIndex','bindAncestorArray','InactiveJobError','join','store','notarizeEarlyCompletion','aid','notarizeCompletion','isPrimed','keys','transact','888000001000001','CollationError','DUPLICATE','12ooEFMs','enter','defineProperty','getTriggerSeed','metadata'];a=function(){return M;};return a();}class CollatorService{static['assertJobActive'](c,d,e,f=0x0){const n=m;if(c<=f)throw new errors_1[(n(0x87))](d,c,e);}static['getDimensionalAddress'](c,d=![]){const o=m;let e=c[o(0xc1)][o(0x97)]['dad']||c[o(0x97)]['dad'];return d&&e&&c[o(0xc7)]===0x2&&(e=e[o(0xb7)](0x0,e[o(0xc8)](','))+',0'),CollatorService[o(0xa2)]([...c[o(0xae)][o(0x98)],c['metadata'][o(0x8b)]],e);}static['resolveReentryDimension'](c){const p=m,d=c['config'][p(0x9f)],e=c[p(0xae)][p(0x98)],f=e[p(0xa8)](d),g=c['metadata'][p(0xbf)]['split'](',');return g[p(0xb5)]=f+0x1,g[p(0xc6)]('0'),g[p(0x88)](',');}static async[m(0xb3)](c,d){const q=m,e=await c[q(0x89)][q(0xbd)](c[q(0xc1)]['metadata']['jid'],c[q(0x97)][q(0x8b)],-0x5af3107a4000,this[q(0xac)](c),d);return this[q(0xb9)](e,0x1,q(0x94)),e;}static async[m(0x9d)](c,d){const r=m,e=await c[r(0x89)]['collate'](c[r(0xc1)]['metadata'][r(0xcc)],c[r(0x97)][r(0x8b)],-0x9184e72a000,this[r(0xac)](c),d);return e;}static async[m(0xa5)](c,d){const s=m;return await c[s(0x89)][s(0xbd)](c[s(0xc1)][s(0x97)][s(0xcc)],c[s(0x97)]['aid'],-0xa012317b000,this[s(0xac)](c),d);}static async[m(0x8a)](c,d){const t=m,e=c[t(0xae)][t(0xb2)]?0x9184e72a000:0xa012317b000;return await c['store']['collate'](c[t(0xc1)][t(0x97)][t(0xcc)],c[t(0x97)][t(0x8b)],0xf4241-e,this[t(0xac)](c),d);}static async[m(0xbe)](c,d,e){const u=m;d&&await c['store'][u(0xc0)](c[u(0xc1)][u(0x97)][u(0xcc)],d,0xf4240,e);}static async['isInceptionOverage'](c,d){const v=m;if(d){const e=await c[v(0x89)][v(0xc0)](c[v(0xc1)][v(0x97)]['jid'],d,0xf4240);return e>0xf4240;}return![];}static async['notarizeReentry'](c,d,e){const w=m,f=c[w(0xc1)]['metadata']['jid'],g=e||c['store'][w(0x8f)]();await c['store'][w(0xbd)](f,c[w(0x97)][w(0x8b)],0xf4240,this[w(0xac)](c,!![]),g),await c['store'][w(0xc0)](f,d,0xf4240,g);const [h,i]=await g['exec'](),j=Array[w(0xa1)](h)?h[0x1]:h,k=Array[w(0xa1)](i)?i[0x1]:i;return this['verifyInteger'](j,0x2,'enter'),this[w(0xb4)](k),j;}static async['notarizeContinuation'](c,d){const x=m;return await c['store']['collate'](c['context'][x(0x97)]['jid'],c[x(0x97)][x(0x8b)],0x1,this['getDimensionalAddress'](c),d);}static async[m(0x8c)](c,d){const y=m,e=c[y(0xae)]['cycle']?0x0:0xe8d4a51000;return await c[y(0x89)]['collate'](c['context'][y(0x97)][y(0xcc)],c['metadata'][y(0x8b)],0x1-e,this[y(0xac)](c),d);}static[m(0x85)](c,d){const e=c['toString']();if(d<0x0||d>=e['length'])return null;const f=parseInt(e[d],0xa);return f;}static[m(0xb8)](c){const z=m,d=c['toString']();if(d[z(0xb5)]<0x9)return null;const e=d['substring'](0x3,0x9),f=parseInt(e,0xa);return f-0x1;}static[m(0xa4)](c,d){return this['getDigitAtIndex'](c,d)<0x8;}static['isInactive'](c){const A=m;return this[A(0x85)](c,0x2)<0x9;}static['isPrimed'](c,d){const B=m;return d==0x1?c!=-0x5af3107a4000:this[B(0x85)](c,0x0)<0x9&&this[B(0x85)](c,0x1)<0x9;}static['verifySyntheticInteger'](c){const C=m,d=c[C(0xcd)](),e=parseInt(d[d['length']-0x1],0xa);if(e>0x0)throw new errors_1[(C(0x91))](c,0x2,'enter',collator_1['CollationFaultType']['INACTIVE']);else{if(c>=0x1e8480)throw new errors_1[(C(0x91))](c,0x2,C(0x94),collator_1[C(0xaf)][C(0x92)]);}}static[m(0xb9)](c,d,e){const D=m;let f;if(d===0x1&&e===D(0x94)){if(!this[D(0x8d)](c,0x1))f=collator_1[D(0xaf)][D(0xca)];else{if(this['isDuplicate'](c,0x0))f=collator_1[D(0xaf)][D(0x92)];else c!=0x331a2bfa73000&&(f=collator_1[D(0xaf)][D(0xcb)]);}}else{if(d===0x1&&e===D(0xbc)){if(c===-0x9184e72a000)f=collator_1['CollationFaultType'][D(0xca)];else this[D(0xa4)](c,0x1)&&(f=collator_1[D(0xaf)][D(0x92)]);}else{if(d===0x2&&e===D(0x94)){if(!this[D(0x8d)](c,0x2))f=collator_1[D(0xaf)][D(0xa7)];else this['isInactive'](c)&&(f=collator_1[D(0xaf)]['INACTIVE']);}}}if(f)throw new errors_1[(D(0x91))](c,d,e,f);}static[m(0xa2)](c,d){const E=m,e={'$ADJACENT':d+',0'};let f=d;return c[E(0xb0)]()[E(0x9b)](g=>{const F=E;e[g]=f,f=f['substring'](0x0,f[F(0xc8)](','));}),e;}static[m(0x99)](){const G=m;return G(0xb6);}static[m(0x96)](){const H=m;return H(0x90);}static[m(0x9e)](c){const I=m;CollatorService[I(0x86)](c);}static[m(0x86)](c){const J=m;c[J(0x9b)](d=>{const K=J,e={},f=Object[K(0x8e)](d[K(0xa9)])['find'](h=>d[K(0xa9)][h][K(0x9c)]===K(0xc2));if(!f)throw new Error(K(0xbb));const g=(h,i)=>{const L=K;e[h]=i,d[L(0xa9)][h][L(0x98)]=i;const j=d['transitions']?.[h]||[];j['forEach'](k=>{g(k['to'],[...i,h]);});};g(f,[]);});}static[m(0xc9)](c=0x0){return','+c;}}exports[m(0xa6)]=CollatorService,CollatorService['targetLength']=0xf;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(_0x28516d,_0x116222){const _0x50bbd8=_0x42b6,_0x468955=_0x28516d();while(!![]){try{const _0xdd4ef9=parseInt(_0x50bbd8(0x171))/0x1*(parseInt(_0x50bbd8(0x16f))/0x2)+-parseInt(_0x50bbd8(0x16b))/0x3*(parseInt(_0x50bbd8(0x16a))/0x4)+-parseInt(_0x50bbd8(0x167))/0x5*(parseInt(_0x50bbd8(0x170))/0x6)+-parseInt(_0x50bbd8(0x169))/0x7+-parseInt(_0x50bbd8(0x16e))/0x8*(-parseInt(_0x50bbd8(0x16d))/0x9)+parseInt(_0x50bbd8(0x16c))/0xa+-parseInt(_0x50bbd8(0x168))/0xb;if(_0xdd4ef9===_0x116222)break;else _0x468955['push'](_0x468955['shift']());}catch(_0x5f12f9){_0x468955['push'](_0x468955['shift']());}}}(_0x19b5,0xd52c0));function _0x42b6(_0x28ef11,_0x53b580){const _0x19b5d3=_0x19b5();return _0x42b6=function(_0x42b65b,_0x4c5f77){_0x42b65b=_0x42b65b-0x167;let _0x3cd8d2=_0x19b5d3[_0x42b65b];return _0x3cd8d2;},_0x42b6(_0x28ef11,_0x53b580);}function _0x19b5(){const _0x124c4c=['5981535cFGuRe','292108wRVtMg','3TbFCnF','11881360UWuXpp','14594940KLvnTU','8mLOzuT','6086vayaPF','502782zQdqAn','101WSDLgb','35rbRIRt','8028636MrOQay'];_0x19b5=function(){return _0x124c4c;};return _0x19b5();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Deployer']=void 0x0;const key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),serializer_1=require('../serializer'),pipe_1=require('../pipe'),validator_1=require('./validator'),DEFAULT_METADATA_RANGE_SIZE=0x1a,DEFAULT_DATA_RANGE_SIZE=0x104,DEFAULT_RANGE_SIZE=DEFAULT_METADATA_RANGE_SIZE+DEFAULT_DATA_RANGE_SIZE;class Deployer{constructor(_0x2ffd39){this['manifest']=null,this['manifest']=_0x2ffd39;}async['deploy'](_0x80ae61,_0x3f9aef){this['store']=_0x80ae61,this['stream']=_0x3f9aef,collator_1['CollatorService']['compile'](this['manifest']['app']['graphs']),this['convertActivitiesToHooks'](),this['convertTopicsToTypes'](),this['copyJobSchemas'](),this['bindBackRefs'](),this['bindParents'](),this['bindCycleTarget'](),this['resolveMappingDependencies'](),this['resolveJobMapsPaths'](),await this['generateSymKeys'](),await this['generateSymVals'](),await this['deployHookPatterns'](),await this['deployActivitySchemas'](),await this['deploySubscriptions'](),await this['deployTransitions'](),await this['deployConsumerGroups']();}['getVID'](){return{'id':this['manifest']['app']['id'],'version':this['manifest']['app']['version']};}async['generateSymKeys'](){for(const _0x4a575d of this['manifest']['app']['graphs']){const [,_0x8dd842]=this['findTrigger'](_0x4a575d),_0x25265a=_0x8dd842['subscribes'],[_0x593fce,_0x367c93,_0x2b9ec5]=await this['store']['reserveSymbolRange']('$'+_0x25265a,DEFAULT_RANGE_SIZE,'JOB'),_0x4f3670='',_0x27ff2a=this['bindSymbols'](_0x593fce,_0x367c93,_0x2b9ec5,_0x4f3670,_0x8dd842['PRODUCES']);Object['keys'](_0x27ff2a)['length']&&await this['store']['addSymbols']('$'+_0x25265a,_0x27ff2a);for(const [_0x25bcbe,_0x4341f8]of Object['entries'](_0x4a575d['activities'])){const [_0x129456,_0x28a25b,_0x103f99]=await this['store']['reserveSymbolRange'](_0x25bcbe,DEFAULT_RANGE_SIZE,'ACTIVITY'),_0x2dc991=_0x25bcbe+'/';this['bindSelf'](_0x4341f8['consumes'],_0x4341f8['produces'],_0x25bcbe);const _0x181e8c=this['bindSymbols'](_0x129456,_0x28a25b,_0x103f99,_0x2dc991,_0x4341f8['produces']);Object['keys'](_0x181e8c)['length']&&await this['store']['addSymbols'](_0x25bcbe,_0x181e8c);}}}['bindSelf'](_0x2444b7,_0x17f680,_0xc283d9){for(const _0x223464 of[_0xc283d9,'$self']){const _0x57433e=_0x2444b7[_0x223464];if(_0x57433e)for(const _0x142bf3 of _0x57433e){!_0x17f680['includes'](_0x142bf3)&&_0x17f680['push'](_0x142bf3);}}}['bindSymbols'](_0x58efed,_0x5a1ca5,_0x9d5ba0,_0x1f1f33,_0x3497fd){const _0x1c7de0={},_0x27c3bf={..._0x9d5ba0};for(const _0x39246f of _0x3497fd){const _0x163279=''+_0x1f1f33+_0x39246f;if(!_0x27c3bf[_0x163279]){if(_0x58efed>_0x5a1ca5)throw new Error('Symbol\x20index\x20out\x20of\x20bounds');const _0x4aa82d=(0x0,utils_1['getSymKey'])(_0x58efed);_0x58efed++,_0x1c7de0[_0x163279]=_0x4aa82d,_0x27c3bf[_0x163279]=_0x4aa82d;}}return _0x1c7de0;}['copyJobSchemas'](){const _0x5ec52e=this['manifest']['app']['graphs'];for(const _0x5d602e of _0x5ec52e){const _0x12422f=_0x5d602e['output']?.['schema'],_0x3d1cf3=_0x5d602e['input']?.['schema'];if(!_0x12422f&&!_0x3d1cf3)continue;const _0x12d408=_0x5d602e['activities'];for(const _0x3847b5 in _0x12d408){if(_0x12d408[_0x3847b5]['type']==='trigger'){const _0x3e81f1=_0x12d408[_0x3847b5];_0x12422f&&(!_0x3e81f1['job']&&(_0x3e81f1['job']={}),_0x3e81f1['job']['schema']=_0x12422f),_0x3d1cf3&&(_0x3e81f1['output']={'schema':_0x3d1cf3});}}}}['bindBackRefs'](){for(const _0x1abade of this['manifest']['app']['graphs']){const _0x2f90d6=_0x1abade['activities'],_0x157ce7=this['findTrigger'](_0x1abade)[0x0];for(const _0x4b383a in _0x2f90d6){_0x2f90d6[_0x4b383a]['trigger']=_0x157ce7,_0x2f90d6[_0x4b383a]['subscribes']=_0x1abade['subscribes'],_0x1abade['publishes']&&(_0x2f90d6[_0x4b383a]['publishes']=_0x1abade['publishes']),_0x2f90d6[_0x4b383a]['expire']=_0x1abade['expire']??undefined,_0x2f90d6[_0x4b383a]['persistent']=_0x1abade['persistent']??undefined;}}}['bindCycleTarget'](){for(const _0x56531c of this['manifest']['app']['graphs']){const _0x341d63=_0x56531c['activities'];for(const _0x2a021f in _0x341d63){const _0x356df3=_0x341d63[_0x2a021f];_0x356df3['type']==='cycle'&&(_0x341d63[_0x356df3['ancestor']]['cycle']=!![]);}}}['convertTopicsToTypes'](){for(const _0x25b5ac of this['manifest']['app']['graphs']){const _0x2bea65=_0x25b5ac['activities'];for(const _0x4670db in _0x2bea65){const _0x4eb699=_0x2bea65[_0x4670db];['worker','await']['includes'](_0x4eb699['type'])&&_0x4eb699['topic']&&!_0x4eb699['subtype']&&(_0x4eb699['subtype']=_0x4eb699['topic']);}}}['convertActivitiesToHooks'](){for(const _0x5d552 of this['manifest']['app']['graphs']){const _0x26dfbd=_0x5d552['activities'];for(const _0x4cc37e in _0x26dfbd){const _0x4d91fc=_0x26dfbd[_0x4cc37e];['activity']['includes'](_0x4d91fc['type'])&&(_0x4d91fc['type']='hook');}}}async['bindParents'](){const _0x1cc68f=this['manifest']['app']['graphs'];for(const _0x19994e of _0x1cc68f){if(_0x19994e['transitions'])for(const _0x4a279d in _0x19994e['transitions']){const _0x14d624=_0x19994e['transitions'][_0x4a279d];for(const _0x14c52b of _0x14d624){const _0xd00be2=_0x14c52b['to'];_0x19994e['activities'][_0xd00be2]['parent']=_0x4a279d;}_0x19994e['activities'][_0x4a279d]['transitions']=_0x14d624;}}}['collectValues'](_0xff45ea,_0x477436){for(const [_0x41bebc,_0x5d5b18]of Object['entries'](_0xff45ea)){if(_0x41bebc==='enum'||_0x41bebc==='examples'||_0x41bebc==='default'){if(Array['isArray'](_0x5d5b18))for(const _0x3e0baa of _0x5d5b18){typeof _0x3e0baa==='string'&&_0x3e0baa['length']>0x5&&_0x477436['add'](_0x3e0baa);}else typeof _0x5d5b18==='string'&&_0x5d5b18['length']>0x5&&_0x477436['add'](_0x5d5b18);}else typeof _0x5d5b18==='object'&&this['collectValues'](_0x5d5b18,_0x477436);}}['traverse'](_0xe35b8d,_0x55fc1d){for(const _0x440473 of Object['values'](_0xe35b8d)){typeof _0x440473==='object'&&('schema'in _0x440473?this['collectValues'](_0x440473['schema'],_0x55fc1d):this['traverse'](_0x440473,_0x55fc1d));}}async['generateSymVals'](){const _0x51dc1a=new Set();for(const _0x5f03ab of this['manifest']['app']['graphs']){this['traverse'](_0x5f03ab,_0x51dc1a);}const _0x420290=await this['store']['getSymbolValues'](),_0x535eb9=Object['keys'](_0x420290)['length'],_0x296ae1=Math['pow'](0x34,0x2)-0x1,_0x277caf=serializer_1['SerializerService']['filterSymVals'](_0x535eb9,_0x296ae1,_0x420290,_0x51dc1a);await this['store']['addSymbolValues'](_0x277caf);}['resolveJobMapsPaths'](){function _0x4f27fe(_0x4ce59e){const _0x98b04b=[];function _0x170e7b(_0x27cee2,_0x11b203=[]){for(const _0x2a3962 in _0x27cee2){if(typeof _0x27cee2[_0x2a3962]==='object'&&_0x27cee2[_0x2a3962]!==null&&!('@pipe'in _0x27cee2[_0x2a3962])){const _0x568fff=[..._0x11b203,_0x2a3962];_0x170e7b(_0x27cee2[_0x2a3962],_0x568fff);}else{const _0x27034e=[..._0x11b203,_0x2a3962]['join']('/');if(!_0x27034e['includes']('[')){const _0xbe633b='data/'+_0x27034e;!_0x98b04b['includes'](_0xbe633b)&&_0x98b04b['push'](_0xbe633b);}else{const [_0x44bc6d,_0x4ccf40]=_0x27034e['split']('['),[_0x376542,_0x3f40f7]=_0x4ccf40['split'](']');if(!isNaN(parseInt(_0x376542)))for(let _0x30424f=0x0;_0x30424f<parseInt(_0x376542);_0x30424f++){const _0x424120='data/'+_0x44bc6d+'/'+_0x30424f;!_0x98b04b['includes'](_0x424120)&&_0x98b04b['push'](_0x424120);}}}}}return _0x4ce59e&&_0x170e7b(_0x4ce59e),_0x98b04b;}for(const _0x7996a9 of this['manifest']['app']['graphs']){let _0x3099be=[];const [,_0x1b0e86]=this['findTrigger'](_0x7996a9);for(const _0xbe3587 in _0x7996a9['activities']){const _0x1ff10b=_0x7996a9['activities'][_0xbe3587];_0x3099be=_0x3099be['concat'](_0x4f27fe(_0x1ff10b['job']?.['maps']));}_0x1b0e86['PRODUCES']=_0x3099be;}}['resolveMappingDependencies'](){const _0x5416e4=[];function _0x1b6327(_0x4a395,_0x2b75b0){for(const _0x5c10e0 in _0x4a395){if(typeof _0x4a395[_0x5c10e0]==='string'){const _0x1f8fd5=_0x4a395[_0x5c10e0],_0x5270ce=_0x1f8fd5['match'](/^\{[^@].*}$/);_0x5270ce&&!validator_1['Validator']['CONTEXT_VARS']['includes'](_0x1f8fd5)&&(_0x1f8fd5['split']('.')[0x1]!=='input'&&(_0x5416e4['push'](_0x1f8fd5),_0x2b75b0['push'](_0x1f8fd5)));}else typeof _0x4a395[_0x5c10e0]==='object'&&_0x4a395[_0x5c10e0]!==null&&_0x1b6327(_0x4a395[_0x5c10e0],_0x2b75b0);}}const _0x59c663=this['manifest']['app']['graphs'];for(const _0x345397 of _0x59c663){const _0xfb48f7=_0x345397['activities'];for(const _0x25f545 in _0xfb48f7){const _0x56c7aa=_0xfb48f7[_0x25f545];_0x56c7aa['consumes']=[],_0x1b6327(_0x56c7aa,_0x56c7aa['consumes']),_0x56c7aa['consumes']=this['groupMappingRules'](_0x56c7aa['consumes']);}}const _0x25fb21=this['groupMappingRules'](_0x5416e4);for(const _0xe51a62 of _0x59c663){const _0x2ccac2=_0xe51a62['activities'];for(const _0x2c6acc in _0x2ccac2){const _0x3bf5a0=_0x2ccac2[_0x2c6acc];_0x3bf5a0['produces']=_0x25fb21[''+_0x2c6acc]||[];}}}['groupMappingRules'](_0x3cc42a){_0x3cc42a=Array['from'](new Set(_0x3cc42a))['sort']();const _0x3bfde6={};for(const _0x19be11 of _0x3cc42a){const [_0x40d1cd,_0x35888b]=this['resolveMappableValue'](_0x19be11);!_0x3bfde6[_0x40d1cd]&&(_0x3bfde6[_0x40d1cd]=[]),_0x3bfde6[_0x40d1cd]['push'](_0x35888b);}return _0x3bfde6;}['resolveMappableValue'](_0xbb5ed5){_0xbb5ed5=_0xbb5ed5['substring'](0x1,_0xbb5ed5['length']-0x1);const _0x1fd4dd=_0xbb5ed5['split']('.');if(_0x1fd4dd[0x0]==='$job'){const [_0x26d510,..._0x565fc6]=_0x1fd4dd;return[_0x26d510,_0x565fc6['join']('/')];}else{const [_0xd74cdf,_0x4fec97,_0x1c3677,..._0x42e30b]=_0x1fd4dd,_0x46d506={'hook':'hook/data','input':'input/data','output':_0x1c3677==='data'?'output/data':'output/metadata'}[_0x4fec97];return[_0xd74cdf,_0x46d506+'/'+_0x42e30b['join']('/')];}}async['deployActivitySchemas'](){const _0x2eeb0a=this['manifest']['app']['graphs'],_0x45f70c={};for(const _0x592828 of _0x2eeb0a){const _0x37683b=_0x592828['activities'];for(const _0x5abaeb in _0x37683b){const _0x45843=_0x37683b[_0x5abaeb];delete _0x45843['transitions'],_0x45f70c[_0x5abaeb]=_0x45843;}}await this['store']['setSchemas'](_0x45f70c,this['getVID']());}async['deploySubscriptions'](){const _0x23e872=this['manifest']['app']['graphs'],_0x1269d4={};for(const _0x373bf8 of _0x23e872){const _0x4434ce=_0x373bf8['activities'],_0x751508=_0x373bf8['subscribes'];for(const _0x54ebbb in _0x4434ce){if(_0x4434ce[_0x54ebbb]['type']==='trigger'){_0x1269d4[_0x751508]=_0x54ebbb;break;}}}await this['store']['setSubscriptions'](_0x1269d4,this['getVID']());}['findTrigger'](_0x405b4c){for(const _0x425ebd in _0x405b4c['activities']){const _0x410f58=_0x405b4c['activities'][_0x425ebd];if(_0x410f58['type']==='trigger')return[_0x425ebd,_0x410f58];}return null;}async['deployTransitions'](){const _0x95188c=this['manifest']['app']['graphs'],_0x493423={};for(const _0x5f3d38 of _0x95188c){if(_0x5f3d38['subscribes']&&_0x5f3d38['subscribes']['startsWith']('.')){const [_0x4b610e]=this['findTrigger'](_0x5f3d38);_0x4b610e&&(_0x493423[_0x5f3d38['subscribes']]={[_0x4b610e]:!![]});}if(_0x5f3d38['transitions'])for(const _0x3cb661 in _0x5f3d38['transitions']){const _0x21094c=_0x5f3d38['transitions'][_0x3cb661],_0x4d29ca={};for(const _0x4761d5 of _0x21094c){const _0x5bece4=_0x4761d5['to'];_0x4761d5['conditions']?_0x4d29ca[_0x5bece4]=_0x4761d5['conditions']:_0x4d29ca[_0x5bece4]=!![];}Object['keys'](_0x4d29ca)['length']>0x0&&(_0x493423['.'+_0x3cb661]=_0x4d29ca);}}await this['store']['setTransitions'](_0x493423,this['getVID']());}async['deployHookPatterns'](){const _0x4a08a0=this['manifest']['app']['graphs'],_0x768d7f={};for(const _0x297d9e of _0x4a08a0){if(_0x297d9e['hooks'])for(const _0xd502e7 in _0x297d9e['hooks']){_0x768d7f[_0xd502e7]=_0x297d9e['hooks'][_0xd502e7];const _0x10c0f7=_0x297d9e['hooks'][_0xd502e7][0x0]['to'],_0x358724=_0x297d9e['activities'][_0x10c0f7];_0x358724&&(!_0x358724['hook']&&(_0x358724['hook']={}),_0x358724['hook']['topic']=_0xd502e7);}}await this['store']['setHookRules'](_0x768d7f);}async['deployConsumerGroups'](){const _0x20e7cf={'appId':this['manifest']['app']['id']},_0x17998e=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x20e7cf);await this['deployConsumerGroup'](_0x17998e,'ENGINE');for(const _0x2228f2 of this['manifest']['app']['graphs']){const _0x4e7d0d=_0x2228f2['activities'];for(const _0x383b54 in _0x4e7d0d){const _0x2848a6=_0x4e7d0d[_0x383b54];if(_0x2848a6['type']==='worker'&&pipe_1['Pipe']['resolve'](_0x2848a6['subtype'],{})===_0x2848a6['subtype']){_0x20e7cf['topic']=_0x2848a6['subtype'];const _0x2fa546=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x20e7cf);await this['deployConsumerGroup'](_0x2fa546,'WORKER');}}}}async['deployConsumerGroup'](_0x1892f2,_0x5aa70a){try{await this['stream']['createConsumerGroup'](_0x1892f2,_0x5aa70a);}catch(_0x504d30){this['store']['logger']['info']('router-stream-group-exists',{'stream':_0x1892f2,'group':_0x5aa70a});}}}exports['Deployer']=Deployer;
|
|
1
|
+
'use strict';function b(c,d){const e=a();return b=function(f,g){f=f-0x8e;let h=e[f];return h;},b(c,d);}const u=b;function a(){const X=['consumes','addSymbols','ACTIVITY','$job','JOB','Pipe','10orzSer','145mJofEU','trigger','154cGvlUm','substring','hook/data','convertTopicsToTypes','data','bindSelf','deployTransitions','enum','resolveMappableValue','graphs','../../modules/key','1037238UuZJaj','9062703jgQiih','type','deploy','examples','pow','deployConsumerGroups','collectValues','4616064vcxAQy','copyJobSchemas','input/data','STREAMS','output/data','KeyType','await','85836lKIEzn','parent','deployHookPatterns','concat','string','entries','8664bBrtwI','resolveJobMapsPaths','groupMappingRules','$self','bindBackRefs','setHookRules','activities','version','4TuVedR','setSchemas','deployConsumerGroup','push','bindParents','length','join','input','stream','547626ELOgvL','job','736pVabjU','hook','data/','__esModule','generateSymVals','manifest','expire','../pipe','startsWith','9667oczXbi','reserveSymbolRange','getSymbolValues','subscribes','sort','PRODUCES','../../modules/utils','SerializerService','split','keys','createConsumerGroup','transitions','getVID','./validator','publishes','getSymKey','mintKey','store','object','Validator','resolve','generateSymKeys','traverse','produces','info','schema','../collator','CONTEXT_VARS','add','includes','activity','findTrigger','hooks','bindSymbols','filterSymVals','compile','1RbZvPH','app','deployActivitySchemas','../serializer','logger','cycle','topic','bindCycleTarget','subtype','worker','output/metadata','resolveMappingDependencies','convertActivitiesToHooks','output'];a=function(){return X;};return a();}(function(c,d){const t=b,e=c();while(!![]){try{const f=parseInt(t(0xac))/0x1*(-parseInt(t(0xce))/0x2)+-parseInt(t(0xf4))/0x3*(-parseInt(t(0xeb))/0x4)+-parseInt(t(0xc1))/0x5*(parseInt(t(0xdd))/0x6)+parseInt(t(0xff))/0x7*(-parseInt(t(0xf6))/0x8)+parseInt(t(0xd6))/0x9*(parseInt(t(0xc0))/0xa)+-parseInt(t(0xc3))/0xb*(parseInt(t(0xe3))/0xc)+parseInt(t(0xcf))/0xd;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x4e97c));Object['defineProperty'](exports,u(0xf9),{'value':!![]}),exports['Deployer']=void 0x0;const key_1=require(u(0xcd)),utils_1=require(u(0x8e)),collator_1=require(u(0xa2)),serializer_1=require(u(0xaf)),pipe_1=require(u(0xfd)),validator_1=require(u(0x95)),DEFAULT_METADATA_RANGE_SIZE=0x1a,DEFAULT_DATA_RANGE_SIZE=0x104,DEFAULT_RANGE_SIZE=DEFAULT_METADATA_RANGE_SIZE+DEFAULT_DATA_RANGE_SIZE;class Deployer{constructor(c){const v=u;this[v(0xfb)]=null,this[v(0xfb)]=c;}async[u(0xd1)](c,d){const w=u;this['store']=c,this[w(0xf3)]=d,collator_1['CollatorService'][w(0xab)](this[w(0xfb)][w(0xad)][w(0xcc)]),this[w(0xb8)](),this[w(0xc6)](),this[w(0xd7)](),this[w(0xe7)](),this[w(0xef)](),this[w(0xb3)](),this[w(0xb7)](),this['resolveJobMapsPaths'](),await this[w(0x9d)](),await this['generateSymVals'](),await this[w(0xdf)](),await this[w(0xae)](),await this['deploySubscriptions'](),await this[w(0xc9)](),await this[w(0xd4)]();}[u(0x94)](){const x=u;return{'id':this[x(0xfb)][x(0xad)]['id'],'version':this['manifest'][x(0xad)][x(0xea)]};}async[u(0x9d)](){const y=u;for(const c of this[y(0xfb)][y(0xad)][y(0xcc)]){const [,d]=this[y(0xa7)](c),e=d[y(0x102)],[f,g,h]=await this[y(0x99)]['reserveSymbolRange']('$'+e,DEFAULT_RANGE_SIZE,y(0xbe)),i='',j=this[y(0xa9)](f,g,h,i,d[y(0x104)]);Object[y(0x91)](j)[y(0xf0)]&&await this['store']['addSymbols']('$'+e,j);for(const [k,l]of Object[y(0xe2)](c['activities'])){const [m,n,o]=await this[y(0x99)][y(0x100)](k,DEFAULT_RANGE_SIZE,y(0xbc)),p=k+'/';this['bindSelf'](l[y(0xba)],l[y(0x9f)],k);const q=this[y(0xa9)](m,n,o,p,l[y(0x9f)]);Object[y(0x91)](q)[y(0xf0)]&&await this[y(0x99)][y(0xbb)](k,q);}}}[u(0xc8)](c,d,e){const z=u;for(const f of[e,z(0xe6)]){const g=c[f];if(g)for(const h of g){!d[z(0xa5)](h)&&d[z(0xee)](h);}}}['bindSymbols'](c,d,e,f,g){const A=u,h={},i={...e};for(const j of g){const k=''+f+j;if(!i[k]){if(c>d)throw new Error('Symbol\x20index\x20out\x20of\x20bounds');const l=(0x0,utils_1[A(0x97)])(c);c++,h[k]=l,i[k]=l;}}return h;}['copyJobSchemas'](){const B=u,c=this[B(0xfb)][B(0xad)][B(0xcc)];for(const d of c){const e=d[B(0xb9)]?.[B(0xa1)],f=d[B(0xf2)]?.[B(0xa1)];if(!e&&!f)continue;const g=d[B(0xe9)];for(const h in g){if(g[h][B(0xd0)]==='trigger'){const i=g[h];e&&(!i[B(0xf5)]&&(i[B(0xf5)]={}),i[B(0xf5)][B(0xa1)]=e),f&&(i[B(0xb9)]={'schema':f});}}}}[u(0xe7)](){const C=u;for(const c of this[C(0xfb)][C(0xad)][C(0xcc)]){const d=c[C(0xe9)],e=this['findTrigger'](c)[0x0];for(const f in d){d[f][C(0xc2)]=e,d[f]['subscribes']=c['subscribes'],c[C(0x96)]&&(d[f][C(0x96)]=c[C(0x96)]),d[f][C(0xfc)]=c[C(0xfc)]??undefined,d[f]['persistent']=c['persistent']??undefined;}}}[u(0xb3)](){const D=u;for(const c of this['manifest'][D(0xad)][D(0xcc)]){const d=c[D(0xe9)];for(const e in d){const f=d[e];f[D(0xd0)]==='cycle'&&(d[f['ancestor']][D(0xb1)]=!![]);}}}[u(0xc6)](){const E=u;for(const c of this[E(0xfb)]['app']['graphs']){const d=c['activities'];for(const e in d){const f=d[e];[E(0xb5),E(0xdc)][E(0xa5)](f['type'])&&f['topic']&&!f[E(0xb4)]&&(f[E(0xb4)]=f[E(0xb2)]);}}}[u(0xb8)](){const F=u;for(const c of this[F(0xfb)][F(0xad)][F(0xcc)]){const d=c[F(0xe9)];for(const e in d){const f=d[e];[F(0xa6)][F(0xa5)](f['type'])&&(f['type']=F(0xf7));}}}async[u(0xef)](){const G=u,c=this[G(0xfb)][G(0xad)][G(0xcc)];for(const d of c){if(d[G(0x93)])for(const e in d[G(0x93)]){const f=d[G(0x93)][e];for(const g of f){const h=g['to'];d['activities'][h][G(0xde)]=e;}d[G(0xe9)][e]['transitions']=f;}}}['collectValues'](c,d){const H=u;for(const [e,f]of Object[H(0xe2)](c)){if(e===H(0xca)||e===H(0xd2)||e==='default'){if(Array['isArray'](f))for(const g of f){typeof g===H(0xe1)&&g['length']>0x5&&d[H(0xa4)](g);}else typeof f===H(0xe1)&&f['length']>0x5&&d[H(0xa4)](f);}else typeof f===H(0x9a)&&this[H(0xd5)](f,d);}}[u(0x9e)](c,d){const I=u;for(const e of Object['values'](c)){typeof e===I(0x9a)&&(I(0xa1)in e?this[I(0xd5)](e[I(0xa1)],d):this[I(0x9e)](e,d));}}async[u(0xfa)](){const J=u,c=new Set();for(const h of this[J(0xfb)][J(0xad)]['graphs']){this['traverse'](h,c);}const d=await this[J(0x99)][J(0x101)](),e=Object[J(0x91)](d)['length'],f=Math[J(0xd3)](0x34,0x2)-0x1,g=serializer_1[J(0x8f)][J(0xaa)](e,f,d,c);await this[J(0x99)]['addSymbolValues'](g);}[u(0xe4)](){const L=u;function c(d){const e=[];function f(g,h=[]){const K=b;for(const j in g){if(typeof g[j]===K(0x9a)&&g[j]!==null&&!('@pipe'in g[j])){const k=[...h,j];f(g[j],k);}else{const l=[...h,j]['join']('/');if(!l[K(0xa5)]('[')){const m='data/'+l;!e[K(0xa5)](m)&&e[K(0xee)](m);}else{const [n,o]=l[K(0x90)]('['),[p,q]=o[K(0x90)](']');if(!isNaN(parseInt(p)))for(let r=0x0;r<parseInt(p);r++){const s=K(0xf8)+n+'/'+r;!e[K(0xa5)](s)&&e[K(0xee)](s);}}}}}return d&&f(d),e;}for(const d of this['manifest'][L(0xad)][L(0xcc)]){let e=[];const [,f]=this[L(0xa7)](d);for(const g in d[L(0xe9)]){const h=d[L(0xe9)][g];e=e[L(0xe0)](c(h['job']?.['maps']));}f[L(0x104)]=e;}}[u(0xb7)](){const N=u,c=[];function d(g,h){const M=b;for(const i in g){if(typeof g[i]===M(0xe1)){const j=g[i],k=j['match'](/^\{[^@].*}$/);k&&!validator_1[M(0x9b)][M(0xa3)][M(0xa5)](j)&&(j[M(0x90)]('.')[0x1]!==M(0xf2)&&(c[M(0xee)](j),h['push'](j)));}else typeof g[i]===M(0x9a)&&g[i]!==null&&d(g[i],h);}}const e=this[N(0xfb)][N(0xad)][N(0xcc)];for(const g of e){const h=g[N(0xe9)];for(const i in h){const j=h[i];j['consumes']=[],d(j,j[N(0xba)]),j['consumes']=this[N(0xe5)](j[N(0xba)]);}}const f=this[N(0xe5)](c);for(const k of e){const l=k[N(0xe9)];for(const m in l){const n=l[m];n['produces']=f[''+m]||[];}}}[u(0xe5)](c){const O=u;c=Array['from'](new Set(c))[O(0x103)]();const d={};for(const e of c){const [f,g]=this[O(0xcb)](e);!d[f]&&(d[f]=[]),d[f][O(0xee)](g);}return d;}[u(0xcb)](c){const P=u;c=c[P(0xc4)](0x1,c[P(0xf0)]-0x1);const d=c[P(0x90)]('.');if(d[0x0]===P(0xbd)){const [e,...f]=d;return[e,f['join']('/')];}else{const [g,h,i,...j]=d,k={'hook':P(0xc5),'input':P(0xd8),'output':i===P(0xc7)?P(0xda):P(0xb6)}[h];return[g,k+'/'+j[P(0xf1)]('/')];}}async['deployActivitySchemas'](){const Q=u,c=this['manifest']['app'][Q(0xcc)],d={};for(const e of c){const f=e[Q(0xe9)];for(const g in f){const h=f[g];delete h[Q(0x93)],d[g]=h;}}await this[Q(0x99)][Q(0xec)](d,this[Q(0x94)]());}async['deploySubscriptions'](){const R=u,c=this[R(0xfb)]['app'][R(0xcc)],d={};for(const e of c){const f=e[R(0xe9)],g=e['subscribes'];for(const h in f){if(f[h]['type']==='trigger'){d[g]=h;break;}}}await this['store']['setSubscriptions'](d,this[R(0x94)]());}[u(0xa7)](c){const S=u;for(const d in c['activities']){const e=c[S(0xe9)][d];if(e[S(0xd0)]===S(0xc2))return[d,e];}return null;}async[u(0xc9)](){const T=u,c=this[T(0xfb)]['app'][T(0xcc)],d={};for(const e of c){if(e['subscribes']&&e['subscribes'][T(0xfe)]('.')){const [f]=this['findTrigger'](e);f&&(d[e[T(0x102)]]={[f]:!![]});}if(e[T(0x93)])for(const g in e[T(0x93)]){const h=e[T(0x93)][g],i={};for(const j of h){const k=j['to'];j['conditions']?i[k]=j['conditions']:i[k]=!![];}Object[T(0x91)](i)[T(0xf0)]>0x0&&(d['.'+g]=i);}}await this[T(0x99)]['setTransitions'](d,this[T(0x94)]());}async[u(0xdf)](){const U=u,c=this[U(0xfb)][U(0xad)]['graphs'],d={};for(const e of c){if(e[U(0xa8)])for(const f in e[U(0xa8)]){d[f]=e[U(0xa8)][f];const g=e['hooks'][f][0x0]['to'],h=e['activities'][g];h&&(!h[U(0xf7)]&&(h['hook']={}),h[U(0xf7)][U(0xb2)]=f);}}await this['store'][U(0xe8)](d);}async['deployConsumerGroups'](){const V=u,c={'appId':this[V(0xfb)][V(0xad)]['id']},d=this[V(0x99)][V(0x98)](key_1[V(0xdb)]['STREAMS'],c);await this[V(0xed)](d,'ENGINE');for(const e of this['manifest'][V(0xad)][V(0xcc)]){const f=e[V(0xe9)];for(const g in f){const h=f[g];if(h[V(0xd0)]===V(0xb5)&&pipe_1[V(0xbf)][V(0x9c)](h['subtype'],{})===h[V(0xb4)]){c[V(0xb2)]=h[V(0xb4)];const i=this[V(0x99)][V(0x98)](key_1['KeyType'][V(0xd9)],c);await this['deployConsumerGroup'](i,'WORKER');}}}}async[u(0xed)](c,d){const W=u;try{await this['stream'][W(0x92)](c,d);}catch(e){this[W(0x99)][W(0xb0)][W(0xa0)]('router-stream-group-exists',{'stream':c,'group':d});}}}exports['Deployer']=Deployer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';const i=b;(function(c,d){const h=b,e=c();while(!![]){try{const f=parseInt(h(0x1ec))/0x1+parseInt(h(0x1e4))/0x2+-parseInt(h(0x1d0))/0x3+parseInt(h(0x1c2))/0x4*(-parseInt(h(0x1d4))/0x5)+parseInt(h(0x1c6))/0x6*(parseInt(h(0x1c3))/0x7)+-parseInt(h(0x1cc))/0x8+-parseInt(h(0x1e2))/0x9*(-parseInt(h(0x1c9))/0xa);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xadd43));function a(){const s=['writable','Validator','plan','14404VjUzyw','109767UgoCno','hasOwnProperty','deploy','456qeBeHM','fs/promises','__esModule','70cBgSGS','prototype','store','8380752AjIQNb','CompilerService','app','trim','2568300MlUvuY','call','dereference','__importStar','1525TWaNbd','default','@apidevtools/json-schema-ref-parser','create','js-yaml','saveAsJSON','dirname','activate','load','stream','./deployer','stringify','getOwnPropertyDescriptor','logger','2573865ZEIYGB','.hotmesh.','407590MllkcH','./validator','error','defineProperty','__importDefault','utf8','validate','isPath','316556llqAPX','.json','setApp'];a=function(){return s;};return a();}function b(c,d){const e=a();return b=function(f,g){f=f-0x1bd;let h=e[f];return h;},b(c,d);}var __createBinding=this&&this['__createBinding']||(Object[i(0x1d7)]?function(c,d,e,f){const j=i;if(f===undefined)f=e;var g=Object[j(0x1e0)](d,e);(!g||('get'in g?!d[j(0x1c8)]:g[j(0x1bf)]||g['configurable']))&&(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['__setModuleDefault']||(Object[i(0x1d7)]?function(c,d){Object['defineProperty'](c,'default',{'enumerable':!![],'value':d});}:function(c,d){const k=i;c[k(0x1d5)]=d;}),__importStar=this&&this[i(0x1d3)]||function(c){const l=i;if(c&&c[l(0x1c8)])return c;var d={};if(c!=null){for(var e in c)if(e!==l(0x1d5)&&Object[l(0x1ca)][l(0x1c4)][l(0x1d1)](c,e))__createBinding(d,c,e);}return __setModuleDefault(d,c),d;},__importDefault=this&&this[i(0x1e8)]||function(c){return c&&c['__esModule']?c:{'default':c};};Object[i(0x1e7)](exports,'__esModule',{'value':!![]}),exports[i(0x1cd)]=void 0x0;const fs=__importStar(require(i(0x1c7))),path=__importStar(require('path')),json_schema_ref_parser_1=__importDefault(require(i(0x1d6))),js_yaml_1=__importDefault(require(i(0x1d8))),deployer_1=require(i(0x1de)),validator_1=require(i(0x1e5));class CompilerService{constructor(c,d,e){const m=i;this['store']=c,this['stream']=d,this[m(0x1e1)]=e;}async[i(0x1c1)](c){const n=i;try{let d;this['isPath'](c)?d=await json_schema_ref_parser_1[n(0x1d5)][n(0x1d2)](c):d=js_yaml_1['default'][n(0x1dc)](c);const e=new validator_1[(n(0x1c0))](d);return e[n(0x1ea)](this[n(0x1cb)]),d;}catch(f){this[n(0x1e1)]['error']('compiler-plan-error',f);}}[i(0x1eb)](c){const o=i;return!c[o(0x1cf)]()['startsWith']('app:');}async[i(0x1c5)](c){const p=i;try{let d;this['isPath'](c)?(d=await json_schema_ref_parser_1[p(0x1d5)][p(0x1d2)](c),await this[p(0x1d9)](c,d)):d=js_yaml_1[p(0x1d5)][p(0x1dc)](c);const e=new validator_1[(p(0x1c0))](d);e[p(0x1ea)](this[p(0x1cb)]);const f=new deployer_1['Deployer'](d);return await f[p(0x1c5)](this[p(0x1cb)],this[p(0x1dd)]),await this['store'][p(0x1be)](d[p(0x1ce)]['id'],d[p(0x1ce)]['version']),d;}catch(g){this[p(0x1e1)][p(0x1e6)]('compiler-deploy-error',g);}}async[i(0x1db)](c,d){const q=i;return await this[q(0x1cb)]['activateAppVersion'](c,d);}async[i(0x1d9)](c,d){const r=i,e=JSON[r(0x1df)](d,null,0x2),f=path['join'](path[r(0x1da)](c),r(0x1e3)+d[r(0x1ce)]['id']+'.'+d['app']['version']+r(0x1bd));await fs['writeFile'](f,e,r(0x1e9));}}exports[i(0x1cd)]=CompilerService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function a(){const y=['includes','slice','store','getMappingStatements','validateHooks','$app','validateTransitionConditions','1251816lHSeIf','../pipe','Mapping\x20statement\x20references\x20non-existent\x20activity:\x20','42IpmkBL','validateTransitions','graphs','push','2rYbszk','from','manifest','4784211Kqrebd','validateConditionalStatements','has','split','extractMappingStatements','object','{$item}','$graph','activityIds','mappingStatements','string','1607528dSbKvK','Duplicate\x20activity\x20id\x20found:\x20','isFunction','validateMappingStatements','defineProperty','resolveFunction','Validator','keys','{$input}','11303020JalXNK','app','validateReferencedActivityIds','335DYWRXO','validateStats','{$index}','validateGraphPublishSubscribe','validateUniqueHandledTopics','{$key}','Pipe','516338cFRfVH','startsWith','SYS_VARS','activities','isMappingStatement','{$output}','validateActivityIds','forEach','validateSchemas','8202YqwSZL','isContextVariable','421896kPxWGS'];a=function(){return y;};return a();}const k=b;(function(c,d){const j=b,e=c();while(!![]){try{const f=-parseInt(j(0x14a))/0x1*(-parseInt(j(0x164))/0x2)+parseInt(j(0x15d))/0x3+-parseInt(j(0x172))/0x4+-parseInt(j(0x143))/0x5*(-parseInt(j(0x153))/0x6)+-parseInt(j(0x160))/0x7*(-parseInt(j(0x155))/0x8)+parseInt(j(0x167))/0x9+-parseInt(j(0x140))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x53418));Object[k(0x13b)](exports,'__esModule',{'value':!![]}),exports[k(0x13d)]=void 0x0;const pipe_1=require(k(0x15e));function b(c,d){const e=a();return b=function(f,g){f=f-0x13a;let h=e[f];return h;},b(c,d);}class Validator{constructor(c){const l=k;this[l(0x166)]=null,this[l(0x16f)]=[],this[l(0x170)]={},this['store']=null,this[l(0x166)]=c;}async['validate'](c){const m=k;this[m(0x158)]=c,this[m(0x159)](),this[m(0x150)](),this[m(0x142)](),this[m(0x13a)](),this[m(0x161)](),this[m(0x15c)](),this[m(0x144)](),this[m(0x152)](),this[m(0x147)](),this['validateGraphPublishSubscribe'](),this[m(0x15a)](),this[m(0x168)]();}[k(0x150)](){const n=k,c=new Set();this[n(0x166)]['app'][n(0x162)][n(0x151)](d=>{const o=n,e=Object[o(0x13e)](d[o(0x14d)]);e[o(0x151)](f=>{const p=o;if(c[p(0x169)](f))throw new Error(p(0x173)+f);else c['add'](f);});}),this['activityIds']=Array[n(0x165)](c);}[k(0x14e)](c){const q=k;return typeof c===q(0x171)&&c['startsWith']('{')&&c['endsWith']('}');}[k(0x16b)](c,d,e){const r=k;for(const f in c){if(typeof c[f]===r(0x16c)&&c[f]!==null)this['extractMappingStatements'](c[f],d,e);else this[r(0x14e)](c[f])&&(!d[e]&&(d[e]=[]),d[e][r(0x163)](c[f]));}}['getMappingStatements'](){const s=k,c={};this[s(0x166)][s(0x141)]['graphs'][s(0x151)](d=>{const t=s,e=d[t(0x14d)];for(const f in e){const g=e[f];this[t(0x16b)](g,c,f);}}),this[s(0x170)]=c;}[k(0x142)](){const u=k,c=this[u(0x170)],d=this[u(0x16f)];for(const e in c){const f=c[e];f[u(0x151)](g=>{const v=u;if(g['startsWith']('{')&&g['endsWith']('}')){const h=g[v(0x157)](0x1,-0x1)[v(0x16a)]('.'),i=h[0x0];if(!(Validator[v(0x14c)][v(0x156)](i)||d['includes'](i)||this['isFunction'](g)||this[v(0x154)](g)))throw new Error(v(0x15f)+g);}});}}[k(0x174)](c){const w=k;return c[w(0x14b)]('{@')&&pipe_1[w(0x149)][w(0x13c)](c);}['isContextVariable'](c){const x=k;return[x(0x13f),'{$output}',x(0x16d),x(0x148),x(0x145)][x(0x156)](c);}['validateMappingStatements'](){}[k(0x161)](){}[k(0x15c)](){}[k(0x144)](){}['validateSchemas'](){}[k(0x147)](){}[k(0x146)](){}[k(0x15a)](){}[k(0x168)](){}}exports[k(0x13d)]=Validator,Validator[k(0x14c)]=[k(0x15b),'$self',k(0x16e),'$job'],Validator['CONTEXT_VARS']=[k(0x13f),k(0x14f),k(0x16d),k(0x148),k(0x145)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function _0x3b8a(){const _0x2b0f33=['3336WNkbWb','20268kSQcFU','1124810NTGfUu','3238900AWjnsJ','610rPBJXi','98uraMbL','126624knVlpP','2059977XIDRRM','369388QzeFFb','4490wVVyXK'];_0x3b8a=function(){return _0x2b0f33;};return _0x3b8a();}(function(_0xa17761,_0x33fa25){const _0x3b854e=_0x3d15,_0xfa75f6=_0xa17761();while(!![]){try{const _0x320f98=-parseInt(_0x3b854e(0x80))/0x1+-parseInt(_0x3b854e(0x84))/0x2+parseInt(_0x3b854e(0x89))/0x3+parseInt(_0x3b854e(0x85))/0x4+-parseInt(_0x3b854e(0x81))/0x5*(parseInt(_0x3b854e(0x82))/0x6)+parseInt(_0x3b854e(0x87))/0x7*(parseInt(_0x3b854e(0x88))/0x8)+parseInt(_0x3b854e(0x83))/0x9*(parseInt(_0x3b854e(0x86))/0xa);if(_0x320f98===_0x33fa25)break;else _0xfa75f6['push'](_0xfa75f6['shift']());}catch(_0x46b4d9){_0xfa75f6['push'](_0xfa75f6['shift']());}}}(_0x3b8a,0x6794b));var __importDefault=this&&this['__importDefault']||function(_0x191b42){return _0x191b42&&_0x191b42['__esModule']?_0x191b42:{'default':_0x191b42};};function _0x3d15(_0x32f4ac,_0x377692){const _0x3b8ab2=_0x3b8a();return _0x3d15=function(_0x3d15bd,_0x348467){_0x3d15bd=_0x3d15bd-0x80;let _0x3d0053=_0x3b8ab2[_0x3d15bd];return _0x3d0053;},_0x3d15(_0x32f4ac,_0x377692);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['EngineService']=void 0x0;const key_1=require('../../modules/key'),enums_1=require('../../modules/enums'),utils_1=require('../../modules/utils'),activities_1=__importDefault(require('../activities')),compiler_1=require('../compiler'),exporter_1=require('../exporter'),reporter_1=require('../reporter'),router_1=require('../router'),serializer_1=require('../serializer'),factory_1=require('../search/factory'),factory_2=require('../store/factory'),factory_3=require('../stream/factory'),factory_4=require('../sub/factory'),task_1=require('../task'),stream_1=require('../../types/stream');class EngineService{constructor(){this['cacheMode']='cache',this['untilVersion']=null,this['jobCallbacks']={},this['reporting']=![],this['jobId']=0x1;}static async['init'](_0x4a7434,_0x1d7941,_0x4fd78c,_0x3eff05,_0x54a32c){if(_0x3eff05['engine']){const _0x2cfe7d=new EngineService();_0x2cfe7d['verifyEngineFields'](_0x3eff05),_0x2cfe7d['namespace']=_0x4a7434,_0x2cfe7d['appId']=_0x1d7941,_0x2cfe7d['guid']=_0x4fd78c,_0x2cfe7d['logger']=_0x54a32c,await _0x2cfe7d['initSearchChannel'](_0x3eff05['engine']['store']),await _0x2cfe7d['initStoreChannel'](_0x3eff05['engine']['store']),await _0x2cfe7d['initSubChannel'](_0x3eff05['engine']['sub'],_0x3eff05['engine']['pub']??_0x3eff05['engine']['store']),await _0x2cfe7d['initStreamChannel'](_0x3eff05['engine']['stream'],_0x3eff05['engine']['store']),_0x2cfe7d['router']=await _0x2cfe7d['initRouter'](_0x3eff05);const _0x202ac8=_0x2cfe7d['store']['mintKey'](key_1['KeyType']['STREAMS'],{'appId':_0x2cfe7d['appId']});return _0x2cfe7d['router']['consumeMessages'](_0x202ac8,'ENGINE',_0x2cfe7d['guid'],_0x2cfe7d['processStreamMessage']['bind'](_0x2cfe7d)),_0x2cfe7d['taskService']=new task_1['TaskService'](_0x2cfe7d['store'],_0x54a32c),_0x2cfe7d['exporter']=new exporter_1['ExporterService'](_0x2cfe7d['appId'],_0x2cfe7d['store'],_0x54a32c),_0x2cfe7d['inited']=(0x0,utils_1['formatISODate'])(new Date()),_0x2cfe7d;}}['verifyEngineFields'](_0x363955){if(!(0x0,utils_1['identifyProvider'])(_0x363955['engine']['store'])||!(0x0,utils_1['identifyProvider'])(_0x363955['engine']['stream'])||!(0x0,utils_1['identifyProvider'])(_0x363955['engine']['sub']))throw new Error('engine\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields.');}async['initSearchChannel'](_0x29fa37,_0x88aeee){this['search']=await factory_1['SearchServiceFactory']['init'](_0x29fa37,_0x88aeee,this['namespace'],this['appId'],this['logger']);}async['initStoreChannel'](_0x4d24f0){this['store']=await factory_2['StoreServiceFactory']['init'](_0x4d24f0,this['namespace'],this['appId'],this['logger']);}async['initSubChannel'](_0x18e63e,_0xcd197a){this['subscribe']=await factory_4['SubServiceFactory']['init'](_0x18e63e,_0xcd197a,this['namespace'],this['appId'],this['guid'],this['logger']);}async['initStreamChannel'](_0x4f9b9b,_0x9ad424){this['stream']=await factory_3['StreamServiceFactory']['init'](_0x4f9b9b,_0x9ad424,this['namespace'],this['appId'],this['logger']);}async['initRouter'](_0x3d8cb4){const _0x316711=await this['store']['getThrottleRate'](':');return new router_1['Router']({'namespace':this['namespace'],'appId':this['appId'],'guid':this['guid'],'role':stream_1['StreamRole']['ENGINE'],'reclaimDelay':_0x3d8cb4['engine']['reclaimDelay'],'reclaimCount':_0x3d8cb4['engine']['reclaimCount'],'throttle':_0x316711,'readonly':_0x3d8cb4['engine']['readonly']},this['stream'],this['logger']);}async['fetchAndVerifyVID'](_0x56dc70,_0x406676=0x0){if(isNaN(Number(_0x56dc70['version']))){const _0x2e2bbd=await this['store']['getApp'](_0x56dc70['id'],!![]);if(!isNaN(Number(_0x2e2bbd['version']))){if(!this['apps'])this['apps']={};return this['apps'][_0x56dc70['id']]=_0x2e2bbd,{'id':_0x56dc70['id'],'version':_0x2e2bbd['version']};}else{if(_0x406676<0xa)return await(0x0,utils_1['sleepFor'])(enums_1['HMSH_QUORUM_DELAY_MS']*0x2),await this['fetchAndVerifyVID'](_0x56dc70,_0x406676+0x1);else this['logger']['error']('engine-vid-resolution-error',{'id':_0x56dc70['id'],'guid':this['guid']});}}return _0x56dc70;}async['getVID'](_0x27f5ff){if(this['cacheMode']==='nocache'){const _0x52d817=await this['store']['getApp'](this['appId'],!![]);if(_0x52d817['version']['toString']()===this['untilVersion']['toString']()){if(!this['apps'])this['apps']={};this['apps'][this['appId']]=_0x52d817,this['setCacheMode']('cache',_0x52d817['version']['toString']());}return{'id':this['appId'],'version':_0x52d817['version']};}else return!this['apps']&&_0x27f5ff?(this['apps']={},this['apps'][this['appId']]=_0x27f5ff,_0x27f5ff):await this['fetchAndVerifyVID']({'id':this['appId'],'version':this['apps']?.[this['appId']]['version']});}['setCacheMode'](_0x502fc9,_0x2c7303){this['logger']['info']('engine-executable-cache',{'mode':_0x502fc9,[_0x502fc9==='cache'?'target':'until']:_0x2c7303}),this['cacheMode']=_0x502fc9,this['untilVersion']=_0x2c7303;}async['routeToSubscribers'](_0x4adfa8,_0x2c46a1){const _0x203656=this['jobCallbacks'][_0x2c46a1['metadata']['jid']];_0x203656&&(this['delistJobCallback'](_0x2c46a1['metadata']['jid']),_0x203656(_0x4adfa8,_0x2c46a1));}async['processWebHooks'](){this['taskService']['processWebHooks'](this['hook']['bind'](this));}async['processTimeHooks'](){this['taskService']['processTimeHooks'](this['hookTime']['bind'](this));}async['throttle'](_0x1233a6){try{this['router']?.['setThrottle'](_0x1233a6);}catch(_0x2e04f6){this['logger']['error']('engine-throttle-error',{'error':_0x2e04f6});}}async['initActivity'](_0x26e8d5,_0x23c10f={},_0x20028b){const [_0x2d1b68,_0xe9697f]=await this['getSchema'](_0x26e8d5),_0x143029=activities_1['default'][utils_1['polyfill']['resolveActivityType'](_0xe9697f['type'])];if(_0x143029){const _0x14e3ab=(0x0,utils_1['formatISODate'])(new Date()),_0x864352={'aid':_0x2d1b68,'atp':_0xe9697f['type'],'stp':_0xe9697f['subtype'],'ac':_0x14e3ab,'au':_0x14e3ab},_0x4ced9d=null;return new _0x143029(_0xe9697f,_0x23c10f,_0x864352,_0x4ced9d,this,_0x20028b);}else throw new Error('activity\x20type\x20'+_0xe9697f['type']+'\x20not\x20found');}async['getSchema'](_0x996ef7){const _0x4fb477=await this['store']['getApp'](this['appId']);if(!_0x4fb477)throw new Error('no\x20app\x20found\x20for\x20id\x20'+this['appId']);if(this['isPrivate'](_0x996ef7)){const _0xbeecfd=_0x996ef7['substring'](0x1),_0x2f232a=await this['store']['getSchema'](_0xbeecfd,await this['getVID'](_0x4fb477));return[_0xbeecfd,_0x2f232a];}else{const _0x3c1c3e=await this['store']['getSubscription'](_0x996ef7,await this['getVID'](_0x4fb477));if(_0x3c1c3e){const _0x220d65=await this['store']['getSchema'](_0x3c1c3e,await this['getVID'](_0x4fb477));return[_0x3c1c3e,_0x220d65];}}throw new Error('no\x20subscription\x20found\x20for\x20topic\x20'+_0x996ef7+'\x20in\x20app\x20'+this['appId']+'\x20for\x20app\x20version\x20'+_0x4fb477['version']);}async['getSettings'](){return await this['store']['getSettings']();}['isPrivate'](_0x1d8dea){return _0x1d8dea['startsWith']('.');}async['plan'](_0x4a7bca){const _0xaf050a=new compiler_1['CompilerService'](this['store'],this['stream'],this['logger']);return await _0xaf050a['plan'](_0x4a7bca);}async['deploy'](_0x1e2e1d){const _0x1e5134=new compiler_1['CompilerService'](this['store'],this['stream'],this['logger']);return await _0x1e5134['deploy'](_0x1e2e1d);}async['getStats'](_0x24f1ad,_0x10b550){const {id:_0x5872bd,version:_0x1bb14b}=await this['getVID'](),_0xaa6a5b=new reporter_1['ReporterService']({'id':_0x5872bd,'version':_0x1bb14b},this['store'],this['logger']),_0xb28da5=await this['resolveQuery'](_0x24f1ad,_0x10b550);return await _0xaa6a5b['getStats'](_0xb28da5);}async['getIds'](_0x3a58e3,_0x11c2cf,_0x1baf61=[]){const {id:_0x10d368,version:_0x2de494}=await this['getVID'](),_0x4a832b=new reporter_1['ReporterService']({'id':_0x10d368,'version':_0x2de494},this['store'],this['logger']),_0x117c4d=await this['resolveQuery'](_0x3a58e3,_0x11c2cf);return await _0x4a832b['getIds'](_0x117c4d,_0x1baf61);}async['resolveQuery'](_0x40a96e,_0x31a7ca){const _0x59cb78=await this['initActivity'](_0x40a96e,_0x31a7ca['data']);return await _0x59cb78['getState'](),{'end':_0x31a7ca['end'],'start':_0x31a7ca['start'],'range':_0x31a7ca['range'],'granularity':_0x59cb78['resolveGranularity'](),'key':_0x59cb78['resolveJobKey'](_0x59cb78['createInputContext']()),'sparse':_0x31a7ca['sparse']};}async['processStreamMessage'](_0x59db6c){this['logger']['debug']('engine-process',{'jid':_0x59db6c['metadata']['jid'],'gid':_0x59db6c['metadata']['gid'],'dad':_0x59db6c['metadata']['dad'],'aid':_0x59db6c['metadata']['aid'],'status':_0x59db6c['status']||stream_1['StreamStatus']['SUCCESS'],'code':_0x59db6c['code']||0xc8,'type':_0x59db6c['type']});const _0x4cd107={'metadata':{'guid':_0x59db6c['metadata']['guid'],'jid':_0x59db6c['metadata']['jid'],'gid':_0x59db6c['metadata']['gid'],'dad':_0x59db6c['metadata']['dad'],'aid':_0x59db6c['metadata']['aid']},'data':_0x59db6c['data']};if(_0x59db6c['type']===stream_1['StreamDataType']['TIMEHOOK']){const _0x57e2d0=await this['initActivity']('.'+_0x59db6c['metadata']['aid'],_0x4cd107['data'],_0x4cd107);await _0x57e2d0['processTimeHookEvent'](_0x59db6c['metadata']['jid']);}else{if(_0x59db6c['type']===stream_1['StreamDataType']['WEBHOOK']){const _0x196668=await this['initActivity']('.'+_0x59db6c['metadata']['aid'],_0x4cd107['data'],_0x4cd107);await _0x196668['processWebHookEvent'](_0x59db6c['status'],_0x59db6c['code']);}else{if(_0x59db6c['type']===stream_1['StreamDataType']['TRANSITION']){const _0x22cfad=await this['initActivity']('.'+_0x59db6c['metadata']['aid'],_0x4cd107['data'],_0x4cd107);await _0x22cfad['process']();}else{if(_0x59db6c['type']===stream_1['StreamDataType']['AWAIT']){_0x4cd107['metadata']={..._0x4cd107['metadata'],'pj':_0x59db6c['metadata']['jid'],'pg':_0x59db6c['metadata']['gid'],'pd':_0x59db6c['metadata']['dad'],'pa':_0x59db6c['metadata']['aid'],'px':_0x59db6c['metadata']['await']===![],'trc':_0x59db6c['metadata']['trc'],'spn':_0x59db6c['metadata']['spn']};const _0x491b34=await this['initActivity'](_0x59db6c['metadata']['topic'],_0x59db6c['data'],_0x4cd107);await _0x491b34['process']();}else{if(_0x59db6c['type']===stream_1['StreamDataType']['RESULT']){const _0x15f3a6=await this['initActivity']('.'+_0x4cd107['metadata']['aid'],_0x59db6c['data'],_0x4cd107);await _0x15f3a6['processEvent'](_0x59db6c['status'],_0x59db6c['code']);}else{const _0x4fc0d9=await this['initActivity']('.'+_0x59db6c['metadata']['aid'],_0x59db6c['data'],_0x4cd107);await _0x4fc0d9['processEvent'](_0x59db6c['status'],_0x59db6c['code'],'output');}}}}}this['logger']['debug']('engine-process-end',{'jid':_0x59db6c['metadata']['jid'],'gid':_0x59db6c['metadata']['gid'],'aid':_0x59db6c['metadata']['aid']});}async['execAdjacentParent'](_0x4784d0,_0x193d6d,_0x48be7f=![]){if(this['hasParentJob'](_0x4784d0)){const _0x5c89ec=this['resolveError'](_0x193d6d['metadata']),_0x598e90=_0x4784d0['$self']?.['output']?.['metadata']?.['l2s']||_0x4784d0['$self']?.['output']?.['metadata']?.['l1s'],_0x115d42={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':_0x4784d0['metadata']['pj'],'gid':_0x4784d0['metadata']['pg'],'dad':_0x4784d0['metadata']['pd'],'aid':_0x4784d0['metadata']['pa'],'trc':_0x4784d0['metadata']['trc'],'spn':_0x598e90},'type':stream_1['StreamDataType']['RESULT'],'data':_0x193d6d['data']};if(_0x5c89ec&&_0x5c89ec['code'])_0x115d42['status']=stream_1['StreamStatus']['ERROR'],_0x115d42['data']=_0x5c89ec,_0x115d42['code']=_0x5c89ec['code'],_0x115d42['stack']=_0x5c89ec['stack'];else _0x48be7f?(_0x115d42['status']=stream_1['StreamStatus']['PENDING'],_0x115d42['code']=enums_1['HMSH_CODE_PENDING']):(_0x115d42['status']=stream_1['StreamStatus']['SUCCESS'],_0x115d42['code']=enums_1['HMSH_CODE_SUCCESS']);return await this['router']?.['publishMessage'](null,_0x115d42);}}['hasParentJob'](_0x40c086,_0xecdaae=![]){if(_0xecdaae)return Boolean(_0x40c086['metadata']['pj']&&_0x40c086['metadata']['pa']&&!_0x40c086['metadata']['px']);return Boolean(_0x40c086['metadata']['pj']&&_0x40c086['metadata']['pa']);}['resolveError'](_0x323351){if(_0x323351&&_0x323351['err'])return JSON['parse'](_0x323351['err']);}async['interrupt'](_0x2a59ca,_0x441c36,_0x52883e={}){await this['store']['interrupt'](_0x2a59ca,_0x441c36,_0x52883e);const _0x310c4c=await this['getState'](_0x2a59ca,_0x441c36),_0x5e38dc={'interrupt':_0x52883e['descend'],'expire':_0x52883e['expire']};return await this['runJobCompletionTasks'](_0x310c4c,_0x5e38dc);}async['scrub'](_0x324066){await this['store']['scrub'](_0x324066);}async['hook'](_0x2c5d5c,_0x2bd1c2,_0x299050=stream_1['StreamStatus']['SUCCESS'],_0x22f80d=0xc8){const _0x19a95b=await this['taskService']['getHookRule'](_0x2c5d5c),[_0xe5aa08]=await this['getSchema']('.'+_0x19a95b['to']),_0x1e1043={'type':stream_1['StreamDataType']['WEBHOOK'],'status':_0x299050,'code':_0x22f80d,'metadata':{'guid':(0x0,utils_1['guid'])(),'aid':_0xe5aa08,'topic':_0x2c5d5c},'data':_0x2bd1c2};return await this['router']?.['publishMessage'](null,_0x1e1043);}async['hookTime'](_0xa4b178,_0x5a27ef,_0x4dfe2b,_0x489515){if(_0x489515==='interrupt'||_0x489515==='expire')return await this['interrupt'](_0x4dfe2b,_0xa4b178,{'suppress':!![],'expire':0x1});const [_0xc834aa,..._0x3a80a0]=_0x4dfe2b['split'](','),_0x52d5e2=','+_0x3a80a0['join'](','),_0x5761c3={'type':stream_1['StreamDataType']['TIMEHOOK'],'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':_0xa4b178,'gid':_0x5a27ef,'dad':_0x52d5e2,'aid':_0xc834aa},'data':{'timestamp':Date['now']()}};await this['router']?.['publishMessage'](null,_0x5761c3);}async['hookAll'](_0x33158d,_0x765703,_0x4a5290,_0x3f5030=[]){const _0x5dd033=await this['getVID'](),_0x190dde=await this['taskService']['getHookRule'](_0x33158d);if(_0x190dde){const _0xed932c=await(0x0,utils_1['getSubscriptionTopic'])(_0x190dde['to'],this['store'],_0x5dd033),_0x21997d=await this['resolveQuery'](_0xed932c,_0x4a5290),_0x5683ed=new reporter_1['ReporterService'](_0x5dd033,this['store'],this['logger']),_0x1b5c60=await _0x5683ed['getWorkItems'](_0x21997d,_0x3f5030);if(_0x1b5c60['length']){const _0x3edcb9=new task_1['TaskService'](this['store'],this['logger']);await _0x3edcb9['enqueueWorkItems'](_0x1b5c60['map'](_0x3fb538=>[_0x33158d,_0x3fb538,_0x4a5290['scrub']||![],JSON['stringify'](_0x765703)]['join'](key_1['VALSEP']))),this['subscribe']['publish'](key_1['KeyType']['QUORUM'],{'type':'work','originator':this['guid']},this['appId']);}return _0x1b5c60;}else throw new Error('unable\x20to\x20find\x20hook\x20rule\x20for\x20topic\x20'+_0x33158d);}async['pub'](_0x842c46,_0x395bce,_0xf1b8b1,_0x37b534){const _0x363a7a=await this['initActivity'](_0x842c46,_0x395bce,_0xf1b8b1);if(_0x363a7a)return await _0x363a7a['process'](_0x37b534);else throw new Error('unable\x20to\x20process\x20activity\x20for\x20topic\x20'+_0x842c46);}async['sub'](_0x17d0d7,_0x474f68){const _0x1ac986=async(_0x2871f2,_0x365a27)=>{_0x474f68(_0x365a27['topic'],_0x365a27['job']);};return await this['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x1ac986,this['appId'],_0x17d0d7);}async['unsub'](_0x332c50){return await this['subscribe']['unsubscribe'](key_1['KeyType']['QUORUM'],this['appId'],_0x332c50);}async['psub'](_0x3bd7fe,_0x15fa59){const _0x1111ea=async(_0x5d65c4,_0x1c15cf)=>{_0x15fa59(_0x1c15cf['topic'],_0x1c15cf['job']);};return await this['subscribe']['psubscribe'](key_1['KeyType']['QUORUM'],_0x1111ea,this['appId'],_0x3bd7fe);}async['punsub'](_0x1fb209){return await this['subscribe']['punsubscribe'](key_1['KeyType']['QUORUM'],this['appId'],_0x1fb209);}async['pubsub'](_0x4f0669,_0x37129c,_0x4895d7,_0x8a9438=enums_1['HMSH_OTT_WAIT_TIME']){_0x4895d7={'metadata':{'ngn':this['guid'],'trc':_0x4895d7?.['metadata']?.['trc'],'spn':_0x4895d7?.['metadata']?.['spn']}};const _0x1ac0bf=await this['pub'](_0x4f0669,_0x37129c,_0x4895d7);return new Promise((_0xd7afd0,_0x3de4d2)=>{this['registerJobCallback'](_0x1ac0bf,(_0xd64030,_0x15283e)=>{if(_0x15283e['metadata']['err']){const _0x251033=JSON['parse'](_0x15283e['metadata']['err']);_0x3de4d2({..._0x251033,'job_id':_0x15283e['metadata']['jid']});}else _0xd7afd0(_0x15283e);}),setTimeout(()=>{this['delistJobCallback'](_0x1ac0bf),_0x3de4d2({'code':enums_1['HMSH_CODE_TIMEOUT'],'message':'timeout','job_id':_0x1ac0bf});},_0x8a9438);});}async['pubOneTimeSubs'](_0x53e1c1,_0x1a39b5,_0x3f3be0=![]){if(this['hasOneTimeSubscription'](_0x53e1c1)){const _0x1a4263={'type':'job','topic':_0x53e1c1['metadata']['jid'],'job':(0x0,utils_1['restoreHierarchy'])(_0x1a39b5)};this['subscribe']['publish'](key_1['KeyType']['QUORUM'],_0x1a4263,this['appId'],_0x53e1c1['metadata']['ngn']);}}async['getPublishesTopic'](_0x47bf2c){const _0x1694c9=await this['getVID'](),_0x1d499d=_0x47bf2c['metadata']['aid']||_0x47bf2c['$self']?.['output']?.['metadata']?.['aid'],_0x153103=await this['store']['getSchema'](_0x1d499d,_0x1694c9);return _0x153103['publishes'];}async['pubPermSubs'](_0x288e22,_0x45fbf4,_0x1d0815=![]){const _0x3bbd1a=await this['getPublishesTopic'](_0x288e22);if(_0x3bbd1a){const _0x4076ea={'type':'job','topic':_0x3bbd1a,'job':(0x0,utils_1['restoreHierarchy'])(_0x45fbf4)};this['subscribe']['publish'](key_1['KeyType']['QUORUM'],_0x4076ea,this['appId'],_0x3bbd1a+'.'+_0x288e22['metadata']['jid']);}}async['add'](_0x88267d){return await this['router']?.['publishMessage'](null,_0x88267d);}['registerJobCallback'](_0xfc1989,_0x2b34dd){this['jobCallbacks'][_0xfc1989]=_0x2b34dd;}['delistJobCallback'](_0x3a0b24){delete this['jobCallbacks'][_0x3a0b24];}['hasOneTimeSubscription'](_0x21c66f){return Boolean(_0x21c66f['metadata']['ngn']);}async['runJobCompletionTasks'](_0x635a3c,_0x36adaf={}){const _0x137a65=this['hasParentJob'](_0x635a3c,!![]),_0x1329bb=this['hasOneTimeSubscription'](_0x635a3c),_0x5fc5=await this['getPublishesTopic'](_0x635a3c);let _0x821b07;if(_0x137a65||_0x1329bb||_0x5fc5){const _0x378497=await this['getState'](_0x635a3c['metadata']['tpc'],_0x635a3c['metadata']['jid']);_0x821b07=await this['execAdjacentParent'](_0x635a3c,_0x378497,_0x36adaf['emit']),this['pubOneTimeSubs'](_0x635a3c,_0x378497,_0x36adaf['emit']),this['pubPermSubs'](_0x635a3c,_0x378497,_0x36adaf['emit']);}return!_0x36adaf['emit']&&this['taskService']['registerJobForCleanup'](_0x635a3c['metadata']['jid'],this['resolveExpires'](_0x635a3c,_0x36adaf),_0x36adaf),_0x821b07;}['resolveExpires'](_0x3fec42,_0x1ddece){return _0x1ddece['expire']??_0x3fec42['metadata']['expire']??enums_1['HMSH_EXPIRE_JOB_SECONDS'];}async['export'](_0x34da34){return await this['exporter']['export'](_0x34da34);}async['getRaw'](_0x341f36){return await this['store']['getRaw'](_0x341f36);}async['getStatus'](_0x4be4d2){const {id:_0x2ad1cd}=await this['getVID']();return await this['store']['getStatus'](_0x4be4d2,_0x2ad1cd);}async['getState'](_0x37f9b0,_0x356228){const _0x421543=await this['store']['getSymbols']('$'+_0x37f9b0),_0x57bbfa={['$'+_0x37f9b0]:Object['keys'](_0x421543)},_0x23b0b8={},_0x282690=await this['store']['getState'](_0x356228,_0x57bbfa,_0x23b0b8);if(!_0x282690)throw new Error('not\x20found\x20'+_0x356228);const [_0x2ccbe0,_0x54f934]=_0x282690,_0x45f80c=(0x0,utils_1['restoreHierarchy'])(_0x2ccbe0);return _0x54f934&&_0x45f80c['metadata']&&(_0x45f80c['metadata']['js']=_0x54f934),_0x45f80c;}async['getQueryState'](_0x1aa034,_0x443e88){return await this['store']['getQueryState'](_0x1aa034,_0x443e88);}async['compress'](_0x35b656){const _0x59c351=await this['store']['getSymbolValues'](),_0x1ae11f=Object['keys'](_0x59c351)['length'],_0x5e97dc=Math['pow'](0x34,0x2)-0x1,_0x33649f=serializer_1['SerializerService']['filterSymVals'](_0x1ae11f,_0x5e97dc,_0x59c351,new Set(_0x35b656));return await this['store']['addSymbolValues'](_0x33649f);}}exports['EngineService']=EngineService;
|
|
1
|
+
'use strict';function b(c,d){const e=a();return b=function(f,g){f=f-0x11a;let h=e[f];return h;},b(c,d);}const p=b;function a(){const an=['engine-throttle-error','../../modules/enums','HMSH_CODE_TIMEOUT','ENGINE','interrupt','10PrCOoe','2025567HrpZis','engine-process-end','pubPermSubs','\x20for\x20app\x20version\x20','HMSH_CODE_SUCCESS','error','filterSymVals','default','getQueryState','getSubscription','getSettings','expire','../compiler','SerializerService','initSearchChannel','info','code','psub','unsubscribe','../task','output','polyfill','cache','addSymbolValues','routeToSubscribers','processTimeHookEvent','pub','job','registerJobForCleanup','tpc','ERROR','resolveExpires','HMSH_EXPIRE_JOB_SECONDS','topic','taskService','1092047FdbOyQ','../activities','RESULT','toString','engine-executable-cache','HMSH_CODE_PENDING','../../modules/key','activity\x20type\x20','processWebHookEvent','type','jobId','getSymbols','pow','KeyType','identifyProvider','defineProperty','initStoreChannel','punsubscribe','aid','keys','../serializer','getWorkItems','subtype','descend','../store/factory','scrub','execAdjacentParent','pubsub','6GrTGFT','unable\x20to\x20find\x20hook\x20rule\x20for\x20topic\x20','metadata','processStreamMessage','appId','fetchAndVerifyVID','../router','sparse','HMSH_QUORUM_DELAY_MS','resolveQuery','getRaw','start','25200dHTKcE','hook','publishMessage','\x20not\x20found','target','WEBHOOK','1704988bAfGem','router','data','l2s','search','StreamRole','resolveGranularity','registerJobCallback','640LFulZb','engine-vid-resolution-error','setCacheMode','initActivity','readonly','$self','engine\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields.','engine','../search/factory','processWebHooks','map','inited','jobCallbacks','debug','bind','isPrivate','SearchServiceFactory','now','err','getVID','psubscribe','hasOneTimeSubscription','getApp','logger','ExporterService','initRouter','hookAll','guid','l1s','process','ReporterService','export','../reporter','init','unsub','no\x20subscription\x20found\x20for\x20topic\x20','publish','dad','SubServiceFactory','emit','SUCCESS','cacheMode','reclaimDelay','store','getPublishesTopic','__importDefault','namespace','length','../../types/stream','version','spn','formatISODate','CompilerService','sub','join','__esModule','StreamStatus','gid','getHookRule','verifyEngineFields','StreamServiceFactory','getThrottleRate','nocache','10332146QqlJbk','56gyOyBW','jid','getStatus','initStreamChannel','TIMEHOOK','reporting','getStats','resolveError','ngn','TRANSITION','VALSEP','421548fjJWvA','QUORUM','await','untilVersion','processEvent','subscribe','exporter','47800GodbIO','startsWith','range','StoreServiceFactory','unable\x20to\x20process\x20activity\x20for\x20topic\x20','HMSH_OTT_WAIT_TIME','createInputContext','hasParentJob','pubOneTimeSubs','apps','hookTime','StreamDataType','1144kJPBNL','parse','processTimeHooks','EngineService','deploy','getState','TaskService','split','getSchema','sleepFor','PENDING','setThrottle','trc','1638UMnQcK','plan','restoreHierarchy','status','\x20in\x20app\x20','resolveActivityType','throttle','until','consumeMessages','stream'];a=function(){return an;};return a();}(function(c,d){const o=b,e=c();while(!![]){try{const f=parseInt(o(0x153))/0x1+-parseInt(o(0x181))/0x2*(-parseInt(o(0x16f))/0x3)+-parseInt(o(0x189))/0x4*(-parseInt(o(0x1db))/0x5)+parseInt(o(0x17b))/0x6*(-parseInt(o(0x120))/0x7)+parseInt(o(0x1c9))/0x8*(parseInt(o(0x130))/0x9)+parseInt(o(0x12f))/0xa*(-parseInt(o(0x1c8))/0xb)+parseInt(o(0x1d4))/0xc*(-parseInt(o(0x1e7))/0xd);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xd8f3e));var __importDefault=this&&this[p(0x1b6)]||function(c){const q=p;return c&&c[q(0x1c0)]?c:{'default':c};};Object[p(0x162)](exports,'__esModule',{'value':!![]}),exports[p(0x1ea)]=void 0x0;const key_1=require(p(0x159)),enums_1=require(p(0x12b)),utils_1=require('../../modules/utils'),activities_1=__importDefault(require(p(0x154))),compiler_1=require(p(0x13c)),exporter_1=require('../exporter'),reporter_1=require(p(0x1a9)),router_1=require(p(0x175)),serializer_1=require(p(0x167)),factory_1=require(p(0x191)),factory_2=require(p(0x16b)),factory_3=require('../stream/factory'),factory_4=require('../sub/factory'),task_1=require(p(0x143)),stream_1=require(p(0x1b9));class EngineService{constructor(){const r=p;this['cacheMode']=r(0x146),this[r(0x1d7)]=null,this[r(0x195)]={},this[r(0x1ce)]=![],this[r(0x15d)]=0x1;}static async['init'](c,d,e,f,g){const s=p;if(f['engine']){const h=new EngineService();h[s(0x1c4)](f),h[s(0x1b7)]=c,h['appId']=d,h[s(0x1a4)]=e,h['logger']=g,await h[s(0x13e)](f[s(0x190)][s(0x1b4)]),await h['initStoreChannel'](f[s(0x190)][s(0x1b4)]),await h['initSubChannel'](f['engine'][s(0x1be)],f[s(0x190)]['pub']??f[s(0x190)][s(0x1b4)]),await h[s(0x1cc)](f[s(0x190)]['stream'],f[s(0x190)][s(0x1b4)]),h[s(0x182)]=await h[s(0x1a2)](f);const i=h[s(0x1b4)]['mintKey'](key_1['KeyType']['STREAMS'],{'appId':h['appId']});return h['router'][s(0x128)](i,s(0x12d),h['guid'],h[s(0x172)][s(0x197)](h)),h['taskService']=new task_1['TaskService'](h['store'],g),h[s(0x1da)]=new exporter_1[(s(0x1a1))](h['appId'],h[s(0x1b4)],g),h[s(0x194)]=(0x0,utils_1[s(0x1bc)])(new Date()),h;}}[p(0x1c4)](c){const t=p;if(!(0x0,utils_1[t(0x161)])(c[t(0x190)][t(0x1b4)])||!(0x0,utils_1['identifyProvider'])(c['engine'][t(0x129)])||!(0x0,utils_1[t(0x161)])(c[t(0x190)][t(0x1be)]))throw new Error(t(0x18f));}async[p(0x13e)](c,d){const u=p;this[u(0x185)]=await factory_1[u(0x199)][u(0x1aa)](c,d,this[u(0x1b7)],this[u(0x173)],this[u(0x1a0)]);}async[p(0x163)](c){const v=p;this['store']=await factory_2[v(0x1de)][v(0x1aa)](c,this[v(0x1b7)],this[v(0x173)],this[v(0x1a0)]);}async['initSubChannel'](c,d){const w=p;this[w(0x1d9)]=await factory_4[w(0x1af)][w(0x1aa)](c,d,this['namespace'],this[w(0x173)],this[w(0x1a4)],this[w(0x1a0)]);}async[p(0x1cc)](c,d){const x=p;this[x(0x129)]=await factory_3[x(0x1c5)][x(0x1aa)](c,d,this[x(0x1b7)],this[x(0x173)],this['logger']);}async['initRouter'](c){const y=p,d=await this[y(0x1b4)][y(0x1c6)](':');return new router_1['Router']({'namespace':this[y(0x1b7)],'appId':this[y(0x173)],'guid':this[y(0x1a4)],'role':stream_1[y(0x186)][y(0x12d)],'reclaimDelay':c[y(0x190)][y(0x1b3)],'reclaimCount':c[y(0x190)]['reclaimCount'],'throttle':d,'readonly':c[y(0x190)][y(0x18d)]},this['stream'],this[y(0x1a0)]);}async[p(0x174)](c,d=0x0){const z=p;if(isNaN(Number(c[z(0x1ba)]))){const e=await this[z(0x1b4)][z(0x19f)](c['id'],!![]);if(!isNaN(Number(e[z(0x1ba)]))){if(!this[z(0x1e4)])this[z(0x1e4)]={};return this[z(0x1e4)][c['id']]=e,{'id':c['id'],'version':e[z(0x1ba)]};}else{if(d<0xa)return await(0x0,utils_1[z(0x11c)])(enums_1[z(0x177)]*0x2),await this[z(0x174)](c,d+0x1);else this[z(0x1a0)][z(0x135)](z(0x18a),{'id':c['id'],'guid':this[z(0x1a4)]});}}return c;}async[p(0x19c)](c){const A=p;if(this[A(0x1b2)]===A(0x1c7)){const d=await this[A(0x1b4)][A(0x19f)](this['appId'],!![]);if(d[A(0x1ba)][A(0x156)]()===this['untilVersion'][A(0x156)]()){if(!this[A(0x1e4)])this['apps']={};this['apps'][this[A(0x173)]]=d,this['setCacheMode']('cache',d[A(0x1ba)][A(0x156)]());}return{'id':this[A(0x173)],'version':d[A(0x1ba)]};}else return!this['apps']&&c?(this[A(0x1e4)]={},this[A(0x1e4)][this[A(0x173)]]=c,c):await this[A(0x174)]({'id':this[A(0x173)],'version':this[A(0x1e4)]?.[this['appId']][A(0x1ba)]});}[p(0x18b)](c,d){const B=p;this[B(0x1a0)][B(0x13f)](B(0x157),{'mode':c,[c===B(0x146)?B(0x17f):B(0x127)]:d}),this[B(0x1b2)]=c,this[B(0x1d7)]=d;}async[p(0x148)](c,d){const C=p,e=this[C(0x195)][d[C(0x171)][C(0x1ca)]];e&&(this['delistJobCallback'](d['metadata'][C(0x1ca)]),e(c,d));}async['processWebHooks'](){const D=p;this['taskService'][D(0x192)](this[D(0x17c)]['bind'](this));}async[p(0x1e9)](){const E=p;this[E(0x152)]['processTimeHooks'](this[E(0x1e5)]['bind'](this));}async[p(0x126)](c){const F=p;try{this[F(0x182)]?.[F(0x11e)](c);}catch(d){this['logger'][F(0x135)](F(0x12a),{'error':d});}}async[p(0x18c)](c,d={},e){const G=p,[f,g]=await this[G(0x11b)](c),h=activities_1[G(0x137)][utils_1[G(0x145)][G(0x125)](g[G(0x15c)])];if(h){const i=(0x0,utils_1[G(0x1bc)])(new Date()),j={'aid':f,'atp':g[G(0x15c)],'stp':g[G(0x169)],'ac':i,'au':i},k=null;return new h(g,d,j,k,this,e);}else throw new Error(G(0x15a)+g[G(0x15c)]+G(0x17e));}async[p(0x11b)](c){const H=p,d=await this[H(0x1b4)][H(0x19f)](this[H(0x173)]);if(!d)throw new Error('no\x20app\x20found\x20for\x20id\x20'+this[H(0x173)]);if(this[H(0x198)](c)){const e=c['substring'](0x1),f=await this[H(0x1b4)][H(0x11b)](e,await this['getVID'](d));return[e,f];}else{const g=await this[H(0x1b4)][H(0x139)](c,await this[H(0x19c)](d));if(g){const h=await this['store'][H(0x11b)](g,await this[H(0x19c)](d));return[g,h];}}throw new Error(H(0x1ac)+c+H(0x124)+this[H(0x173)]+H(0x133)+d[H(0x1ba)]);}async[p(0x13a)](){const I=p;return await this[I(0x1b4)][I(0x13a)]();}[p(0x198)](c){const J=p;return c[J(0x1dc)]('.');}async['plan'](c){const K=p,d=new compiler_1[(K(0x1bd))](this[K(0x1b4)],this['stream'],this[K(0x1a0)]);return await d[K(0x121)](c);}async[p(0x1eb)](c){const L=p,d=new compiler_1[(L(0x1bd))](this[L(0x1b4)],this[L(0x129)],this['logger']);return await d[L(0x1eb)](c);}async[p(0x1cf)](c,d){const M=p,{id:e,version:f}=await this['getVID'](),g=new reporter_1[(M(0x1a7))]({'id':e,'version':f},this[M(0x1b4)],this[M(0x1a0)]),h=await this[M(0x178)](c,d);return await g[M(0x1cf)](h);}async['getIds'](c,d,e=[]){const N=p,{id:f,version:g}=await this[N(0x19c)](),h=new reporter_1[(N(0x1a7))]({'id':f,'version':g},this[N(0x1b4)],this[N(0x1a0)]),i=await this['resolveQuery'](c,d);return await h['getIds'](i,e);}async[p(0x178)](c,d){const O=p,e=await this[O(0x18c)](c,d[O(0x183)]);return await e['getState'](),{'end':d['end'],'start':d[O(0x17a)],'range':d[O(0x1dd)],'granularity':e[O(0x187)](),'key':e['resolveJobKey'](e[O(0x1e1)]()),'sparse':d[O(0x176)]};}async[p(0x172)](c){const P=p;this[P(0x1a0)][P(0x196)]('engine-process',{'jid':c['metadata'][P(0x1ca)],'gid':c[P(0x171)][P(0x1c2)],'dad':c[P(0x171)][P(0x1ae)],'aid':c['metadata'][P(0x165)],'status':c[P(0x123)]||stream_1[P(0x1c1)]['SUCCESS'],'code':c['code']||0xc8,'type':c[P(0x15c)]});const d={'metadata':{'guid':c[P(0x171)][P(0x1a4)],'jid':c['metadata'][P(0x1ca)],'gid':c[P(0x171)][P(0x1c2)],'dad':c['metadata'][P(0x1ae)],'aid':c['metadata']['aid']},'data':c[P(0x183)]};if(c['type']===stream_1[P(0x1e6)][P(0x1cd)]){const e=await this['initActivity']('.'+c['metadata'][P(0x165)],d[P(0x183)],d);await e[P(0x149)](c[P(0x171)]['jid']);}else{if(c[P(0x15c)]===stream_1[P(0x1e6)][P(0x180)]){const f=await this[P(0x18c)]('.'+c['metadata'][P(0x165)],d['data'],d);await f[P(0x15b)](c[P(0x123)],c[P(0x140)]);}else{if(c[P(0x15c)]===stream_1[P(0x1e6)][P(0x1d2)]){const g=await this['initActivity']('.'+c[P(0x171)][P(0x165)],d['data'],d);await g[P(0x1a6)]();}else{if(c['type']===stream_1['StreamDataType']['AWAIT']){d[P(0x171)]={...d[P(0x171)],'pj':c[P(0x171)][P(0x1ca)],'pg':c[P(0x171)][P(0x1c2)],'pd':c[P(0x171)]['dad'],'pa':c['metadata']['aid'],'px':c[P(0x171)][P(0x1d6)]===![],'trc':c[P(0x171)]['trc'],'spn':c[P(0x171)][P(0x1bb)]};const h=await this['initActivity'](c[P(0x171)][P(0x151)],c[P(0x183)],d);await h['process']();}else{if(c[P(0x15c)]===stream_1['StreamDataType'][P(0x155)]){const i=await this[P(0x18c)]('.'+d[P(0x171)][P(0x165)],c[P(0x183)],d);await i[P(0x1d8)](c[P(0x123)],c[P(0x140)]);}else{const j=await this[P(0x18c)]('.'+c[P(0x171)][P(0x165)],c[P(0x183)],d);await j[P(0x1d8)](c[P(0x123)],c[P(0x140)],P(0x144));}}}}}this['logger'][P(0x196)](P(0x131),{'jid':c[P(0x171)][P(0x1ca)],'gid':c[P(0x171)][P(0x1c2)],'aid':c[P(0x171)]['aid']});}async[p(0x16d)](c,d,e=![]){const Q=p;if(this[Q(0x1e2)](c)){const f=this[Q(0x1d0)](d['metadata']),g=c['$self']?.[Q(0x144)]?.[Q(0x171)]?.[Q(0x184)]||c[Q(0x18e)]?.[Q(0x144)]?.[Q(0x171)]?.[Q(0x1a5)],h={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':c[Q(0x171)]['pj'],'gid':c[Q(0x171)]['pg'],'dad':c[Q(0x171)]['pd'],'aid':c[Q(0x171)]['pa'],'trc':c['metadata'][Q(0x11f)],'spn':g},'type':stream_1[Q(0x1e6)][Q(0x155)],'data':d[Q(0x183)]};if(f&&f[Q(0x140)])h['status']=stream_1[Q(0x1c1)][Q(0x14e)],h[Q(0x183)]=f,h['code']=f[Q(0x140)],h['stack']=f['stack'];else e?(h[Q(0x123)]=stream_1[Q(0x1c1)][Q(0x11d)],h[Q(0x140)]=enums_1[Q(0x158)]):(h[Q(0x123)]=stream_1['StreamStatus']['SUCCESS'],h[Q(0x140)]=enums_1[Q(0x134)]);return await this[Q(0x182)]?.[Q(0x17d)](null,h);}}[p(0x1e2)](c,d=![]){const R=p;if(d)return Boolean(c[R(0x171)]['pj']&&c[R(0x171)]['pa']&&!c[R(0x171)]['px']);return Boolean(c[R(0x171)]['pj']&&c[R(0x171)]['pa']);}[p(0x1d0)](c){const S=p;if(c&&c[S(0x19b)])return JSON[S(0x1e8)](c[S(0x19b)]);}async[p(0x12e)](c,d,e={}){const T=p;await this[T(0x1b4)]['interrupt'](c,d,e);const f=await this['getState'](c,d),g={'interrupt':e[T(0x16a)],'expire':e[T(0x13b)]};return await this['runJobCompletionTasks'](f,g);}async['scrub'](c){const U=p;await this[U(0x1b4)]['scrub'](c);}async[p(0x17c)](c,d,e=stream_1['StreamStatus'][p(0x1b1)],f=0xc8){const V=p,g=await this[V(0x152)]['getHookRule'](c),[h]=await this['getSchema']('.'+g['to']),i={'type':stream_1['StreamDataType'][V(0x180)],'status':e,'code':f,'metadata':{'guid':(0x0,utils_1[V(0x1a4)])(),'aid':h,'topic':c},'data':d};return await this[V(0x182)]?.['publishMessage'](null,i);}async['hookTime'](c,d,e,f){const W=p;if(f===W(0x12e)||f===W(0x13b))return await this[W(0x12e)](e,c,{'suppress':!![],'expire':0x1});const [g,...h]=e[W(0x11a)](','),i=','+h['join'](','),j={'type':stream_1[W(0x1e6)][W(0x1cd)],'metadata':{'guid':(0x0,utils_1[W(0x1a4)])(),'jid':c,'gid':d,'dad':i,'aid':g},'data':{'timestamp':Date[W(0x19a)]()}};await this[W(0x182)]?.[W(0x17d)](null,j);}async[p(0x1a3)](c,d,e,f=[]){const X=p,g=await this['getVID'](),h=await this[X(0x152)][X(0x1c3)](c);if(h){const i=await(0x0,utils_1['getSubscriptionTopic'])(h['to'],this['store'],g),j=await this['resolveQuery'](i,e),k=new reporter_1[(X(0x1a7))](g,this[X(0x1b4)],this[X(0x1a0)]),l=await k[X(0x168)](j,f);if(l[X(0x1b8)]){const m=new task_1[(X(0x1ed))](this[X(0x1b4)],this['logger']);await m['enqueueWorkItems'](l[X(0x193)](n=>[c,n,e[X(0x16c)]||![],JSON['stringify'](d)][X(0x1bf)](key_1[X(0x1d3)]))),this[X(0x1d9)]['publish'](key_1[X(0x160)][X(0x1d5)],{'type':'work','originator':this[X(0x1a4)]},this[X(0x173)]);}return l;}else throw new Error(X(0x170)+c);}async[p(0x14a)](c,d,e,f){const Y=p,g=await this[Y(0x18c)](c,d,e);if(g)return await g[Y(0x1a6)](f);else throw new Error(Y(0x1df)+c);}async[p(0x1be)](c,d){const a0=p,e=async(f,g)=>{const Z=b;d(g[Z(0x151)],g[Z(0x14b)]);};return await this['subscribe']['subscribe'](key_1[a0(0x160)]['QUORUM'],e,this['appId'],c);}async[p(0x1ab)](c){const a1=p;return await this[a1(0x1d9)][a1(0x142)](key_1[a1(0x160)][a1(0x1d5)],this[a1(0x173)],c);}async[p(0x141)](c,d){const a3=p,e=async(f,g)=>{const a2=b;d(g[a2(0x151)],g[a2(0x14b)]);};return await this[a3(0x1d9)][a3(0x19d)](key_1[a3(0x160)]['QUORUM'],e,this['appId'],c);}async['punsub'](c){const a4=p;return await this[a4(0x1d9)][a4(0x164)](key_1['KeyType'][a4(0x1d5)],this[a4(0x173)],c);}async[p(0x16e)](c,d,e,f=enums_1[p(0x1e0)]){const a5=p;e={'metadata':{'ngn':this[a5(0x1a4)],'trc':e?.[a5(0x171)]?.[a5(0x11f)],'spn':e?.[a5(0x171)]?.[a5(0x1bb)]}};const g=await this[a5(0x14a)](c,d,e);return new Promise((h,i)=>{const a6=a5;this[a6(0x188)](g,(j,k)=>{const a7=a6;if(k[a7(0x171)]['err']){const l=JSON['parse'](k[a7(0x171)][a7(0x19b)]);i({...l,'job_id':k[a7(0x171)][a7(0x1ca)]});}else h(k);}),setTimeout(()=>{const a8=a6;this['delistJobCallback'](g),i({'code':enums_1[a8(0x12c)],'message':'timeout','job_id':g});},f);});}async[p(0x1e3)](c,d,e=![]){const a9=p;if(this[a9(0x19e)](c)){const f={'type':'job','topic':c[a9(0x171)][a9(0x1ca)],'job':(0x0,utils_1[a9(0x122)])(d)};this[a9(0x1d9)][a9(0x1ad)](key_1[a9(0x160)]['QUORUM'],f,this[a9(0x173)],c[a9(0x171)][a9(0x1d1)]);}}async[p(0x1b5)](c){const aa=p,d=await this[aa(0x19c)](),e=c[aa(0x171)][aa(0x165)]||c[aa(0x18e)]?.[aa(0x144)]?.[aa(0x171)]?.['aid'],f=await this['store'][aa(0x11b)](e,d);return f['publishes'];}async[p(0x132)](c,d,e=![]){const ab=p,f=await this[ab(0x1b5)](c);if(f){const g={'type':ab(0x14b),'topic':f,'job':(0x0,utils_1[ab(0x122)])(d)};this[ab(0x1d9)][ab(0x1ad)](key_1[ab(0x160)][ab(0x1d5)],g,this[ab(0x173)],f+'.'+c[ab(0x171)][ab(0x1ca)]);}}async['add'](c){const ac=p;return await this[ac(0x182)]?.['publishMessage'](null,c);}[p(0x188)](c,d){const ad=p;this[ad(0x195)][c]=d;}['delistJobCallback'](c){delete this['jobCallbacks'][c];}[p(0x19e)](c){const ae=p;return Boolean(c[ae(0x171)][ae(0x1d1)]);}async['runJobCompletionTasks'](c,d={}){const af=p,e=this[af(0x1e2)](c,!![]),f=this['hasOneTimeSubscription'](c),g=await this[af(0x1b5)](c);let h;if(e||f||g){const i=await this['getState'](c[af(0x171)][af(0x14d)],c[af(0x171)]['jid']);h=await this[af(0x16d)](c,i,d['emit']),this[af(0x1e3)](c,i,d['emit']),this['pubPermSubs'](c,i,d[af(0x1b0)]);}return!d[af(0x1b0)]&&this['taskService'][af(0x14c)](c['metadata'][af(0x1ca)],this[af(0x14f)](c,d),d),h;}[p(0x14f)](c,d){const ag=p;return d['expire']??c[ag(0x171)][ag(0x13b)]??enums_1[ag(0x150)];}async[p(0x1a8)](c){const ah=p;return await this['exporter'][ah(0x1a8)](c);}async[p(0x179)](c){const ai=p;return await this['store'][ai(0x179)](c);}async[p(0x1cb)](c){const aj=p,{id:d}=await this[aj(0x19c)]();return await this[aj(0x1b4)][aj(0x1cb)](c,d);}async['getState'](c,d){const ak=p,e=await this[ak(0x1b4)][ak(0x15e)]('$'+c),f={['$'+c]:Object['keys'](e)},g={},h=await this[ak(0x1b4)][ak(0x1ec)](d,f,g);if(!h)throw new Error('not\x20found\x20'+d);const [i,j]=h,k=(0x0,utils_1['restoreHierarchy'])(i);return j&&k[ak(0x171)]&&(k['metadata']['js']=j),k;}async['getQueryState'](c,d){const al=p;return await this[al(0x1b4)][al(0x138)](c,d);}async['compress'](c){const am=p,d=await this[am(0x1b4)]['getSymbolValues'](),e=Object[am(0x166)](d)[am(0x1b8)],f=Math[am(0x15f)](0x34,0x2)-0x1,g=serializer_1[am(0x13d)][am(0x136)](e,f,d,new Set(c));return await this[am(0x1b4)][am(0x147)](g);}}exports['EngineService']=EngineService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function a(){const G=['1142220MSIpna','other','172YYAbAb','inflate','export','entries','34jDMFkP','1901960NbiErT','6222DaMRql','match','defineProperty','160808ojmNFQ','replace','35qKTDFS','__esModule','hook','2650842EUQukk','807273cZMEoD','getAllSymbols','logger','fromString','length','../../modules/utils','inflateKey','inflateDependencyData','getRaw','forEach','SerializerService','store','ExporterService','VALSEP','split','symbols','1548AzwDzc','join'];a=function(){return G;};return a();}const z=b;(function(c,d){const y=b,e=c();while(!![]){try{const f=-parseInt(y(0x154))/0x1*(parseInt(y(0x156))/0x2)+-parseInt(y(0x14c))/0x3*(parseInt(y(0x150))/0x4)+-parseInt(y(0x14e))/0x5+parseInt(y(0x15e))/0x6+parseInt(y(0x15b))/0x7*(-parseInt(y(0x159))/0x8)+parseInt(y(0x15f))/0x9+parseInt(y(0x155))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x40a55));Object[z(0x158)](exports,z(0x15c),{'value':!![]}),exports[z(0x148)]=void 0x0;const key_1=require('../../modules/key'),utils_1=require(z(0x141)),serializer_1=require('../serializer');function b(c,d){const e=a();return b=function(f,g){f=f-0x140;let h=e[f];return h;},b(c,d);}class ExporterService{constructor(c,d,e){const A=z;this['appId']=c,this[A(0x161)]=e,this[A(0x147)]=d;}async[z(0x152)](c,d={}){const B=z;!this['symbols']&&(this[B(0x14b)]=this[B(0x147)][B(0x160)](),this[B(0x14b)]=await this[B(0x14b)]);const e=[],f=await this['store'][B(0x144)](c),g=this['inflate'](f,e);return g;}['inflateKey'](c){const C=z;return c in this[C(0x14b)]?this['symbols'][c]:c;}[z(0x151)](c,d){const D=z,e={'hooks':{},'main':{'cursor':-0x1,'items':[]}},f={},g=this[D(0x143)](d,e),h=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object[D(0x153)](c)[D(0x145)](([i,j])=>{const E=D,k=i['match'](h);if(k){const [l,m,n]=k,o=this[E(0x142)](m),p=''+n[E(0x15a)](/,/g,'/'),q=serializer_1[E(0x146)][E(0x162)](j);f[p+'/'+o]=q;}else i[E(0x140)]===0x3&&(f[this[E(0x142)](i)]=serializer_1[E(0x146)]['fromString'](j));}),{'dependencies':g,'process':(0x0,utils_1['restoreHierarchy'])(f),'status':c[':']};}[z(0x143)](c,d){const e=/([0-9,]+)-(\d+)$/,f=/-(\d+)$/;return c['map']((g,h)=>{const F=b,[i,j,k,l,...m]=g[F(0x14a)](key_1[F(0x149)]),n=m[F(0x14d)](key_1[F(0x149)]),o=n[F(0x157)](e);let p,q,r='';if(o){const [s,t,u]=o;r=t[F(0x14a)](',')[F(0x14d)]('/'),p=r+'['+u+']',q=F(0x15d);}else{const v=n['match'](f);if(v){const [w,x]=v;p='['+x+']',q='flow';}else p='/',q=F(0x14f);}return{'type':i,'topic':j,'gid':k,'jid':n};});}}exports['ExporterService']=ExporterService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function b(c,d){const e=a();return b=function(f,g){f=f-0x76;let h=e[f];return h;},b(c,d);}const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=-parseInt(l(0x88))/0x1*(parseInt(l(0x9b))/0x2)+parseInt(l(0x80))/0x3*(parseInt(l(0x99))/0x4)+parseInt(l(0x85))/0x5*(parseInt(l(0x92))/0x6)+-parseInt(l(0x7f))/0x7*(-parseInt(l(0x7d))/0x8)+-parseInt(l(0x8d))/0x9*(-parseInt(l(0x8a))/0xa)+parseInt(l(0x8b))/0xb*(parseInt(l(0x7b))/0xc)+parseInt(l(0x7c))/0xd*(-parseInt(l(0x94))/0xe);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xca06c));function a(){const u=['resolve','rules','forEach','15syFzfS','includes','process','1434159DMCcLx','data','20SMZBRW','693gwfmsV','call','3494871FhXKtt','gate','defineProperty','../pipe','pipe','457602hakZYA','boolean','714wQhHTx','toString','code','match','Pipe','1698268sxOJuJ','evaluate','2jSrttQ','object','__esModule','traverseRules','@pipe','prototype','MapperService','44316xhVkjH','189501eDuhsu','10739368Zsrqfc','isArray','7TTeYNO','3IDXhsn','mapRules'];a=function(){return u;};return a();}Object[m(0x8f)](exports,m(0x76),{'value':!![]}),exports[m(0x7a)]=void 0x0;const pipe_1=require(m(0x90));class MapperService{constructor(c,d){const n=m;this[n(0x83)]=c,this[n(0x89)]=d;}[m(0x81)](){const o=m;return this[o(0x77)](this[o(0x83)]);}[m(0x77)](c){const p=m;if(typeof c===p(0x9c)&&p(0x78)in c)return this[p(0x91)](c['@pipe']);if(typeof c==='object'&&c!==null){const d={};for(const e in c){Object[p(0x79)]['hasOwnProperty'][p(0x8c)](c,e)&&(d[e]=this['traverseRules'](c[e]));}return d;}else return this[p(0x82)](c);}[m(0x91)](c){const q=m,d=new pipe_1[(q(0x98))](c,this[q(0x89)]);return d[q(0x87)]();}[m(0x82)](c){const r=m,d=new pipe_1[(r(0x98))]([[c]],this['data']);return d[r(0x87)]();}static[m(0x9a)](c,d,e){const s=m;if(typeof c===s(0x93))return c;if(Array[s(0x7e)](c['code'])&&c[s(0x96)][s(0x86)](e||0xc8)||e[s(0x95)]()===(c['code']||0xc8)[s(0x95)]()){if(!c[s(0x97)])return!![];const f=c[s(0x8e)]==='or';let g=!![],h=![];return c[s(0x97)][s(0x84)](({expected:i,actual:j})=>{const t=s;if(f&&!h||!f&&g){const k=pipe_1[t(0x98)]['resolve'](j,d)===i;if(f&&k)h=!![];else!f&&!k&&(g=![]);}}),f?h:g;}return![];}}exports[m(0x7a)]=MapperService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';const q=b;(function(c,d){const p=b,e=c();while(!![]){try{const f=parseInt(p(0xce))/0x1+parseInt(p(0xbf))/0x2*(parseInt(p(0xd4))/0x3)+parseInt(p(0xea))/0x4*(parseInt(p(0xe5))/0x5)+parseInt(p(0xc2))/0x6*(-parseInt(p(0xbc))/0x7)+-parseInt(p(0xd0))/0x8+parseInt(p(0xcd))/0x9*(parseInt(p(0xe9))/0xa)+-parseInt(p(0xbe))/0xb*(parseInt(p(0xd3))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x32a13));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[q(0xb8)]=void 0x0;const utils_1=require(q(0xdb)),serializer_1=require(q(0xb9));function b(c,d){const e=a();return b=function(f,g){f=f-0xb8;let h=e[f];return h;},b(c,d);}class ExporterService{constructor(c,d,e){const r=q;this[r(0xd1)]=c,this[r(0xca)]=e,this[r(0xe6)]=d;}async[q(0xc5)](c,d={}){const s=q;if(!ExporterService[s(0xe1)]['has'](this[s(0xd1)])){const g=this[s(0xe6)][s(0xc6)]();ExporterService['symbols'][s(0xda)](this[s(0xd1)],await g);}const e=await this[s(0xe6)][s(0xc8)](c),f=this[s(0xe0)](e,d);return f;}[q(0xe0)](c,d){const t=q,e=[],f={},g={},h={},i=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object[t(0xec)](c)[t(0xd6)](([j,k])=>{const u=t,l=j['match'](i);if(l)this[u(0xe3)](l,k,h);else{if(j[u(0xc3)]('_'))g[j[u(0xdc)](0x1)]=k;else{if(j['startsWith']('-')){const m=this[u(0xd2)](j);e[u(0xc9)]({...m,'key':j,'value':this[u(0xeb)](k,d[u(0xc7)])});}else j['length']===0x3&&(f[this[u(0xdd)](j)]=serializer_1[u(0xcb)]['fromString'](k));}}}),this['filterFields']({'data':(0x0,utils_1[t(0xdf)])(g),'state':Object[t(0xec)]((0x0,utils_1[t(0xdf)])(f))[0x0][0x1],'status':parseInt(c[':'],0xa),'timeline':this['sortParts'](e),'transitions':this[t(0xc4)](h)},d['block'],d[t(0xbd)]);}[q(0xeb)](c,d){const v=q,e=serializer_1[v(0xcb)][v(0xe4)](c);if(d!==![])return e;return e&&typeof e===v(0xd8)&&(v(0xc0)in e&&(e[v(0xc0)]={}),v(0xd9)in e&&(e['$error']={})),e;}[q(0xdd)](c){const w=q,d=ExporterService[w(0xe1)][w(0xd7)](this['appId']);if(c in d){const e=d[c],f=e[w(0xcc)]('/');return f[w(0xbb)]('/');}return c;}[q(0xed)](c,d=[],e=[]){const x=q;let f={};return e&&e[x(0xd5)]>0x0?e[x(0xd6)](g=>{g in c&&(f[g]=c[g]);}):f={...c},d&&d[x(0xd5)]>0x0&&d[x(0xd6)](g=>{g in f&&delete f[g];}),f;}[q(0xe3)](c,d,e){const y=q,[f,g,h]=c,i=this[y(0xdd)](g),j=i[y(0xcc)]('/'),k=j[0x0],l=i[y(0xe2)](y(0xe8)),m=i[y(0xe2)](y(0xcf));if(l||m){const n=k+','+h,o=e[n];!o?e[n]={'activity':k,'dimensions':h,'created':l?d:null,'updated':m?d:null}:o[l?y(0xde):y(0xe7)]=d;}}[q(0xc4)](c){const z=q,d=Object['values'](c);return d[z(0xba)]((e,f)=>{const A=z;return(e[A(0xde)]||e[A(0xe7)])[A(0xc1)](f['created']||f[A(0xe7)]);}),d;}['keyToObject'](c){const C=q;function d(f){const B=b,g=f['split'](',');if(g[B(0xd5)]>0x1)return g['shift'](),g['join'](',');}const e=c[C(0xcc)]('-');return e['length']===0x4?{'index':parseInt(e[0x2],0xa),'dimension':d(e[0x1])}:{'index':parseInt(e[0x2],0xa),'secondary':parseInt(e[0x3],0xa),'dimension':d(e[0x1])};}['sortParts'](c){const D=q;return c[D(0xba)]((d,e)=>{const {dimension:f,index:g,secondary:h}=d,{dimension:i,index:j,secondary:k}=e;if(f===undefined&&i!==undefined)return-0x1;if(f!==undefined&&i===undefined)return 0x1;if(f!==undefined&&i!==undefined){if(f<i)return-0x1;if(f>i)return 0x1;}if(g<j)return-0x1;if(g>j)return 0x1;if(h===undefined&&k!==undefined)return-0x1;if(h!==undefined&&k===undefined)return 0x1;if(h!==undefined&&k!==undefined){if(h<k)return-0x1;if(h>k)return 0x1;}return 0x0;});}}function a(){const E=['forEach','get','object','$error','set','../../modules/utils','substring','inflateKey','created','restoreHierarchy','inflate','symbols','endsWith','inflateTransition','fromString','135965SaOIDT','store','updated','/output/metadata/ac','30vqZnEb','4PcKoTf','resolveValue','entries','filterFields','ExporterService','../serializer','sort','join','7zboBqk','allow','33VuPIjN','2yrJEcj','data','localeCompare','1679568NnTwJL','startsWith','sortEntriesByCreated','export','getAllSymbols','values','getRaw','push','logger','SerializerService','split','870327vMJAkD','273253OaCraE','/output/metadata/au','2947632tbBjdU','appId','keyToObject','352068kHIYjS','1059669uIizgZ','length'];a=function(){return E;};return a();}exports[q(0xb8)]=ExporterService,ExporterService[q(0xe1)]=new Map();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';var i=b;function a(){var v=['indexOf','concat','591114IkGsgI','defineProperty','push','16250TJJtkC','localeCompare','1487886uAzBoy','reverse','pop','lastIndexOf','720052MHUJOl','slice','456GVsZhV','ASCENDING','9krRvhz','splice','11964940ttmXoc','string','473296rtxoMA','623696oYKOrk','sort','get','shift','unshift','join','__esModule','length','ArrayHandler','49GXEtKG'];a=function(){return v;};return a();}(function(c,d){var h=b,e=c();while(!![]){try{var f=-parseInt(h(0x169))/0x1+parseInt(h(0x161))/0x2+-parseInt(h(0x15d))/0x3+-parseInt(h(0x163))/0x4*(-parseInt(h(0x15b))/0x5)+-parseInt(h(0x158))/0x6+-parseInt(h(0x155))/0x7*(parseInt(h(0x16a))/0x8)+-parseInt(h(0x165))/0x9*(-parseInt(h(0x167))/0xa);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x4c8a5));function b(c,d){var e=a();return b=function(f,g){f=f-0x14d;var h=e[f];return h;},b(c,d);}Object[i(0x159)](exports,i(0x152),{'value':!![]}),exports[i(0x154)]=void 0x0;class ArrayHandler{[i(0x14e)](c,d){return c?.[d||0x0];}[i(0x153)](c){var j=i;return c?.[j(0x153)];}[i(0x157)](c,d){var k=i;return c[k(0x157)](d);}[i(0x156)](c,d,e){return c['indexOf'](d,e);}[i(0x151)](c,d){var l=i;return c[l(0x151)](d);}[i(0x160)](c,d,e){var m=i;return c[m(0x160)](d,e);}[i(0x15f)](c){var n=i;return c[n(0x15f)]();}[i(0x15a)](c,...d){var o=i;return c[o(0x15a)](...d),c;}[i(0x15e)](c){var p=i;return c[p(0x15e)]();}[i(0x14f)](c){var q=i;return c[q(0x14f)]();}[i(0x162)](c,d,e){return c['slice'](d,e);}[i(0x14d)](c,d=i(0x164)){var r=i;return c[r(0x14d)]((e,f)=>{var s=r;if(d===s(0x164)){if(e===f)return 0x0;if(e===null||e===undefined)return-0x1;if(f===null||f===undefined)return 0x1;if(typeof e===s(0x168)&&typeof f===s(0x168))return e[s(0x15c)](f);return e<f?-0x1:0x1;}else{if(e===f)return 0x0;if(e===null||e===undefined)return 0x1;if(f===null||f===undefined)return-0x1;if(typeof e===s(0x168)&&typeof f===s(0x168))return f['localeCompare'](e);return e>f?-0x1:0x1;}});}[i(0x166)](c,d,e,...f){var t=i;return c[t(0x166)](d,e,...f);}[i(0x150)](c,...d){var u=i;return c[u(0x150)](...d);}}exports[i(0x154)]=ArrayHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';var i=b;(function(c,d){var h=b,e=c();while(!![]){try{var f=-parseInt(h(0x1db))/0x1*(parseInt(h(0x1d7))/0x2)+parseInt(h(0x1dc))/0x3+parseInt(h(0x1d1))/0x4+-parseInt(h(0x1cf))/0x5*(-parseInt(h(0x1cd))/0x6)+-parseInt(h(0x1ce))/0x7*(parseInt(h(0x1da))/0x8)+-parseInt(h(0x1d5))/0x9+parseInt(h(0x1d9))/0xa*(-parseInt(h(0x1d8))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xe4063));Object[i(0x1d2)](exports,'__esModule',{'value':!![]}),exports[i(0x1d0)]=void 0x0;class BitwiseHandler{[i(0x1d6)](c,d){return c&d;}['or'](c,d){return c|d;}['xor'](c,d){return c^d;}[i(0x1d4)](c,d){return c<<d;}['rightShift'](c,d){return c>>d;}[i(0x1d3)](c,d){return c>>>d;}}exports[i(0x1d0)]=BitwiseHandler;function b(c,d){var e=a();return b=function(f,g){f=f-0x1cd;var h=e[f];return h;},b(c,d);}function a(){var j=['1080801trLqzM','and','54FZtajC','10532434ndCFPf','10bFmHaU','178744WZdJOD','29513yPxWrp','5400993rmLQnJ','144NcOtGq','469RJEYJV','323860McjaBN','BitwiseHandler','3802172mTXzDP','defineProperty','unsignedRightShift','leftShift'];a=function(){return j;};return a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';var i=b;function a(){var j=['inequality','2144uqqXqy','678282JhadmZ','less_than','63orHsgF','27DDlsrR','strict_equality','defineProperty','nullish','ternary','__esModule','greater_than','less_than_or_equal','630296xktvkm','1219795DzezlA','5172678rwiALW','equality','strict_inequality','617480zrvqGb','5558970wGDSJP','ConditionalHandler'];a=function(){return j;};return a();}(function(c,d){var h=b,e=c();while(!![]){try{var f=parseInt(h(0x189))/0x1+-parseInt(h(0x17c))/0x2*(-parseInt(h(0x17f))/0x3)+parseInt(h(0x18d))/0x4+-parseInt(h(0x179))/0x5+-parseInt(h(0x17d))/0x6+parseInt(h(0x18a))/0x7+parseInt(h(0x188))/0x8*(-parseInt(h(0x180))/0x9);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xa4a7d));function b(c,d){var e=a();return b=function(f,g){f=f-0x179;var h=e[f];return h;},b(c,d);}Object[i(0x182)](exports,i(0x185),{'value':!![]}),exports[i(0x17a)]=void 0x0;class ConditionalHandler{[i(0x184)](c,d,e){return c?d:e;}[i(0x18b)](c,d){return c==d;}[i(0x181)](c,d){return c===d;}[i(0x17b)](c,d){return c!=d;}[i(0x18c)](c,d){return c!==d;}[i(0x186)](c,d){return c>d;}[i(0x17e)](c,d){return c<d;}['greater_than_or_equal'](c,d){return c>=d;}[i(0x187)](c,d){return c<=d;}[i(0x183)](c,d){return c??d;}}exports['ConditionalHandler']=ConditionalHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';const k=b;(function(c,d){const j=b,e=c();while(!![]){try{const f=parseInt(j(0x99))/0x1+parseInt(j(0xa2))/0x2+-parseInt(j(0xa7))/0x3+-parseInt(j(0x92))/0x4*(-parseInt(j(0x91))/0x5)+-parseInt(j(0xab))/0x6*(-parseInt(j(0x9b))/0x7)+-parseInt(j(0x9f))/0x8*(-parseInt(j(0x94))/0x9)+parseInt(j(0xaa))/0xa*(-parseInt(j(0x96))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x8c736));Object[k(0x9e)](exports,k(0x9c),{'value':!![]}),exports[k(0x95)]=void 0x0;function a(){const m=['2569806NNlguR','CronHandler','10608411QhLers','../../../modules/utils','round','288396Vhzjkg','../../logger','7PqNfaH','__esModule','isValidCron','defineProperty','24LnTNNK','next','meshos','1123514WXEiGc','parseExpression','toDate','hotmesh','cron-parser','2982981wLyokY','HMSH_FIDELITY_SECONDS','nextDelay','10rokxYt','2734962cgiuSY','Error\x20calculating\x20next\x20cron\x20job\x20execution\x20\x20delay:','getTime','145zMWwLe','51232GdxAQM','logger'];a=function(){return m;};return a();}function b(c,d){const e=a();return b=function(f,g){f=f-0x90;let h=e[f];return h;},b(c,d);}const cron_parser_1=require(k(0xa6)),enums_1=require('../../../modules/enums'),utils_1=require(k(0x97)),logger_1=require(k(0x9a));class CronHandler{[k(0xa9)](c){const l=k;try{if(!(0x0,utils_1[l(0x9d)])(c))return-0x1;const d=(0x0,cron_parser_1[l(0xa3)])(c,{'utc':!![]}),e=d[l(0xa0)]()[l(0xa4)](),f=new Date(),g=(e[l(0x90)]()-f[l(0x90)]())/0x3e8;if(g<=0x0)return-0x1;if(g<enums_1[l(0xa8)])return enums_1[l(0xa8)];const h=Math[l(0x98)](g);return h;}catch(i){return CronHandler[l(0x93)]['error'](l(0xac),{...i}),-0x1;}}}exports[k(0x95)]=CronHandler,CronHandler[k(0x93)]=new logger_1['LoggerService'](k(0xa5),k(0xa1));
|