@hotmeshio/hotmesh 0.3.14 → 0.3.15

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 (59) 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/meshflow/exporter.js +1 -1
  21. package/build/services/pipe/functions/array.js +1 -1
  22. package/build/services/pipe/functions/bitwise.js +1 -1
  23. package/build/services/pipe/functions/conditional.js +1 -1
  24. package/build/services/pipe/functions/cron.js +1 -1
  25. package/build/services/pipe/functions/date.js +1 -1
  26. package/build/services/pipe/functions/index.js +1 -1
  27. package/build/services/pipe/functions/json.js +1 -1
  28. package/build/services/pipe/functions/logical.js +1 -1
  29. package/build/services/pipe/functions/math.js +1 -1
  30. package/build/services/pipe/functions/number.js +1 -1
  31. package/build/services/pipe/functions/object.js +1 -1
  32. package/build/services/pipe/functions/string.js +1 -1
  33. package/build/services/pipe/functions/symbol.js +1 -1
  34. package/build/services/pipe/functions/unary.js +1 -1
  35. package/build/services/pipe/index.js +1 -1
  36. package/build/services/quorum/index.js +1 -1
  37. package/build/services/reporter/index.js +1 -1
  38. package/build/services/router/index.js +1 -1
  39. package/build/services/search/providers/postgres/postgres.js +1 -1
  40. package/build/services/search/providers/redis/ioredis.js +1 -1
  41. package/build/services/search/providers/redis/redis.js +1 -1
  42. package/build/services/serializer/index.js +1 -1
  43. package/build/services/store/providers/postgres/kvsql.js +1 -1
  44. package/build/services/store/providers/postgres/postgres.js +1 -1
  45. package/build/services/store/providers/redis/_base.js +1 -1
  46. package/build/services/store/providers/redis/ioredis.js +1 -1
  47. package/build/services/store/providers/redis/redis.js +1 -1
  48. package/build/services/store/providers/store-initializable.js +1 -1
  49. package/build/services/stream/providers/nats/nats.js +1 -1
  50. package/build/services/stream/providers/postgres/postgres.js +1 -1
  51. package/build/services/stream/providers/redis/ioredis.js +1 -1
  52. package/build/services/stream/providers/redis/redis.js +1 -1
  53. package/build/services/stream/providers/stream-initializable.js +1 -1
  54. package/build/services/sub/providers/redis/ioredis.js +1 -1
  55. package/build/services/sub/providers/redis/redis.js +1 -1
  56. package/build/services/task/index.js +1 -1
  57. package/build/services/telemetry/index.js +1 -1
  58. package/build/services/worker/index.js +1 -1
  59. package/package.json +1 -1
