@hotmeshio/hotmesh 0.3.25 → 0.3.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/modules/enums.d.ts +1 -0
- package/build/modules/enums.js +2 -1
- package/build/modules/key.js +1 -1
- package/build/modules/utils.d.ts +0 -1
- package/build/modules/utils.js +1 -1
- package/build/package.json +2 -2
- 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/connector/providers/nats.js +1 -1
- package/build/services/connector/providers/postgres.js +1 -1
- package/build/services/engine/index.js +1 -1
- package/build/services/exporter/index.js +1 -1
- package/build/services/logger/index.d.ts +0 -1
- package/build/services/logger/index.js +21 -39
- package/build/services/mapper/index.js +1 -1
- package/build/services/meshcall/index.js +2 -2
- package/build/services/meshflow/client.js +3 -3
- package/build/services/meshflow/exporter.js +1 -1
- package/build/services/meshflow/search.js +4 -4
- 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.d.ts +2 -0
- package/build/services/telemetry/index.js +1 -1
- package/build/services/worker/index.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function b(c,d){const e=a();return b=function(f,g){f=f-
|
|
1
|
+
'use strict';function b(c,d){const e=a();return b=function(f,g){f=f-0x133;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(0x165))/0x1+-parseInt(i(0x148))/0x2*(-parseInt(i(0x167))/0x3)+-parseInt(i(0x13e))/0x4*(-parseInt(i(0x15b))/0x5)+parseInt(i(0x14a))/0x6*(parseInt(i(0x13a))/0x7)+-parseInt(i(0x173))/0x8*(parseInt(i(0x169))/0x9)+-parseInt(i(0x166))/0xa*(parseInt(i(0x160))/0xb)+-parseInt(i(0x15c))/0xc*(parseInt(i(0x154))/0xd);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x99273));Object[j(0x157)](exports,'__esModule',{'value':!![]}),exports[j(0x147)]=void 0x0;function a(){const m=['retry','message','config','verifyEntry','execActivity','dad','worker-collation-overage','guid','380648jBGyTb','output','../../modules/errors','mapActivityAttributes','$self','GenerationalError','logger','worker-collation-error','resolveStatus','../../modules/utils','aid','appId','6939569ttVUqB','Pipe','publishMessage','context','4tTnYob','error','policies','info','TelemetryService','../telemetry','GetStateError','./activity','worker-process-error','Worker','29822NYERHI','authorizeReentry','6PtySHG','CollatorService','resolve','gid','jid','process-event-generational-job-error','trc','fault','../pipe','startActivitySpan','4138394ioggeZ','setActivityAttributes','mapInputData','defineProperty','debug','exec','metadata','2018310InrVIR','36AbKjDs','CollationError','duplicate','../collator','2938111IQiaAZ','subtype','Activity','process','endActivitySpan','629143teWCGU','10fZiGVb','51XZznMp','InactiveJobError','81lDUhbJ','engine'];a=function(){return m;};return a();}const errors_1=require(j(0x175)),utils_1=require(j(0x137)),collator_1=require(j(0x15f)),pipe_1=require(j(0x152)),telemetry_1=require(j(0x143)),activity_1=require(j(0x145));class Worker extends activity_1[j(0x162)]{constructor(c,d,e,f,g,h){super(c,d,e,f,g,h);}async[j(0x163)](){const k=j;this[k(0x134)][k(0x158)]('worker-process',{'jid':this[k(0x13d)][k(0x15a)][k(0x14e)],'gid':this['context'][k(0x15a)][k(0x14d)],'aid':this[k(0x15a)][k(0x138)]});let c;try{await this[k(0x16e)](),c=new telemetry_1[(k(0x142))](this[k(0x16a)][k(0x139)],this[k(0x16d)],this[k(0x15a)],this[k(0x13d)]),c[k(0x153)](this['leg']),this[k(0x156)]();const d=this['store']['transact'](),e=await this[k(0x16f)](d);await collator_1[k(0x14b)][k(0x149)](this,d),await this['setState'](d),await this['setStatus'](0x0,d);const f=await d[k(0x159)]();c[k(0x176)]();const g=this[k(0x136)](f);return c[k(0x155)]({'app.activity.mid':e,'app.job.jss':g}),this[k(0x13d)][k(0x15a)]['aid'];}catch(h){if(h instanceof errors_1[k(0x168)]){this['logger']['error']('await-inactive-job-error',{'error':h});return;}else{if(h instanceof errors_1[k(0x133)]){this[k(0x134)][k(0x141)](k(0x14f),{'error':h});return;}else{if(h instanceof errors_1[k(0x144)]){this[k(0x134)][k(0x13f)]('worker-get-state-error',{'error':h});return;}else{if(h instanceof errors_1[k(0x15d)]){if(h[k(0x151)]===k(0x15e)){this['logger'][k(0x141)](k(0x171),{'job_id':this[k(0x13d)][k(0x15a)][k(0x14e)],'guid':this[k(0x13d)][k(0x15a)][k(0x172)]});return;}this[k(0x134)][k(0x13f)](k(0x135),{'error':h});}else this[k(0x134)][k(0x13f)](k(0x146),{'error':h});}}}c?.['setActivityError'](h[k(0x16c)]);throw h;}finally{c?.[k(0x164)](),this[k(0x134)][k(0x158)]('worker-process-end',{'jid':this[k(0x13d)][k(0x15a)][k(0x14e)],'gid':this['context']['metadata'][k(0x14d)],'aid':this[k(0x15a)][k(0x138)]});}}async['execActivity'](c){const l=j,d=pipe_1[l(0x13b)][l(0x14c)](this[l(0x16d)][l(0x161)],this[l(0x13d)]),e={'metadata':{'guid':(0x0,utils_1[l(0x172)])(),'jid':this[l(0x13d)][l(0x15a)][l(0x14e)],'gid':this[l(0x13d)][l(0x15a)]['gid'],'dad':this['metadata'][l(0x170)],'aid':this[l(0x15a)][l(0x138)],'topic':d,'spn':this[l(0x13d)][l(0x177)][l(0x174)][l(0x15a)]['l1s'],'trc':this[l(0x13d)]['metadata'][l(0x150)]},'data':this[l(0x13d)]['data']};return this[l(0x16d)][l(0x16b)]&&(e[l(0x140)]={'retry':this['config'][l(0x16b)]}),await this[l(0x16a)]['router']?.[l(0x13c)](d,e,c);}}exports[j(0x147)]=Worker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f
|
|
1
|
+
'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=-parseInt(l(0x179))/0x1*(-parseInt(l(0x18e))/0x2)+-parseInt(l(0x18b))/0x3+-parseInt(l(0x169))/0x4+-parseInt(l(0x164))/0x5*(parseInt(l(0x197))/0x6)+-parseInt(l(0x192))/0x7*(parseInt(l(0x170))/0x8)+-parseInt(l(0x195))/0x9+-parseInt(l(0x15f))/0xa*(-parseInt(l(0x15a))/0xb);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x93983));function a(){const L=['metadata','toString','462392UkTXBs','lastIndexOf','getSeed','getDimensionalAddress','targetLength','getDimensionalSeed','defineProperty','length','verifySyntheticInteger','23uKTbzZ','CollationFaultType','isArray','verifyInteger','transact','config','ancestor','notarizeEntry','forEach','context','isInactive','__esModule','exec','find','activities','CollatorService','notarizeEarlyExit','trigger','2530494aMjmfm','dad','INVALID','28858tiPITY','collator-trigger-activity-not-found','notarizeCompletion','reverse','84uckWuN','ancestors','isPrimed','9781749vxbfAj','CollationError','66060miaiPp','store','getDimensionsById','collateSynthetic','notarizeEarlyCompletion','split','type','assertJobActive','888000001000001','getDigitAtIndex','transitions','getDimensionalIndex','exit','indexOf','INACTIVE','collate','substring','authorizeReentry','11NyKXrt','jid','push','isInceptionOverage','../../types/collator','40662430TAJiMW','notarizeReentry','getTriggerSeed','enter','leg','505vnhdEX','keys','aid','resolveReentryDimension','cycle','230424doaOXQ','DUPLICATE','notarizeInception','../../modules/errors','compile'];a=function(){return L;};return a();}Object[m(0x176)](exports,m(0x184),{'value':!![]}),exports['CollatorService']=void 0x0;const errors_1=require(m(0x16c)),collator_1=require(m(0x15e));class CollatorService{static[m(0x19e)](c,d,e,f=0x0){if(c<=f)throw new errors_1['InactiveJobError'](d,c,e);}static[m(0x173)](c,d=![]){const n=m;let e=c[n(0x182)][n(0x16e)][n(0x18c)]||c[n(0x16e)][n(0x18c)];return d&&e&&c[n(0x163)]===0x2&&(e=e[n(0x158)](0x0,e[n(0x171)](','))+',0'),CollatorService[n(0x199)]([...c[n(0x17e)][n(0x193)],c['metadata'][n(0x166)]],e);}static[m(0x167)](c){const o=m,d=c[o(0x17e)][o(0x17f)],e=c['config'][o(0x193)],f=e[o(0x155)](d),g=c[o(0x16e)][o(0x18c)][o(0x19c)](',');return g[o(0x177)]=f+0x1,g[o(0x15c)]('0'),g['join'](',');}static async[m(0x180)](c,d){const p=m,e=await c[p(0x198)][p(0x157)](c[p(0x182)]['metadata']['jid'],c['metadata'][p(0x166)],-0x5af3107a4000,this['getDimensionalAddress'](c),d);return this[p(0x17c)](e,0x1,p(0x162)),e;}static async[m(0x159)](c,d){const q=m,e=await c[q(0x198)][q(0x157)](c[q(0x182)][q(0x16e)][q(0x15b)],c[q(0x16e)][q(0x166)],-0x9184e72a000,this[q(0x173)](c),d);return e;}static async[m(0x189)](c,d){const r=m;return await c[r(0x198)][r(0x157)](c[r(0x182)][r(0x16e)][r(0x15b)],c['metadata'][r(0x166)],-0xa012317b000,this[r(0x173)](c),d);}static async[m(0x19b)](c,d){const s=m,e=c[s(0x17e)][s(0x168)]?0x9184e72a000:0xa012317b000;return await c[s(0x198)][s(0x157)](c['context'][s(0x16e)][s(0x15b)],c[s(0x16e)][s(0x166)],0xf4241-e,this[s(0x173)](c),d);}static async[m(0x16b)](c,d,e){const t=m;d&&await c[t(0x198)][t(0x19a)](c[t(0x182)][t(0x16e)][t(0x15b)],d,0xf4240,e);}static async[m(0x15d)](c,d){const u=m;if(d){const e=await c[u(0x198)]['collateSynthetic'](c[u(0x182)][u(0x16e)][u(0x15b)],d,0xf4240);return e>0xf4240;}return![];}static async[m(0x160)](c,d,e){const v=m,f=c[v(0x182)]['metadata'][v(0x15b)],g=e||c[v(0x198)][v(0x17d)]();await c[v(0x198)][v(0x157)](f,c[v(0x16e)][v(0x166)],0xf4240,this[v(0x173)](c,!![]),g),await c[v(0x198)]['collateSynthetic'](f,d,0xf4240,g);const [h,i]=await g[v(0x185)](),j=Array[v(0x17b)](h)?h[0x1]:h,k=Array[v(0x17b)](i)?i[0x1]:i;return this['verifyInteger'](j,0x2,v(0x162)),this['verifySyntheticInteger'](k),j;}static async['notarizeContinuation'](c,d){const w=m;return await c[w(0x198)][w(0x157)](c[w(0x182)][w(0x16e)][w(0x15b)],c[w(0x16e)]['aid'],0x1,this[w(0x173)](c),d);}static async[m(0x190)](c,d){const x=m,e=c[x(0x17e)][x(0x168)]?0x0:0xe8d4a51000;return await c[x(0x198)][x(0x157)](c[x(0x182)][x(0x16e)][x(0x15b)],c['metadata']['aid'],0x1-e,this[x(0x173)](c),d);}static['getDigitAtIndex'](c,d){const y=m,e=c[y(0x16f)]();if(d<0x0||d>=e['length'])return null;const f=parseInt(e[d],0xa);return f;}static[m(0x153)](c){const z=m,d=c[z(0x16f)]();if(d['length']<0x9)return null;const e=d[z(0x158)](0x3,0x9),f=parseInt(e,0xa);return f-0x1;}static['isDuplicate'](c,d){const A=m;return this[A(0x1a0)](c,d)<0x8;}static['isInactive'](c){const B=m;return this[B(0x1a0)](c,0x2)<0x9;}static[m(0x194)](c,d){const C=m;return d==0x1?c!=-0x5af3107a4000:this[C(0x1a0)](c,0x0)<0x9&&this[C(0x1a0)](c,0x1)<0x9;}static[m(0x178)](c){const D=m,d=c['toString'](),e=parseInt(d[d['length']-0x1],0xa);if(e>0x0)throw new errors_1[(D(0x196))](c,0x2,D(0x162),collator_1[D(0x17a)][D(0x156)]);else{if(c>=0x1e8480)throw new errors_1['CollationError'](c,0x2,D(0x162),collator_1[D(0x17a)][D(0x16a)]);}}static[m(0x17c)](c,d,e){const E=m;let f;if(d===0x1&&e===E(0x162)){if(!this[E(0x194)](c,0x1))f=collator_1[E(0x17a)]['MISSING'];else{if(this['isDuplicate'](c,0x0))f=collator_1[E(0x17a)]['DUPLICATE'];else c!=0x331a2bfa73000&&(f=collator_1['CollationFaultType'][E(0x18d)]);}}else{if(d===0x1&&e===E(0x154)){if(c===-0x9184e72a000)f=collator_1['CollationFaultType']['MISSING'];else this['isDuplicate'](c,0x1)&&(f=collator_1[E(0x17a)][E(0x16a)]);}else{if(d===0x2&&e===E(0x162)){if(!this[E(0x194)](c,0x2))f=collator_1['CollationFaultType']['FORBIDDEN'];else this[E(0x183)](c)&&(f=collator_1[E(0x17a)][E(0x156)]);}}}if(f)throw new errors_1[(E(0x196))](c,d,e,f);}static[m(0x199)](c,d){const F=m,e={'$ADJACENT':d+',0'};let f=d;return c[F(0x191)]()[F(0x181)](g=>{const G=F;e[g]=f,f=f[G(0x158)](0x0,f[G(0x171)](','));}),e;}static[m(0x172)](){return'999000000000000';}static[m(0x161)](){const H=m;return H(0x19f);}static[m(0x16d)](c){CollatorService['bindAncestorArray'](c);}static['bindAncestorArray'](c){const I=m;c[I(0x181)](d=>{const J=I,e={},f=Object[J(0x165)](d['activities'])[J(0x186)](h=>d['activities'][h][J(0x19d)]===J(0x18a));if(!f)throw new Error(J(0x18f));const g=(h,i)=>{const K=J;e[h]=i,d[K(0x187)][h][K(0x193)]=i;const j=d[K(0x152)]?.[h]||[];j[K(0x181)](k=>{g(k['to'],[...i,h]);});};g(f,[]);});}static[m(0x175)](c=0x0){return','+c;}}function b(c,d){const e=a();return b=function(f,g){f=f-0x152;let h=e[f];return h;},b(c,d);}exports[m(0x188)]=CollatorService,CollatorService[m(0x174)]=0xf;
|
|
@@ -1 +1 @@
|
|
|
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
|
+
'use strict';function b(c,d){const e=a();return b=function(f,g){f=f-0x1c5;let h=e[f];return h;},b(c,d);}function a(){const X=['./validator','transitions','topic','join','bindParents','8255349ZRsnli','KeyType','data/','ENGINE','concat','WORKER','deployActivitySchemas','SerializerService','publishes','expire','__esModule','store','306667WYrmwZ','../../modules/utils','generateSymKeys','startsWith','filterSymVals','getSymKey','convertTopicsToTypes','parent','pow','deployConsumerGroups','bindSelf','PRODUCES','deploySubscriptions','cycle','string','maps','input','app','groupMappingRules','bindCycleTarget','schema','findTrigger','CollatorService','length','deployTransitions','Symbol\x20index\x20out\x20of\x20bounds','worker','push','resolveMappableValue','keys','1222908TlpCEy','Deployer','CONTEXT_VARS','convertActivitiesToHooks','ACTIVITY','stream','output/data','object','../serializer','791866hqwyUo','55410eVEcvz','resolve','substring','8tGWRqP','hooks','match','conditions','split','hook/data','produces','manifest','JOB','setHookRules','output','getVID','90TMxrDn','await','subtype','collectValues','@pipe','deployConsumerGroup','mintKey','activity','deployHookPatterns','data','setSchemas','enum','info','router-stream-group-exists','trigger','STREAMS','consumes','defineProperty','activities','resolveMappingDependencies','reserveSymbolRange','../pipe','examples','112357afFnYP','hook','persistent','isArray','$job','createConsumerGroup','396240FzRmUC','includes','generateSymVals','entries','resolveJobMapsPaths','logger','type','subscribes','job','addSymbols','ancestor','traverse','getSymbolValues','graphs','bindSymbols','add','Pipe','addSymbolValues'];a=function(){return X;};return a();}const u=b;(function(c,d){const t=b,e=c();while(!![]){try{const f=parseInt(t(0x1c9))/0x1+parseInt(t(0x1f0))/0x2+parseInt(t(0x1e7))/0x3+-parseInt(t(0x21d))/0x4+parseInt(t(0x1f1))/0x5*(parseInt(t(0x200))/0x6)+-parseInt(t(0x217))/0x7*(-parseInt(t(0x1f4))/0x8)+-parseInt(t(0x234))/0x9;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x436e4));Object[u(0x211)](exports,u(0x1c7),{'value':!![]}),exports[u(0x1e8)]=void 0x0;const key_1=require('../../modules/key'),utils_1=require(u(0x1ca)),collator_1=require('../collator'),serializer_1=require(u(0x1ef)),pipe_1=require(u(0x215)),validator_1=require(u(0x22f)),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(0x1fb)]=null,this[v(0x1fb)]=c;}async['deploy'](c,d){const w=u;this[w(0x1c8)]=c,this[w(0x1ec)]=d,collator_1[w(0x1df)]['compile'](this['manifest'][w(0x1da)][w(0x22a)]),this[w(0x1ea)](),this[w(0x1cf)](),this['copyJobSchemas'](),this['bindBackRefs'](),this[w(0x233)](),this[w(0x1dc)](),this[w(0x213)](),this[w(0x221)](),await this[w(0x1cb)](),await this[w(0x21f)](),await this[w(0x208)](),await this[w(0x23a)](),await this[w(0x1d5)](),await this[w(0x1e1)](),await this[w(0x1d2)]();}[u(0x1ff)](){const x=u;return{'id':this[x(0x1fb)]['app']['id'],'version':this[x(0x1fb)][x(0x1da)]['version']};}async[u(0x1cb)](){const y=u;for(const c of this[y(0x1fb)]['app'][y(0x22a)]){const [,d]=this[y(0x1de)](c),e=d[y(0x224)],[f,g,h]=await this[y(0x1c8)][y(0x214)]('$'+e,DEFAULT_RANGE_SIZE,y(0x1fc)),i='',j=this[y(0x22b)](f,g,h,i,d[y(0x1d4)]);Object[y(0x1e6)](j)[y(0x1e0)]&&await this[y(0x1c8)][y(0x226)]('$'+e,j);for(const [k,l]of Object[y(0x220)](c[y(0x212)])){const [m,n,o]=await this[y(0x1c8)]['reserveSymbolRange'](k,DEFAULT_RANGE_SIZE,y(0x1eb)),p=k+'/';this[y(0x1d3)](l[y(0x210)],l[y(0x1fa)],k);const q=this[y(0x22b)](m,n,o,p,l['produces']);Object['keys'](q)[y(0x1e0)]&&await this[y(0x1c8)][y(0x226)](k,q);}}}['bindSelf'](c,d,e){const z=u;for(const f of[e,'$self']){const g=c[f];if(g)for(const h of g){!d[z(0x21e)](h)&&d['push'](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(A(0x1e2));const l=(0x0,utils_1[A(0x1ce)])(c);c++,h[k]=l,i[k]=l;}}return h;}['copyJobSchemas'](){const B=u,c=this[B(0x1fb)][B(0x1da)]['graphs'];for(const d of c){const e=d[B(0x1fe)]?.[B(0x1dd)],f=d[B(0x1d9)]?.[B(0x1dd)];if(!e&&!f)continue;const g=d['activities'];for(const h in g){if(g[h]['type']===B(0x20e)){const i=g[h];e&&(!i['job']&&(i['job']={}),i[B(0x225)][B(0x1dd)]=e),f&&(i['output']={'schema':f});}}}}['bindBackRefs'](){const C=u;for(const c of this[C(0x1fb)][C(0x1da)][C(0x22a)]){const d=c[C(0x212)],e=this['findTrigger'](c)[0x0];for(const f in d){d[f][C(0x20e)]=e,d[f]['subscribes']=c['subscribes'],c[C(0x1c5)]&&(d[f][C(0x1c5)]=c[C(0x1c5)]),d[f]['expire']=c[C(0x1c6)]??undefined,d[f][C(0x219)]=c['persistent']??undefined;}}}[u(0x1dc)](){const D=u;for(const c of this[D(0x1fb)][D(0x1da)]['graphs']){const d=c[D(0x212)];for(const e in d){const f=d[e];f[D(0x223)]==='cycle'&&(d[f[D(0x227)]][D(0x1d6)]=!![]);}}}[u(0x1cf)](){const E=u;for(const c of this[E(0x1fb)][E(0x1da)]['graphs']){const d=c[E(0x212)];for(const e in d){const f=d[e];[E(0x1e3),E(0x201)][E(0x21e)](f[E(0x223)])&&f[E(0x231)]&&!f[E(0x202)]&&(f[E(0x202)]=f[E(0x231)]);}}}[u(0x1ea)](){const F=u;for(const c of this['manifest'][F(0x1da)][F(0x22a)]){const d=c[F(0x212)];for(const e in d){const f=d[e];[F(0x207)][F(0x21e)](f[F(0x223)])&&(f['type']=F(0x218));}}}async['bindParents'](){const G=u,c=this['manifest'][G(0x1da)][G(0x22a)];for(const d of c){if(d[G(0x230)])for(const e in d[G(0x230)]){const f=d[G(0x230)][e];for(const g of f){const h=g['to'];d[G(0x212)][h][G(0x1d0)]=e;}d[G(0x212)][e][G(0x230)]=f;}}}[u(0x203)](c,d){const H=u;for(const [e,f]of Object['entries'](c)){if(e===H(0x20b)||e===H(0x216)||e==='default'){if(Array[H(0x21a)](f))for(const g of f){typeof g==='string'&&g[H(0x1e0)]>0x5&&d['add'](g);}else typeof f===H(0x1d7)&&f['length']>0x5&&d[H(0x22c)](f);}else typeof f===H(0x1ee)&&this['collectValues'](f,d);}}['traverse'](c,d){const I=u;for(const e of Object['values'](c)){typeof e===I(0x1ee)&&(I(0x1dd)in e?this['collectValues'](e[I(0x1dd)],d):this[I(0x228)](e,d));}}async[u(0x21f)](){const J=u,c=new Set();for(const h of this[J(0x1fb)]['app'][J(0x22a)]){this[J(0x228)](h,c);}const d=await this[J(0x1c8)][J(0x229)](),e=Object[J(0x1e6)](d)[J(0x1e0)],f=Math[J(0x1d1)](0x34,0x2)-0x1,g=serializer_1[J(0x23b)][J(0x1cd)](e,f,d,c);await this[J(0x1c8)][J(0x22e)](g);}[u(0x221)](){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(0x1ee)&&g[j]!==null&&!(K(0x204)in g[j])){const k=[...h,j];f(g[j],k);}else{const l=[...h,j][K(0x232)]('/');if(!l[K(0x21e)]('[')){const m='data/'+l;!e[K(0x21e)](m)&&e[K(0x1e4)](m);}else{const [n,o]=l[K(0x1f8)]('['),[p,q]=o[K(0x1f8)](']');if(!isNaN(parseInt(p)))for(let r=0x0;r<parseInt(p);r++){const s=K(0x236)+n+'/'+r;!e[K(0x21e)](s)&&e[K(0x1e4)](s);}}}}}return d&&f(d),e;}for(const d of this['manifest'][L(0x1da)][L(0x22a)]){let e=[];const [,f]=this[L(0x1de)](d);for(const g in d['activities']){const h=d[L(0x212)][g];e=e[L(0x238)](c(h[L(0x225)]?.[L(0x1d8)]));}f[L(0x1d4)]=e;}}[u(0x213)](){const N=u,c=[];function d(g,h){const M=b;for(const i in g){if(typeof g[i]===M(0x1d7)){const j=g[i],k=j[M(0x1f6)](/^\{[^@].*}$/);k&&!validator_1['Validator'][M(0x1e9)][M(0x21e)](j)&&(j['split']('.')[0x1]!=='input'&&(c[M(0x1e4)](j),h[M(0x1e4)](j)));}else typeof g[i]===M(0x1ee)&&g[i]!==null&&d(g[i],h);}}const e=this[N(0x1fb)][N(0x1da)][N(0x22a)];for(const g of e){const h=g['activities'];for(const i in h){const j=h[i];j[N(0x210)]=[],d(j,j[N(0x210)]),j[N(0x210)]=this['groupMappingRules'](j[N(0x210)]);}}const f=this[N(0x1db)](c);for(const k of e){const l=k['activities'];for(const m in l){const n=l[m];n[N(0x1fa)]=f[''+m]||[];}}}[u(0x1db)](c){const O=u;c=Array['from'](new Set(c))['sort']();const d={};for(const e of c){const [f,g]=this[O(0x1e5)](e);!d[f]&&(d[f]=[]),d[f][O(0x1e4)](g);}return d;}[u(0x1e5)](c){const P=u;c=c[P(0x1f3)](0x1,c[P(0x1e0)]-0x1);const d=c['split']('.');if(d[0x0]===P(0x21b)){const [e,...f]=d;return[e,f[P(0x232)]('/')];}else{const [g,h,i,...j]=d,k={'hook':P(0x1f9),'input':'input/data','output':i===P(0x209)?P(0x1ed):'output/metadata'}[h];return[g,k+'/'+j[P(0x232)]('/')];}}async[u(0x23a)](){const Q=u,c=this['manifest'][Q(0x1da)]['graphs'],d={};for(const e of c){const f=e[Q(0x212)];for(const g in f){const h=f[g];delete h[Q(0x230)],d[g]=h;}}await this['store'][Q(0x20a)](d,this[Q(0x1ff)]());}async[u(0x1d5)](){const R=u,c=this[R(0x1fb)][R(0x1da)][R(0x22a)],d={};for(const e of c){const f=e[R(0x212)],g=e['subscribes'];for(const h in f){if(f[h][R(0x223)]===R(0x20e)){d[g]=h;break;}}}await this[R(0x1c8)]['setSubscriptions'](d,this[R(0x1ff)]());}['findTrigger'](c){const S=u;for(const d in c[S(0x212)]){const e=c['activities'][d];if(e[S(0x223)]==='trigger')return[d,e];}return null;}async['deployTransitions'](){const T=u,c=this[T(0x1fb)][T(0x1da)][T(0x22a)],d={};for(const e of c){if(e[T(0x224)]&&e[T(0x224)][T(0x1cc)]('.')){const [f]=this['findTrigger'](e);f&&(d[e[T(0x224)]]={[f]:!![]});}if(e[T(0x230)])for(const g in e[T(0x230)]){const h=e[T(0x230)][g],i={};for(const j of h){const k=j['to'];j[T(0x1f7)]?i[k]=j['conditions']:i[k]=!![];}Object[T(0x1e6)](i)['length']>0x0&&(d['.'+g]=i);}}await this[T(0x1c8)]['setTransitions'](d,this[T(0x1ff)]());}async[u(0x208)](){const U=u,c=this[U(0x1fb)][U(0x1da)]['graphs'],d={};for(const e of c){if(e[U(0x1f5)])for(const f in e['hooks']){d[f]=e[U(0x1f5)][f];const g=e[U(0x1f5)][f][0x0]['to'],h=e[U(0x212)][g];h&&(!h['hook']&&(h[U(0x218)]={}),h['hook']['topic']=f);}}await this[U(0x1c8)][U(0x1fd)](d);}async[u(0x1d2)](){const V=u,c={'appId':this[V(0x1fb)][V(0x1da)]['id']},d=this[V(0x1c8)]['mintKey'](key_1[V(0x235)]['STREAMS'],c);await this[V(0x205)](d,V(0x237));for(const e of this[V(0x1fb)][V(0x1da)]['graphs']){const f=e[V(0x212)];for(const g in f){const h=f[g];if(h[V(0x223)]===V(0x1e3)&&pipe_1[V(0x22d)][V(0x1f2)](h[V(0x202)],{})===h[V(0x202)]){c[V(0x231)]=h[V(0x202)];const i=this['store'][V(0x206)](key_1[V(0x235)][V(0x20f)],c);await this[V(0x205)](i,V(0x239));}}}}async[u(0x205)](c,d){const W=u;try{await this['stream'][W(0x21c)](c,d);}catch(e){this[W(0x1c8)][W(0x222)][W(0x20c)](W(0x20d),{'stream':c,'group':d});}}}exports[u(0x1e8)]=Deployer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const i=b;(function(c,d){const h=b,e=c();while(!![]){try{const f
|
|
1
|
+
'use strict';const i=b;function b(c,d){const e=a();return b=function(f,g){f=f-0x1b4;let h=e[f];return h;},b(c,d);}(function(c,d){const h=b,e=c();while(!![]){try{const f=-parseInt(h(0x1da))/0x1*(-parseInt(h(0x1c5))/0x2)+-parseInt(h(0x1e4))/0x3+-parseInt(h(0x1d6))/0x4*(-parseInt(h(0x1d7))/0x5)+-parseInt(h(0x1d2))/0x6+-parseInt(h(0x1ba))/0x7+-parseInt(h(0x1dd))/0x8*(-parseInt(h(0x1b6))/0x9)+-parseInt(h(0x1bb))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x20b07));var __createBinding=this&&this[i(0x1c6)]||(Object[i(0x1be)]?function(c,d,e,f){const j=i;if(f===undefined)f=e;var g=Object[j(0x1d0)](d,e);(!g||('get'in g?!d[j(0x1cf)]:g[j(0x1c7)]||g[j(0x1ca)]))&&(g={'enumerable':!![],'get':function(){return d[e];}}),Object[j(0x1bc)](c,f,g);}:function(c,d,e,f){if(f===undefined)f=e;c[f]=d[e];}),__setModuleDefault=this&&this[i(0x1cb)]||(Object[i(0x1be)]?function(c,d){const k=i;Object[k(0x1bc)](c,k(0x1c1),{'enumerable':!![],'value':d});}:function(c,d){const l=i;c[l(0x1c1)]=d;}),__importStar=this&&this['__importStar']||function(c){const m=i;if(c&&c[m(0x1cf)])return c;var d={};if(c!=null){for(var e in c)if(e!==m(0x1c1)&&Object['prototype'][m(0x1e1)][m(0x1db)](c,e))__createBinding(d,c,e);}return __setModuleDefault(d,c),d;},__importDefault=this&&this[i(0x1bf)]||function(c){const n=i;return c&&c[n(0x1cf)]?c:{'default':c};};function a(){const u=['error','hasOwnProperty','trim','join','447639PKoKwb','.json','utf8','logger','activateAppVersion','9plQOXm','store','plan','version','304248MRojVR','740240IxUsSy','defineProperty','compiler-deploy-error','create','__importDefault','js-yaml','default','Deployer','load','compiler-plan-error','1878yWFXPK','__createBinding','writable','app','validate','configurable','__setModuleDefault','.hotmesh.','dereference','./validator','__esModule','getOwnPropertyDescriptor','@apidevtools/json-schema-ref-parser','883800VBJYvB','activate','isPath','Validator','23032RxIQDk','100snzLto','stream','startsWith','199wlgioX','call','path','1967000lKiikL','CompilerService','saveAsJSON'];a=function(){return u;};return a();}Object[i(0x1bc)](exports,i(0x1cf),{'value':!![]}),exports[i(0x1de)]=void 0x0;const fs=__importStar(require('fs/promises')),path=__importStar(require(i(0x1dc))),json_schema_ref_parser_1=__importDefault(require(i(0x1d1))),js_yaml_1=__importDefault(require(i(0x1c0))),deployer_1=require('./deployer'),validator_1=require(i(0x1ce));class CompilerService{constructor(c,d,e){const o=i;this[o(0x1b7)]=c,this['stream']=d,this[o(0x1b4)]=e;}async[i(0x1b8)](c){const p=i;try{let d;this['isPath'](c)?d=await json_schema_ref_parser_1[p(0x1c1)][p(0x1cd)](c):d=js_yaml_1['default']['load'](c);const e=new validator_1[(p(0x1d5))](d);return e[p(0x1c9)](this[p(0x1b7)]),d;}catch(f){this[p(0x1b4)]['error'](p(0x1c4),f);}}[i(0x1d4)](c){const q=i;return!c[q(0x1e2)]()[q(0x1d9)]('app:');}async['deploy'](c){const r=i;try{let d;this[r(0x1d4)](c)?(d=await json_schema_ref_parser_1[r(0x1c1)][r(0x1cd)](c),await this['saveAsJSON'](c,d)):d=js_yaml_1[r(0x1c1)][r(0x1c3)](c);const e=new validator_1['Validator'](d);e['validate'](this['store']);const f=new deployer_1[(r(0x1c2))](d);return await f['deploy'](this[r(0x1b7)],this[r(0x1d8)]),await this[r(0x1b7)]['setApp'](d[r(0x1c8)]['id'],d['app'][r(0x1b9)]),d;}catch(g){this[r(0x1b4)][r(0x1e0)](r(0x1bd),g);}}async[i(0x1d3)](c,d){const s=i;return await this[s(0x1b7)][s(0x1b5)](c,d);}async[i(0x1df)](c,d){const t=i,e=JSON['stringify'](d,null,0x2),f=path[t(0x1e3)](path['dirname'](c),t(0x1cc)+d[t(0x1c8)]['id']+'.'+d[t(0x1c8)][t(0x1b9)]+t(0x1e5));await fs['writeFile'](f,e,t(0x1e6));}}exports[i(0x1de)]=CompilerService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a(){const y=['
|
|
1
|
+
'use strict';const k=b;function a(){const y=['Mapping\x20statement\x20references\x20non-existent\x20activity:\x20','121KkeeiA','store','validateConditionalStatements','forEach','validateTransitions','from','validateStats','validateSchemas','74511KsjNKo','450505sWvjzb','includes','validateUniqueHandledTopics','SYS_VARS','$app','extractMappingStatements','632XaANHV','has','validateGraphPublishSubscribe','isMappingStatement','{$input}','8230716GzmZsn','24BWFwFk','object','endsWith','isFunction','1202eoOpyT','Validator','validateTransitionConditions','3084466qVtoOW','1033RmFUAk','activityIds','add','validateHooks','app','slice','validateReferencedActivityIds','keys','mappingStatements','activities','startsWith','validate','__esModule','Pipe','227130xpgRGo','graphs','manifest','152331OzhRqM','{$index}','getMappingStatements','split','68MtseFB','isContextVariable','{$key}','validateActivityIds','../pipe'];a=function(){return y;};return a();}(function(c,d){const j=b,e=c();while(!![]){try{const f=parseInt(j(0x91))/0x1*(parseInt(j(0x8d))/0x2)+-parseInt(j(0xa2))/0x3*(parseInt(j(0x6e))/0x4)+parseInt(j(0x7d))/0x5*(-parseInt(j(0x89))/0x6)+-parseInt(j(0x90))/0x7+parseInt(j(0x83))/0x8*(parseInt(j(0x7c))/0x9)+-parseInt(j(0x9f))/0xa*(-parseInt(j(0x74))/0xb)+parseInt(j(0x88))/0xc;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x85637));function b(c,d){const e=a();return b=function(f,g){f=f-0x6d;let h=e[f];return h;},b(c,d);}Object['defineProperty'](exports,k(0x9d),{'value':!![]}),exports[k(0x8e)]=void 0x0;const pipe_1=require(k(0x72));class Validator{constructor(c){const l=k;this[l(0xa1)]=null,this[l(0x92)]=[],this[l(0x99)]={},this[l(0x75)]=null,this['manifest']=c;}async[k(0x9c)](c){const m=k;this[m(0x75)]=c,this[m(0xa4)](),this['validateActivityIds'](),this[m(0x97)](),this['validateMappingStatements'](),this['validateTransitions'](),this[m(0x8f)](),this[m(0x7a)](),this['validateSchemas'](),this[m(0x7f)](),this[m(0x85)](),this[m(0x94)](),this[m(0x76)]();}[k(0x71)](){const n=k,c=new Set();this[n(0xa1)][n(0x95)][n(0xa0)][n(0x77)](d=>{const o=n,e=Object[o(0x98)](d[o(0x9a)]);e[o(0x77)](f=>{const p=o;if(c[p(0x84)](f))throw new Error('Duplicate\x20activity\x20id\x20found:\x20'+f);else c[p(0x93)](f);});}),this[n(0x92)]=Array[n(0x79)](c);}[k(0x86)](c){const q=k;return typeof c==='string'&&c[q(0x9b)]('{')&&c['endsWith']('}');}[k(0x82)](c,d,e){const r=k;for(const f in c){if(typeof c[f]===r(0x8a)&&c[f]!==null)this[r(0x82)](c[f],d,e);else this[r(0x86)](c[f])&&(!d[e]&&(d[e]=[]),d[e]['push'](c[f]));}}['getMappingStatements'](){const s=k,c={};this[s(0xa1)][s(0x95)][s(0xa0)]['forEach'](d=>{const t=s,e=d['activities'];for(const f in e){const g=e[f];this[t(0x82)](g,c,f);}}),this[s(0x99)]=c;}[k(0x97)](){const u=k,c=this[u(0x99)],d=this[u(0x92)];for(const e in c){const f=c[e];f[u(0x77)](g=>{const v=u;if(g[v(0x9b)]('{')&&g[v(0x8b)]('}')){const h=g[v(0x96)](0x1,-0x1)[v(0x6d)]('.'),i=h[0x0];if(!(Validator[v(0x80)][v(0x7e)](i)||d[v(0x7e)](i)||this[v(0x8c)](g)||this[v(0x6f)](g)))throw new Error(v(0x73)+g);}});}}[k(0x8c)](c){const w=k;return c[w(0x9b)]('{@')&&pipe_1[w(0x9e)]['resolveFunction'](c);}[k(0x6f)](c){const x=k;return[x(0x87),'{$output}','{$item}',x(0x70),x(0xa3)][x(0x7e)](c);}['validateMappingStatements'](){}[k(0x78)](){}['validateTransitionConditions'](){}[k(0x7a)](){}[k(0x7b)](){}['validateUniqueHandledTopics'](){}[k(0x85)](){}[k(0x94)](){}['validateConditionalStatements'](){}}exports[k(0x8e)]=Validator,Validator[k(0x80)]=[k(0x81),'$self','$graph','$job'],Validator['CONTEXT_VARS']=[k(0x87),'{$output}','{$item}',k(0x70),k(0xa3)];
|
|
@@ -40,7 +40,7 @@ class PostgresConnection extends __1.AbstractConnection {
|
|
|
40
40
|
host: options.host ?? 'unknown',
|
|
41
41
|
database: options.database ?? 'unknown',
|
|
42
42
|
port: options.port ?? 'unknown',
|
|
43
|
-
|
|
43
|
+
error,
|
|
44
44
|
});
|
|
45
45
|
throw new Error(`postgres-provider-connection-failed: ${error.message}`);
|
|
46
46
|
}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
'use strict';const q=b;(function(c,d){const o=b,e=c();while(!![]){try{const f=-parseInt(o(0x155))/0x1+-parseInt(o(0x97))/0x2*(-parseInt(o(0xa0))/0x3)+parseInt(o(0x109))/0x4*(-parseInt(o(0xac))/0x5)+parseInt(o(0xe1))/0x6*(-parseInt(o(0xd8))/0x7)+-parseInt(o(0xfd))/0x8+-parseInt(o(0xc1))/0x9+parseInt(o(0x14b))/0xa;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x1a002));function a(){const al=['getStats','499590UbcpTg','fetchAndVerifyVID','map','isPrivate','length','jobCallbacks','publishMessage','descend','StoreServiceFactory','store','../task','getSymbolValues','reporting','ExporterService','version','hasParentJob','getVID','router','bind','dad','../search/factory','pub','resolveError','1799qkNVWC','code','hasOneTimeSubscription','filterSymVals','initStreamChannel','range','interrupt','aid','substring','228xFIBcJ','join','../serializer','processStreamMessage','hook','await','now','logger','jobId','resolveGranularity','unsubscribe','readonly','type','HMSH_CODE_TIMEOUT','topic','initActivity','$self','not\x20found\x20','processWebHooks','err','add','ngn','getSchema','activity\x20type\x20','target','pubPermSubs','ENGINE','expire','507488QNscLC','parse','WEBHOOK','until','engine\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields.','stream','createInputContext','HMSH_EXPIRE_JOB_SECONDS','l2s','error','../exporter','export','220SmjJLw','getSymbols','getQueryState','../sub/factory','getStatus','no\x20app\x20found\x20for\x20id\x20','enqueueWorkItems','engine-process-end','timeout','QUORUM','../activities','resolveExpires','throttle','TRANSITION','initSubChannel','job','keys','identifyProvider','resolveQuery','scrub','../store/factory','jid','TIMEHOOK','work','addSymbolValues','reclaimCount','psubscribe','data','exporter','PENDING','sparse','reclaimDelay','punsub','engine-executable-cache','getIds','process','init','restoreHierarchy','sleepFor','SubServiceFactory','processEvent','STREAMS','sub','delistJobCallback','namespace','getApp','no\x20subscription\x20found\x20for\x20topic\x20','execAdjacentParent','defineProperty','ReporterService','verifyEngineFields','toString','apps','stack','TaskService','mintKey','StreamRole','stringify','StreamServiceFactory','status','getWorkItems','plan','emit','getSubscriptionTopic','gid','HMSH_OTT_WAIT_TIME','3482950ORiJWU','output','initSearchChannel','appId','SerializerService','EngineService','spn','initStoreChannel','StreamStatus','processWebHookEvent','166160nubCKq','publish','SUCCESS','untilVersion','consumeMessages','getHookRule','nocache','22924FEWiqI','initRouter','__esModule','getRaw','taskService','StreamDataType','../router','trc','getSettings','30zUUIuF','processTimeHooks','getPublishesTopic','../compiler','default','registerJobCallback','deploy','KeyType','engine','RESULT','cacheMode','split','5595gjEmqx','subscribe','hookTime','formatISODate','getState','cache','guid','setCacheMode','CompilerService','../../types/stream','info','engine-throttle-error','\x20for\x20app\x20version\x20','runJobCompletionTasks','metadata','unsub','SearchServiceFactory','HMSH_CODE_SUCCESS','pubsub','hookAll'];a=function(){return al;};return a();}function b(c,d){const e=a();return b=function(f,g){f=f-0x96;let h=e[f];return h;},b(c,d);}var __importDefault=this&&this['__importDefault']||function(c){const p=b;return c&&c[p(0x99)]?c:{'default':c};};Object[q(0x139)](exports,q(0x99),{'value':!![]}),exports[q(0x150)]=void 0x0;const key_1=require('../../modules/key'),enums_1=require('../../modules/enums'),utils_1=require('../../modules/utils'),activities_1=__importDefault(require(q(0x113))),compiler_1=require(q(0xa3)),exporter_1=require(q(0x107)),reporter_1=require('../reporter'),router_1=require(q(0x9d)),serializer_1=require(q(0xe3)),factory_1=require(q(0xd5)),factory_2=require(q(0x11d)),factory_3=require('../stream/factory'),factory_4=require(q(0x10c)),task_1=require(q(0xcb)),stream_1=require(q(0xb5));class EngineService{constructor(){const r=q;this[r(0xaa)]=r(0xb1),this[r(0x158)]=null,this[r(0xc6)]={},this[r(0xcd)]=![],this[r(0xe9)]=0x1;}static async[q(0x12d)](c,d,e,f,g){const s=q;if(f[s(0xa8)]){const h=new EngineService();h['verifyEngineFields'](f),h[s(0x135)]=c,h['appId']=d,h[s(0xb2)]=e,h[s(0xe8)]=g,await h[s(0x14d)](f[s(0xa8)][s(0xca)]),await h[s(0x152)](f['engine'][s(0xca)]),await h[s(0x117)](f[s(0xa8)][s(0x133)],f[s(0xa8)]['pub']??f['engine']['store']),await h[s(0xdc)](f['engine'][s(0x102)],f[s(0xa8)][s(0xca)]),h['router']=await h[s(0x98)](f);const i=h[s(0xca)][s(0x140)](key_1[s(0xa7)][s(0x132)],{'appId':h[s(0x14e)]});return h['router'][s(0x159)](i,s(0xfb),h['guid'],h[s(0xe4)][s(0xd3)](h)),h[s(0x9b)]=new task_1[(s(0x13f))](h[s(0xca)],g),h[s(0x125)]=new exporter_1[(s(0xce))](h[s(0x14e)],h[s(0xca)],g),h['inited']=(0x0,utils_1[s(0xaf)])(new Date()),h;}}[q(0x13b)](c){const t=q;if(!(0x0,utils_1[t(0x11a)])(c[t(0xa8)][t(0xca)])||!(0x0,utils_1[t(0x11a)])(c[t(0xa8)][t(0x102)])||!(0x0,utils_1[t(0x11a)])(c['engine'][t(0x133)]))throw new Error(t(0x101));}async[q(0x14d)](c,d){const u=q;this['search']=await factory_1[u(0xbc)][u(0x12d)](c,d,this[u(0x135)],this[u(0x14e)],this[u(0xe8)]);}async['initStoreChannel'](c){const v=q;this['store']=await factory_2[v(0xc9)]['init'](c,this[v(0x135)],this['appId'],this['logger']);}async[q(0x117)](c,d){const w=q;this[w(0xad)]=await factory_4[w(0x130)]['init'](c,d,this[w(0x135)],this[w(0x14e)],this[w(0xb2)],this[w(0xe8)]);}async['initStreamChannel'](c,d){const x=q;this[x(0x102)]=await factory_3[x(0x143)][x(0x12d)](c,d,this[x(0x135)],this['appId'],this['logger']);}async[q(0x98)](c){const y=q,d=await this[y(0xca)]['getThrottleRate'](':');return new router_1['Router']({'namespace':this[y(0x135)],'appId':this['appId'],'guid':this[y(0xb2)],'role':stream_1[y(0x141)][y(0xfb)],'reclaimDelay':c[y(0xa8)][y(0x128)],'reclaimCount':c['engine'][y(0x122)],'throttle':d,'readonly':c[y(0xa8)][y(0xec)]},this['stream'],this[y(0xe8)]);}async[q(0xc2)](c,d=0x0){const z=q;if(isNaN(Number(c[z(0xcf)]))){const e=await this[z(0xca)][z(0x136)](c['id'],!![]);if(!isNaN(Number(e['version']))){if(!this[z(0x13d)])this[z(0x13d)]={};return this[z(0x13d)][c['id']]=e,{'id':c['id'],'version':e['version']};}else{if(d<0xa)return await(0x0,utils_1[z(0x12f)])(enums_1['HMSH_QUORUM_DELAY_MS']*0x2),await this[z(0xc2)](c,d+0x1);else this[z(0xe8)][z(0x106)]('engine-vid-resolution-error',{'id':c['id'],'guid':this[z(0xb2)]});}}return c;}async['getVID'](c){const A=q;if(this['cacheMode']===A(0x96)){const d=await this['store'][A(0x136)](this[A(0x14e)],!![]);if(d[A(0xcf)][A(0x13c)]()===this[A(0x158)][A(0x13c)]()){if(!this[A(0x13d)])this[A(0x13d)]={};this['apps'][this['appId']]=d,this['setCacheMode'](A(0xb1),d[A(0xcf)][A(0x13c)]());}return{'id':this[A(0x14e)],'version':d['version']};}else return!this['apps']&&c?(this[A(0x13d)]={},this[A(0x13d)][this['appId']]=c,c):await this['fetchAndVerifyVID']({'id':this[A(0x14e)],'version':this[A(0x13d)]?.[this[A(0x14e)]][A(0xcf)]});}[q(0xb3)](c,d){const B=q;this[B(0xe8)][B(0xb6)](B(0x12a),{'mode':c,[c===B(0xb1)?B(0xf9):B(0x100)]:d}),this[B(0xaa)]=c,this[B(0x158)]=d;}async['routeToSubscribers'](c,d){const C=q,e=this[C(0xc6)][d[C(0xba)][C(0x11e)]];e&&(this[C(0x134)](d[C(0xba)][C(0x11e)]),e(c,d));}async[q(0xf3)](){const D=q;this[D(0x9b)][D(0xf3)](this['hook'][D(0xd3)](this));}async[q(0xa1)](){const E=q;this[E(0x9b)]['processTimeHooks'](this[E(0xae)]['bind'](this));}async[q(0x115)](c){const F=q;try{this['router']?.['setThrottle'](c);}catch(d){this[F(0xe8)]['error'](F(0xb7),{'error':d});}}async['initActivity'](c,d={},e){const G=q,[f,g]=await this[G(0xf7)](c),h=activities_1[G(0xa4)][g[G(0xed)]];if(h){const i=(0x0,utils_1[G(0xaf)])(new Date()),j={'aid':f,'atp':g[G(0xed)],'stp':g['subtype'],'ac':i,'au':i},k=null;return new h(g,d,j,k,this,e);}else throw new Error(G(0xf8)+g[G(0xed)]+'\x20not\x20found');}async[q(0xf7)](c){const H=q,d=await this[H(0xca)]['getApp'](this[H(0x14e)]);if(!d)throw new Error(H(0x10e)+this[H(0x14e)]);if(this[H(0xc4)](c)){const e=c[H(0xe0)](0x1),f=await this[H(0xca)][H(0xf7)](e,await this['getVID'](d));return[e,f];}else{const g=await this[H(0xca)]['getSubscription'](c,await this[H(0xd1)](d));if(g){const h=await this[H(0xca)]['getSchema'](g,await this[H(0xd1)](d));return[g,h];}}throw new Error(H(0x137)+c+'\x20in\x20app\x20'+this[H(0x14e)]+H(0xb8)+d[H(0xcf)]);}async[q(0x9f)](){const I=q;return await this[I(0xca)][I(0x9f)]();}[q(0xc4)](c){return c['startsWith']('.');}async[q(0x146)](c){const J=q,d=new compiler_1[(J(0xb4))](this[J(0xca)],this[J(0x102)],this[J(0xe8)]);return await d[J(0x146)](c);}async['deploy'](c){const K=q,d=new compiler_1[(K(0xb4))](this[K(0xca)],this[K(0x102)],this[K(0xe8)]);return await d[K(0xa6)](c);}async[q(0xc0)](c,d){const L=q,{id:e,version:f}=await this[L(0xd1)](),g=new reporter_1[(L(0x13a))]({'id':e,'version':f},this[L(0xca)],this['logger']),h=await this[L(0x11b)](c,d);return await g['getStats'](h);}async[q(0x12b)](c,d,e=[]){const M=q,{id:f,version:g}=await this['getVID'](),h=new reporter_1[(M(0x13a))]({'id':f,'version':g},this[M(0xca)],this[M(0xe8)]),i=await this[M(0x11b)](c,d);return await h[M(0x12b)](i,e);}async[q(0x11b)](c,d){const N=q,e=await this[N(0xf0)](c,d[N(0x124)]);return await e[N(0xb0)](),{'end':d['end'],'start':d['start'],'range':d[N(0xdd)],'granularity':e[N(0xea)](),'key':e['resolveJobKey'](e[N(0x103)]()),'sparse':d[N(0x127)]};}async[q(0xe4)](c){const O=q;this[O(0xe8)]['debug']('engine-process',{'jid':c[O(0xba)][O(0x11e)],'gid':c[O(0xba)][O(0x149)],'dad':c[O(0xba)]['dad'],'aid':c[O(0xba)]['aid'],'status':c[O(0x144)]||stream_1['StreamStatus'][O(0x157)],'code':c[O(0xd9)]||0xc8,'type':c['type']});const d={'metadata':{'guid':c[O(0xba)][O(0xb2)],'jid':c[O(0xba)][O(0x11e)],'gid':c[O(0xba)]['gid'],'dad':c['metadata']['dad'],'aid':c[O(0xba)]['aid']},'data':c[O(0x124)]};if(c[O(0xed)]===stream_1[O(0x9c)][O(0x11f)]){const e=await this[O(0xf0)]('.'+c[O(0xba)][O(0xdf)],d['data'],d);await e['processTimeHookEvent'](c['metadata'][O(0x11e)]);}else{if(c[O(0xed)]===stream_1['StreamDataType'][O(0xff)]){const f=await this[O(0xf0)]('.'+c['metadata'][O(0xdf)],d['data'],d);await f[O(0x154)](c[O(0x144)],c[O(0xd9)]);}else{if(c[O(0xed)]===stream_1['StreamDataType'][O(0x116)]){const g=await this[O(0xf0)]('.'+c[O(0xba)]['aid'],d[O(0x124)],d);await g[O(0x12c)]();}else{if(c['type']===stream_1[O(0x9c)]['AWAIT']){d[O(0xba)]={...d[O(0xba)],'pj':c[O(0xba)]['jid'],'pg':c[O(0xba)][O(0x149)],'pd':c[O(0xba)][O(0xd4)],'pa':c[O(0xba)][O(0xdf)],'px':c[O(0xba)][O(0xe6)]===![],'trc':c[O(0xba)][O(0x9e)],'spn':c['metadata'][O(0x151)]};const h=await this['initActivity'](c[O(0xba)][O(0xef)],c['data'],d);await h[O(0x12c)]();}else{if(c[O(0xed)]===stream_1[O(0x9c)]['RESULT']){const i=await this[O(0xf0)]('.'+d['metadata'][O(0xdf)],c['data'],d);await i[O(0x131)](c[O(0x144)],c['code']);}else{const j=await this[O(0xf0)]('.'+c['metadata'][O(0xdf)],c[O(0x124)],d);await j[O(0x131)](c[O(0x144)],c[O(0xd9)],O(0x14c));}}}}}this[O(0xe8)]['debug'](O(0x110),{'jid':c[O(0xba)][O(0x11e)],'gid':c[O(0xba)][O(0x149)],'aid':c[O(0xba)][O(0xdf)]});}async['execAdjacentParent'](c,d,e=![]){const P=q;if(this[P(0xd0)](c)){const f=this[P(0xd7)](d[P(0xba)]),g=c[P(0xf1)]?.[P(0x14c)]?.[P(0xba)]?.[P(0x105)]||c[P(0xf1)]?.[P(0x14c)]?.[P(0xba)]?.['l1s'],h={'metadata':{'guid':(0x0,utils_1[P(0xb2)])(),'jid':c[P(0xba)]['pj'],'gid':c[P(0xba)]['pg'],'dad':c['metadata']['pd'],'aid':c[P(0xba)]['pa'],'trc':c[P(0xba)]['trc'],'spn':g},'type':stream_1[P(0x9c)][P(0xa9)],'data':d[P(0x124)]};if(f&&f[P(0xd9)])h[P(0x144)]=stream_1['StreamStatus']['ERROR'],h[P(0x124)]=f,h[P(0xd9)]=f[P(0xd9)],h[P(0x13e)]=f[P(0x13e)];else e?(h[P(0x144)]=stream_1['StreamStatus'][P(0x126)],h[P(0xd9)]=enums_1['HMSH_CODE_PENDING']):(h[P(0x144)]=stream_1[P(0x153)][P(0x157)],h[P(0xd9)]=enums_1[P(0xbd)]);return await this[P(0xd2)]?.[P(0xc7)](null,h);}}[q(0xd0)](c,d=![]){const Q=q;if(d)return Boolean(c[Q(0xba)]['pj']&&c[Q(0xba)]['pa']&&!c['metadata']['px']);return Boolean(c[Q(0xba)]['pj']&&c[Q(0xba)]['pa']);}[q(0xd7)](c){const R=q;if(c&&c[R(0xf4)])return JSON[R(0xfe)](c[R(0xf4)]);}async[q(0xde)](c,d,e={}){const S=q;await this[S(0xca)][S(0xde)](c,d,e);const f=await this[S(0xb0)](c,d),g={'interrupt':e[S(0xc8)],'expire':e[S(0xfc)]};return await this[S(0xb9)](f,g);}async[q(0x11c)](c){await this['store']['scrub'](c);}async[q(0xe5)](c,d,e=stream_1['StreamStatus']['SUCCESS'],f=0xc8){const T=q,g=await this[T(0x9b)][T(0x15a)](c),[h]=await this['getSchema']('.'+g['to']),i={'type':stream_1[T(0x9c)][T(0xff)],'status':e,'code':f,'metadata':{'guid':(0x0,utils_1['guid'])(),'aid':h,'topic':c},'data':d};return await this[T(0xd2)]?.[T(0xc7)](null,i);}async[q(0xae)](c,d,e,f){const U=q;if(f==='interrupt'||f==='expire')return await this[U(0xde)](e,c,{'suppress':!![],'expire':0x1});const [g,...h]=e[U(0xab)](','),i=','+h[U(0xe2)](','),j={'type':stream_1['StreamDataType']['TIMEHOOK'],'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':c,'gid':d,'dad':i,'aid':g},'data':{'timestamp':Date[U(0xe7)]()}};await this[U(0xd2)]?.[U(0xc7)](null,j);}async[q(0xbf)](c,d,e,f=[]){const V=q,g=await this['getVID'](),h=await this[V(0x9b)]['getHookRule'](c);if(h){const i=await(0x0,utils_1[V(0x148)])(h['to'],this[V(0xca)],g),j=await this[V(0x11b)](i,e),k=new reporter_1[(V(0x13a))](g,this['store'],this[V(0xe8)]),l=await k[V(0x145)](j,f);if(l['length']){const m=new task_1[(V(0x13f))](this[V(0xca)],this[V(0xe8)]);await m[V(0x10f)](l[V(0xc3)](n=>[c,n,e[V(0x11c)]||![],JSON[V(0x142)](d)][V(0xe2)](key_1['VALSEP']))),this['subscribe'][V(0x156)](key_1['KeyType'][V(0x112)],{'type':V(0x120),'originator':this[V(0xb2)]},this[V(0x14e)]);}return l;}else throw new Error('unable\x20to\x20find\x20hook\x20rule\x20for\x20topic\x20'+c);}async[q(0xd6)](c,d,e,f){const W=q,g=await this[W(0xf0)](c,d,e);if(g)return await g[W(0x12c)](f);else throw new Error('unable\x20to\x20process\x20activity\x20for\x20topic\x20'+c);}async[q(0x133)](c,d){const Y=q,e=async(f,g)=>{const X=b;d(g[X(0xef)],g['job']);};return await this[Y(0xad)][Y(0xad)](key_1['KeyType'][Y(0x112)],e,this['appId'],c);}async[q(0xbb)](c){const Z=q;return await this['subscribe'][Z(0xeb)](key_1[Z(0xa7)][Z(0x112)],this[Z(0x14e)],c);}async['psub'](c,d){const a1=q,e=async(f,g)=>{const a0=b;d(g[a0(0xef)],g['job']);};return await this[a1(0xad)][a1(0x123)](key_1[a1(0xa7)][a1(0x112)],e,this[a1(0x14e)],c);}async[q(0x129)](c){const a2=q;return await this[a2(0xad)]['punsubscribe'](key_1['KeyType'][a2(0x112)],this[a2(0x14e)],c);}async[q(0xbe)](c,d,e,f=enums_1[q(0x14a)]){const a3=q;e={'metadata':{'ngn':this[a3(0xb2)],'trc':e?.[a3(0xba)]?.[a3(0x9e)],'spn':e?.['metadata']?.[a3(0x151)]}};const g=await this['pub'](c,d,e);return new Promise((h,i)=>{const a4=a3;this[a4(0xa5)](g,(j,k)=>{const a5=a4;if(k['metadata']['err']){const l=JSON[a5(0xfe)](k[a5(0xba)][a5(0xf4)]);i({'error':l,'job_id':k[a5(0xba)][a5(0x11e)]});}else h(k);}),setTimeout(()=>{const a6=a4;this[a6(0x134)](g),i({'code':enums_1[a6(0xee)],'message':a6(0x111),'job_id':g});},f);});}async['pubOneTimeSubs'](c,d,e=![]){const a7=q;if(this[a7(0xda)](c)){const f={'type':a7(0x118),'topic':c[a7(0xba)][a7(0x11e)],'job':(0x0,utils_1[a7(0x12e)])(d)};this['subscribe'][a7(0x156)](key_1[a7(0xa7)]['QUORUM'],f,this[a7(0x14e)],c[a7(0xba)][a7(0xf6)]);}}async[q(0xa2)](c){const a8=q,d=await this['getVID'](),e=c['metadata'][a8(0xdf)]||c[a8(0xf1)]?.[a8(0x14c)]?.['metadata']?.[a8(0xdf)],f=await this['store']['getSchema'](e,d);return f['publishes'];}async[q(0xfa)](c,d,e=![]){const a9=q,f=await this[a9(0xa2)](c);if(f){const g={'type':a9(0x118),'topic':f,'job':(0x0,utils_1[a9(0x12e)])(d)};this['subscribe']['publish'](key_1[a9(0xa7)][a9(0x112)],g,this[a9(0x14e)],f+'.'+c[a9(0xba)][a9(0x11e)]);}}async[q(0xf5)](c){const aa=q;return await this[aa(0xd2)]?.['publishMessage'](null,c);}[q(0xa5)](c,d){const ab=q;this[ab(0xc6)][c]=d;}[q(0x134)](c){const ac=q;delete this[ac(0xc6)][c];}['hasOneTimeSubscription'](c){return Boolean(c['metadata']['ngn']);}async[q(0xb9)](c,d={}){const ad=q,e=this['hasParentJob'](c,!![]),f=this['hasOneTimeSubscription'](c),g=await this[ad(0xa2)](c);let h;if(e||f||g){const i=await this['getState'](c[ad(0xba)]['tpc'],c[ad(0xba)][ad(0x11e)]);h=await this[ad(0x138)](c,i,d[ad(0x147)]),this['pubOneTimeSubs'](c,i,d['emit']),this[ad(0xfa)](c,i,d[ad(0x147)]);}return!d[ad(0x147)]&&this[ad(0x9b)]['registerJobForCleanup'](c[ad(0xba)][ad(0x11e)],this['resolveExpires'](c,d),d),h;}[q(0x114)](c,d){const ae=q;return d[ae(0xfc)]??c[ae(0xba)][ae(0xfc)]??enums_1[ae(0x104)];}async[q(0x108)](c){const af=q;return await this[af(0x125)][af(0x108)](c);}async[q(0x9a)](c){const ag=q;return await this[ag(0xca)][ag(0x9a)](c);}async[q(0x10d)](c){const ah=q,{id:d}=await this[ah(0xd1)]();return await this[ah(0xca)][ah(0x10d)](c,d);}async[q(0xb0)](c,d){const ai=q,e=await this['store'][ai(0x10a)]('$'+c),f={['$'+c]:Object[ai(0x119)](e)},g={},h=await this[ai(0xca)]['getState'](d,f,g);if(!h)throw new Error(ai(0xf2)+d);const [i,j]=h,k=(0x0,utils_1[ai(0x12e)])(i);return j&&k[ai(0xba)]&&(k[ai(0xba)]['js']=j),k;}async[q(0x10b)](c,d){const aj=q;return await this['store'][aj(0x10b)](c,d);}async['compress'](c){const ak=q,d=await this['store'][ak(0xcc)](),e=Object[ak(0x119)](d)[ak(0xc5)],f=Math['pow'](0x34,0x2)-0x1,g=serializer_1[ak(0x14f)][ak(0xdb)](e,f,d,new Set(c));return await this[ak(0xca)][ak(0x121)](g);}}exports[q(0x150)]=EngineService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a(){const
|
|
1
|
+
'use strict';function a(){const H=['1444876sAMeki','map','218898sShbUx','match','ExporterService','2064090DegKAJ','store','inflateKey','inflate','export','862928yytnHv','hook','split','fromString','inflateDependencyData','VALSEP','61Nipiip','8600zupupY','12929517gyYFoF','symbols','SerializerService','other','../../modules/utils','join','../../modules/key','../serializer','appId','replace','restoreHierarchy','getAllSymbols','__esModule','973406QWPHIy','6jXCHZO'];a=function(){return H;};return a();}const z=b;function b(c,d){const e=a();return b=function(f,g){f=f-0xb9;let h=e[f];return h;},b(c,d);}(function(c,d){const y=b,e=c();while(!![]){try{const f=-parseInt(y(0xd1))/0x1*(-parseInt(y(0xd2))/0x2)+parseInt(y(0xc0))/0x3*(-parseInt(y(0xc1))/0x4)+-parseInt(y(0xc6))/0x5+parseInt(y(0xc3))/0x6+-parseInt(y(0xbf))/0x7+parseInt(y(0xcb))/0x8+parseInt(y(0xd3))/0x9;if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x8ae74));Object['defineProperty'](exports,z(0xbe),{'value':!![]}),exports[z(0xc5)]=void 0x0;const key_1=require(z(0xd9)),utils_1=require(z(0xd7)),serializer_1=require(z(0xb9));class ExporterService{constructor(c,d,e){const A=z;this[A(0xba)]=c,this['logger']=e,this['store']=d;}async[z(0xca)](c,d={}){const B=z;!this[B(0xd4)]&&(this[B(0xd4)]=this[B(0xc7)][B(0xbd)](),this[B(0xd4)]=await this[B(0xd4)]);const e=[],f=await this[B(0xc7)]['getRaw'](c),g=this[B(0xc9)](f,e);return g;}['inflateKey'](c){const C=z;return c in this['symbols']?this[C(0xd4)][c]:c;}[z(0xc9)](c,d){const E=z,e={'hooks':{},'main':{'cursor':-0x1,'items':[]}},f={},g=this['inflateDependencyData'](d,e),h=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object['entries'](c)['forEach'](([i,j])=>{const D=b,k=i['match'](h);if(k){const [l,m,n]=k,o=this[D(0xc8)](m),p=''+n[D(0xbb)](/,/g,'/'),q=serializer_1[D(0xd5)][D(0xce)](j);f[p+'/'+o]=q;}else i['length']===0x3&&(f[this['inflateKey'](i)]=serializer_1[D(0xd5)][D(0xce)](j));}),{'dependencies':g,'process':(0x0,utils_1[E(0xbc)])(f),'status':c[':']};}[z(0xcf)](c,d){const F=z,e=/([0-9,]+)-(\d+)$/,f=/-(\d+)$/;return c[F(0xc2)]((g,h)=>{const G=F,[i,j,k,l,...m]=g[G(0xcd)](key_1['VALSEP']),n=m[G(0xd8)](key_1[G(0xd0)]),o=n[G(0xc4)](e);let p,q,r='';if(o){const [s,t,u]=o;r=t[G(0xcd)](',')[G(0xd8)]('/'),p=r+'['+u+']',q=G(0xcc);}else{const v=n[G(0xc4)](f);if(v){const [w,x]=v;p='['+x+']',q='flow';}else p='/',q=G(0xd6);}return{'type':i,'topic':j,'gid':k,'jid':n};});}}exports[z(0xc5)]=ExporterService;
|
|
@@ -12,6 +12,5 @@ declare class LoggerService implements ILogger {
|
|
|
12
12
|
error(message: string, ...meta: any[]): void;
|
|
13
13
|
warn(message: string, ...meta: any[]): void;
|
|
14
14
|
debug(message: string, ...meta: any[]): void;
|
|
15
|
-
tagify(obj: Record<string, unknown>): string;
|
|
16
15
|
}
|
|
17
16
|
export { LoggerService, ILogger };
|
|
@@ -11,20 +11,30 @@ class LoggerService {
|
|
|
11
11
|
this.logger = customLogger || this.createDefaultLogger();
|
|
12
12
|
}
|
|
13
13
|
createDefaultLogger() {
|
|
14
|
+
const errorFormat = (0, winston_1.format)((info) => {
|
|
15
|
+
if (info.error instanceof Error) {
|
|
16
|
+
return {
|
|
17
|
+
...info,
|
|
18
|
+
error: {
|
|
19
|
+
message: info.error.message,
|
|
20
|
+
stack: info.error.stack,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return info;
|
|
25
|
+
});
|
|
14
26
|
return (0, winston_1.createLogger)({
|
|
15
27
|
level: this.logLevel,
|
|
16
|
-
format: winston_1.format.combine(winston_1.format.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (splatSymbol) {
|
|
22
|
-
splatData = info[splatSymbol][0] || {};
|
|
23
|
-
}
|
|
24
|
-
const tags = this.tagify(splatData);
|
|
25
|
-
return `${timestamp} [${level}] [${this.name || this.appId}:${this.instanceId}] ${message} ${tags}`;
|
|
26
|
-
})),
|
|
28
|
+
format: winston_1.format.combine(winston_1.format.timestamp(), winston_1.format.errors({ stack: true }), errorFormat(), (0, winston_1.format)((info) => {
|
|
29
|
+
info.ts = info.timestamp;
|
|
30
|
+
delete info.timestamp;
|
|
31
|
+
return info;
|
|
32
|
+
})(), winston_1.format.json()),
|
|
27
33
|
transports: [new winston_1.transports.Console()],
|
|
34
|
+
defaultMeta: {
|
|
35
|
+
app: this.name || this.appId,
|
|
36
|
+
id: this.instanceId,
|
|
37
|
+
},
|
|
28
38
|
});
|
|
29
39
|
}
|
|
30
40
|
info(message, ...meta) {
|
|
@@ -39,33 +49,5 @@ class LoggerService {
|
|
|
39
49
|
debug(message, ...meta) {
|
|
40
50
|
this.logger.debug(message, ...meta);
|
|
41
51
|
}
|
|
42
|
-
tagify(obj) {
|
|
43
|
-
if (!obj) {
|
|
44
|
-
return '';
|
|
45
|
-
}
|
|
46
|
-
const tags = [];
|
|
47
|
-
try {
|
|
48
|
-
Object.entries(obj).forEach(([key, val]) => {
|
|
49
|
-
let value = val;
|
|
50
|
-
if (typeof val === 'function') {
|
|
51
|
-
val = val();
|
|
52
|
-
}
|
|
53
|
-
if (val instanceof Date) {
|
|
54
|
-
value = val.toISOString();
|
|
55
|
-
}
|
|
56
|
-
else if (typeof val === 'object' && val !== null) {
|
|
57
|
-
value = JSON.stringify(val);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
value = value ? value.toString() : value;
|
|
61
|
-
}
|
|
62
|
-
tags.push(`${key}:${value}`);
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
catch (err) {
|
|
66
|
-
this.error('tagify-error', err);
|
|
67
|
-
}
|
|
68
|
-
return tags.join(' ');
|
|
69
|
-
}
|
|
70
52
|
}
|
|
71
53
|
exports.LoggerService = LoggerService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';const m=b;(function(c,d){const l=b,e=c();while(!![]){try{const f=-parseInt(l(0x1b5))/0x1*(parseInt(l(0x1aa))/0x2)+parseInt(l(0x1c0))/0x3*(parseInt(l(0x1be))/0x4)+-parseInt(l(0x1c1))/0x5*(parseInt(l(0x1ae))/0x6)+parseInt(l(0x1a8))/0x7*(-parseInt(l(0x1a3))/0x8)+parseInt(l(0x1ab))/0x9+-parseInt(l(0x1c3))/0xa+parseInt(l(0x1ac))/0xb*(-parseInt(l(0x1a6))/0xc);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0xc5b2b));Object[m(0x1bc)](exports,'__esModule',{'value':!![]}),exports[m(0x1af)]=void 0x0;function b(c,d){const e=a();return b=function(f,g){f=f-0x1a3;let h=e[f];return h;},b(c,d);}const pipe_1=require(m(0x1bd));class MapperService{constructor(c,d){const n=m;this[n(0x1a9)]=c,this[n(0x1a7)]=d;}['mapRules'](){const o=m;return this[o(0x1b0)](this[o(0x1a9)]);}[m(0x1b0)](c){const p=m;if(typeof c===p(0x1b7)&&'@pipe'in c)return this[p(0x1b6)](c[p(0x1b9)]);if(typeof c==='object'&&c!==null){const d={};for(const e in c){Object[p(0x1ad)][p(0x1bb)][p(0x1b3)](c,e)&&(d[e]=this['traverseRules'](c[e]));}return d;}else return this[p(0x1c4)](c);}[m(0x1b6)](c){const q=m,d=new pipe_1[(q(0x1b1))](c,this[q(0x1a7)]);return d[q(0x1b8)]();}[m(0x1c4)](c){const r=m,d=new pipe_1[(r(0x1b1))]([[c]],this[r(0x1a7)]);return d['process']();}static['evaluate'](c,d,e){const s=m;if(typeof c===s(0x1a5))return c;if(Array[s(0x1a4)](c[s(0x1bf)])&&c['code'][s(0x1c2)](e||0xc8)||e[s(0x1b4)]()===(c[s(0x1bf)]||0xc8)['toString']()){if(!c[s(0x1ba)])return!![];const f=c['gate']==='or';let g=!![],h=![];return c[s(0x1ba)][s(0x1b2)](({expected:i,actual:j})=>{const t=s;if(f&&!h||!f&&g){const k=pipe_1[t(0x1b1)][t(0x1c4)](j,d)===i;if(f&&k)h=!![];else!f&&!k&&(g=![]);}}),f?h:g;}return![];}}exports[m(0x1af)]=MapperService;function a(){const u=['pipe','object','process','@pipe','match','hasOwnProperty','defineProperty','../pipe','6260YXmXWP','code','2649KSYXjx','20mfVaTc','includes','2238430BrBdwZ','resolve','8AqrhCK','isArray','boolean','936GaQaUK','data','7023037pYtTCf','rules','24kngJyd','10430964DYFDVl','11627YJvNlz','prototype','88314ItpJyh','MapperService','traverseRules','Pipe','forEach','call','toString','30222nrGdve'];a=function(){return u;};return a();}
|
|
@@ -44,7 +44,7 @@ class MeshCall {
|
|
|
44
44
|
}
|
|
45
45
|
catch (error) {
|
|
46
46
|
hotMesh.engine.logger.error('meshcall-client-activate-err', {
|
|
47
|
-
|
|
47
|
+
error,
|
|
48
48
|
});
|
|
49
49
|
throw error;
|
|
50
50
|
}
|
|
@@ -56,7 +56,7 @@ class MeshCall {
|
|
|
56
56
|
}
|
|
57
57
|
catch (error) {
|
|
58
58
|
hotMesh.engine.logger.error('meshcall-client-deploy-activate-err', {
|
|
59
|
-
|
|
59
|
+
error,
|
|
60
60
|
});
|
|
61
61
|
throw error;
|
|
62
62
|
}
|
|
@@ -112,7 +112,7 @@ class ClientService {
|
|
|
112
112
|
}
|
|
113
113
|
catch (error) {
|
|
114
114
|
hotMeshClient.engine.logger.error('meshflow-client-search-err', {
|
|
115
|
-
|
|
115
|
+
error,
|
|
116
116
|
});
|
|
117
117
|
throw error;
|
|
118
118
|
}
|
|
@@ -162,7 +162,7 @@ class ClientService {
|
|
|
162
162
|
}
|
|
163
163
|
catch (error) {
|
|
164
164
|
hotMesh.engine.logger.error('meshflow-client-activate-err', {
|
|
165
|
-
|
|
165
|
+
error,
|
|
166
166
|
});
|
|
167
167
|
throw error;
|
|
168
168
|
}
|
|
@@ -174,7 +174,7 @@ class ClientService {
|
|
|
174
174
|
}
|
|
175
175
|
catch (error) {
|
|
176
176
|
hotMesh.engine.logger.error('meshflow-client-deploy-activate-err', {
|
|
177
|
-
|
|
177
|
+
error,
|
|
178
178
|
});
|
|
179
179
|
throw error;
|
|
180
180
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const q=b;(function(c,d){const p=b,e=c();while(!![]){try{const f=parseInt(p(
|
|
1
|
+
'use strict';const q=b;(function(c,d){const p=b,e=c();while(!![]){try{const f=parseInt(p(0x1af))/0x1+-parseInt(p(0x1c1))/0x2+parseInt(p(0x1c8))/0x3*(-parseInt(p(0x1ab))/0x4)+-parseInt(p(0x1b8))/0x5*(-parseInt(p(0x1bf))/0x6)+-parseInt(p(0x19d))/0x7+parseInt(p(0x1b6))/0x8+parseInt(p(0x1a2))/0x9*(parseInt(p(0x1c7))/0xa);if(f===d)break;else e['push'](e['shift']());}catch(g){e['push'](e['shift']());}}}(a,0x37581));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[q(0x1c9)]=void 0x0;const utils_1=require(q(0x1bd)),serializer_1=require(q(0x19f));function a(){const D=['$error','inflateKey','data','869280llattM','/output/metadata/au','16955geKZae','created','fromString','values','push','../../modules/utils','localeCompare','420DtrYXT','forEach','1832xRjavI','endsWith','symbols','block','keyToObject','sort','80hwlPym','279oQmePq','ExporterService','join','appId','inflateTransition','getAllSymbols','SerializerService','export','split','match','2851814hpHWoI','entries','../serializer','logger','getRaw','445725pWvNWx','length','sortEntriesByCreated','updated','has','sortParts','startsWith','store','restoreHierarchy','11860ECQCjR','/output/metadata/ac','object','inflate','168522eecyWn','filterFields','substring','allow'];a=function(){return D;};return a();}function b(c,d){const e=a();return b=function(f,g){f=f-0x198;let h=e[f];return h;},b(c,d);}class ExporterService{constructor(c,d,e){const r=q;this[r(0x1cb)]=c,this[r(0x1a0)]=e,this[r(0x1a9)]=d;}async[q(0x19a)](c,d={}){const s=q;if(!ExporterService[s(0x1c3)][s(0x1a6)](this[s(0x1cb)])){const g=this[s(0x1a9)][s(0x198)]();ExporterService[s(0x1c3)]['set'](this[s(0x1cb)],await g);}const e=await this[s(0x1a9)][s(0x1a1)](c),f=this['inflate'](e,d);return f;}[q(0x1ae)](c,d){const t=q,e=[],f={},g={},h={},i=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object[t(0x19e)](c)[t(0x1c0)](([j,k])=>{const u=t,l=j[u(0x19c)](i);if(l)this[u(0x1cc)](l,k,h);else{if(j['startsWith']('_'))g[j[u(0x1b1)](0x1)]=k;else{if(j[u(0x1a8)]('-')){const m=this[u(0x1c5)](j);e[u(0x1bc)]({...m,'key':j,'value':this['resolveValue'](k,d[u(0x1bb)])});}else j['length']===0x3&&(f[this[u(0x1b4)](j)]=serializer_1[u(0x199)][u(0x1ba)](k));}}}),this[t(0x1b0)]({'data':(0x0,utils_1[t(0x1aa)])(g),'state':Object[t(0x19e)]((0x0,utils_1[t(0x1aa)])(f))[0x0][0x1],'status':parseInt(c[':'],0xa),'timeline':this[t(0x1a7)](e),'transitions':this['sortEntriesByCreated'](h)},d[t(0x1c4)],d[t(0x1b2)]);}['resolveValue'](c,d){const v=q,e=serializer_1[v(0x199)]['fromString'](c);if(d!==![])return e;return e&&typeof e===v(0x1ad)&&(v(0x1b5)in e&&(e['data']={}),v(0x1b3)in e&&(e['$error']={})),e;}['inflateKey'](c){const w=q,d=ExporterService[w(0x1c3)]['get'](this[w(0x1cb)]);if(c in d){const e=d[c],f=e['split']('/');return f[w(0x1ca)]('/');}return c;}[q(0x1b0)](c,d=[],e=[]){const x=q;let f={};return e&&e[x(0x1a3)]>0x0?e[x(0x1c0)](g=>{g in c&&(f[g]=c[g]);}):f={...c},d&&d[x(0x1a3)]>0x0&&d[x(0x1c0)](g=>{g in f&&delete f[g];}),f;}[q(0x1cc)](c,d,e){const y=q,[f,g,h]=c,i=this[y(0x1b4)](g),j=i['split']('/'),k=j[0x0],l=i['endsWith'](y(0x1ac)),m=i[y(0x1c2)](y(0x1b7));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?'created':y(0x1a5)]=d;}}[q(0x1a4)](c){const z=q,d=Object[z(0x1bb)](c);return d[z(0x1c6)]((e,f)=>{const A=z;return(e[A(0x1b9)]||e[A(0x1a5)])[A(0x1be)](f['created']||f[A(0x1a5)]);}),d;}[q(0x1c5)](c){function d(f){const B=b,g=f[B(0x19b)](',');if(g['length']>0x1)return g['shift'](),g[B(0x1ca)](',');}const e=c['split']('-');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 C=q;return c[C(0x1c6)]((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;});}}exports[q(0x1c9)]=ExporterService,ExporterService['symbols']=new Map();
|
|
@@ -54,7 +54,7 @@ class Search {
|
|
|
54
54
|
}
|
|
55
55
|
catch (error) {
|
|
56
56
|
hotMeshClient.engine.logger.info('meshflow-client-search-err', {
|
|
57
|
-
|
|
57
|
+
error,
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -66,7 +66,7 @@ class Search {
|
|
|
66
66
|
}
|
|
67
67
|
catch (error) {
|
|
68
68
|
hotMeshClient.engine.logger.info('meshflow-client-search-list-err', {
|
|
69
|
-
|
|
69
|
+
error,
|
|
70
70
|
});
|
|
71
71
|
return [];
|
|
72
72
|
}
|
|
@@ -114,7 +114,7 @@ class Search {
|
|
|
114
114
|
}
|
|
115
115
|
catch (error) {
|
|
116
116
|
this.hotMeshClient.logger.error('meshflow-search-get-error', {
|
|
117
|
-
|
|
117
|
+
error,
|
|
118
118
|
});
|
|
119
119
|
return '';
|
|
120
120
|
}
|
|
@@ -146,7 +146,7 @@ class Search {
|
|
|
146
146
|
}
|
|
147
147
|
catch (error) {
|
|
148
148
|
this.hotMeshClient.logger.error('meshflow-search-mget-error', {
|
|
149
|
-
|
|
149
|
+
error,
|
|
150
150
|
});
|
|
151
151
|
return [];
|
|
152
152
|
}
|