@hotmeshio/hotmesh 0.3.21 → 0.3.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/build/modules/key.js +1 -1
  2. package/build/modules/utils.js +1 -1
  3. package/build/package.json +1 -1
  4. package/build/services/activities/activity.js +1 -1
  5. package/build/services/activities/await.js +1 -1
  6. package/build/services/activities/cycle.js +1 -1
  7. package/build/services/activities/hook.js +1 -1
  8. package/build/services/activities/index.js +1 -1
  9. package/build/services/activities/interrupt.js +1 -1
  10. package/build/services/activities/signal.js +1 -1
  11. package/build/services/activities/trigger.js +1 -1
  12. package/build/services/activities/worker.js +1 -1
  13. package/build/services/collator/index.js +1 -1
  14. package/build/services/compiler/deployer.js +1 -1
  15. package/build/services/compiler/index.js +1 -1
  16. package/build/services/compiler/validator.js +1 -1
  17. package/build/services/engine/index.js +1 -1
  18. package/build/services/exporter/index.js +1 -1
  19. package/build/services/mapper/index.js +1 -1
  20. package/build/services/meshcall/index.js +2 -2
  21. package/build/services/meshflow/client.js +2 -2
  22. package/build/services/meshflow/exporter.js +1 -1
  23. package/build/services/meshflow/worker.js +2 -2
  24. package/build/services/pipe/functions/array.js +1 -1
  25. package/build/services/pipe/functions/bitwise.js +1 -1
  26. package/build/services/pipe/functions/conditional.js +1 -1
  27. package/build/services/pipe/functions/cron.js +1 -1
  28. package/build/services/pipe/functions/date.js +1 -1
  29. package/build/services/pipe/functions/index.js +1 -1
  30. package/build/services/pipe/functions/json.js +1 -1
  31. package/build/services/pipe/functions/logical.js +1 -1
  32. package/build/services/pipe/functions/math.js +1 -1
  33. package/build/services/pipe/functions/number.js +1 -1
  34. package/build/services/pipe/functions/object.js +1 -1
  35. package/build/services/pipe/functions/string.js +1 -1
  36. package/build/services/pipe/functions/symbol.js +1 -1
  37. package/build/services/pipe/functions/unary.js +1 -1
  38. package/build/services/pipe/index.js +1 -1
  39. package/build/services/quorum/index.js +1 -1
  40. package/build/services/reporter/index.js +1 -1
  41. package/build/services/router/index.js +1 -1
  42. package/build/services/search/providers/postgres/postgres.js +1 -1
  43. package/build/services/search/providers/redis/ioredis.js +1 -1
  44. package/build/services/search/providers/redis/redis.js +1 -1
  45. package/build/services/serializer/index.js +1 -1
  46. package/build/services/store/providers/postgres/kvsql.js +1 -1
  47. package/build/services/store/providers/postgres/kvtables.js +1 -1
  48. package/build/services/store/providers/postgres/kvtransaction.js +1 -1
  49. package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
  50. package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
  51. package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
  52. package/build/services/store/providers/postgres/kvtypes/zset.js +1 -1
  53. package/build/services/store/providers/postgres/postgres.js +1 -1
  54. package/build/services/store/providers/redis/_base.js +1 -1
  55. package/build/services/store/providers/redis/ioredis.js +1 -1
  56. package/build/services/store/providers/redis/redis.js +1 -1
  57. package/build/services/store/providers/store-initializable.js +1 -1
  58. package/build/services/stream/providers/nats/nats.js +1 -1
  59. package/build/services/stream/providers/postgres/postgres.js +1 -1
  60. package/build/services/stream/providers/redis/ioredis.js +1 -1
  61. package/build/services/stream/providers/redis/redis.js +1 -1
  62. package/build/services/stream/providers/stream-initializable.js +1 -1
  63. package/build/services/sub/providers/nats/nats.js +1 -1
  64. package/build/services/sub/providers/postgres/postgres.js +1 -1
  65. package/build/services/sub/providers/redis/ioredis.js +1 -1
  66. package/build/services/sub/providers/redis/redis.js +1 -1
  67. package/build/services/task/index.js +1 -1
  68. package/build/services/telemetry/index.js +1 -1
  69. package/build/services/worker/index.js +1 -1
  70. package/package.json +1 -1