@@ -1 +1 @@
1
- 'use strict';(function(_0x37deeb,_0x10243c){const _0x3dd621=_0x4ee0,_0x133e71=_0x37deeb();while(!![]){try{const _0x15d1cb=-parseInt(_0x3dd621(0x1b7))/0x1+-parseInt(_0x3dd621(0x1b9))/0x2+-parseInt(_0x3dd621(0x1ba))/0x3+-parseInt(_0x3dd621(0x1b8))/0x4+parseInt(_0x3dd621(0x1bc))/0x5+-parseInt(_0x3dd621(0x1be))/0x6+-parseInt(_0x3dd621(0x1bd))/0x7*(-parseInt(_0x3dd621(0x1bb))/0x8);if(_0x15d1cb===_0x10243c)break;else _0x133e71['push'](_0x133e71['shift']());}catch(_0x3debb0){_0x133e71['push'](_0x133e71['shift']());}}}(_0x34b1,0x8b93f));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'];}});function _0x34b1(){const _0x5a2552=['3040205vFHqAb','1694496uRYkqc','409958AeQGkn','1196108jlEmGp','75408cnbZcb','910116YeMaOE','16vtHQKl','5177790gNZEUt'];_0x34b1=function(){return _0x5a2552;};return _0x34b1();}const HMNS='hmsh';function _0x4ee0(_0x2a7950,_0x587ee4){const _0x34b19f=_0x34b1();return _0x4ee0=function(_0x4ee09d,_0x181ba2){_0x4ee09d=_0x4ee09d-0x1b7;let _0x154197=_0x34b19f[_0x4ee09d];return _0x154197;},_0x4ee0(_0x2a7950,_0x587ee4);}exports['HMNS']=HMNS;const KEYSEP=':';exports['KEYSEP']=KEYSEP;const VALSEP='::';exports['VALSEP']=VALSEP;const WEBSEP='::';exports['WEBSEP']=WEBSEP;const TYPSEP='::';exports['TYPSEP']=TYPSEP;class KeyService{static['mintKey'](_0x2f9c46,_0x1e96f1,_0x1bd30e){switch(_0x1e96f1){case hotmesh_1['KeyType']['HOTMESH']:return _0x2f9c46;case hotmesh_1['KeyType']['THROTTLE_RATE']:return _0x2f9c46+':'+_0x1bd30e['appId']+':r:';case hotmesh_1['KeyType']['WORK_ITEMS']:return _0x2f9c46+':'+_0x1bd30e['appId']+':w:'+(_0x1bd30e['scoutType']||'');case hotmesh_1['KeyType']['TIME_RANGE']:return _0x2f9c46+':'+_0x1bd30e['appId']+':t:'+(_0x1bd30e['timeValue']||'');case hotmesh_1['KeyType']['APP']:return _0x2f9c46+':a:'+(_0x1bd30e['appId']||'');case hotmesh_1['KeyType']['QUORUM']:return _0x2f9c46+':'+_0x1bd30e['appId']+':q:'+(_0x1bd30e['engineId']||'');case hotmesh_1['KeyType']['JOB_STATE']:return _0x2f9c46+':'+_0x1bd30e['appId']+':j:'+_0x1bd30e['jobId'];case hotmesh_1['KeyType']['JOB_DEPENDENTS']:return _0x2f9c46+':'+_0x1bd30e['appId']+':d:'+_0x1bd30e['jobId'];case hotmesh_1['KeyType']['JOB_STATS_GENERAL']:return _0x2f9c46+':'+_0x1bd30e['appId']+':s:'+_0x1bd30e['jobKey']+':'+_0x1bd30e['dateTime'];case hotmesh_1['KeyType']['JOB_STATS_MEDIAN']:return _0x2f9c46+':'+_0x1bd30e['appId']+':s:'+_0x1bd30e['jobKey']+':'+_0x1bd30e['dateTime']+':'+_0x1bd30e['facet'];case hotmesh_1['KeyType']['JOB_STATS_INDEX']:return _0x2f9c46+':'+_0x1bd30e['appId']+':s:'+_0x1bd30e['jobKey']+':'+_0x1bd30e['dateTime']+':'+_0x1bd30e['facet'];case hotmesh_1['KeyType']['SCHEMAS']:return _0x2f9c46+':'+_0x1bd30e['appId']+':v:'+_0x1bd30e['appVersion']+':schemas';case hotmesh_1['KeyType']['SUBSCRIPTIONS']:return _0x2f9c46+':'+_0x1bd30e['appId']+':v:'+_0x1bd30e['appVersion']+':subscriptions';case hotmesh_1['KeyType']['SUBSCRIPTION_PATTERNS']:return _0x2f9c46+':'+_0x1bd30e['appId']+':v:'+_0x1bd30e['appVersion']+':transitions';case hotmesh_1['KeyType']['HOOKS']:return _0x2f9c46+':'+_0x1bd30e['appId']+':hooks';case hotmesh_1['KeyType']['SIGNALS']:return _0x2f9c46+':'+_0x1bd30e['appId']+':signals';case hotmesh_1['KeyType']['SYMKEYS']:return _0x2f9c46+':'+_0x1bd30e['appId']+':sym:keys:'+(_0x1bd30e['activityId']||'');case hotmesh_1['KeyType']['SYMVALS']:return _0x2f9c46+':'+_0x1bd30e['appId']+':sym:vals:';case hotmesh_1['KeyType']['STREAMS']:return _0x2f9c46+':'+(_0x1bd30e['appId']||'')+':x:'+(_0x1bd30e['topic']||'');default:throw new Error('Invalid\x20key\x20type.');}}static['parseKey'](_0x2c2a7c){const [_0x2a9b8d,_0x30d086,_0x2a23aa,..._0x4916d1]=_0x2c2a7c['split'](KEYSEP),_0x4cfbf7=_0x4916d1['join'](KEYSEP)||'';return{'namespace':_0x2a9b8d,'app':_0x2a23aa==='a'?_0x30d086:undefined,'entity':_0x2a23aa,'id':_0x4cfbf7};}static['reconstituteKey'](_0x29dff8){const {namespace:_0x25a20c,app:_0x1c2a0a,entity:_0x225513,id:_0x12d130}=_0x29dff8;return''+_0x25a20c+KEYSEP+_0x1c2a0a+KEYSEP+_0x225513+KEYSEP+(_0x12d130||'');}static['resolveEntityType'](_0x366259,_0x555d24=''){switch(_0x366259){case'a':return'applications';case'r':return'throttles';case'w':return _0x555d24===''?'task_priorities':'roles';case't':return _0x555d24===''?'task_schedules':'task_lists';case'q':return'events';case'j':return'jobs';case's':return'stats';case'v':return'versions';case'x':return _0x555d24===''?'streams':'stream_topics';case'hooks':return'signal_patterns';case'signals':return'signal_registry';case'sym':return'symbols';default:return'unknown_entity';}}static['resolveAbbreviation'](_0x4cdaef){switch(_0x4cdaef){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(_0x233c85,_0x23eed1){const _0x3793b0=_0x3dbd,_0x548cd4=_0x233c85();while(!![]){try{const _0x120859=-parseInt(_0x3793b0(0xe2))/0x1*(parseInt(_0x3793b0(0xe3))/0x2)+parseInt(_0x3793b0(0xe8))/0x3+-parseInt(_0x3793b0(0xe4))/0x4+parseInt(_0x3793b0(0xe5))/0x5+-parseInt(_0x3793b0(0xe6))/0x6+parseInt(_0x3793b0(0xe7))/0x7+-parseInt(_0x3793b0(0xe9))/0x8;if(_0x120859===_0x23eed1)break;else _0x548cd4['push'](_0x548cd4['shift']());}catch(_0x1507c8){_0x548cd4['push'](_0x548cd4['shift']());}}}(_0x3fbf,0xe438c));function _0x3fbf(){const _0x497b67=['13BPyZHx','166436qJawzG','232848wXXqqy','8533710lTxbgG','4466742SixcjW','7045416cYrTds','3297516aIbnVa','7944824jdqdrC'];_0x3fbf=function(){return _0x497b67;};return _0x3fbf();}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;function _0x3dbd(_0x6b8551,_0x17ac6f){const _0x3fbf3c=_0x3fbf();return _0x3dbd=function(_0x3dbd3c,_0x146471){_0x3dbd3c=_0x3dbd3c-0xe2;let _0x5b1e1b=_0x3fbf3c[_0x3dbd3c];return _0x5b1e1b;},_0x3dbd(_0x6b8551,_0x17ac6f);}const VALSEP='::';exports['VALSEP']=VALSEP;const WEBSEP='::';exports['WEBSEP']=WEBSEP;const TYPSEP='::';exports['TYPSEP']=TYPSEP;class KeyService{static['mintKey'](_0x158fc2,_0x244386,_0x50e2d7){switch(_0x244386){case hotmesh_1['KeyType']['HOTMESH']:return _0x158fc2;case hotmesh_1['KeyType']['THROTTLE_RATE']:return _0x158fc2+':'+_0x50e2d7['appId']+':r:';case hotmesh_1['KeyType']['WORK_ITEMS']:return _0x158fc2+':'+_0x50e2d7['appId']+':w:'+(_0x50e2d7['scoutType']||'');case hotmesh_1['KeyType']['TIME_RANGE']:return _0x158fc2+':'+_0x50e2d7['appId']+':t:'+(_0x50e2d7['timeValue']||'');case hotmesh_1['KeyType']['APP']:return _0x158fc2+':a:'+(_0x50e2d7['appId']||'');case hotmesh_1['KeyType']['QUORUM']:return _0x158fc2+':'+_0x50e2d7['appId']+':q:'+(_0x50e2d7['engineId']||'');case hotmesh_1['KeyType']['JOB_STATE']:return _0x158fc2+':'+_0x50e2d7['appId']+':j:'+_0x50e2d7['jobId'];case hotmesh_1['KeyType']['JOB_DEPENDENTS']:return _0x158fc2+':'+_0x50e2d7['appId']+':d:'+_0x50e2d7['jobId'];case hotmesh_1['KeyType']['JOB_STATS_GENERAL']:return _0x158fc2+':'+_0x50e2d7['appId']+':s:'+_0x50e2d7['jobKey']+':'+_0x50e2d7['dateTime'];case hotmesh_1['KeyType']['JOB_STATS_MEDIAN']:return _0x158fc2+':'+_0x50e2d7['appId']+':s:'+_0x50e2d7['jobKey']+':'+_0x50e2d7['dateTime']+':'+_0x50e2d7['facet'];case hotmesh_1['KeyType']['JOB_STATS_INDEX']:return _0x158fc2+':'+_0x50e2d7['appId']+':s:'+_0x50e2d7['jobKey']+':'+_0x50e2d7['dateTime']+':'+_0x50e2d7['facet'];case hotmesh_1['KeyType']['SCHEMAS']:return _0x158fc2+':'+_0x50e2d7['appId']+':v:'+_0x50e2d7['appVersion']+':schemas';case hotmesh_1['KeyType']['SUBSCRIPTIONS']:return _0x158fc2+':'+_0x50e2d7['appId']+':v:'+_0x50e2d7['appVersion']+':subscriptions';case hotmesh_1['KeyType']['SUBSCRIPTION_PATTERNS']:return _0x158fc2+':'+_0x50e2d7['appId']+':v:'+_0x50e2d7['appVersion']+':transitions';case hotmesh_1['KeyType']['HOOKS']:return _0x158fc2+':'+_0x50e2d7['appId']+':hooks';case hotmesh_1['KeyType']['SIGNALS']:return _0x158fc2+':'+_0x50e2d7['appId']+':signals';case hotmesh_1['KeyType']['SYMKEYS']:return _0x158fc2+':'+_0x50e2d7['appId']+':sym:keys:'+(_0x50e2d7['activityId']||'');case hotmesh_1['KeyType']['SYMVALS']:return _0x158fc2+':'+_0x50e2d7['appId']+':sym:vals:';case hotmesh_1['KeyType']['STREAMS']:return _0x158fc2+':'+(_0x50e2d7['appId']||'')+':x:'+(_0x50e2d7['topic']||'');default:throw new Error('Invalid\x20key\x20type.');}}static['parseKey'](_0x33904){const [_0x47aa8b,_0x40877e,_0x210e60,..._0xb438a8]=_0x33904['split'](KEYSEP),_0x2a42b6=_0xb438a8['join'](KEYSEP)||'';return{'namespace':_0x47aa8b,'app':_0x210e60==='a'?_0x40877e:undefined,'entity':_0x210e60,'id':_0x2a42b6};}static['reconstituteKey'](_0x39e65d){const {namespace:_0x276d39,app:_0x44ad38,entity:_0x4ae0f1,id:_0x4cec3a}=_0x39e65d;return''+_0x276d39+KEYSEP+_0x44ad38+KEYSEP+_0x4ae0f1+KEYSEP+(_0x4cec3a||'');}static['resolveEntityType'](_0x18894a,_0x3aa4ed=''){switch(_0x18894a){case'a':return'applications';case'r':return'throttles';case'w':return _0x3aa4ed===''?'task_priorities':'roles';case't':return _0x3aa4ed===''?'task_schedules':'task_lists';case'q':return'events';case'j':return'jobs';case's':return'stats';case'v':return'versions';case'x':return _0x3aa4ed===''?'streams':'stream_topics';case'hooks':return'signal_patterns';case'signals':return'signal_registry';case'sym':return'symbols';default:return'unknown_entity';}}static['resolveAbbreviation'](_0x4ef9d9){switch(_0x4ef9d9){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(_0x523214,_0x471cec){const _0x341c7a=_0x3534,_0x5ec630=_0x523214();while(!![]){try{const _0x399951=-parseInt(_0x341c7a(0x1e0))/0x1*(-parseInt(_0x341c7a(0x1de))/0x2)+parseInt(_0x341c7a(0x1df))/0x3+parseInt(_0x341c7a(0x1e1))/0x4+parseInt(_0x341c7a(0x1e3))/0x5+-parseInt(_0x341c7a(0x1e4))/0x6*(parseInt(_0x341c7a(0x1e2))/0x7)+parseInt(_0x341c7a(0x1e5))/0x8+-parseInt(_0x341c7a(0x1dd))/0x9;if(_0x399951===_0x471cec)break;else _0x5ec630['push'](_0x5ec630['shift']());}catch(_0x445908){_0x5ec630['push'](_0x5ec630['shift']());}}}(_0x4198,0xc4c58));var __importDefault=this&&this['__importDefault']||function(_0xf0c1ff){return _0xf0c1ff&&_0xf0c1ff['__esModule']?_0xf0c1ff:{'default':_0xf0c1ff};};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['identifyRedisTypeFromClass']=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=_0xfe144c=>{const _0x3c5f4d=JSON['stringify'](_0xfe144c);return(0x0,crypto_1['createHash'])('sha256')['update'](_0x3c5f4d)['digest']('hex');};exports['hashOptions']=hashOptions;async function getSystemHealth(){const _0x1201a9=os_1['default']['totalmem'](),_0x1c6e73=os_1['default']['freemem'](),_0x2ffcc1=_0x1201a9-_0x1c6e73,_0x4b5501={'TotalMemoryGB':(_0x1201a9/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','FreeMemoryGB':(_0x1c6e73/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','UsedMemoryGB':(_0x2ffcc1/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};return _0x4b5501;}exports['getSystemHealth']=getSystemHealth;function deepCopy(_0x427af1){return JSON['parse'](JSON['stringify'](_0x427af1));}exports['deepCopy']=deepCopy;function deterministicRandom(_0x5f5bef){const _0x4bd316=Math['sin'](_0x5f5bef)*0x2710;return _0x4bd316-Math['floor'](_0x4bd316);}exports['deterministicRandom']=deterministicRandom;function guid(_0x1ab5c8=enums_1['HMSH_GUID_SIZE']){return'H'+(0x0,nanoid_1['nanoid'])(_0x1ab5c8);}exports['guid']=guid;async function sleepFor(_0xd17f08){return new Promise(_0x2eaf57=>setTimeout(_0x2eaf57,_0xd17f08));}exports['sleepFor']=sleepFor;function sleepImmediate(){return new Promise(_0x24a324=>setImmediate(_0x24a324));}exports['sleepImmediate']=sleepImmediate;function XSleepFor(_0x571543){let _0x4d502c;const _0x4b4e2f=new Promise(_0x25e82a=>{_0x4d502c=setTimeout(_0x25e82a,_0x571543);});return{'promise':_0x4b4e2f,'timerId':_0x4d502c};}exports['XSleepFor']=XSleepFor;function identifyProvider(_0x5b7b38){const _0x5a7414=Object['getPrototypeOf'](_0x5b7b38);if(_0x5b7b38['Query']?.['prototype']||Object['keys'](_0x5b7b38)['includes']('database'))return'postgres';else{if(_0x5b7b38['constructor']&&_0x5b7b38['constructor']['name']==='Client')return'nats';else{if('defineCommand'in _0x5a7414||Object['keys'](_0x5a7414)['includes']('multi'))return'ioredis';else{if(Object['keys'](_0x5a7414)['includes']('Multi'))return'redis';}}}if(_0x5b7b38['constructor']){if(_0x5b7b38['constructor']['name']==='Redis'||_0x5b7b38['constructor']['name']==='EventEmitter'){if('hset'in _0x5b7b38)return'ioredis';}else{if(_0x5b7b38['constructor']['name']==='ProviderClient'||_0x5b7b38['constructor']['name']==='Commander'){if('HSET'in _0x5b7b38)return'redis';}}}let _0x1b00d3=null;if(Object['keys'](_0x5b7b38)['includes']('connection'))_0x1b00d3='postgres';else{if(Object['keys'](_0x5b7b38)['includes']('Pipeline'))_0x1b00d3='ioredis';else{if(Object['keys'](_0x5b7b38)['includes']('createClient'))_0x1b00d3='redis';else Object['keys'](_0x5b7b38)['includes']('jetstream')&&(_0x1b00d3='nats');}}return _0x1b00d3;}exports['identifyProvider']=identifyProvider,exports['polyfill']={'resolveActivityType'(_0x31fa1d){return _0x31fa1d==='activity'?'hook':_0x31fa1d;},'providerConfig'(_0x45fc7b){return _0x45fc7b?.['connection']??_0x45fc7b?.['redis'];},'meshDataConfig'(_0x4aa3ac){if(_0x4aa3ac?.['connections'])return _0x4aa3ac['connections'];return _0x4aa3ac?.['connection']??{'class':_0x4aa3ac?.['redisClass'],'options':_0x4aa3ac?.['redisOptions']};}};function identifyRedisTypeFromClass(_0x27a2f1){if(_0x27a2f1&&_0x27a2f1['name']==='Redis'||_0x27a2f1['name']==='EventEmitter')return'ioredis';else{if(_0x27a2f1&&'createClient'in _0x27a2f1)return'redis';}return null;}exports['identifyRedisTypeFromClass']=identifyRedisTypeFromClass;function matchesStatusCode(_0x3c6d44,_0x41f49c){if(typeof _0x41f49c==='string'){const _0x5a0b11='^'+_0x41f49c['replace'](/\*/g,'\x5cd')+'$';return new RegExp(_0x5a0b11)['test'](_0x3c6d44['toString']());}return _0x41f49c['test'](_0x3c6d44['toString']());}exports['matchesStatusCode']=matchesStatusCode;function matchesStatus(_0x1d8437,_0xf14824){return _0x1d8437===_0xf14824;}exports['matchesStatus']=matchesStatus;function findTopKey(_0x14efdd,_0x377082){for(const [_0x5d6512,_0x3ba5b5]of Object['entries'](_0x14efdd)){if(_0x3ba5b5['hasOwnProperty'](_0x377082)){const _0x5df9bd=findTopKey(_0x14efdd,_0x5d6512['replace'](/^\./,''));return(_0x5df9bd||_0x5d6512)['replace'](/^\./,'');}}return null;}exports['findTopKey']=findTopKey;function findSubscriptionForTrigger(_0x67b2ed,_0x4234b5){for(const [_0x420ebf,_0x4777fe]of Object['entries'](_0x67b2ed)){if(_0x4777fe===_0x4234b5)return _0x420ebf;}return null;}exports['findSubscriptionForTrigger']=findSubscriptionForTrigger;async function getSubscriptionTopic(_0x4b937b,_0x3cd2a8,_0x5f4192){const _0x5af105=await _0x3cd2a8['getTransitions'](_0x5f4192),_0x31d0a5=await _0x3cd2a8['getSubscriptions'](_0x5f4192),_0x4ba13b=findTopKey(_0x5af105,_0x4b937b),_0x40c928=findSubscriptionForTrigger(_0x31d0a5,_0x4ba13b);return _0x40c928;}exports['getSubscriptionTopic']=getSubscriptionTopic;function getTimeSeries(_0x480a3b){if(_0x480a3b['toString']()==='infinity')return'0';const _0xcfc02e=new Date(),_0x278ada=_0x480a3b['slice'](-0x1),_0x30da6c=parseInt(_0x480a3b['slice'](0x0,-0x1),0xa);if(_0x278ada==='m'){const _0x3932e7=Math['floor'](_0xcfc02e['getMinutes']()/_0x30da6c)*_0x30da6c;_0xcfc02e['setUTCMinutes'](_0x3932e7,0x0,0x0);}else _0x278ada==='h'&&_0xcfc02e['setUTCMinutes'](0x0,0x0,0x0);return _0xcfc02e['toISOString']()['replace'](/:\d\d\..+|-|T/g,'')['replace'](':','');}exports['getTimeSeries']=getTimeSeries;function formatISODate(_0x212e20){const _0x297372=_0x212e20 instanceof Date?_0x212e20:new Date(_0x212e20);return _0x297372['toISOString']()['replace'](/[:TZ-]/g,'');}exports['formatISODate']=formatISODate;function getSymKey(_0x13e242){const _0x2f52a7='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x2699b8=_0x2f52a7['length'];if(_0x13e242<0x0||_0x13e242>=Math['pow'](_0x2699b8,0x3))throw new Error('Number\x20out\x20of\x20range');const [_0x553ca9,_0x1bfb37]=divmod(_0x13e242,_0x2699b8),[_0x487271,_0x4faefb]=divmod(_0x553ca9,_0x2699b8);return _0x2f52a7[_0x487271]+_0x2f52a7[_0x1bfb37]+_0x2f52a7[_0x4faefb];}exports['getSymKey']=getSymKey;function getSymVal(_0x4067a4){const _0x40d60d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x7fb2ef=_0x40d60d['length'];if(_0x4067a4<0x0||_0x4067a4>=Math['pow'](_0x7fb2ef,0x2))throw new Error('Number\x20out\x20of\x20range');const [_0x2cce6d,_0x229a39]=divmod(_0x4067a4,_0x7fb2ef);return _0x40d60d[_0x2cce6d]+_0x40d60d[_0x229a39];}exports['getSymVal']=getSymVal;function _0x3534(_0x32d8a8,_0x3ab450){const _0x41980e=_0x4198();return _0x3534=function(_0x353460,_0x535ab0){_0x353460=_0x353460-0x1dd;let _0x1f54fb=_0x41980e[_0x353460];return _0x1f54fb;},_0x3534(_0x32d8a8,_0x3ab450);}function divmod(_0x54a59a,_0x1e6603){return[Math['floor'](_0x54a59a/_0x1e6603),_0x54a59a%_0x1e6603];}function getIndexedHash(_0x3d969d,_0x26d580){const _0x1abaa9=_0x3d969d[_0x26d580]||0x0,_0x15a016={..._0x3d969d};return delete _0x15a016[_0x26d580],[_0x1abaa9,_0x15a016];}exports['getIndexedHash']=getIndexedHash;function getValueByPath(_0x2b101f,_0x167f3a){const _0x1eeeaf=_0x167f3a['split']('/');let _0x48acf0=_0x2b101f;for(const _0x3fc089 of _0x1eeeaf){if(_0x48acf0[_0x3fc089]!==undefined)_0x48acf0=_0x48acf0[_0x3fc089];else return undefined;}return _0x48acf0;}exports['getValueByPath']=getValueByPath;function restoreHierarchy(_0x707c65){const _0x4dc7e5={};for(const _0x1f9200 in _0x707c65){if(_0x707c65[_0x1f9200]===undefined)continue;const _0x4ff9cb=_0x1f9200['split']('/');let _0x25382e=_0x4dc7e5;for(let _0x2994df=0x0;_0x2994df<_0x4ff9cb['length'];_0x2994df++){_0x2994df===_0x4ff9cb['length']-0x1?_0x25382e[_0x4ff9cb[_0x2994df]]=_0x707c65[_0x1f9200]:(_0x25382e[_0x4ff9cb[_0x2994df]]=_0x25382e[_0x4ff9cb[_0x2994df]]||{},_0x25382e=_0x25382e[_0x4ff9cb[_0x2994df]]);}}return _0x4dc7e5;}exports['restoreHierarchy']=restoreHierarchy;function isValidCron(_0x4ff2be){const _0x1f5689=/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/;return _0x1f5689['test'](_0x4ff2be);}exports['isValidCron']=isValidCron;const s=_0x39773e=>{return(0x0,ms_1['default'])(_0x39773e)/0x3e8;};exports['s']=s;const parseStreamMessage=_0x4c6c91=>{try{return JSON['parse'](_0x4c6c91);}catch(_0x18fce4){logger['error']('Error\x20parsing\x20Stream\x20message',{..._0x18fce4});throw _0x18fce4;}};exports['parseStreamMessage']=parseStreamMessage;function _0x4198(){const _0x4b03a3=['6UqzQPh','6167832zcqEYe','5704497BsNnsa','276elOUxp','2178606NxsvCl','2621yZJjoc','2116208ROSRZw','10036929hFwskA','2428625EvjgfC'];_0x4198=function(){return _0x4b03a3;};return _0x4198();}const isStreamMessage=_0x2b4c19=>{return Array['isArray'](_0x2b4c19)&&Array['isArray'](_0x2b4c19[0x0]);};exports['isStreamMessage']=isStreamMessage;const arrayToHash=_0x37965e=>{const _0xcfa42e=[];let _0x30886c;for(let _0x56f95b=0x1;_0x56f95b<_0x37965e['length'];_0x56f95b++){const _0xc1bf0c=_0x37965e[_0x56f95b],_0x436793={};if(Array['isArray'](_0xc1bf0c)){for(let _0xb3c49a=0x0;_0xb3c49a<_0xc1bf0c['length'];_0xb3c49a+=0x2){const _0x2a9df2=_0xc1bf0c[_0xb3c49a],_0x13e5ef=_0xc1bf0c[_0xb3c49a+0x1];_0x436793[_0x2a9df2]=_0x13e5ef;}_0x30886c&&(_0x436793['$']=_0x30886c),_0xcfa42e['push'](_0x436793),_0x30886c=undefined;}else _0x30886c=_0xc1bf0c;}return _0xcfa42e;};exports['arrayToHash']=arrayToHash;
1
+ 'use strict';(function(_0x353704,_0x1a2b40){const _0x5c5fea=_0x4f67,_0x385401=_0x353704();while(!![]){try{const _0x249f6c=-parseInt(_0x5c5fea(0x9b))/0x1+parseInt(_0x5c5fea(0x9d))/0x2*(parseInt(_0x5c5fea(0x9c))/0x3)+-parseInt(_0x5c5fea(0x9a))/0x4*(-parseInt(_0x5c5fea(0xa0))/0x5)+-parseInt(_0x5c5fea(0xa3))/0x6+-parseInt(_0x5c5fea(0x9e))/0x7*(-parseInt(_0x5c5fea(0x99))/0x8)+-parseInt(_0x5c5fea(0xa2))/0x9+parseInt(_0x5c5fea(0x9f))/0xa*(parseInt(_0x5c5fea(0xa1))/0xb);if(_0x249f6c===_0x1a2b40)break;else _0x385401['push'](_0x385401['shift']());}catch(_0x512fcd){_0x385401['push'](_0x385401['shift']());}}}(_0x4628,0xd67bd));var __importDefault=this&&this['__importDefault']||function(_0xf415df){return _0xf415df&&_0xf415df['__esModule']?_0xf415df:{'default':_0xf415df};};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['identifyRedisTypeFromClass']=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=_0x55bf5d=>{const _0x30337c=JSON['stringify'](_0x55bf5d);return(0x0,crypto_1['createHash'])('sha256')['update'](_0x30337c)['digest']('hex');};exports['hashOptions']=hashOptions;async function getSystemHealth(){const _0x15ddf0=os_1['default']['totalmem'](),_0x123c57=os_1['default']['freemem'](),_0x4d1cb5=_0x15ddf0-_0x123c57,_0x53627b={'TotalMemoryGB':(_0x15ddf0/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','FreeMemoryGB':(_0x123c57/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','UsedMemoryGB':(_0x4d1cb5/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};return _0x53627b;}exports['getSystemHealth']=getSystemHealth;function deepCopy(_0x317cf9){return JSON['parse'](JSON['stringify'](_0x317cf9));}exports['deepCopy']=deepCopy;function deterministicRandom(_0x37f417){const _0x236d0e=Math['sin'](_0x37f417)*0x2710;return _0x236d0e-Math['floor'](_0x236d0e);}exports['deterministicRandom']=deterministicRandom;function guid(_0xcbab7f=enums_1['HMSH_GUID_SIZE']){return'H'+(0x0,nanoid_1['nanoid'])(_0xcbab7f);}exports['guid']=guid;async function sleepFor(_0x12fc9e){return new Promise(_0x5da2c3=>setTimeout(_0x5da2c3,_0x12fc9e));}exports['sleepFor']=sleepFor;function sleepImmediate(){return new Promise(_0x3f236d=>setImmediate(_0x3f236d));}exports['sleepImmediate']=sleepImmediate;function XSleepFor(_0x510fc0){let _0x3091f8;const _0xc0facc=new Promise(_0x255f4b=>{_0x3091f8=setTimeout(_0x255f4b,_0x510fc0);});return{'promise':_0xc0facc,'timerId':_0x3091f8};}exports['XSleepFor']=XSleepFor;function identifyProvider(_0x292a38){const _0x493904=Object['getPrototypeOf'](_0x292a38);if(_0x292a38['Query']?.['prototype']||Object['keys'](_0x292a38)['includes']('database'))return'postgres';else{if(_0x292a38['constructor']&&_0x292a38['constructor']['name']==='Client')return'nats';else{if('defineCommand'in _0x493904||Object['keys'](_0x493904)['includes']('multi'))return'ioredis';else{if(Object['keys'](_0x493904)['includes']('Multi'))return'redis';}}}if(_0x292a38['constructor']){if(_0x292a38['constructor']['name']==='Redis'||_0x292a38['constructor']['name']==='EventEmitter'){if('hset'in _0x292a38)return'ioredis';}else{if(_0x292a38['constructor']['name']==='ProviderClient'||_0x292a38['constructor']['name']==='Commander'){if('HSET'in _0x292a38)return'redis';}}}let _0x19b330=null;if(Object['keys'](_0x292a38)['includes']('connection'))_0x19b330='postgres';else{if(Object['keys'](_0x292a38)['includes']('Pipeline'))_0x19b330='ioredis';else{if(Object['keys'](_0x292a38)['includes']('createClient'))_0x19b330='redis';else Object['keys'](_0x292a38)['includes']('jetstream')&&(_0x19b330='nats');}}return _0x19b330;}exports['identifyProvider']=identifyProvider,exports['polyfill']={'resolveActivityType'(_0x403e08){return _0x403e08==='activity'?'hook':_0x403e08;},'providerConfig'(_0x33c1e9){return _0x33c1e9?.['connection']??_0x33c1e9?.['redis'];},'meshDataConfig'(_0xf10d7d){if(_0xf10d7d?.['connections'])return _0xf10d7d['connections'];return _0xf10d7d?.['connection']??{'class':_0xf10d7d?.['redisClass'],'options':_0xf10d7d?.['redisOptions']};}};function identifyRedisTypeFromClass(_0x4fc0f5){if(_0x4fc0f5&&_0x4fc0f5['name']==='Redis'||_0x4fc0f5['name']==='EventEmitter')return'ioredis';else{if(_0x4fc0f5&&'createClient'in _0x4fc0f5)return'redis';}return null;}exports['identifyRedisTypeFromClass']=identifyRedisTypeFromClass;function matchesStatusCode(_0x166e70,_0x2f9ec9){if(typeof _0x2f9ec9==='string'){const _0x349b73='^'+_0x2f9ec9['replace'](/\*/g,'\x5cd')+'$';return new RegExp(_0x349b73)['test'](_0x166e70['toString']());}return _0x2f9ec9['test'](_0x166e70['toString']());}exports['matchesStatusCode']=matchesStatusCode;function matchesStatus(_0x5b4c8e,_0x3d1a20){return _0x5b4c8e===_0x3d1a20;}exports['matchesStatus']=matchesStatus;function findTopKey(_0x4256c4,_0x5afdc3){for(const [_0x365628,_0x48e200]of Object['entries'](_0x4256c4)){if(_0x48e200['hasOwnProperty'](_0x5afdc3)){const _0x322112=findTopKey(_0x4256c4,_0x365628['replace'](/^\./,''));return(_0x322112||_0x365628)['replace'](/^\./,'');}}return null;}exports['findTopKey']=findTopKey;function findSubscriptionForTrigger(_0x4947de,_0x304596){for(const [_0x81295a,_0x44167c]of Object['entries'](_0x4947de)){if(_0x44167c===_0x304596)return _0x81295a;}return null;}exports['findSubscriptionForTrigger']=findSubscriptionForTrigger;function _0x4628(){const _0xe459bb=['156874aWxRXN','623OqVPkM','58350ZMBbGi','51775mTOoHC','1441QZbpAT','3145959ZfHnEq','3382800HKzBMN','141704Ihicuc','60fUdrZL','939602ZVORtC','9KmNazl'];_0x4628=function(){return _0xe459bb;};return _0x4628();}async function getSubscriptionTopic(_0x42f57c,_0x314a25,_0x24e796){const _0x1b5e70=await _0x314a25['getTransitions'](_0x24e796),_0x9d6fc2=await _0x314a25['getSubscriptions'](_0x24e796),_0x3c0f8b=findTopKey(_0x1b5e70,_0x42f57c),_0x14ad7f=findSubscriptionForTrigger(_0x9d6fc2,_0x3c0f8b);return _0x14ad7f;}exports['getSubscriptionTopic']=getSubscriptionTopic;function getTimeSeries(_0x3b68f3){if(_0x3b68f3['toString']()==='infinity')return'0';const _0x6d1db8=new Date(),_0x5835c9=_0x3b68f3['slice'](-0x1),_0x34975a=parseInt(_0x3b68f3['slice'](0x0,-0x1),0xa);if(_0x5835c9==='m'){const _0x25f766=Math['floor'](_0x6d1db8['getMinutes']()/_0x34975a)*_0x34975a;_0x6d1db8['setUTCMinutes'](_0x25f766,0x0,0x0);}else _0x5835c9==='h'&&_0x6d1db8['setUTCMinutes'](0x0,0x0,0x0);return _0x6d1db8['toISOString']()['replace'](/:\d\d\..+|-|T/g,'')['replace'](':','');}exports['getTimeSeries']=getTimeSeries;function formatISODate(_0x4c558e){const _0x4a68be=_0x4c558e instanceof Date?_0x4c558e:new Date(_0x4c558e);return _0x4a68be['toISOString']()['replace'](/[:TZ-]/g,'');}exports['formatISODate']=formatISODate;function getSymKey(_0x2493b1){const _0x21b4f3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x2a7794=_0x21b4f3['length'];if(_0x2493b1<0x0||_0x2493b1>=Math['pow'](_0x2a7794,0x3))throw new Error('Number\x20out\x20of\x20range');const [_0x171141,_0x42bbae]=divmod(_0x2493b1,_0x2a7794),[_0x133a90,_0x291411]=divmod(_0x171141,_0x2a7794);return _0x21b4f3[_0x133a90]+_0x21b4f3[_0x42bbae]+_0x21b4f3[_0x291411];}exports['getSymKey']=getSymKey;function getSymVal(_0x12b9fc){const _0x18b48f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x321903=_0x18b48f['length'];if(_0x12b9fc<0x0||_0x12b9fc>=Math['pow'](_0x321903,0x2))throw new Error('Number\x20out\x20of\x20range');const [_0x48f914,_0x7fa42e]=divmod(_0x12b9fc,_0x321903);return _0x18b48f[_0x48f914]+_0x18b48f[_0x7fa42e];}exports['getSymVal']=getSymVal;function divmod(_0x539f11,_0x3c0be8){return[Math['floor'](_0x539f11/_0x3c0be8),_0x539f11%_0x3c0be8];}function getIndexedHash(_0x17fb91,_0x4c9d19){const _0x16ab54=_0x17fb91[_0x4c9d19]||0x0,_0x318bc9={..._0x17fb91};return delete _0x318bc9[_0x4c9d19],[_0x16ab54,_0x318bc9];}exports['getIndexedHash']=getIndexedHash;function getValueByPath(_0x44fdfa,_0x1266e4){const _0x5ada40=_0x1266e4['split']('/');let _0xb2c1ae=_0x44fdfa;for(const _0x326324 of _0x5ada40){if(_0xb2c1ae[_0x326324]!==undefined)_0xb2c1ae=_0xb2c1ae[_0x326324];else return undefined;}return _0xb2c1ae;}exports['getValueByPath']=getValueByPath;function restoreHierarchy(_0x9b9222){const _0x2fda33={};for(const _0x5d4f79 in _0x9b9222){if(_0x9b9222[_0x5d4f79]===undefined)continue;const _0x34832e=_0x5d4f79['split']('/');let _0x157093=_0x2fda33;for(let _0x16a19=0x0;_0x16a19<_0x34832e['length'];_0x16a19++){_0x16a19===_0x34832e['length']-0x1?_0x157093[_0x34832e[_0x16a19]]=_0x9b9222[_0x5d4f79]:(_0x157093[_0x34832e[_0x16a19]]=_0x157093[_0x34832e[_0x16a19]]||{},_0x157093=_0x157093[_0x34832e[_0x16a19]]);}}return _0x2fda33;}exports['restoreHierarchy']=restoreHierarchy;function isValidCron(_0x2a7fb2){const _0x133db8=/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/;return _0x133db8['test'](_0x2a7fb2);}exports['isValidCron']=isValidCron;const s=_0x560bcd=>{return(0x0,ms_1['default'])(_0x560bcd)/0x3e8;};function _0x4f67(_0x14c0a9,_0x36e33e){const _0x462876=_0x4628();return _0x4f67=function(_0x4f67be,_0x433d07){_0x4f67be=_0x4f67be-0x99;let _0x4f8f35=_0x462876[_0x4f67be];return _0x4f8f35;},_0x4f67(_0x14c0a9,_0x36e33e);}exports['s']=s;const parseStreamMessage=_0x39c31d=>{try{return JSON['parse'](_0x39c31d);}catch(_0x47969c){logger['error']('Error\x20parsing\x20Stream\x20message',{..._0x47969c});throw _0x47969c;}};exports['parseStreamMessage']=parseStreamMessage;const isStreamMessage=_0x2c1706=>{return Array['isArray'](_0x2c1706)&&Array['isArray'](_0x2c1706[0x0]);};exports['isStreamMessage']=isStreamMessage;const arrayToHash=_0x2fb71e=>{const _0x43614e=[];let _0x4ebe9b;for(let _0xaf9a46=0x1;_0xaf9a46<_0x2fb71e['length'];_0xaf9a46++){const _0x49f880=_0x2fb71e[_0xaf9a46],_0x4e2c74={};if(Array['isArray'](_0x49f880)){for(let _0x53041c=0x0;_0x53041c<_0x49f880['length'];_0x53041c+=0x2){const _0x5ccd0e=_0x49f880[_0x53041c],_0x31700f=_0x49f880[_0x53041c+0x1];_0x4e2c74[_0x5ccd0e]=_0x31700f;}_0x4ebe9b&&(_0x4e2c74['$']=_0x4ebe9b),_0x43614e['push'](_0x4e2c74),_0x4ebe9b=undefined;}else _0x4ebe9b=_0x49f880;}return _0x43614e;};exports['arrayToHash']=arrayToHash;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.3.14",
3
+ "version": "0.3.15",
4
4
  "description": "Unbreakable Workflows",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -1 +1 @@
1
- 'use strict';(function(_0x1a1361,_0xeb308d){const _0x46ecd4=_0x1a15,_0x1451b8=_0x1a1361();while(!![]){try{const _0x3657d5=parseInt(_0x46ecd4(0x1ab))/0x1*(parseInt(_0x46ecd4(0x1a9))/0x2)+-parseInt(_0x46ecd4(0x1b2))/0x3*(-parseInt(_0x46ecd4(0x1ad))/0x4)+-parseInt(_0x46ecd4(0x1ac))/0x5+-parseInt(_0x46ecd4(0x1aa))/0x6*(parseInt(_0x46ecd4(0x1b0))/0x7)+parseInt(_0x46ecd4(0x1ae))/0x8+-parseInt(_0x46ecd4(0x1af))/0x9+parseInt(_0x46ecd4(0x1b1))/0xa;if(_0x3657d5===_0xeb308d)break;else _0x1451b8['push'](_0x1451b8['shift']());}catch(_0x45771b){_0x1451b8['push'](_0x1451b8['shift']());}}}(_0x4797,0xe4036));function _0x1a15(_0x4d9456,_0xc2577b){const _0x479786=_0x4797();return _0x1a15=function(_0x1a159d,_0x339eaf){_0x1a159d=_0x1a159d-0x1a9;let _0x21ceac=_0x479786[_0x1a159d];return _0x21ceac;},_0x1a15(_0x4d9456,_0xc2577b);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Activity']=void 0x0;function _0x4797(){const _0x41499e=['17463140VjzBas','6GKgKpR','175542aUsZRl','8245686VDjYjI','14tjvMRM','4202400ylaCUX','2745284FJhGay','89256lnHczy','10891836VjxihU','7HnVjaq'];_0x4797=function(){return _0x41499e;};return _0x4797();}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(_0x2b67c8,_0x44f2e2,_0x4d7514,_0x222aaa,_0x2e0899,_0x491e9a){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x2b67c8,this['data']=_0x44f2e2,this['metadata']=_0x4d7514,this['hook']=_0x222aaa,this['engine']=_0x2e0899,this['context']=_0x491e9a||{'data':{},'metadata':{}},this['logger']=_0x2e0899['logger'],this['store']=_0x2e0899['store'];}['setLeg'](_0x4572dc){this['leg']=_0x4572dc;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0x447a2f=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0x447a2f!==undefined&&!isNaN(Number(_0x447a2f)))return _0x447a2f;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x4118a3=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x4118a3);}catch(_0x2ebba0){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x4118a3>0x0){if(this['context']['metadata']['js']===_0x4118a3){const _0x441b04=await this['setStatus'](-_0x4118a3);Number(_0x441b04)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x2ebba0;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0xb89979=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,_0xb89979);}async['processEvent'](_0x2defbf=stream_1['StreamStatus']['SUCCESS'],_0x3f60aa=0xc8,_0x25782b='output'){this['setLeg'](0x2);const _0x1178d7=this['context']['metadata']['jid'];if(!_0x1178d7){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x3f35f3=this['metadata']['aid'];this['status']=_0x2defbf,this['code']=_0x3f60aa,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x1178d7,'aid':_0x3f35f3,'status':_0x2defbf,'code':_0x3f60aa});let _0x16685d;try{const _0x2e519b=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x2e519b),_0x16685d=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x16685d['startActivitySpan'](this['leg']);let _0x224e6d;if(_0x2defbf===stream_1['StreamStatus']['PENDING'])_0x224e6d=await this['processPending'](_0x25782b);else _0x2defbf===stream_1['StreamStatus']['SUCCESS']?_0x224e6d=await this['processSuccess'](_0x25782b):_0x224e6d=await this['processError']();this['transitionAdjacent'](_0x224e6d,_0x16685d);}catch(_0x3bcfbb){if(_0x3bcfbb instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x3bcfbb['fault']+'-error',{..._0x3bcfbb});return;}else{if(_0x3bcfbb instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x3bcfbb});return;}else{if(_0x3bcfbb instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x3bcfbb});return;}else{if(_0x3bcfbb instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x3bcfbb});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x3bcfbb,'message':_0x3bcfbb['message'],'stack':_0x3bcfbb['stack'],'name':_0x3bcfbb['name']}),_0x16685d?.['setActivityError'](_0x3bcfbb['message']);throw _0x3bcfbb;}finally{_0x16685d?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x1178d7,'aid':_0x3f35f3});}}async['processPending'](_0x5707de){this['bindActivityData'](_0x5707de),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x3ea686=this['store']['transact']();return await this['setState'](_0x3ea686),await collator_1['CollatorService']['notarizeContinuation'](this,_0x3ea686),await this['setStatus'](this['adjacencyList']['length'],_0x3ea686),await _0x3ea686['exec']();}async['processSuccess'](_0x3d3ff4){this['bindActivityData'](_0x3d3ff4),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x483481=this['store']['transact']();return await this['setState'](_0x483481),await collator_1['CollatorService']['notarizeCompletion'](this,_0x483481),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x483481),await _0x483481['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0x24894a=this['store']['transact']();return await this['setState'](_0x24894a),await collator_1['CollatorService']['notarizeCompletion'](this,_0x24894a),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x24894a),await _0x24894a['exec']();}async['transitionAdjacent'](_0x51d32d,_0x5a1cd2){_0x5a1cd2['mapActivityAttributes']();const _0x1d1cef=this['resolveStatus'](_0x51d32d),_0x1dd31b={'app.job.jss':_0x1d1cef},_0x12ac08=await this['transition'](this['adjacencyList'],_0x1d1cef);_0x12ac08?.['length']&&(_0x1dd31b['app.activity.mids']=_0x12ac08['join'](',')),_0x5a1cd2['setActivityAttributes'](_0x1dd31b);}['resolveStatus'](_0xe87c91){const _0x32dd81=_0xe87c91[_0xe87c91['length']-0x1];return Array['isArray'](_0x32dd81)?Number(_0x32dd81[0x1]):Number(_0x32dd81);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x26f3e2=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x30a788=_0x26f3e2['mapRules']();if(_0x30a788)for(const _0x2c2fa5 in _0x30a788){const _0x3330c4=_0x2c2fa5['indexOf']('[');if(_0x3330c4>-0x1){const _0x40d98b=_0x2c2fa5['substring'](_0x3330c4+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x40d98b))){const _0x4b0fa0=_0x2c2fa5['substring'](0x0,_0x3330c4);_0x30a788[_0x4b0fa0]=_0x30a788[_0x2c2fa5],delete _0x30a788[_0x2c2fa5];}else{if(_0x40d98b==='-'||_0x40d98b==='_'){const _0x3ed560=_0x30a788[_0x2c2fa5];Object['keys'](_0x3ed560)['forEach'](_0xe2b5f0=>{_0x30a788[_0xe2b5f0]=_0x3ed560[_0xe2b5f0];});}}}}this['context']['data']=_0x30a788;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x1b0272=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x1b0272['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x41de2b=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x2229de=_0x41de2b['mapRules'](),_0xd70ee9=this['metadata']['aid'],_0x1ac425={...this['context'][_0xd70ee9]['output'],..._0x2229de};this['context'][_0xd70ee9]['output']['data']=_0x1ac425;}}async['registerTimeout'](){}['bindActivityError'](_0x561a95){const _0x33a1d5=this['context'][this['metadata']['aid']]['output']['metadata'];_0x33a1d5['err']=JSON['stringify'](this['data']),_0x33a1d5['$error']={..._0x561a95,'is_stream_error':!![]};}['bindJobError'](_0x33d437){this['context']['metadata']['err']=JSON['stringify']({..._0x33d437,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0xfdd512,_0x2624c0){const {id:_0x4d7732}=await this['engine']['getVID']();return await this['store']['setStatus'](_0xfdd512,this['context']['metadata']['jid'],_0x4d7732,_0x2624c0);}['authorizeEntry'](_0x333e32){return this['adjacencyList']?.['map'](_0x51a11c=>{const {metadata:{aid:_0x20cc85}}=_0x51a11c;return _0x333e32[_0x20cc85+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x20cc85;})??[];}['bindDimensionalAddress'](_0x1dbfac){const _0x1eba4b=this['resolveDad']();_0x1dbfac[this['metadata']['aid']+'/output/metadata/dad']=_0x1eba4b;}async['setState'](_0x19bb9c){const _0x22c598=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x11086a={};await this['bindJobState'](_0x11086a);const _0x5553e4=this['authorizeEntry'](_0x11086a);this['bindDimensionalAddress'](_0x11086a),this['bindActivityState'](_0x11086a);const _0xe5f29f=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x5553e4],_0x1f05a6=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x11086a,this['getJobStatus'](),_0x22c598,_0xe5f29f,_0x1f05a6,_0x19bb9c);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x4ce37d=this['context']['$self'];!_0x4ce37d['output']['metadata']&&(_0x4ce37d['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x4ce37d['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x172725=(0x0,utils_1['formatISODate'])(new Date());_0x4ce37d['output']['metadata']['ac']=_0x172725,_0x4ce37d['output']['metadata']['au']=_0x172725,_0x4ce37d['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x4ce37d['output']['metadata']['stp']=this['config']['subtype']),_0x4ce37d['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x5affd4){const _0x47de29=await this['getTriggerConfig'](),_0xaf3d73=[..._0x47de29['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x256c18 of _0xaf3d73){const _0x42cf0d=(0x0,utils_1['getValueByPath'])(this['context'],_0x256c18);_0x42cf0d!==undefined&&(_0x5affd4[_0x256c18]=_0x42cf0d);}for(const _0x35e594 in this['context']?.['data']??{}){(_0x35e594['startsWith']('-')||_0x35e594['startsWith']('_'))&&(_0x5affd4[_0x35e594]=this['context']['data'][_0x35e594]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x5affd4,this['config'],this['context']);}['bindActivityState'](_0x135cc7){const _0x2b5702=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0x27784b of _0x2b5702){const _0x93ef6a=this['metadata']['aid']+'/'+_0x27784b,_0xd8ff51=(0x0,utils_1['getValueByPath'])(this['context'],_0x93ef6a);_0xd8ff51!==undefined&&(_0x135cc7[_0x93ef6a]=_0xd8ff51);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x135cc7,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x43d730=>'metadata/'+_0x43d730);}['bindActivityMetadataPaths'](){const _0x36bf8d=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x36bf8d]['KEYS']['map'](_0x486781=>'output/metadata/'+_0x486781);}async['getState'](){const _0x5a4415=this['context']['metadata']['gid'],_0x2ee741='$'+this['config']['subscribes'],_0x5ba1d9={[_0x2ee741]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x206993=>'metadata/'+_0x206993)};for(let [_0x481c30,_0x2ebba9]of Object['entries'](this['config']['consumes'])){if(_0x481c30==='$job')for(const _0x4a0967 of _0x2ebba9){_0x5ba1d9[_0x2ee741]['push'](_0x4a0967);}else{_0x481c30==='$self'&&(_0x481c30=this['metadata']['aid']);!_0x5ba1d9[_0x481c30]&&(_0x5ba1d9[_0x481c30]=[]);for(const _0x46d15b of _0x2ebba9){_0x5ba1d9[_0x481c30]['push'](_0x481c30+'/'+_0x46d15b);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0x5ba1d9,this['config'],this['metadata'],this['leg']);const {dad:_0x1c50aa,jid:_0xaf209a}=this['context']['metadata'],_0x31fa26=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x1c50aa||''),[_0x16b9fc,_0x5dc6dc]=await this['store']['getState'](_0xaf209a,_0x5ba1d9,_0x31fa26);this['context']=(0x0,utils_1['restoreHierarchy'])(_0x16b9fc),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x5a4415),this['initDimensionalAddress'](_0x1c50aa),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0xaefe07,_0xb8377b){if(_0xb8377b!==_0xaefe07)throw new errors_1['GenerationalError'](_0xaefe07,_0xb8377b,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0x56d190){this['metadata']['dad']=_0x56d190;}['initSelf'](_0x4bd718){const _0x4abc90=this['metadata']['aid'];!_0x4bd718[_0x4abc90]&&(_0x4bd718[_0x4abc90]={});const _0x379113=_0x4bd718[_0x4abc90];return!_0x379113['output']&&(_0x379113['output']={}),!_0x379113['input']&&(_0x379113['input']={}),!_0x379113['hook']&&(_0x379113['hook']={}),!_0x379113['output']['metadata']&&(_0x379113['output']['metadata']={}),_0x379113['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x4bd718['$self']=_0x379113,_0x4bd718['$job']=_0x4bd718,_0x4bd718;}['initPolicies'](_0x143357){const _0x4ac476=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0x143357);_0x143357['metadata']['expire']=_0x4ac476;if(this['config']['persistent']!=undefined){const _0x153bef=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0x143357);_0x143357['metadata']['persistent']=_0x153bef;}}['bindActivityData'](_0x153584){this['context'][this['metadata']['aid']][_0x153584]['data']=this['data'];}['resolveDad'](){let _0x373cc5=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x373cc5=_0x373cc5['substring'](0x0,_0x373cc5['lastIndexOf'](','))+','+this['adjacentIndex']),_0x373cc5;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x241947=[],_0xe05482=await this['store']['getTransitions'](await this['engine']['getVID']()),_0xb195e6=_0xe05482['.'+this['metadata']['aid']],_0x4c0404=this['resolveAdjacentDad']();if(_0xb195e6)for(const _0x51691d in _0xb195e6){const _0x56d64e=_0xb195e6[_0x51691d];mapper_1['MapperService']['evaluate'](_0x56d64e,this['context'],this['code'])&&_0x241947['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x4c0404,'aid':_0x51691d,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x241947;}['isJobComplete'](_0x48ed86){return _0x48ed86<=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'](_0xc9b25f,_0x1f753c){if(this['jobWasInterrupted'](_0x1f753c))return;let _0x533716=[];(this['shouldEmit']()||this['isJobComplete'](_0x1f753c)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x1f753c)&&!this['shouldPersistJob']()});if(_0xc9b25f['length']&&!this['isJobComplete'](_0x1f753c)){const _0x287872=this['store']['transact']();for(const _0x126d6d of _0xc9b25f){await this['engine']['router']?.['publishMessage'](null,_0x126d6d,_0x287872);}_0x533716=await _0x287872['exec']();}return _0x533716;}['jobWasInterrupted'](_0x2a675d){return _0x2a675d<-0x5f5e100;}}exports['Activity']=Activity;
1
+ 'use strict';function _0xa532(){const _0xeff5f1=['40aIEmVT','18671888aGmXdP','3592010XOqbOz','2512126rCXgVp','191814RRVqcY','1307130VfFvWb','8249694zXSxDv','12292469JimGoN'];_0xa532=function(){return _0xeff5f1;};return _0xa532();}function _0x34a6(_0x3b4e58,_0x491c2b){const _0xa532c3=_0xa532();return _0x34a6=function(_0x34a677,_0x12b992){_0x34a677=_0x34a677-0x18b;let _0x1fcee8=_0xa532c3[_0x34a677];return _0x1fcee8;},_0x34a6(_0x3b4e58,_0x491c2b);}(function(_0x5d95ef,_0x55dcff){const _0x1c51d3=_0x34a6,_0x1202b6=_0x5d95ef();while(!![]){try{const _0x44e108=parseInt(_0x1c51d3(0x192))/0x1+-parseInt(_0x1c51d3(0x190))/0x2+parseInt(_0x1c51d3(0x191))/0x3*(-parseInt(_0x1c51d3(0x18d))/0x4)+parseInt(_0x1c51d3(0x18f))/0x5+parseInt(_0x1c51d3(0x18b))/0x6+parseInt(_0x1c51d3(0x18c))/0x7+-parseInt(_0x1c51d3(0x18e))/0x8;if(_0x44e108===_0x55dcff)break;else _0x1202b6['push'](_0x1202b6['shift']());}catch(_0x5e265f){_0x1202b6['push'](_0x1202b6['shift']());}}}(_0xa532,0xe258f));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Activity']=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),mapper_1=require('../mapper'),pipe_1=require('../pipe'),serializer_1=require('../serializer'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream');class Activity{constructor(_0x481a42,_0x24793b,_0x3fc02e,_0x14b64f,_0x299fb4,_0x5d3c98){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x481a42,this['data']=_0x24793b,this['metadata']=_0x3fc02e,this['hook']=_0x14b64f,this['engine']=_0x299fb4,this['context']=_0x5d3c98||{'data':{},'metadata':{}},this['logger']=_0x299fb4['logger'],this['store']=_0x299fb4['store'];}['setLeg'](_0x386978){this['leg']=_0x386978;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0x1e5d30=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0x1e5d30!==undefined&&!isNaN(Number(_0x1e5d30)))return _0x1e5d30;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x5a6d3b=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x5a6d3b);}catch(_0x369f99){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x5a6d3b>0x0){if(this['context']['metadata']['js']===_0x5a6d3b){const _0x8084d2=await this['setStatus'](-_0x5a6d3b);Number(_0x8084d2)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x369f99;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0x1af5e7=this['context']['metadata']['guid'];return this['setLeg'](0x2),await this['getState'](),collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid']),await collator_1['CollatorService']['notarizeReentry'](this,_0x1af5e7);}async['processEvent'](_0x3261d6=stream_1['StreamStatus']['SUCCESS'],_0x1f66c2=0xc8,_0x194274='output'){this['setLeg'](0x2);const _0x35c3e4=this['context']['metadata']['jid'];if(!_0x35c3e4){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x22641c=this['metadata']['aid'];this['status']=_0x3261d6,this['code']=_0x1f66c2,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x35c3e4,'aid':_0x22641c,'status':_0x3261d6,'code':_0x1f66c2});let _0x5e7d78;try{const _0x27a3b1=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x27a3b1),_0x5e7d78=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5e7d78['startActivitySpan'](this['leg']);let _0x5acf89;if(_0x3261d6===stream_1['StreamStatus']['PENDING'])_0x5acf89=await this['processPending'](_0x194274);else _0x3261d6===stream_1['StreamStatus']['SUCCESS']?_0x5acf89=await this['processSuccess'](_0x194274):_0x5acf89=await this['processError']();this['transitionAdjacent'](_0x5acf89,_0x5e7d78);}catch(_0x4bdbed){if(_0x4bdbed instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x4bdbed['fault']+'-error',{..._0x4bdbed});return;}else{if(_0x4bdbed instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x4bdbed});return;}else{if(_0x4bdbed instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x4bdbed});return;}else{if(_0x4bdbed instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x4bdbed});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x4bdbed,'message':_0x4bdbed['message'],'stack':_0x4bdbed['stack'],'name':_0x4bdbed['name']}),_0x5e7d78?.['setActivityError'](_0x4bdbed['message']);throw _0x4bdbed;}finally{_0x5e7d78?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x35c3e4,'aid':_0x22641c});}}async['processPending'](_0x36add9){this['bindActivityData'](_0x36add9),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x13ddb3=this['store']['transact']();return await this['setState'](_0x13ddb3),await collator_1['CollatorService']['notarizeContinuation'](this,_0x13ddb3),await this['setStatus'](this['adjacencyList']['length'],_0x13ddb3),await _0x13ddb3['exec']();}async['processSuccess'](_0x10d7a9){this['bindActivityData'](_0x10d7a9),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x5ab04e=this['store']['transact']();return await this['setState'](_0x5ab04e),await collator_1['CollatorService']['notarizeCompletion'](this,_0x5ab04e),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x5ab04e),await _0x5ab04e['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0x354290=this['store']['transact']();return await this['setState'](_0x354290),await collator_1['CollatorService']['notarizeCompletion'](this,_0x354290),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x354290),await _0x354290['exec']();}async['transitionAdjacent'](_0x28e609,_0x4c58b6){_0x4c58b6['mapActivityAttributes']();const _0x59af10=this['resolveStatus'](_0x28e609),_0x323e23={'app.job.jss':_0x59af10},_0x5db331=await this['transition'](this['adjacencyList'],_0x59af10);_0x5db331?.['length']&&(_0x323e23['app.activity.mids']=_0x5db331['join'](',')),_0x4c58b6['setActivityAttributes'](_0x323e23);}['resolveStatus'](_0x4d54a3){const _0xb5d877=_0x4d54a3[_0x4d54a3['length']-0x1];return Array['isArray'](_0xb5d877)?Number(_0xb5d877[0x1]):Number(_0xb5d877);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x3ef1d5=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x5065de=_0x3ef1d5['mapRules']();if(_0x5065de)for(const _0x4b712a in _0x5065de){const _0x1d50d4=_0x4b712a['indexOf']('[');if(_0x1d50d4>-0x1){const _0x4c66a9=_0x4b712a['substring'](_0x1d50d4+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x4c66a9))){const _0x4e7525=_0x4b712a['substring'](0x0,_0x1d50d4);_0x5065de[_0x4e7525]=_0x5065de[_0x4b712a],delete _0x5065de[_0x4b712a];}else{if(_0x4c66a9==='-'||_0x4c66a9==='_'){const _0x9b83=_0x5065de[_0x4b712a];Object['keys'](_0x9b83)['forEach'](_0x586f3b=>{_0x5065de[_0x586f3b]=_0x9b83[_0x586f3b];});}}}}this['context']['data']=_0x5065de;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x1c27ee=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x1c27ee['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x1ef0ca=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x43429c=_0x1ef0ca['mapRules'](),_0xdf01f1=this['metadata']['aid'],_0x41d516={...this['context'][_0xdf01f1]['output'],..._0x43429c};this['context'][_0xdf01f1]['output']['data']=_0x41d516;}}async['registerTimeout'](){}['bindActivityError'](_0x396245){const _0x3e0512=this['context'][this['metadata']['aid']]['output']['metadata'];_0x3e0512['err']=JSON['stringify'](this['data']),_0x3e0512['$error']={..._0x396245,'is_stream_error':!![]};}['bindJobError'](_0x2165b5){this['context']['metadata']['err']=JSON['stringify']({..._0x2165b5,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0x539918,_0x1ab6ae){const {id:_0x324170}=await this['engine']['getVID']();return await this['store']['setStatus'](_0x539918,this['context']['metadata']['jid'],_0x324170,_0x1ab6ae);}['authorizeEntry'](_0x469543){return this['adjacencyList']?.['map'](_0x4358c1=>{const {metadata:{aid:_0x286e53}}=_0x4358c1;return _0x469543[_0x286e53+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x286e53;})??[];}['bindDimensionalAddress'](_0x67ff12){const _0x44ddbe=this['resolveDad']();_0x67ff12[this['metadata']['aid']+'/output/metadata/dad']=_0x44ddbe;}async['setState'](_0x37689c){const _0x527826=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x296c98={};await this['bindJobState'](_0x296c98);const _0x3f42ef=this['authorizeEntry'](_0x296c98);this['bindDimensionalAddress'](_0x296c98),this['bindActivityState'](_0x296c98);const _0x4d1fd9=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x3f42ef],_0x26af5d=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x296c98,this['getJobStatus'](),_0x527826,_0x4d1fd9,_0x26af5d,_0x37689c);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x50fd63=this['context']['$self'];!_0x50fd63['output']['metadata']&&(_0x50fd63['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x50fd63['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x26b1a6=(0x0,utils_1['formatISODate'])(new Date());_0x50fd63['output']['metadata']['ac']=_0x26b1a6,_0x50fd63['output']['metadata']['au']=_0x26b1a6,_0x50fd63['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x50fd63['output']['metadata']['stp']=this['config']['subtype']),_0x50fd63['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x1b2f21){const _0x487828=await this['getTriggerConfig'](),_0xcfcafc=[..._0x487828['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x528338 of _0xcfcafc){const _0x2a279e=(0x0,utils_1['getValueByPath'])(this['context'],_0x528338);_0x2a279e!==undefined&&(_0x1b2f21[_0x528338]=_0x2a279e);}for(const _0xd1ed4b in this['context']?.['data']??{}){(_0xd1ed4b['startsWith']('-')||_0xd1ed4b['startsWith']('_'))&&(_0x1b2f21[_0xd1ed4b]=this['context']['data'][_0xd1ed4b]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x1b2f21,this['config'],this['context']);}['bindActivityState'](_0x3b5947){const _0x28e50a=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0xf3c4bd of _0x28e50a){const _0x481703=this['metadata']['aid']+'/'+_0xf3c4bd,_0x51f9d3=(0x0,utils_1['getValueByPath'])(this['context'],_0x481703);_0x51f9d3!==undefined&&(_0x3b5947[_0x481703]=_0x51f9d3);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x3b5947,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x3f16e8=>'metadata/'+_0x3f16e8);}['bindActivityMetadataPaths'](){const _0x20aa14=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x20aa14]['KEYS']['map'](_0x3a23d6=>'output/metadata/'+_0x3a23d6);}async['getState'](){const _0x2ce075=this['context']['metadata']['gid'],_0x487eb5='$'+this['config']['subscribes'],_0x1d5ee3={[_0x487eb5]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x31c72d=>'metadata/'+_0x31c72d)};for(let [_0x5c36ba,_0x2fcfe2]of Object['entries'](this['config']['consumes'])){if(_0x5c36ba==='$job')for(const _0x4bac1c of _0x2fcfe2){_0x1d5ee3[_0x487eb5]['push'](_0x4bac1c);}else{_0x5c36ba==='$self'&&(_0x5c36ba=this['metadata']['aid']);!_0x1d5ee3[_0x5c36ba]&&(_0x1d5ee3[_0x5c36ba]=[]);for(const _0x592183 of _0x2fcfe2){_0x1d5ee3[_0x5c36ba]['push'](_0x5c36ba+'/'+_0x592183);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0x1d5ee3,this['config'],this['metadata'],this['leg']);const {dad:_0x25ea51,jid:_0x342823}=this['context']['metadata'],_0x209a45=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x25ea51||''),[_0x3141a4,_0x38b939]=await this['store']['getState'](_0x342823,_0x1d5ee3,_0x209a45);this['context']=(0x0,utils_1['restoreHierarchy'])(_0x3141a4),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x2ce075),this['initDimensionalAddress'](_0x25ea51),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x5d51a3,_0x153a49){if(_0x153a49!==_0x5d51a3)throw new errors_1['GenerationalError'](_0x5d51a3,_0x153a49,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0x5073fb){this['metadata']['dad']=_0x5073fb;}['initSelf'](_0x3818a4){const _0x5065bc=this['metadata']['aid'];!_0x3818a4[_0x5065bc]&&(_0x3818a4[_0x5065bc]={});const _0x5bc2ec=_0x3818a4[_0x5065bc];return!_0x5bc2ec['output']&&(_0x5bc2ec['output']={}),!_0x5bc2ec['input']&&(_0x5bc2ec['input']={}),!_0x5bc2ec['hook']&&(_0x5bc2ec['hook']={}),!_0x5bc2ec['output']['metadata']&&(_0x5bc2ec['output']['metadata']={}),_0x5bc2ec['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x3818a4['$self']=_0x5bc2ec,_0x3818a4['$job']=_0x3818a4,_0x3818a4;}['initPolicies'](_0xe7626a){const _0x82ccf2=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0xe7626a);_0xe7626a['metadata']['expire']=_0x82ccf2;if(this['config']['persistent']!=undefined){const _0x30ddfa=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0xe7626a);_0xe7626a['metadata']['persistent']=_0x30ddfa;}}['bindActivityData'](_0x369e63){this['context'][this['metadata']['aid']][_0x369e63]['data']=this['data'];}['resolveDad'](){let _0x112f4e=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x112f4e=_0x112f4e['substring'](0x0,_0x112f4e['lastIndexOf'](','))+','+this['adjacentIndex']),_0x112f4e;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x3793cb=[],_0x5d49f5=await this['store']['getTransitions'](await this['engine']['getVID']()),_0x26157d=_0x5d49f5['.'+this['metadata']['aid']],_0x2522c0=this['resolveAdjacentDad']();if(_0x26157d)for(const _0x4e2e82 in _0x26157d){const _0x3756d0=_0x26157d[_0x4e2e82];mapper_1['MapperService']['evaluate'](_0x3756d0,this['context'],this['code'])&&_0x3793cb['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x2522c0,'aid':_0x4e2e82,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x3793cb;}['isJobComplete'](_0x58b46a){return _0x58b46a<=0x0;}['shouldEmit'](){if(this['config']['emit'])return pipe_1['Pipe']['resolve'](this['config']['emit'],this['context'])===!![];return![];}['shouldPersistJob'](){if(this['config']['persist']!==undefined)return pipe_1['Pipe']['resolve'](this['config']['persist'],this['context'])===!![];return![];}async['transition'](_0x1b9a78,_0x335c8a){if(this['jobWasInterrupted'](_0x335c8a))return;let _0x469612=[];(this['shouldEmit']()||this['isJobComplete'](_0x335c8a)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x335c8a)&&!this['shouldPersistJob']()});if(_0x1b9a78['length']&&!this['isJobComplete'](_0x335c8a)){const _0x4ed58f=this['store']['transact']();for(const _0x538b8f of _0x1b9a78){await this['engine']['router']?.['publishMessage'](null,_0x538b8f,_0x4ed58f);}_0x469612=await _0x4ed58f['exec']();}return _0x469612;}['jobWasInterrupted'](_0x52ebb0){return _0x52ebb0<-0x5f5e100;}}exports['Activity']=Activity;
@@ -1 +1 @@
1
- 'use strict';(function(_0x260d00,_0x2ce89a){const _0x45efc5=_0x18b6,_0x5b1f11=_0x260d00();while(!![]){try{const _0x10f4ac=parseInt(_0x45efc5(0x164))/0x1*(parseInt(_0x45efc5(0x167))/0x2)+-parseInt(_0x45efc5(0x161))/0x3*(parseInt(_0x45efc5(0x169))/0x4)+parseInt(_0x45efc5(0x162))/0x5*(parseInt(_0x45efc5(0x165))/0x6)+parseInt(_0x45efc5(0x163))/0x7*(-parseInt(_0x45efc5(0x168))/0x8)+-parseInt(_0x45efc5(0x166))/0x9+parseInt(_0x45efc5(0x160))/0xa*(-parseInt(_0x45efc5(0x15f))/0xb)+parseInt(_0x45efc5(0x16a))/0xc;if(_0x10f4ac===_0x2ce89a)break;else _0x5b1f11['push'](_0x5b1f11['shift']());}catch(_0x35f87a){_0x5b1f11['push'](_0x5b1f11['shift']());}}}(_0x2d51,0xc7a22));function _0x2d51(){const _0x382ee4=['820059ZQzWEU','7288525uyQHBi','1159151xYLugk','15VuiaTW','6LaWtox','11033847uXXQio','156040EkCblj','8LHGRhT','20SXFYLc','13036356MCrjQB','187sCRFjG','81370hTDWDe'];_0x2d51=function(){return _0x382ee4;};return _0x2d51();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Await']=void 0x0;function _0x18b6(_0x1ccb2b,_0x3d055d){const _0x2d518e=_0x2d51();return _0x18b6=function(_0x18b6c5,_0x1ddb2a){_0x18b6c5=_0x18b6c5-0x15f;let _0xeee3b2=_0x2d518e[_0x18b6c5];return _0xeee3b2;},_0x18b6(_0x1ccb2b,_0x3d055d);}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(_0x222d00,_0x22c379,_0x3404a6,_0x56dcbf,_0x163d6e,_0x394fd5){super(_0x222d00,_0x22c379,_0x3404a6,_0x56dcbf,_0x163d6e,_0x394fd5);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x1744d2;try{await this['verifyEntry'](),_0x1744d2=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x1744d2['startActivitySpan'](this['leg']),this['mapInputData']();const _0x4a4e0b=this['store']['transact'](),_0x59bf27=await this['execActivity'](_0x4a4e0b);await collator_1['CollatorService']['authorizeReentry'](this,_0x4a4e0b),await this['setState'](_0x4a4e0b),await this['setStatus'](0x0,_0x4a4e0b);const _0x14e355=await _0x4a4e0b['exec']();_0x1744d2['mapActivityAttributes']();const _0x57105a=this['resolveStatus'](_0x14e355);return _0x1744d2['setActivityAttributes']({'app.activity.mid':_0x59bf27,'app.job.jss':_0x57105a}),this['context']['metadata']['aid'];}catch(_0x5e58ae){if(_0x5e58ae instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x5e58ae});return;}else{if(_0x5e58ae instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x5e58ae});return;}else{if(_0x5e58ae instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0x5e58ae});return;}else{if(_0x5e58ae instanceof errors_1['CollationError']){if(_0x5e58ae['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',{..._0x5e58ae});}else this['logger']['error']('await-process-error',{..._0x5e58ae});}}}_0x1744d2?.['setActivityError'](_0x5e58ae['message']);throw _0x5e58ae;}finally{_0x1744d2?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x3ca0f3){const _0xb883fe=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x5aa675={'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':_0xb883fe,'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 _0x5f2407=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x5f2407===![]&&(_0x5aa675['metadata']['await']=![]);}return this['config']['retry']&&(_0x5aa675['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x5aa675,_0x3ca0f3);}}exports['Await']=Await;
1
+ 'use strict';(function(_0x2d57d3,_0x128dce){const _0x1a68e6=_0x37f7,_0x38768d=_0x2d57d3();while(!![]){try{const _0x1b09b6=parseInt(_0x1a68e6(0x172))/0x1+parseInt(_0x1a68e6(0x167))/0x2*(-parseInt(_0x1a68e6(0x16f))/0x3)+parseInt(_0x1a68e6(0x16c))/0x4*(parseInt(_0x1a68e6(0x168))/0x5)+-parseInt(_0x1a68e6(0x171))/0x6*(parseInt(_0x1a68e6(0x16e))/0x7)+parseInt(_0x1a68e6(0x169))/0x8*(parseInt(_0x1a68e6(0x16a))/0x9)+parseInt(_0x1a68e6(0x16d))/0xa*(parseInt(_0x1a68e6(0x173))/0xb)+-parseInt(_0x1a68e6(0x16b))/0xc*(parseInt(_0x1a68e6(0x170))/0xd);if(_0x1b09b6===_0x128dce)break;else _0x38768d['push'](_0x38768d['shift']());}catch(_0x2b65ac){_0x38768d['push'](_0x38768d['shift']());}}}(_0x5c0b,0xeb047));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(_0x3cea86,_0x287d20,_0x1cc3fb,_0x3aa94f,_0x52b739,_0x580038){super(_0x3cea86,_0x287d20,_0x1cc3fb,_0x3aa94f,_0x52b739,_0x580038);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x3c7871;try{await this['verifyEntry'](),_0x3c7871=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x3c7871['startActivitySpan'](this['leg']),this['mapInputData']();const _0xaff27c=this['store']['transact'](),_0x2b5861=await this['execActivity'](_0xaff27c);await collator_1['CollatorService']['authorizeReentry'](this,_0xaff27c),await this['setState'](_0xaff27c),await this['setStatus'](0x0,_0xaff27c);const _0x58f5f9=await _0xaff27c['exec']();_0x3c7871['mapActivityAttributes']();const _0x12aaa5=this['resolveStatus'](_0x58f5f9);return _0x3c7871['setActivityAttributes']({'app.activity.mid':_0x2b5861,'app.job.jss':_0x12aaa5}),this['context']['metadata']['aid'];}catch(_0x3210ed){if(_0x3210ed instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x3210ed});return;}else{if(_0x3210ed instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x3210ed});return;}else{if(_0x3210ed instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0x3210ed});return;}else{if(_0x3210ed instanceof errors_1['CollationError']){if(_0x3210ed['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',{..._0x3210ed});}else this['logger']['error']('await-process-error',{..._0x3210ed});}}}_0x3c7871?.['setActivityError'](_0x3210ed['message']);throw _0x3210ed;}finally{_0x3c7871?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x4ff947){const _0x29a910=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x36e818={'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':_0x29a910,'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 _0x296a14=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x296a14===![]&&(_0x36e818['metadata']['await']=![]);}return this['config']['retry']&&(_0x36e818['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x36e818,_0x4ff947);}}function _0x37f7(_0x1276bd,_0x14e2ae){const _0x5c0b4e=_0x5c0b();return _0x37f7=function(_0x37f70e,_0x187895){_0x37f70e=_0x37f70e-0x167;let _0x241655=_0x5c0b4e[_0x37f70e];return _0x241655;},_0x37f7(_0x1276bd,_0x14e2ae);}function _0x5c0b(){const _0x240ffa=['8SKrwPc','5322519ToHVXD','2373528febzoa','522124ppaetc','7681010VGZScd','5334413cCdeqs','17178PkpqiD','78uHUiQv','6TuKFRY','1530684MSGUzM','22inJEdv','580nGzJbl','35fwcVgQ'];_0x5c0b=function(){return _0x240ffa;};return _0x5c0b();}exports['Await']=Await;
@@ -1 +1 @@
1
- 'use strict';(function(_0x2bace1,_0x2d3927){const _0x1e8768=_0x2991,_0x7e7630=_0x2bace1();while(!![]){try{const _0x3cc545=parseInt(_0x1e8768(0x98))/0x1*(-parseInt(_0x1e8768(0x96))/0x2)+parseInt(_0x1e8768(0x9b))/0x3+parseInt(_0x1e8768(0x99))/0x4+parseInt(_0x1e8768(0x97))/0x5+parseInt(_0x1e8768(0x94))/0x6*(-parseInt(_0x1e8768(0x93))/0x7)+parseInt(_0x1e8768(0x95))/0x8+parseInt(_0x1e8768(0x9a))/0x9*(parseInt(_0x1e8768(0x9c))/0xa);if(_0x3cc545===_0x2d3927)break;else _0x7e7630['push'](_0x7e7630['shift']());}catch(_0x584899){_0x7e7630['push'](_0x7e7630['shift']());}}}(_0x422e,0x8e14e));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 _0x2991(_0x1663de,_0x5216bb){const _0x422e0d=_0x422e();return _0x2991=function(_0x29917e,_0x51213d){_0x29917e=_0x29917e-0x93;let _0x4e3fb8=_0x422e0d[_0x29917e];return _0x4e3fb8;},_0x2991(_0x1663de,_0x5216bb);}function _0x422e(){const _0x45ce27=['20OVoGhO','7UVhgDn','3654402eClxML','1461664OXxsdY','8486sKcouC','4055340ZJkMFk','203qQTolt','541840gANygN','2709162kkxzkV','963270yxwfSm'];_0x422e=function(){return _0x45ce27;};return _0x422e();}class Cycle extends activity_1['Activity']{constructor(_0x122290,_0x4e508b,_0xc07049,_0x5ca9f8,_0x351133,_0x2f1277){super(_0x122290,_0x4e508b,_0xc07049,_0x5ca9f8,_0x351133,_0x2f1277);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x138655;try{await this['verifyEntry'](),_0x138655=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x138655['startActivitySpan'](this['leg']),this['mapInputData']();let _0x58638c=this['store']['transact']();await this['setState'](_0x58638c),await this['setStatus'](0x0,_0x58638c);const _0x4d77e7=await _0x58638c['exec']();_0x138655['mapActivityAttributes']();const _0x878f69=this['resolveStatus'](_0x4d77e7);_0x58638c=this['store']['transact']();const _0x555554=await this['cycleAncestorActivity'](_0x58638c);return _0x138655['setActivityAttributes']({'app.activity.mid':_0x555554,'app.job.jss':_0x878f69}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0x58638c),await _0x58638c['exec'](),this['context']['metadata']['aid'];}catch(_0x4964d5){if(_0x4964d5 instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x4964d5});return;}else{if(_0x4964d5 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x4964d5});return;}else{if(_0x4964d5 instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x4964d5});return;}else{if(_0x4964d5 instanceof errors_1['CollationError']){if(_0x4964d5['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',{..._0x4964d5});}else this['logger']['error']('cycle-process-error',{..._0x4964d5});}}}_0x138655?.['setActivityError'](_0x4964d5['message']);throw _0x4964d5;}finally{_0x138655?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0x510a34){this['mapInputData']();const _0x2b796e={'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,_0x2b796e,_0x510a34);}}exports['Cycle']=Cycle;
1
+ 'use strict';(function(_0x254af1,_0x4663b0){const _0x55fbea=_0x4393,_0x1c3044=_0x254af1();while(!![]){try{const _0x52c8d9=-parseInt(_0x55fbea(0xd7))/0x1+parseInt(_0x55fbea(0xd6))/0x2+parseInt(_0x55fbea(0xd8))/0x3+-parseInt(_0x55fbea(0xd4))/0x4*(-parseInt(_0x55fbea(0xd1))/0x5)+parseInt(_0x55fbea(0xd5))/0x6*(parseInt(_0x55fbea(0xd3))/0x7)+-parseInt(_0x55fbea(0xcf))/0x8+parseInt(_0x55fbea(0xd2))/0x9*(parseInt(_0x55fbea(0xd0))/0xa);if(_0x52c8d9===_0x4663b0)break;else _0x1c3044['push'](_0x1c3044['shift']());}catch(_0x35b29f){_0x1c3044['push'](_0x1c3044['shift']());}}}(_0x3f38,0x23212));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 _0x3f38(){const _0x56158d=['23034kHAITz','266112epzPrU','2030040cCuKCq','127070PiZhPy','79935ZcYTQk','9wSRsrn','1470805tTOyGS','8nTuoMY','6vZUXVM','154358mxocBh'];_0x3f38=function(){return _0x56158d;};return _0x3f38();}function _0x4393(_0x4ce7a8,_0x452114){const _0x3f387b=_0x3f38();return _0x4393=function(_0x4393d8,_0xd0f540){_0x4393d8=_0x4393d8-0xcf;let _0x1b0f9b=_0x3f387b[_0x4393d8];return _0x1b0f9b;},_0x4393(_0x4ce7a8,_0x452114);}class Cycle extends activity_1['Activity']{constructor(_0x4c3e9f,_0x50c0ab,_0x1a45f3,_0xba0ce3,_0x57e5d0,_0x4dee5d){super(_0x4c3e9f,_0x50c0ab,_0x1a45f3,_0xba0ce3,_0x57e5d0,_0x4dee5d);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x4c2504;try{await this['verifyEntry'](),_0x4c2504=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x4c2504['startActivitySpan'](this['leg']),this['mapInputData']();let _0x2833bf=this['store']['transact']();await this['setState'](_0x2833bf),await this['setStatus'](0x0,_0x2833bf);const _0xaec630=await _0x2833bf['exec']();_0x4c2504['mapActivityAttributes']();const _0x8de05b=this['resolveStatus'](_0xaec630);_0x2833bf=this['store']['transact']();const _0x2ad034=await this['cycleAncestorActivity'](_0x2833bf);return _0x4c2504['setActivityAttributes']({'app.activity.mid':_0x2ad034,'app.job.jss':_0x8de05b}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0x2833bf),await _0x2833bf['exec'](),this['context']['metadata']['aid'];}catch(_0x2064bd){if(_0x2064bd instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x2064bd});return;}else{if(_0x2064bd instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x2064bd});return;}else{if(_0x2064bd instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x2064bd});return;}else{if(_0x2064bd instanceof errors_1['CollationError']){if(_0x2064bd['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',{..._0x2064bd});}else this['logger']['error']('cycle-process-error',{..._0x2064bd});}}}_0x4c2504?.['setActivityError'](_0x2064bd['message']);throw _0x2064bd;}finally{_0x4c2504?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0x21e115){this['mapInputData']();const _0x116a9a={'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,_0x116a9a,_0x21e115);}}exports['Cycle']=Cycle;
@@ -1 +1 @@
1
- 'use strict';(function(_0x343948,_0x31fd5a){const _0x16360e=_0x50f1,_0x2d2547=_0x343948();while(!![]){try{const _0x562192=-parseInt(_0x16360e(0xbc))/0x1*(-parseInt(_0x16360e(0xbd))/0x2)+-parseInt(_0x16360e(0xc2))/0x3*(-parseInt(_0x16360e(0xba))/0x4)+-parseInt(_0x16360e(0xbe))/0x5*(-parseInt(_0x16360e(0xbb))/0x6)+-parseInt(_0x16360e(0xb9))/0x7+parseInt(_0x16360e(0xc1))/0x8+-parseInt(_0x16360e(0xc0))/0x9*(parseInt(_0x16360e(0xbf))/0xa)+-parseInt(_0x16360e(0xb8))/0xb;if(_0x562192===_0x31fd5a)break;else _0x2d2547['push'](_0x2d2547['shift']());}catch(_0x2e6ca4){_0x2d2547['push'](_0x2d2547['shift']());}}}(_0x1a10,0xdef8b));function _0x1a10(){const _0x1393a7=['765XUgBTF','145490jejuDl','747AczYbw','12560760FfohDO','281487KztUli','43999208eKCJsT','2640617tabOKK','68XzpFgS','61242zVaRbm','295193LbLMyF','12jzqKxO'];_0x1a10=function(){return _0x1393a7;};return _0x1a10();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Hook']=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),task_1=require('../task'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');class Hook extends activity_1['Activity']{constructor(_0x3c22f8,_0x445aed,_0x5ba8ad,_0xb897ee,_0xf695e3,_0x34f849){super(_0x3c22f8,_0x445aed,_0x5ba8ad,_0xb897ee,_0xf695e3,_0x34f849);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x403972;try{return await this['verifyEntry'](),_0x403972=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x403972['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x403972):await this['doPassThrough'](_0x403972),this['context']['metadata']['aid'];}catch(_0x1da692){if(_0x1da692 instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x1da692});return;}else{if(_0x1da692 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x1da692});return;}else{if(_0x1da692 instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x1da692});return;}else{if(_0x1da692 instanceof errors_1['CollationError']){if(_0x1da692['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',{..._0x1da692});}else this['logger']['error']('hook-process-error',{..._0x1da692});}}}_0x403972?.['setActivityError'](_0x1da692['message']);throw _0x1da692;}finally{_0x403972?.['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 _0x258ee0=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x258ee0)&&Number(_0x258ee0)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x2cd442){const _0x47cb48=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x47cb48),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x47cb48),await collator_1['CollatorService']['authorizeReentry'](this,_0x47cb48),await this['setStatus'](0x0,_0x47cb48),await _0x47cb48['exec'](),_0x2cd442['mapActivityAttributes']();}async['doPassThrough'](_0x2e109d){const _0x5281cc=this['store']['transact']();let _0x1c6f23;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x5281cc),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x5281cc),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x5281cc),_0x1c6f23=await _0x5281cc['exec'](),_0x2e109d['mapActivityAttributes']();const _0x22ae5f=this['resolveStatus'](_0x1c6f23),_0x522a92={'app.job.jss':_0x22ae5f},_0x256b10=await this['transition'](this['adjacencyList'],_0x22ae5f);_0x256b10['length']&&(_0x522a92['app.activity.mids']=_0x256b10['join'](',')),_0x2e109d['setActivityAttributes'](_0x522a92);}async['getHookRule'](_0x4d2ce4){const _0x2c29d8=await this['store']['getHookRules']();return _0x2c29d8?.[_0x4d2ce4]?.[0x0];}async['registerHook'](_0x304917){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x304917);else{if(this['config']['sleep']){const _0x43c2cf=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',_0x43c2cf,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x262a48=stream_1['StreamStatus']['SUCCESS'],_0x2c1adf=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x262a48,'code':_0x2c1adf});const _0x4f53c2=new task_1['TaskService'](this['store'],this['logger']),_0x47d0b5={...this['data']},_0xc2dfbd=await _0x4f53c2['processWebHookSignal'](this['config']['hook']['topic'],_0x47d0b5);if(_0xc2dfbd){const [_0x2026a6,_0x144df0,_0x4a464c,_0x127c12]=_0xc2dfbd;this['context']['metadata']['jid']=_0x2026a6,this['context']['metadata']['gid']=_0x127c12,this['context']['metadata']['dad']=_0x4a464c,await this['processEvent'](_0x262a48,_0x2c1adf,'hook'),_0x2c1adf===0xc8&&await _0x4f53c2['deleteWebHookSignal'](this['config']['hook']['topic'],_0x47d0b5);}}async['processTimeHookEvent'](_0x4783ce){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x4783ce,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}function _0x50f1(_0x3d5bd4,_0x1c98b8){const _0x1a108f=_0x1a10();return _0x50f1=function(_0x50f1db,_0x495b4b){_0x50f1db=_0x50f1db-0xb8;let _0xb9a70e=_0x1a108f[_0x50f1db];return _0xb9a70e;},_0x50f1(_0x3d5bd4,_0x1c98b8);}exports['Hook']=Hook;
1
+ 'use strict';(function(_0xa4f8cf,_0xb2c139){const _0x433314=_0x3ae1,_0x2325e8=_0xa4f8cf();while(!![]){try{const _0x45f652=parseInt(_0x433314(0x1e1))/0x1+parseInt(_0x433314(0x1e0))/0x2*(parseInt(_0x433314(0x1dc))/0x3)+-parseInt(_0x433314(0x1e2))/0x4*(-parseInt(_0x433314(0x1df))/0x5)+-parseInt(_0x433314(0x1de))/0x6+parseInt(_0x433314(0x1dd))/0x7+parseInt(_0x433314(0x1e3))/0x8+-parseInt(_0x433314(0x1e4))/0x9;if(_0x45f652===_0xb2c139)break;else _0x2325e8['push'](_0x2325e8['shift']());}catch(_0x223813){_0x2325e8['push'](_0x2325e8['shift']());}}}(_0x2613,0x8b41e));function _0x3ae1(_0x383a92,_0x211b05){const _0x26135b=_0x2613();return _0x3ae1=function(_0x3ae16a,_0x3efed3){_0x3ae16a=_0x3ae16a-0x1dc;let _0x16a48b=_0x26135b[_0x3ae16a];return _0x16a48b;},_0x3ae1(_0x383a92,_0x211b05);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Hook']=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),task_1=require('../task'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');class Hook extends activity_1['Activity']{constructor(_0x2e9e49,_0xd7fe31,_0x7af7b6,_0x5eb0d8,_0x1aa34a,_0x5ef571){super(_0x2e9e49,_0xd7fe31,_0x7af7b6,_0x5eb0d8,_0x1aa34a,_0x5ef571);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x502fc3;try{return await this['verifyEntry'](),_0x502fc3=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x502fc3['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x502fc3):await this['doPassThrough'](_0x502fc3),this['context']['metadata']['aid'];}catch(_0x491aa4){if(_0x491aa4 instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x491aa4});return;}else{if(_0x491aa4 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x491aa4});return;}else{if(_0x491aa4 instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x491aa4});return;}else{if(_0x491aa4 instanceof errors_1['CollationError']){if(_0x491aa4['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',{..._0x491aa4});}else this['logger']['error']('hook-process-error',{..._0x491aa4});}}}_0x502fc3?.['setActivityError'](_0x491aa4['message']);throw _0x491aa4;}finally{_0x502fc3?.['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 _0x16de4a=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x16de4a)&&Number(_0x16de4a)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x27ba6a){const _0x332768=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x332768),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x332768),await collator_1['CollatorService']['authorizeReentry'](this,_0x332768),await this['setStatus'](0x0,_0x332768),await _0x332768['exec'](),_0x27ba6a['mapActivityAttributes']();}async['doPassThrough'](_0x141281){const _0x3ca3ec=this['store']['transact']();let _0x2090b6;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x3ca3ec),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x3ca3ec),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x3ca3ec),_0x2090b6=await _0x3ca3ec['exec'](),_0x141281['mapActivityAttributes']();const _0x555a2d=this['resolveStatus'](_0x2090b6),_0xab808c={'app.job.jss':_0x555a2d},_0x389ac4=await this['transition'](this['adjacencyList'],_0x555a2d);_0x389ac4['length']&&(_0xab808c['app.activity.mids']=_0x389ac4['join'](',')),_0x141281['setActivityAttributes'](_0xab808c);}async['getHookRule'](_0x4066bb){const _0x18f92f=await this['store']['getHookRules']();return _0x18f92f?.[_0x4066bb]?.[0x0];}async['registerHook'](_0x4f699a){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x4f699a);else{if(this['config']['sleep']){const _0xae92bc=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',_0xae92bc,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x2ca801=stream_1['StreamStatus']['SUCCESS'],_0x8f22fb=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x2ca801,'code':_0x8f22fb});const _0x43020b=new task_1['TaskService'](this['store'],this['logger']),_0x24fa4d={...this['data']},_0x3c9cef=await _0x43020b['processWebHookSignal'](this['config']['hook']['topic'],_0x24fa4d);if(_0x3c9cef){const [_0x1ce293,_0x4fbefc,_0x4514c7,_0x49892c]=_0x3c9cef;this['context']['metadata']['jid']=_0x1ce293,this['context']['metadata']['gid']=_0x49892c,this['context']['metadata']['dad']=_0x4514c7,await this['processEvent'](_0x2ca801,_0x8f22fb,'hook'),_0x8f22fb===0xc8&&await _0x43020b['deleteWebHookSignal'](this['config']['hook']['topic'],_0x24fa4d);}}async['processTimeHookEvent'](_0x21edc6){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x21edc6,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}exports['Hook']=Hook;function _0x2613(){const _0x48e293=['3145dEqlMd','114754jktZWk','566722ajdMDE','596oyHEDI','2471800crDEzc','5791977kxZYRZ','15zKUsnl','5186503PmeIen','4699686CqMPsL'];_0x2613=function(){return _0x48e293;};return _0x2613();}
@@ -1 +1 @@
1
- 'use strict';(function(_0x4594cb,_0x385284){const _0x53703b=_0x47aa,_0x12dfd9=_0x4594cb();while(!![]){try{const _0x3e9cd7=-parseInt(_0x53703b(0x136))/0x1+-parseInt(_0x53703b(0x130))/0x2+parseInt(_0x53703b(0x133))/0x3+parseInt(_0x53703b(0x132))/0x4*(parseInt(_0x53703b(0x131))/0x5)+-parseInt(_0x53703b(0x12f))/0x6*(parseInt(_0x53703b(0x135))/0x7)+-parseInt(_0x53703b(0x12d))/0x8+-parseInt(_0x53703b(0x134))/0x9*(-parseInt(_0x53703b(0x12e))/0xa);if(_0x3e9cd7===_0x385284)break;else _0x12dfd9['push'](_0x12dfd9['shift']());}catch(_0x3b7e7f){_0x12dfd9['push'](_0x12dfd9['shift']());}}}(_0x37c9,0x8a46e));function _0x47aa(_0x44b3c4,_0x3962b0){const _0x37c9be=_0x37c9();return _0x47aa=function(_0x47aa7e,_0x2ed7ab){_0x47aa7e=_0x47aa7e-0x12d;let _0x3fe202=_0x37c9be[_0x47aa7e];return _0x3fe202;},_0x47aa(_0x44b3c4,_0x3962b0);}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');function _0x37c9(){const _0x3c7dd7=['2476878rErJJq','873JpETVP','498246rIPzmB','1041906EfZrVw','2907520ATVnUc','89330Xuucpc','6mAxVtF','460022gWObtX','290395ixzBtq','40RZURDb'];_0x37c9=function(){return _0x3c7dd7;};return _0x37c9();}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
+ 'use strict';(function(_0x45a7e1,_0x21976f){const _0x158a3a=_0x526b,_0x5bb6b1=_0x45a7e1();while(!![]){try{const _0x56e3b4=-parseInt(_0x158a3a(0x71))/0x1+parseInt(_0x158a3a(0x73))/0x2+-parseInt(_0x158a3a(0x70))/0x3*(parseInt(_0x158a3a(0x6f))/0x4)+-parseInt(_0x158a3a(0x6d))/0x5+parseInt(_0x158a3a(0x75))/0x6+-parseInt(_0x158a3a(0x74))/0x7*(-parseInt(_0x158a3a(0x6c))/0x8)+-parseInt(_0x158a3a(0x72))/0x9*(-parseInt(_0x158a3a(0x6e))/0xa);if(_0x56e3b4===_0x21976f)break;else _0x5bb6b1['push'](_0x5bb6b1['shift']());}catch(_0x56a34b){_0x5bb6b1['push'](_0x5bb6b1['shift']());}}}(_0x1a3d,0x2b074));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');function _0x526b(_0x39944a,_0x197159){const _0x1a3d48=_0x1a3d();return _0x526b=function(_0x526b60,_0x3e3ebf){_0x526b60=_0x526b60-0x6c;let _0x216a4e=_0x1a3d48[_0x526b60];return _0x216a4e;},_0x526b(_0x39944a,_0x197159);}function _0x1a3d(){const _0x563e10=['4705630MxLAbK','15748PdCfHr','156fByvoF','116533xjUJGK','9CXhqHJ','305992MOlHes','318339KiRKnE','508698gpbkOB','16VXjejT','1508975SqgrqT'];_0x1a3d=function(){return _0x563e10;};return _0x1a3d();}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(_0x29271a,_0x8cd7b7){const _0x4083d5=_0x58ba,_0x2b4d25=_0x29271a();while(!![]){try{const _0x15a034=parseInt(_0x4083d5(0x130))/0x1+parseInt(_0x4083d5(0x132))/0x2+-parseInt(_0x4083d5(0x131))/0x3*(parseInt(_0x4083d5(0x12e))/0x4)+parseInt(_0x4083d5(0x12f))/0x5+-parseInt(_0x4083d5(0x12d))/0x6*(-parseInt(_0x4083d5(0x133))/0x7)+parseInt(_0x4083d5(0x12a))/0x8*(parseInt(_0x4083d5(0x12b))/0x9)+-parseInt(_0x4083d5(0x12c))/0xa;if(_0x15a034===_0x8cd7b7)break;else _0x2b4d25['push'](_0x2b4d25['shift']());}catch(_0x50a843){_0x2b4d25['push'](_0x2b4d25['shift']());}}}(_0x2195,0x70444));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 _0x58ba(_0x379968,_0xb9f067){const _0x21954c=_0x2195();return _0x58ba=function(_0x58ba34,_0x5a6b0f){_0x58ba34=_0x58ba34-0x12a;let _0x34cd71=_0x21954c[_0x58ba34];return _0x34cd71;},_0x58ba(_0x379968,_0xb9f067);}class Interrupt extends activity_1['Activity']{constructor(_0x16f1b6,_0x5cc4c1,_0x54dded,_0x59f0d5,_0x549dbd,_0x49f03d){super(_0x16f1b6,_0x5cc4c1,_0x54dded,_0x59f0d5,_0x549dbd,_0x49f03d);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x2d5fd4;try{await this['verifyEntry'](),_0x2d5fd4=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x2d5fd4['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x2d5fd4):await this['interruptAnother'](_0x2d5fd4);}catch(_0x435bfa){if(_0x435bfa instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x435bfa});return;}else{if(_0x435bfa instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x435bfa});return;}else{if(_0x435bfa instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x435bfa});return;}else{if(_0x435bfa instanceof errors_1['CollationError']){if(_0x435bfa['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',{..._0x435bfa});}else this['logger']['error']('interrupt-process-error',{..._0x435bfa});}}}_0x2d5fd4?.['setActivityError'](_0x435bfa['message']);throw _0x435bfa;}finally{_0x2d5fd4?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x242759){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x1630c7=await this['interrupt']();_0x242759['mapActivityAttributes']();const _0x26ff1d=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x26ff1d),await this['setStatus'](-0x1,_0x26ff1d);const _0x5eef83=await _0x26ff1d['exec'](),_0x58a810=this['resolveStatus'](_0x5eef83);return _0x242759['setActivityAttributes']({'app.activity.mid':_0x1630c7,'app.job.jss':_0x58a810}),this['context']['metadata']['aid'];}async['interruptAnother'](_0xe7f73c){const _0xe60e46=await this['interrupt'](),_0x32853b={'app.activity.mid':_0xe60e46};_0xe7f73c['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x32a868=this['store']['transact']();await this['setState'](_0x32a868);}const _0x5d1a88=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x5d1a88),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x5d1a88);const _0x2c84ef=await _0x5d1a88['exec'](),_0x373f06=this['resolveStatus'](_0x2c84ef);_0x32853b['app.job.jss']=_0x373f06;const _0x2ff67b=await this['transition'](this['adjacencyList'],_0x373f06);return _0x2ff67b['length']&&(_0x32853b['app.activity.mids']=_0x2ff67b['join'](',')),_0xe7f73c['setActivityAttributes'](_0x32853b),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0xbf4a40=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0xbf4a40==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 _0x5b6ca6=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'],_0x5b6ca6);}}exports['Interrupt']=Interrupt;function _0x2195(){const _0x47f65a=['8526490VOyHFd','531768NDtCOu','4AjWamR','3827325XRvKPL','118569XHMgst','2087724USCirs','458872TiqPpD','21cigorM','344VJceOD','131661cplHss'];_0x2195=function(){return _0x47f65a;};return _0x2195();}
1
+ 'use strict';(function(_0x43efd4,_0x2d60ec){const _0x5c0bf1=_0x22e2,_0x46cfc0=_0x43efd4();while(!![]){try{const _0x479462=-parseInt(_0x5c0bf1(0x1f2))/0x1*(-parseInt(_0x5c0bf1(0x1f5))/0x2)+-parseInt(_0x5c0bf1(0x1f4))/0x3+-parseInt(_0x5c0bf1(0x1f1))/0x4*(-parseInt(_0x5c0bf1(0x1f6))/0x5)+-parseInt(_0x5c0bf1(0x1f3))/0x6+parseInt(_0x5c0bf1(0x1f9))/0x7+parseInt(_0x5c0bf1(0x1f0))/0x8*(parseInt(_0x5c0bf1(0x1f7))/0x9)+-parseInt(_0x5c0bf1(0x1f8))/0xa;if(_0x479462===_0x2d60ec)break;else _0x46cfc0['push'](_0x46cfc0['shift']());}catch(_0x18fb7d){_0x46cfc0['push'](_0x46cfc0['shift']());}}}(_0x664a,0x87b37));function _0x664a(){const _0x45e568=['500JraupG','2cSdSdD','1986084QAElvx','170928EWskEK','929554CkicuJ','24095ZvEezJ','9qUSIqk','18182730aqanWs','5834164jmZUOs','3173704UBMWxX'];_0x664a=function(){return _0x45e568;};return _0x664a();}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 _0x22e2(_0x3a04d8,_0x2847ea){const _0x664ae8=_0x664a();return _0x22e2=function(_0x22e2ad,_0x3e8c24){_0x22e2ad=_0x22e2ad-0x1f0;let _0x377733=_0x664ae8[_0x22e2ad];return _0x377733;},_0x22e2(_0x3a04d8,_0x2847ea);}class Interrupt extends activity_1['Activity']{constructor(_0x54e41f,_0x459304,_0x2cb349,_0x122602,_0x2f7c64,_0x58fa3e){super(_0x54e41f,_0x459304,_0x2cb349,_0x122602,_0x2f7c64,_0x58fa3e);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x5f05c7;try{await this['verifyEntry'](),_0x5f05c7=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5f05c7['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x5f05c7):await this['interruptAnother'](_0x5f05c7);}catch(_0x439e0d){if(_0x439e0d instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x439e0d});return;}else{if(_0x439e0d instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x439e0d});return;}else{if(_0x439e0d instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x439e0d});return;}else{if(_0x439e0d instanceof errors_1['CollationError']){if(_0x439e0d['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',{..._0x439e0d});}else this['logger']['error']('interrupt-process-error',{..._0x439e0d});}}}_0x5f05c7?.['setActivityError'](_0x439e0d['message']);throw _0x439e0d;}finally{_0x5f05c7?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x2fd29b){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x4d0379=await this['interrupt']();_0x2fd29b['mapActivityAttributes']();const _0x252d5e=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x252d5e),await this['setStatus'](-0x1,_0x252d5e);const _0xdad8e0=await _0x252d5e['exec'](),_0x134dfd=this['resolveStatus'](_0xdad8e0);return _0x2fd29b['setActivityAttributes']({'app.activity.mid':_0x4d0379,'app.job.jss':_0x134dfd}),this['context']['metadata']['aid'];}async['interruptAnother'](_0x36d9a2){const _0x4b8f98=await this['interrupt'](),_0x563090={'app.activity.mid':_0x4b8f98};_0x36d9a2['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x20b50f=this['store']['transact']();await this['setState'](_0x20b50f);}const _0x17f23d=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x17f23d),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x17f23d);const _0x1c823f=await _0x17f23d['exec'](),_0x12dcc0=this['resolveStatus'](_0x1c823f);_0x563090['app.job.jss']=_0x12dcc0;const _0x1e1edc=await this['transition'](this['adjacencyList'],_0x12dcc0);return _0x1e1edc['length']&&(_0x563090['app.activity.mids']=_0x1e1edc['join'](',')),_0x36d9a2['setActivityAttributes'](_0x563090),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x1f8186=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x1f8186==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 _0x4fb216=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'],_0x4fb216);}}exports['Interrupt']=Interrupt;
@@ -1 +1 @@
1
- 'use strict';(function(_0x4409c7,_0x5b5384){const _0x42fe0c=_0x1455,_0x1c0fa8=_0x4409c7();while(!![]){try{const _0x459b5d=-parseInt(_0x42fe0c(0x14e))/0x1*(-parseInt(_0x42fe0c(0x153))/0x2)+parseInt(_0x42fe0c(0x152))/0x3+parseInt(_0x42fe0c(0x159))/0x4*(parseInt(_0x42fe0c(0x157))/0x5)+-parseInt(_0x42fe0c(0x15a))/0x6*(parseInt(_0x42fe0c(0x150))/0x7)+parseInt(_0x42fe0c(0x14f))/0x8*(parseInt(_0x42fe0c(0x151))/0x9)+parseInt(_0x42fe0c(0x158))/0xa*(parseInt(_0x42fe0c(0x156))/0xb)+parseInt(_0x42fe0c(0x154))/0xc*(-parseInt(_0x42fe0c(0x155))/0xd);if(_0x459b5d===_0x5b5384)break;else _0x1c0fa8['push'](_0x1c0fa8['shift']());}catch(_0x1c79cc){_0x1c0fa8['push'](_0x1c0fa8['shift']());}}}(_0x2026,0xd8202));function _0x1455(_0x15b5a1,_0x29ff3e){const _0x202684=_0x2026();return _0x1455=function(_0x14558e,_0x2b1aa0){_0x14558e=_0x14558e-0x14e;let _0x39906a=_0x202684[_0x14558e];return _0x39906a;},_0x1455(_0x15b5a1,_0x29ff3e);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Signal']=void 0x0;function _0x2026(){const _0x561280=['2708976MGgglN','38VsWCKD','764916WUPjJW','156WGOgFg','11jSCZRq','95EWjSkb','8767110tmmelc','35244fyuGwR','30YaroHv','64553facGFA','232fvUymB','2144121aZxRfU','2502McNTJC'];_0x2026=function(){return _0x561280;};return _0x2026();}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(_0x4e170c,_0xfe1a94,_0x29a981,_0x5aa8bb,_0x350745,_0x1ae2fc){super(_0x4e170c,_0xfe1a94,_0x29a981,_0x5aa8bb,_0x350745,_0x1ae2fc);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x2de9b8;try{await this['verifyEntry'](),_0x2de9b8=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x2de9b8['startActivitySpan'](this['leg']);const _0x363f34=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x363f34),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x363f34),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x363f34);const _0x3b5ce2=await _0x363f34['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x1f5cdd=this['resolveStatus'](_0x3b5ce2),_0x16b050={'app.job.jss':_0x1f5cdd},_0x2495cb=await this['transition'](this['adjacencyList'],_0x1f5cdd);return _0x2495cb['length']&&(_0x16b050['app.activity.mids']=_0x2495cb['join'](',')),_0x2de9b8['mapActivityAttributes'](),_0x2de9b8['setActivityAttributes'](_0x16b050),this['context']['metadata']['aid'];}catch(_0x598396){if(_0x598396 instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x598396});return;}else{if(_0x598396 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x598396});return;}else{if(_0x598396 instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x598396});return;}else{if(_0x598396 instanceof errors_1['CollationError']){if(_0x598396['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',{..._0x598396});}else this['logger']['error']('signal-process-error',{..._0x598396});}}}_0x2de9b8?.['setActivityError'](_0x598396['message']);throw _0x598396;}finally{_0x2de9b8?.['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 _0x326b40=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x326b40['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x3f71f3=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x3f71f3['mapRules']();}}async['hookOne'](){const _0x412e14=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x65c7fe=this['mapSignalData'](),_0x1679f1=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x2bc837=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x412e14,_0x65c7fe,_0x1679f1,_0x2bc837);}async['hookAll'](){const _0x56e914=this['mapSignalData'](),_0xed491c=this['mapResolverData']();this['config']['scrub']&&(_0xed491c['scrub']=!![]);const _0x5807f2=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x1ef590=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x350705=[_0x5807f2+':'+_0x1ef590];return await this['engine']['hookAll'](this['config']['topic'],_0x56e914,_0xed491c,_0x350705);}}exports['Signal']=Signal;
1
+ 'use strict';(function(_0x5af672,_0x38394b){const _0x10d23c=_0xadb3,_0x2026d4=_0x5af672();while(!![]){try{const _0x2053c7=-parseInt(_0x10d23c(0x185))/0x1+-parseInt(_0x10d23c(0x184))/0x2+parseInt(_0x10d23c(0x186))/0x3+parseInt(_0x10d23c(0x182))/0x4+parseInt(_0x10d23c(0x183))/0x5+-parseInt(_0x10d23c(0x187))/0x6*(-parseInt(_0x10d23c(0x181))/0x7)+parseInt(_0x10d23c(0x188))/0x8;if(_0x2053c7===_0x38394b)break;else _0x2026d4['push'](_0x2026d4['shift']());}catch(_0x16a7e8){_0x2026d4['push'](_0x2026d4['shift']());}}}(_0x49d4,0xbe1a7));function _0x49d4(){const _0x249537=['1465857iyKdKA','2014485PEjXhz','6HaevCU','1388928PQEsYa','3198881PLdDek','5046448UirQJc','3555135LlPzPN','2060426IGcwzs'];_0x49d4=function(){return _0x249537;};return _0x49d4();}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(_0x514b0f,_0x2a57ce,_0x1b637a,_0x2e0063,_0x4bf2cf,_0x4363f8){super(_0x514b0f,_0x2a57ce,_0x1b637a,_0x2e0063,_0x4bf2cf,_0x4363f8);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x1ee04b;try{await this['verifyEntry'](),_0x1ee04b=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x1ee04b['startActivitySpan'](this['leg']);const _0x14410e=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x14410e),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x14410e),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x14410e);const _0x384ca9=await _0x14410e['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x93ba68=this['resolveStatus'](_0x384ca9),_0x4c0255={'app.job.jss':_0x93ba68},_0x4b6d85=await this['transition'](this['adjacencyList'],_0x93ba68);return _0x4b6d85['length']&&(_0x4c0255['app.activity.mids']=_0x4b6d85['join'](',')),_0x1ee04b['mapActivityAttributes'](),_0x1ee04b['setActivityAttributes'](_0x4c0255),this['context']['metadata']['aid'];}catch(_0x1684e3){if(_0x1684e3 instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x1684e3});return;}else{if(_0x1684e3 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x1684e3});return;}else{if(_0x1684e3 instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x1684e3});return;}else{if(_0x1684e3 instanceof errors_1['CollationError']){if(_0x1684e3['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',{..._0x1684e3});}else this['logger']['error']('signal-process-error',{..._0x1684e3});}}}_0x1ee04b?.['setActivityError'](_0x1684e3['message']);throw _0x1684e3;}finally{_0x1ee04b?.['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 _0x24e8d0=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x24e8d0['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x5c5f8e=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x5c5f8e['mapRules']();}}async['hookOne'](){const _0x58b2aa=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x2fc55d=this['mapSignalData'](),_0x4e4091=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x22a7d1=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x58b2aa,_0x2fc55d,_0x4e4091,_0x22a7d1);}async['hookAll'](){const _0x528091=this['mapSignalData'](),_0x519dd1=this['mapResolverData']();this['config']['scrub']&&(_0x519dd1['scrub']=!![]);const _0x373eff=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x211840=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x4760b5=[_0x373eff+':'+_0x211840];return await this['engine']['hookAll'](this['config']['topic'],_0x528091,_0x519dd1,_0x4760b5);}}function _0xadb3(_0x13ad40,_0x224e87){const _0x49d408=_0x49d4();return _0xadb3=function(_0xadb33c,_0x4d82dd){_0xadb33c=_0xadb33c-0x181;let _0x2f1883=_0x49d408[_0xadb33c];return _0x2f1883;},_0xadb3(_0x13ad40,_0x224e87);}exports['Signal']=Signal;
@@ -1 +1 @@
1
- 'use strict';function _0x1ac7(_0x359054,_0x1f931b){const _0x4efc2e=_0x4efc();return _0x1ac7=function(_0x1ac715,_0x48925d){_0x1ac715=_0x1ac715-0x1be;let _0x47a5a4=_0x4efc2e[_0x1ac715];return _0x47a5a4;},_0x1ac7(_0x359054,_0x1f931b);}(function(_0x451d73,_0xcd08a){const _0x1878d6=_0x1ac7,_0xc9b7f3=_0x451d73();while(!![]){try{const _0x205f00=-parseInt(_0x1878d6(0x1c2))/0x1+parseInt(_0x1878d6(0x1c4))/0x2+parseInt(_0x1878d6(0x1c0))/0x3*(-parseInt(_0x1878d6(0x1bf))/0x4)+-parseInt(_0x1878d6(0x1c5))/0x5+parseInt(_0x1878d6(0x1c1))/0x6*(parseInt(_0x1878d6(0x1c6))/0x7)+parseInt(_0x1878d6(0x1be))/0x8+-parseInt(_0x1878d6(0x1c3))/0x9;if(_0x205f00===_0xcd08a)break;else _0xc9b7f3['push'](_0xc9b7f3['shift']());}catch(_0x23f8fe){_0xc9b7f3['push'](_0xc9b7f3['shift']());}}}(_0x4efc,0x8aa50));function _0x4efc(){const _0x1cb5e6=['1254876lONqcB','9qIjYhY','36WFziMI','584262omtriD','1517535XLMOVx','1548772FLXAYf','2052835QVYPGV','1219771LqJvUA','6820680tMAMhI'];_0x4efc=function(){return _0x1cb5e6;};return _0x4efc();}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(_0x35168d,_0x519776,_0x281255,_0x505280,_0x1e9a0e,_0x26923e){super(_0x35168d,_0x519776,_0x281255,_0x505280,_0x1e9a0e,_0x26923e);}async['process'](_0xfa27b6){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x1e7261;try{this['setLeg'](0x2),await this['getState'](),_0x1e7261=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x1e7261['startJobSpan'](),_0x1e7261['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x29ff7c=this['initStatus'](_0xfa27b6,this['adjacencyList']['length']);await this['setStateNX'](_0x29ff7c),await this['setStatus'](_0x29ff7c),this['bindSearchData'](_0xfa27b6),this['bindMarkerData'](_0xfa27b6);const _0x6c33ab=this['store']['transact']();await this['setState'](_0x6c33ab),await this['setStats'](_0x6c33ab);_0xfa27b6?.['pending']&&await this['setExpired'](_0xfa27b6?.['pending'],_0x6c33ab);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x6c33ab),await _0x6c33ab['exec'](),this['execAdjacentParent'](),_0x1e7261['mapActivityAttributes']();const _0x49d612=Number(this['context']['metadata']['js']);_0x1e7261['setJobAttributes']({'app.job.jss':_0x49d612});const _0x3e0749={'app.job.jss':_0x49d612};return await this['transitionAndLogAdjacent'](_0xfa27b6,_0x49d612,_0x3e0749),_0x1e7261['setActivityAttributes'](_0x3e0749),this['context']['metadata']['jid'];}catch(_0x22b7df){_0x1e7261?.['setActivityError'](_0x22b7df['message']);if(_0x22b7df instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x43c468=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x43c468){this['logger']['info']('trigger-collation-overage',{'job_id':_0x22b7df['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0x22b7df['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0x22b7df});throw _0x22b7df;}finally{_0x1e7261?.['endJobSpan'](),_0x1e7261?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x53bac3={},_0x4b14a2,_0x11fea8){if(isNaN(_0x53bac3['pending'])){const _0x21e08=await this['transition'](this['adjacencyList'],_0x4b14a2);_0x21e08['length']&&(_0x11fea8['app.activity.mids']=_0x21e08['join'](','));}}['initStatus'](_0x4251bf={},_0x2b1c75){if(_0x4251bf['pending'])return-0x1;return _0x2b1c75;}async['setExpired'](_0x1eb0cc,_0x1b8759){await this['store']['expireJob'](this['context']['metadata']['jid'],_0x1eb0cc,_0x1b8759);}['safeKey'](_0xc2fb78){return'_'+_0xc2fb78;}['bindSearchData'](_0x151d65){_0x151d65?.['search']&&Object['keys'](_0x151d65['search'])['forEach'](_0x55c957=>{this['context']['data'][this['safeKey'](_0x55c957)]=_0x151d65['search'][_0x55c957]['toString']();});}['bindMarkerData'](_0x4fe04f){_0x4fe04f?.['marker']&&Object['keys'](_0x4fe04f['marker'])['forEach'](_0x8cf4d1=>{_0x8cf4d1['startsWith']('-')&&(this['context']['data'][_0x8cf4d1]=_0x4fe04f['marker'][_0x8cf4d1]['toString']());});}async['setStatus'](_0x33a44c){this['context']['metadata']['js']=_0x33a44c;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x269a7b=(0x0,utils_1['formatISODate'])(new Date()),_0x4b2d5a={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x269a7b,'ju':_0x269a7b}};await this['engine']['execAdjacentParent'](this['context'],_0x4b2d5a);}}['createInputContext'](){const _0x1ea823={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x1ea823;}async['getState'](){const _0x52f23c=this['createInputContext'](),_0x264931=this['resolveJobId'](_0x52f23c),_0x1dcce9=this['resolveJobKey'](_0x52f23c),_0x21b1ef=(0x0,utils_1['formatISODate'])(new Date()),{id:_0x45fec4,version:_0x110681}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0x3cce32={...this['metadata'],'jid':_0x264931,'key':_0x1dcce9,'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':_0x45fec4,'vrs':_0x110681,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0x264931,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x1dcce9,'jc':_0x21b1ef,'ju':_0x21b1ef,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0x3cce32},'output':{'data':this['data'],'metadata':_0x3cce32},'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'](_0x4d081d=>'metadata/'+_0x4d081d);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0xe78d60=>'output/metadata/'+_0xe78d60);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x4c4112){const _0x571edb=this['config']['stats']?.['id'];return _0x571edb?pipe_1['Pipe']['resolve'](_0x571edb,_0x4c4112):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x22f113){const _0x14a11d=this['config']['stats']?.['key'];return _0x14a11d?pipe_1['Pipe']['resolve'](_0x14a11d,_0x22f113):'';}async['setStateNX'](_0x3d637e){const _0x19c008=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x19c008,this['engine']['appId'],_0x3d637e))throw new errors_1['DuplicateJobError'](_0x19c008);}async['setStats'](_0x2fced1){const _0x23f8a3=this['context']['metadata'];if(_0x23f8a3['key']&&this['config']['stats']?.['measures']){const _0x12d177=await this['engine']['getVID'](),_0x43c72d=new reporter_1['ReporterService'](_0x12d177,this['store'],this['logger']);await this['store']['setStats'](_0x23f8a3['key'],_0x23f8a3['jid'],_0x23f8a3['ts'],_0x43c72d['resolveTriggerStatistics'](this['config'],this['context']),_0x12d177,_0x2fced1);}}}exports['Trigger']=Trigger;
1
+ 'use strict';function _0x1c39(_0x2dde54,_0x44af8c){const _0x39c71f=_0x39c7();return _0x1c39=function(_0x1c3908,_0x28ac24){_0x1c3908=_0x1c3908-0x14e;let _0x154643=_0x39c71f[_0x1c3908];return _0x154643;},_0x1c39(_0x2dde54,_0x44af8c);}(function(_0x1dd5ac,_0xe1bfd9){const _0x5df4df=_0x1c39,_0x5c2a8c=_0x1dd5ac();while(!![]){try{const _0x4e113a=parseInt(_0x5df4df(0x150))/0x1+-parseInt(_0x5df4df(0x14f))/0x2*(parseInt(_0x5df4df(0x151))/0x3)+parseInt(_0x5df4df(0x154))/0x4+parseInt(_0x5df4df(0x155))/0x5*(parseInt(_0x5df4df(0x153))/0x6)+-parseInt(_0x5df4df(0x156))/0x7*(parseInt(_0x5df4df(0x157))/0x8)+-parseInt(_0x5df4df(0x14e))/0x9+parseInt(_0x5df4df(0x152))/0xa;if(_0x4e113a===_0xe1bfd9)break;else _0x5c2a8c['push'](_0x5c2a8c['shift']());}catch(_0x53aa08){_0x5c2a8c['push'](_0x5c2a8c['shift']());}}}(_0x39c7,0xc1167));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Trigger']=void 0x0;function _0x39c7(){const _0x36527d=['37878pqYFYh','545124VHvXhz','1225aRIVHD','148547pXMYgo','448ouqqHc','3550815bdQYZc','70892XhEOzt','54946JgaIKr','78xLbxgw','15574820uvwlAm'];_0x39c7=function(){return _0x36527d;};return _0x39c7();}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(_0x9c9e40,_0x1146e7,_0x2927c1,_0x274920,_0x5dc81e,_0x3342e7){super(_0x9c9e40,_0x1146e7,_0x2927c1,_0x274920,_0x5dc81e,_0x3342e7);}async['process'](_0x16204e){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x3d38d2;try{this['setLeg'](0x2),await this['getState'](),_0x3d38d2=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x3d38d2['startJobSpan'](),_0x3d38d2['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x429ed2=this['initStatus'](_0x16204e,this['adjacencyList']['length']);await this['setStateNX'](_0x429ed2),await this['setStatus'](_0x429ed2),this['bindSearchData'](_0x16204e),this['bindMarkerData'](_0x16204e);const _0x395fc5=this['store']['transact']();await this['setState'](_0x395fc5),await this['setStats'](_0x395fc5);_0x16204e?.['pending']&&await this['setExpired'](_0x16204e?.['pending'],_0x395fc5);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x395fc5),await _0x395fc5['exec'](),this['execAdjacentParent'](),_0x3d38d2['mapActivityAttributes']();const _0x39e042=Number(this['context']['metadata']['js']);_0x3d38d2['setJobAttributes']({'app.job.jss':_0x39e042});const _0x2b780b={'app.job.jss':_0x39e042};return await this['transitionAndLogAdjacent'](_0x16204e,_0x39e042,_0x2b780b),_0x3d38d2['setActivityAttributes'](_0x2b780b),this['context']['metadata']['jid'];}catch(_0x3bd9cb){_0x3d38d2?.['setActivityError'](_0x3bd9cb['message']);if(_0x3bd9cb instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x5ee2c6=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x5ee2c6){this['logger']['info']('trigger-collation-overage',{'job_id':_0x3bd9cb['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0x3bd9cb['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0x3bd9cb});throw _0x3bd9cb;}finally{_0x3d38d2?.['endJobSpan'](),_0x3d38d2?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x48516e={},_0x4feeaf,_0x305e1d){if(isNaN(_0x48516e['pending'])){const _0x569269=await this['transition'](this['adjacencyList'],_0x4feeaf);_0x569269['length']&&(_0x305e1d['app.activity.mids']=_0x569269['join'](','));}}['initStatus'](_0x3a867f={},_0x3a0a5c){if(_0x3a867f['pending'])return-0x1;return _0x3a0a5c;}async['setExpired'](_0x1f3a46,_0x5803d1){await this['store']['expireJob'](this['context']['metadata']['jid'],_0x1f3a46,_0x5803d1);}['safeKey'](_0x1cd4bf){return'_'+_0x1cd4bf;}['bindSearchData'](_0x4b5e14){_0x4b5e14?.['search']&&Object['keys'](_0x4b5e14['search'])['forEach'](_0x31a9ea=>{this['context']['data'][this['safeKey'](_0x31a9ea)]=_0x4b5e14['search'][_0x31a9ea]['toString']();});}['bindMarkerData'](_0x142463){_0x142463?.['marker']&&Object['keys'](_0x142463['marker'])['forEach'](_0x132893=>{_0x132893['startsWith']('-')&&(this['context']['data'][_0x132893]=_0x142463['marker'][_0x132893]['toString']());});}async['setStatus'](_0x11958e){this['context']['metadata']['js']=_0x11958e;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x267937=(0x0,utils_1['formatISODate'])(new Date()),_0x583ce3={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x267937,'ju':_0x267937}};await this['engine']['execAdjacentParent'](this['context'],_0x583ce3);}}['createInputContext'](){const _0x16a3dc={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x16a3dc;}async['getState'](){const _0x48aa18=this['createInputContext'](),_0xcb06a7=this['resolveJobId'](_0x48aa18),_0x45e8d8=this['resolveJobKey'](_0x48aa18),_0x3c0373=(0x0,utils_1['formatISODate'])(new Date()),{id:_0x4f27a6,version:_0x268bad}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0x3c1f43={...this['metadata'],'jid':_0xcb06a7,'key':_0x45e8d8,'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':_0x4f27a6,'vrs':_0x268bad,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0xcb06a7,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x45e8d8,'jc':_0x3c0373,'ju':_0x3c0373,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0x3c1f43},'output':{'data':this['data'],'metadata':_0x3c1f43},'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'](_0x3d8d32=>'metadata/'+_0x3d8d32);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0x1b43a4=>'output/metadata/'+_0x1b43a4);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x204990){const _0xbeb985=this['config']['stats']?.['id'];return _0xbeb985?pipe_1['Pipe']['resolve'](_0xbeb985,_0x204990):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x4d9db7){const _0x4033be=this['config']['stats']?.['key'];return _0x4033be?pipe_1['Pipe']['resolve'](_0x4033be,_0x4d9db7):'';}async['setStateNX'](_0x44e850){const _0x7392be=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x7392be,this['engine']['appId'],_0x44e850))throw new errors_1['DuplicateJobError'](_0x7392be);}async['setStats'](_0x3cec70){const _0x3a0e24=this['context']['metadata'];if(_0x3a0e24['key']&&this['config']['stats']?.['measures']){const _0x18dc01=await this['engine']['getVID'](),_0x3e43c5=new reporter_1['ReporterService'](_0x18dc01,this['store'],this['logger']);await this['store']['setStats'](_0x3a0e24['key'],_0x3a0e24['jid'],_0x3a0e24['ts'],_0x3e43c5['resolveTriggerStatistics'](this['config'],this['context']),_0x18dc01,_0x3cec70);}}}exports['Trigger']=Trigger;
@@ -1 +1 @@
1
- 'use strict';(function(_0x24d7f4,_0x372871){const _0x467f77=_0x47ee,_0x28fb35=_0x24d7f4();while(!![]){try{const _0x6eb702=parseInt(_0x467f77(0x7f))/0x1+-parseInt(_0x467f77(0x83))/0x2+parseInt(_0x467f77(0x82))/0x3*(parseInt(_0x467f77(0x80))/0x4)+parseInt(_0x467f77(0x81))/0x5+parseInt(_0x467f77(0x84))/0x6*(-parseInt(_0x467f77(0x87))/0x7)+parseInt(_0x467f77(0x85))/0x8+-parseInt(_0x467f77(0x86))/0x9;if(_0x6eb702===_0x372871)break;else _0x28fb35['push'](_0x28fb35['shift']());}catch(_0x4c4176){_0x28fb35['push'](_0x28fb35['shift']());}}}(_0x2188,0x3104a));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');function _0x2188(){const _0x56531e=['2202039HiVwHI','1372lsbWgs','194149xbNxMP','687812eoDsVV','1175485iSBCPT','6zGkmfX','734962ORJkfL','2292bkgQEY','917200ZSYeWQ'];_0x2188=function(){return _0x56531e;};return _0x2188();}class Worker extends activity_1['Activity']{constructor(_0xfa4f2e,_0x3b3daf,_0x3f2c35,_0x34e5c0,_0x24f459,_0x4f33f5){super(_0xfa4f2e,_0x3b3daf,_0x3f2c35,_0x34e5c0,_0x24f459,_0x4f33f5);}async['process'](){this['logger']['debug']('worker-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x4e0830;try{await this['verifyEntry'](),_0x4e0830=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x4e0830['startActivitySpan'](this['leg']),this['mapInputData']();const _0x36baab=this['store']['transact'](),_0x4a960d=await this['execActivity'](_0x36baab);await collator_1['CollatorService']['authorizeReentry'](this,_0x36baab),await this['setState'](_0x36baab),await this['setStatus'](0x0,_0x36baab);const _0x43b078=await _0x36baab['exec']();_0x4e0830['mapActivityAttributes']();const _0x1051da=this['resolveStatus'](_0x43b078);return _0x4e0830['setActivityAttributes']({'app.activity.mid':_0x4a960d,'app.job.jss':_0x1051da}),this['context']['metadata']['aid'];}catch(_0x345127){if(_0x345127 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x345127});return;}else{if(_0x345127 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x345127});return;}else{if(_0x345127 instanceof errors_1['GetStateError']){this['logger']['error']('worker-get-state-error',{..._0x345127});return;}else{if(_0x345127 instanceof errors_1['CollationError']){if(_0x345127['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',{..._0x345127});}else this['logger']['error']('worker-process-error',{..._0x345127});}}}_0x4e0830?.['setActivityError'](_0x345127['message']);throw _0x345127;}finally{_0x4e0830?.['endActivitySpan'](),this['logger']['debug']('worker-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x5d3330){const _0x56ce0f=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x16b323={'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':_0x56ce0f,'spn':this['context']['$self']['output']['metadata']['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return this['config']['retry']&&(_0x16b323['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](_0x56ce0f,_0x16b323,_0x5d3330);}}function _0x47ee(_0x52efce,_0x52c006){const _0x2188b2=_0x2188();return _0x47ee=function(_0x47ee99,_0x5c50f5){_0x47ee99=_0x47ee99-0x7f;let _0x47291d=_0x2188b2[_0x47ee99];return _0x47291d;},_0x47ee(_0x52efce,_0x52c006);}exports['Worker']=Worker;
1
+ 'use strict';(function(_0x40920b,_0x54e2fb){const _0x2b2ec0=_0x236f,_0x327ffe=_0x40920b();while(!![]){try{const _0x4ce944=-parseInt(_0x2b2ec0(0x92))/0x1+parseInt(_0x2b2ec0(0x8b))/0x2+-parseInt(_0x2b2ec0(0x8f))/0x3*(-parseInt(_0x2b2ec0(0x8a))/0x4)+parseInt(_0x2b2ec0(0x8c))/0x5+-parseInt(_0x2b2ec0(0x8e))/0x6*(parseInt(_0x2b2ec0(0x90))/0x7)+parseInt(_0x2b2ec0(0x8d))/0x8+parseInt(_0x2b2ec0(0x93))/0x9*(-parseInt(_0x2b2ec0(0x91))/0xa);if(_0x4ce944===_0x54e2fb)break;else _0x327ffe['push'](_0x327ffe['shift']());}catch(_0x57a43f){_0x327ffe['push'](_0x327ffe['shift']());}}}(_0x18d3,0x423d3));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');function _0x236f(_0xe719a1,_0x3df0fb){const _0x18d33b=_0x18d3();return _0x236f=function(_0x236ff1,_0x1497bc){_0x236ff1=_0x236ff1-0x8a;let _0x33eccc=_0x18d33b[_0x236ff1];return _0x33eccc;},_0x236f(_0xe719a1,_0x3df0fb);}class Worker extends activity_1['Activity']{constructor(_0x911241,_0x6b24ca,_0x3965e1,_0x215387,_0xa62a6,_0xdceac4){super(_0x911241,_0x6b24ca,_0x3965e1,_0x215387,_0xa62a6,_0xdceac4);}async['process'](){this['logger']['debug']('worker-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x12426a;try{await this['verifyEntry'](),_0x12426a=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x12426a['startActivitySpan'](this['leg']),this['mapInputData']();const _0x48b44b=this['store']['transact'](),_0x58f969=await this['execActivity'](_0x48b44b);await collator_1['CollatorService']['authorizeReentry'](this,_0x48b44b),await this['setState'](_0x48b44b),await this['setStatus'](0x0,_0x48b44b);const _0x556752=await _0x48b44b['exec']();_0x12426a['mapActivityAttributes']();const _0x2c7b90=this['resolveStatus'](_0x556752);return _0x12426a['setActivityAttributes']({'app.activity.mid':_0x58f969,'app.job.jss':_0x2c7b90}),this['context']['metadata']['aid'];}catch(_0xe7f030){if(_0xe7f030 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0xe7f030});return;}else{if(_0xe7f030 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0xe7f030});return;}else{if(_0xe7f030 instanceof errors_1['GetStateError']){this['logger']['error']('worker-get-state-error',{..._0xe7f030});return;}else{if(_0xe7f030 instanceof errors_1['CollationError']){if(_0xe7f030['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',{..._0xe7f030});}else this['logger']['error']('worker-process-error',{..._0xe7f030});}}}_0x12426a?.['setActivityError'](_0xe7f030['message']);throw _0xe7f030;}finally{_0x12426a?.['endActivitySpan'](),this['logger']['debug']('worker-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x570316){const _0x27afd4=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x3685ae={'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':_0x27afd4,'spn':this['context']['$self']['output']['metadata']['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return this['config']['retry']&&(_0x3685ae['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](_0x27afd4,_0x3685ae,_0x570316);}}function _0x18d3(){const _0x3844d3=['103598wmAivC','2399470zCTnzy','2016080qXbVcX','12gIdTIR','29409ZTiWyN','875161hgVqsh','10YnOnOf','124221gSbEOh','2478267evhyss','56XcnjeN'];_0x18d3=function(){return _0x3844d3;};return _0x18d3();}exports['Worker']=Worker;