@hotmeshio/hotmesh 0.3.15 → 0.3.16
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 +64 -52
- package/build/modules/key.js +1 -1
- package/build/modules/utils.js +1 -1
- package/build/package.json +22 -21
- 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/factory.js +2 -2
- package/build/services/connector/providers/nats.js +3 -1
- package/build/services/engine/index.js +1 -1
- package/build/services/exporter/index.js +1 -1
- package/build/services/hotmesh/index.js +2 -0
- package/build/services/mapper/index.js +1 -1
- package/build/services/meshcall/index.d.ts +5 -4
- package/build/services/meshcall/index.js +23 -9
- package/build/services/meshdata/index.js +3 -2
- package/build/services/meshflow/client.js +1 -1
- package/build/services/meshflow/connection.js +6 -4
- package/build/services/meshflow/exporter.js +1 -1
- package/build/services/meshflow/worker.js +1 -1
- package/build/services/pipe/functions/array.js +1 -1
- package/build/services/pipe/functions/bitwise.js +1 -1
- package/build/services/pipe/functions/conditional.js +1 -1
- package/build/services/pipe/functions/cron.js +1 -1
- package/build/services/pipe/functions/date.js +1 -1
- package/build/services/pipe/functions/index.js +1 -1
- package/build/services/pipe/functions/json.js +1 -1
- package/build/services/pipe/functions/logical.js +1 -1
- package/build/services/pipe/functions/math.js +1 -1
- package/build/services/pipe/functions/number.js +1 -1
- package/build/services/pipe/functions/object.js +1 -1
- package/build/services/pipe/functions/string.js +1 -1
- package/build/services/pipe/functions/symbol.js +1 -1
- package/build/services/pipe/functions/unary.js +1 -1
- package/build/services/pipe/index.js +1 -1
- package/build/services/quorum/index.js +1 -1
- package/build/services/reporter/index.js +1 -1
- package/build/services/router/index.js +1 -1
- package/build/services/search/factory.d.ts +1 -1
- package/build/services/search/providers/postgres/postgres.d.ts +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.d.ts +68 -63
- package/build/services/store/providers/postgres/kvsql.js +1 -1
- package/build/services/store/providers/postgres/kvtables.d.ts +15 -0
- package/build/services/store/providers/postgres/kvtables.js +1 -0
- package/build/services/store/providers/postgres/kvtransaction.d.ts +36 -0
- package/build/services/store/providers/postgres/kvtransaction.js +1 -0
- package/build/services/store/providers/postgres/kvtypes/hash.d.ts +55 -0
- package/build/services/store/providers/postgres/kvtypes/hash.js +1 -0
- package/build/services/store/providers/postgres/kvtypes/list.d.ts +33 -0
- package/build/services/store/providers/postgres/kvtypes/list.js +1 -0
- package/build/services/store/providers/postgres/kvtypes/string.d.ts +20 -0
- package/build/services/store/providers/postgres/kvtypes/string.js +1 -0
- package/build/services/store/providers/postgres/kvtypes/zset.d.ts +41 -0
- package/build/services/store/providers/postgres/kvtypes/zset.js +1 -0
- package/build/services/store/providers/postgres/postgres.d.ts +3 -12
- 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/redis/ioredis.js +1 -1
- package/build/services/sub/providers/redis/redis.js +1 -1
- package/build/services/task/index.js +1 -1
- package/build/services/telemetry/index.js +1 -1
- package/build/services/worker/index.js +1 -1
- package/build/types/meshcall.d.ts +6 -6
- package/package.json +22 -21
- package/types/index.ts +3 -3
- package/types/manifest.ts +1 -1
- package/types/meshcall.ts +6 -6
- package/types/postgres.ts +8 -1
- package/types/provider.ts +7 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function _0xa532(){const _0xeff5f1=['40aIEmVT','18671888aGmXdP','3592010XOqbOz','2512126rCXgVp','191814RRVqcY','1307130VfFvWb','8249694zXSxDv','12292469JimGoN'];_0xa532=function(){return _0xeff5f1;};return _0xa532();}function _0x34a6(_0x3b4e58,_0x491c2b){const _0xa532c3=_0xa532();return _0x34a6=function(_0x34a677,_0x12b992){_0x34a677=_0x34a677-0x18b;let _0x1fcee8=_0xa532c3[_0x34a677];return _0x1fcee8;},_0x34a6(_0x3b4e58,_0x491c2b);}(function(_0x5d95ef,_0x55dcff){const _0x1c51d3=_0x34a6,_0x1202b6=_0x5d95ef();while(!![]){try{const _0x44e108=parseInt(_0x1c51d3(0x192))/0x1+-parseInt(_0x1c51d3(0x190))/0x2+parseInt(_0x1c51d3(0x191))/0x3*(-parseInt(_0x1c51d3(0x18d))/0x4)+parseInt(_0x1c51d3(0x18f))/0x5+parseInt(_0x1c51d3(0x18b))/0x6+parseInt(_0x1c51d3(0x18c))/0x7+-parseInt(_0x1c51d3(0x18e))/0x8;if(_0x44e108===_0x55dcff)break;else _0x1202b6['push'](_0x1202b6['shift']());}catch(_0x5e265f){_0x1202b6['push'](_0x1202b6['shift']());}}}(_0xa532,0xe258f));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Activity']=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),mapper_1=require('../mapper'),pipe_1=require('../pipe'),serializer_1=require('../serializer'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream');class Activity{constructor(_0x481a42,_0x24793b,_0x3fc02e,_0x14b64f,_0x299fb4,_0x5d3c98){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x481a42,this['data']=_0x24793b,this['metadata']=_0x3fc02e,this['hook']=_0x14b64f,this['engine']=_0x299fb4,this['context']=_0x5d3c98||{'data':{},'metadata':{}},this['logger']=_0x299fb4['logger'],this['store']=_0x299fb4['store'];}['setLeg'](_0x386978){this['leg']=_0x386978;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0x1e5d30=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0x1e5d30!==undefined&&!isNaN(Number(_0x1e5d30)))return _0x1e5d30;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x5a6d3b=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x5a6d3b);}catch(_0x369f99){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x5a6d3b>0x0){if(this['context']['metadata']['js']===_0x5a6d3b){const _0x8084d2=await this['setStatus'](-_0x5a6d3b);Number(_0x8084d2)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x369f99;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0x1af5e7=this['context']['metadata']['guid'];return this['setLeg'](0x2),await this['getState'](),collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid']),await collator_1['CollatorService']['notarizeReentry'](this,_0x1af5e7);}async['processEvent'](_0x3261d6=stream_1['StreamStatus']['SUCCESS'],_0x1f66c2=0xc8,_0x194274='output'){this['setLeg'](0x2);const _0x35c3e4=this['context']['metadata']['jid'];if(!_0x35c3e4){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x22641c=this['metadata']['aid'];this['status']=_0x3261d6,this['code']=_0x1f66c2,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x35c3e4,'aid':_0x22641c,'status':_0x3261d6,'code':_0x1f66c2});let _0x5e7d78;try{const _0x27a3b1=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x27a3b1),_0x5e7d78=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5e7d78['startActivitySpan'](this['leg']);let _0x5acf89;if(_0x3261d6===stream_1['StreamStatus']['PENDING'])_0x5acf89=await this['processPending'](_0x194274);else _0x3261d6===stream_1['StreamStatus']['SUCCESS']?_0x5acf89=await this['processSuccess'](_0x194274):_0x5acf89=await this['processError']();this['transitionAdjacent'](_0x5acf89,_0x5e7d78);}catch(_0x4bdbed){if(_0x4bdbed instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x4bdbed['fault']+'-error',{..._0x4bdbed});return;}else{if(_0x4bdbed instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x4bdbed});return;}else{if(_0x4bdbed instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x4bdbed});return;}else{if(_0x4bdbed instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x4bdbed});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x4bdbed,'message':_0x4bdbed['message'],'stack':_0x4bdbed['stack'],'name':_0x4bdbed['name']}),_0x5e7d78?.['setActivityError'](_0x4bdbed['message']);throw _0x4bdbed;}finally{_0x5e7d78?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x35c3e4,'aid':_0x22641c});}}async['processPending'](_0x36add9){this['bindActivityData'](_0x36add9),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x13ddb3=this['store']['transact']();return await this['setState'](_0x13ddb3),await collator_1['CollatorService']['notarizeContinuation'](this,_0x13ddb3),await this['setStatus'](this['adjacencyList']['length'],_0x13ddb3),await _0x13ddb3['exec']();}async['processSuccess'](_0x10d7a9){this['bindActivityData'](_0x10d7a9),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x5ab04e=this['store']['transact']();return await this['setState'](_0x5ab04e),await collator_1['CollatorService']['notarizeCompletion'](this,_0x5ab04e),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x5ab04e),await _0x5ab04e['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0x354290=this['store']['transact']();return await this['setState'](_0x354290),await collator_1['CollatorService']['notarizeCompletion'](this,_0x354290),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x354290),await _0x354290['exec']();}async['transitionAdjacent'](_0x28e609,_0x4c58b6){_0x4c58b6['mapActivityAttributes']();const _0x59af10=this['resolveStatus'](_0x28e609),_0x323e23={'app.job.jss':_0x59af10},_0x5db331=await this['transition'](this['adjacencyList'],_0x59af10);_0x5db331?.['length']&&(_0x323e23['app.activity.mids']=_0x5db331['join'](',')),_0x4c58b6['setActivityAttributes'](_0x323e23);}['resolveStatus'](_0x4d54a3){const _0xb5d877=_0x4d54a3[_0x4d54a3['length']-0x1];return Array['isArray'](_0xb5d877)?Number(_0xb5d877[0x1]):Number(_0xb5d877);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x3ef1d5=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x5065de=_0x3ef1d5['mapRules']();if(_0x5065de)for(const _0x4b712a in _0x5065de){const _0x1d50d4=_0x4b712a['indexOf']('[');if(_0x1d50d4>-0x1){const _0x4c66a9=_0x4b712a['substring'](_0x1d50d4+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x4c66a9))){const _0x4e7525=_0x4b712a['substring'](0x0,_0x1d50d4);_0x5065de[_0x4e7525]=_0x5065de[_0x4b712a],delete _0x5065de[_0x4b712a];}else{if(_0x4c66a9==='-'||_0x4c66a9==='_'){const _0x9b83=_0x5065de[_0x4b712a];Object['keys'](_0x9b83)['forEach'](_0x586f3b=>{_0x5065de[_0x586f3b]=_0x9b83[_0x586f3b];});}}}}this['context']['data']=_0x5065de;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x1c27ee=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x1c27ee['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x1ef0ca=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x43429c=_0x1ef0ca['mapRules'](),_0xdf01f1=this['metadata']['aid'],_0x41d516={...this['context'][_0xdf01f1]['output'],..._0x43429c};this['context'][_0xdf01f1]['output']['data']=_0x41d516;}}async['registerTimeout'](){}['bindActivityError'](_0x396245){const _0x3e0512=this['context'][this['metadata']['aid']]['output']['metadata'];_0x3e0512['err']=JSON['stringify'](this['data']),_0x3e0512['$error']={..._0x396245,'is_stream_error':!![]};}['bindJobError'](_0x2165b5){this['context']['metadata']['err']=JSON['stringify']({..._0x2165b5,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0x539918,_0x1ab6ae){const {id:_0x324170}=await this['engine']['getVID']();return await this['store']['setStatus'](_0x539918,this['context']['metadata']['jid'],_0x324170,_0x1ab6ae);}['authorizeEntry'](_0x469543){return this['adjacencyList']?.['map'](_0x4358c1=>{const {metadata:{aid:_0x286e53}}=_0x4358c1;return _0x469543[_0x286e53+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x286e53;})??[];}['bindDimensionalAddress'](_0x67ff12){const _0x44ddbe=this['resolveDad']();_0x67ff12[this['metadata']['aid']+'/output/metadata/dad']=_0x44ddbe;}async['setState'](_0x37689c){const _0x527826=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x296c98={};await this['bindJobState'](_0x296c98);const _0x3f42ef=this['authorizeEntry'](_0x296c98);this['bindDimensionalAddress'](_0x296c98),this['bindActivityState'](_0x296c98);const _0x4d1fd9=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x3f42ef],_0x26af5d=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x296c98,this['getJobStatus'](),_0x527826,_0x4d1fd9,_0x26af5d,_0x37689c);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x50fd63=this['context']['$self'];!_0x50fd63['output']['metadata']&&(_0x50fd63['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x50fd63['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x26b1a6=(0x0,utils_1['formatISODate'])(new Date());_0x50fd63['output']['metadata']['ac']=_0x26b1a6,_0x50fd63['output']['metadata']['au']=_0x26b1a6,_0x50fd63['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x50fd63['output']['metadata']['stp']=this['config']['subtype']),_0x50fd63['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x1b2f21){const _0x487828=await this['getTriggerConfig'](),_0xcfcafc=[..._0x487828['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x528338 of _0xcfcafc){const _0x2a279e=(0x0,utils_1['getValueByPath'])(this['context'],_0x528338);_0x2a279e!==undefined&&(_0x1b2f21[_0x528338]=_0x2a279e);}for(const _0xd1ed4b in this['context']?.['data']??{}){(_0xd1ed4b['startsWith']('-')||_0xd1ed4b['startsWith']('_'))&&(_0x1b2f21[_0xd1ed4b]=this['context']['data'][_0xd1ed4b]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x1b2f21,this['config'],this['context']);}['bindActivityState'](_0x3b5947){const _0x28e50a=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0xf3c4bd of _0x28e50a){const _0x481703=this['metadata']['aid']+'/'+_0xf3c4bd,_0x51f9d3=(0x0,utils_1['getValueByPath'])(this['context'],_0x481703);_0x51f9d3!==undefined&&(_0x3b5947[_0x481703]=_0x51f9d3);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x3b5947,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x3f16e8=>'metadata/'+_0x3f16e8);}['bindActivityMetadataPaths'](){const _0x20aa14=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x20aa14]['KEYS']['map'](_0x3a23d6=>'output/metadata/'+_0x3a23d6);}async['getState'](){const _0x2ce075=this['context']['metadata']['gid'],_0x487eb5='$'+this['config']['subscribes'],_0x1d5ee3={[_0x487eb5]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x31c72d=>'metadata/'+_0x31c72d)};for(let [_0x5c36ba,_0x2fcfe2]of Object['entries'](this['config']['consumes'])){if(_0x5c36ba==='$job')for(const _0x4bac1c of _0x2fcfe2){_0x1d5ee3[_0x487eb5]['push'](_0x4bac1c);}else{_0x5c36ba==='$self'&&(_0x5c36ba=this['metadata']['aid']);!_0x1d5ee3[_0x5c36ba]&&(_0x1d5ee3[_0x5c36ba]=[]);for(const _0x592183 of _0x2fcfe2){_0x1d5ee3[_0x5c36ba]['push'](_0x5c36ba+'/'+_0x592183);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0x1d5ee3,this['config'],this['metadata'],this['leg']);const {dad:_0x25ea51,jid:_0x342823}=this['context']['metadata'],_0x209a45=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x25ea51||''),[_0x3141a4,_0x38b939]=await this['store']['getState'](_0x342823,_0x1d5ee3,_0x209a45);this['context']=(0x0,utils_1['restoreHierarchy'])(_0x3141a4),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x2ce075),this['initDimensionalAddress'](_0x25ea51),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x5d51a3,_0x153a49){if(_0x153a49!==_0x5d51a3)throw new errors_1['GenerationalError'](_0x5d51a3,_0x153a49,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0x5073fb){this['metadata']['dad']=_0x5073fb;}['initSelf'](_0x3818a4){const _0x5065bc=this['metadata']['aid'];!_0x3818a4[_0x5065bc]&&(_0x3818a4[_0x5065bc]={});const _0x5bc2ec=_0x3818a4[_0x5065bc];return!_0x5bc2ec['output']&&(_0x5bc2ec['output']={}),!_0x5bc2ec['input']&&(_0x5bc2ec['input']={}),!_0x5bc2ec['hook']&&(_0x5bc2ec['hook']={}),!_0x5bc2ec['output']['metadata']&&(_0x5bc2ec['output']['metadata']={}),_0x5bc2ec['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x3818a4['$self']=_0x5bc2ec,_0x3818a4['$job']=_0x3818a4,_0x3818a4;}['initPolicies'](_0xe7626a){const _0x82ccf2=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0xe7626a);_0xe7626a['metadata']['expire']=_0x82ccf2;if(this['config']['persistent']!=undefined){const _0x30ddfa=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0xe7626a);_0xe7626a['metadata']['persistent']=_0x30ddfa;}}['bindActivityData'](_0x369e63){this['context'][this['metadata']['aid']][_0x369e63]['data']=this['data'];}['resolveDad'](){let _0x112f4e=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x112f4e=_0x112f4e['substring'](0x0,_0x112f4e['lastIndexOf'](','))+','+this['adjacentIndex']),_0x112f4e;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x3793cb=[],_0x5d49f5=await this['store']['getTransitions'](await this['engine']['getVID']()),_0x26157d=_0x5d49f5['.'+this['metadata']['aid']],_0x2522c0=this['resolveAdjacentDad']();if(_0x26157d)for(const _0x4e2e82 in _0x26157d){const _0x3756d0=_0x26157d[_0x4e2e82];mapper_1['MapperService']['evaluate'](_0x3756d0,this['context'],this['code'])&&_0x3793cb['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x2522c0,'aid':_0x4e2e82,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x3793cb;}['isJobComplete'](_0x58b46a){return _0x58b46a<=0x0;}['shouldEmit'](){if(this['config']['emit'])return pipe_1['Pipe']['resolve'](this['config']['emit'],this['context'])===!![];return![];}['shouldPersistJob'](){if(this['config']['persist']!==undefined)return pipe_1['Pipe']['resolve'](this['config']['persist'],this['context'])===!![];return![];}async['transition'](_0x1b9a78,_0x335c8a){if(this['jobWasInterrupted'](_0x335c8a))return;let _0x469612=[];(this['shouldEmit']()||this['isJobComplete'](_0x335c8a)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x335c8a)&&!this['shouldPersistJob']()});if(_0x1b9a78['length']&&!this['isJobComplete'](_0x335c8a)){const _0x4ed58f=this['store']['transact']();for(const _0x538b8f of _0x1b9a78){await this['engine']['router']?.['publishMessage'](null,_0x538b8f,_0x4ed58f);}_0x469612=await _0x4ed58f['exec']();}return _0x469612;}['jobWasInterrupted'](_0x52ebb0){return _0x52ebb0<-0x5f5e100;}}exports['Activity']=Activity;
|
|
1
|
+
'use strict';function _0x2f10(){const _0x2b8cbc=['699IQfqRr','15292QQvvLa','14922PiddbE','1568260zfPoMN','198sSrTSl','4638TWeamq','1704588xjUlaS','6900586JxExPj','7415qJxiZb','2519rROqLm','24liWRUM'];_0x2f10=function(){return _0x2b8cbc;};return _0x2f10();}(function(_0xc834f6,_0x504b97){const _0x3ee58f=_0x935f,_0x57da7e=_0xc834f6();while(!![]){try{const _0x4de376=parseInt(_0x3ee58f(0xa5))/0x1+parseInt(_0x3ee58f(0xa2))/0x2+-parseInt(_0x3ee58f(0xa7))/0x3*(parseInt(_0x3ee58f(0x9d))/0x4)+-parseInt(_0x3ee58f(0xa4))/0x5*(parseInt(_0x3ee58f(0xa1))/0x6)+-parseInt(_0x3ee58f(0xa3))/0x7+parseInt(_0x3ee58f(0xa6))/0x8*(parseInt(_0x3ee58f(0x9e))/0x9)+-parseInt(_0x3ee58f(0x9f))/0xa*(-parseInt(_0x3ee58f(0xa0))/0xb);if(_0x4de376===_0x504b97)break;else _0x57da7e['push'](_0x57da7e['shift']());}catch(_0x5e9d67){_0x57da7e['push'](_0x57da7e['shift']());}}}(_0x2f10,0xa111b));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Activity']=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),mapper_1=require('../mapper'),pipe_1=require('../pipe'),serializer_1=require('../serializer'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream');function _0x935f(_0x12a711,_0x12d423){const _0x2f1069=_0x2f10();return _0x935f=function(_0x935f9d,_0x58e1c6){_0x935f9d=_0x935f9d-0x9d;let _0x1258b7=_0x2f1069[_0x935f9d];return _0x1258b7;},_0x935f(_0x12a711,_0x12d423);}class Activity{constructor(_0x1dd435,_0x428d92,_0xf366f8,_0x3b192d,_0xc3024b,_0x1a9f03){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x1dd435,this['data']=_0x428d92,this['metadata']=_0xf366f8,this['hook']=_0x3b192d,this['engine']=_0xc3024b,this['context']=_0x1a9f03||{'data':{},'metadata':{}},this['logger']=_0xc3024b['logger'],this['store']=_0xc3024b['store'];}['setLeg'](_0x2eac9b){this['leg']=_0x2eac9b;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0x5dd45d=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0x5dd45d!==undefined&&!isNaN(Number(_0x5dd45d)))return _0x5dd45d;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x519622=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x519622);}catch(_0x376b2a){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x519622>0x0){if(this['context']['metadata']['js']===_0x519622){const _0x1d66a5=await this['setStatus'](-_0x519622);Number(_0x1d66a5)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x376b2a;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0x54d788=this['context']['metadata']['guid'];return this['setLeg'](0x2),await this['getState'](),collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid']),await collator_1['CollatorService']['notarizeReentry'](this,_0x54d788);}async['processEvent'](_0x5c9851=stream_1['StreamStatus']['SUCCESS'],_0x2a5e91=0xc8,_0x2e2073='output'){this['setLeg'](0x2);const _0x3aaf9e=this['context']['metadata']['jid'];if(!_0x3aaf9e){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x5522f4=this['metadata']['aid'];this['status']=_0x5c9851,this['code']=_0x2a5e91,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x3aaf9e,'aid':_0x5522f4,'status':_0x5c9851,'code':_0x2a5e91});let _0x1cbf12;try{const _0x4ee0fa=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x4ee0fa),_0x1cbf12=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x1cbf12['startActivitySpan'](this['leg']);let _0x48fc9f;if(_0x5c9851===stream_1['StreamStatus']['PENDING'])_0x48fc9f=await this['processPending'](_0x2e2073);else _0x5c9851===stream_1['StreamStatus']['SUCCESS']?_0x48fc9f=await this['processSuccess'](_0x2e2073):_0x48fc9f=await this['processError']();this['transitionAdjacent'](_0x48fc9f,_0x1cbf12);}catch(_0x33ed51){if(_0x33ed51 instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x33ed51['fault']+'-error',{..._0x33ed51});return;}else{if(_0x33ed51 instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x33ed51});return;}else{if(_0x33ed51 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x33ed51});return;}else{if(_0x33ed51 instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x33ed51});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x33ed51,'message':_0x33ed51['message'],'stack':_0x33ed51['stack'],'name':_0x33ed51['name']}),_0x1cbf12?.['setActivityError'](_0x33ed51['message']);throw _0x33ed51;}finally{_0x1cbf12?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x3aaf9e,'aid':_0x5522f4});}}async['processPending'](_0x2634a7){this['bindActivityData'](_0x2634a7),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0xf6d18f=this['store']['transact']();return await this['setState'](_0xf6d18f),await collator_1['CollatorService']['notarizeContinuation'](this,_0xf6d18f),await this['setStatus'](this['adjacencyList']['length'],_0xf6d18f),await _0xf6d18f['exec']();}async['processSuccess'](_0x3330a7){this['bindActivityData'](_0x3330a7),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x2cb0ff=this['store']['transact']();return await this['setState'](_0x2cb0ff),await collator_1['CollatorService']['notarizeCompletion'](this,_0x2cb0ff),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x2cb0ff),await _0x2cb0ff['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0x15312b=this['store']['transact']();return await this['setState'](_0x15312b),await collator_1['CollatorService']['notarizeCompletion'](this,_0x15312b),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x15312b),await _0x15312b['exec']();}async['transitionAdjacent'](_0x6debfc,_0x11f3b9){_0x11f3b9['mapActivityAttributes']();const _0x591895=this['resolveStatus'](_0x6debfc),_0x395485={'app.job.jss':_0x591895},_0x349724=await this['transition'](this['adjacencyList'],_0x591895);_0x349724?.['length']&&(_0x395485['app.activity.mids']=_0x349724['join'](',')),_0x11f3b9['setActivityAttributes'](_0x395485);}['resolveStatus'](_0x5bb455){const _0x2f9e80=_0x5bb455[_0x5bb455['length']-0x1];return Array['isArray'](_0x2f9e80)?Number(_0x2f9e80[0x1]):Number(_0x2f9e80);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x2ce69c=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x329ad7=_0x2ce69c['mapRules']();if(_0x329ad7)for(const _0x21f5db in _0x329ad7){const _0x5d53a2=_0x21f5db['indexOf']('[');if(_0x5d53a2>-0x1){const _0x31d329=_0x21f5db['substring'](_0x5d53a2+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x31d329))){const _0x4c21a4=_0x21f5db['substring'](0x0,_0x5d53a2);_0x329ad7[_0x4c21a4]=_0x329ad7[_0x21f5db],delete _0x329ad7[_0x21f5db];}else{if(_0x31d329==='-'||_0x31d329==='_'){const _0x53e999=_0x329ad7[_0x21f5db];Object['keys'](_0x53e999)['forEach'](_0x4a856b=>{_0x329ad7[_0x4a856b]=_0x53e999[_0x4a856b];});}}}}this['context']['data']=_0x329ad7;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x3aa0aa=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x3aa0aa['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x4f9e0f=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x8edd99=_0x4f9e0f['mapRules'](),_0xc17d0c=this['metadata']['aid'],_0x488854={...this['context'][_0xc17d0c]['output'],..._0x8edd99};this['context'][_0xc17d0c]['output']['data']=_0x488854;}}async['registerTimeout'](){}['bindActivityError'](_0x2ab8c4){const _0x2f405a=this['context'][this['metadata']['aid']]['output']['metadata'];_0x2f405a['err']=JSON['stringify'](this['data']),_0x2f405a['$error']={..._0x2ab8c4,'is_stream_error':!![]};}['bindJobError'](_0x8da1f2){this['context']['metadata']['err']=JSON['stringify']({..._0x8da1f2,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0x2a963d,_0x2fb5d7){const {id:_0x2ea274}=await this['engine']['getVID']();return await this['store']['setStatus'](_0x2a963d,this['context']['metadata']['jid'],_0x2ea274,_0x2fb5d7);}['authorizeEntry'](_0x538cd5){return this['adjacencyList']?.['map'](_0x5c96bd=>{const {metadata:{aid:_0x557f6f}}=_0x5c96bd;return _0x538cd5[_0x557f6f+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x557f6f;})??[];}['bindDimensionalAddress'](_0x82ba1c){const _0x280b92=this['resolveDad']();_0x82ba1c[this['metadata']['aid']+'/output/metadata/dad']=_0x280b92;}async['setState'](_0x10a85a){const _0x2c57c4=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x14f59e={};await this['bindJobState'](_0x14f59e);const _0x28109d=this['authorizeEntry'](_0x14f59e);this['bindDimensionalAddress'](_0x14f59e),this['bindActivityState'](_0x14f59e);const _0x1de136=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x28109d],_0x3e0376=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x14f59e,this['getJobStatus'](),_0x2c57c4,_0x1de136,_0x3e0376,_0x10a85a);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x72848b=this['context']['$self'];!_0x72848b['output']['metadata']&&(_0x72848b['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x72848b['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x54e9dd=(0x0,utils_1['formatISODate'])(new Date());_0x72848b['output']['metadata']['ac']=_0x54e9dd,_0x72848b['output']['metadata']['au']=_0x54e9dd,_0x72848b['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x72848b['output']['metadata']['stp']=this['config']['subtype']),_0x72848b['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x4564f4){const _0x1624ee=await this['getTriggerConfig'](),_0x1ccb3d=[..._0x1624ee['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x5c5948 of _0x1ccb3d){const _0x4f7810=(0x0,utils_1['getValueByPath'])(this['context'],_0x5c5948);_0x4f7810!==undefined&&(_0x4564f4[_0x5c5948]=_0x4f7810);}for(const _0x1330c0 in this['context']?.['data']??{}){(_0x1330c0['startsWith']('-')||_0x1330c0['startsWith']('_'))&&(_0x4564f4[_0x1330c0]=this['context']['data'][_0x1330c0]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x4564f4,this['config'],this['context']);}['bindActivityState'](_0x46c649){const _0x1c10b8=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0x302e4e of _0x1c10b8){const _0x2edf60=this['metadata']['aid']+'/'+_0x302e4e,_0x405cfd=(0x0,utils_1['getValueByPath'])(this['context'],_0x2edf60);_0x405cfd!==undefined&&(_0x46c649[_0x2edf60]=_0x405cfd);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x46c649,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x143dd1=>'metadata/'+_0x143dd1);}['bindActivityMetadataPaths'](){const _0x514172=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x514172]['KEYS']['map'](_0x1f2bc2=>'output/metadata/'+_0x1f2bc2);}async['getState'](){const _0x2870e8=this['context']['metadata']['gid'],_0x4aa1b8='$'+this['config']['subscribes'],_0x49911c={[_0x4aa1b8]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x1cc65c=>'metadata/'+_0x1cc65c)};for(let [_0x30508b,_0x1e4b8b]of Object['entries'](this['config']['consumes'])){if(_0x30508b==='$job')for(const _0x46919f of _0x1e4b8b){_0x49911c[_0x4aa1b8]['push'](_0x46919f);}else{_0x30508b==='$self'&&(_0x30508b=this['metadata']['aid']);!_0x49911c[_0x30508b]&&(_0x49911c[_0x30508b]=[]);for(const _0x6d9555 of _0x1e4b8b){_0x49911c[_0x30508b]['push'](_0x30508b+'/'+_0x6d9555);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0x49911c,this['config'],this['metadata'],this['leg']);const {dad:_0x4eb857,jid:_0x1718d5}=this['context']['metadata'],_0xed7e82=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x4eb857||''),[_0x33a263,_0x417570]=await this['store']['getState'](_0x1718d5,_0x49911c,_0xed7e82);this['context']=(0x0,utils_1['restoreHierarchy'])(_0x33a263),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x2870e8),this['initDimensionalAddress'](_0x4eb857),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x9907bd,_0x10b334){if(_0x10b334!==_0x9907bd)throw new errors_1['GenerationalError'](_0x9907bd,_0x10b334,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0x5ccbe0){this['metadata']['dad']=_0x5ccbe0;}['initSelf'](_0x27f2e7){const _0x3492f7=this['metadata']['aid'];!_0x27f2e7[_0x3492f7]&&(_0x27f2e7[_0x3492f7]={});const _0x523641=_0x27f2e7[_0x3492f7];return!_0x523641['output']&&(_0x523641['output']={}),!_0x523641['input']&&(_0x523641['input']={}),!_0x523641['hook']&&(_0x523641['hook']={}),!_0x523641['output']['metadata']&&(_0x523641['output']['metadata']={}),_0x523641['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x27f2e7['$self']=_0x523641,_0x27f2e7['$job']=_0x27f2e7,_0x27f2e7;}['initPolicies'](_0x1cb2d6){const _0x30b9f3=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0x1cb2d6);_0x1cb2d6['metadata']['expire']=_0x30b9f3;if(this['config']['persistent']!=undefined){const _0x56ca8d=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0x1cb2d6);_0x1cb2d6['metadata']['persistent']=_0x56ca8d;}}['bindActivityData'](_0x3aaab0){this['context'][this['metadata']['aid']][_0x3aaab0]['data']=this['data'];}['resolveDad'](){let _0x3e008f=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x3e008f=_0x3e008f['substring'](0x0,_0x3e008f['lastIndexOf'](','))+','+this['adjacentIndex']),_0x3e008f;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x2f7585=[],_0x3ce044=await this['store']['getTransitions'](await this['engine']['getVID']()),_0x4d73e8=_0x3ce044['.'+this['metadata']['aid']],_0x3db42f=this['resolveAdjacentDad']();if(_0x4d73e8)for(const _0x15987e in _0x4d73e8){const _0x21557e=_0x4d73e8[_0x15987e];mapper_1['MapperService']['evaluate'](_0x21557e,this['context'],this['code'])&&_0x2f7585['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x3db42f,'aid':_0x15987e,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x2f7585;}['isJobComplete'](_0x16cd9b){return _0x16cd9b<=0x0;}['shouldEmit'](){if(this['config']['emit'])return pipe_1['Pipe']['resolve'](this['config']['emit'],this['context'])===!![];return![];}['shouldPersistJob'](){if(this['config']['persist']!==undefined)return pipe_1['Pipe']['resolve'](this['config']['persist'],this['context'])===!![];return![];}async['transition'](_0x107c98,_0x5c6fcf){if(this['jobWasInterrupted'](_0x5c6fcf))return;let _0xa5503e=[];(this['shouldEmit']()||this['isJobComplete'](_0x5c6fcf)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x5c6fcf)&&!this['shouldPersistJob']()});if(_0x107c98['length']&&!this['isJobComplete'](_0x5c6fcf)){const _0x5b7429=this['store']['transact']();for(const _0x3e8cdc of _0x107c98){await this['engine']['router']?.['publishMessage'](null,_0x3e8cdc,_0x5b7429);}_0xa5503e=await _0x5b7429['exec']();}return _0xa5503e;}['jobWasInterrupted'](_0x2cd4df){return _0x2cd4df<-0x5f5e100;}}exports['Activity']=Activity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x483647,_0x3f2ac3){const _0x3bbfe8=_0x2d44,_0xa815de=_0x483647();while(!![]){try{const _0x20bacc=parseInt(_0x3bbfe8(0x71))/0x1+-parseInt(_0x3bbfe8(0x74))/0x2+parseInt(_0x3bbfe8(0x70))/0x3+parseInt(_0x3bbfe8(0x72))/0x4*(-parseInt(_0x3bbfe8(0x77))/0x5)+-parseInt(_0x3bbfe8(0x76))/0x6+-parseInt(_0x3bbfe8(0x6f))/0x7+parseInt(_0x3bbfe8(0x75))/0x8*(parseInt(_0x3bbfe8(0x73))/0x9);if(_0x20bacc===_0x3f2ac3)break;else _0xa815de['push'](_0xa815de['shift']());}catch(_0x55aba5){_0xa815de['push'](_0xa815de['shift']());}}}(_0x4d88,0x80e8c));function _0x4d88(){const _0x219874=['1995004xxsjPo','27799632GnAAeH','2954562uSmKPi','1025QNYlAL','7386190FOgQqz','379476EGQVoq','345580fqyciS','17052UrVikL','9nBeqRi'];_0x4d88=function(){return _0x219874;};return _0x4d88();}function _0x2d44(_0x519b03,_0x3a512f){const _0x4d88ac=_0x4d88();return _0x2d44=function(_0x2d44f1,_0x40f7b0){_0x2d44f1=_0x2d44f1-0x6f;let _0x21d7f8=_0x4d88ac[_0x2d44f1];return _0x21d7f8;},_0x2d44(_0x519b03,_0x3a512f);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Await']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');class Await extends activity_1['Activity']{constructor(_0x2d56af,_0x25efca,_0x3af6bd,_0x6b0755,_0xaa2961,_0x486406){super(_0x2d56af,_0x25efca,_0x3af6bd,_0x6b0755,_0xaa2961,_0x486406);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x521446;try{await this['verifyEntry'](),_0x521446=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x521446['startActivitySpan'](this['leg']),this['mapInputData']();const _0x1d55d4=this['store']['transact'](),_0x2de67d=await this['execActivity'](_0x1d55d4);await collator_1['CollatorService']['authorizeReentry'](this,_0x1d55d4),await this['setState'](_0x1d55d4),await this['setStatus'](0x0,_0x1d55d4);const _0x433560=await _0x1d55d4['exec']();_0x521446['mapActivityAttributes']();const _0x2885c2=this['resolveStatus'](_0x433560);return _0x521446['setActivityAttributes']({'app.activity.mid':_0x2de67d,'app.job.jss':_0x2885c2}),this['context']['metadata']['aid'];}catch(_0xf621f9){if(_0xf621f9 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0xf621f9});return;}else{if(_0xf621f9 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0xf621f9});return;}else{if(_0xf621f9 instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0xf621f9});return;}else{if(_0xf621f9 instanceof errors_1['CollationError']){if(_0xf621f9['fault']==='duplicate'){this['logger']['info']('await-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('await-collation-error',{..._0xf621f9});}else this['logger']['error']('await-process-error',{..._0xf621f9});}}}_0x521446?.['setActivityError'](_0xf621f9['message']);throw _0xf621f9;}finally{_0x521446?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x1f9563){const _0x51ad6c=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x358423={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':this['metadata']['dad'],'aid':this['metadata']['aid'],'topic':_0x51ad6c,'spn':this['context']['$self']['output']['metadata']?.['l1s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['AWAIT'],'data':this['context']['data']};if(this['config']['await']!==!![]){const _0x3f8178=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x3f8178===![]&&(_0x358423['metadata']['await']=![]);}return this['config']['retry']&&(_0x358423['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x358423,_0x1f9563);}}exports['Await']=Await;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x205c18,_0x164f42){const _0x1f001d=_0x3596,_0x54fa59=_0x205c18();while(!![]){try{const _0x5c61b2=parseInt(_0x1f001d(0x18c))/0x1*(parseInt(_0x1f001d(0x18a))/0x2)+parseInt(_0x1f001d(0x18d))/0x3+parseInt(_0x1f001d(0x189))/0x4+parseInt(_0x1f001d(0x186))/0x5*(parseInt(_0x1f001d(0x187))/0x6)+-parseInt(_0x1f001d(0x188))/0x7+parseInt(_0x1f001d(0x18b))/0x8+parseInt(_0x1f001d(0x184))/0x9*(-parseInt(_0x1f001d(0x185))/0xa);if(_0x5c61b2===_0x164f42)break;else _0x54fa59['push'](_0x54fa59['shift']());}catch(_0x51fd28){_0x54fa59['push'](_0x54fa59['shift']());}}}(_0x3898,0x75125));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Cycle']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Cycle extends activity_1['Activity']{constructor(_0xc5c3c5,_0x77ff2d,_0x48f387,_0x9e3d3,_0x2f7ca0,_0xfc0d1){super(_0xc5c3c5,_0x77ff2d,_0x48f387,_0x9e3d3,_0x2f7ca0,_0xfc0d1);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x5de5d5;try{await this['verifyEntry'](),_0x5de5d5=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5de5d5['startActivitySpan'](this['leg']),this['mapInputData']();let _0x4d6475=this['store']['transact']();await this['setState'](_0x4d6475),await this['setStatus'](0x0,_0x4d6475);const _0x379134=await _0x4d6475['exec']();_0x5de5d5['mapActivityAttributes']();const _0x3c9466=this['resolveStatus'](_0x379134);_0x4d6475=this['store']['transact']();const _0x12ff3c=await this['cycleAncestorActivity'](_0x4d6475);return _0x5de5d5['setActivityAttributes']({'app.activity.mid':_0x12ff3c,'app.job.jss':_0x3c9466}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0x4d6475),await _0x4d6475['exec'](),this['context']['metadata']['aid'];}catch(_0x1333b1){if(_0x1333b1 instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x1333b1});return;}else{if(_0x1333b1 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x1333b1});return;}else{if(_0x1333b1 instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x1333b1});return;}else{if(_0x1333b1 instanceof errors_1['CollationError']){if(_0x1333b1['fault']==='duplicate'){this['logger']['info']('cycle-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('cycle-collation-error',{..._0x1333b1});}else this['logger']['error']('cycle-process-error',{..._0x1333b1});}}}_0x5de5d5?.['setActivityError'](_0x1333b1['message']);throw _0x1333b1;}finally{_0x5de5d5?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0x3c083c){this['mapInputData']();const _0x2528e4={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':collator_1['CollatorService']['resolveReentryDimension'](this),'aid':this['config']['ancestor'],'spn':this['context']['$self']['output']['metadata']?.['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return await this['engine']['router']?.['publishMessage'](null,_0x2528e4,_0x3c083c);}}function _0x3898(){const _0x2654a2=['3410UaYEwZ','4572DSZrjY','2762522kFBqqj','1690024eHKYdt','2UMruGJ','4157464hLfVbK','101485IiSILl','1200078KOOimY','171981uBnOxe','570QbyKZl'];_0x3898=function(){return _0x2654a2;};return _0x3898();}function _0x3596(_0x29b4ec,_0x37db09){const _0x389894=_0x3898();return _0x3596=function(_0x3596e8,_0x50a174){_0x3596e8=_0x3596e8-0x184;let _0x56281b=_0x389894[_0x3596e8];return _0x56281b;},_0x3596(_0x29b4ec,_0x37db09);}exports['Cycle']=Cycle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x170588,_0x23d93a){const _0x1c5e60=_0x4299,_0x54c181=_0x170588();while(!![]){try{const _0x352308=-parseInt(_0x1c5e60(0x1c8))/0x1+parseInt(_0x1c5e60(0x1c9))/0x2*(-parseInt(_0x1c5e60(0x1cf))/0x3)+parseInt(_0x1c5e60(0x1d1))/0x4+parseInt(_0x1c5e60(0x1cc))/0x5+parseInt(_0x1c5e60(0x1ca))/0x6+-parseInt(_0x1c5e60(0x1cd))/0x7*(parseInt(_0x1c5e60(0x1d0))/0x8)+parseInt(_0x1c5e60(0x1ce))/0x9*(parseInt(_0x1c5e60(0x1cb))/0xa);if(_0x352308===_0x23d93a)break;else _0x54c181['push'](_0x54c181['shift']());}catch(_0x1f725a){_0x54c181['push'](_0x54c181['shift']());}}}(_0x4919,0xd4b5b));function _0x4299(_0x2cd789,_0x49e111){const _0x4919c9=_0x4919();return _0x4299=function(_0x4299dc,_0x3d4a9f){_0x4299dc=_0x4299dc-0x1c8;let _0x788d42=_0x4919c9[_0x4299dc];return _0x788d42;},_0x4299(_0x2cd789,_0x49e111);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Hook']=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),task_1=require('../task'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');class Hook extends activity_1['Activity']{constructor(_0x5ec456,_0x16d6eb,_0x586ea0,_0x399838,_0x8e848e,_0x27e50d){super(_0x5ec456,_0x16d6eb,_0x586ea0,_0x399838,_0x8e848e,_0x27e50d);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x68f2ac;try{return await this['verifyEntry'](),_0x68f2ac=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x68f2ac['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x68f2ac):await this['doPassThrough'](_0x68f2ac),this['context']['metadata']['aid'];}catch(_0x58881e){if(_0x58881e instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x58881e});return;}else{if(_0x58881e instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x58881e});return;}else{if(_0x58881e instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x58881e});return;}else{if(_0x58881e instanceof errors_1['CollationError']){if(_0x58881e['fault']==='duplicate'){this['logger']['info']('hook-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('hook-collation-error',{..._0x58881e});}else this['logger']['error']('hook-process-error',{..._0x58881e});}}}_0x68f2ac?.['setActivityError'](_0x58881e['message']);throw _0x58881e;}finally{_0x68f2ac?.['endActivitySpan'](),this['logger']['debug']('hook-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}['doesHook'](){if(this['config']['sleep']){const _0x47f36c=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x47f36c)&&Number(_0x47f36c)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x112db4){const _0x43139b=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x43139b),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x43139b),await collator_1['CollatorService']['authorizeReentry'](this,_0x43139b),await this['setStatus'](0x0,_0x43139b),await _0x43139b['exec'](),_0x112db4['mapActivityAttributes']();}async['doPassThrough'](_0x8e0f0a){const _0x522189=this['store']['transact']();let _0x4d931c;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x522189),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x522189),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x522189),_0x4d931c=await _0x522189['exec'](),_0x8e0f0a['mapActivityAttributes']();const _0x4061e9=this['resolveStatus'](_0x4d931c),_0x43ec3a={'app.job.jss':_0x4061e9},_0x127842=await this['transition'](this['adjacencyList'],_0x4061e9);_0x127842['length']&&(_0x43ec3a['app.activity.mids']=_0x127842['join'](',')),_0x8e0f0a['setActivityAttributes'](_0x43ec3a);}async['getHookRule'](_0x530e2d){const _0x2f5743=await this['store']['getHookRules']();return _0x2f5743?.[_0x530e2d]?.[0x0];}async['registerHook'](_0x31ec8e){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x31ec8e);else{if(this['config']['sleep']){const _0x4cd3ad=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return await this['engine']['taskService']['registerTimeHook'](this['context']['metadata']['jid'],this['context']['metadata']['gid'],''+this['metadata']['aid']+(this['metadata']['dad']||''),'sleep',_0x4cd3ad,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x21f8c5=stream_1['StreamStatus']['SUCCESS'],_0x2c0375=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x21f8c5,'code':_0x2c0375});const _0x38a282=new task_1['TaskService'](this['store'],this['logger']),_0xbd42b8={...this['data']},_0x5f05b5=await _0x38a282['processWebHookSignal'](this['config']['hook']['topic'],_0xbd42b8);if(_0x5f05b5){const [_0x4f5b55,_0x40157f,_0x4dbf09,_0x72cda5]=_0x5f05b5;this['context']['metadata']['jid']=_0x4f5b55,this['context']['metadata']['gid']=_0x72cda5,this['context']['metadata']['dad']=_0x4dbf09,await this['processEvent'](_0x21f8c5,_0x2c0375,'hook'),_0x2c0375===0xc8&&await _0x38a282['deleteWebHookSignal'](this['config']['hook']['topic'],_0xbd42b8);}}async['processTimeHookEvent'](_0x1af847){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x1af847,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}function _0x4919(){const _0x489ac3=['542040QAYuaV','15376740bySpMG','1746460xevNtt','1002624emNsqy','18iuSLlO','45831FunrJa','96xewcsl','595944ANtRWY','126749JWhHsy','124ScOTQD'];_0x4919=function(){return _0x489ac3;};return _0x4919();}exports['Hook']=Hook;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x180c22,_0x2c26b7){const _0x7dd0d9=_0x5cff,_0x546256=_0x180c22();while(!![]){try{const _0x5089c7=-parseInt(_0x7dd0d9(0x110))/0x1+parseInt(_0x7dd0d9(0x107))/0x2+-parseInt(_0x7dd0d9(0x10e))/0x3*(-parseInt(_0x7dd0d9(0x10b))/0x4)+parseInt(_0x7dd0d9(0x10d))/0x5*(-parseInt(_0x7dd0d9(0x111))/0x6)+parseInt(_0x7dd0d9(0x10c))/0x7+parseInt(_0x7dd0d9(0x108))/0x8*(parseInt(_0x7dd0d9(0x10f))/0x9)+-parseInt(_0x7dd0d9(0x109))/0xa*(parseInt(_0x7dd0d9(0x10a))/0xb);if(_0x5089c7===_0x2c26b7)break;else _0x546256['push'](_0x546256['shift']());}catch(_0x3c4c60){_0x546256['push'](_0x546256['shift']());}}}(_0x214c,0xcf009));function _0x214c(){const _0xdb7767=['1912ZQlpzA','109390ehIiDG','704fWcSMe','21220MQHVUn','6175498HqQVLT','1024065ttTXbo','813UZAaSj','5958uJMXsq','943139TVlpjF','12JAtZup','845310XGQugb'];_0x214c=function(){return _0xdb7767;};return _0x214c();}function _0x5cff(_0x9e598b,_0x32b18f){const _0x214c1a=_0x214c();return _0x5cff=function(_0x5cff17,_0x369b7f){_0x5cff17=_0x5cff17-0x107;let _0x58f0a0=_0x214c1a[_0x5cff17];return _0x58f0a0;},_0x5cff(_0x9e598b,_0x32b18f);}Object['defineProperty'](exports,'__esModule',{'value':!![]});const activity_1=require('./activity'),await_1=require('./await'),cycle_1=require('./cycle'),hook_1=require('./hook'),interrupt_1=require('./interrupt'),signal_1=require('./signal'),trigger_1=require('./trigger'),worker_1=require('./worker');exports['default']={'activity':activity_1['Activity'],'await':await_1['Await'],'cycle':cycle_1['Cycle'],'hook':hook_1['Hook'],'interrupt':interrupt_1['Interrupt'],'signal':signal_1['Signal'],'trigger':trigger_1['Trigger'],'worker':worker_1['Worker']};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0xdd270f,_0x37fd80){const _0x330c75=_0x517e,_0xeb9aa1=_0xdd270f();while(!![]){try{const _0x434dba=parseInt(_0x330c75(0x199))/0x1*(parseInt(_0x330c75(0x197))/0x2)+parseInt(_0x330c75(0x194))/0x3*(-parseInt(_0x330c75(0x198))/0x4)+parseInt(_0x330c75(0x193))/0x5+-parseInt(_0x330c75(0x191))/0x6*(-parseInt(_0x330c75(0x190))/0x7)+-parseInt(_0x330c75(0x196))/0x8+-parseInt(_0x330c75(0x192))/0x9+parseInt(_0x330c75(0x195))/0xa;if(_0x434dba===_0x37fd80)break;else _0xeb9aa1['push'](_0xeb9aa1['shift']());}catch(_0x3608da){_0xeb9aa1['push'](_0xeb9aa1['shift']());}}}(_0x5168,0x52461));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Interrupt']=void 0x0;function _0x5168(){const _0x2576b0=['8AesACS','1bETqIQ','280Kidgzs','64266wiKyzH','5664051bUoNam','2474115sMqIKW','452586HOtxip','322640zzEisG','1757352uuFkTh','1064396OWKFiH'];_0x5168=function(){return _0x2576b0;};return _0x5168();}const errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');function _0x517e(_0x750dac,_0x11bb8f){const _0x5168ea=_0x5168();return _0x517e=function(_0x517e8e,_0x2a2634){_0x517e8e=_0x517e8e-0x190;let _0x77c378=_0x5168ea[_0x517e8e];return _0x77c378;},_0x517e(_0x750dac,_0x11bb8f);}class Interrupt extends activity_1['Activity']{constructor(_0x4a339f,_0x4d5bcc,_0x5f51fc,_0x424984,_0x428674,_0x276d47){super(_0x4a339f,_0x4d5bcc,_0x5f51fc,_0x424984,_0x428674,_0x276d47);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x142ddf;try{await this['verifyEntry'](),_0x142ddf=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x142ddf['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x142ddf):await this['interruptAnother'](_0x142ddf);}catch(_0x59142){if(_0x59142 instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x59142});return;}else{if(_0x59142 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x59142});return;}else{if(_0x59142 instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x59142});return;}else{if(_0x59142 instanceof errors_1['CollationError']){if(_0x59142['fault']==='duplicate'){this['logger']['info']('interrupt-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('interrupt-collation-error',{..._0x59142});}else this['logger']['error']('interrupt-process-error',{..._0x59142});}}}_0x142ddf?.['setActivityError'](_0x59142['message']);throw _0x59142;}finally{_0x142ddf?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x188080){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x17d868=await this['interrupt']();_0x188080['mapActivityAttributes']();const _0x4831b9=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x4831b9),await this['setStatus'](-0x1,_0x4831b9);const _0x311f93=await _0x4831b9['exec'](),_0x235b44=this['resolveStatus'](_0x311f93);return _0x188080['setActivityAttributes']({'app.activity.mid':_0x17d868,'app.job.jss':_0x235b44}),this['context']['metadata']['aid'];}async['interruptAnother'](_0x6595df){const _0x84e6e5=await this['interrupt'](),_0x3d58cc={'app.activity.mid':_0x84e6e5};_0x6595df['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x443e66=this['store']['transact']();await this['setState'](_0x443e66);}const _0x2b9e16=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x2b9e16),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x2b9e16);const _0x17e7a3=await _0x2b9e16['exec'](),_0x2477dd=this['resolveStatus'](_0x17e7a3);_0x3d58cc['app.job.jss']=_0x2477dd;const _0x3c632f=await this['transition'](this['adjacencyList'],_0x2477dd);return _0x3c632f['length']&&(_0x3d58cc['app.activity.mids']=_0x3c632f['join'](',')),_0x6595df['setActivityAttributes'](_0x3d58cc),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x129295=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x129295==this['context']['metadata']['jid'];}['resolveInterruptOptions'](){return{'reason':this['config']['reason']!==undefined?pipe_1['Pipe']['resolve'](this['config']['reason'],this['context']):undefined,'throw':this['config']['throw']!==undefined?pipe_1['Pipe']['resolve'](this['config']['throw'],this['context']):undefined,'descend':this['config']['descend']!==undefined?pipe_1['Pipe']['resolve'](this['config']['descend'],this['context']):undefined,'code':this['config']['code']!==undefined?pipe_1['Pipe']['resolve'](this['config']['code'],this['context']):undefined,'expire':this['config']['expire']!==undefined?pipe_1['Pipe']['resolve'](this['config']['expire'],this['context']):undefined,'stack':this['config']['stack']!==undefined?pipe_1['Pipe']['resolve'](this['config']['stack'],this['context']):undefined};}async['interrupt'](){const _0x44cd4a=this['resolveInterruptOptions']();return await this['engine']['interrupt'](this['config']['topic']!==undefined?pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']):this['context']['metadata']['tpc'],this['config']['target']!==undefined?pipe_1['Pipe']['resolve'](this['config']['target'],this['context']):this['context']['metadata']['jid'],_0x44cd4a);}}exports['Interrupt']=Interrupt;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';function _0x5e28(_0x5ed500,_0x37537e){const _0x1e7883=_0x1e78();return _0x5e28=function(_0x5e2812,_0x54d62a){_0x5e2812=_0x5e2812-0x75;let _0x53d775=_0x1e7883[_0x5e2812];return _0x53d775;},_0x5e28(_0x5ed500,_0x37537e);}function _0x1e78(){const _0x6a0d68=['6068Wvjhfb','338142RouauL','9hkMpqO','357MmNzJT','1cAuSpF','320022hldkcN','12LrKhEu','11244558jryCse','1068670uexyQe','9012WKFXUp','10434017lmanRl','435fvluou','32XqyGqi'];_0x1e78=function(){return _0x6a0d68;};return _0x1e78();}(function(_0x3432c3,_0x397eda){const _0x495509=_0x5e28,_0x3de935=_0x3432c3();while(!![]){try{const _0x3aadd3=-parseInt(_0x495509(0x7b))/0x1*(-parseInt(_0x495509(0x7c))/0x2)+-parseInt(_0x495509(0x7a))/0x3*(-parseInt(_0x495509(0x77))/0x4)+parseInt(_0x495509(0x75))/0x5*(parseInt(_0x495509(0x80))/0x6)+-parseInt(_0x495509(0x78))/0x7*(-parseInt(_0x495509(0x76))/0x8)+parseInt(_0x495509(0x79))/0x9*(-parseInt(_0x495509(0x7f))/0xa)+-parseInt(_0x495509(0x81))/0xb*(-parseInt(_0x495509(0x7d))/0xc)+-parseInt(_0x495509(0x7e))/0xd;if(_0x3aadd3===_0x397eda)break;else _0x3de935['push'](_0x3de935['shift']());}catch(_0x3c32f7){_0x3de935['push'](_0x3de935['shift']());}}}(_0x1e78,0x9c87a));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Signal']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../collator'),mapper_1=require('../mapper'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Signal extends activity_1['Activity']{constructor(_0x217309,_0x2c04e2,_0x58901e,_0x35d6a9,_0x46ad25,_0x412fa3){super(_0x217309,_0x2c04e2,_0x58901e,_0x35d6a9,_0x46ad25,_0x412fa3);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x344e9b;try{await this['verifyEntry'](),_0x344e9b=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x344e9b['startActivitySpan'](this['leg']);const _0x556fe9=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x556fe9),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x556fe9),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x556fe9);const _0x56fe1a=await _0x556fe9['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x227f37=this['resolveStatus'](_0x56fe1a),_0x189a57={'app.job.jss':_0x227f37},_0x136193=await this['transition'](this['adjacencyList'],_0x227f37);return _0x136193['length']&&(_0x189a57['app.activity.mids']=_0x136193['join'](',')),_0x344e9b['mapActivityAttributes'](),_0x344e9b['setActivityAttributes'](_0x189a57),this['context']['metadata']['aid'];}catch(_0x52a46e){if(_0x52a46e instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x52a46e});return;}else{if(_0x52a46e instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x52a46e});return;}else{if(_0x52a46e instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x52a46e});return;}else{if(_0x52a46e instanceof errors_1['CollationError']){if(_0x52a46e['fault']==='duplicate'){this['logger']['info']('signal-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('signal-collation-error',{..._0x52a46e});}else this['logger']['error']('signal-process-error',{..._0x52a46e});}}}_0x344e9b?.['setActivityError'](_0x52a46e['message']);throw _0x52a46e;}finally{_0x344e9b?.['endActivitySpan'](),this['logger']['debug']('signal-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}['mapSignalData'](){if(this['config']['signal']?.['maps']){const _0x1f3a11=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x1f3a11['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x2ba88d=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x2ba88d['mapRules']();}}async['hookOne'](){const _0x59b4cb=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x21660a=this['mapSignalData'](),_0x5e0d3a=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x4072fe=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x59b4cb,_0x21660a,_0x5e0d3a,_0x4072fe);}async['hookAll'](){const _0x2fa035=this['mapSignalData'](),_0x4d263e=this['mapResolverData']();this['config']['scrub']&&(_0x4d263e['scrub']=!![]);const _0x22f949=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x4c2df0=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x2dc661=[_0x22f949+':'+_0x4c2df0];return await this['engine']['hookAll'](this['config']['topic'],_0x2fa035,_0x4d263e,_0x2dc661);}}exports['Signal']=Signal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';(function(_0x12979b,_0x10a51c){const _0x50b821=_0x567c,_0x2e348e=_0x12979b();while(!![]){try{const _0x305fd2=-parseInt(_0x50b821(0x114))/0x1+-parseInt(_0x50b821(0x115))/0x2*(parseInt(_0x50b821(0x10e))/0x3)+parseInt(_0x50b821(0x110))/0x4+parseInt(_0x50b821(0x117))/0x5*(parseInt(_0x50b821(0x111))/0x6)+parseInt(_0x50b821(0x113))/0x7*(parseInt(_0x50b821(0x118))/0x8)+-parseInt(_0x50b821(0x112))/0x9*(parseInt(_0x50b821(0x10f))/0xa)+parseInt(_0x50b821(0x116))/0xb*(parseInt(_0x50b821(0x10d))/0xc);if(_0x305fd2===_0x10a51c)break;else _0x2e348e['push'](_0x2e348e['shift']());}catch(_0x412e6d){_0x2e348e['push'](_0x2e348e['shift']());}}}(_0xa821,0xe8027));function _0x567c(_0x4705d5,_0x5bced7){const _0xa82126=_0xa821();return _0x567c=function(_0x567cfb,_0x5be81c){_0x567cfb=_0x567cfb-0x10d;let _0x48c67f=_0xa82126[_0x567cfb];return _0x48c67f;},_0x567c(_0x4705d5,_0x5bced7);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Trigger']=void 0x0;function _0xa821(){const _0x501508=['276549vDBGHZ','1163118vcJyFM','51892jlUgsQ','135773yeEmeo','18585KzWDnm','200owNPLf','3180dgVzCn','198asyuRy','210RYXIfa','4813536RoZBrY','66xYtBhm','718704HFTgOo'];_0xa821=function(){return _0x501508;};return _0xa821();}const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),reporter_1=require('../reporter'),serializer_1=require('../serializer'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Trigger extends activity_1['Activity']{constructor(_0x564f5b,_0x306da3,_0x442f92,_0x575ba6,_0xc3006e,_0xfdbd90){super(_0x564f5b,_0x306da3,_0x442f92,_0x575ba6,_0xc3006e,_0xfdbd90);}async['process'](_0xe9b14){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x5b01e2;try{this['setLeg'](0x2),await this['getState'](),_0x5b01e2=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5b01e2['startJobSpan'](),_0x5b01e2['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x5c24a7=this['initStatus'](_0xe9b14,this['adjacencyList']['length']);await this['setStateNX'](_0x5c24a7),await this['setStatus'](_0x5c24a7),this['bindSearchData'](_0xe9b14),this['bindMarkerData'](_0xe9b14);const _0x13ee14=this['store']['transact']();await this['setState'](_0x13ee14),await this['setStats'](_0x13ee14);_0xe9b14?.['pending']&&await this['setExpired'](_0xe9b14?.['pending'],_0x13ee14);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x13ee14),await _0x13ee14['exec'](),this['execAdjacentParent'](),_0x5b01e2['mapActivityAttributes']();const _0x14fb66=Number(this['context']['metadata']['js']);_0x5b01e2['setJobAttributes']({'app.job.jss':_0x14fb66});const _0x5186db={'app.job.jss':_0x14fb66};return await this['transitionAndLogAdjacent'](_0xe9b14,_0x14fb66,_0x5186db),_0x5b01e2['setActivityAttributes'](_0x5186db),this['context']['metadata']['jid'];}catch(_0xf664e0){_0x5b01e2?.['setActivityError'](_0xf664e0['message']);if(_0xf664e0 instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x267c3a=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x267c3a){this['logger']['info']('trigger-collation-overage',{'job_id':_0xf664e0['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0xf664e0['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0xf664e0});throw _0xf664e0;}finally{_0x5b01e2?.['endJobSpan'](),_0x5b01e2?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x572803={},_0xc120fb,_0x11b791){if(isNaN(_0x572803['pending'])){const _0x17d88d=await this['transition'](this['adjacencyList'],_0xc120fb);_0x17d88d['length']&&(_0x11b791['app.activity.mids']=_0x17d88d['join'](','));}}['initStatus'](_0x30c281={},_0x33311e){if(_0x30c281['pending'])return-0x1;return _0x33311e;}async['setExpired'](_0x502fc8,_0x193fc0){await this['store']['expireJob'](this['context']['metadata']['jid'],_0x502fc8,_0x193fc0);}['safeKey'](_0x36d4ff){return'_'+_0x36d4ff;}['bindSearchData'](_0x4333e5){_0x4333e5?.['search']&&Object['keys'](_0x4333e5['search'])['forEach'](_0x243537=>{this['context']['data'][this['safeKey'](_0x243537)]=_0x4333e5['search'][_0x243537]['toString']();});}['bindMarkerData'](_0x551552){_0x551552?.['marker']&&Object['keys'](_0x551552['marker'])['forEach'](_0x6bce07=>{_0x6bce07['startsWith']('-')&&(this['context']['data'][_0x6bce07]=_0x551552['marker'][_0x6bce07]['toString']());});}async['setStatus'](_0x9dc153){this['context']['metadata']['js']=_0x9dc153;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x37d4f1=(0x0,utils_1['formatISODate'])(new Date()),_0x191c93={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x37d4f1,'ju':_0x37d4f1}};await this['engine']['execAdjacentParent'](this['context'],_0x191c93);}}['createInputContext'](){const _0x37995e={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x37995e;}async['getState'](){const _0x4fbc05=this['createInputContext'](),_0x379e28=this['resolveJobId'](_0x4fbc05),_0x22efec=this['resolveJobKey'](_0x4fbc05),_0x388bff=(0x0,utils_1['formatISODate'])(new Date()),{id:_0x3debeb,version:_0x55c21c}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0x419c49={...this['metadata'],'jid':_0x379e28,'key':_0x22efec,'as':collator_1['CollatorService']['getTriggerSeed']()};this['context']={'metadata':{...this['metadata'],'gid':(0x0,utils_1['guid'])(),'ngn':this['context']['metadata']['ngn'],'pj':this['context']['metadata']['pj'],'pg':this['context']['metadata']['pg'],'pd':this['context']['metadata']['pd'],'pa':this['context']['metadata']['pa'],'px':this['context']['metadata']['px'],'app':_0x3debeb,'vrs':_0x55c21c,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0x379e28,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x22efec,'jc':_0x388bff,'ju':_0x388bff,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0x419c49},'output':{'data':this['data'],'metadata':_0x419c49},'settings':{'data':{}},'errors':{'data':{}}}},this['context']['$self']=this['context'][this['metadata']['aid']],this['context']['$job']=this['context'];}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x2dc0a2=>'metadata/'+_0x2dc0a2);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0x4e5236=>'output/metadata/'+_0x4e5236);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x39ccda){const _0x192776=this['config']['stats']?.['id'];return _0x192776?pipe_1['Pipe']['resolve'](_0x192776,_0x39ccda):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x46b882){const _0x3109f4=this['config']['stats']?.['key'];return _0x3109f4?pipe_1['Pipe']['resolve'](_0x3109f4,_0x46b882):'';}async['setStateNX'](_0x37502a){const _0x225ea1=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x225ea1,this['engine']['appId'],_0x37502a))throw new errors_1['DuplicateJobError'](_0x225ea1);}async['setStats'](_0x1f022b){const _0x3552e4=this['context']['metadata'];if(_0x3552e4['key']&&this['config']['stats']?.['measures']){const _0x50f951=await this['engine']['getVID'](),_0x29dc5b=new reporter_1['ReporterService'](_0x50f951,this['store'],this['logger']);await this['store']['setStats'](_0x3552e4['key'],_0x3552e4['jid'],_0x3552e4['ts'],_0x29dc5b['resolveTriggerStatistics'](this['config'],this['context']),_0x50f951,_0x1f022b);}}}exports['Trigger']=Trigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x1e5865,_0x2bbd8b){const _0x40995f=_0x2ee2,_0x44873b=_0x1e5865();while(!![]){try{const _0x529bb2=parseInt(_0x40995f(0xc1))/0x1+-parseInt(_0x40995f(0xbb))/0x2+-parseInt(_0x40995f(0xba))/0x3*(-parseInt(_0x40995f(0xbd))/0x4)+parseInt(_0x40995f(0xbe))/0x5+parseInt(_0x40995f(0xbc))/0x6+parseInt(_0x40995f(0xc0))/0x7*(-parseInt(_0x40995f(0xb9))/0x8)+-parseInt(_0x40995f(0xbf))/0x9*(parseInt(_0x40995f(0xb8))/0xa);if(_0x529bb2===_0x2bbd8b)break;else _0x44873b['push'](_0x44873b['shift']());}catch(_0x5800e1){_0x44873b['push'](_0x44873b['shift']());}}}(_0x4a4f,0x1e25e));function _0x4a4f(){const _0x40e551=['1380024LvVjhl','4crmfgl','1199625biSLoX','153QgjqQb','77xHQBFC','111314dlhemN','213950kXyJWL','59560SsUzuC','450939qtjXRa','324920ipRvEM'];_0x4a4f=function(){return _0x40e551;};return _0x4a4f();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Worker']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Worker extends activity_1['Activity']{constructor(_0x25e5f5,_0x1e2c11,_0x38e830,_0x101f0c,_0x4adfbd,_0x243fd4){super(_0x25e5f5,_0x1e2c11,_0x38e830,_0x101f0c,_0x4adfbd,_0x243fd4);}async['process'](){this['logger']['debug']('worker-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x2c4f88;try{await this['verifyEntry'](),_0x2c4f88=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x2c4f88['startActivitySpan'](this['leg']),this['mapInputData']();const _0xe55a3d=this['store']['transact'](),_0x118053=await this['execActivity'](_0xe55a3d);await collator_1['CollatorService']['authorizeReentry'](this,_0xe55a3d),await this['setState'](_0xe55a3d),await this['setStatus'](0x0,_0xe55a3d);const _0xecee94=await _0xe55a3d['exec']();_0x2c4f88['mapActivityAttributes']();const _0xb9bf98=this['resolveStatus'](_0xecee94);return _0x2c4f88['setActivityAttributes']({'app.activity.mid':_0x118053,'app.job.jss':_0xb9bf98}),this['context']['metadata']['aid'];}catch(_0x3af395){if(_0x3af395 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x3af395});return;}else{if(_0x3af395 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x3af395});return;}else{if(_0x3af395 instanceof errors_1['GetStateError']){this['logger']['error']('worker-get-state-error',{..._0x3af395});return;}else{if(_0x3af395 instanceof errors_1['CollationError']){if(_0x3af395['fault']==='duplicate'){this['logger']['info']('worker-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('worker-collation-error',{..._0x3af395});}else this['logger']['error']('worker-process-error',{..._0x3af395});}}}_0x2c4f88?.['setActivityError'](_0x3af395['message']);throw _0x3af395;}finally{_0x2c4f88?.['endActivitySpan'](),this['logger']['debug']('worker-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x2834cf){const _0x104d29=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x287eed={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':this['metadata']['dad'],'aid':this['metadata']['aid'],'topic':_0x104d29,'spn':this['context']['$self']['output']['metadata']['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return this['config']['retry']&&(_0x287eed['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](_0x104d29,_0x287eed,_0x2834cf);}}function _0x2ee2(_0x3315ec,_0x1929b6){const _0x4a4fb6=_0x4a4f();return _0x2ee2=function(_0x2ee21c,_0x5b2ec7){_0x2ee21c=_0x2ee21c-0xb8;let _0x2ba025=_0x4a4fb6[_0x2ee21c];return _0x2ba025;},_0x2ee2(_0x3315ec,_0x1929b6);}exports['Worker']=Worker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';(function(
|
|
1
|
+
'use strict';(function(_0x51bc7d,_0x22fae8){const _0x47ffdf=_0x1b15,_0x1ef861=_0x51bc7d();while(!![]){try{const _0x2aa433=parseInt(_0x47ffdf(0xef))/0x1+parseInt(_0x47ffdf(0xec))/0x2+-parseInt(_0x47ffdf(0xee))/0x3*(parseInt(_0x47ffdf(0xf1))/0x4)+-parseInt(_0x47ffdf(0xea))/0x5+-parseInt(_0x47ffdf(0xeb))/0x6+parseInt(_0x47ffdf(0xed))/0x7+parseInt(_0x47ffdf(0xf0))/0x8;if(_0x2aa433===_0x22fae8)break;else _0x1ef861['push'](_0x1ef861['shift']());}catch(_0x36cd23){_0x1ef861['push'](_0x1ef861['shift']());}}}(_0xf3ae,0x70df1));function _0x1b15(_0x5c01e6,_0x29d32e){const _0xf3aedd=_0xf3ae();return _0x1b15=function(_0x1b1550,_0xa00f51){_0x1b1550=_0x1b1550-0xea;let _0x402f12=_0xf3aedd[_0x1b1550];return _0x402f12;},_0x1b15(_0x5c01e6,_0x29d32e);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CollatorService']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../../types/collator');class CollatorService{static['assertJobActive'](_0x160f25,_0x15ee3a,_0x328dfd,_0x12e673=0x0){if(_0x160f25<=_0x12e673)throw new errors_1['InactiveJobError'](_0x15ee3a,_0x160f25,_0x328dfd);}static['getDimensionalAddress'](_0x58cd6d,_0x58e32c=![]){let _0x32c1fc=_0x58cd6d['context']['metadata']['dad']||_0x58cd6d['metadata']['dad'];return _0x58e32c&&_0x32c1fc&&_0x58cd6d['leg']===0x2&&(_0x32c1fc=_0x32c1fc['substring'](0x0,_0x32c1fc['lastIndexOf'](','))+',0'),CollatorService['getDimensionsById']([..._0x58cd6d['config']['ancestors'],_0x58cd6d['metadata']['aid']],_0x32c1fc);}static['resolveReentryDimension'](_0x99fb33){const _0x19e489=_0x99fb33['config']['ancestor'],_0x3284ae=_0x99fb33['config']['ancestors'],_0x50f7b8=_0x3284ae['indexOf'](_0x19e489),_0x52c323=_0x99fb33['metadata']['dad']['split'](',');return _0x52c323['length']=_0x50f7b8+0x1,_0x52c323['push']('0'),_0x52c323['join'](',');}static async['notarizeEntry'](_0x2d2bcf,_0x219735){const _0x20302a=await _0x2d2bcf['store']['collate'](_0x2d2bcf['context']['metadata']['jid'],_0x2d2bcf['metadata']['aid'],-0x5af3107a4000,this['getDimensionalAddress'](_0x2d2bcf),_0x219735);return this['verifyInteger'](_0x20302a,0x1,'enter'),_0x20302a;}static async['authorizeReentry'](_0x79dc67,_0xdcd8e3){const _0x91fa53=await _0x79dc67['store']['collate'](_0x79dc67['context']['metadata']['jid'],_0x79dc67['metadata']['aid'],-0x9184e72a000,this['getDimensionalAddress'](_0x79dc67),_0xdcd8e3);return _0x91fa53;}static async['notarizeEarlyExit'](_0x346bf5,_0x226467){return await _0x346bf5['store']['collate'](_0x346bf5['context']['metadata']['jid'],_0x346bf5['metadata']['aid'],-0xa012317b000,this['getDimensionalAddress'](_0x346bf5),_0x226467);}static async['notarizeEarlyCompletion'](_0x44c21a,_0x17cee4){const _0x9d9218=_0x44c21a['config']['cycle']?0x9184e72a000:0xa012317b000;return await _0x44c21a['store']['collate'](_0x44c21a['context']['metadata']['jid'],_0x44c21a['metadata']['aid'],0xf4241-_0x9d9218,this['getDimensionalAddress'](_0x44c21a),_0x17cee4);}static async['notarizeInception'](_0x8ef46f,_0x1a9144,_0x4638aa){_0x1a9144&&await _0x8ef46f['store']['collateSynthetic'](_0x8ef46f['context']['metadata']['jid'],_0x1a9144,0xf4240,_0x4638aa);}static async['isInceptionOverage'](_0x112a71,_0x386533){if(_0x386533){const _0x253279=await _0x112a71['store']['collateSynthetic'](_0x112a71['context']['metadata']['jid'],_0x386533,0xf4240);return _0x253279>0xf4240;}return![];}static async['notarizeReentry'](_0xe4c10b,_0x481752,_0x5d05f6){const _0x4058ae=_0xe4c10b['context']['metadata']['jid'],_0x219d3c=_0x5d05f6||_0xe4c10b['store']['transact']();await _0xe4c10b['store']['collate'](_0x4058ae,_0xe4c10b['metadata']['aid'],0xf4240,this['getDimensionalAddress'](_0xe4c10b,!![]),_0x219d3c),await _0xe4c10b['store']['collateSynthetic'](_0x4058ae,_0x481752,0xf4240,_0x219d3c);const [_0x4aecdd,_0x4c7898]=await _0x219d3c['exec'](),_0x287f67=Array['isArray'](_0x4aecdd)?_0x4aecdd[0x1]:_0x4aecdd,_0x1fe0c1=Array['isArray'](_0x4c7898)?_0x4c7898[0x1]:_0x4c7898;return this['verifyInteger'](_0x287f67,0x2,'enter'),this['verifySyntheticInteger'](_0x1fe0c1),_0x287f67;}static async['notarizeContinuation'](_0x172845,_0x20dc58){return await _0x172845['store']['collate'](_0x172845['context']['metadata']['jid'],_0x172845['metadata']['aid'],0x1,this['getDimensionalAddress'](_0x172845),_0x20dc58);}static async['notarizeCompletion'](_0x14d86f,_0x5753fb){const _0x3d6508=_0x14d86f['config']['cycle']?0x0:0xe8d4a51000;return await _0x14d86f['store']['collate'](_0x14d86f['context']['metadata']['jid'],_0x14d86f['metadata']['aid'],0x1-_0x3d6508,this['getDimensionalAddress'](_0x14d86f),_0x5753fb);}static['getDigitAtIndex'](_0x3205e8,_0x192fb4){const _0x426f06=_0x3205e8['toString']();if(_0x192fb4<0x0||_0x192fb4>=_0x426f06['length'])return null;const _0x214a31=parseInt(_0x426f06[_0x192fb4],0xa);return _0x214a31;}static['getDimensionalIndex'](_0x114a96){const _0x58287d=_0x114a96['toString']();if(_0x58287d['length']<0x9)return null;const _0x436465=_0x58287d['substring'](0x3,0x9),_0x17119b=parseInt(_0x436465,0xa);return _0x17119b-0x1;}static['isDuplicate'](_0x4f3a9f,_0x19b328){return this['getDigitAtIndex'](_0x4f3a9f,_0x19b328)<0x8;}static['isInactive'](_0x3dafbd){return this['getDigitAtIndex'](_0x3dafbd,0x2)<0x9;}static['isPrimed'](_0x2c4758,_0x4081a8){return _0x4081a8==0x1?_0x2c4758!=-0x5af3107a4000:this['getDigitAtIndex'](_0x2c4758,0x0)<0x9&&this['getDigitAtIndex'](_0x2c4758,0x1)<0x9;}static['verifySyntheticInteger'](_0x30297a){const _0x5e6c6a=_0x30297a['toString'](),_0x4501d6=parseInt(_0x5e6c6a[_0x5e6c6a['length']-0x1],0xa);if(_0x4501d6>0x0)throw new errors_1['CollationError'](_0x30297a,0x2,'enter',collator_1['CollationFaultType']['INACTIVE']);else{if(_0x30297a>=0x1e8480)throw new errors_1['CollationError'](_0x30297a,0x2,'enter',collator_1['CollationFaultType']['DUPLICATE']);}}static['verifyInteger'](_0x5a7828,_0xe783f4,_0x577761){let _0x3a3a46;if(_0xe783f4===0x1&&_0x577761==='enter'){if(!this['isPrimed'](_0x5a7828,0x1))_0x3a3a46=collator_1['CollationFaultType']['MISSING'];else{if(this['isDuplicate'](_0x5a7828,0x0))_0x3a3a46=collator_1['CollationFaultType']['DUPLICATE'];else _0x5a7828!=0x331a2bfa73000&&(_0x3a3a46=collator_1['CollationFaultType']['INVALID']);}}else{if(_0xe783f4===0x1&&_0x577761==='exit'){if(_0x5a7828===-0x9184e72a000)_0x3a3a46=collator_1['CollationFaultType']['MISSING'];else this['isDuplicate'](_0x5a7828,0x1)&&(_0x3a3a46=collator_1['CollationFaultType']['DUPLICATE']);}else{if(_0xe783f4===0x2&&_0x577761==='enter'){if(!this['isPrimed'](_0x5a7828,0x2))_0x3a3a46=collator_1['CollationFaultType']['FORBIDDEN'];else this['isInactive'](_0x5a7828)&&(_0x3a3a46=collator_1['CollationFaultType']['INACTIVE']);}}}if(_0x3a3a46)throw new errors_1['CollationError'](_0x5a7828,_0xe783f4,_0x577761,_0x3a3a46);}static['getDimensionsById'](_0x4d8395,_0x2b1cc5){const _0x407458={'$ADJACENT':_0x2b1cc5+',0'};let _0x319632=_0x2b1cc5;return _0x4d8395['reverse']()['forEach'](_0x186641=>{_0x407458[_0x186641]=_0x319632,_0x319632=_0x319632['substring'](0x0,_0x319632['lastIndexOf'](','));}),_0x407458;}static['getSeed'](){return'999000000000000';}static['getTriggerSeed'](){return'888000001000001';}static['compile'](_0x2ac0fa){CollatorService['bindAncestorArray'](_0x2ac0fa);}static['bindAncestorArray'](_0x405bbd){_0x405bbd['forEach'](_0x26a247=>{const _0x58b7cb={},_0x5b09b2=Object['keys'](_0x26a247['activities'])['find'](_0x34e3cd=>_0x26a247['activities'][_0x34e3cd]['type']==='trigger');if(!_0x5b09b2)throw new Error('collator-trigger-activity-not-found');const _0x32fd5d=(_0x28f358,_0x2102cf)=>{_0x58b7cb[_0x28f358]=_0x2102cf,_0x26a247['activities'][_0x28f358]['ancestors']=_0x2102cf;const _0x5c4f28=_0x26a247['transitions']?.[_0x28f358]||[];_0x5c4f28['forEach'](_0x4d79a4=>{_0x32fd5d(_0x4d79a4['to'],[..._0x2102cf,_0x28f358]);});};_0x32fd5d(_0x5b09b2,[]);});}static['getDimensionalSeed'](_0x182e31=0x0){return','+_0x182e31;}}function _0xf3ae(){const _0xc864c6=['305932TpxTeH','2458407ywhFsc','263838BHVAKJ','481281RAFton','9606992SAqPTd','40TDgFQI','4094535mBacNh','153804iFFPxn'];_0xf3ae=function(){return _0xc864c6;};return _0xf3ae();}exports['CollatorService']=CollatorService,CollatorService['targetLength']=0xf;
|