@@ -1 +1 @@
1
- 'use strict';(function(_0x5de672,_0x4076e2){const _0x445b9f=_0x5a6d,_0x42aeeb=_0x5de672();while(!![]){try{const _0x37a554=-parseInt(_0x445b9f(0x1c7))/0x1+-parseInt(_0x445b9f(0x1c8))/0x2*(parseInt(_0x445b9f(0x1ca))/0x3)+parseInt(_0x445b9f(0x1cc))/0x4+-parseInt(_0x445b9f(0x1cd))/0x5*(parseInt(_0x445b9f(0x1c9))/0x6)+-parseInt(_0x445b9f(0x1cb))/0x7*(parseInt(_0x445b9f(0x1d0))/0x8)+parseInt(_0x445b9f(0x1ce))/0x9+-parseInt(_0x445b9f(0x1d1))/0xa*(-parseInt(_0x445b9f(0x1cf))/0xb);if(_0x37a554===_0x4076e2)break;else _0x42aeeb['push'](_0x42aeeb['shift']());}catch(_0x258c05){_0x42aeeb['push'](_0x42aeeb['shift']());}}}(_0x41e0,0xeea5c));function _0x41e0(){const _0x49b5c3=['21732jtokyl','1731wtSrLU','905366oPIGPD','1817468JgEzyq','910ezDmCV','13365540UwjDUO','17299491fKFcHu','32ZUTLDz','10KAcILJ','463125nwjCVM','3102RJXYOM'];_0x41e0=function(){return _0x49b5c3;};return _0x41e0();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['VALSEP']=exports['WEBSEP']=exports['TYPSEP']=exports['KEYSEP']=exports['HMNS']=exports['KeyType']=exports['KeyService']=void 0x0;const hotmesh_1=require('../types/hotmesh');Object['defineProperty'](exports,'KeyType',{'enumerable':!![],'get':function(){return hotmesh_1['KeyType'];}});const HMNS='hmsh';exports['HMNS']=HMNS;const KEYSEP=':';exports['KEYSEP']=KEYSEP;const VALSEP='::';exports['VALSEP']=VALSEP;const WEBSEP='::';exports['WEBSEP']=WEBSEP;const TYPSEP='::';exports['TYPSEP']=TYPSEP;function _0x5a6d(_0xd319f6,_0x5dbacf){const _0x41e0ad=_0x41e0();return _0x5a6d=function(_0x5a6da9,_0x371871){_0x5a6da9=_0x5a6da9-0x1c7;let _0xc2e3c7=_0x41e0ad[_0x5a6da9];return _0xc2e3c7;},_0x5a6d(_0xd319f6,_0x5dbacf);}class KeyService{static['mintKey'](_0x39fe19,_0x5738e9,_0x3eb716){switch(_0x5738e9){case hotmesh_1['KeyType']['HOTMESH']:return _0x39fe19;case hotmesh_1['KeyType']['THROTTLE_RATE']:return _0x39fe19+':'+_0x3eb716['appId']+':r:';case hotmesh_1['KeyType']['WORK_ITEMS']:return _0x39fe19+':'+_0x3eb716['appId']+':w:'+(_0x3eb716['scoutType']||'');case hotmesh_1['KeyType']['TIME_RANGE']:return _0x39fe19+':'+_0x3eb716['appId']+':t:'+(_0x3eb716['timeValue']||'');case hotmesh_1['KeyType']['APP']:return _0x39fe19+':a:'+(_0x3eb716['appId']||'');case hotmesh_1['KeyType']['QUORUM']:return _0x39fe19+':'+_0x3eb716['appId']+':q:'+(_0x3eb716['engineId']||'');case hotmesh_1['KeyType']['JOB_STATE']:return _0x39fe19+':'+_0x3eb716['appId']+':j:'+_0x3eb716['jobId'];case hotmesh_1['KeyType']['JOB_DEPENDENTS']:return _0x39fe19+':'+_0x3eb716['appId']+':d:'+_0x3eb716['jobId'];case hotmesh_1['KeyType']['JOB_STATS_GENERAL']:return _0x39fe19+':'+_0x3eb716['appId']+':s:'+_0x3eb716['jobKey']+':'+_0x3eb716['dateTime'];case hotmesh_1['KeyType']['JOB_STATS_MEDIAN']:return _0x39fe19+':'+_0x3eb716['appId']+':s:'+_0x3eb716['jobKey']+':'+_0x3eb716['dateTime']+':'+_0x3eb716['facet'];case hotmesh_1['KeyType']['JOB_STATS_INDEX']:return _0x39fe19+':'+_0x3eb716['appId']+':s:'+_0x3eb716['jobKey']+':'+_0x3eb716['dateTime']+':'+_0x3eb716['facet'];case hotmesh_1['KeyType']['SCHEMAS']:return _0x39fe19+':'+_0x3eb716['appId']+':v:'+_0x3eb716['appVersion']+':schemas';case hotmesh_1['KeyType']['SUBSCRIPTIONS']:return _0x39fe19+':'+_0x3eb716['appId']+':v:'+_0x3eb716['appVersion']+':subscriptions';case hotmesh_1['KeyType']['SUBSCRIPTION_PATTERNS']:return _0x39fe19+':'+_0x3eb716['appId']+':v:'+_0x3eb716['appVersion']+':transitions';case hotmesh_1['KeyType']['HOOKS']:return _0x39fe19+':'+_0x3eb716['appId']+':hooks';case hotmesh_1['KeyType']['SIGNALS']:return _0x39fe19+':'+_0x3eb716['appId']+':signals';case hotmesh_1['KeyType']['SYMKEYS']:return _0x39fe19+':'+_0x3eb716['appId']+':sym:keys:'+(_0x3eb716['activityId']||'');case hotmesh_1['KeyType']['SYMVALS']:return _0x39fe19+':'+_0x3eb716['appId']+':sym:vals:';case hotmesh_1['KeyType']['STREAMS']:return _0x39fe19+':'+(_0x3eb716['appId']||'')+':x:'+(_0x3eb716['topic']||'');default:throw new Error('Invalid\x20key\x20type.');}}static['parseKey'](_0x1c6f7d){const [_0x4d1c9b,_0x5f3d5d,_0x123d25,..._0x4eb36e]=_0x1c6f7d['split'](KEYSEP),_0x11620e=_0x4eb36e['join'](KEYSEP)||'';return{'namespace':_0x4d1c9b,'app':_0x123d25==='a'?_0x5f3d5d:undefined,'entity':_0x123d25,'id':_0x11620e};}static['reconstituteKey'](_0x18e46b){const {namespace:_0x303759,app:_0x5c4783,entity:_0x5eadcb,id:_0x43d11d}=_0x18e46b;return''+_0x303759+KEYSEP+_0x5c4783+KEYSEP+_0x5eadcb+KEYSEP+(_0x43d11d||'');}static['resolveEntityType'](_0x7d22c8,_0x51945f=''){switch(_0x7d22c8){case'a':return'applications';case'r':return'throttles';case'w':return _0x51945f===''?'task_priorities':'roles';case't':return _0x51945f===''?'task_schedules':'task_lists';case'q':return'events';case'j':return'jobs';case's':return'stats';case'v':return'versions';case'x':return _0x51945f===''?'streams':'stream_topics';case'hooks':return'signal_patterns';case'signals':return'signal_registry';case'sym':return'symbols';default:return'unknown_entity';}}static['resolveAbbreviation'](_0x3ec8de){switch(_0x3ec8de){case'applications':return'a';case'throttles':return'r';case'roles':return'w';case'task_schedules':return't';case'task_lists':return't';case'events':return'q';case'jobs':return'j';case'stats':return's';case'versions':return'v';case'streams':return'x';case'signal_patterns':return'hooks';case'signal_registry':return'signals';case'symbols':return'sym';default:return'unknown_entity';}}}exports['KeyService']=KeyService;
1
+ 'use strict';(function(_0x2c605a,_0x449864){const _0x1eaec2=_0x5dc7,_0x3283f0=_0x2c605a();while(!![]){try{const _0x1f9bfb=-parseInt(_0x1eaec2(0x1c6))/0x1*(parseInt(_0x1eaec2(0x1cb))/0x2)+parseInt(_0x1eaec2(0x1ca))/0x3+parseInt(_0x1eaec2(0x1c3))/0x4+-parseInt(_0x1eaec2(0x1c5))/0x5*(parseInt(_0x1eaec2(0x1c7))/0x6)+-parseInt(_0x1eaec2(0x1c9))/0x7+-parseInt(_0x1eaec2(0x1c8))/0x8+parseInt(_0x1eaec2(0x1c4))/0x9;if(_0x1f9bfb===_0x449864)break;else _0x3283f0['push'](_0x3283f0['shift']());}catch(_0x353087){_0x3283f0['push'](_0x3283f0['shift']());}}}(_0x5eaf,0x40181));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['VALSEP']=exports['WEBSEP']=exports['TYPSEP']=exports['KEYSEP']=exports['HMNS']=exports['KeyType']=exports['KeyService']=void 0x0;const hotmesh_1=require('../types/hotmesh');function _0x5eaf(){const _0x2f086b=['1112PGYdwo','235372lJrcRB','9703143wldcup','40335wlEuxw','757uMjqoj','96hmthqN','2096984japTWz','602133QLlJri','70995yJthhH'];_0x5eaf=function(){return _0x2f086b;};return _0x5eaf();}Object['defineProperty'](exports,'KeyType',{'enumerable':!![],'get':function(){return hotmesh_1['KeyType'];}});const HMNS='hmsh';exports['HMNS']=HMNS;const KEYSEP=':';exports['KEYSEP']=KEYSEP;const VALSEP='::';function _0x5dc7(_0x45efb1,_0x1df641){const _0x5eaf12=_0x5eaf();return _0x5dc7=function(_0x5dc7a3,_0x253dee){_0x5dc7a3=_0x5dc7a3-0x1c3;let _0x5870ac=_0x5eaf12[_0x5dc7a3];return _0x5870ac;},_0x5dc7(_0x45efb1,_0x1df641);}exports['VALSEP']=VALSEP;const WEBSEP='::';exports['WEBSEP']=WEBSEP;const TYPSEP='::';exports['TYPSEP']=TYPSEP;class KeyService{static['mintKey'](_0x3faddb,_0x3cfdd1,_0x35df41){switch(_0x3cfdd1){case hotmesh_1['KeyType']['HOTMESH']:return _0x3faddb;case hotmesh_1['KeyType']['THROTTLE_RATE']:return _0x3faddb+':'+_0x35df41['appId']+':r:';case hotmesh_1['KeyType']['WORK_ITEMS']:return _0x3faddb+':'+_0x35df41['appId']+':w:'+(_0x35df41['scoutType']||'');case hotmesh_1['KeyType']['TIME_RANGE']:return _0x3faddb+':'+_0x35df41['appId']+':t:'+(_0x35df41['timeValue']||'');case hotmesh_1['KeyType']['APP']:return _0x3faddb+':a:'+(_0x35df41['appId']||'');case hotmesh_1['KeyType']['QUORUM']:return _0x3faddb+':'+_0x35df41['appId']+':q:'+(_0x35df41['engineId']||'');case hotmesh_1['KeyType']['JOB_STATE']:return _0x3faddb+':'+_0x35df41['appId']+':j:'+_0x35df41['jobId'];case hotmesh_1['KeyType']['JOB_DEPENDENTS']:return _0x3faddb+':'+_0x35df41['appId']+':d:'+_0x35df41['jobId'];case hotmesh_1['KeyType']['JOB_STATS_GENERAL']:return _0x3faddb+':'+_0x35df41['appId']+':s:'+_0x35df41['jobKey']+':'+_0x35df41['dateTime'];case hotmesh_1['KeyType']['JOB_STATS_MEDIAN']:return _0x3faddb+':'+_0x35df41['appId']+':s:'+_0x35df41['jobKey']+':'+_0x35df41['dateTime']+':'+_0x35df41['facet'];case hotmesh_1['KeyType']['JOB_STATS_INDEX']:return _0x3faddb+':'+_0x35df41['appId']+':s:'+_0x35df41['jobKey']+':'+_0x35df41['dateTime']+':'+_0x35df41['facet'];case hotmesh_1['KeyType']['SCHEMAS']:return _0x3faddb+':'+_0x35df41['appId']+':v:'+_0x35df41['appVersion']+':schemas';case hotmesh_1['KeyType']['SUBSCRIPTIONS']:return _0x3faddb+':'+_0x35df41['appId']+':v:'+_0x35df41['appVersion']+':subscriptions';case hotmesh_1['KeyType']['SUBSCRIPTION_PATTERNS']:return _0x3faddb+':'+_0x35df41['appId']+':v:'+_0x35df41['appVersion']+':transitions';case hotmesh_1['KeyType']['HOOKS']:return _0x3faddb+':'+_0x35df41['appId']+':hooks';case hotmesh_1['KeyType']['SIGNALS']:return _0x3faddb+':'+_0x35df41['appId']+':signals';case hotmesh_1['KeyType']['SYMKEYS']:return _0x3faddb+':'+_0x35df41['appId']+':sym:keys:'+(_0x35df41['activityId']||'');case hotmesh_1['KeyType']['SYMVALS']:return _0x3faddb+':'+_0x35df41['appId']+':sym:vals:';case hotmesh_1['KeyType']['STREAMS']:return _0x3faddb+':'+(_0x35df41['appId']||'')+':x:'+(_0x35df41['topic']||'');default:throw new Error('Invalid\x20key\x20type.');}}static['parseKey'](_0x13e003){const [_0x53e22e,_0x572f79,_0x1c524d,..._0x1a4fc3]=_0x13e003['split'](KEYSEP),_0x1b20bf=_0x1a4fc3['join'](KEYSEP)||'';return{'namespace':_0x53e22e,'app':_0x1c524d==='a'?_0x572f79:undefined,'entity':_0x1c524d,'id':_0x1b20bf};}static['reconstituteKey'](_0x32a952){const {namespace:_0x163760,app:_0x3a115b,entity:_0x3decef,id:_0x31d6b7}=_0x32a952;return''+_0x163760+KEYSEP+_0x3a115b+KEYSEP+_0x3decef+KEYSEP+(_0x31d6b7||'');}static['resolveEntityType'](_0x1c6079,_0x1180b6=''){switch(_0x1c6079){case'a':return'applications';case'r':return'throttles';case'w':return _0x1180b6===''?'task_priorities':'roles';case't':return _0x1180b6===''?'task_schedules':'task_lists';case'q':return'events';case'j':return'jobs';case's':return'stats';case'v':return'versions';case'x':return _0x1180b6===''?'streams':'stream_topics';case'hooks':return'signal_patterns';case'signals':return'signal_registry';case'sym':return'symbols';default:return'unknown_entity';}}static['resolveAbbreviation'](_0x525d03){switch(_0x525d03){case'applications':return'a';case'throttles':return'r';case'roles':return'w';case'task_schedules':return't';case'task_lists':return't';case'events':return'q';case'jobs':return'j';case'stats':return's';case'versions':return'v';case'streams':return'x';case'signal_patterns':return'hooks';case'signal_registry':return'signals';case'symbols':return'sym';default:return'unknown_entity';}}}exports['KeyService']=KeyService;
@@ -1 +1 @@
1
- 'use strict';(function(_0x4f4094,_0x1268a3){const _0x12d838=_0x23e3,_0x29a595=_0x4f4094();while(!![]){try{const _0x3a17a9=-parseInt(_0x12d838(0xe5))/0x1*(-parseInt(_0x12d838(0xee))/0x2)+parseInt(_0x12d838(0xec))/0x3*(parseInt(_0x12d838(0xe6))/0x4)+parseInt(_0x12d838(0xe4))/0x5+-parseInt(_0x12d838(0xeb))/0x6+-parseInt(_0x12d838(0xe9))/0x7*(parseInt(_0x12d838(0xea))/0x8)+parseInt(_0x12d838(0xe7))/0x9*(parseInt(_0x12d838(0xe8))/0xa)+parseInt(_0x12d838(0xed))/0xb;if(_0x3a17a9===_0x1268a3)break;else _0x29a595['push'](_0x29a595['shift']());}catch(_0x26be96){_0x29a595['push'](_0x29a595['shift']());}}}(_0x2a33,0xb4422));var __importDefault=this&&this['__importDefault']||function(_0x5932c9){return _0x5932c9&&_0x5932c9['__esModule']?_0x5932c9:{'default':_0x5932c9};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['arrayToHash']=exports['isStreamMessage']=exports['parseStreamMessage']=exports['s']=exports['isValidCron']=exports['restoreHierarchy']=exports['getValueByPath']=exports['getIndexedHash']=exports['getSymVal']=exports['getSymKey']=exports['formatISODate']=exports['getTimeSeries']=exports['getSubscriptionTopic']=exports['findSubscriptionForTrigger']=exports['findTopKey']=exports['matchesStatus']=exports['matchesStatusCode']=exports['polyfill']=exports['identifyProvider']=exports['XSleepFor']=exports['sleepImmediate']=exports['sleepFor']=exports['guid']=exports['deterministicRandom']=exports['deepCopy']=exports['getSystemHealth']=exports['hashOptions']=void 0x0;const os_1=__importDefault(require('os')),crypto_1=require('crypto'),nanoid_1=require('nanoid'),ms_1=__importDefault(require('ms')),logger_1=require('../services/logger'),enums_1=require('./enums'),logger=new logger_1['LoggerService']('hotmesh','utils'),hashOptions=_0xfa883b=>{const _0x298cc7=JSON['stringify'](_0xfa883b);return(0x0,crypto_1['createHash'])('sha256')['update'](_0x298cc7)['digest']('hex');};exports['hashOptions']=hashOptions;async function getSystemHealth(){const _0xfde52=os_1['default']['totalmem'](),_0xf545fc=os_1['default']['freemem'](),_0x4f1eb8=_0xfde52-_0xf545fc,_0x4b4226={'TotalMemoryGB':(_0xfde52/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','FreeMemoryGB':(_0xf545fc/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','UsedMemoryGB':(_0x4f1eb8/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};return _0x4b4226;}exports['getSystemHealth']=getSystemHealth;function deepCopy(_0x513957){return JSON['parse'](JSON['stringify'](_0x513957));}exports['deepCopy']=deepCopy;function deterministicRandom(_0x2096f0){const _0x3147fa=Math['sin'](_0x2096f0)*0x2710;return _0x3147fa-Math['floor'](_0x3147fa);}exports['deterministicRandom']=deterministicRandom;function guid(_0x3b5a22=enums_1['HMSH_GUID_SIZE']){return'H'+(0x0,nanoid_1['nanoid'])(_0x3b5a22);}exports['guid']=guid;function _0x23e3(_0x404109,_0x39e479){const _0x2a330a=_0x2a33();return _0x23e3=function(_0x23e39e,_0x4fdc2c){_0x23e39e=_0x23e39e-0xe4;let _0xfc91b3=_0x2a330a[_0x23e39e];return _0xfc91b3;},_0x23e3(_0x404109,_0x39e479);}async function sleepFor(_0x28e09a){return new Promise(_0x4b2673=>setTimeout(_0x4b2673,_0x28e09a));}exports['sleepFor']=sleepFor;function sleepImmediate(){return new Promise(_0x306390=>setImmediate(_0x306390));}exports['sleepImmediate']=sleepImmediate;function XSleepFor(_0x54bbd5){let _0x434833;const _0xc65ffa=new Promise(_0x47585a=>{_0x434833=setTimeout(_0x47585a,_0x54bbd5);});return{'promise':_0xc65ffa,'timerId':_0x434833};}exports['XSleepFor']=XSleepFor;function identifyProvider(_0x5e7d37){const _0x154123=Object['getPrototypeOf'](_0x5e7d37);if(_0x5e7d37['Query']?.['prototype']||Object['keys'](_0x5e7d37)['includes']('database')||_0x154123['name']==='Pool')return'postgres';else{if(_0x5e7d37['toString']()['toLowerCase']()['includes']('nats'))return'nats';else{if('defineCommand'in _0x154123||Object['keys'](_0x154123)['includes']('multi'))return'ioredis';else{if(Object['keys'](_0x154123)['includes']('Multi'))return'redis';}}}if(_0x5e7d37['constructor']){if(_0x5e7d37['constructor']['name']==='Redis'||_0x5e7d37['constructor']['name']==='EventEmitter'){if('hset'in _0x5e7d37)return'ioredis';}else{if(_0x5e7d37['constructor']['name']==='ProviderClient'||_0x5e7d37['constructor']['name']==='Commander'){if('HSET'in _0x5e7d37)return'redis';}}}let _0x1d3030=null;if(Object['keys'](_0x5e7d37)['includes']('connection')||!isNaN(_0x5e7d37['totalCount'])&&!isNaN(_0x5e7d37['idleCount']))_0x1d3030='postgres';else{if(Object['keys'](_0x5e7d37)['includes']('Pipeline'))_0x1d3030='ioredis';else{if(Object['keys'](_0x5e7d37)['includes']('createClient'))_0x1d3030='redis';else _0x154123['constructor']['toString']()['includes']('NatsConnectionImpl')&&(_0x1d3030='nats');}}return _0x1d3030;}exports['identifyProvider']=identifyProvider,exports['polyfill']={'resolveActivityType'(_0x5000bf){return _0x5000bf==='activity'?'hook':_0x5000bf;},'providerConfig'(_0x37d3dc){return _0x37d3dc?.['connection']??_0x37d3dc?.['redis']??_0x37d3dc?.['connections'];},'meshDataConfig'(_0x215a51){return{..._0x215a51['connection']};}};function matchesStatusCode(_0x1c2a12,_0x28017b){if(typeof _0x28017b==='string'){const _0x2db424='^'+_0x28017b['replace'](/\*/g,'\x5cd')+'$';return new RegExp(_0x2db424)['test'](_0x1c2a12['toString']());}return _0x28017b['test'](_0x1c2a12['toString']());}exports['matchesStatusCode']=matchesStatusCode;function matchesStatus(_0x1eeb17,_0x2daaef){return _0x1eeb17===_0x2daaef;}exports['matchesStatus']=matchesStatus;function findTopKey(_0x1c1286,_0x27b0b4){for(const [_0x48e854,_0x2db75c]of Object['entries'](_0x1c1286)){if(_0x2db75c['hasOwnProperty'](_0x27b0b4)){const _0xe0a66c=findTopKey(_0x1c1286,_0x48e854['replace'](/^\./,''));return(_0xe0a66c||_0x48e854)['replace'](/^\./,'');}}return null;}exports['findTopKey']=findTopKey;function findSubscriptionForTrigger(_0x4e2208,_0x3c77af){for(const [_0x7f30b2,_0x2c5b42]of Object['entries'](_0x4e2208)){if(_0x2c5b42===_0x3c77af)return _0x7f30b2;}return null;}exports['findSubscriptionForTrigger']=findSubscriptionForTrigger;async function getSubscriptionTopic(_0xf9c115,_0x2e0f34,_0x435418){const _0x214cee=await _0x2e0f34['getTransitions'](_0x435418),_0x5cc93f=await _0x2e0f34['getSubscriptions'](_0x435418),_0x3d4e56=findTopKey(_0x214cee,_0xf9c115),_0x179088=findSubscriptionForTrigger(_0x5cc93f,_0x3d4e56);return _0x179088;}exports['getSubscriptionTopic']=getSubscriptionTopic;function getTimeSeries(_0x5dd000){if(_0x5dd000['toString']()==='infinity')return'0';const _0x9cbbea=new Date(),_0x2e6241=_0x5dd000['slice'](-0x1),_0x153620=parseInt(_0x5dd000['slice'](0x0,-0x1),0xa);if(_0x2e6241==='m'){const _0x2317e8=Math['floor'](_0x9cbbea['getMinutes']()/_0x153620)*_0x153620;_0x9cbbea['setUTCMinutes'](_0x2317e8,0x0,0x0);}else _0x2e6241==='h'&&_0x9cbbea['setUTCMinutes'](0x0,0x0,0x0);return _0x9cbbea['toISOString']()['replace'](/:\d\d\..+|-|T/g,'')['replace'](':','');}exports['getTimeSeries']=getTimeSeries;function formatISODate(_0x20a282){const _0x27498a=_0x20a282 instanceof Date?_0x20a282:new Date(_0x20a282);return _0x27498a['toISOString']()['replace'](/[:TZ-]/g,'');}exports['formatISODate']=formatISODate;function getSymKey(_0xb56d2f){const _0x24bd3b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x268729=_0x24bd3b['length'];if(_0xb56d2f<0x0||_0xb56d2f>=Math['pow'](_0x268729,0x3))throw new Error('Number\x20out\x20of\x20range');const [_0x5eae73,_0x2d80a3]=divmod(_0xb56d2f,_0x268729),[_0x5d93af,_0x59d7e1]=divmod(_0x5eae73,_0x268729);return _0x24bd3b[_0x5d93af]+_0x24bd3b[_0x2d80a3]+_0x24bd3b[_0x59d7e1];}exports['getSymKey']=getSymKey;function getSymVal(_0x165c47){const _0x59fbfe='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x570ab8=_0x59fbfe['length'];if(_0x165c47<0x0||_0x165c47>=Math['pow'](_0x570ab8,0x2))throw new Error('Number\x20out\x20of\x20range');const [_0x40eb29,_0x32f259]=divmod(_0x165c47,_0x570ab8);return _0x59fbfe[_0x40eb29]+_0x59fbfe[_0x32f259];}exports['getSymVal']=getSymVal;function divmod(_0x473e06,_0x5a2fc4){return[Math['floor'](_0x473e06/_0x5a2fc4),_0x473e06%_0x5a2fc4];}function _0x2a33(){const _0x5e3d23=['21eUKyta','2952792CAyqsO','7268148iqNBMF','69603ykYyDq','1923064lHkKEY','1110Inehtl','4203855gHvvni','1307PLhijM','136JEPVDf','4744611ZzyTdi','10zQxXoR'];_0x2a33=function(){return _0x5e3d23;};return _0x2a33();}function getIndexedHash(_0x302685,_0x5e7290){const _0x1ea2af=_0x302685[_0x5e7290]||0x0,_0x1d5119={..._0x302685};return delete _0x1d5119[_0x5e7290],[_0x1ea2af,_0x1d5119];}exports['getIndexedHash']=getIndexedHash;function getValueByPath(_0xd08797,_0x384985){const _0x1f040d=_0x384985['split']('/');let _0x38dad0=_0xd08797;for(const _0x3ddd3b of _0x1f040d){if(_0x38dad0[_0x3ddd3b]!==undefined)_0x38dad0=_0x38dad0[_0x3ddd3b];else return undefined;}return _0x38dad0;}exports['getValueByPath']=getValueByPath;function restoreHierarchy(_0x1b3349){const _0x4102fe={};for(const _0x48cb78 in _0x1b3349){if(_0x1b3349[_0x48cb78]===undefined)continue;const _0x473a31=_0x48cb78['split']('/');let _0x42a948=_0x4102fe;for(let _0x475371=0x0;_0x475371<_0x473a31['length'];_0x475371++){_0x475371===_0x473a31['length']-0x1?_0x42a948[_0x473a31[_0x475371]]=_0x1b3349[_0x48cb78]:(_0x42a948[_0x473a31[_0x475371]]=_0x42a948[_0x473a31[_0x475371]]||{},_0x42a948=_0x42a948[_0x473a31[_0x475371]]);}}return _0x4102fe;}exports['restoreHierarchy']=restoreHierarchy;function isValidCron(_0x56b8cc){const _0x4d57b2=/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/;return _0x4d57b2['test'](_0x56b8cc);}exports['isValidCron']=isValidCron;const s=_0x220334=>{return(0x0,ms_1['default'])(_0x220334)/0x3e8;};exports['s']=s;const parseStreamMessage=_0x3ab92d=>{try{return JSON['parse'](_0x3ab92d);}catch(_0x2671a7){logger['error']('Error\x20parsing\x20Stream\x20message',{..._0x2671a7});throw _0x2671a7;}};exports['parseStreamMessage']=parseStreamMessage;const isStreamMessage=_0x183851=>{return Array['isArray'](_0x183851)&&Array['isArray'](_0x183851[0x0]);};exports['isStreamMessage']=isStreamMessage;const arrayToHash=_0x51f227=>{const _0x1d1c52=[];let _0x42af49;for(let _0x59966e=0x1;_0x59966e<_0x51f227['length'];_0x59966e++){const _0x5b4d6d=_0x51f227[_0x59966e],_0x9e1bf5={};if(Array['isArray'](_0x5b4d6d)){for(let _0x3e5625=0x0;_0x3e5625<_0x5b4d6d['length'];_0x3e5625+=0x2){const _0x10f177=_0x5b4d6d[_0x3e5625],_0x3c6179=_0x5b4d6d[_0x3e5625+0x1];_0x9e1bf5[_0x10f177]=_0x3c6179;}_0x42af49&&(_0x9e1bf5['$']=_0x42af49),_0x1d1c52['push'](_0x9e1bf5),_0x42af49=undefined;}else _0x42af49=_0x5b4d6d;}return _0x1d1c52;};exports['arrayToHash']=arrayToHash;
1
+ 'use strict';(function(_0x1439a2,_0x33944d){const _0x28d9a8=_0x4df4,_0x506dbd=_0x1439a2();while(!![]){try{const _0x507893=-parseInt(_0x28d9a8(0xed))/0x1*(-parseInt(_0x28d9a8(0xee))/0x2)+-parseInt(_0x28d9a8(0xef))/0x3*(parseInt(_0x28d9a8(0xf6))/0x4)+-parseInt(_0x28d9a8(0xf5))/0x5*(parseInt(_0x28d9a8(0xec))/0x6)+parseInt(_0x28d9a8(0xf1))/0x7+-parseInt(_0x28d9a8(0xea))/0x8*(parseInt(_0x28d9a8(0xf0))/0x9)+-parseInt(_0x28d9a8(0xeb))/0xa*(-parseInt(_0x28d9a8(0xf3))/0xb)+parseInt(_0x28d9a8(0xf2))/0xc*(parseInt(_0x28d9a8(0xf4))/0xd);if(_0x507893===_0x33944d)break;else _0x506dbd['push'](_0x506dbd['shift']());}catch(_0x22a5a3){_0x506dbd['push'](_0x506dbd['shift']());}}}(_0x3e73,0xab7ce));function _0x4df4(_0x52d05d,_0x3b2a82){const _0x3e73b3=_0x3e73();return _0x4df4=function(_0x4df4e0,_0x5670fc){_0x4df4e0=_0x4df4e0-0xea;let _0x1b9e27=_0x3e73b3[_0x4df4e0];return _0x1b9e27;},_0x4df4(_0x52d05d,_0x3b2a82);}var __importDefault=this&&this['__importDefault']||function(_0xe2f9){return _0xe2f9&&_0xe2f9['__esModule']?_0xe2f9:{'default':_0xe2f9};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['arrayToHash']=exports['isStreamMessage']=exports['parseStreamMessage']=exports['s']=exports['isValidCron']=exports['restoreHierarchy']=exports['getValueByPath']=exports['getIndexedHash']=exports['getSymVal']=exports['getSymKey']=exports['formatISODate']=exports['getTimeSeries']=exports['getSubscriptionTopic']=exports['findSubscriptionForTrigger']=exports['findTopKey']=exports['matchesStatus']=exports['matchesStatusCode']=exports['polyfill']=exports['identifyProvider']=exports['XSleepFor']=exports['sleepImmediate']=exports['sleepFor']=exports['guid']=exports['deterministicRandom']=exports['deepCopy']=exports['getSystemHealth']=exports['hashOptions']=void 0x0;const os_1=__importDefault(require('os')),crypto_1=require('crypto'),nanoid_1=require('nanoid'),ms_1=__importDefault(require('ms')),logger_1=require('../services/logger'),enums_1=require('./enums'),logger=new logger_1['LoggerService']('hotmesh','utils'),hashOptions=_0x32c824=>{const _0x1a3e18=JSON['stringify'](_0x32c824);return(0x0,crypto_1['createHash'])('sha256')['update'](_0x1a3e18)['digest']('hex');};exports['hashOptions']=hashOptions;async function getSystemHealth(){const _0x5479d5=os_1['default']['totalmem'](),_0x176016=os_1['default']['freemem'](),_0x3b213c=_0x5479d5-_0x176016,_0x2a76cb={'TotalMemoryGB':(_0x5479d5/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','FreeMemoryGB':(_0x176016/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','UsedMemoryGB':(_0x3b213c/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};return _0x2a76cb;}exports['getSystemHealth']=getSystemHealth;function deepCopy(_0x43845d){return JSON['parse'](JSON['stringify'](_0x43845d));}exports['deepCopy']=deepCopy;function deterministicRandom(_0x278075){const _0x2df795=Math['sin'](_0x278075)*0x2710;return _0x2df795-Math['floor'](_0x2df795);}exports['deterministicRandom']=deterministicRandom;function guid(_0x4e247f=enums_1['HMSH_GUID_SIZE']){return'H'+(0x0,nanoid_1['nanoid'])(_0x4e247f);}exports['guid']=guid;async function sleepFor(_0xaaedbf){return new Promise(_0x1b5efa=>setTimeout(_0x1b5efa,_0xaaedbf));}exports['sleepFor']=sleepFor;function sleepImmediate(){return new Promise(_0x49cc6c=>setImmediate(_0x49cc6c));}exports['sleepImmediate']=sleepImmediate;function XSleepFor(_0x5e7537){let _0x686e87;const _0x48397f=new Promise(_0x50089e=>{_0x686e87=setTimeout(_0x50089e,_0x5e7537);});return{'promise':_0x48397f,'timerId':_0x686e87};}exports['XSleepFor']=XSleepFor;function identifyProvider(_0x447419){const _0x2d07bb=Object['getPrototypeOf'](_0x447419);if(_0x447419['Query']?.['prototype']||Object['keys'](_0x447419)['includes']('database')||_0x2d07bb['name']==='Pool')return'postgres';else{if(_0x447419['toString']()['toLowerCase']()['includes']('nats'))return'nats';else{if('defineCommand'in _0x2d07bb||Object['keys'](_0x2d07bb)['includes']('multi'))return'ioredis';else{if(Object['keys'](_0x2d07bb)['includes']('Multi'))return'redis';}}}if(_0x447419['constructor']){if(_0x447419['constructor']['name']==='Redis'||_0x447419['constructor']['name']==='EventEmitter'){if('hset'in _0x447419)return'ioredis';}else{if(_0x447419['constructor']['name']==='ProviderClient'||_0x447419['constructor']['name']==='Commander'){if('HSET'in _0x447419)return'redis';}}}let _0x656119=null;if(Object['keys'](_0x447419)['includes']('connection')||!isNaN(_0x447419['totalCount'])&&!isNaN(_0x447419['idleCount']))_0x656119='postgres';else{if(Object['keys'](_0x447419)['includes']('Pipeline'))_0x656119='ioredis';else{if(Object['keys'](_0x447419)['includes']('createClient'))_0x656119='redis';else _0x2d07bb['constructor']['toString']()['includes']('NatsConnectionImpl')&&(_0x656119='nats');}}return _0x656119;}exports['identifyProvider']=identifyProvider,exports['polyfill']={'resolveActivityType'(_0x4337e7){return _0x4337e7==='activity'?'hook':_0x4337e7;},'providerConfig'(_0x13dfc9){return _0x13dfc9?.['connection']??_0x13dfc9?.['redis']??_0x13dfc9?.['connections'];},'meshDataConfig'(_0x1bb5b4){return{..._0x1bb5b4['connection']};}};function matchesStatusCode(_0xa1ff74,_0x561a33){if(typeof _0x561a33==='string'){const _0x282c8a='^'+_0x561a33['replace'](/\*/g,'\x5cd')+'$';return new RegExp(_0x282c8a)['test'](_0xa1ff74['toString']());}return _0x561a33['test'](_0xa1ff74['toString']());}exports['matchesStatusCode']=matchesStatusCode;function matchesStatus(_0x1a60e2,_0x50666b){return _0x1a60e2===_0x50666b;}exports['matchesStatus']=matchesStatus;function findTopKey(_0x3f242f,_0x2a6c74){for(const [_0x1c55ca,_0x19cc4e]of Object['entries'](_0x3f242f)){if(_0x19cc4e['hasOwnProperty'](_0x2a6c74)){const _0x590259=findTopKey(_0x3f242f,_0x1c55ca['replace'](/^\./,''));return(_0x590259||_0x1c55ca)['replace'](/^\./,'');}}return null;}function _0x3e73(){const _0x16f794=['165DHBNcc','614445FpXZQL','1765255xRYFfG','3908668BMwHuM','2920672iChPlY','918870cWvwBZ','6heMNPa','72bdJrBa','20406nmIzqA','3uAARNL','27AcmKTb','5781321Tpfsej','48IrrfLo'];_0x3e73=function(){return _0x16f794;};return _0x3e73();}exports['findTopKey']=findTopKey;function findSubscriptionForTrigger(_0x2b8789,_0x28fb14){for(const [_0x5ea96a,_0x33d06d]of Object['entries'](_0x2b8789)){if(_0x33d06d===_0x28fb14)return _0x5ea96a;}return null;}exports['findSubscriptionForTrigger']=findSubscriptionForTrigger;async function getSubscriptionTopic(_0x4bf181,_0x2aaf9e,_0x16d40b){const _0x49aa91=await _0x2aaf9e['getTransitions'](_0x16d40b),_0x5c0309=await _0x2aaf9e['getSubscriptions'](_0x16d40b),_0x506a33=findTopKey(_0x49aa91,_0x4bf181),_0x12aba4=findSubscriptionForTrigger(_0x5c0309,_0x506a33);return _0x12aba4;}exports['getSubscriptionTopic']=getSubscriptionTopic;function getTimeSeries(_0x67cd0e){if(_0x67cd0e['toString']()==='infinity')return'0';const _0x1d276c=new Date(),_0x8fe524=_0x67cd0e['slice'](-0x1),_0x2c07ad=parseInt(_0x67cd0e['slice'](0x0,-0x1),0xa);if(_0x8fe524==='m'){const _0x1ff279=Math['floor'](_0x1d276c['getMinutes']()/_0x2c07ad)*_0x2c07ad;_0x1d276c['setUTCMinutes'](_0x1ff279,0x0,0x0);}else _0x8fe524==='h'&&_0x1d276c['setUTCMinutes'](0x0,0x0,0x0);return _0x1d276c['toISOString']()['replace'](/:\d\d\..+|-|T/g,'')['replace'](':','');}exports['getTimeSeries']=getTimeSeries;function formatISODate(_0x36041f){const _0x1a8797=_0x36041f instanceof Date?_0x36041f:new Date(_0x36041f);return _0x1a8797['toISOString']()['replace'](/[:TZ-]/g,'');}exports['formatISODate']=formatISODate;function getSymKey(_0x4cf3a5){const _0x80032b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x5b3078=_0x80032b['length'];if(_0x4cf3a5<0x0||_0x4cf3a5>=Math['pow'](_0x5b3078,0x3))throw new Error('Number\x20out\x20of\x20range');const [_0x4f6a88,_0x4f2387]=divmod(_0x4cf3a5,_0x5b3078),[_0xd97a1c,_0x35c7e8]=divmod(_0x4f6a88,_0x5b3078);return _0x80032b[_0xd97a1c]+_0x80032b[_0x4f2387]+_0x80032b[_0x35c7e8];}exports['getSymKey']=getSymKey;function getSymVal(_0x5b85df){const _0x116b37='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x32c6cd=_0x116b37['length'];if(_0x5b85df<0x0||_0x5b85df>=Math['pow'](_0x32c6cd,0x2))throw new Error('Number\x20out\x20of\x20range');const [_0x4cd809,_0xa6318c]=divmod(_0x5b85df,_0x32c6cd);return _0x116b37[_0x4cd809]+_0x116b37[_0xa6318c];}exports['getSymVal']=getSymVal;function divmod(_0x3b6811,_0x57606c){return[Math['floor'](_0x3b6811/_0x57606c),_0x3b6811%_0x57606c];}function getIndexedHash(_0x2ce3ea,_0x3b0b6a){const _0xc891da=_0x2ce3ea[_0x3b0b6a]||0x0,_0x3d3c9d={..._0x2ce3ea};return delete _0x3d3c9d[_0x3b0b6a],[_0xc891da,_0x3d3c9d];}exports['getIndexedHash']=getIndexedHash;function getValueByPath(_0x233352,_0x41a3ae){const _0x369fb1=_0x41a3ae['split']('/');let _0x49ef5c=_0x233352;for(const _0x1d08ae of _0x369fb1){if(_0x49ef5c[_0x1d08ae]!==undefined)_0x49ef5c=_0x49ef5c[_0x1d08ae];else return undefined;}return _0x49ef5c;}exports['getValueByPath']=getValueByPath;function restoreHierarchy(_0x2748ac){const _0x2b12a6={};for(const _0x39f37c in _0x2748ac){if(_0x2748ac[_0x39f37c]===undefined)continue;const _0xc11640=_0x39f37c['split']('/');let _0x5f5152=_0x2b12a6;for(let _0x163146=0x0;_0x163146<_0xc11640['length'];_0x163146++){_0x163146===_0xc11640['length']-0x1?_0x5f5152[_0xc11640[_0x163146]]=_0x2748ac[_0x39f37c]:(_0x5f5152[_0xc11640[_0x163146]]=_0x5f5152[_0xc11640[_0x163146]]||{},_0x5f5152=_0x5f5152[_0xc11640[_0x163146]]);}}return _0x2b12a6;}exports['restoreHierarchy']=restoreHierarchy;function isValidCron(_0x248135){const _0x28492e=/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/;return _0x28492e['test'](_0x248135);}exports['isValidCron']=isValidCron;const s=_0x562cb7=>{return(0x0,ms_1['default'])(_0x562cb7)/0x3e8;};exports['s']=s;const parseStreamMessage=_0x21f062=>{try{return JSON['parse'](_0x21f062);}catch(_0x8a9a){logger['error']('Error\x20parsing\x20Stream\x20message',{..._0x8a9a});throw _0x8a9a;}};exports['parseStreamMessage']=parseStreamMessage;const isStreamMessage=_0x455d67=>{return Array['isArray'](_0x455d67)&&Array['isArray'](_0x455d67[0x0]);};exports['isStreamMessage']=isStreamMessage;const arrayToHash=_0x206a60=>{const _0x2385c1=[];let _0x1b2ac5;for(let _0x5090b3=0x1;_0x5090b3<_0x206a60['length'];_0x5090b3++){const _0x41756e=_0x206a60[_0x5090b3],_0x5e012e={};if(Array['isArray'](_0x41756e)){for(let _0x9e918c=0x0;_0x9e918c<_0x41756e['length'];_0x9e918c+=0x2){const _0x2f3655=_0x41756e[_0x9e918c],_0x5ee314=_0x41756e[_0x9e918c+0x1];_0x5e012e[_0x2f3655]=_0x5ee314;}_0x1b2ac5&&(_0x5e012e['$']=_0x1b2ac5),_0x2385c1['push'](_0x5e012e),_0x1b2ac5=undefined;}else _0x1b2ac5=_0x41756e;}return _0x2385c1;};exports['arrayToHash']=arrayToHash;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.3.21",
3
+ "version": "0.3.22",
4
4
  "description": "Serverless Workflow",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -1 +1 @@
1
- 'use strict';(function(_0x7239e3,_0x211c3f){const _0x13831b=_0x2cf1,_0x5c3d3e=_0x7239e3();while(!![]){try{const _0x1f72c4=parseInt(_0x13831b(0x15d))/0x1+-parseInt(_0x13831b(0x15e))/0x2*(parseInt(_0x13831b(0x15f))/0x3)+parseInt(_0x13831b(0x160))/0x4+parseInt(_0x13831b(0x161))/0x5+-parseInt(_0x13831b(0x163))/0x6+parseInt(_0x13831b(0x162))/0x7+-parseInt(_0x13831b(0x164))/0x8;if(_0x1f72c4===_0x211c3f)break;else _0x5c3d3e['push'](_0x5c3d3e['shift']());}catch(_0x33b59d){_0x5c3d3e['push'](_0x5c3d3e['shift']());}}}(_0x1fe2,0x44669));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 _0x2cf1(_0x5dcbdd,_0x2ad6e0){const _0x1fe2d8=_0x1fe2();return _0x2cf1=function(_0x2cf1e7,_0xfd33ee){_0x2cf1e7=_0x2cf1e7-0x15d;let _0x5bea8e=_0x1fe2d8[_0x2cf1e7];return _0x5bea8e;},_0x2cf1(_0x5dcbdd,_0x2ad6e0);}class Activity{constructor(_0x55a9ce,_0x1fa7ef,_0x407e26,_0x41f0d0,_0x37a2bc,_0xdbea53){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x55a9ce,this['data']=_0x1fa7ef,this['metadata']=_0x407e26,this['hook']=_0x41f0d0,this['engine']=_0x37a2bc,this['context']=_0xdbea53||{'data':{},'metadata':{}},this['logger']=_0x37a2bc['logger'],this['store']=_0x37a2bc['store'];}['setLeg'](_0x46be97){this['leg']=_0x46be97;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0xadfad6=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0xadfad6!==undefined&&!isNaN(Number(_0xadfad6)))return _0xadfad6;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x392696=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x392696);}catch(_0x1c2ed5){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x392696>0x0){if(this['context']['metadata']['js']===_0x392696){const _0x5b4c9c=await this['setStatus'](-_0x392696);Number(_0x5b4c9c)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x1c2ed5;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0xde12fb=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,_0xde12fb);}async['processEvent'](_0x5916bd=stream_1['StreamStatus']['SUCCESS'],_0x2a2d33=0xc8,_0x1e8a93='output'){this['setLeg'](0x2);const _0x2a02b9=this['context']['metadata']['jid'];if(!_0x2a02b9){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x407eeb=this['metadata']['aid'];this['status']=_0x5916bd,this['code']=_0x2a2d33,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x2a02b9,'aid':_0x407eeb,'status':_0x5916bd,'code':_0x2a2d33});let _0x3057f9;try{const _0x56fe50=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x56fe50),_0x3057f9=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x3057f9['startActivitySpan'](this['leg']);let _0x59dcfc;if(_0x5916bd===stream_1['StreamStatus']['PENDING'])_0x59dcfc=await this['processPending'](_0x1e8a93);else _0x5916bd===stream_1['StreamStatus']['SUCCESS']?_0x59dcfc=await this['processSuccess'](_0x1e8a93):_0x59dcfc=await this['processError']();this['transitionAdjacent'](_0x59dcfc,_0x3057f9);}catch(_0x3a5901){if(_0x3a5901 instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x3a5901['fault']+'-error',{..._0x3a5901});return;}else{if(_0x3a5901 instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x3a5901});return;}else{if(_0x3a5901 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x3a5901});return;}else{if(_0x3a5901 instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x3a5901});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x3a5901,'message':_0x3a5901['message'],'stack':_0x3a5901['stack'],'name':_0x3a5901['name']}),_0x3057f9?.['setActivityError'](_0x3a5901['message']);throw _0x3a5901;}finally{_0x3057f9?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x2a02b9,'aid':_0x407eeb});}}async['processPending'](_0x2a6270){this['bindActivityData'](_0x2a6270),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0xa3e4c1=this['store']['transact']();return await this['setState'](_0xa3e4c1),await collator_1['CollatorService']['notarizeContinuation'](this,_0xa3e4c1),await this['setStatus'](this['adjacencyList']['length'],_0xa3e4c1),await _0xa3e4c1['exec']();}async['processSuccess'](_0x253cbd){this['bindActivityData'](_0x253cbd),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x459ca8=this['store']['transact']();return await this['setState'](_0x459ca8),await collator_1['CollatorService']['notarizeCompletion'](this,_0x459ca8),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x459ca8),await _0x459ca8['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0x20ea1b=this['store']['transact']();return await this['setState'](_0x20ea1b),await collator_1['CollatorService']['notarizeCompletion'](this,_0x20ea1b),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x20ea1b),await _0x20ea1b['exec']();}async['transitionAdjacent'](_0x54e023,_0x412b16){_0x412b16['mapActivityAttributes']();const _0x2a02e5=this['resolveStatus'](_0x54e023),_0x73ee30={'app.job.jss':_0x2a02e5},_0x208d5d=await this['transition'](this['adjacencyList'],_0x2a02e5);_0x208d5d?.['length']&&(_0x73ee30['app.activity.mids']=_0x208d5d['join'](',')),_0x412b16['setActivityAttributes'](_0x73ee30);}['resolveStatus'](_0x15cfc0){const _0x116d1f=_0x15cfc0[_0x15cfc0['length']-0x1];return Array['isArray'](_0x116d1f)?Number(_0x116d1f[0x1]):Number(_0x116d1f);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x247c49=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x32df9b=_0x247c49['mapRules']();if(_0x32df9b)for(const _0x1c478c in _0x32df9b){const _0x13f701=_0x1c478c['indexOf']('[');if(_0x13f701>-0x1){const _0x144b4b=_0x1c478c['substring'](_0x13f701+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x144b4b))){const _0x12cbc1=_0x1c478c['substring'](0x0,_0x13f701);_0x32df9b[_0x12cbc1]=_0x32df9b[_0x1c478c],delete _0x32df9b[_0x1c478c];}else{if(_0x144b4b==='-'||_0x144b4b==='_'){const _0x500e7f=_0x32df9b[_0x1c478c];Object['keys'](_0x500e7f)['forEach'](_0x4a526e=>{_0x32df9b[_0x4a526e]=_0x500e7f[_0x4a526e];});}}}}this['context']['data']=_0x32df9b;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x27e256=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x27e256['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x557300=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x4e2321=_0x557300['mapRules'](),_0x3c34ee=this['metadata']['aid'],_0xc440d0={...this['context'][_0x3c34ee]['output'],..._0x4e2321};this['context'][_0x3c34ee]['output']['data']=_0xc440d0;}}async['registerTimeout'](){}['bindActivityError'](_0xccf76d){const _0x12bf37=this['context'][this['metadata']['aid']]['output']['metadata'];_0x12bf37['err']=JSON['stringify'](this['data']),_0x12bf37['$error']={..._0xccf76d,'is_stream_error':!![]};}['bindJobError'](_0x39566b){this['context']['metadata']['err']=JSON['stringify']({..._0x39566b,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0x4a94b0,_0x245bf9){const {id:_0x37cab8}=await this['engine']['getVID']();return await this['store']['setStatus'](_0x4a94b0,this['context']['metadata']['jid'],_0x37cab8,_0x245bf9);}['authorizeEntry'](_0x376c43){return this['adjacencyList']?.['map'](_0x246a94=>{const {metadata:{aid:_0x43a665}}=_0x246a94;return _0x376c43[_0x43a665+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x43a665;})??[];}['bindDimensionalAddress'](_0x44b3fe){const _0x1be944=this['resolveDad']();_0x44b3fe[this['metadata']['aid']+'/output/metadata/dad']=_0x1be944;}async['setState'](_0x1e38e4){const _0x4765b3=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x200454={};await this['bindJobState'](_0x200454);const _0x415abc=this['authorizeEntry'](_0x200454);this['bindDimensionalAddress'](_0x200454),this['bindActivityState'](_0x200454);const _0x301be0=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x415abc],_0x24bd65=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x200454,this['getJobStatus'](),_0x4765b3,_0x301be0,_0x24bd65,_0x1e38e4);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x24b394=this['context']['$self'];!_0x24b394['output']['metadata']&&(_0x24b394['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x24b394['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x545af5=(0x0,utils_1['formatISODate'])(new Date());_0x24b394['output']['metadata']['ac']=_0x545af5,_0x24b394['output']['metadata']['au']=_0x545af5,_0x24b394['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x24b394['output']['metadata']['stp']=this['config']['subtype']),_0x24b394['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x1ca533){const _0x2c4057=await this['getTriggerConfig'](),_0x73605a=[..._0x2c4057['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x511349 of _0x73605a){const _0x36996a=(0x0,utils_1['getValueByPath'])(this['context'],_0x511349);_0x36996a!==undefined&&(_0x1ca533[_0x511349]=_0x36996a);}for(const _0x3d0e83 in this['context']?.['data']??{}){(_0x3d0e83['startsWith']('-')||_0x3d0e83['startsWith']('_'))&&(_0x1ca533[_0x3d0e83]=this['context']['data'][_0x3d0e83]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x1ca533,this['config'],this['context']);}['bindActivityState'](_0x499c09){const _0x590fd6=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0x52bd4e of _0x590fd6){const _0x1aff3c=this['metadata']['aid']+'/'+_0x52bd4e,_0x469cc9=(0x0,utils_1['getValueByPath'])(this['context'],_0x1aff3c);_0x469cc9!==undefined&&(_0x499c09[_0x1aff3c]=_0x469cc9);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x499c09,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x102f2f=>'metadata/'+_0x102f2f);}['bindActivityMetadataPaths'](){const _0x249022=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x249022]['KEYS']['map'](_0xb0f9bf=>'output/metadata/'+_0xb0f9bf);}async['getState'](){const _0x52834a=this['context']['metadata']['gid'],_0x30482e='$'+this['config']['subscribes'],_0x2b0084={[_0x30482e]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x2b736f=>'metadata/'+_0x2b736f)};for(let [_0x2e9702,_0x1e8b2b]of Object['entries'](this['config']['consumes'])){if(_0x2e9702==='$job')for(const _0x2f5bc1 of _0x1e8b2b){_0x2b0084[_0x30482e]['push'](_0x2f5bc1);}else{_0x2e9702==='$self'&&(_0x2e9702=this['metadata']['aid']);!_0x2b0084[_0x2e9702]&&(_0x2b0084[_0x2e9702]=[]);for(const _0x26c1d0 of _0x1e8b2b){_0x2b0084[_0x2e9702]['push'](_0x2e9702+'/'+_0x26c1d0);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0x2b0084,this['config'],this['metadata'],this['leg']);const {dad:_0x57b330,jid:_0x5be784}=this['context']['metadata'],_0x3de790=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x57b330||''),[_0x460152,_0x14fa86]=await this['store']['getState'](_0x5be784,_0x2b0084,_0x3de790);this['context']=(0x0,utils_1['restoreHierarchy'])(_0x460152),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x52834a),this['initDimensionalAddress'](_0x57b330),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x1f6e80,_0x4171b0){if(_0x4171b0!==_0x1f6e80)throw new errors_1['GenerationalError'](_0x1f6e80,_0x4171b0,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0x41bbea){this['metadata']['dad']=_0x41bbea;}['initSelf'](_0x53f038){const _0x34555b=this['metadata']['aid'];!_0x53f038[_0x34555b]&&(_0x53f038[_0x34555b]={});const _0x5e7298=_0x53f038[_0x34555b];return!_0x5e7298['output']&&(_0x5e7298['output']={}),!_0x5e7298['input']&&(_0x5e7298['input']={}),!_0x5e7298['hook']&&(_0x5e7298['hook']={}),!_0x5e7298['output']['metadata']&&(_0x5e7298['output']['metadata']={}),_0x5e7298['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x53f038['$self']=_0x5e7298,_0x53f038['$job']=_0x53f038,_0x53f038;}['initPolicies'](_0x5f387){const _0x219603=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0x5f387);_0x5f387['metadata']['expire']=_0x219603;if(this['config']['persistent']!=undefined){const _0x9629fb=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0x5f387);_0x5f387['metadata']['persistent']=_0x9629fb;}}['bindActivityData'](_0x4499ff){this['context'][this['metadata']['aid']][_0x4499ff]['data']=this['data'];}['resolveDad'](){let _0x40e148=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x40e148=_0x40e148['substring'](0x0,_0x40e148['lastIndexOf'](','))+','+this['adjacentIndex']),_0x40e148;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x375176=[],_0x5262b0=await this['store']['getTransitions'](await this['engine']['getVID']()),_0x4fdbf3=_0x5262b0['.'+this['metadata']['aid']],_0xdc158f=this['resolveAdjacentDad']();if(_0x4fdbf3)for(const _0x3fe1d4 in _0x4fdbf3){const _0x177cc7=_0x4fdbf3[_0x3fe1d4];mapper_1['MapperService']['evaluate'](_0x177cc7,this['context'],this['code'])&&_0x375176['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0xdc158f,'aid':_0x3fe1d4,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x375176;}['isJobComplete'](_0x29c380){return _0x29c380<=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'](_0x4ba0ef,_0x5d804a){if(this['jobWasInterrupted'](_0x5d804a))return;let _0x19f1ee=[];(this['shouldEmit']()||this['isJobComplete'](_0x5d804a)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x5d804a)&&!this['shouldPersistJob']()});if(_0x4ba0ef['length']&&!this['isJobComplete'](_0x5d804a)){const _0x46edf1=this['store']['transact']();for(const _0x38b12f of _0x4ba0ef){await this['engine']['router']?.['publishMessage'](null,_0x38b12f,_0x46edf1);}_0x19f1ee=await _0x46edf1['exec']();}return _0x19f1ee;}['jobWasInterrupted'](_0x17a152){return _0x17a152<-0x5f5e100;}}exports['Activity']=Activity;function _0x1fe2(){const _0x29c550=['5418904hYCziN','408110NpcxnZ','175004OEEodb','9bInBsi','1863468BegikN','1256255yLZNSD','1390158MFuVaW','622704DRUFCw'];_0x1fe2=function(){return _0x29c550;};return _0x1fe2();}
1
+ 'use strict';(function(_0x12a339,_0x1353ef){const _0x5836b8=_0x1c4b,_0x28c1c9=_0x12a339();while(!![]){try{const _0x188332=parseInt(_0x5836b8(0x15b))/0x1*(parseInt(_0x5836b8(0x15a))/0x2)+parseInt(_0x5836b8(0x155))/0x3*(parseInt(_0x5836b8(0x154))/0x4)+parseInt(_0x5836b8(0x158))/0x5+parseInt(_0x5836b8(0x159))/0x6+parseInt(_0x5836b8(0x15e))/0x7*(-parseInt(_0x5836b8(0x153))/0x8)+-parseInt(_0x5836b8(0x157))/0x9*(-parseInt(_0x5836b8(0x15d))/0xa)+parseInt(_0x5836b8(0x156))/0xb*(-parseInt(_0x5836b8(0x15c))/0xc);if(_0x188332===_0x1353ef)break;else _0x28c1c9['push'](_0x28c1c9['shift']());}catch(_0x477300){_0x28c1c9['push'](_0x28c1c9['shift']());}}}(_0x14d3,0x9f426));function _0x1c4b(_0x29794a,_0x5c3976){const _0x14d320=_0x14d3();return _0x1c4b=function(_0x1c4bd6,_0x2761dd){_0x1c4bd6=_0x1c4bd6-0x153;let _0x3d1e04=_0x14d320[_0x1c4bd6];return _0x3d1e04;},_0x1c4b(_0x29794a,_0x5c3976);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Activity']=void 0x0;function _0x14d3(){const _0x544eb2=['104dtXVgl','236FXPkHj','23067ZNIiCs','68233BAEcAb','18GemtGr','466725MpRWur','3994254biaBIj','2jbSIEP','481543cynISr','2292JyUqjY','5607910TzUAbJ','527009poESpC'];_0x14d3=function(){return _0x544eb2;};return _0x14d3();}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(_0x3aed1b,_0x2baf3e,_0x17ffcc,_0x477991,_0x54fb56,_0x3fdffd){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x3aed1b,this['data']=_0x2baf3e,this['metadata']=_0x17ffcc,this['hook']=_0x477991,this['engine']=_0x54fb56,this['context']=_0x3fdffd||{'data':{},'metadata':{}},this['logger']=_0x54fb56['logger'],this['store']=_0x54fb56['store'];}['setLeg'](_0x3128c1){this['leg']=_0x3128c1;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0x2f8d41=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0x2f8d41!==undefined&&!isNaN(Number(_0x2f8d41)))return _0x2f8d41;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x19b21f=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x19b21f);}catch(_0x460874){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x19b21f>0x0){if(this['context']['metadata']['js']===_0x19b21f){const _0x1d85c6=await this['setStatus'](-_0x19b21f);Number(_0x1d85c6)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x460874;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0x13b0f8=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,_0x13b0f8);}async['processEvent'](_0x42a37b=stream_1['StreamStatus']['SUCCESS'],_0x139637=0xc8,_0x5807ca='output'){this['setLeg'](0x2);const _0x2700d1=this['context']['metadata']['jid'];if(!_0x2700d1){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0xa20b0d=this['metadata']['aid'];this['status']=_0x42a37b,this['code']=_0x139637,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x2700d1,'aid':_0xa20b0d,'status':_0x42a37b,'code':_0x139637});let _0x433ba;try{const _0x626453=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x626453),_0x433ba=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x433ba['startActivitySpan'](this['leg']);let _0x494131;if(_0x42a37b===stream_1['StreamStatus']['PENDING'])_0x494131=await this['processPending'](_0x5807ca);else _0x42a37b===stream_1['StreamStatus']['SUCCESS']?_0x494131=await this['processSuccess'](_0x5807ca):_0x494131=await this['processError']();this['transitionAdjacent'](_0x494131,_0x433ba);}catch(_0x3a9d96){if(_0x3a9d96 instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x3a9d96['fault']+'-error',{..._0x3a9d96});return;}else{if(_0x3a9d96 instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x3a9d96});return;}else{if(_0x3a9d96 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x3a9d96});return;}else{if(_0x3a9d96 instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x3a9d96});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x3a9d96,'message':_0x3a9d96['message'],'stack':_0x3a9d96['stack'],'name':_0x3a9d96['name']}),_0x433ba?.['setActivityError'](_0x3a9d96['message']);throw _0x3a9d96;}finally{_0x433ba?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x2700d1,'aid':_0xa20b0d});}}async['processPending'](_0x4ca24b){this['bindActivityData'](_0x4ca24b),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x4b644b=this['store']['transact']();return await this['setState'](_0x4b644b),await collator_1['CollatorService']['notarizeContinuation'](this,_0x4b644b),await this['setStatus'](this['adjacencyList']['length'],_0x4b644b),await _0x4b644b['exec']();}async['processSuccess'](_0x9d8f68){this['bindActivityData'](_0x9d8f68),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x10457a=this['store']['transact']();return await this['setState'](_0x10457a),await collator_1['CollatorService']['notarizeCompletion'](this,_0x10457a),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x10457a),await _0x10457a['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0x44f04c=this['store']['transact']();return await this['setState'](_0x44f04c),await collator_1['CollatorService']['notarizeCompletion'](this,_0x44f04c),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x44f04c),await _0x44f04c['exec']();}async['transitionAdjacent'](_0x202f44,_0x5c604e){_0x5c604e['mapActivityAttributes']();const _0x454889=this['resolveStatus'](_0x202f44),_0x425b6d={'app.job.jss':_0x454889},_0x5f0d69=await this['transition'](this['adjacencyList'],_0x454889);_0x5f0d69?.['length']&&(_0x425b6d['app.activity.mids']=_0x5f0d69['join'](',')),_0x5c604e['setActivityAttributes'](_0x425b6d);}['resolveStatus'](_0x5f2b24){const _0x2e6b63=_0x5f2b24[_0x5f2b24['length']-0x1];return Array['isArray'](_0x2e6b63)?Number(_0x2e6b63[0x1]):Number(_0x2e6b63);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x397382=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x98dd1c=_0x397382['mapRules']();if(_0x98dd1c)for(const _0x5e7317 in _0x98dd1c){const _0x49125d=_0x5e7317['indexOf']('[');if(_0x49125d>-0x1){const _0x3297b2=_0x5e7317['substring'](_0x49125d+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x3297b2))){const _0x41c066=_0x5e7317['substring'](0x0,_0x49125d);_0x98dd1c[_0x41c066]=_0x98dd1c[_0x5e7317],delete _0x98dd1c[_0x5e7317];}else{if(_0x3297b2==='-'||_0x3297b2==='_'){const _0x26d514=_0x98dd1c[_0x5e7317];Object['keys'](_0x26d514)['forEach'](_0x5e162c=>{_0x98dd1c[_0x5e162c]=_0x26d514[_0x5e162c];});}}}}this['context']['data']=_0x98dd1c;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x5bce5f=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x5bce5f['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x74b1b3=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x23791b=_0x74b1b3['mapRules'](),_0x3fd8c8=this['metadata']['aid'],_0x26eb8c={...this['context'][_0x3fd8c8]['output'],..._0x23791b};this['context'][_0x3fd8c8]['output']['data']=_0x26eb8c;}}async['registerTimeout'](){}['bindActivityError'](_0x4161d0){const _0x45aca6=this['context'][this['metadata']['aid']]['output']['metadata'];_0x45aca6['err']=JSON['stringify'](this['data']),_0x45aca6['$error']={..._0x4161d0,'is_stream_error':!![]};}['bindJobError'](_0x4e6600){this['context']['metadata']['err']=JSON['stringify']({..._0x4e6600,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0x570a2e,_0x32aa24){const {id:_0x3eb3d6}=await this['engine']['getVID']();return await this['store']['setStatus'](_0x570a2e,this['context']['metadata']['jid'],_0x3eb3d6,_0x32aa24);}['authorizeEntry'](_0x44d90e){return this['adjacencyList']?.['map'](_0xbff8fe=>{const {metadata:{aid:_0x2902eb}}=_0xbff8fe;return _0x44d90e[_0x2902eb+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x2902eb;})??[];}['bindDimensionalAddress'](_0x1d1e9b){const _0x495a4f=this['resolveDad']();_0x1d1e9b[this['metadata']['aid']+'/output/metadata/dad']=_0x495a4f;}async['setState'](_0x37ea50){const _0x479098=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x3cab1b={};await this['bindJobState'](_0x3cab1b);const _0x540021=this['authorizeEntry'](_0x3cab1b);this['bindDimensionalAddress'](_0x3cab1b),this['bindActivityState'](_0x3cab1b);const _0x24f55f=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x540021],_0xeb6e0d=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x3cab1b,this['getJobStatus'](),_0x479098,_0x24f55f,_0xeb6e0d,_0x37ea50);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x37918e=this['context']['$self'];!_0x37918e['output']['metadata']&&(_0x37918e['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x37918e['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x4ea1d5=(0x0,utils_1['formatISODate'])(new Date());_0x37918e['output']['metadata']['ac']=_0x4ea1d5,_0x37918e['output']['metadata']['au']=_0x4ea1d5,_0x37918e['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x37918e['output']['metadata']['stp']=this['config']['subtype']),_0x37918e['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x2b0678){const _0x41b7fa=await this['getTriggerConfig'](),_0x5cf153=[..._0x41b7fa['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x297577 of _0x5cf153){const _0x11fc0d=(0x0,utils_1['getValueByPath'])(this['context'],_0x297577);_0x11fc0d!==undefined&&(_0x2b0678[_0x297577]=_0x11fc0d);}for(const _0x275a7a in this['context']?.['data']??{}){(_0x275a7a['startsWith']('-')||_0x275a7a['startsWith']('_'))&&(_0x2b0678[_0x275a7a]=this['context']['data'][_0x275a7a]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x2b0678,this['config'],this['context']);}['bindActivityState'](_0x1ce3cb){const _0x136ae7=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0x1911d3 of _0x136ae7){const _0x2fc2e7=this['metadata']['aid']+'/'+_0x1911d3,_0x273c17=(0x0,utils_1['getValueByPath'])(this['context'],_0x2fc2e7);_0x273c17!==undefined&&(_0x1ce3cb[_0x2fc2e7]=_0x273c17);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x1ce3cb,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x1482f8=>'metadata/'+_0x1482f8);}['bindActivityMetadataPaths'](){const _0x2a1d7e=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x2a1d7e]['KEYS']['map'](_0x2d3fee=>'output/metadata/'+_0x2d3fee);}async['getState'](){const _0x356e77=this['context']['metadata']['gid'],_0x5eb7c7='$'+this['config']['subscribes'],_0x48ab06={[_0x5eb7c7]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x392be7=>'metadata/'+_0x392be7)};for(let [_0x12dae9,_0x67bda3]of Object['entries'](this['config']['consumes'])){if(_0x12dae9==='$job')for(const _0x54a5f6 of _0x67bda3){_0x48ab06[_0x5eb7c7]['push'](_0x54a5f6);}else{_0x12dae9==='$self'&&(_0x12dae9=this['metadata']['aid']);!_0x48ab06[_0x12dae9]&&(_0x48ab06[_0x12dae9]=[]);for(const _0x536384 of _0x67bda3){_0x48ab06[_0x12dae9]['push'](_0x12dae9+'/'+_0x536384);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0x48ab06,this['config'],this['metadata'],this['leg']);const {dad:_0x17d833,jid:_0x1743ef}=this['context']['metadata'],_0x1ad9e9=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x17d833||''),[_0x167aa1,_0x518cba]=await this['store']['getState'](_0x1743ef,_0x48ab06,_0x1ad9e9);this['context']=(0x0,utils_1['restoreHierarchy'])(_0x167aa1),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x356e77),this['initDimensionalAddress'](_0x17d833),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x10c2a9,_0xe29c4f){if(_0xe29c4f!==_0x10c2a9)throw new errors_1['GenerationalError'](_0x10c2a9,_0xe29c4f,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0xa47918){this['metadata']['dad']=_0xa47918;}['initSelf'](_0x361a7c){const _0x251f80=this['metadata']['aid'];!_0x361a7c[_0x251f80]&&(_0x361a7c[_0x251f80]={});const _0x4c91d3=_0x361a7c[_0x251f80];return!_0x4c91d3['output']&&(_0x4c91d3['output']={}),!_0x4c91d3['input']&&(_0x4c91d3['input']={}),!_0x4c91d3['hook']&&(_0x4c91d3['hook']={}),!_0x4c91d3['output']['metadata']&&(_0x4c91d3['output']['metadata']={}),_0x4c91d3['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x361a7c['$self']=_0x4c91d3,_0x361a7c['$job']=_0x361a7c,_0x361a7c;}['initPolicies'](_0x4870d5){const _0x2b9ac9=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0x4870d5);_0x4870d5['metadata']['expire']=_0x2b9ac9;if(this['config']['persistent']!=undefined){const _0x17f130=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0x4870d5);_0x4870d5['metadata']['persistent']=_0x17f130;}}['bindActivityData'](_0x31b384){this['context'][this['metadata']['aid']][_0x31b384]['data']=this['data'];}['resolveDad'](){let _0x2ad174=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x2ad174=_0x2ad174['substring'](0x0,_0x2ad174['lastIndexOf'](','))+','+this['adjacentIndex']),_0x2ad174;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x2d33e4=[],_0x48873b=await this['store']['getTransitions'](await this['engine']['getVID']()),_0x5a00ab=_0x48873b['.'+this['metadata']['aid']],_0x290136=this['resolveAdjacentDad']();if(_0x5a00ab)for(const _0x5bd137 in _0x5a00ab){const _0xfa9d9e=_0x5a00ab[_0x5bd137];mapper_1['MapperService']['evaluate'](_0xfa9d9e,this['context'],this['code'])&&_0x2d33e4['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x290136,'aid':_0x5bd137,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x2d33e4;}['isJobComplete'](_0x562e9f){return _0x562e9f<=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'](_0x25451f,_0x2ef796){if(this['jobWasInterrupted'](_0x2ef796))return;let _0x36f25c=[];(this['shouldEmit']()||this['isJobComplete'](_0x2ef796)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x2ef796)&&!this['shouldPersistJob']()});if(_0x25451f['length']&&!this['isJobComplete'](_0x2ef796)){const _0x2ab0d6=this['store']['transact']();for(const _0x3686f3 of _0x25451f){await this['engine']['router']?.['publishMessage'](null,_0x3686f3,_0x2ab0d6);}_0x36f25c=await _0x2ab0d6['exec']();}return _0x36f25c;}['jobWasInterrupted'](_0x51cd09){return _0x51cd09<-0x5f5e100;}}exports['Activity']=Activity;
@@ -1 +1 @@
1
- 'use strict';function _0x3861(){const _0x12665d=['215MqMCRw','33oDrRwt','659071UwMmut','219915iMIHMp','1638204mSsrqu','54sPIzWh','1409464RtmkSR','310OeFzzs','7522blypaj','119648zudDWu','114tBEJoC','72740aUkMpQ'];_0x3861=function(){return _0x12665d;};return _0x3861();}(function(_0x2bd614,_0x36372a){const _0xad1a51=_0x1e13,_0x21fa97=_0x2bd614();while(!![]){try{const _0x57fee4=-parseInt(_0xad1a51(0x173))/0x1*(-parseInt(_0xad1a51(0x16f))/0x2)+parseInt(_0xad1a51(0x16c))/0x3*(-parseInt(_0xad1a51(0x170))/0x4)+parseInt(_0xad1a51(0x172))/0x5*(-parseInt(_0xad1a51(0x171))/0x6)+parseInt(_0xad1a51(0x169))/0x7+parseInt(_0xad1a51(0x16d))/0x8+parseInt(_0xad1a51(0x16a))/0x9*(parseInt(_0xad1a51(0x16e))/0xa)+-parseInt(_0xad1a51(0x174))/0xb*(parseInt(_0xad1a51(0x16b))/0xc);if(_0x57fee4===_0x36372a)break;else _0x21fa97['push'](_0x21fa97['shift']());}catch(_0x3a91ff){_0x21fa97['push'](_0x21fa97['shift']());}}}(_0x3861,0x956d9));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Await']=void 0x0;function _0x1e13(_0x2cad04,_0x125010){const _0x386195=_0x3861();return _0x1e13=function(_0x1e1368,_0x13f7c8){_0x1e1368=_0x1e1368-0x169;let _0x32c44c=_0x386195[_0x1e1368];return _0x32c44c;},_0x1e13(_0x2cad04,_0x125010);}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(_0x52ccc4,_0x42e584,_0x304dac,_0x10ecbc,_0x5134ce,_0x10a7fa){super(_0x52ccc4,_0x42e584,_0x304dac,_0x10ecbc,_0x5134ce,_0x10a7fa);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x5b3c86;try{await this['verifyEntry'](),_0x5b3c86=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5b3c86['startActivitySpan'](this['leg']),this['mapInputData']();const _0x37f20=this['store']['transact'](),_0x5f54fe=await this['execActivity'](_0x37f20);await collator_1['CollatorService']['authorizeReentry'](this,_0x37f20),await this['setState'](_0x37f20),await this['setStatus'](0x0,_0x37f20);const _0x1cee65=await _0x37f20['exec']();_0x5b3c86['mapActivityAttributes']();const _0x3e2901=this['resolveStatus'](_0x1cee65);return _0x5b3c86['setActivityAttributes']({'app.activity.mid':_0x5f54fe,'app.job.jss':_0x3e2901}),this['context']['metadata']['aid'];}catch(_0x31ae97){if(_0x31ae97 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x31ae97});return;}else{if(_0x31ae97 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x31ae97});return;}else{if(_0x31ae97 instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0x31ae97});return;}else{if(_0x31ae97 instanceof errors_1['CollationError']){if(_0x31ae97['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',{..._0x31ae97});}else this['logger']['error']('await-process-error',{..._0x31ae97});}}}_0x5b3c86?.['setActivityError'](_0x31ae97['message']);throw _0x31ae97;}finally{_0x5b3c86?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x45d766){const _0x5d25ff=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x466d67={'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':_0x5d25ff,'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 _0x4c3ea7=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x4c3ea7===![]&&(_0x466d67['metadata']['await']=![]);}return this['config']['retry']&&(_0x466d67['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x466d67,_0x45d766);}}exports['Await']=Await;
1
+ 'use strict';(function(_0x43dea2,_0x46cc78){const _0x49e86f=_0x1cf4,_0x34c476=_0x43dea2();while(!![]){try{const _0x226380=-parseInt(_0x49e86f(0x1b7))/0x1+-parseInt(_0x49e86f(0x1b4))/0x2*(-parseInt(_0x49e86f(0x1b3))/0x3)+parseInt(_0x49e86f(0x1b0))/0x4+parseInt(_0x49e86f(0x1b5))/0x5+parseInt(_0x49e86f(0x1b6))/0x6+-parseInt(_0x49e86f(0x1b1))/0x7+parseInt(_0x49e86f(0x1b2))/0x8;if(_0x226380===_0x46cc78)break;else _0x34c476['push'](_0x34c476['shift']());}catch(_0x99632f){_0x34c476['push'](_0x34c476['shift']());}}}(_0x3dae,0xe2715));function _0x1cf4(_0x2d27a9,_0x48c685){const _0x3dae6f=_0x3dae();return _0x1cf4=function(_0x1cf4d9,_0x31d127){_0x1cf4d9=_0x1cf4d9-0x1b0;let _0x28b2da=_0x3dae6f[_0x1cf4d9];return _0x28b2da;},_0x1cf4(_0x2d27a9,_0x48c685);}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(_0x4e651d,_0x15c6d9,_0xeda5b7,_0x4d5f06,_0x2f6cb0,_0xae3c3e){super(_0x4e651d,_0x15c6d9,_0xeda5b7,_0x4d5f06,_0x2f6cb0,_0xae3c3e);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x511178;try{await this['verifyEntry'](),_0x511178=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x511178['startActivitySpan'](this['leg']),this['mapInputData']();const _0x4e4e9c=this['store']['transact'](),_0x32b7ca=await this['execActivity'](_0x4e4e9c);await collator_1['CollatorService']['authorizeReentry'](this,_0x4e4e9c),await this['setState'](_0x4e4e9c),await this['setStatus'](0x0,_0x4e4e9c);const _0x4d8ae9=await _0x4e4e9c['exec']();_0x511178['mapActivityAttributes']();const _0x48d423=this['resolveStatus'](_0x4d8ae9);return _0x511178['setActivityAttributes']({'app.activity.mid':_0x32b7ca,'app.job.jss':_0x48d423}),this['context']['metadata']['aid'];}catch(_0x298b4b){if(_0x298b4b instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x298b4b});return;}else{if(_0x298b4b instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x298b4b});return;}else{if(_0x298b4b instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0x298b4b});return;}else{if(_0x298b4b instanceof errors_1['CollationError']){if(_0x298b4b['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',{..._0x298b4b});}else this['logger']['error']('await-process-error',{..._0x298b4b});}}}_0x511178?.['setActivityError'](_0x298b4b['message']);throw _0x298b4b;}finally{_0x511178?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x13173f){const _0x236209=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x5e0b53={'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':_0x236209,'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 _0x2cbde1=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x2cbde1===![]&&(_0x5e0b53['metadata']['await']=![]);}return this['config']['retry']&&(_0x5e0b53['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x5e0b53,_0x13173f);}}exports['Await']=Await;function _0x3dae(){const _0x40da46=['1390320HDEWbv','933pvBGpH','1808aFZinH','4702240zGmKGE','7848546JOaGKq','1431983Tfoqao','4063228ujnlyu','9518516bkOPse'];_0x3dae=function(){return _0x40da46;};return _0x3dae();}
@@ -1 +1 @@
1
- 'use strict';(function(_0x300dd5,_0x4a2908){const _0x40b652=_0x4fa0,_0x2d4618=_0x300dd5();while(!![]){try{const _0x196829=parseInt(_0x40b652(0x109))/0x1*(-parseInt(_0x40b652(0x10b))/0x2)+parseInt(_0x40b652(0x110))/0x3+-parseInt(_0x40b652(0x10d))/0x4*(parseInt(_0x40b652(0x10f))/0x5)+parseInt(_0x40b652(0x10c))/0x6*(parseInt(_0x40b652(0x108))/0x7)+parseInt(_0x40b652(0x10a))/0x8+-parseInt(_0x40b652(0x105))/0x9*(-parseInt(_0x40b652(0x10e))/0xa)+-parseInt(_0x40b652(0x107))/0xb*(-parseInt(_0x40b652(0x106))/0xc);if(_0x196829===_0x4a2908)break;else _0x2d4618['push'](_0x2d4618['shift']());}catch(_0x4e0825){_0x2d4618['push'](_0x2d4618['shift']());}}}(_0x3d22,0xf33ba));function _0x4fa0(_0x3360b1,_0x2111d1){const _0x3d225f=_0x3d22();return _0x4fa0=function(_0x4fa06b,_0x2d4d8c){_0x4fa06b=_0x4fa06b-0x105;let _0x39e805=_0x3d225f[_0x4fa06b];return _0x39e805;},_0x4fa0(_0x3360b1,_0x2111d1);}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(_0xb443b2,_0xe6e7ea,_0x54a512,_0xb8a949,_0x2c3d45,_0x4bc775){super(_0xb443b2,_0xe6e7ea,_0x54a512,_0xb8a949,_0x2c3d45,_0x4bc775);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x3ff71a;try{await this['verifyEntry'](),_0x3ff71a=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x3ff71a['startActivitySpan'](this['leg']),this['mapInputData']();let _0x6ebd2b=this['store']['transact']();await this['setState'](_0x6ebd2b),await this['setStatus'](0x0,_0x6ebd2b);const _0x19047f=await _0x6ebd2b['exec']();_0x3ff71a['mapActivityAttributes']();const _0x45cc31=this['resolveStatus'](_0x19047f);_0x6ebd2b=this['store']['transact']();const _0x3db290=await this['cycleAncestorActivity'](_0x6ebd2b);return _0x3ff71a['setActivityAttributes']({'app.activity.mid':_0x3db290,'app.job.jss':_0x45cc31}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0x6ebd2b),await _0x6ebd2b['exec'](),this['context']['metadata']['aid'];}catch(_0x406623){if(_0x406623 instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x406623});return;}else{if(_0x406623 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x406623});return;}else{if(_0x406623 instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x406623});return;}else{if(_0x406623 instanceof errors_1['CollationError']){if(_0x406623['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',{..._0x406623});}else this['logger']['error']('cycle-process-error',{..._0x406623});}}}_0x3ff71a?.['setActivityError'](_0x406623['message']);throw _0x406623;}finally{_0x3ff71a?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0x5a9194){this['mapInputData']();const _0x441848={'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,_0x441848,_0x5a9194);}}function _0x3d22(){const _0x543ad5=['11kuuhyI','538456CaCfBQ','353806qhPcAx','2620740RvqFBQ','807204UbKxav','719410LqccEt','40sZqMJL','4849599clOMrB','117fXEJiy','60TouYVc','3301672LDHepZ','7EFGjhS'];_0x3d22=function(){return _0x543ad5;};return _0x3d22();}exports['Cycle']=Cycle;
1
+ 'use strict';(function(_0x379f8a,_0x3a0116){const _0x9fa755=_0x1817,_0x16326e=_0x379f8a();while(!![]){try{const _0x5d585e=parseInt(_0x9fa755(0xb7))/0x1+parseInt(_0x9fa755(0xb8))/0x2*(-parseInt(_0x9fa755(0xbe))/0x3)+parseInt(_0x9fa755(0xbc))/0x4*(-parseInt(_0x9fa755(0xbb))/0x5)+-parseInt(_0x9fa755(0xc1))/0x6+parseInt(_0x9fa755(0xc2))/0x7*(-parseInt(_0x9fa755(0xba))/0x8)+-parseInt(_0x9fa755(0xbf))/0x9*(parseInt(_0x9fa755(0xb9))/0xa)+-parseInt(_0x9fa755(0xc0))/0xb*(-parseInt(_0x9fa755(0xbd))/0xc);if(_0x5d585e===_0x3a0116)break;else _0x16326e['push'](_0x16326e['shift']());}catch(_0x424df1){_0x16326e['push'](_0x16326e['shift']());}}}(_0x41a8,0xc7465));function _0x1817(_0x2eb338,_0x2de141){const _0x41a8d9=_0x41a8();return _0x1817=function(_0x1817f9,_0x17132d){_0x1817f9=_0x1817f9-0xb7;let _0x502001=_0x41a8d9[_0x1817f9];return _0x502001;},_0x1817(_0x2eb338,_0x2de141);}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');function _0x41a8(){const _0x14324e=['6979221pMVAhf','30346712kCidNP','991014BJadHr','20118igKBQm','330925CQFEzi','5292EBRwzB','10RvXFnc','1240rzAGQN','103655KTgTVX','88nYMKES','12qdXwtD','489OeDXbN'];_0x41a8=function(){return _0x14324e;};return _0x41a8();}class Cycle extends activity_1['Activity']{constructor(_0x44219e,_0x539055,_0x485bf9,_0x5e384b,_0x2ee232,_0x3c9ab6){super(_0x44219e,_0x539055,_0x485bf9,_0x5e384b,_0x2ee232,_0x3c9ab6);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x1bd80a;try{await this['verifyEntry'](),_0x1bd80a=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x1bd80a['startActivitySpan'](this['leg']),this['mapInputData']();let _0x1b1d3c=this['store']['transact']();await this['setState'](_0x1b1d3c),await this['setStatus'](0x0,_0x1b1d3c);const _0x45bcf8=await _0x1b1d3c['exec']();_0x1bd80a['mapActivityAttributes']();const _0x2315f4=this['resolveStatus'](_0x45bcf8);_0x1b1d3c=this['store']['transact']();const _0x5be523=await this['cycleAncestorActivity'](_0x1b1d3c);return _0x1bd80a['setActivityAttributes']({'app.activity.mid':_0x5be523,'app.job.jss':_0x2315f4}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0x1b1d3c),await _0x1b1d3c['exec'](),this['context']['metadata']['aid'];}catch(_0x2e5cee){if(_0x2e5cee instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x2e5cee});return;}else{if(_0x2e5cee instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x2e5cee});return;}else{if(_0x2e5cee instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x2e5cee});return;}else{if(_0x2e5cee instanceof errors_1['CollationError']){if(_0x2e5cee['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',{..._0x2e5cee});}else this['logger']['error']('cycle-process-error',{..._0x2e5cee});}}}_0x1bd80a?.['setActivityError'](_0x2e5cee['message']);throw _0x2e5cee;}finally{_0x1bd80a?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0x2ca104){this['mapInputData']();const _0x432de2={'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,_0x432de2,_0x2ca104);}}exports['Cycle']=Cycle;
@@ -1 +1 @@
1
- 'use strict';function _0x4c9e(){const _0x44516f=['16630QEKvnl','391621JAWnll','78759ZshnyU','3184762QyUnon','974022yeIvrE','672opPAkk','800HQKxkb','3156736SWizCc','1317627LKqeRR'];_0x4c9e=function(){return _0x44516f;};return _0x4c9e();}(function(_0x11eacf,_0x3a5109){const _0x27fea7=_0x1d48,_0x4aadc9=_0x11eacf();while(!![]){try{const _0x5f3442=parseInt(_0x27fea7(0xb7))/0x1+parseInt(_0x27fea7(0xba))/0x2+parseInt(_0x27fea7(0xbe))/0x3+-parseInt(_0x27fea7(0xbd))/0x4+-parseInt(_0x27fea7(0xbf))/0x5*(-parseInt(_0x27fea7(0xbb))/0x6)+parseInt(_0x27fea7(0xb9))/0x7+-parseInt(_0x27fea7(0xbc))/0x8*(parseInt(_0x27fea7(0xb8))/0x9);if(_0x5f3442===_0x3a5109)break;else _0x4aadc9['push'](_0x4aadc9['shift']());}catch(_0x242f9a){_0x4aadc9['push'](_0x4aadc9['shift']());}}}(_0x4c9e,0x7570b));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Hook']=void 0x0;function _0x1d48(_0x3a5d16,_0x1a2206){const _0x4c9ed9=_0x4c9e();return _0x1d48=function(_0x1d48dc,_0x561c53){_0x1d48dc=_0x1d48dc-0xb7;let _0xf4caa0=_0x4c9ed9[_0x1d48dc];return _0xf4caa0;},_0x1d48(_0x3a5d16,_0x1a2206);}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(_0x11d971,_0x15fd47,_0x909b36,_0xc9dafc,_0x16a169,_0x6364ee){super(_0x11d971,_0x15fd47,_0x909b36,_0xc9dafc,_0x16a169,_0x6364ee);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x3f8e30;try{return await this['verifyEntry'](),_0x3f8e30=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x3f8e30['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x3f8e30):await this['doPassThrough'](_0x3f8e30),this['context']['metadata']['aid'];}catch(_0x4dee6a){if(_0x4dee6a instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x4dee6a});return;}else{if(_0x4dee6a instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x4dee6a});return;}else{if(_0x4dee6a instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x4dee6a});return;}else{if(_0x4dee6a instanceof errors_1['CollationError']){if(_0x4dee6a['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',{..._0x4dee6a});}else this['logger']['error']('hook-process-error',{..._0x4dee6a});}}}_0x3f8e30?.['setActivityError'](_0x4dee6a['message']);throw _0x4dee6a;}finally{_0x3f8e30?.['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 _0x5a89da=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x5a89da)&&Number(_0x5a89da)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x31fe85){const _0x4572a9=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x4572a9),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x4572a9),await collator_1['CollatorService']['authorizeReentry'](this,_0x4572a9),await this['setStatus'](0x0,_0x4572a9),await _0x4572a9['exec'](),_0x31fe85['mapActivityAttributes']();}async['doPassThrough'](_0x4d47d5){const _0x3b502e=this['store']['transact']();let _0x48780d;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x3b502e),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x3b502e),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x3b502e),_0x48780d=await _0x3b502e['exec'](),_0x4d47d5['mapActivityAttributes']();const _0x488e34=this['resolveStatus'](_0x48780d),_0x513470={'app.job.jss':_0x488e34},_0x47f854=await this['transition'](this['adjacencyList'],_0x488e34);_0x47f854['length']&&(_0x513470['app.activity.mids']=_0x47f854['join'](',')),_0x4d47d5['setActivityAttributes'](_0x513470);}async['getHookRule'](_0x3ac9ff){const _0x4a3260=await this['store']['getHookRules']();return _0x4a3260?.[_0x3ac9ff]?.[0x0];}async['registerHook'](_0x5b4adb){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x5b4adb);else{if(this['config']['sleep']){const _0xfa1b53=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',_0xfa1b53,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x4ecf31=stream_1['StreamStatus']['SUCCESS'],_0x361384=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x4ecf31,'code':_0x361384});const _0x356b08=new task_1['TaskService'](this['store'],this['logger']),_0x30e8e0={...this['data']},_0x302319=await _0x356b08['processWebHookSignal'](this['config']['hook']['topic'],_0x30e8e0);if(_0x302319){const [_0x54d52e,_0x9c1ab3,_0x53488e,_0x5660bc]=_0x302319;this['context']['metadata']['jid']=_0x54d52e,this['context']['metadata']['gid']=_0x5660bc,this['context']['metadata']['dad']=_0x53488e,await this['processEvent'](_0x4ecf31,_0x361384,'hook'),_0x361384===0xc8&&await _0x356b08['deleteWebHookSignal'](this['config']['hook']['topic'],_0x30e8e0);}}async['processTimeHookEvent'](_0x366cf5){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x366cf5,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}exports['Hook']=Hook;
1
+ 'use strict';(function(_0xe0d0e,_0x3e0717){const _0x29d077=_0x36bd,_0x357aeb=_0xe0d0e();while(!![]){try{const _0x22619a=-parseInt(_0x29d077(0x11a))/0x1*(-parseInt(_0x29d077(0x118))/0x2)+-parseInt(_0x29d077(0x11f))/0x3*(parseInt(_0x29d077(0x119))/0x4)+-parseInt(_0x29d077(0x11d))/0x5*(-parseInt(_0x29d077(0x11c))/0x6)+-parseInt(_0x29d077(0x117))/0x7+parseInt(_0x29d077(0x116))/0x8*(parseInt(_0x29d077(0x115))/0x9)+parseInt(_0x29d077(0x11e))/0xa+-parseInt(_0x29d077(0x120))/0xb*(parseInt(_0x29d077(0x11b))/0xc);if(_0x22619a===_0x3e0717)break;else _0x357aeb['push'](_0x357aeb['shift']());}catch(_0x2a0161){_0x357aeb['push'](_0x357aeb['shift']());}}}(_0x4127,0x2beb1));function _0x4127(){const _0x3f3015=['3446850zxWZiQ','501aHTKhw','4609tFBrmt','14139tieJnW','360DrmPwI','543732IBBqMX','641524HCqhUd','7908TZWmXQ','1WYClpt','12792EdTmLE','61704HtWokt','145YxAfXG'];_0x4127=function(){return _0x3f3015;};return _0x4127();}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');function _0x36bd(_0x323920,_0x57e4a6){const _0x4127d1=_0x4127();return _0x36bd=function(_0x36bd21,_0x3caf20){_0x36bd21=_0x36bd21-0x115;let _0x24f081=_0x4127d1[_0x36bd21];return _0x24f081;},_0x36bd(_0x323920,_0x57e4a6);}class Hook extends activity_1['Activity']{constructor(_0x26540d,_0x57ef5d,_0x1010c0,_0x4f52bf,_0x2ff8cc,_0x30fdc5){super(_0x26540d,_0x57ef5d,_0x1010c0,_0x4f52bf,_0x2ff8cc,_0x30fdc5);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x35480c;try{return await this['verifyEntry'](),_0x35480c=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x35480c['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x35480c):await this['doPassThrough'](_0x35480c),this['context']['metadata']['aid'];}catch(_0x5ee42f){if(_0x5ee42f instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x5ee42f});return;}else{if(_0x5ee42f instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x5ee42f});return;}else{if(_0x5ee42f instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x5ee42f});return;}else{if(_0x5ee42f instanceof errors_1['CollationError']){if(_0x5ee42f['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',{..._0x5ee42f});}else this['logger']['error']('hook-process-error',{..._0x5ee42f});}}}_0x35480c?.['setActivityError'](_0x5ee42f['message']);throw _0x5ee42f;}finally{_0x35480c?.['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 _0x552d45=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x552d45)&&Number(_0x552d45)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x964834){const _0x53ee71=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x53ee71),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x53ee71),await collator_1['CollatorService']['authorizeReentry'](this,_0x53ee71),await this['setStatus'](0x0,_0x53ee71),await _0x53ee71['exec'](),_0x964834['mapActivityAttributes']();}async['doPassThrough'](_0x1b5b61){const _0x377310=this['store']['transact']();let _0x46efaf;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x377310),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x377310),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x377310),_0x46efaf=await _0x377310['exec'](),_0x1b5b61['mapActivityAttributes']();const _0x16459c=this['resolveStatus'](_0x46efaf),_0x3dcf3d={'app.job.jss':_0x16459c},_0x292e47=await this['transition'](this['adjacencyList'],_0x16459c);_0x292e47['length']&&(_0x3dcf3d['app.activity.mids']=_0x292e47['join'](',')),_0x1b5b61['setActivityAttributes'](_0x3dcf3d);}async['getHookRule'](_0x224db3){const _0x38dc48=await this['store']['getHookRules']();return _0x38dc48?.[_0x224db3]?.[0x0];}async['registerHook'](_0x5c02ee){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x5c02ee);else{if(this['config']['sleep']){const _0x3a3b66=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',_0x3a3b66,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x22c134=stream_1['StreamStatus']['SUCCESS'],_0x9e1c64=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x22c134,'code':_0x9e1c64});const _0x29c66c=new task_1['TaskService'](this['store'],this['logger']),_0x4061e8={...this['data']},_0x183ccd=await _0x29c66c['processWebHookSignal'](this['config']['hook']['topic'],_0x4061e8);if(_0x183ccd){const [_0x373306,_0x5e691a,_0x42a9fc,_0x3ce81]=_0x183ccd;this['context']['metadata']['jid']=_0x373306,this['context']['metadata']['gid']=_0x3ce81,this['context']['metadata']['dad']=_0x42a9fc,await this['processEvent'](_0x22c134,_0x9e1c64,'hook'),_0x9e1c64===0xc8&&await _0x29c66c['deleteWebHookSignal'](this['config']['hook']['topic'],_0x4061e8);}}async['processTimeHookEvent'](_0x3def65){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x3def65,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}exports['Hook']=Hook;
@@ -1 +1 @@
1
- 'use strict';(function(_0x3a4a5d,_0x24bd9f){const _0x15b3b8=_0x424f,_0x3a6b29=_0x3a4a5d();while(!![]){try{const _0x2f40e7=parseInt(_0x15b3b8(0x159))/0x1*(-parseInt(_0x15b3b8(0x157))/0x2)+-parseInt(_0x15b3b8(0x153))/0x3*(-parseInt(_0x15b3b8(0x14f))/0x4)+parseInt(_0x15b3b8(0x151))/0x5+parseInt(_0x15b3b8(0x158))/0x6*(-parseInt(_0x15b3b8(0x156))/0x7)+parseInt(_0x15b3b8(0x150))/0x8+parseInt(_0x15b3b8(0x152))/0x9*(-parseInt(_0x15b3b8(0x154))/0xa)+parseInt(_0x15b3b8(0x14e))/0xb*(parseInt(_0x15b3b8(0x155))/0xc);if(_0x2f40e7===_0x24bd9f)break;else _0x3a6b29['push'](_0x3a6b29['shift']());}catch(_0x358ab5){_0x3a6b29['push'](_0x3a6b29['shift']());}}}(_0x45a8,0x85bee));function _0x424f(_0x1a0cdc,_0x5c5101){const _0x45a854=_0x45a8();return _0x424f=function(_0x424f21,_0x4341b4){_0x424f21=_0x424f21-0x14e;let _0x52fd40=_0x45a854[_0x424f21];return _0x52fd40;},_0x424f(_0x1a0cdc,_0x5c5101);}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']};function _0x45a8(){const _0x1afd00=['180HdfzoG','9305292NVfxnb','637TlnEJH','2QtlGvm','55194RvkJKS','596402NqRepW','33srNmyt','292GLXgra','1068024LLAeKr','1648630JGhhgn','544671iGuxtI','11553xqpQIv'];_0x45a8=function(){return _0x1afd00;};return _0x45a8();}
1
+ 'use strict';(function(_0x5e1b8e,_0x28bc95){const _0xe9971=_0x1b52,_0x159620=_0x5e1b8e();while(!![]){try{const _0x20d259=-parseInt(_0xe9971(0xb6))/0x1*(parseInt(_0xe9971(0xb2))/0x2)+parseInt(_0xe9971(0xaf))/0x3+parseInt(_0xe9971(0xb0))/0x4*(-parseInt(_0xe9971(0xb8))/0x5)+-parseInt(_0xe9971(0xb7))/0x6*(-parseInt(_0xe9971(0xb9))/0x7)+parseInt(_0xe9971(0xb3))/0x8*(-parseInt(_0xe9971(0xb5))/0x9)+parseInt(_0xe9971(0xb1))/0xa+parseInt(_0xe9971(0xb4))/0xb;if(_0x20d259===_0x28bc95)break;else _0x159620['push'](_0x159620['shift']());}catch(_0x53a9ff){_0x159620['push'](_0x159620['shift']());}}}(_0x5940,0x521fa));Object['defineProperty'](exports,'__esModule',{'value':!![]});function _0x1b52(_0x32a6ff,_0x502e12){const _0x59403c=_0x5940();return _0x1b52=function(_0x1b5285,_0x162e02){_0x1b5285=_0x1b5285-0xaf;let _0x340fea=_0x59403c[_0x1b5285];return _0x340fea;},_0x1b52(_0x32a6ff,_0x502e12);}function _0x5940(){const _0x489421=['1176714NjZBuA','18099GBfTaR','1jQLiAI','4722iLopMR','10HFETZV','1568miwzdy','1358493zudAji','627904EybYLg','209830QspPXs','161206jgAXkk','104Frxkty'];_0x5940=function(){return _0x489421;};return _0x5940();}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(_0x25289b,_0x498717){const _0xef3e69=_0x18f6,_0x59b016=_0x25289b();while(!![]){try{const _0xc0e726=-parseInt(_0xef3e69(0x80))/0x1*(-parseInt(_0xef3e69(0x7f))/0x2)+parseInt(_0xef3e69(0x7d))/0x3*(-parseInt(_0xef3e69(0x86))/0x4)+-parseInt(_0xef3e69(0x83))/0x5*(-parseInt(_0xef3e69(0x87))/0x6)+parseInt(_0xef3e69(0x82))/0x7+parseInt(_0xef3e69(0x81))/0x8+parseInt(_0xef3e69(0x7e))/0x9*(-parseInt(_0xef3e69(0x84))/0xa)+parseInt(_0xef3e69(0x85))/0xb;if(_0xc0e726===_0x498717)break;else _0x59b016['push'](_0x59b016['shift']());}catch(_0x35bdc0){_0x59b016['push'](_0x59b016['shift']());}}}(_0x2b64,0x61143));function _0x18f6(_0x7df3d9,_0x38eb51){const _0x2b642b=_0x2b64();return _0x18f6=function(_0x18f627,_0x4d1ee6){_0x18f627=_0x18f627-0x7d;let _0x4f3256=_0x2b642b[_0x18f627];return _0x4f3256;},_0x18f6(_0x7df3d9,_0x38eb51);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Interrupt']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');function _0x2b64(){const _0xbd66c7=['62628CBiqMF','13htlcaF','5206776IBXiqB','443331oORzKd','29165mBguQU','179650NGqrUE','1638263VQyRSx','68XNoilK','96VEyqVF','129237WeaePV','117GHtqzl'];_0x2b64=function(){return _0xbd66c7;};return _0x2b64();}class Interrupt extends activity_1['Activity']{constructor(_0x475f4a,_0x1c335a,_0x3c48ed,_0x34c3de,_0x3f1e9c,_0xa0bdb0){super(_0x475f4a,_0x1c335a,_0x3c48ed,_0x34c3de,_0x3f1e9c,_0xa0bdb0);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x5a4d29;try{await this['verifyEntry'](),_0x5a4d29=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5a4d29['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x5a4d29):await this['interruptAnother'](_0x5a4d29);}catch(_0xd0afe6){if(_0xd0afe6 instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0xd0afe6});return;}else{if(_0xd0afe6 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0xd0afe6});return;}else{if(_0xd0afe6 instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0xd0afe6});return;}else{if(_0xd0afe6 instanceof errors_1['CollationError']){if(_0xd0afe6['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',{..._0xd0afe6});}else this['logger']['error']('interrupt-process-error',{..._0xd0afe6});}}}_0x5a4d29?.['setActivityError'](_0xd0afe6['message']);throw _0xd0afe6;}finally{_0x5a4d29?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x37fc26){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x4c3227=await this['interrupt']();_0x37fc26['mapActivityAttributes']();const _0x198533=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x198533),await this['setStatus'](-0x1,_0x198533);const _0x29efd5=await _0x198533['exec'](),_0x2f9252=this['resolveStatus'](_0x29efd5);return _0x37fc26['setActivityAttributes']({'app.activity.mid':_0x4c3227,'app.job.jss':_0x2f9252}),this['context']['metadata']['aid'];}async['interruptAnother'](_0xe845c2){const _0x3d7cd1=await this['interrupt'](),_0x46d4ef={'app.activity.mid':_0x3d7cd1};_0xe845c2['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x5d0344=this['store']['transact']();await this['setState'](_0x5d0344);}const _0x29fab5=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x29fab5),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x29fab5);const _0x4b30b6=await _0x29fab5['exec'](),_0x5da38d=this['resolveStatus'](_0x4b30b6);_0x46d4ef['app.job.jss']=_0x5da38d;const _0x135092=await this['transition'](this['adjacencyList'],_0x5da38d);return _0x135092['length']&&(_0x46d4ef['app.activity.mids']=_0x135092['join'](',')),_0xe845c2['setActivityAttributes'](_0x46d4ef),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x433c49=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x433c49==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 _0x2d39ac=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'],_0x2d39ac);}}exports['Interrupt']=Interrupt;
1
+ 'use strict';(function(_0x38276b,_0x294ee7){const _0x2f0a25=_0x4d58,_0x50675e=_0x38276b();while(!![]){try{const _0x3ef77d=-parseInt(_0x2f0a25(0xee))/0x1*(parseInt(_0x2f0a25(0xf2))/0x2)+-parseInt(_0x2f0a25(0xe9))/0x3*(parseInt(_0x2f0a25(0xe8))/0x4)+-parseInt(_0x2f0a25(0xf0))/0x5*(-parseInt(_0x2f0a25(0xef))/0x6)+parseInt(_0x2f0a25(0xeb))/0x7+parseInt(_0x2f0a25(0xe7))/0x8+-parseInt(_0x2f0a25(0xed))/0x9*(-parseInt(_0x2f0a25(0xf1))/0xa)+parseInt(_0x2f0a25(0xea))/0xb*(-parseInt(_0x2f0a25(0xec))/0xc);if(_0x3ef77d===_0x294ee7)break;else _0x50675e['push'](_0x50675e['shift']());}catch(_0x3b5d70){_0x50675e['push'](_0x50675e['shift']());}}}(_0xfb67,0xa46fb));function _0x4d58(_0x4fd63a,_0x523334){const _0xfb67ff=_0xfb67();return _0x4d58=function(_0x4d586f,_0x1b4c83){_0x4d586f=_0x4d586f-0xe7;let _0x1a665b=_0xfb67ff[_0x4d586f];return _0x1a665b;},_0x4d58(_0x4fd63a,_0x523334);}function _0xfb67(){const _0x103e79=['4129065CFQKjU','5310yHtRRZ','4fAsyqE','10576536wSHxxO','1040oboxgV','9807XRttRU','76439uazelq','138117MeHssK','204kbmtTS','8973KqMYjn','527707qlwZfS','6SivfuB'];_0xfb67=function(){return _0x103e79;};return _0xfb67();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Interrupt']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Interrupt extends activity_1['Activity']{constructor(_0x224759,_0x18cdcd,_0x23ad1e,_0x360c45,_0x474633,_0x1ad51a){super(_0x224759,_0x18cdcd,_0x23ad1e,_0x360c45,_0x474633,_0x1ad51a);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x5dea67;try{await this['verifyEntry'](),_0x5dea67=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5dea67['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x5dea67):await this['interruptAnother'](_0x5dea67);}catch(_0x12ef4e){if(_0x12ef4e instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x12ef4e});return;}else{if(_0x12ef4e instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x12ef4e});return;}else{if(_0x12ef4e instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x12ef4e});return;}else{if(_0x12ef4e instanceof errors_1['CollationError']){if(_0x12ef4e['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',{..._0x12ef4e});}else this['logger']['error']('interrupt-process-error',{..._0x12ef4e});}}}_0x5dea67?.['setActivityError'](_0x12ef4e['message']);throw _0x12ef4e;}finally{_0x5dea67?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x1d9ecb){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x5997b4=await this['interrupt']();_0x1d9ecb['mapActivityAttributes']();const _0xff5b0a=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0xff5b0a),await this['setStatus'](-0x1,_0xff5b0a);const _0x495b21=await _0xff5b0a['exec'](),_0xe6b839=this['resolveStatus'](_0x495b21);return _0x1d9ecb['setActivityAttributes']({'app.activity.mid':_0x5997b4,'app.job.jss':_0xe6b839}),this['context']['metadata']['aid'];}async['interruptAnother'](_0x4d9417){const _0x31f677=await this['interrupt'](),_0x1440ec={'app.activity.mid':_0x31f677};_0x4d9417['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x1073e3=this['store']['transact']();await this['setState'](_0x1073e3);}const _0x4a0499=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x4a0499),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x4a0499);const _0x5c69b0=await _0x4a0499['exec'](),_0x3d9df9=this['resolveStatus'](_0x5c69b0);_0x1440ec['app.job.jss']=_0x3d9df9;const _0x5bc97c=await this['transition'](this['adjacencyList'],_0x3d9df9);return _0x5bc97c['length']&&(_0x1440ec['app.activity.mids']=_0x5bc97c['join'](',')),_0x4d9417['setActivityAttributes'](_0x1440ec),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x1b314d=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x1b314d==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 _0x5a8f71=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'],_0x5a8f71);}}exports['Interrupt']=Interrupt;
@@ -1 +1 @@
1
- 'use strict';(function(_0x4988dc,_0x571043){const _0x3e1079=_0x1397,_0x5cb3ea=_0x4988dc();while(!![]){try{const _0x5927f4=-parseInt(_0x3e1079(0x107))/0x1*(-parseInt(_0x3e1079(0x108))/0x2)+parseInt(_0x3e1079(0x101))/0x3*(parseInt(_0x3e1079(0x102))/0x4)+parseInt(_0x3e1079(0x104))/0x5*(parseInt(_0x3e1079(0x109))/0x6)+-parseInt(_0x3e1079(0x106))/0x7+parseInt(_0x3e1079(0x10a))/0x8*(parseInt(_0x3e1079(0x100))/0x9)+parseInt(_0x3e1079(0x105))/0xa+-parseInt(_0x3e1079(0x103))/0xb;if(_0x5927f4===_0x571043)break;else _0x5cb3ea['push'](_0x5cb3ea['shift']());}catch(_0x5f0517){_0x5cb3ea['push'](_0x5cb3ea['shift']());}}}(_0x2b61,0xcc4ac));function _0x2b61(){const _0x2c8858=['2DoqOvC','798890YZBZDf','6QKTYsp','296pZMJqg','339111QVsAZh','5883IlxjmI','24TZNEwp','32478864duKaZl','7301130lkJTJL','1570770fLYrXb','228746MDBmCW'];_0x2b61=function(){return _0x2c8858;};return _0x2b61();}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(_0x44ec9e,_0x203931,_0x191c15,_0x3d16bf,_0xd05bdb,_0x5e2361){super(_0x44ec9e,_0x203931,_0x191c15,_0x3d16bf,_0xd05bdb,_0x5e2361);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x50976b;try{await this['verifyEntry'](),_0x50976b=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x50976b['startActivitySpan'](this['leg']);const _0x43a126=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x43a126),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x43a126),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x43a126);const _0x22df37=await _0x43a126['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x2fbe64=this['resolveStatus'](_0x22df37),_0x2590aa={'app.job.jss':_0x2fbe64},_0x35bca0=await this['transition'](this['adjacencyList'],_0x2fbe64);return _0x35bca0['length']&&(_0x2590aa['app.activity.mids']=_0x35bca0['join'](',')),_0x50976b['mapActivityAttributes'](),_0x50976b['setActivityAttributes'](_0x2590aa),this['context']['metadata']['aid'];}catch(_0x3d90e1){if(_0x3d90e1 instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x3d90e1});return;}else{if(_0x3d90e1 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x3d90e1});return;}else{if(_0x3d90e1 instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x3d90e1});return;}else{if(_0x3d90e1 instanceof errors_1['CollationError']){if(_0x3d90e1['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',{..._0x3d90e1});}else this['logger']['error']('signal-process-error',{..._0x3d90e1});}}}_0x50976b?.['setActivityError'](_0x3d90e1['message']);throw _0x3d90e1;}finally{_0x50976b?.['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 _0xed4262=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0xed4262['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x394ff6=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x394ff6['mapRules']();}}async['hookOne'](){const _0xd40d92=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x75c92c=this['mapSignalData'](),_0x20f273=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x5b4538=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0xd40d92,_0x75c92c,_0x20f273,_0x5b4538);}async['hookAll'](){const _0x32580d=this['mapSignalData'](),_0xea5e2a=this['mapResolverData']();this['config']['scrub']&&(_0xea5e2a['scrub']=!![]);const _0x32b1f1=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x4a007e=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x5a18b0=[_0x32b1f1+':'+_0x4a007e];return await this['engine']['hookAll'](this['config']['topic'],_0x32580d,_0xea5e2a,_0x5a18b0);}}function _0x1397(_0x2daa76,_0x44813d){const _0x2b61c4=_0x2b61();return _0x1397=function(_0x1397e6,_0x324d95){_0x1397e6=_0x1397e6-0x100;let _0x381535=_0x2b61c4[_0x1397e6];return _0x381535;},_0x1397(_0x2daa76,_0x44813d);}exports['Signal']=Signal;
1
+ 'use strict';(function(_0x147ef4,_0xf513a8){const _0x3a6a08=_0x4509,_0x1a51c8=_0x147ef4();while(!![]){try{const _0x1379a1=-parseInt(_0x3a6a08(0x16e))/0x1*(parseInt(_0x3a6a08(0x171))/0x2)+parseInt(_0x3a6a08(0x169))/0x3*(-parseInt(_0x3a6a08(0x172))/0x4)+-parseInt(_0x3a6a08(0x168))/0x5+-parseInt(_0x3a6a08(0x16a))/0x6*(-parseInt(_0x3a6a08(0x170))/0x7)+parseInt(_0x3a6a08(0x16f))/0x8+-parseInt(_0x3a6a08(0x16d))/0x9*(-parseInt(_0x3a6a08(0x16c))/0xa)+parseInt(_0x3a6a08(0x16b))/0xb;if(_0x1379a1===_0xf513a8)break;else _0x1a51c8['push'](_0x1a51c8['shift']());}catch(_0x3123e3){_0x1a51c8['push'](_0x1a51c8['shift']());}}}(_0x3ddf,0xd1c39));function _0x4509(_0x5ecb8a,_0x5328f3){const _0x3ddf20=_0x3ddf();return _0x4509=function(_0x45094f,_0x50d444){_0x45094f=_0x45094f-0x168;let _0x3ad3b9=_0x3ddf20[_0x45094f];return _0x3ad3b9;},_0x4509(_0x5ecb8a,_0x5328f3);}function _0x3ddf(){const _0x24b27f=['29313atGqeh','11756016yaYEDb','3742571rJTklT','82DOHTsX','4Opyohi','6071695Qakqmt','3130818SCpRiE','18YmTDUo','2474241SwUbRN','690useBdH','133119kqzyDt'];_0x3ddf=function(){return _0x24b27f;};return _0x3ddf();}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(_0x11a2be,_0x1b6c34,_0x6bb295,_0x5d660a,_0x31d7c2,_0x1fd284){super(_0x11a2be,_0x1b6c34,_0x6bb295,_0x5d660a,_0x31d7c2,_0x1fd284);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x5781db;try{await this['verifyEntry'](),_0x5781db=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5781db['startActivitySpan'](this['leg']);const _0xe05285=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0xe05285),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0xe05285),await this['setStatus'](this['adjacencyList']['length']-0x1,_0xe05285);const _0x1113ca=await _0xe05285['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x350f22=this['resolveStatus'](_0x1113ca),_0xa2c0d9={'app.job.jss':_0x350f22},_0xf935f7=await this['transition'](this['adjacencyList'],_0x350f22);return _0xf935f7['length']&&(_0xa2c0d9['app.activity.mids']=_0xf935f7['join'](',')),_0x5781db['mapActivityAttributes'](),_0x5781db['setActivityAttributes'](_0xa2c0d9),this['context']['metadata']['aid'];}catch(_0x40edfe){if(_0x40edfe instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x40edfe});return;}else{if(_0x40edfe instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x40edfe});return;}else{if(_0x40edfe instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x40edfe});return;}else{if(_0x40edfe instanceof errors_1['CollationError']){if(_0x40edfe['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',{..._0x40edfe});}else this['logger']['error']('signal-process-error',{..._0x40edfe});}}}_0x5781db?.['setActivityError'](_0x40edfe['message']);throw _0x40edfe;}finally{_0x5781db?.['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 _0x30645f=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x30645f['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0xb8b229=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0xb8b229['mapRules']();}}async['hookOne'](){const _0x3b1fb3=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x1cf193=this['mapSignalData'](),_0x26a51d=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x32a671=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x3b1fb3,_0x1cf193,_0x26a51d,_0x32a671);}async['hookAll'](){const _0x232dd4=this['mapSignalData'](),_0x3d152c=this['mapResolverData']();this['config']['scrub']&&(_0x3d152c['scrub']=!![]);const _0x3b2551=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x8105ab=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x3ba22e=[_0x3b2551+':'+_0x8105ab];return await this['engine']['hookAll'](this['config']['topic'],_0x232dd4,_0x3d152c,_0x3ba22e);}}exports['Signal']=Signal;
@@ -1 +1 @@
1
- 'use strict';function _0x2a92(){const _0x22d754=['22LwtlKL','36oDbdCu','4015975VmQhET','335841aSLjos','28RSptny','5732490lLevVI','690403HKgKvH','44296GncYAF','7404430SyWXYw','35870CcmrRI','783MXaCHL'];_0x2a92=function(){return _0x22d754;};return _0x2a92();}(function(_0x326c6e,_0x4bd50b){const _0x42721b=_0xe2a7,_0x34b8da=_0x326c6e();while(!![]){try{const _0x3e65f5=parseInt(_0x42721b(0x132))/0x1*(parseInt(_0x42721b(0x129))/0x2)+-parseInt(_0x42721b(0x12c))/0x3*(parseInt(_0x42721b(0x12d))/0x4)+parseInt(_0x42721b(0x12b))/0x5+-parseInt(_0x42721b(0x12a))/0x6*(-parseInt(_0x42721b(0x12f))/0x7)+-parseInt(_0x42721b(0x130))/0x8*(parseInt(_0x42721b(0x133))/0x9)+parseInt(_0x42721b(0x12e))/0xa+-parseInt(_0x42721b(0x131))/0xb;if(_0x3e65f5===_0x4bd50b)break;else _0x34b8da['push'](_0x34b8da['shift']());}catch(_0x2b3f12){_0x34b8da['push'](_0x34b8da['shift']());}}}(_0x2a92,0x67976));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Trigger']=void 0x0;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(_0x233d45,_0x373a2a,_0x1e1cfd,_0x186a12,_0x1e2458,_0x5bb07e){super(_0x233d45,_0x373a2a,_0x1e1cfd,_0x186a12,_0x1e2458,_0x5bb07e);}async['process'](_0x50f1e5){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x55adee;try{this['setLeg'](0x2),await this['getState'](),_0x55adee=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x55adee['startJobSpan'](),_0x55adee['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x3ed448=this['initStatus'](_0x50f1e5,this['adjacencyList']['length']);await this['setStateNX'](_0x3ed448),await this['setStatus'](_0x3ed448),this['bindSearchData'](_0x50f1e5),this['bindMarkerData'](_0x50f1e5);const _0x18062d=this['store']['transact']();await this['setState'](_0x18062d),await this['setStats'](_0x18062d);_0x50f1e5?.['pending']&&await this['setExpired'](_0x50f1e5?.['pending'],_0x18062d);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x18062d),await _0x18062d['exec'](),this['execAdjacentParent'](),_0x55adee['mapActivityAttributes']();const _0xcc4393=Number(this['context']['metadata']['js']);_0x55adee['setJobAttributes']({'app.job.jss':_0xcc4393});const _0x5bf17a={'app.job.jss':_0xcc4393};return await this['transitionAndLogAdjacent'](_0x50f1e5,_0xcc4393,_0x5bf17a),_0x55adee['setActivityAttributes'](_0x5bf17a),this['context']['metadata']['jid'];}catch(_0x4243c4){_0x55adee?.['setActivityError'](_0x4243c4['message']);if(_0x4243c4 instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x4ea19d=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x4ea19d){this['logger']['info']('trigger-collation-overage',{'job_id':_0x4243c4['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0x4243c4['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0x4243c4});throw _0x4243c4;}finally{_0x55adee?.['endJobSpan'](),_0x55adee?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x445d97={},_0x3f8b93,_0xd61cd7){if(isNaN(_0x445d97['pending'])){const _0x1f948d=await this['transition'](this['adjacencyList'],_0x3f8b93);_0x1f948d['length']&&(_0xd61cd7['app.activity.mids']=_0x1f948d['join'](','));}}['initStatus'](_0x2b9a7={},_0x2eee6f){if(_0x2b9a7['pending'])return-0x1;return _0x2eee6f;}async['setExpired'](_0x4ce2c2,_0x434405){await this['store']['expireJob'](this['context']['metadata']['jid'],_0x4ce2c2,_0x434405);}['safeKey'](_0xbf12b){return'_'+_0xbf12b;}['bindSearchData'](_0x527957){_0x527957?.['search']&&Object['keys'](_0x527957['search'])['forEach'](_0x584985=>{this['context']['data'][this['safeKey'](_0x584985)]=_0x527957['search'][_0x584985]['toString']();});}['bindMarkerData'](_0x2d02ff){_0x2d02ff?.['marker']&&Object['keys'](_0x2d02ff['marker'])['forEach'](_0xf395b3=>{_0xf395b3['startsWith']('-')&&(this['context']['data'][_0xf395b3]=_0x2d02ff['marker'][_0xf395b3]['toString']());});}async['setStatus'](_0x5f1e5e){this['context']['metadata']['js']=_0x5f1e5e;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x3acdf5=(0x0,utils_1['formatISODate'])(new Date()),_0x41da02={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x3acdf5,'ju':_0x3acdf5}};await this['engine']['execAdjacentParent'](this['context'],_0x41da02);}}['createInputContext'](){const _0x426028={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x426028;}async['getState'](){const _0x3ad596=this['createInputContext'](),_0x77fc12=this['resolveJobId'](_0x3ad596),_0x14dcd4=this['resolveJobKey'](_0x3ad596),_0x1afb06=(0x0,utils_1['formatISODate'])(new Date()),{id:_0xd0652e,version:_0x4cea27}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0x53ce09={...this['metadata'],'jid':_0x77fc12,'key':_0x14dcd4,'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':_0xd0652e,'vrs':_0x4cea27,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0x77fc12,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x14dcd4,'jc':_0x1afb06,'ju':_0x1afb06,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0x53ce09},'output':{'data':this['data'],'metadata':_0x53ce09},'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'](_0x14f04d=>'metadata/'+_0x14f04d);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0xc6ef26=>'output/metadata/'+_0xc6ef26);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x541afb){const _0x16908d=this['config']['stats']?.['id'];return _0x16908d?pipe_1['Pipe']['resolve'](_0x16908d,_0x541afb):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x151f29){const _0x106217=this['config']['stats']?.['key'];return _0x106217?pipe_1['Pipe']['resolve'](_0x106217,_0x151f29):'';}async['setStateNX'](_0x10fa4c){const _0x7f7082=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x7f7082,this['engine']['appId'],_0x10fa4c))throw new errors_1['DuplicateJobError'](_0x7f7082);}async['setStats'](_0x4c3738){const _0x2e5023=this['context']['metadata'];if(_0x2e5023['key']&&this['config']['stats']?.['measures']){const _0x47f437=await this['engine']['getVID'](),_0x53072e=new reporter_1['ReporterService'](_0x47f437,this['store'],this['logger']);await this['store']['setStats'](_0x2e5023['key'],_0x2e5023['jid'],_0x2e5023['ts'],_0x53072e['resolveTriggerStatistics'](this['config'],this['context']),_0x47f437,_0x4c3738);}}}function _0xe2a7(_0x64ec34,_0x3621b7){const _0x2a926f=_0x2a92();return _0xe2a7=function(_0xe2a7c4,_0x30685){_0xe2a7c4=_0xe2a7c4-0x129;let _0x3aff15=_0x2a926f[_0xe2a7c4];return _0x3aff15;},_0xe2a7(_0x64ec34,_0x3621b7);}exports['Trigger']=Trigger;
1
+ 'use strict';(function(_0x314d2a,_0xa83d56){const _0x102552=_0x6a4c,_0x1e95d7=_0x314d2a();while(!![]){try{const _0x436285=-parseInt(_0x102552(0x172))/0x1*(-parseInt(_0x102552(0x16c))/0x2)+parseInt(_0x102552(0x174))/0x3+-parseInt(_0x102552(0x170))/0x4*(-parseInt(_0x102552(0x173))/0x5)+parseInt(_0x102552(0x16e))/0x6*(-parseInt(_0x102552(0x175))/0x7)+parseInt(_0x102552(0x16f))/0x8+parseInt(_0x102552(0x171))/0x9+-parseInt(_0x102552(0x16d))/0xa;if(_0x436285===_0xa83d56)break;else _0x1e95d7['push'](_0x1e95d7['shift']());}catch(_0x2dce2d){_0x1e95d7['push'](_0x1e95d7['shift']());}}}(_0x217d,0x39fb9));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Trigger']=void 0x0;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');function _0x6a4c(_0x1d5c2c,_0x5c8cc7){const _0x217d45=_0x217d();return _0x6a4c=function(_0x6a4cc0,_0x5502c7){_0x6a4cc0=_0x6a4cc0-0x16c;let _0x146de5=_0x217d45[_0x6a4cc0];return _0x146de5;},_0x6a4c(_0x1d5c2c,_0x5c8cc7);}class Trigger extends activity_1['Activity']{constructor(_0x13c755,_0x2f3f38,_0x3bd3a0,_0x3c3cdb,_0x4ff572,_0x5209d5){super(_0x13c755,_0x2f3f38,_0x3bd3a0,_0x3c3cdb,_0x4ff572,_0x5209d5);}async['process'](_0x5da951){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x30ac6e;try{this['setLeg'](0x2),await this['getState'](),_0x30ac6e=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x30ac6e['startJobSpan'](),_0x30ac6e['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x29744c=this['initStatus'](_0x5da951,this['adjacencyList']['length']);await this['setStateNX'](_0x29744c),await this['setStatus'](_0x29744c),this['bindSearchData'](_0x5da951),this['bindMarkerData'](_0x5da951);const _0x3efdea=this['store']['transact']();await this['setState'](_0x3efdea),await this['setStats'](_0x3efdea);_0x5da951?.['pending']&&await this['setExpired'](_0x5da951?.['pending'],_0x3efdea);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x3efdea),await _0x3efdea['exec'](),this['execAdjacentParent'](),_0x30ac6e['mapActivityAttributes']();const _0x581359=Number(this['context']['metadata']['js']);_0x30ac6e['setJobAttributes']({'app.job.jss':_0x581359});const _0x13a2b5={'app.job.jss':_0x581359};return await this['transitionAndLogAdjacent'](_0x5da951,_0x581359,_0x13a2b5),_0x30ac6e['setActivityAttributes'](_0x13a2b5),this['context']['metadata']['jid'];}catch(_0x590bea){_0x30ac6e?.['setActivityError'](_0x590bea['message']);if(_0x590bea instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x211dae=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x211dae){this['logger']['info']('trigger-collation-overage',{'job_id':_0x590bea['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0x590bea['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0x590bea});throw _0x590bea;}finally{_0x30ac6e?.['endJobSpan'](),_0x30ac6e?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x5e8851={},_0x441733,_0x327876){if(isNaN(_0x5e8851['pending'])){const _0x19e400=await this['transition'](this['adjacencyList'],_0x441733);_0x19e400['length']&&(_0x327876['app.activity.mids']=_0x19e400['join'](','));}}['initStatus'](_0x13a15a={},_0x1d6dda){if(_0x13a15a['pending'])return-0x1;return _0x1d6dda;}async['setExpired'](_0x14b613,_0x1bdd35){await this['store']['expireJob'](this['context']['metadata']['jid'],_0x14b613,_0x1bdd35);}['safeKey'](_0x130ff7){return'_'+_0x130ff7;}['bindSearchData'](_0x3f4fdd){_0x3f4fdd?.['search']&&Object['keys'](_0x3f4fdd['search'])['forEach'](_0x2bc708=>{this['context']['data'][this['safeKey'](_0x2bc708)]=_0x3f4fdd['search'][_0x2bc708]['toString']();});}['bindMarkerData'](_0x28494f){_0x28494f?.['marker']&&Object['keys'](_0x28494f['marker'])['forEach'](_0x4faa3f=>{_0x4faa3f['startsWith']('-')&&(this['context']['data'][_0x4faa3f]=_0x28494f['marker'][_0x4faa3f]['toString']());});}async['setStatus'](_0x44186c){this['context']['metadata']['js']=_0x44186c;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x2f9457=(0x0,utils_1['formatISODate'])(new Date()),_0x16b094={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x2f9457,'ju':_0x2f9457}};await this['engine']['execAdjacentParent'](this['context'],_0x16b094);}}['createInputContext'](){const _0x1685c5={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x1685c5;}async['getState'](){const _0x1a9956=this['createInputContext'](),_0x35c3a0=this['resolveJobId'](_0x1a9956),_0x12e07e=this['resolveJobKey'](_0x1a9956),_0x482d86=(0x0,utils_1['formatISODate'])(new Date()),{id:_0x4da495,version:_0x916e3b}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0x316a39={...this['metadata'],'jid':_0x35c3a0,'key':_0x12e07e,'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':_0x4da495,'vrs':_0x916e3b,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0x35c3a0,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x12e07e,'jc':_0x482d86,'ju':_0x482d86,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0x316a39},'output':{'data':this['data'],'metadata':_0x316a39},'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'](_0xf0c1c0=>'metadata/'+_0xf0c1c0);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0xfcbc9a=>'output/metadata/'+_0xfcbc9a);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x1deeb0){const _0x1e724f=this['config']['stats']?.['id'];return _0x1e724f?pipe_1['Pipe']['resolve'](_0x1e724f,_0x1deeb0):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x10ab26){const _0x439d3c=this['config']['stats']?.['key'];return _0x439d3c?pipe_1['Pipe']['resolve'](_0x439d3c,_0x10ab26):'';}async['setStateNX'](_0x454a82){const _0xf1db=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0xf1db,this['engine']['appId'],_0x454a82))throw new errors_1['DuplicateJobError'](_0xf1db);}async['setStats'](_0x133925){const _0x37a14b=this['context']['metadata'];if(_0x37a14b['key']&&this['config']['stats']?.['measures']){const _0x3078ab=await this['engine']['getVID'](),_0x50cdf1=new reporter_1['ReporterService'](_0x3078ab,this['store'],this['logger']);await this['store']['setStats'](_0x37a14b['key'],_0x37a14b['jid'],_0x37a14b['ts'],_0x50cdf1['resolveTriggerStatistics'](this['config'],this['context']),_0x3078ab,_0x133925);}}}exports['Trigger']=Trigger;function _0x217d(){const _0x56d50c=['391968RjPics','6827050aIQcLW','2835954RpEGKa','3505136CeqZvr','1228660JgtbKr','1716399vOOzNk','1ndiYKA','5kIBiVG','782577wBHLye','7uVryyL'];_0x217d=function(){return _0x56d50c;};return _0x217d();}
@@ -1 +1 @@
1
- 'use strict';function _0x4122(){const _0x52b839=['90420Seyuvl','471866bECRIp','216179ThQINc','40ghYHfM','456400MzaeQB','210uwTBYv','182fSkqio','285462jgprPD','314952SVWIdz'];_0x4122=function(){return _0x52b839;};return _0x4122();}(function(_0x1cd437,_0x16cd8c){const _0x391883=_0x1bea,_0x3886fe=_0x1cd437();while(!![]){try{const _0x164ca4=-parseInt(_0x391883(0x1bf))/0x1+parseInt(_0x391883(0x1be))/0x2+parseInt(_0x391883(0x1c5))/0x3+-parseInt(_0x391883(0x1c6))/0x4+-parseInt(_0x391883(0x1c1))/0x5+parseInt(_0x391883(0x1c2))/0x6*(parseInt(_0x391883(0x1c3))/0x7)+parseInt(_0x391883(0x1c0))/0x8*(parseInt(_0x391883(0x1c4))/0x9);if(_0x164ca4===_0x16cd8c)break;else _0x3886fe['push'](_0x3886fe['shift']());}catch(_0x89dad6){_0x3886fe['push'](_0x3886fe['shift']());}}}(_0x4122,0x29971));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(_0x563049,_0x7d9a4,_0x5ef7b7,_0x13c51d,_0x4c8892,_0x24f05c){super(_0x563049,_0x7d9a4,_0x5ef7b7,_0x13c51d,_0x4c8892,_0x24f05c);}async['process'](){this['logger']['debug']('worker-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x3303f2;try{await this['verifyEntry'](),_0x3303f2=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x3303f2['startActivitySpan'](this['leg']),this['mapInputData']();const _0x50a521=this['store']['transact'](),_0x4c804a=await this['execActivity'](_0x50a521);await collator_1['CollatorService']['authorizeReentry'](this,_0x50a521),await this['setState'](_0x50a521),await this['setStatus'](0x0,_0x50a521);const _0x3da954=await _0x50a521['exec']();_0x3303f2['mapActivityAttributes']();const _0x4ad494=this['resolveStatus'](_0x3da954);return _0x3303f2['setActivityAttributes']({'app.activity.mid':_0x4c804a,'app.job.jss':_0x4ad494}),this['context']['metadata']['aid'];}catch(_0x548893){if(_0x548893 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x548893});return;}else{if(_0x548893 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x548893});return;}else{if(_0x548893 instanceof errors_1['GetStateError']){this['logger']['error']('worker-get-state-error',{..._0x548893});return;}else{if(_0x548893 instanceof errors_1['CollationError']){if(_0x548893['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',{..._0x548893});}else this['logger']['error']('worker-process-error',{..._0x548893});}}}_0x3303f2?.['setActivityError'](_0x548893['message']);throw _0x548893;}finally{_0x3303f2?.['endActivitySpan'](),this['logger']['debug']('worker-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x47c04a){const _0x1d6b79=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x3377aa={'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':_0x1d6b79,'spn':this['context']['$self']['output']['metadata']['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return this['config']['retry']&&(_0x3377aa['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](_0x1d6b79,_0x3377aa,_0x47c04a);}}function _0x1bea(_0x14c129,_0x2b36c3){const _0x41224c=_0x4122();return _0x1bea=function(_0x1bea12,_0x3f9d2a){_0x1bea12=_0x1bea12-0x1be;let _0x563700=_0x41224c[_0x1bea12];return _0x563700;},_0x1bea(_0x14c129,_0x2b36c3);}exports['Worker']=Worker;
1
+ 'use strict';(function(_0x37342c,_0x112dc5){const _0x16c282=_0x1220,_0xc2c30b=_0x37342c();while(!![]){try{const _0x511356=-parseInt(_0x16c282(0x14d))/0x1*(parseInt(_0x16c282(0x14f))/0x2)+parseInt(_0x16c282(0x151))/0x3+-parseInt(_0x16c282(0x152))/0x4+-parseInt(_0x16c282(0x14c))/0x5+parseInt(_0x16c282(0x14a))/0x6*(parseInt(_0x16c282(0x14b))/0x7)+-parseInt(_0x16c282(0x150))/0x8+parseInt(_0x16c282(0x14e))/0x9;if(_0x511356===_0x112dc5)break;else _0xc2c30b['push'](_0xc2c30b['shift']());}catch(_0x30fcaf){_0xc2c30b['push'](_0xc2c30b['shift']());}}}(_0x1fd6,0x98ac5));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(_0x480345,_0x56685e,_0x3877ee,_0x16aa9b,_0x3cdb49,_0x5413c6){super(_0x480345,_0x56685e,_0x3877ee,_0x16aa9b,_0x3cdb49,_0x5413c6);}async['process'](){this['logger']['debug']('worker-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x3294f8;try{await this['verifyEntry'](),_0x3294f8=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x3294f8['startActivitySpan'](this['leg']),this['mapInputData']();const _0x4bcee7=this['store']['transact'](),_0x203fdd=await this['execActivity'](_0x4bcee7);await collator_1['CollatorService']['authorizeReentry'](this,_0x4bcee7),await this['setState'](_0x4bcee7),await this['setStatus'](0x0,_0x4bcee7);const _0x496270=await _0x4bcee7['exec']();_0x3294f8['mapActivityAttributes']();const _0x5b0cc9=this['resolveStatus'](_0x496270);return _0x3294f8['setActivityAttributes']({'app.activity.mid':_0x203fdd,'app.job.jss':_0x5b0cc9}),this['context']['metadata']['aid'];}catch(_0xacaf45){if(_0xacaf45 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0xacaf45});return;}else{if(_0xacaf45 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0xacaf45});return;}else{if(_0xacaf45 instanceof errors_1['GetStateError']){this['logger']['error']('worker-get-state-error',{..._0xacaf45});return;}else{if(_0xacaf45 instanceof errors_1['CollationError']){if(_0xacaf45['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',{..._0xacaf45});}else this['logger']['error']('worker-process-error',{..._0xacaf45});}}}_0x3294f8?.['setActivityError'](_0xacaf45['message']);throw _0xacaf45;}finally{_0x3294f8?.['endActivitySpan'](),this['logger']['debug']('worker-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0xaac08e){const _0x3c631=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x5d787e={'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':_0x3c631,'spn':this['context']['$self']['output']['metadata']['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return this['config']['retry']&&(_0x5d787e['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](_0x3c631,_0x5d787e,_0xaac08e);}}function _0x1fd6(){const _0x5722bc=['1993555RNZJGQ','2GKgmOr','10661922cTjdhC','45922eiQvEO','3533528XAcGoc','902955VbodlF','3420716OalQZv','42pSrajz','881209PQpENn'];_0x1fd6=function(){return _0x5722bc;};return _0x1fd6();}function _0x1220(_0x3c82a8,_0x35cbe2){const _0x1fd60b=_0x1fd6();return _0x1220=function(_0x122063,_0x15c003){_0x122063=_0x122063-0x14a;let _0x234955=_0x1fd60b[_0x122063];return _0x234955;},_0x1220(_0x3c82a8,_0x35cbe2);}exports['Worker']=Worker;