@hotmeshio/hotmesh 0.3.23 → 0.3.24

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 (81) hide show
  1. package/README.md +3 -1
  2. package/build/modules/key.js +1 -1
  3. package/build/modules/utils.js +1 -1
  4. package/build/package.json +3 -3
  5. package/build/services/activities/activity.js +1 -1
  6. package/build/services/activities/await.js +1 -1
  7. package/build/services/activities/cycle.js +1 -1
  8. package/build/services/activities/hook.js +1 -1
  9. package/build/services/activities/index.js +1 -1
  10. package/build/services/activities/interrupt.js +1 -1
  11. package/build/services/activities/signal.js +1 -1
  12. package/build/services/activities/trigger.js +1 -1
  13. package/build/services/activities/worker.js +1 -1
  14. package/build/services/collator/index.js +1 -1
  15. package/build/services/compiler/deployer.js +1 -1
  16. package/build/services/compiler/index.js +1 -1
  17. package/build/services/compiler/validator.js +1 -1
  18. package/build/services/connector/providers/postgres.js +1 -0
  19. package/build/services/engine/index.js +1 -1
  20. package/build/services/exporter/index.js +1 -1
  21. package/build/services/mapper/index.js +1 -1
  22. package/build/services/meshcall/index.js +3 -1
  23. package/build/services/meshdata/index.d.ts +2 -3
  24. package/build/services/meshdata/index.js +4 -6
  25. package/build/services/meshflow/client.js +3 -1
  26. package/build/services/meshflow/exporter.js +1 -1
  27. package/build/services/meshflow/workflow.d.ts +8 -0
  28. package/build/services/meshflow/workflow.js +41 -1
  29. package/build/services/pipe/functions/array.js +1 -1
  30. package/build/services/pipe/functions/bitwise.js +1 -1
  31. package/build/services/pipe/functions/conditional.js +1 -1
  32. package/build/services/pipe/functions/cron.js +1 -1
  33. package/build/services/pipe/functions/date.js +1 -1
  34. package/build/services/pipe/functions/index.js +1 -1
  35. package/build/services/pipe/functions/json.js +1 -1
  36. package/build/services/pipe/functions/logical.js +1 -1
  37. package/build/services/pipe/functions/math.js +1 -1
  38. package/build/services/pipe/functions/number.js +1 -1
  39. package/build/services/pipe/functions/object.js +1 -1
  40. package/build/services/pipe/functions/string.js +1 -1
  41. package/build/services/pipe/functions/symbol.js +1 -1
  42. package/build/services/pipe/functions/unary.js +1 -1
  43. package/build/services/pipe/index.js +1 -1
  44. package/build/services/quorum/index.js +1 -1
  45. package/build/services/reporter/index.js +1 -1
  46. package/build/services/router/index.js +1 -1
  47. package/build/services/search/providers/postgres/postgres.js +1 -1
  48. package/build/services/search/providers/redis/ioredis.js +1 -1
  49. package/build/services/search/providers/redis/redis.js +1 -1
  50. package/build/services/serializer/index.js +1 -1
  51. package/build/services/store/providers/postgres/kvsql.js +1 -1
  52. package/build/services/store/providers/postgres/kvtables.d.ts +1 -1
  53. package/build/services/store/providers/postgres/kvtables.js +1 -1
  54. package/build/services/store/providers/postgres/kvtransaction.js +1 -1
  55. package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
  56. package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
  57. package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
  58. package/build/services/store/providers/postgres/kvtypes/zset.js +1 -1
  59. package/build/services/store/providers/postgres/postgres.js +1 -1
  60. package/build/services/store/providers/redis/_base.js +1 -1
  61. package/build/services/store/providers/redis/ioredis.js +1 -1
  62. package/build/services/store/providers/redis/redis.js +1 -1
  63. package/build/services/store/providers/store-initializable.js +1 -1
  64. package/build/services/stream/providers/nats/nats.js +1 -1
  65. package/build/services/stream/providers/postgres/postgres.js +1 -1
  66. package/build/services/stream/providers/redis/ioredis.js +1 -1
  67. package/build/services/stream/providers/redis/redis.js +1 -1
  68. package/build/services/stream/providers/stream-initializable.js +1 -1
  69. package/build/services/sub/index.d.ts +5 -5
  70. package/build/services/sub/providers/nats/nats.js +1 -1
  71. package/build/services/sub/providers/postgres/postgres.d.ts +3 -3
  72. package/build/services/sub/providers/postgres/postgres.js +1 -1
  73. package/build/services/sub/providers/redis/ioredis.js +1 -1
  74. package/build/services/sub/providers/redis/redis.js +1 -1
  75. package/build/services/task/index.js +1 -1
  76. package/build/services/telemetry/index.d.ts +1 -0
  77. package/build/services/telemetry/index.js +1 -1
  78. package/build/services/worker/index.js +1 -1
  79. package/build/types/quorum.d.ts +7 -1
  80. package/package.json +3 -3
  81. package/types/quorum.ts +9 -1
package/README.md CHANGED
@@ -755,7 +755,9 @@ This example demonstrates how to search for those workflows where a given condit
755
755
  <br/>
756
756
 
757
757
  ## Connect
758
- HotMesh is pluggable and ships with support for **Postgres** (pg) and **Redis** (ioredis/redis). **NATS** is also supported for PubSub for extended patterns.
758
+ HotMesh is pluggable and fully supports **Postgres** and **Redis/ValKey** backends.
759
+
760
+ **NATS** can be added for *pub-sub* support (when extended pattern matching is desired). And *streams* support is currently in alpha (**NATS** + **JetStream** + **Postgres**).
759
761
 
760
762
  <details style="padding: .5em">
761
763
  <summary style="font-size:1.25em;">Postgres <small>[more]</small></summary>
@@ -1 +1 @@
1
- 'use strict';(function(_0x1bd3e1,_0x910d45){const _0x40b184=_0x340e,_0x36cec0=_0x1bd3e1();while(!![]){try{const _0x256f07=-parseInt(_0x40b184(0x89))/0x1+parseInt(_0x40b184(0x88))/0x2*(parseInt(_0x40b184(0x87))/0x3)+-parseInt(_0x40b184(0x83))/0x4+parseInt(_0x40b184(0x84))/0x5+-parseInt(_0x40b184(0x86))/0x6+-parseInt(_0x40b184(0x85))/0x7*(-parseInt(_0x40b184(0x8a))/0x8)+parseInt(_0x40b184(0x82))/0x9;if(_0x256f07===_0x910d45)break;else _0x36cec0['push'](_0x36cec0['shift']());}catch(_0x4c609b){_0x36cec0['push'](_0x36cec0['shift']());}}}(_0x3359,0xa5ddc));function _0x340e(_0x3c42f6,_0x523b27){const _0x335962=_0x3359();return _0x340e=function(_0x340e6d,_0x238dd2){_0x340e6d=_0x340e6d-0x82;let _0x578bdd=_0x335962[_0x340e6d];return _0x578bdd;},_0x340e(_0x3c42f6,_0x523b27);}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 _0x3359(){const _0x189bca=['641786ABiPWY','8YCrIcc','16836975RroWix','2377348BBWVTQ','1974435KRjWSv','394226BTtXhz','5844750KHjZWa','425742zrFEki','8iSjvwa'];_0x3359=function(){return _0x189bca;};return _0x3359();}const VALSEP='::';exports['VALSEP']=VALSEP;const WEBSEP='::';exports['WEBSEP']=WEBSEP;const TYPSEP='::';exports['TYPSEP']=TYPSEP;class KeyService{static['mintKey'](_0x11607c,_0x5c3ce5,_0x59fc2f){switch(_0x5c3ce5){case hotmesh_1['KeyType']['HOTMESH']:return _0x11607c;case hotmesh_1['KeyType']['THROTTLE_RATE']:return _0x11607c+':'+_0x59fc2f['appId']+':r:';case hotmesh_1['KeyType']['WORK_ITEMS']:return _0x11607c+':'+_0x59fc2f['appId']+':w:'+(_0x59fc2f['scoutType']||'');case hotmesh_1['KeyType']['TIME_RANGE']:return _0x11607c+':'+_0x59fc2f['appId']+':t:'+(_0x59fc2f['timeValue']||'');case hotmesh_1['KeyType']['APP']:return _0x11607c+':a:'+(_0x59fc2f['appId']||'');case hotmesh_1['KeyType']['QUORUM']:return _0x11607c+':'+_0x59fc2f['appId']+':q:'+(_0x59fc2f['engineId']||'');case hotmesh_1['KeyType']['JOB_STATE']:return _0x11607c+':'+_0x59fc2f['appId']+':j:'+_0x59fc2f['jobId'];case hotmesh_1['KeyType']['JOB_DEPENDENTS']:return _0x11607c+':'+_0x59fc2f['appId']+':d:'+_0x59fc2f['jobId'];case hotmesh_1['KeyType']['JOB_STATS_GENERAL']:return _0x11607c+':'+_0x59fc2f['appId']+':s:'+_0x59fc2f['jobKey']+':'+_0x59fc2f['dateTime'];case hotmesh_1['KeyType']['JOB_STATS_MEDIAN']:return _0x11607c+':'+_0x59fc2f['appId']+':s:'+_0x59fc2f['jobKey']+':'+_0x59fc2f['dateTime']+':'+_0x59fc2f['facet'];case hotmesh_1['KeyType']['JOB_STATS_INDEX']:return _0x11607c+':'+_0x59fc2f['appId']+':s:'+_0x59fc2f['jobKey']+':'+_0x59fc2f['dateTime']+':'+_0x59fc2f['facet'];case hotmesh_1['KeyType']['SCHEMAS']:return _0x11607c+':'+_0x59fc2f['appId']+':v:'+_0x59fc2f['appVersion']+':schemas';case hotmesh_1['KeyType']['SUBSCRIPTIONS']:return _0x11607c+':'+_0x59fc2f['appId']+':v:'+_0x59fc2f['appVersion']+':subscriptions';case hotmesh_1['KeyType']['SUBSCRIPTION_PATTERNS']:return _0x11607c+':'+_0x59fc2f['appId']+':v:'+_0x59fc2f['appVersion']+':transitions';case hotmesh_1['KeyType']['HOOKS']:return _0x11607c+':'+_0x59fc2f['appId']+':hooks';case hotmesh_1['KeyType']['SIGNALS']:return _0x11607c+':'+_0x59fc2f['appId']+':signals';case hotmesh_1['KeyType']['SYMKEYS']:return _0x11607c+':'+_0x59fc2f['appId']+':sym:keys:'+(_0x59fc2f['activityId']||'');case hotmesh_1['KeyType']['SYMVALS']:return _0x11607c+':'+_0x59fc2f['appId']+':sym:vals:';case hotmesh_1['KeyType']['STREAMS']:return _0x11607c+':'+(_0x59fc2f['appId']||'')+':x:'+(_0x59fc2f['topic']||'');default:throw new Error('Invalid\x20key\x20type.');}}static['parseKey'](_0x3bfc11){const [_0x30085d,_0x3198b4,_0x15998c,..._0x757b32]=_0x3bfc11['split'](KEYSEP),_0x215a7b=_0x757b32['join'](KEYSEP)||'';return{'namespace':_0x30085d,'app':_0x15998c==='a'?_0x3198b4:undefined,'entity':_0x15998c,'id':_0x215a7b};}static['reconstituteKey'](_0x25d349){const {namespace:_0x2ae8ae,app:_0x5b304d,entity:_0x47a98f,id:_0x280663}=_0x25d349;return''+_0x2ae8ae+KEYSEP+_0x5b304d+KEYSEP+_0x47a98f+KEYSEP+(_0x280663||'');}static['resolveEntityType'](_0x5b6223,_0x770b97=''){switch(_0x5b6223){case'a':return'applications';case'r':return'throttles';case'w':return _0x770b97===''?'task_priorities':'roles';case't':return _0x770b97===''?'task_schedules':'task_lists';case'q':return'events';case'j':return'jobs';case's':return'stats';case'v':return'versions';case'x':return _0x770b97===''?'streams':'stream_topics';case'hooks':return'signal_patterns';case'signals':return'signal_registry';case'sym':return'symbols';default:return'unknown_entity';}}static['resolveAbbreviation'](_0x200edb){switch(_0x200edb){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(_0x5e0c8a,_0x515807){const _0x5b5d74=_0x3391,_0x3f4e73=_0x5e0c8a();while(!![]){try{const _0x1d1d0d=parseInt(_0x5b5d74(0x163))/0x1*(-parseInt(_0x5b5d74(0x165))/0x2)+parseInt(_0x5b5d74(0x168))/0x3+-parseInt(_0x5b5d74(0x164))/0x4+-parseInt(_0x5b5d74(0x162))/0x5+-parseInt(_0x5b5d74(0x161))/0x6+-parseInt(_0x5b5d74(0x167))/0x7*(parseInt(_0x5b5d74(0x169))/0x8)+parseInt(_0x5b5d74(0x166))/0x9;if(_0x1d1d0d===_0x515807)break;else _0x3f4e73['push'](_0x3f4e73['shift']());}catch(_0x1683d3){_0x3f4e73['push'](_0x3f4e73['shift']());}}}(_0x3ee2,0x53e33));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';function _0x3ee2(){const _0x4b51e1=['1879500SdoALd','2237205jAOFgP','772iDBWyL','2049896IRzlmT','938zAduCy','20511162Pzhtbn','1550990IczdJS','1093584rumrrm','24DAHIQM'];_0x3ee2=function(){return _0x4b51e1;};return _0x3ee2();}exports['HMNS']=HMNS;function _0x3391(_0x59ffab,_0x44beeb){const _0x3ee241=_0x3ee2();return _0x3391=function(_0x3391ba,_0x303d09){_0x3391ba=_0x3391ba-0x161;let _0x2ce51c=_0x3ee241[_0x3391ba];return _0x2ce51c;},_0x3391(_0x59ffab,_0x44beeb);}const KEYSEP=':';exports['KEYSEP']=KEYSEP;const VALSEP='::';exports['VALSEP']=VALSEP;const WEBSEP='::';exports['WEBSEP']=WEBSEP;const TYPSEP='::';exports['TYPSEP']=TYPSEP;class KeyService{static['mintKey'](_0x2c5a91,_0x53e908,_0x4fdb71){switch(_0x53e908){case hotmesh_1['KeyType']['HOTMESH']:return _0x2c5a91;case hotmesh_1['KeyType']['THROTTLE_RATE']:return _0x2c5a91+':'+_0x4fdb71['appId']+':r:';case hotmesh_1['KeyType']['WORK_ITEMS']:return _0x2c5a91+':'+_0x4fdb71['appId']+':w:'+(_0x4fdb71['scoutType']||'');case hotmesh_1['KeyType']['TIME_RANGE']:return _0x2c5a91+':'+_0x4fdb71['appId']+':t:'+(_0x4fdb71['timeValue']||'');case hotmesh_1['KeyType']['APP']:return _0x2c5a91+':a:'+(_0x4fdb71['appId']||'');case hotmesh_1['KeyType']['QUORUM']:return _0x2c5a91+':'+_0x4fdb71['appId']+':q:'+(_0x4fdb71['engineId']||'');case hotmesh_1['KeyType']['JOB_STATE']:return _0x2c5a91+':'+_0x4fdb71['appId']+':j:'+_0x4fdb71['jobId'];case hotmesh_1['KeyType']['JOB_DEPENDENTS']:return _0x2c5a91+':'+_0x4fdb71['appId']+':d:'+_0x4fdb71['jobId'];case hotmesh_1['KeyType']['JOB_STATS_GENERAL']:return _0x2c5a91+':'+_0x4fdb71['appId']+':s:'+_0x4fdb71['jobKey']+':'+_0x4fdb71['dateTime'];case hotmesh_1['KeyType']['JOB_STATS_MEDIAN']:return _0x2c5a91+':'+_0x4fdb71['appId']+':s:'+_0x4fdb71['jobKey']+':'+_0x4fdb71['dateTime']+':'+_0x4fdb71['facet'];case hotmesh_1['KeyType']['JOB_STATS_INDEX']:return _0x2c5a91+':'+_0x4fdb71['appId']+':s:'+_0x4fdb71['jobKey']+':'+_0x4fdb71['dateTime']+':'+_0x4fdb71['facet'];case hotmesh_1['KeyType']['SCHEMAS']:return _0x2c5a91+':'+_0x4fdb71['appId']+':v:'+_0x4fdb71['appVersion']+':schemas';case hotmesh_1['KeyType']['SUBSCRIPTIONS']:return _0x2c5a91+':'+_0x4fdb71['appId']+':v:'+_0x4fdb71['appVersion']+':subscriptions';case hotmesh_1['KeyType']['SUBSCRIPTION_PATTERNS']:return _0x2c5a91+':'+_0x4fdb71['appId']+':v:'+_0x4fdb71['appVersion']+':transitions';case hotmesh_1['KeyType']['HOOKS']:return _0x2c5a91+':'+_0x4fdb71['appId']+':hooks';case hotmesh_1['KeyType']['SIGNALS']:return _0x2c5a91+':'+_0x4fdb71['appId']+':signals';case hotmesh_1['KeyType']['SYMKEYS']:return _0x2c5a91+':'+_0x4fdb71['appId']+':sym:keys:'+(_0x4fdb71['activityId']||'');case hotmesh_1['KeyType']['SYMVALS']:return _0x2c5a91+':'+_0x4fdb71['appId']+':sym:vals:';case hotmesh_1['KeyType']['STREAMS']:return _0x2c5a91+':'+(_0x4fdb71['appId']||'')+':x:'+(_0x4fdb71['topic']||'');default:throw new Error('Invalid\x20key\x20type.');}}static['parseKey'](_0x8bd367){const [_0x503128,_0x562953,_0x2a9752,..._0x1d487b]=_0x8bd367['split'](KEYSEP),_0x36adbb=_0x1d487b['join'](KEYSEP)||'';return{'namespace':_0x503128,'app':_0x2a9752==='a'?_0x562953:undefined,'entity':_0x2a9752,'id':_0x36adbb};}static['reconstituteKey'](_0x3754d7){const {namespace:_0x33a540,app:_0x226e40,entity:_0x30bb42,id:_0x413211}=_0x3754d7;return''+_0x33a540+KEYSEP+_0x226e40+KEYSEP+_0x30bb42+KEYSEP+(_0x413211||'');}static['resolveEntityType'](_0x550410,_0x41b7e1=''){switch(_0x550410){case'a':return'applications';case'r':return'throttles';case'w':return _0x41b7e1===''?'task_priorities':'roles';case't':return _0x41b7e1===''?'task_schedules':'task_lists';case'q':return'events';case'j':return'jobs';case's':return'stats';case'v':return'versions';case'x':return _0x41b7e1===''?'streams':'stream_topics';case'hooks':return'signal_patterns';case'signals':return'signal_registry';case'sym':return'symbols';default:return'unknown_entity';}}static['resolveAbbreviation'](_0x406b5c){switch(_0x406b5c){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(_0x506e30,_0x4cb3d8){const _0x448f0c=_0x599a,_0x40836a=_0x506e30();while(!![]){try{const _0x4f1941=-parseInt(_0x448f0c(0x9d))/0x1*(-parseInt(_0x448f0c(0xa2))/0x2)+-parseInt(_0x448f0c(0xa6))/0x3*(-parseInt(_0x448f0c(0xa4))/0x4)+-parseInt(_0x448f0c(0x9c))/0x5*(-parseInt(_0x448f0c(0xa0))/0x6)+-parseInt(_0x448f0c(0x9b))/0x7*(-parseInt(_0x448f0c(0xa3))/0x8)+parseInt(_0x448f0c(0xa5))/0x9+parseInt(_0x448f0c(0xa1))/0xa*(-parseInt(_0x448f0c(0x9e))/0xb)+-parseInt(_0x448f0c(0x9f))/0xc;if(_0x4f1941===_0x4cb3d8)break;else _0x40836a['push'](_0x40836a['shift']());}catch(_0x3349){_0x40836a['push'](_0x40836a['shift']());}}}(_0x2275,0x36452));var __importDefault=this&&this['__importDefault']||function(_0x3a9765){return _0x3a9765&&_0x3a9765['__esModule']?_0x3a9765:{'default':_0x3a9765};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['arrayToHash']=exports['isStreamMessage']=exports['parseStreamMessage']=exports['s']=exports['isValidCron']=exports['restoreHierarchy']=exports['getValueByPath']=exports['getIndexedHash']=exports['getSymVal']=exports['getSymKey']=exports['formatISODate']=exports['getTimeSeries']=exports['getSubscriptionTopic']=exports['findSubscriptionForTrigger']=exports['findTopKey']=exports['matchesStatus']=exports['matchesStatusCode']=exports['polyfill']=exports['identifyProvider']=exports['XSleepFor']=exports['sleepImmediate']=exports['sleepFor']=exports['guid']=exports['deterministicRandom']=exports['deepCopy']=exports['getSystemHealth']=exports['hashOptions']=void 0x0;const os_1=__importDefault(require('os')),crypto_1=require('crypto'),nanoid_1=require('nanoid'),ms_1=__importDefault(require('ms')),logger_1=require('../services/logger'),enums_1=require('./enums'),logger=new logger_1['LoggerService']('hotmesh','utils'),hashOptions=_0x29a493=>{const _0x3a5e10=JSON['stringify'](_0x29a493);return(0x0,crypto_1['createHash'])('sha256')['update'](_0x3a5e10)['digest']('hex');};exports['hashOptions']=hashOptions;async function getSystemHealth(){const _0x1c8830=os_1['default']['totalmem'](),_0x4b1eaa=os_1['default']['freemem'](),_0x1637f0=_0x1c8830-_0x4b1eaa,_0x2ea3e7={'TotalMemoryGB':(_0x1c8830/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','FreeMemoryGB':(_0x4b1eaa/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','UsedMemoryGB':(_0x1637f0/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};return _0x2ea3e7;}exports['getSystemHealth']=getSystemHealth;function deepCopy(_0x458fa7){return JSON['parse'](JSON['stringify'](_0x458fa7));}exports['deepCopy']=deepCopy;function deterministicRandom(_0x5925b1){const _0x4ea948=Math['sin'](_0x5925b1)*0x2710;return _0x4ea948-Math['floor'](_0x4ea948);}exports['deterministicRandom']=deterministicRandom;function guid(_0x521d10=enums_1['HMSH_GUID_SIZE']){return'H'+(0x0,nanoid_1['nanoid'])(_0x521d10);}exports['guid']=guid;async function sleepFor(_0x447811){return new Promise(_0x29fdc1=>setTimeout(_0x29fdc1,_0x447811));}exports['sleepFor']=sleepFor;function sleepImmediate(){return new Promise(_0x181891=>setImmediate(_0x181891));}exports['sleepImmediate']=sleepImmediate;function XSleepFor(_0x129e25){let _0x54b1b8;const _0xce1e5d=new Promise(_0xd4be33=>{_0x54b1b8=setTimeout(_0xd4be33,_0x129e25);});return{'promise':_0xce1e5d,'timerId':_0x54b1b8};}exports['XSleepFor']=XSleepFor;function identifyProvider(_0x376a00){const _0x1ee301=Object['getPrototypeOf'](_0x376a00);if(_0x376a00['Query']?.['prototype']||Object['keys'](_0x376a00)['includes']('database')||_0x1ee301['name']==='Pool')return'postgres';else{if(_0x376a00['toString']()['toLowerCase']()['includes']('nats'))return'nats';else{if('defineCommand'in _0x1ee301||Object['keys'](_0x1ee301)['includes']('multi'))return'ioredis';else{if(Object['keys'](_0x1ee301)['includes']('Multi'))return'redis';}}}if(_0x376a00['constructor']){if(_0x376a00['constructor']['name']==='Redis'||_0x376a00['constructor']['name']==='EventEmitter'){if('hset'in _0x376a00)return'ioredis';}else{if(_0x376a00['constructor']['name']==='ProviderClient'||_0x376a00['constructor']['name']==='Commander'){if('HSET'in _0x376a00)return'redis';}}}let _0x1f6b71=null;if(Object['keys'](_0x376a00)['includes']('connection')||!isNaN(_0x376a00['totalCount'])&&!isNaN(_0x376a00['idleCount']))_0x1f6b71='postgres';else{if(Object['keys'](_0x376a00)['includes']('Pipeline'))_0x1f6b71='ioredis';else{if(Object['keys'](_0x376a00)['includes']('createClient'))_0x1f6b71='redis';else _0x1ee301['constructor']['toString']()['includes']('NatsConnectionImpl')&&(_0x1f6b71='nats');}}return _0x1f6b71;}exports['identifyProvider']=identifyProvider,exports['polyfill']={'resolveActivityType'(_0x97aba6){return _0x97aba6==='activity'?'hook':_0x97aba6;},'providerConfig'(_0x4714d8){return _0x4714d8?.['connection']??_0x4714d8?.['redis']??_0x4714d8?.['connections'];},'meshDataConfig'(_0x454927){return{..._0x454927['connection']};}};function matchesStatusCode(_0x2c19a9,_0x7d9939){if(typeof _0x7d9939==='string'){const _0x1f445d='^'+_0x7d9939['replace'](/\*/g,'\x5cd')+'$';return new RegExp(_0x1f445d)['test'](_0x2c19a9['toString']());}return _0x7d9939['test'](_0x2c19a9['toString']());}exports['matchesStatusCode']=matchesStatusCode;function matchesStatus(_0x4d570c,_0x1d34c4){return _0x4d570c===_0x1d34c4;}exports['matchesStatus']=matchesStatus;function findTopKey(_0x4dfcb4,_0x6906a6){for(const [_0x2fae23,_0x5647f3]of Object['entries'](_0x4dfcb4)){if(_0x5647f3['hasOwnProperty'](_0x6906a6)){const _0x5468d9=findTopKey(_0x4dfcb4,_0x2fae23['replace'](/^\./,''));return(_0x5468d9||_0x2fae23)['replace'](/^\./,'');}}return null;}exports['findTopKey']=findTopKey;function findSubscriptionForTrigger(_0x5e06b6,_0x78ef49){for(const [_0x24acd7,_0x49097f]of Object['entries'](_0x5e06b6)){if(_0x49097f===_0x78ef49)return _0x24acd7;}return null;}exports['findSubscriptionForTrigger']=findSubscriptionForTrigger;async function getSubscriptionTopic(_0x1d8c6b,_0x5968b9,_0x2d21ce){const _0x5c82c2=await _0x5968b9['getTransitions'](_0x2d21ce),_0x2456b4=await _0x5968b9['getSubscriptions'](_0x2d21ce),_0x142112=findTopKey(_0x5c82c2,_0x1d8c6b),_0x514bc6=findSubscriptionForTrigger(_0x2456b4,_0x142112);return _0x514bc6;}function _0x2275(){const _0x565024=['594378NachDd','861830xvvovb','58Tiufkt','8yAAEvG','4jvhFJw','350460MIECWJ','1266261tHalgM','1302007xieomR','10XHNJGL','57IJaSoQ','22UAiBwL','5425812YgBXVG'];_0x2275=function(){return _0x565024;};return _0x2275();}exports['getSubscriptionTopic']=getSubscriptionTopic;function getTimeSeries(_0x160053){if(_0x160053['toString']()==='infinity')return'0';const _0x3f61c8=new Date(),_0x38b545=_0x160053['slice'](-0x1),_0x5caf48=parseInt(_0x160053['slice'](0x0,-0x1),0xa);if(_0x38b545==='m'){const _0x190cff=Math['floor'](_0x3f61c8['getMinutes']()/_0x5caf48)*_0x5caf48;_0x3f61c8['setUTCMinutes'](_0x190cff,0x0,0x0);}else _0x38b545==='h'&&_0x3f61c8['setUTCMinutes'](0x0,0x0,0x0);return _0x3f61c8['toISOString']()['replace'](/:\d\d\..+|-|T/g,'')['replace'](':','');}exports['getTimeSeries']=getTimeSeries;function formatISODate(_0x1fa524){const _0x8cfa0f=_0x1fa524 instanceof Date?_0x1fa524:new Date(_0x1fa524);return _0x8cfa0f['toISOString']()['replace'](/[:TZ-]/g,'');}exports['formatISODate']=formatISODate;function getSymKey(_0x25a2a8){const _0xad3840='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x140d6a=_0xad3840['length'];if(_0x25a2a8<0x0||_0x25a2a8>=Math['pow'](_0x140d6a,0x3))throw new Error('Number\x20out\x20of\x20range');const [_0x5c8ad6,_0x5493ae]=divmod(_0x25a2a8,_0x140d6a),[_0x451f59,_0x38a274]=divmod(_0x5c8ad6,_0x140d6a);return _0xad3840[_0x451f59]+_0xad3840[_0x5493ae]+_0xad3840[_0x38a274];}exports['getSymKey']=getSymKey;function getSymVal(_0x416dab){const _0x353d12='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x3cd720=_0x353d12['length'];if(_0x416dab<0x0||_0x416dab>=Math['pow'](_0x3cd720,0x2))throw new Error('Number\x20out\x20of\x20range');const [_0x38f522,_0x321fdc]=divmod(_0x416dab,_0x3cd720);return _0x353d12[_0x38f522]+_0x353d12[_0x321fdc];}exports['getSymVal']=getSymVal;function divmod(_0x5654db,_0x2db4a5){return[Math['floor'](_0x5654db/_0x2db4a5),_0x5654db%_0x2db4a5];}function getIndexedHash(_0xe17d52,_0x4cb0cd){const _0x3b2ff6=_0xe17d52[_0x4cb0cd]||0x0,_0x56a40f={..._0xe17d52};return delete _0x56a40f[_0x4cb0cd],[_0x3b2ff6,_0x56a40f];}exports['getIndexedHash']=getIndexedHash;function getValueByPath(_0x53c1a5,_0x2de8b0){const _0x2ebcc6=_0x2de8b0['split']('/');let _0x2e6960=_0x53c1a5;for(const _0x47d89f of _0x2ebcc6){if(_0x2e6960[_0x47d89f]!==undefined)_0x2e6960=_0x2e6960[_0x47d89f];else return undefined;}return _0x2e6960;}exports['getValueByPath']=getValueByPath;function restoreHierarchy(_0x35bd72){const _0x5650ff={};for(const _0x37c0d2 in _0x35bd72){if(_0x35bd72[_0x37c0d2]===undefined)continue;const _0x18052a=_0x37c0d2['split']('/');let _0x48b3a8=_0x5650ff;for(let _0xfc81bb=0x0;_0xfc81bb<_0x18052a['length'];_0xfc81bb++){_0xfc81bb===_0x18052a['length']-0x1?_0x48b3a8[_0x18052a[_0xfc81bb]]=_0x35bd72[_0x37c0d2]:(_0x48b3a8[_0x18052a[_0xfc81bb]]=_0x48b3a8[_0x18052a[_0xfc81bb]]||{},_0x48b3a8=_0x48b3a8[_0x18052a[_0xfc81bb]]);}}return _0x5650ff;}exports['restoreHierarchy']=restoreHierarchy;function isValidCron(_0x312908){const _0x1f83d1=/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/;return _0x1f83d1['test'](_0x312908);}exports['isValidCron']=isValidCron;const s=_0x3f4d60=>{return(0x0,ms_1['default'])(_0x3f4d60)/0x3e8;};exports['s']=s;const parseStreamMessage=_0x4cff7d=>{try{return JSON['parse'](_0x4cff7d);}catch(_0x1d43fa){logger['error']('Error\x20parsing\x20Stream\x20message',{..._0x1d43fa});throw _0x1d43fa;}};exports['parseStreamMessage']=parseStreamMessage;function _0x599a(_0x45baf1,_0x50309b){const _0x227593=_0x2275();return _0x599a=function(_0x599ace,_0x55aa67){_0x599ace=_0x599ace-0x9b;let _0x298b2e=_0x227593[_0x599ace];return _0x298b2e;},_0x599a(_0x45baf1,_0x50309b);}const isStreamMessage=_0x1ee230=>{return Array['isArray'](_0x1ee230)&&Array['isArray'](_0x1ee230[0x0]);};exports['isStreamMessage']=isStreamMessage;const arrayToHash=_0x2caf60=>{const _0x4b549c=[];let _0x1ee37b;for(let _0x5cca39=0x1;_0x5cca39<_0x2caf60['length'];_0x5cca39++){const _0x57448e=_0x2caf60[_0x5cca39],_0xa05b32={};if(Array['isArray'](_0x57448e)){for(let _0x50c096=0x0;_0x50c096<_0x57448e['length'];_0x50c096+=0x2){const _0x1a4e5d=_0x57448e[_0x50c096],_0x21531e=_0x57448e[_0x50c096+0x1];_0xa05b32[_0x1a4e5d]=_0x21531e;}_0x1ee37b&&(_0xa05b32['$']=_0x1ee37b),_0x4b549c['push'](_0xa05b32),_0x1ee37b=undefined;}else _0x1ee37b=_0x57448e;}return _0x4b549c;};exports['arrayToHash']=arrayToHash;
1
+ 'use strict';(function(_0x186cb7,_0x423a98){const _0x4a214c=_0x5852,_0x13c47e=_0x186cb7();while(!![]){try{const _0x4d62f0=parseInt(_0x4a214c(0x198))/0x1+parseInt(_0x4a214c(0x197))/0x2*(-parseInt(_0x4a214c(0x19d))/0x3)+-parseInt(_0x4a214c(0x19e))/0x4+parseInt(_0x4a214c(0x19b))/0x5+parseInt(_0x4a214c(0x19a))/0x6+-parseInt(_0x4a214c(0x199))/0x7+-parseInt(_0x4a214c(0x19c))/0x8*(-parseInt(_0x4a214c(0x19f))/0x9);if(_0x4d62f0===_0x423a98)break;else _0x13c47e['push'](_0x13c47e['shift']());}catch(_0x3c5110){_0x13c47e['push'](_0x13c47e['shift']());}}}(_0x5b7c,0x5d085));var __importDefault=this&&this['__importDefault']||function(_0xc0625d){return _0xc0625d&&_0xc0625d['__esModule']?_0xc0625d:{'default':_0xc0625d};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['arrayToHash']=exports['isStreamMessage']=exports['parseStreamMessage']=exports['s']=exports['isValidCron']=exports['restoreHierarchy']=exports['getValueByPath']=exports['getIndexedHash']=exports['getSymVal']=exports['getSymKey']=exports['formatISODate']=exports['getTimeSeries']=exports['getSubscriptionTopic']=exports['findSubscriptionForTrigger']=exports['findTopKey']=exports['matchesStatus']=exports['matchesStatusCode']=exports['polyfill']=exports['identifyProvider']=exports['XSleepFor']=exports['sleepImmediate']=exports['sleepFor']=exports['guid']=exports['deterministicRandom']=exports['deepCopy']=exports['getSystemHealth']=exports['hashOptions']=void 0x0;const os_1=__importDefault(require('os')),crypto_1=require('crypto'),nanoid_1=require('nanoid'),ms_1=__importDefault(require('ms')),logger_1=require('../services/logger'),enums_1=require('./enums'),logger=new logger_1['LoggerService']('hotmesh','utils'),hashOptions=_0x3b740e=>{const _0x14907d=JSON['stringify'](_0x3b740e);return(0x0,crypto_1['createHash'])('sha256')['update'](_0x14907d)['digest']('hex');};exports['hashOptions']=hashOptions;async function getSystemHealth(){const _0x5a41af=os_1['default']['totalmem'](),_0x5cdfde=os_1['default']['freemem'](),_0x39d51d=_0x5a41af-_0x5cdfde,_0x225b1c={'TotalMemoryGB':(_0x5a41af/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','FreeMemoryGB':(_0x5cdfde/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','UsedMemoryGB':(_0x39d51d/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};return _0x225b1c;}exports['getSystemHealth']=getSystemHealth;function deepCopy(_0x34683e){return JSON['parse'](JSON['stringify'](_0x34683e));}exports['deepCopy']=deepCopy;function deterministicRandom(_0x1ae1a4){const _0x37fb18=Math['sin'](_0x1ae1a4)*0x2710;return _0x37fb18-Math['floor'](_0x37fb18);}exports['deterministicRandom']=deterministicRandom;function guid(_0x41b78c=enums_1['HMSH_GUID_SIZE']){return'H'+(0x0,nanoid_1['nanoid'])(_0x41b78c);}exports['guid']=guid;async function sleepFor(_0x2cfe58){return new Promise(_0x4002a0=>setTimeout(_0x4002a0,_0x2cfe58));}exports['sleepFor']=sleepFor;function sleepImmediate(){return new Promise(_0x3ab141=>setImmediate(_0x3ab141));}exports['sleepImmediate']=sleepImmediate;function XSleepFor(_0x33060a){let _0x3de5d3;const _0x501f19=new Promise(_0x1bfbb8=>{_0x3de5d3=setTimeout(_0x1bfbb8,_0x33060a);});return{'promise':_0x501f19,'timerId':_0x3de5d3};}exports['XSleepFor']=XSleepFor;function identifyProvider(_0x34a408){const _0x53d830=Object['getPrototypeOf'](_0x34a408);if(_0x34a408['Query']?.['prototype']||Object['keys'](_0x34a408)['includes']('database')||_0x53d830['name']==='Pool')return'postgres';else{if(_0x34a408['toString']()['toLowerCase']()['includes']('nats'))return'nats';else{if('defineCommand'in _0x53d830||Object['keys'](_0x53d830)['includes']('multi'))return'ioredis';else{if(Object['keys'](_0x53d830)['includes']('Multi'))return'redis';}}}if(_0x34a408['constructor']){if(_0x34a408['constructor']['name']==='Redis'||_0x34a408['constructor']['name']==='EventEmitter'){if('hset'in _0x34a408)return'ioredis';}else{if(_0x34a408['constructor']['name']==='ProviderClient'||_0x34a408['constructor']['name']==='Commander'){if('HSET'in _0x34a408)return'redis';}}}let _0xe425ec=null;if(Object['keys'](_0x34a408)['includes']('connection')||!isNaN(_0x34a408['totalCount'])&&!isNaN(_0x34a408['idleCount']))_0xe425ec='postgres';else{if(Object['keys'](_0x34a408)['includes']('Pipeline'))_0xe425ec='ioredis';else{if(Object['keys'](_0x34a408)['includes']('createClient'))_0xe425ec='redis';else _0x53d830['constructor']['toString']()['includes']('NatsConnectionImpl')&&(_0xe425ec='nats');}}return _0xe425ec;}exports['identifyProvider']=identifyProvider,exports['polyfill']={'resolveActivityType'(_0x1937d3){return _0x1937d3==='activity'?'hook':_0x1937d3;},'providerConfig'(_0x3fde4a){return _0x3fde4a?.['connection']??_0x3fde4a?.['redis']??_0x3fde4a?.['connections'];},'meshDataConfig'(_0xed987e){return{..._0xed987e['connection']};}};function matchesStatusCode(_0x4fefa4,_0x240d10){if(typeof _0x240d10==='string'){const _0x5b7d03='^'+_0x240d10['replace'](/\*/g,'\x5cd')+'$';return new RegExp(_0x5b7d03)['test'](_0x4fefa4['toString']());}return _0x240d10['test'](_0x4fefa4['toString']());}function _0x5b7c(){const _0x57ab71=['957159AtNUua','2098otGiyI','246322finEam','4838169OzXFAZ','1217028daPhkm','419550JrTMhT','112RmQlqV','1302qtfaWv','1977960xxEEqz'];_0x5b7c=function(){return _0x57ab71;};return _0x5b7c();}exports['matchesStatusCode']=matchesStatusCode;function matchesStatus(_0x11698e,_0x4f0397){return _0x11698e===_0x4f0397;}exports['matchesStatus']=matchesStatus;function findTopKey(_0x245344,_0x3e3771){for(const [_0x323c96,_0x457216]of Object['entries'](_0x245344)){if(_0x457216['hasOwnProperty'](_0x3e3771)){const _0x300ec1=findTopKey(_0x245344,_0x323c96['replace'](/^\./,''));return(_0x300ec1||_0x323c96)['replace'](/^\./,'');}}return null;}exports['findTopKey']=findTopKey;function findSubscriptionForTrigger(_0x47cf5f,_0x15c3ff){for(const [_0x11b048,_0x4c7f57]of Object['entries'](_0x47cf5f)){if(_0x4c7f57===_0x15c3ff)return _0x11b048;}return null;}exports['findSubscriptionForTrigger']=findSubscriptionForTrigger;async function getSubscriptionTopic(_0x5ebeef,_0x47d7e6,_0x4b14b4){const _0x371b3a=await _0x47d7e6['getTransitions'](_0x4b14b4),_0xe91aa4=await _0x47d7e6['getSubscriptions'](_0x4b14b4),_0x4361fa=findTopKey(_0x371b3a,_0x5ebeef),_0x4383b1=findSubscriptionForTrigger(_0xe91aa4,_0x4361fa);return _0x4383b1;}exports['getSubscriptionTopic']=getSubscriptionTopic;function getTimeSeries(_0x464da2){if(_0x464da2['toString']()==='infinity')return'0';const _0x513aba=new Date(),_0x567cdb=_0x464da2['slice'](-0x1),_0x3cebbf=parseInt(_0x464da2['slice'](0x0,-0x1),0xa);if(_0x567cdb==='m'){const _0x24ad6b=Math['floor'](_0x513aba['getMinutes']()/_0x3cebbf)*_0x3cebbf;_0x513aba['setUTCMinutes'](_0x24ad6b,0x0,0x0);}else _0x567cdb==='h'&&_0x513aba['setUTCMinutes'](0x0,0x0,0x0);return _0x513aba['toISOString']()['replace'](/:\d\d\..+|-|T/g,'')['replace'](':','');}exports['getTimeSeries']=getTimeSeries;function formatISODate(_0x3dc845){const _0x42e92f=_0x3dc845 instanceof Date?_0x3dc845:new Date(_0x3dc845);return _0x42e92f['toISOString']()['replace'](/[:TZ-]/g,'');}exports['formatISODate']=formatISODate;function getSymKey(_0x38bdcd){const _0x37ec5e='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x366b3e=_0x37ec5e['length'];if(_0x38bdcd<0x0||_0x38bdcd>=Math['pow'](_0x366b3e,0x3))throw new Error('Number\x20out\x20of\x20range');const [_0x4e9aa6,_0x5cb279]=divmod(_0x38bdcd,_0x366b3e),[_0x1beff9,_0x22a983]=divmod(_0x4e9aa6,_0x366b3e);return _0x37ec5e[_0x1beff9]+_0x37ec5e[_0x5cb279]+_0x37ec5e[_0x22a983];}exports['getSymKey']=getSymKey;function getSymVal(_0x2220c7){const _0x38c313='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0xdec82c=_0x38c313['length'];if(_0x2220c7<0x0||_0x2220c7>=Math['pow'](_0xdec82c,0x2))throw new Error('Number\x20out\x20of\x20range');const [_0x57edb9,_0x46304f]=divmod(_0x2220c7,_0xdec82c);return _0x38c313[_0x57edb9]+_0x38c313[_0x46304f];}exports['getSymVal']=getSymVal;function divmod(_0x1a5602,_0xe17ea){return[Math['floor'](_0x1a5602/_0xe17ea),_0x1a5602%_0xe17ea];}function getIndexedHash(_0x5cc16b,_0x27a9a2){const _0x34be14=_0x5cc16b[_0x27a9a2]||0x0,_0x1d41d0={..._0x5cc16b};return delete _0x1d41d0[_0x27a9a2],[_0x34be14,_0x1d41d0];}exports['getIndexedHash']=getIndexedHash;function _0x5852(_0xb5c30a,_0x27790b){const _0x5b7c7f=_0x5b7c();return _0x5852=function(_0x585288,_0x4a10d2){_0x585288=_0x585288-0x197;let _0x57e71a=_0x5b7c7f[_0x585288];return _0x57e71a;},_0x5852(_0xb5c30a,_0x27790b);}function getValueByPath(_0x47d865,_0x337373){const _0x36730b=_0x337373['split']('/');let _0x1ea1ea=_0x47d865;for(const _0x9932f2 of _0x36730b){if(_0x1ea1ea[_0x9932f2]!==undefined)_0x1ea1ea=_0x1ea1ea[_0x9932f2];else return undefined;}return _0x1ea1ea;}exports['getValueByPath']=getValueByPath;function restoreHierarchy(_0x535cd4){const _0x878564={};for(const _0x20d704 in _0x535cd4){if(_0x535cd4[_0x20d704]===undefined)continue;const _0x66a8ac=_0x20d704['split']('/');let _0x5bb1ef=_0x878564;for(let _0x193f02=0x0;_0x193f02<_0x66a8ac['length'];_0x193f02++){_0x193f02===_0x66a8ac['length']-0x1?_0x5bb1ef[_0x66a8ac[_0x193f02]]=_0x535cd4[_0x20d704]:(_0x5bb1ef[_0x66a8ac[_0x193f02]]=_0x5bb1ef[_0x66a8ac[_0x193f02]]||{},_0x5bb1ef=_0x5bb1ef[_0x66a8ac[_0x193f02]]);}}return _0x878564;}exports['restoreHierarchy']=restoreHierarchy;function isValidCron(_0x1be553){const _0x1ad511=/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/;return _0x1ad511['test'](_0x1be553);}exports['isValidCron']=isValidCron;const s=_0x5564f2=>{return(0x0,ms_1['default'])(_0x5564f2)/0x3e8;};exports['s']=s;const parseStreamMessage=_0x1a1726=>{try{return JSON['parse'](_0x1a1726);}catch(_0x1ac2c5){logger['error']('Error\x20parsing\x20Stream\x20message',{..._0x1ac2c5});throw _0x1ac2c5;}};exports['parseStreamMessage']=parseStreamMessage;const isStreamMessage=_0x11d299=>{return Array['isArray'](_0x11d299)&&Array['isArray'](_0x11d299[0x0]);};exports['isStreamMessage']=isStreamMessage;const arrayToHash=_0x5ec924=>{const _0x222825=[];let _0x197349;for(let _0x6d686e=0x1;_0x6d686e<_0x5ec924['length'];_0x6d686e++){const _0x4a2a3d=_0x5ec924[_0x6d686e],_0x490db6={};if(Array['isArray'](_0x4a2a3d)){for(let _0x24c7fe=0x0;_0x24c7fe<_0x4a2a3d['length'];_0x24c7fe+=0x2){const _0x3a35fc=_0x4a2a3d[_0x24c7fe],_0x3f9034=_0x4a2a3d[_0x24c7fe+0x1];_0x490db6[_0x3a35fc]=_0x3f9034;}_0x197349&&(_0x490db6['$']=_0x197349),_0x222825['push'](_0x490db6),_0x197349=undefined;}else _0x197349=_0x4a2a3d;}return _0x222825;};exports['arrayToHash']=arrayToHash;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.3.23",
3
+ "version": "0.3.24",
4
4
  "description": "Serverless Workflow",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -34,7 +34,7 @@
34
34
  "test:meshflow:hello": "HMSH_LOGLEVEL=debug HMSH_IS_CLUSTER=true NODE_ENV=test jest ./tests/meshflow/helloworld/*.test.ts --detectOpenHandles --forceExit --verbose",
35
35
  "test:meshflow:hook": "NODE_ENV=test jest ./tests/meshflow/hook/*.test.ts --detectOpenHandles --forceExit --verbose",
36
36
  "test:meshflow:interrupt": "NODE_ENV=test jest ./tests/meshflow/interrupt/*.test.ts --detectOpenHandles --forceExit --verbose",
37
- "test:meshflow:loopactivity": "NODE_ENV=test jest ./tests/meshflow/loopactivity/I.test.ts --detectOpenHandles --forceExit --verbose",
37
+ "test:meshflow:loopactivity": "NODE_ENV=test jest ./tests/meshflow/loopactivity/*.test.ts --detectOpenHandles --forceExit --verbose",
38
38
  "test:meshflow:nested": "NODE_ENV=test jest ./tests/meshflow/nested/*.test.ts --detectOpenHandles --forceExit --verbose",
39
39
  "test:meshflow:retry": "NODE_ENV=test jest ./tests/meshflow/retry/*.test.ts --detectOpenHandles --forceExit --verbose",
40
40
  "test:meshflow:sleep": "NODE_ENV=test jest ./tests/meshflow/sleep/*.test.ts --detectOpenHandles --forceExit --verbose",
@@ -71,7 +71,7 @@
71
71
  "test:sub:nats": "NODE_ENV=test jest ./tests/functional/sub/providers/nats/nats.test.ts --detectOpenHandles --forceExit --verbose",
72
72
  "test:trigger": "NODE_ENV=test jest ./tests/unit/services/activities/trigger.test.ts --detectOpenHandles --forceExit --verbose",
73
73
  "test:meshdata": "NODE_ENV=test jest ./tests/meshdata/*.test.ts --forceExit --verbose --detectOpenHandles",
74
- "test:meshos": "NODE_ENV=test HMSH_IS_CLUSTER=true jest ./tests/meshos/*.test.ts --forceExit --verbose --detectOpenHandles",
74
+ "test:meshos": "HMSH_LOGLEVEL=debug NODE_ENV=test HMSH_IS_CLUSTER=true jest ./tests/meshos/*.test.ts --forceExit --verbose --detectOpenHandles",
75
75
  "test:meshcall": "NODE_ENV=test jest ./tests/meshcall/*.test.ts --forceExit --verbose --detectOpenHandles",
76
76
  "test:unit": "NODE_ENV=test jest ./tests/unit/*/*/index.test.ts --detectOpenHandles --forceExit --verbose"
77
77
  },
@@ -1 +1 @@
1
- 'use strict';function _0x130c(){const _0x420c93=['10180583DWlhid','6YNskxJ','2nLuXIX','108VfmbQZ','52088YcmcOQ','157570XdGjqm','29100YHrLpV','4098165MYVRkx','9427rOAksh','1016531eNEYNt','369DXOpeZ','6980550ncwOyM'];_0x130c=function(){return _0x420c93;};return _0x130c();}(function(_0x31f044,_0x2e632a){const _0x5c1dc3=_0xfd09,_0xdf086=_0x31f044();while(!![]){try{const _0x114fa9=-parseInt(_0x5c1dc3(0x8c))/0x1+-parseInt(_0x5c1dc3(0x91))/0x2*(-parseInt(_0x5c1dc3(0x8a))/0x3)+-parseInt(_0x5c1dc3(0x92))/0x4*(-parseInt(_0x5c1dc3(0x88))/0x5)+-parseInt(_0x5c1dc3(0x90))/0x6*(parseInt(_0x5c1dc3(0x8f))/0x7)+parseInt(_0x5c1dc3(0x87))/0x8*(-parseInt(_0x5c1dc3(0x8d))/0x9)+-parseInt(_0x5c1dc3(0x8e))/0xa+-parseInt(_0x5c1dc3(0x8b))/0xb*(-parseInt(_0x5c1dc3(0x89))/0xc);if(_0x114fa9===_0x2e632a)break;else _0xdf086['push'](_0xdf086['shift']());}catch(_0x2880d7){_0xdf086['push'](_0xdf086['shift']());}}}(_0x130c,0xd1c74));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(_0x418efa,_0x7e621a,_0x28f6bb,_0x483dd9,_0x500f2a,_0x1d562b){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x418efa,this['data']=_0x7e621a,this['metadata']=_0x28f6bb,this['hook']=_0x483dd9,this['engine']=_0x500f2a,this['context']=_0x1d562b||{'data':{},'metadata':{}},this['logger']=_0x500f2a['logger'],this['store']=_0x500f2a['store'];}['setLeg'](_0x59ff5a){this['leg']=_0x59ff5a;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0x2fd188=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0x2fd188!==undefined&&!isNaN(Number(_0x2fd188)))return _0x2fd188;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x5d6111=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x5d6111);}catch(_0x546f02){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x5d6111>0x0){if(this['context']['metadata']['js']===_0x5d6111){const _0x4249be=await this['setStatus'](-_0x5d6111);Number(_0x4249be)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x546f02;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0x1bd453=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,_0x1bd453);}async['processEvent'](_0x842329=stream_1['StreamStatus']['SUCCESS'],_0x5d7b03=0xc8,_0x2402ae='output'){this['setLeg'](0x2);const _0x504542=this['context']['metadata']['jid'];if(!_0x504542){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x4befa0=this['metadata']['aid'];this['status']=_0x842329,this['code']=_0x5d7b03,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x504542,'aid':_0x4befa0,'status':_0x842329,'code':_0x5d7b03});let _0x47f4d0;try{const _0x193eb6=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x193eb6),_0x47f4d0=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x47f4d0['startActivitySpan'](this['leg']);let _0x34c351;if(_0x842329===stream_1['StreamStatus']['PENDING'])_0x34c351=await this['processPending'](_0x2402ae);else _0x842329===stream_1['StreamStatus']['SUCCESS']?_0x34c351=await this['processSuccess'](_0x2402ae):_0x34c351=await this['processError']();this['transitionAdjacent'](_0x34c351,_0x47f4d0);}catch(_0x3387fb){if(_0x3387fb instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x3387fb['fault']+'-error',{..._0x3387fb});return;}else{if(_0x3387fb instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x3387fb});return;}else{if(_0x3387fb instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x3387fb});return;}else{if(_0x3387fb instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x3387fb});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x3387fb,'message':_0x3387fb['message'],'stack':_0x3387fb['stack'],'name':_0x3387fb['name']}),_0x47f4d0?.['setActivityError'](_0x3387fb['message']);throw _0x3387fb;}finally{_0x47f4d0?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x504542,'aid':_0x4befa0});}}async['processPending'](_0x1662ed){this['bindActivityData'](_0x1662ed),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x169b28=this['store']['transact']();return await this['setState'](_0x169b28),await collator_1['CollatorService']['notarizeContinuation'](this,_0x169b28),await this['setStatus'](this['adjacencyList']['length'],_0x169b28),await _0x169b28['exec']();}async['processSuccess'](_0x5a7ee0){this['bindActivityData'](_0x5a7ee0),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x4b86c1=this['store']['transact']();return await this['setState'](_0x4b86c1),await collator_1['CollatorService']['notarizeCompletion'](this,_0x4b86c1),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x4b86c1),await _0x4b86c1['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0x44ce5e=this['store']['transact']();return await this['setState'](_0x44ce5e),await collator_1['CollatorService']['notarizeCompletion'](this,_0x44ce5e),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x44ce5e),await _0x44ce5e['exec']();}async['transitionAdjacent'](_0x7e2e88,_0x47732c){_0x47732c['mapActivityAttributes']();const _0x4a7c3a=this['resolveStatus'](_0x7e2e88),_0x4d8694={'app.job.jss':_0x4a7c3a},_0x188b56=await this['transition'](this['adjacencyList'],_0x4a7c3a);_0x188b56?.['length']&&(_0x4d8694['app.activity.mids']=_0x188b56['join'](',')),_0x47732c['setActivityAttributes'](_0x4d8694);}['resolveStatus'](_0xe73943){const _0xb10df8=_0xe73943[_0xe73943['length']-0x1];return Array['isArray'](_0xb10df8)?Number(_0xb10df8[0x1]):Number(_0xb10df8);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x3c896e=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x2407f6=_0x3c896e['mapRules']();if(_0x2407f6)for(const _0x44d193 in _0x2407f6){const _0x373b04=_0x44d193['indexOf']('[');if(_0x373b04>-0x1){const _0x2e0ff7=_0x44d193['substring'](_0x373b04+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x2e0ff7))){const _0x206e8e=_0x44d193['substring'](0x0,_0x373b04);_0x2407f6[_0x206e8e]=_0x2407f6[_0x44d193],delete _0x2407f6[_0x44d193];}else{if(_0x2e0ff7==='-'||_0x2e0ff7==='_'){const _0x3c753b=_0x2407f6[_0x44d193];Object['keys'](_0x3c753b)['forEach'](_0x3a1c06=>{_0x2407f6[_0x3a1c06]=_0x3c753b[_0x3a1c06];});}}}}this['context']['data']=_0x2407f6;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x382199=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x382199['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x340437=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x5a1d09=_0x340437['mapRules'](),_0x4e1f4d=this['metadata']['aid'],_0x2d0b55={...this['context'][_0x4e1f4d]['output'],..._0x5a1d09};this['context'][_0x4e1f4d]['output']['data']=_0x2d0b55;}}async['registerTimeout'](){}['bindActivityError'](_0x4da5fe){const _0xdc70d7=this['context'][this['metadata']['aid']]['output']['metadata'];_0xdc70d7['err']=JSON['stringify'](this['data']),_0xdc70d7['$error']={..._0x4da5fe,'is_stream_error':!![]};}['bindJobError'](_0x3da1e1){this['context']['metadata']['err']=JSON['stringify']({..._0x3da1e1,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0x38ad08,_0x4da3b2){const {id:_0x13a604}=await this['engine']['getVID']();return await this['store']['setStatus'](_0x38ad08,this['context']['metadata']['jid'],_0x13a604,_0x4da3b2);}['authorizeEntry'](_0x218fea){return this['adjacencyList']?.['map'](_0x22118c=>{const {metadata:{aid:_0x41b8ba}}=_0x22118c;return _0x218fea[_0x41b8ba+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x41b8ba;})??[];}['bindDimensionalAddress'](_0x15e161){const _0x50fa3e=this['resolveDad']();_0x15e161[this['metadata']['aid']+'/output/metadata/dad']=_0x50fa3e;}async['setState'](_0x50c721){const _0x60a811=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x1d12ed={};await this['bindJobState'](_0x1d12ed);const _0xdca098=this['authorizeEntry'](_0x1d12ed);this['bindDimensionalAddress'](_0x1d12ed),this['bindActivityState'](_0x1d12ed);const _0x299018=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0xdca098],_0x5ad87d=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x1d12ed,this['getJobStatus'](),_0x60a811,_0x299018,_0x5ad87d,_0x50c721);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x28ea41=this['context']['$self'];!_0x28ea41['output']['metadata']&&(_0x28ea41['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x28ea41['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x5c6bee=(0x0,utils_1['formatISODate'])(new Date());_0x28ea41['output']['metadata']['ac']=_0x5c6bee,_0x28ea41['output']['metadata']['au']=_0x5c6bee,_0x28ea41['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x28ea41['output']['metadata']['stp']=this['config']['subtype']),_0x28ea41['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x365912){const _0x5e9726=await this['getTriggerConfig'](),_0x587321=[..._0x5e9726['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x35bc36 of _0x587321){const _0x10f563=(0x0,utils_1['getValueByPath'])(this['context'],_0x35bc36);_0x10f563!==undefined&&(_0x365912[_0x35bc36]=_0x10f563);}for(const _0x492df3 in this['context']?.['data']??{}){(_0x492df3['startsWith']('-')||_0x492df3['startsWith']('_'))&&(_0x365912[_0x492df3]=this['context']['data'][_0x492df3]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x365912,this['config'],this['context']);}['bindActivityState'](_0x370c15){const _0x3660c6=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0x5d2873 of _0x3660c6){const _0x48ec7a=this['metadata']['aid']+'/'+_0x5d2873,_0x9a1a77=(0x0,utils_1['getValueByPath'])(this['context'],_0x48ec7a);_0x9a1a77!==undefined&&(_0x370c15[_0x48ec7a]=_0x9a1a77);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x370c15,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x31a7cd=>'metadata/'+_0x31a7cd);}['bindActivityMetadataPaths'](){const _0x5148b9=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x5148b9]['KEYS']['map'](_0x3bdb4f=>'output/metadata/'+_0x3bdb4f);}async['getState'](){const _0x10503e=this['context']['metadata']['gid'],_0x55d186='$'+this['config']['subscribes'],_0x4fcba5={[_0x55d186]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x114b7f=>'metadata/'+_0x114b7f)};for(let [_0x5fd3ff,_0x4ae2e8]of Object['entries'](this['config']['consumes'])){if(_0x5fd3ff==='$job')for(const _0x40335c of _0x4ae2e8){_0x4fcba5[_0x55d186]['push'](_0x40335c);}else{_0x5fd3ff==='$self'&&(_0x5fd3ff=this['metadata']['aid']);!_0x4fcba5[_0x5fd3ff]&&(_0x4fcba5[_0x5fd3ff]=[]);for(const _0x6f3d9b of _0x4ae2e8){_0x4fcba5[_0x5fd3ff]['push'](_0x5fd3ff+'/'+_0x6f3d9b);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0x4fcba5,this['config'],this['metadata'],this['leg']);const {dad:_0x1a96a0,jid:_0x3d79f5}=this['context']['metadata'],_0x4fe92c=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x1a96a0||''),[_0x3a11c5,_0x20338a]=await this['store']['getState'](_0x3d79f5,_0x4fcba5,_0x4fe92c);this['context']=(0x0,utils_1['restoreHierarchy'])(_0x3a11c5),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x10503e),this['initDimensionalAddress'](_0x1a96a0),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x5f15c1,_0x5171c3){if(_0x5171c3!==_0x5f15c1)throw new errors_1['GenerationalError'](_0x5f15c1,_0x5171c3,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0x525b62){this['metadata']['dad']=_0x525b62;}['initSelf'](_0x9da68a){const _0x44f2b8=this['metadata']['aid'];!_0x9da68a[_0x44f2b8]&&(_0x9da68a[_0x44f2b8]={});const _0x5bc1f3=_0x9da68a[_0x44f2b8];return!_0x5bc1f3['output']&&(_0x5bc1f3['output']={}),!_0x5bc1f3['input']&&(_0x5bc1f3['input']={}),!_0x5bc1f3['hook']&&(_0x5bc1f3['hook']={}),!_0x5bc1f3['output']['metadata']&&(_0x5bc1f3['output']['metadata']={}),_0x5bc1f3['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x9da68a['$self']=_0x5bc1f3,_0x9da68a['$job']=_0x9da68a,_0x9da68a;}['initPolicies'](_0x429d8b){const _0x2610af=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0x429d8b);_0x429d8b['metadata']['expire']=_0x2610af;if(this['config']['persistent']!=undefined){const _0x3e5a23=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0x429d8b);_0x429d8b['metadata']['persistent']=_0x3e5a23;}}['bindActivityData'](_0x3d316b){this['context'][this['metadata']['aid']][_0x3d316b]['data']=this['data'];}['resolveDad'](){let _0x25c27c=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x25c27c=_0x25c27c['substring'](0x0,_0x25c27c['lastIndexOf'](','))+','+this['adjacentIndex']),_0x25c27c;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x2ca334=[],_0x2cf908=await this['store']['getTransitions'](await this['engine']['getVID']()),_0x4c8495=_0x2cf908['.'+this['metadata']['aid']],_0x475d67=this['resolveAdjacentDad']();if(_0x4c8495)for(const _0x561102 in _0x4c8495){const _0x5e2952=_0x4c8495[_0x561102];mapper_1['MapperService']['evaluate'](_0x5e2952,this['context'],this['code'])&&_0x2ca334['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x475d67,'aid':_0x561102,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x2ca334;}['isJobComplete'](_0x5e9780){return _0x5e9780<=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'](_0xdb4b65,_0x16afa2){if(this['jobWasInterrupted'](_0x16afa2))return;let _0xa117c7=[];(this['shouldEmit']()||this['isJobComplete'](_0x16afa2)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x16afa2)&&!this['shouldPersistJob']()});if(_0xdb4b65['length']&&!this['isJobComplete'](_0x16afa2)){const _0x5af2d3=this['store']['transact']();for(const _0x2e3aca of _0xdb4b65){await this['engine']['router']?.['publishMessage'](null,_0x2e3aca,_0x5af2d3);}_0xa117c7=await _0x5af2d3['exec']();}return _0xa117c7;}['jobWasInterrupted'](_0x4dd103){return _0x4dd103<-0x5f5e100;}}function _0xfd09(_0x4e7514,_0x17b0a9){const _0x130ca3=_0x130c();return _0xfd09=function(_0xfd098,_0x407c95){_0xfd098=_0xfd098-0x87;let _0x5a2e34=_0x130ca3[_0xfd098];return _0x5a2e34;},_0xfd09(_0x4e7514,_0x17b0a9);}exports['Activity']=Activity;
1
+ 'use strict';(function(_0x263c61,_0x2913fe){const _0x516838=_0x5067,_0x444392=_0x263c61();while(!![]){try{const _0x2d85e0=-parseInt(_0x516838(0x1bd))/0x1+parseInt(_0x516838(0x1c0))/0x2+-parseInt(_0x516838(0x1b9))/0x3+-parseInt(_0x516838(0x1bb))/0x4*(parseInt(_0x516838(0x1bc))/0x5)+parseInt(_0x516838(0x1bf))/0x6+-parseInt(_0x516838(0x1b8))/0x7*(-parseInt(_0x516838(0x1ba))/0x8)+-parseInt(_0x516838(0x1b7))/0x9*(-parseInt(_0x516838(0x1be))/0xa);if(_0x2d85e0===_0x2913fe)break;else _0x444392['push'](_0x444392['shift']());}catch(_0x5f45cf){_0x444392['push'](_0x444392['shift']());}}}(_0xbb81,0x9c7c2));function _0xbb81(){const _0x10bd92=['9HQpqQM','2681ndVjnc','542922vOYAFz','13368gvTCeY','146612TigUfM','155ZbNCoj','767042MuJLQB','3988540lrNIdK','3471612CsHLdR','2215544WJdiFm'];_0xbb81=function(){return _0x10bd92;};return _0xbb81();}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(_0x45bb07,_0x37bc9a,_0x430fc7,_0x5ad5d7,_0x75f675,_0x49af76){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x45bb07,this['data']=_0x37bc9a,this['metadata']=_0x430fc7,this['hook']=_0x5ad5d7,this['engine']=_0x75f675,this['context']=_0x49af76||{'data':{},'metadata':{}},this['logger']=_0x75f675['logger'],this['store']=_0x75f675['store'];}['setLeg'](_0xaf1278){this['leg']=_0xaf1278;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0x52bcd9=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0x52bcd9!==undefined&&!isNaN(Number(_0x52bcd9)))return _0x52bcd9;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x16bdcc=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x16bdcc);}catch(_0x338dd8){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x16bdcc>0x0){if(this['context']['metadata']['js']===_0x16bdcc){const _0x2f5b41=await this['setStatus'](-_0x16bdcc);Number(_0x2f5b41)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x338dd8;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0x39acab=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,_0x39acab);}async['processEvent'](_0x17db7f=stream_1['StreamStatus']['SUCCESS'],_0x2b7f72=0xc8,_0xc57b30='output'){this['setLeg'](0x2);const _0x26c1ce=this['context']['metadata']['jid'];if(!_0x26c1ce){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x5784d8=this['metadata']['aid'];this['status']=_0x17db7f,this['code']=_0x2b7f72,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x26c1ce,'aid':_0x5784d8,'status':_0x17db7f,'code':_0x2b7f72});let _0x58a30b;try{const _0x52dffb=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x52dffb),_0x58a30b=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x58a30b['startActivitySpan'](this['leg']);let _0x2febdc;if(_0x17db7f===stream_1['StreamStatus']['PENDING'])_0x2febdc=await this['processPending'](_0xc57b30);else _0x17db7f===stream_1['StreamStatus']['SUCCESS']?_0x2febdc=await this['processSuccess'](_0xc57b30):_0x2febdc=await this['processError']();this['transitionAdjacent'](_0x2febdc,_0x58a30b);}catch(_0x2dabc8){if(_0x2dabc8 instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x2dabc8['fault']+'-error',{..._0x2dabc8});return;}else{if(_0x2dabc8 instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x2dabc8});return;}else{if(_0x2dabc8 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x2dabc8});return;}else{if(_0x2dabc8 instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x2dabc8});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x2dabc8,'message':_0x2dabc8['message'],'stack':_0x2dabc8['stack'],'name':_0x2dabc8['name']}),_0x58a30b?.['setActivityError'](_0x2dabc8['message']);throw _0x2dabc8;}finally{_0x58a30b?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x26c1ce,'aid':_0x5784d8});}}async['processPending'](_0x3b1128){this['bindActivityData'](_0x3b1128),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x1f3096=this['store']['transact']();return await this['setState'](_0x1f3096),await collator_1['CollatorService']['notarizeContinuation'](this,_0x1f3096),await this['setStatus'](this['adjacencyList']['length'],_0x1f3096),await _0x1f3096['exec']();}async['processSuccess'](_0x456917){this['bindActivityData'](_0x456917),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x29af1a=this['store']['transact']();return await this['setState'](_0x29af1a),await collator_1['CollatorService']['notarizeCompletion'](this,_0x29af1a),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x29af1a),await _0x29af1a['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0x59bcfb=this['store']['transact']();return await this['setState'](_0x59bcfb),await collator_1['CollatorService']['notarizeCompletion'](this,_0x59bcfb),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x59bcfb),await _0x59bcfb['exec']();}async['transitionAdjacent'](_0x5784f4,_0xd02b7f){_0xd02b7f['mapActivityAttributes']();const _0x5322ed=this['resolveStatus'](_0x5784f4),_0x26ca95={'app.job.jss':_0x5322ed},_0x95dc81=await this['transition'](this['adjacencyList'],_0x5322ed);_0x95dc81?.['length']&&(_0x26ca95['app.activity.mids']=_0x95dc81['join'](',')),_0xd02b7f['setActivityAttributes'](_0x26ca95);}['resolveStatus'](_0x511f54){const _0xf034e3=_0x511f54[_0x511f54['length']-0x1];return Array['isArray'](_0xf034e3)?Number(_0xf034e3[0x1]):Number(_0xf034e3);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x332d78=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x2b4fe4=_0x332d78['mapRules']();if(_0x2b4fe4)for(const _0x45a538 in _0x2b4fe4){const _0x314b64=_0x45a538['indexOf']('[');if(_0x314b64>-0x1){const _0x11eb92=_0x45a538['substring'](_0x314b64+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x11eb92))){const _0x1e2e2e=_0x45a538['substring'](0x0,_0x314b64);_0x2b4fe4[_0x1e2e2e]=_0x2b4fe4[_0x45a538],delete _0x2b4fe4[_0x45a538];}else{if(_0x11eb92==='-'||_0x11eb92==='_'){const _0x1c591d=_0x2b4fe4[_0x45a538];Object['keys'](_0x1c591d)['forEach'](_0x39c824=>{_0x2b4fe4[_0x39c824]=_0x1c591d[_0x39c824];});}}}}this['context']['data']=_0x2b4fe4;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x59926b=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x59926b['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x51b049=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x30f429=_0x51b049['mapRules'](),_0xae54ce=this['metadata']['aid'],_0x154d8f={...this['context'][_0xae54ce]['output'],..._0x30f429};this['context'][_0xae54ce]['output']['data']=_0x154d8f;}}async['registerTimeout'](){}['bindActivityError'](_0x7de401){const _0x1af1d4=this['context'][this['metadata']['aid']]['output']['metadata'];_0x1af1d4['err']=JSON['stringify'](this['data']),_0x1af1d4['$error']={..._0x7de401,'is_stream_error':!![]};}['bindJobError'](_0xf10892){this['context']['metadata']['err']=JSON['stringify']({..._0xf10892,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0x43a714,_0x187a66){const {id:_0x28d893}=await this['engine']['getVID']();return await this['store']['setStatus'](_0x43a714,this['context']['metadata']['jid'],_0x28d893,_0x187a66);}['authorizeEntry'](_0x19affc){return this['adjacencyList']?.['map'](_0x4de53a=>{const {metadata:{aid:_0x310c73}}=_0x4de53a;return _0x19affc[_0x310c73+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x310c73;})??[];}['bindDimensionalAddress'](_0x7ebc69){const _0x55a229=this['resolveDad']();_0x7ebc69[this['metadata']['aid']+'/output/metadata/dad']=_0x55a229;}async['setState'](_0x8beceb){const _0x44fb0f=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x2fba7c={};await this['bindJobState'](_0x2fba7c);const _0x34c80d=this['authorizeEntry'](_0x2fba7c);this['bindDimensionalAddress'](_0x2fba7c),this['bindActivityState'](_0x2fba7c);const _0xe1911c=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x34c80d],_0x362b99=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x2fba7c,this['getJobStatus'](),_0x44fb0f,_0xe1911c,_0x362b99,_0x8beceb);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x3f9714=this['context']['$self'];!_0x3f9714['output']['metadata']&&(_0x3f9714['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x3f9714['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x2814ca=(0x0,utils_1['formatISODate'])(new Date());_0x3f9714['output']['metadata']['ac']=_0x2814ca,_0x3f9714['output']['metadata']['au']=_0x2814ca,_0x3f9714['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x3f9714['output']['metadata']['stp']=this['config']['subtype']),_0x3f9714['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x116de5){const _0x1e18fc=await this['getTriggerConfig'](),_0x466087=[..._0x1e18fc['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x2c6596 of _0x466087){const _0x339cbf=(0x0,utils_1['getValueByPath'])(this['context'],_0x2c6596);_0x339cbf!==undefined&&(_0x116de5[_0x2c6596]=_0x339cbf);}for(const _0x11b745 in this['context']?.['data']??{}){(_0x11b745['startsWith']('-')||_0x11b745['startsWith']('_'))&&(_0x116de5[_0x11b745]=this['context']['data'][_0x11b745]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x116de5,this['config'],this['context']);}['bindActivityState'](_0x36057d){const _0x430a38=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0xf18f2f of _0x430a38){const _0x34612c=this['metadata']['aid']+'/'+_0xf18f2f,_0x3cf741=(0x0,utils_1['getValueByPath'])(this['context'],_0x34612c);_0x3cf741!==undefined&&(_0x36057d[_0x34612c]=_0x3cf741);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x36057d,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x401dc2=>'metadata/'+_0x401dc2);}['bindActivityMetadataPaths'](){const _0x35ab51=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x35ab51]['KEYS']['map'](_0x5b194c=>'output/metadata/'+_0x5b194c);}async['getState'](){const _0x172a5b=this['context']['metadata']['gid'],_0x8c179d='$'+this['config']['subscribes'],_0x42b680={[_0x8c179d]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x54e6ac=>'metadata/'+_0x54e6ac)};for(let [_0x581877,_0x5a601c]of Object['entries'](this['config']['consumes'])){if(_0x581877==='$job')for(const _0x1721df of _0x5a601c){_0x42b680[_0x8c179d]['push'](_0x1721df);}else{_0x581877==='$self'&&(_0x581877=this['metadata']['aid']);!_0x42b680[_0x581877]&&(_0x42b680[_0x581877]=[]);for(const _0x47e244 of _0x5a601c){_0x42b680[_0x581877]['push'](_0x581877+'/'+_0x47e244);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0x42b680,this['config'],this['metadata'],this['leg']);const {dad:_0x4049da,jid:_0x485e08}=this['context']['metadata'],_0x3cd5af=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x4049da||''),[_0x4b28e7,_0x3cf42f]=await this['store']['getState'](_0x485e08,_0x42b680,_0x3cd5af);this['context']=(0x0,utils_1['restoreHierarchy'])(_0x4b28e7),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x172a5b),this['initDimensionalAddress'](_0x4049da),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x510e9f,_0x5eff91){if(_0x5eff91!==_0x510e9f)throw new errors_1['GenerationalError'](_0x510e9f,_0x5eff91,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0x289e28){this['metadata']['dad']=_0x289e28;}['initSelf'](_0xa945ff){const _0x52bbbc=this['metadata']['aid'];!_0xa945ff[_0x52bbbc]&&(_0xa945ff[_0x52bbbc]={});const _0x3aaf7c=_0xa945ff[_0x52bbbc];return!_0x3aaf7c['output']&&(_0x3aaf7c['output']={}),!_0x3aaf7c['input']&&(_0x3aaf7c['input']={}),!_0x3aaf7c['hook']&&(_0x3aaf7c['hook']={}),!_0x3aaf7c['output']['metadata']&&(_0x3aaf7c['output']['metadata']={}),_0x3aaf7c['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0xa945ff['$self']=_0x3aaf7c,_0xa945ff['$job']=_0xa945ff,_0xa945ff;}['initPolicies'](_0x36b514){const _0x56f378=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0x36b514);_0x36b514['metadata']['expire']=_0x56f378;if(this['config']['persistent']!=undefined){const _0x28d6af=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0x36b514);_0x36b514['metadata']['persistent']=_0x28d6af;}}['bindActivityData'](_0x93c1fb){this['context'][this['metadata']['aid']][_0x93c1fb]['data']=this['data'];}['resolveDad'](){let _0x58119f=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x58119f=_0x58119f['substring'](0x0,_0x58119f['lastIndexOf'](','))+','+this['adjacentIndex']),_0x58119f;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x3aeadc=[],_0x24ef55=await this['store']['getTransitions'](await this['engine']['getVID']()),_0x5dbf82=_0x24ef55['.'+this['metadata']['aid']],_0x2a081c=this['resolveAdjacentDad']();if(_0x5dbf82)for(const _0x203cc3 in _0x5dbf82){const _0x8da766=_0x5dbf82[_0x203cc3];mapper_1['MapperService']['evaluate'](_0x8da766,this['context'],this['code'])&&_0x3aeadc['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x2a081c,'aid':_0x203cc3,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x3aeadc;}['isJobComplete'](_0x18f534){return _0x18f534<=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'](_0x5b7e4f,_0x183f3f){if(this['jobWasInterrupted'](_0x183f3f))return;let _0x9b0058=[];(this['shouldEmit']()||this['isJobComplete'](_0x183f3f)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x183f3f)&&!this['shouldPersistJob']()});if(_0x5b7e4f['length']&&!this['isJobComplete'](_0x183f3f)){const _0x304ef5=this['store']['transact']();for(const _0x3c8920 of _0x5b7e4f){await this['engine']['router']?.['publishMessage'](null,_0x3c8920,_0x304ef5);}_0x9b0058=await _0x304ef5['exec']();}return _0x9b0058;}['jobWasInterrupted'](_0x49068e){return _0x49068e<-0x5f5e100;}}function _0x5067(_0x54916d,_0x121b47){const _0xbb81ea=_0xbb81();return _0x5067=function(_0x506759,_0x1fb9c1){_0x506759=_0x506759-0x1b7;let _0x304609=_0xbb81ea[_0x506759];return _0x304609;},_0x5067(_0x54916d,_0x121b47);}exports['Activity']=Activity;
@@ -1 +1 @@
1
- 'use strict';(function(_0x2b9c5d,_0x4eed98){const _0x4c3778=_0x2e41,_0xf4c2e1=_0x2b9c5d();while(!![]){try{const _0x4189d2=parseInt(_0x4c3778(0xa3))/0x1+-parseInt(_0x4c3778(0xa0))/0x2+-parseInt(_0x4c3778(0xa8))/0x3*(parseInt(_0x4c3778(0xa2))/0x4)+parseInt(_0x4c3778(0xa5))/0x5+parseInt(_0x4c3778(0xa1))/0x6*(-parseInt(_0x4c3778(0xa6))/0x7)+parseInt(_0x4c3778(0xa4))/0x8+parseInt(_0x4c3778(0xa7))/0x9;if(_0x4189d2===_0x4eed98)break;else _0xf4c2e1['push'](_0xf4c2e1['shift']());}catch(_0x26c549){_0xf4c2e1['push'](_0xf4c2e1['shift']());}}}(_0x37ac,0x53a96));function _0x2e41(_0x3e6bc2,_0x5d194c){const _0x37ac77=_0x37ac();return _0x2e41=function(_0x2e41e5,_0x48a2d6){_0x2e41e5=_0x2e41e5-0xa0;let _0x487505=_0x37ac77[_0x2e41e5];return _0x487505;},_0x2e41(_0x3e6bc2,_0x5d194c);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Await']=void 0x0;function _0x37ac(){const _0x1673d7=['874058uyNUgp','52854VfgEqC','960SIJElV','256042MuPnWo','1602200mrVaqY','1993540uBqIOv','455CVycnh','5244363jrQUIE','1068tgPGIT'];_0x37ac=function(){return _0x1673d7;};return _0x37ac();}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(_0x2b9db0,_0x429180,_0x4962e2,_0x3f6049,_0x425305,_0x55230e){super(_0x2b9db0,_0x429180,_0x4962e2,_0x3f6049,_0x425305,_0x55230e);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x28f8f5;try{await this['verifyEntry'](),_0x28f8f5=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x28f8f5['startActivitySpan'](this['leg']),this['mapInputData']();const _0x5be5ef=this['store']['transact'](),_0x239f7c=await this['execActivity'](_0x5be5ef);await collator_1['CollatorService']['authorizeReentry'](this,_0x5be5ef),await this['setState'](_0x5be5ef),await this['setStatus'](0x0,_0x5be5ef);const _0x1f2dff=await _0x5be5ef['exec']();_0x28f8f5['mapActivityAttributes']();const _0x5a0d08=this['resolveStatus'](_0x1f2dff);return _0x28f8f5['setActivityAttributes']({'app.activity.mid':_0x239f7c,'app.job.jss':_0x5a0d08}),this['context']['metadata']['aid'];}catch(_0x32f63e){if(_0x32f63e instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x32f63e});return;}else{if(_0x32f63e instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x32f63e});return;}else{if(_0x32f63e instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0x32f63e});return;}else{if(_0x32f63e instanceof errors_1['CollationError']){if(_0x32f63e['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',{..._0x32f63e});}else this['logger']['error']('await-process-error',{..._0x32f63e});}}}_0x28f8f5?.['setActivityError'](_0x32f63e['message']);throw _0x32f63e;}finally{_0x28f8f5?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x2d0ffb){const _0x400a3c=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x320af2={'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':_0x400a3c,'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 _0x1e6d5f=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x1e6d5f===![]&&(_0x320af2['metadata']['await']=![]);}return this['config']['retry']&&(_0x320af2['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x320af2,_0x2d0ffb);}}exports['Await']=Await;
1
+ 'use strict';(function(_0x411c11,_0x18afe1){const _0x324d59=_0x16ab,_0x585473=_0x411c11();while(!![]){try{const _0x3d6f23=-parseInt(_0x324d59(0x1dc))/0x1+-parseInt(_0x324d59(0x1df))/0x2*(parseInt(_0x324d59(0x1d9))/0x3)+parseInt(_0x324d59(0x1d8))/0x4*(parseInt(_0x324d59(0x1e2))/0x5)+-parseInt(_0x324d59(0x1db))/0x6*(parseInt(_0x324d59(0x1e0))/0x7)+-parseInt(_0x324d59(0x1dd))/0x8*(-parseInt(_0x324d59(0x1e1))/0x9)+-parseInt(_0x324d59(0x1da))/0xa+parseInt(_0x324d59(0x1de))/0xb;if(_0x3d6f23===_0x18afe1)break;else _0x585473['push'](_0x585473['shift']());}catch(_0x162afc){_0x585473['push'](_0x585473['shift']());}}}(_0x32ac,0xa2acd));function _0x16ab(_0xa3ac90,_0x2c6959){const _0x32acb6=_0x32ac();return _0x16ab=function(_0x16abdc,_0x2d515d){_0x16abdc=_0x16abdc-0x1d8;let _0x3f853b=_0x32acb6[_0x16abdc];return _0x3f853b;},_0x16ab(_0xa3ac90,_0x2c6959);}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');function _0x32ac(){const _0x173302=['471947PkAEUU','4167KedIdv','54585LOaghb','40JeDsOM','46743JWvTDU','6153240POcntT','24UwAyFv','264455jDislW','19736RWmtrK','20433732qfDoaz','166FDLERd'];_0x32ac=function(){return _0x173302;};return _0x32ac();}class Await extends activity_1['Activity']{constructor(_0x55fbdc,_0x58f5c7,_0x25629b,_0x4c0dee,_0x2d78e4,_0x3b77ec){super(_0x55fbdc,_0x58f5c7,_0x25629b,_0x4c0dee,_0x2d78e4,_0x3b77ec);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x58197b;try{await this['verifyEntry'](),_0x58197b=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x58197b['startActivitySpan'](this['leg']),this['mapInputData']();const _0x1cc138=this['store']['transact'](),_0x2f89b8=await this['execActivity'](_0x1cc138);await collator_1['CollatorService']['authorizeReentry'](this,_0x1cc138),await this['setState'](_0x1cc138),await this['setStatus'](0x0,_0x1cc138);const _0x20382b=await _0x1cc138['exec']();_0x58197b['mapActivityAttributes']();const _0x4bf68b=this['resolveStatus'](_0x20382b);return _0x58197b['setActivityAttributes']({'app.activity.mid':_0x2f89b8,'app.job.jss':_0x4bf68b}),this['context']['metadata']['aid'];}catch(_0x30fc3a){if(_0x30fc3a instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x30fc3a});return;}else{if(_0x30fc3a instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x30fc3a});return;}else{if(_0x30fc3a instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0x30fc3a});return;}else{if(_0x30fc3a instanceof errors_1['CollationError']){if(_0x30fc3a['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',{..._0x30fc3a});}else this['logger']['error']('await-process-error',{..._0x30fc3a});}}}_0x58197b?.['setActivityError'](_0x30fc3a['message']);throw _0x30fc3a;}finally{_0x58197b?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x278988){const _0x3ee0f5=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x4b0acf={'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':_0x3ee0f5,'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 _0x2236c1=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x2236c1===![]&&(_0x4b0acf['metadata']['await']=![]);}return this['config']['retry']&&(_0x4b0acf['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x4b0acf,_0x278988);}}exports['Await']=Await;
@@ -1 +1 @@
1
- 'use strict';function _0x836e(){const _0x25e2d0=['1496376BbKiix','169718dmumFX','16860xnFkzt','5wDyBDm','777344pGZPjD','5399370hJmWLL','6VTvhlm','93060rsFgvP','424333uUxFKo'];_0x836e=function(){return _0x25e2d0;};return _0x836e();}(function(_0x57ef1c,_0x33a3b5){const _0x4f4eac=_0x4e0b,_0x2707d6=_0x57ef1c();while(!![]){try{const _0x5a97cb=-parseInt(_0x4f4eac(0x6e))/0x1+-parseInt(_0x4f4eac(0x6f))/0x2*(-parseInt(_0x4f4eac(0x6a))/0x3)+-parseInt(_0x4f4eac(0x68))/0x4*(parseInt(_0x4f4eac(0x70))/0x5)+-parseInt(_0x4f4eac(0x6b))/0x6+parseInt(_0x4f4eac(0x6c))/0x7+-parseInt(_0x4f4eac(0x6d))/0x8+parseInt(_0x4f4eac(0x69))/0x9;if(_0x5a97cb===_0x33a3b5)break;else _0x2707d6['push'](_0x2707d6['shift']());}catch(_0x16e771){_0x2707d6['push'](_0x2707d6['shift']());}}}(_0x836e,0x1b0ce));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Cycle']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Cycle extends activity_1['Activity']{constructor(_0x20cd53,_0x176e56,_0x3f0332,_0x3446f9,_0x4a7659,_0x21a0a4){super(_0x20cd53,_0x176e56,_0x3f0332,_0x3446f9,_0x4a7659,_0x21a0a4);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x4604aa;try{await this['verifyEntry'](),_0x4604aa=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x4604aa['startActivitySpan'](this['leg']),this['mapInputData']();let _0x37cdbe=this['store']['transact']();await this['setState'](_0x37cdbe),await this['setStatus'](0x0,_0x37cdbe);const _0x232ae8=await _0x37cdbe['exec']();_0x4604aa['mapActivityAttributes']();const _0x5c9f51=this['resolveStatus'](_0x232ae8);_0x37cdbe=this['store']['transact']();const _0x24f044=await this['cycleAncestorActivity'](_0x37cdbe);return _0x4604aa['setActivityAttributes']({'app.activity.mid':_0x24f044,'app.job.jss':_0x5c9f51}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0x37cdbe),await _0x37cdbe['exec'](),this['context']['metadata']['aid'];}catch(_0x120c06){if(_0x120c06 instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x120c06});return;}else{if(_0x120c06 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x120c06});return;}else{if(_0x120c06 instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x120c06});return;}else{if(_0x120c06 instanceof errors_1['CollationError']){if(_0x120c06['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',{..._0x120c06});}else this['logger']['error']('cycle-process-error',{..._0x120c06});}}}_0x4604aa?.['setActivityError'](_0x120c06['message']);throw _0x120c06;}finally{_0x4604aa?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0x4f6ce8){this['mapInputData']();const _0x15474f={'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,_0x15474f,_0x4f6ce8);}}function _0x4e0b(_0x2637d9,_0x58ff22){const _0x836ec9=_0x836e();return _0x4e0b=function(_0x4e0b13,_0x4bc196){_0x4e0b13=_0x4e0b13-0x68;let _0x6b939c=_0x836ec9[_0x4e0b13];return _0x6b939c;},_0x4e0b(_0x2637d9,_0x58ff22);}exports['Cycle']=Cycle;
1
+ 'use strict';function _0x4ced(_0x473b9d,_0x3f1990){const _0x3ab57b=_0x3ab5();return _0x4ced=function(_0x4ced29,_0x180934){_0x4ced29=_0x4ced29-0x8e;let _0x49ec01=_0x3ab57b[_0x4ced29];return _0x49ec01;},_0x4ced(_0x473b9d,_0x3f1990);}function _0x3ab5(){const _0x55ae55=['4417zkiRVE','30SwemRp','75BjVUqy','1585287bxRdgv','263078oyqUPA','9499402TeUfID','1865646DFOeJN','666527ApbZUy','4584ZdQImY','652QDKsdz','9zARYwj'];_0x3ab5=function(){return _0x55ae55;};return _0x3ab5();}(function(_0x4805c9,_0x139554){const _0x32fc5c=_0x4ced,_0x29c1a6=_0x4805c9();while(!![]){try{const _0x44db18=parseInt(_0x32fc5c(0x8e))/0x1+parseInt(_0x32fc5c(0x96))/0x2*(parseInt(_0x32fc5c(0x91))/0x3)+-parseInt(_0x32fc5c(0x90))/0x4*(parseInt(_0x32fc5c(0x94))/0x5)+parseInt(_0x32fc5c(0x98))/0x6+-parseInt(_0x32fc5c(0x92))/0x7*(-parseInt(_0x32fc5c(0x8f))/0x8)+parseInt(_0x32fc5c(0x95))/0x9*(-parseInt(_0x32fc5c(0x93))/0xa)+-parseInt(_0x32fc5c(0x97))/0xb;if(_0x44db18===_0x139554)break;else _0x29c1a6['push'](_0x29c1a6['shift']());}catch(_0x9f36f2){_0x29c1a6['push'](_0x29c1a6['shift']());}}}(_0x3ab5,0x52cf8));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Cycle']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Cycle extends activity_1['Activity']{constructor(_0x4316e6,_0x538a22,_0x1ed242,_0xbcc2ab,_0x43b1df,_0x57efe0){super(_0x4316e6,_0x538a22,_0x1ed242,_0xbcc2ab,_0x43b1df,_0x57efe0);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x294909;try{await this['verifyEntry'](),_0x294909=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x294909['startActivitySpan'](this['leg']),this['mapInputData']();let _0xf6d43f=this['store']['transact']();await this['setState'](_0xf6d43f),await this['setStatus'](0x0,_0xf6d43f);const _0x48ca3e=await _0xf6d43f['exec']();_0x294909['mapActivityAttributes']();const _0x3f8bad=this['resolveStatus'](_0x48ca3e);_0xf6d43f=this['store']['transact']();const _0x4ee36c=await this['cycleAncestorActivity'](_0xf6d43f);return _0x294909['setActivityAttributes']({'app.activity.mid':_0x4ee36c,'app.job.jss':_0x3f8bad}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0xf6d43f),await _0xf6d43f['exec'](),this['context']['metadata']['aid'];}catch(_0x536e64){if(_0x536e64 instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x536e64});return;}else{if(_0x536e64 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x536e64});return;}else{if(_0x536e64 instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x536e64});return;}else{if(_0x536e64 instanceof errors_1['CollationError']){if(_0x536e64['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',{..._0x536e64});}else this['logger']['error']('cycle-process-error',{..._0x536e64});}}}_0x294909?.['setActivityError'](_0x536e64['message']);throw _0x536e64;}finally{_0x294909?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0xd6a551){this['mapInputData']();const _0x554788={'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,_0x554788,_0xd6a551);}}exports['Cycle']=Cycle;
@@ -1 +1 @@
1
- 'use strict';function _0x3c1f(){const _0x15a32b=['21348CAfLDL','338781CycQOP','6201265CVFXGY','11UAqLSJ','1HbkpLt','728VttLww','4176TzGTCz','53556qQSUTZ','13646630uNexCq','8UXqqTR','1732302xaKIOB','25634652YBhzUa'];_0x3c1f=function(){return _0x15a32b;};return _0x3c1f();}(function(_0x10fa83,_0xf65641){const _0x2ed81b=_0x47a9,_0x592e13=_0x10fa83();while(!![]){try{const _0x11a7f4=parseInt(_0x2ed81b(0x6c))/0x1*(parseInt(_0x2ed81b(0x66))/0x2)+-parseInt(_0x2ed81b(0x69))/0x3*(parseInt(_0x2ed81b(0x71))/0x4)+-parseInt(_0x2ed81b(0x6a))/0x5+parseInt(_0x2ed81b(0x6f))/0x6*(-parseInt(_0x2ed81b(0x6d))/0x7)+-parseInt(_0x2ed81b(0x6e))/0x8*(parseInt(_0x2ed81b(0x68))/0x9)+-parseInt(_0x2ed81b(0x70))/0xa*(-parseInt(_0x2ed81b(0x6b))/0xb)+parseInt(_0x2ed81b(0x67))/0xc;if(_0x11a7f4===_0xf65641)break;else _0x592e13['push'](_0x592e13['shift']());}catch(_0x249ee1){_0x592e13['push'](_0x592e13['shift']());}}}(_0x3c1f,0xb34e8));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(_0x80dd05,_0x25a5cf,_0x2983d1,_0x201c25,_0x352400,_0x281bb4){super(_0x80dd05,_0x25a5cf,_0x2983d1,_0x201c25,_0x352400,_0x281bb4);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x469046;try{return await this['verifyEntry'](),_0x469046=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x469046['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x469046):await this['doPassThrough'](_0x469046),this['context']['metadata']['aid'];}catch(_0x17f821){if(_0x17f821 instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x17f821});return;}else{if(_0x17f821 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x17f821});return;}else{if(_0x17f821 instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x17f821});return;}else{if(_0x17f821 instanceof errors_1['CollationError']){if(_0x17f821['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',{..._0x17f821});}else this['logger']['error']('hook-process-error',{..._0x17f821});}}}_0x469046?.['setActivityError'](_0x17f821['message']);throw _0x17f821;}finally{_0x469046?.['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 _0x2083bd=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x2083bd)&&Number(_0x2083bd)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x348874){const _0x31865e=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x31865e),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x31865e),await collator_1['CollatorService']['authorizeReentry'](this,_0x31865e),await this['setStatus'](0x0,_0x31865e),await _0x31865e['exec'](),_0x348874['mapActivityAttributes']();}async['doPassThrough'](_0x26dcdb){const _0x1ebf77=this['store']['transact']();let _0x3787c9;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x1ebf77),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x1ebf77),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x1ebf77),_0x3787c9=await _0x1ebf77['exec'](),_0x26dcdb['mapActivityAttributes']();const _0x3eaf6e=this['resolveStatus'](_0x3787c9),_0x3773a8={'app.job.jss':_0x3eaf6e},_0x5ccbd9=await this['transition'](this['adjacencyList'],_0x3eaf6e);_0x5ccbd9['length']&&(_0x3773a8['app.activity.mids']=_0x5ccbd9['join'](',')),_0x26dcdb['setActivityAttributes'](_0x3773a8);}async['getHookRule'](_0x579d32){const _0xd62c35=await this['store']['getHookRules']();return _0xd62c35?.[_0x579d32]?.[0x0];}async['registerHook'](_0x5e037b){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x5e037b);else{if(this['config']['sleep']){const _0x179f22=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',_0x179f22,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x3d28ad=stream_1['StreamStatus']['SUCCESS'],_0x385d44=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x3d28ad,'code':_0x385d44});const _0x3906f0=new task_1['TaskService'](this['store'],this['logger']),_0x4a842f={...this['data']},_0x7243f3=await _0x3906f0['processWebHookSignal'](this['config']['hook']['topic'],_0x4a842f);if(_0x7243f3){const [_0x42fb7d,_0x1b5a83,_0x531716,_0x3621f6]=_0x7243f3;this['context']['metadata']['jid']=_0x42fb7d,this['context']['metadata']['gid']=_0x3621f6,this['context']['metadata']['dad']=_0x531716,await this['processEvent'](_0x3d28ad,_0x385d44,'hook'),_0x385d44===0xc8&&await _0x3906f0['deleteWebHookSignal'](this['config']['hook']['topic'],_0x4a842f);}}async['processTimeHookEvent'](_0x46b015){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x46b015,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}function _0x47a9(_0x7252c,_0x2721a9){const _0x3c1f9a=_0x3c1f();return _0x47a9=function(_0x47a9a7,_0x57e8c8){_0x47a9a7=_0x47a9a7-0x66;let _0x34d865=_0x3c1f9a[_0x47a9a7];return _0x34d865;},_0x47a9(_0x7252c,_0x2721a9);}exports['Hook']=Hook;
1
+ 'use strict';(function(_0x51bf3e,_0x4617ab){const _0x569c93=_0x32c1,_0x4e775f=_0x51bf3e();while(!![]){try{const _0x51dad3=-parseInt(_0x569c93(0x162))/0x1*(-parseInt(_0x569c93(0x15f))/0x2)+-parseInt(_0x569c93(0x15d))/0x3+-parseInt(_0x569c93(0x161))/0x4*(-parseInt(_0x569c93(0x160))/0x5)+parseInt(_0x569c93(0x15c))/0x6+parseInt(_0x569c93(0x15a))/0x7*(-parseInt(_0x569c93(0x15e))/0x8)+parseInt(_0x569c93(0x159))/0x9*(parseInt(_0x569c93(0x15b))/0xa)+-parseInt(_0x569c93(0x163))/0xb;if(_0x51dad3===_0x4617ab)break;else _0x4e775f['push'](_0x4e775f['shift']());}catch(_0xc602dc){_0x4e775f['push'](_0x4e775f['shift']());}}}(_0x5541,0xb2848));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(_0x42c462,_0x1ca475,_0x465c50,_0x14efc5,_0x37c0f9,_0x3b7129){super(_0x42c462,_0x1ca475,_0x465c50,_0x14efc5,_0x37c0f9,_0x3b7129);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x339e04;try{return await this['verifyEntry'](),_0x339e04=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x339e04['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x339e04):await this['doPassThrough'](_0x339e04),this['context']['metadata']['aid'];}catch(_0x149d9d){if(_0x149d9d instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x149d9d});return;}else{if(_0x149d9d instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x149d9d});return;}else{if(_0x149d9d instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x149d9d});return;}else{if(_0x149d9d instanceof errors_1['CollationError']){if(_0x149d9d['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',{..._0x149d9d});}else this['logger']['error']('hook-process-error',{..._0x149d9d});}}}_0x339e04?.['setActivityError'](_0x149d9d['message']);throw _0x149d9d;}finally{_0x339e04?.['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 _0x2ad46f=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x2ad46f)&&Number(_0x2ad46f)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x2be55a){const _0x3127fb=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x3127fb),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x3127fb),await collator_1['CollatorService']['authorizeReentry'](this,_0x3127fb),await this['setStatus'](0x0,_0x3127fb),await _0x3127fb['exec'](),_0x2be55a['mapActivityAttributes']();}async['doPassThrough'](_0x584a11){const _0x41bc33=this['store']['transact']();let _0x9a3dcb;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x41bc33),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x41bc33),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x41bc33),_0x9a3dcb=await _0x41bc33['exec'](),_0x584a11['mapActivityAttributes']();const _0x5bd9b4=this['resolveStatus'](_0x9a3dcb),_0x195611={'app.job.jss':_0x5bd9b4},_0x2d38db=await this['transition'](this['adjacencyList'],_0x5bd9b4);_0x2d38db['length']&&(_0x195611['app.activity.mids']=_0x2d38db['join'](',')),_0x584a11['setActivityAttributes'](_0x195611);}async['getHookRule'](_0x4b7697){const _0x185d71=await this['store']['getHookRules']();return _0x185d71?.[_0x4b7697]?.[0x0];}async['registerHook'](_0x524726){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x524726);else{if(this['config']['sleep']){const _0x149327=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',_0x149327,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x3a06b9=stream_1['StreamStatus']['SUCCESS'],_0x31c8b4=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x3a06b9,'code':_0x31c8b4});const _0x32da6a=new task_1['TaskService'](this['store'],this['logger']),_0x53724f={...this['data']},_0x3cc545=await _0x32da6a['processWebHookSignal'](this['config']['hook']['topic'],_0x53724f);if(_0x3cc545){const [_0x3492cf,_0x50386e,_0x57f1d6,_0x58565f]=_0x3cc545;this['context']['metadata']['jid']=_0x3492cf,this['context']['metadata']['gid']=_0x58565f,this['context']['metadata']['dad']=_0x57f1d6,await this['processEvent'](_0x3a06b9,_0x31c8b4,'hook'),_0x31c8b4===0xc8&&await _0x32da6a['deleteWebHookSignal'](this['config']['hook']['topic'],_0x53724f);}}async['processTimeHookEvent'](_0x22df65){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x22df65,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}function _0x5541(){const _0x1cb44b=['2444778Rzrjhb','24SFMlEZ','2DNHbQb','155QXeAFa','170692BwTtSf','972899ekWwaa','5396182vxWKdD','105372Nvpydp','2765161ZjYjms','130tvYTZT','4642794yywBJR'];_0x5541=function(){return _0x1cb44b;};return _0x5541();}function _0x32c1(_0x318edf,_0x476c11){const _0x554147=_0x5541();return _0x32c1=function(_0x32c18d,_0x13962a){_0x32c18d=_0x32c18d-0x159;let _0x3e52fd=_0x554147[_0x32c18d];return _0x3e52fd;},_0x32c1(_0x318edf,_0x476c11);}exports['Hook']=Hook;
@@ -1 +1 @@
1
- 'use strict';(function(_0x39ec16,_0x28894f){const _0x414f3d=_0x3ed4,_0x7163ec=_0x39ec16();while(!![]){try{const _0x20d281=-parseInt(_0x414f3d(0x111))/0x1+parseInt(_0x414f3d(0x115))/0x2+-parseInt(_0x414f3d(0x116))/0x3*(-parseInt(_0x414f3d(0x119))/0x4)+parseInt(_0x414f3d(0x117))/0x5+parseInt(_0x414f3d(0x118))/0x6+parseInt(_0x414f3d(0x113))/0x7*(-parseInt(_0x414f3d(0x112))/0x8)+parseInt(_0x414f3d(0x11a))/0x9*(-parseInt(_0x414f3d(0x114))/0xa);if(_0x20d281===_0x28894f)break;else _0x7163ec['push'](_0x7163ec['shift']());}catch(_0x416294){_0x7163ec['push'](_0x7163ec['shift']());}}}(_0x1ab5,0x7750f));function _0x1ab5(){const _0x26f804=['506188PqKkCv','5589rUIkzC','484028SUushS','168edyfwf','254282DSCkCM','9910lJlnPG','1372162bABcLt','6LFGLEC','2198890aXVNMK','5832306uTeHbn'];_0x1ab5=function(){return _0x26f804;};return _0x1ab5();}function _0x3ed4(_0x2a23f7,_0x254395){const _0x1ab5bc=_0x1ab5();return _0x3ed4=function(_0x3ed4b2,_0x12fdf4){_0x3ed4b2=_0x3ed4b2-0x111;let _0x58fc77=_0x1ab5bc[_0x3ed4b2];return _0x58fc77;},_0x3ed4(_0x2a23f7,_0x254395);}Object['defineProperty'](exports,'__esModule',{'value':!![]});const activity_1=require('./activity'),await_1=require('./await'),cycle_1=require('./cycle'),hook_1=require('./hook'),interrupt_1=require('./interrupt'),signal_1=require('./signal'),trigger_1=require('./trigger'),worker_1=require('./worker');exports['default']={'activity':activity_1['Activity'],'await':await_1['Await'],'cycle':cycle_1['Cycle'],'hook':hook_1['Hook'],'interrupt':interrupt_1['Interrupt'],'signal':signal_1['Signal'],'trigger':trigger_1['Trigger'],'worker':worker_1['Worker']};
1
+ 'use strict';(function(_0x20eed4,_0xf8364e){const _0x290400=_0x4165,_0x5c2d67=_0x20eed4();while(!![]){try{const _0x1307da=-parseInt(_0x290400(0x1d6))/0x1*(-parseInt(_0x290400(0x1d7))/0x2)+parseInt(_0x290400(0x1d8))/0x3*(parseInt(_0x290400(0x1da))/0x4)+parseInt(_0x290400(0x1d9))/0x5+parseInt(_0x290400(0x1dc))/0x6+-parseInt(_0x290400(0x1db))/0x7+-parseInt(_0x290400(0x1d4))/0x8+parseInt(_0x290400(0x1dd))/0x9*(parseInt(_0x290400(0x1d5))/0xa);if(_0x1307da===_0xf8364e)break;else _0x5c2d67['push'](_0x5c2d67['shift']());}catch(_0x15aa77){_0x5c2d67['push'](_0x5c2d67['shift']());}}}(_0xfa02,0xf34e9));function _0x4165(_0x317cdd,_0x20c0cb){const _0xfa02e6=_0xfa02();return _0x4165=function(_0x4165cc,_0x452fc7){_0x4165cc=_0x4165cc-0x1d4;let _0x2e56e9=_0xfa02e6[_0x4165cc];return _0x2e56e9;},_0x4165(_0x317cdd,_0x20c0cb);}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 _0xfa02(){const _0x35d766=['12227FOfmMb','6XtEHMw','948525anBGMh','4461960aiuEuf','4ACKfkn','10374945IlhQeW','3733650ZsRcQO','315VHjrMU','11792544OEmBDE','595790fIRiwO'];_0xfa02=function(){return _0x35d766;};return _0xfa02();}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(_0x388b6f,_0x2d3bb5){const _0x218fba=_0x531c,_0x5ee578=_0x388b6f();while(!![]){try{const _0x14d807=-parseInt(_0x218fba(0x13a))/0x1*(-parseInt(_0x218fba(0x143))/0x2)+-parseInt(_0x218fba(0x142))/0x3+parseInt(_0x218fba(0x13e))/0x4+parseInt(_0x218fba(0x139))/0x5*(parseInt(_0x218fba(0x141))/0x6)+-parseInt(_0x218fba(0x140))/0x7*(-parseInt(_0x218fba(0x13d))/0x8)+parseInt(_0x218fba(0x13b))/0x9*(-parseInt(_0x218fba(0x13f))/0xa)+-parseInt(_0x218fba(0x13c))/0xb;if(_0x14d807===_0x2d3bb5)break;else _0x5ee578['push'](_0x5ee578['shift']());}catch(_0x40be2f){_0x5ee578['push'](_0x5ee578['shift']());}}}(_0x5f2b,0x2e16e));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Interrupt']=void 0x0;function _0x5f2b(){const _0x2baeac=['60803HlijCv','27HRNqiP','1750848bKaxEQ','1818568lCueMk','875944cMRLhZ','1092110CdNjtc','7SYNKId','30NZzneU','355446TjDhSm','2tYmSka','286955MBAiAn'];_0x5f2b=function(){return _0x2baeac;};return _0x5f2b();}const errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Interrupt extends activity_1['Activity']{constructor(_0x1b494f,_0x39602d,_0x3b0d96,_0x48ce6f,_0x54c560,_0x58614f){super(_0x1b494f,_0x39602d,_0x3b0d96,_0x48ce6f,_0x54c560,_0x58614f);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x1e931d;try{await this['verifyEntry'](),_0x1e931d=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x1e931d['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x1e931d):await this['interruptAnother'](_0x1e931d);}catch(_0x1e945b){if(_0x1e945b instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x1e945b});return;}else{if(_0x1e945b instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x1e945b});return;}else{if(_0x1e945b instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x1e945b});return;}else{if(_0x1e945b instanceof errors_1['CollationError']){if(_0x1e945b['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',{..._0x1e945b});}else this['logger']['error']('interrupt-process-error',{..._0x1e945b});}}}_0x1e931d?.['setActivityError'](_0x1e945b['message']);throw _0x1e945b;}finally{_0x1e931d?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x22fff9){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x365763=await this['interrupt']();_0x22fff9['mapActivityAttributes']();const _0x8164f4=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x8164f4),await this['setStatus'](-0x1,_0x8164f4);const _0x4fde6a=await _0x8164f4['exec'](),_0x101bed=this['resolveStatus'](_0x4fde6a);return _0x22fff9['setActivityAttributes']({'app.activity.mid':_0x365763,'app.job.jss':_0x101bed}),this['context']['metadata']['aid'];}async['interruptAnother'](_0x82182c){const _0x30581e=await this['interrupt'](),_0x5b16eb={'app.activity.mid':_0x30581e};_0x82182c['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x548911=this['store']['transact']();await this['setState'](_0x548911);}const _0x3e0f8c=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x3e0f8c),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x3e0f8c);const _0x4ebaf9=await _0x3e0f8c['exec'](),_0x32104d=this['resolveStatus'](_0x4ebaf9);_0x5b16eb['app.job.jss']=_0x32104d;const _0x499e10=await this['transition'](this['adjacencyList'],_0x32104d);return _0x499e10['length']&&(_0x5b16eb['app.activity.mids']=_0x499e10['join'](',')),_0x82182c['setActivityAttributes'](_0x5b16eb),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x1fcd73=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x1fcd73==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 _0x4c13aa=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'],_0x4c13aa);}}function _0x531c(_0x3be3cb,_0x2f0f35){const _0x5f2be9=_0x5f2b();return _0x531c=function(_0x531cbe,_0x550f01){_0x531cbe=_0x531cbe-0x139;let _0x567b9f=_0x5f2be9[_0x531cbe];return _0x567b9f;},_0x531c(_0x3be3cb,_0x2f0f35);}exports['Interrupt']=Interrupt;
1
+ 'use strict';(function(_0x213be5,_0x2245e6){const _0x29ad1e=_0x1ebd,_0x4e5362=_0x213be5();while(!![]){try{const _0x192e95=-parseInt(_0x29ad1e(0x1bf))/0x1*(parseInt(_0x29ad1e(0x1c1))/0x2)+parseInt(_0x29ad1e(0x1c3))/0x3*(-parseInt(_0x29ad1e(0x1bc))/0x4)+parseInt(_0x29ad1e(0x1c4))/0x5+parseInt(_0x29ad1e(0x1c0))/0x6+-parseInt(_0x29ad1e(0x1be))/0x7*(parseInt(_0x29ad1e(0x1c5))/0x8)+-parseInt(_0x29ad1e(0x1c6))/0x9*(parseInt(_0x29ad1e(0x1c2))/0xa)+parseInt(_0x29ad1e(0x1bd))/0xb;if(_0x192e95===_0x2245e6)break;else _0x4e5362['push'](_0x4e5362['shift']());}catch(_0x19accb){_0x4e5362['push'](_0x4e5362['shift']());}}}(_0x500f,0x25d2d));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Interrupt']=void 0x0;function _0x500f(){const _0x5619d7=['249156gEcvHw','1139195jYKArf','5336gVvtYu','639396ZVICAu','8xhAyIJ','2207799GAffDB','2443AVALrB','103139vTwYdW','1796682dnqcdH','2gLSZOM','10IRheko'];_0x500f=function(){return _0x5619d7;};return _0x500f();}const errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');function _0x1ebd(_0x54d36d,_0x27cdd2){const _0x500fdc=_0x500f();return _0x1ebd=function(_0x1ebddc,_0xf23fd3){_0x1ebddc=_0x1ebddc-0x1bc;let _0xed34c4=_0x500fdc[_0x1ebddc];return _0xed34c4;},_0x1ebd(_0x54d36d,_0x27cdd2);}class Interrupt extends activity_1['Activity']{constructor(_0x1fa4aa,_0x20d384,_0x51c873,_0x402123,_0x38d876,_0x4fae03){super(_0x1fa4aa,_0x20d384,_0x51c873,_0x402123,_0x38d876,_0x4fae03);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x3edf55;try{await this['verifyEntry'](),_0x3edf55=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x3edf55['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x3edf55):await this['interruptAnother'](_0x3edf55);}catch(_0x171617){if(_0x171617 instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x171617});return;}else{if(_0x171617 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x171617});return;}else{if(_0x171617 instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x171617});return;}else{if(_0x171617 instanceof errors_1['CollationError']){if(_0x171617['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',{..._0x171617});}else this['logger']['error']('interrupt-process-error',{..._0x171617});}}}_0x3edf55?.['setActivityError'](_0x171617['message']);throw _0x171617;}finally{_0x3edf55?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x1662f4){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x1ed48c=await this['interrupt']();_0x1662f4['mapActivityAttributes']();const _0x5ecab1=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x5ecab1),await this['setStatus'](-0x1,_0x5ecab1);const _0x549fe1=await _0x5ecab1['exec'](),_0x5cb95b=this['resolveStatus'](_0x549fe1);return _0x1662f4['setActivityAttributes']({'app.activity.mid':_0x1ed48c,'app.job.jss':_0x5cb95b}),this['context']['metadata']['aid'];}async['interruptAnother'](_0x3e0659){const _0x48d78b=await this['interrupt'](),_0x5ec27b={'app.activity.mid':_0x48d78b};_0x3e0659['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x33f941=this['store']['transact']();await this['setState'](_0x33f941);}const _0x147e28=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x147e28),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x147e28);const _0x596187=await _0x147e28['exec'](),_0x429c75=this['resolveStatus'](_0x596187);_0x5ec27b['app.job.jss']=_0x429c75;const _0x179d7d=await this['transition'](this['adjacencyList'],_0x429c75);return _0x179d7d['length']&&(_0x5ec27b['app.activity.mids']=_0x179d7d['join'](',')),_0x3e0659['setActivityAttributes'](_0x5ec27b),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x41d1d1=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x41d1d1==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 _0x44e263=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'],_0x44e263);}}exports['Interrupt']=Interrupt;
@@ -1 +1 @@
1
- 'use strict';(function(_0x38a4b8,_0x472a4c){const _0x8afea3=_0x54f5,_0x79acc6=_0x38a4b8();while(!![]){try{const _0x4ce81d=-parseInt(_0x8afea3(0x159))/0x1*(parseInt(_0x8afea3(0x15f))/0x2)+-parseInt(_0x8afea3(0x161))/0x3+-parseInt(_0x8afea3(0x15d))/0x4+parseInt(_0x8afea3(0x15e))/0x5+-parseInt(_0x8afea3(0x15b))/0x6*(parseInt(_0x8afea3(0x15a))/0x7)+-parseInt(_0x8afea3(0x15c))/0x8*(-parseInt(_0x8afea3(0x158))/0x9)+parseInt(_0x8afea3(0x160))/0xa;if(_0x4ce81d===_0x472a4c)break;else _0x79acc6['push'](_0x79acc6['shift']());}catch(_0x4e6e36){_0x79acc6['push'](_0x79acc6['shift']());}}}(_0x403b,0xe72bb));function _0x54f5(_0x23389f,_0xc0bd7f){const _0x403b5c=_0x403b();return _0x54f5=function(_0x54f501,_0x528278){_0x54f501=_0x54f501-0x158;let _0x3c0d45=_0x403b5c[_0x54f501];return _0x3c0d45;},_0x54f5(_0x23389f,_0xc0bd7f);}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(_0x80b766,_0x3fc434,_0x249e94,_0x3d0724,_0x260225,_0x3a69ac){super(_0x80b766,_0x3fc434,_0x249e94,_0x3d0724,_0x260225,_0x3a69ac);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x330484;try{await this['verifyEntry'](),_0x330484=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x330484['startActivitySpan'](this['leg']);const _0x588ed3=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x588ed3),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x588ed3),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x588ed3);const _0x39d853=await _0x588ed3['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x476585=this['resolveStatus'](_0x39d853),_0x21b7ab={'app.job.jss':_0x476585},_0x1c8194=await this['transition'](this['adjacencyList'],_0x476585);return _0x1c8194['length']&&(_0x21b7ab['app.activity.mids']=_0x1c8194['join'](',')),_0x330484['mapActivityAttributes'](),_0x330484['setActivityAttributes'](_0x21b7ab),this['context']['metadata']['aid'];}catch(_0x59d0e3){if(_0x59d0e3 instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x59d0e3});return;}else{if(_0x59d0e3 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x59d0e3});return;}else{if(_0x59d0e3 instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x59d0e3});return;}else{if(_0x59d0e3 instanceof errors_1['CollationError']){if(_0x59d0e3['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',{..._0x59d0e3});}else this['logger']['error']('signal-process-error',{..._0x59d0e3});}}}_0x330484?.['setActivityError'](_0x59d0e3['message']);throw _0x59d0e3;}finally{_0x330484?.['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 _0x283843=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x283843['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x22c1dd=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x22c1dd['mapRules']();}}async['hookOne'](){const _0x216fdc=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x24d85e=this['mapSignalData'](),_0x2608f9=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x1631e4=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x216fdc,_0x24d85e,_0x2608f9,_0x1631e4);}async['hookAll'](){const _0x184486=this['mapSignalData'](),_0x2b911a=this['mapResolverData']();this['config']['scrub']&&(_0x2b911a['scrub']=!![]);const _0x10d806=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x75ae50=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0xa5b785=[_0x10d806+':'+_0x75ae50];return await this['engine']['hookAll'](this['config']['topic'],_0x184486,_0x2b911a,_0xa5b785);}}function _0x403b(){const _0x1c8811=['1814ZljhMC','329afggfy','222126CRXKMi','32tRxahI','3514620WNLVnH','2502450PkojTx','1658PZGQtG','47199750mCKntI','3227910gkzQhW','2080863xZyOvD'];_0x403b=function(){return _0x1c8811;};return _0x403b();}exports['Signal']=Signal;
1
+ 'use strict';(function(_0xa06b69,_0xaae9a3){const _0x4e6113=_0x2a9f,_0x2df9be=_0xa06b69();while(!![]){try{const _0x1bc0f3=parseInt(_0x4e6113(0x193))/0x1*(-parseInt(_0x4e6113(0x199))/0x2)+parseInt(_0x4e6113(0x198))/0x3+parseInt(_0x4e6113(0x196))/0x4+parseInt(_0x4e6113(0x194))/0x5+-parseInt(_0x4e6113(0x19a))/0x6+-parseInt(_0x4e6113(0x195))/0x7*(parseInt(_0x4e6113(0x197))/0x8)+-parseInt(_0x4e6113(0x192))/0x9;if(_0x1bc0f3===_0xaae9a3)break;else _0x2df9be['push'](_0x2df9be['shift']());}catch(_0x4eb1ab){_0x2df9be['push'](_0x2df9be['shift']());}}}(_0x1cc6,0xec62e));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(_0x35e329,_0x4f1659,_0x47fbbc,_0x9161ac,_0x24fdab,_0x32a473){super(_0x35e329,_0x4f1659,_0x47fbbc,_0x9161ac,_0x24fdab,_0x32a473);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x819929;try{await this['verifyEntry'](),_0x819929=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x819929['startActivitySpan'](this['leg']);const _0x5b63f2=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x5b63f2),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x5b63f2),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x5b63f2);const _0x2c4fb6=await _0x5b63f2['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x344167=this['resolveStatus'](_0x2c4fb6),_0x3685ba={'app.job.jss':_0x344167},_0x487617=await this['transition'](this['adjacencyList'],_0x344167);return _0x487617['length']&&(_0x3685ba['app.activity.mids']=_0x487617['join'](',')),_0x819929['mapActivityAttributes'](),_0x819929['setActivityAttributes'](_0x3685ba),this['context']['metadata']['aid'];}catch(_0x2e7437){if(_0x2e7437 instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x2e7437});return;}else{if(_0x2e7437 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x2e7437});return;}else{if(_0x2e7437 instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x2e7437});return;}else{if(_0x2e7437 instanceof errors_1['CollationError']){if(_0x2e7437['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',{..._0x2e7437});}else this['logger']['error']('signal-process-error',{..._0x2e7437});}}}_0x819929?.['setActivityError'](_0x2e7437['message']);throw _0x2e7437;}finally{_0x819929?.['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 _0x3cd333=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x3cd333['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x5e3275=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x5e3275['mapRules']();}}async['hookOne'](){const _0x910972=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x33b753=this['mapSignalData'](),_0x1b087a=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x5ae2d6=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x910972,_0x33b753,_0x1b087a,_0x5ae2d6);}async['hookAll'](){const _0x4b5d43=this['mapSignalData'](),_0x12e385=this['mapResolverData']();this['config']['scrub']&&(_0x12e385['scrub']=!![]);const _0x355f5e=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x3c5801=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x3c91f6=[_0x355f5e+':'+_0x3c5801];return await this['engine']['hookAll'](this['config']['topic'],_0x4b5d43,_0x12e385,_0x3c91f6);}}exports['Signal']=Signal;function _0x2a9f(_0x56a325,_0x53b830){const _0x1cc6ac=_0x1cc6();return _0x2a9f=function(_0x2a9f0a,_0x3e2d91){_0x2a9f0a=_0x2a9f0a-0x192;let _0x1d22ad=_0x1cc6ac[_0x2a9f0a];return _0x1d22ad;},_0x2a9f(_0x56a325,_0x53b830);}function _0x1cc6(){const _0x3f8485=['726388aJgGyb','6037338AuOIZj','10845459xkHXfC','2RNSVIu','7809080XXCuHU','3654LmxGpn','7430876KLjZpN','256cQOnnf','1509207hqKIao'];_0x1cc6=function(){return _0x3f8485;};return _0x1cc6();}
@@ -1 +1 @@
1
- 'use strict';function _0x3d12(_0x5a5435,_0x15a0d2){const _0x256fa6=_0x256f();return _0x3d12=function(_0x3d125b,_0x4aa011){_0x3d125b=_0x3d125b-0x174;let _0x56f08d=_0x256fa6[_0x3d125b];return _0x56f08d;},_0x3d12(_0x5a5435,_0x15a0d2);}(function(_0x199730,_0x262514){const _0x45ee0a=_0x3d12,_0x5ebc9f=_0x199730();while(!![]){try{const _0x2b1918=-parseInt(_0x45ee0a(0x174))/0x1+parseInt(_0x45ee0a(0x179))/0x2+parseInt(_0x45ee0a(0x177))/0x3*(-parseInt(_0x45ee0a(0x178))/0x4)+parseInt(_0x45ee0a(0x175))/0x5*(parseInt(_0x45ee0a(0x17b))/0x6)+-parseInt(_0x45ee0a(0x17c))/0x7+-parseInt(_0x45ee0a(0x176))/0x8+parseInt(_0x45ee0a(0x17a))/0x9;if(_0x2b1918===_0x262514)break;else _0x5ebc9f['push'](_0x5ebc9f['shift']());}catch(_0x476bdf){_0x5ebc9f['push'](_0x5ebc9f['shift']());}}}(_0x256f,0x57dad));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(_0x5a7323,_0x5bc8ca,_0x151e4f,_0x507458,_0x4e7e00,_0x34bd0d){super(_0x5a7323,_0x5bc8ca,_0x151e4f,_0x507458,_0x4e7e00,_0x34bd0d);}async['process'](_0x464b81){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x5ccd36;try{this['setLeg'](0x2),await this['getState'](),_0x5ccd36=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5ccd36['startJobSpan'](),_0x5ccd36['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x4a53a8=this['initStatus'](_0x464b81,this['adjacencyList']['length']);await this['setStateNX'](_0x4a53a8),await this['setStatus'](_0x4a53a8),this['bindSearchData'](_0x464b81),this['bindMarkerData'](_0x464b81);const _0x4b4949=this['store']['transact']();await this['setState'](_0x4b4949),await this['setStats'](_0x4b4949);_0x464b81?.['pending']&&await this['setExpired'](_0x464b81?.['pending'],_0x4b4949);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x4b4949),await _0x4b4949['exec'](),this['execAdjacentParent'](),_0x5ccd36['mapActivityAttributes']();const _0x1c9b3d=Number(this['context']['metadata']['js']);_0x5ccd36['setJobAttributes']({'app.job.jss':_0x1c9b3d});const _0x4e0929={'app.job.jss':_0x1c9b3d};return await this['transitionAndLogAdjacent'](_0x464b81,_0x1c9b3d,_0x4e0929),_0x5ccd36['setActivityAttributes'](_0x4e0929),this['context']['metadata']['jid'];}catch(_0x276230){_0x5ccd36?.['setActivityError'](_0x276230['message']);if(_0x276230 instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x55e7bf=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x55e7bf){this['logger']['info']('trigger-collation-overage',{'job_id':_0x276230['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0x276230['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0x276230});throw _0x276230;}finally{_0x5ccd36?.['endJobSpan'](),_0x5ccd36?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x1bfa89={},_0x38fb69,_0x25fd13){if(isNaN(_0x1bfa89['pending'])){const _0x55de60=await this['transition'](this['adjacencyList'],_0x38fb69);_0x55de60['length']&&(_0x25fd13['app.activity.mids']=_0x55de60['join'](','));}}['initStatus'](_0x1eff89={},_0x3ace4f){if(_0x1eff89['pending'])return-0x1;return _0x3ace4f;}async['setExpired'](_0xf0632c,_0x5376b8){await this['store']['expireJob'](this['context']['metadata']['jid'],_0xf0632c,_0x5376b8);}['safeKey'](_0x222230){return'_'+_0x222230;}['bindSearchData'](_0x3c1875){_0x3c1875?.['search']&&Object['keys'](_0x3c1875['search'])['forEach'](_0x1db4ca=>{this['context']['data'][this['safeKey'](_0x1db4ca)]=_0x3c1875['search'][_0x1db4ca]['toString']();});}['bindMarkerData'](_0x5de9fe){_0x5de9fe?.['marker']&&Object['keys'](_0x5de9fe['marker'])['forEach'](_0xb4aa9b=>{_0xb4aa9b['startsWith']('-')&&(this['context']['data'][_0xb4aa9b]=_0x5de9fe['marker'][_0xb4aa9b]['toString']());});}async['setStatus'](_0x282c31){this['context']['metadata']['js']=_0x282c31;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x4a03ac=(0x0,utils_1['formatISODate'])(new Date()),_0x2b5768={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x4a03ac,'ju':_0x4a03ac}};await this['engine']['execAdjacentParent'](this['context'],_0x2b5768);}}['createInputContext'](){const _0x4289e7={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x4289e7;}async['getState'](){const _0x88277a=this['createInputContext'](),_0x21fc56=this['resolveJobId'](_0x88277a),_0x33abe6=this['resolveJobKey'](_0x88277a),_0x43b4df=(0x0,utils_1['formatISODate'])(new Date()),{id:_0x5e5cde,version:_0x3923c2}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0x122c2e={...this['metadata'],'jid':_0x21fc56,'key':_0x33abe6,'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':_0x5e5cde,'vrs':_0x3923c2,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0x21fc56,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x33abe6,'jc':_0x43b4df,'ju':_0x43b4df,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0x122c2e},'output':{'data':this['data'],'metadata':_0x122c2e},'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'](_0x39e4fb=>'metadata/'+_0x39e4fb);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0x12b6ca=>'output/metadata/'+_0x12b6ca);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x305387){const _0x5ab734=this['config']['stats']?.['id'];return _0x5ab734?pipe_1['Pipe']['resolve'](_0x5ab734,_0x305387):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x4cb6a9){const _0x58742e=this['config']['stats']?.['key'];return _0x58742e?pipe_1['Pipe']['resolve'](_0x58742e,_0x4cb6a9):'';}async['setStateNX'](_0x1262d6){const _0x66fe6=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x66fe6,this['engine']['appId'],_0x1262d6))throw new errors_1['DuplicateJobError'](_0x66fe6);}async['setStats'](_0x12069e){const _0x35301e=this['context']['metadata'];if(_0x35301e['key']&&this['config']['stats']?.['measures']){const _0x551815=await this['engine']['getVID'](),_0x2a8d03=new reporter_1['ReporterService'](_0x551815,this['store'],this['logger']);await this['store']['setStats'](_0x35301e['key'],_0x35301e['jid'],_0x35301e['ts'],_0x2a8d03['resolveTriggerStatistics'](this['config'],this['context']),_0x551815,_0x12069e);}}}exports['Trigger']=Trigger;function _0x256f(){const _0x18587d=['2490285RgYWoj','484093bzvEZS','25945JeMjAc','1592264mikxed','10458yNSymf','644rHucJA','1285876wTSmCD','10405647UfkLKT','186joDLpL'];_0x256f=function(){return _0x18587d;};return _0x256f();}
1
+ 'use strict';function _0x2c95(_0x5d88ef,_0xf79c4c){const _0x4def77=_0x4def();return _0x2c95=function(_0x2c955e,_0x541404){_0x2c955e=_0x2c955e-0x185;let _0x581f37=_0x4def77[_0x2c955e];return _0x581f37;},_0x2c95(_0x5d88ef,_0xf79c4c);}(function(_0x40f5dc,_0x1e1029){const _0x4354f2=_0x2c95,_0x3e307c=_0x40f5dc();while(!![]){try{const _0x12810c=-parseInt(_0x4354f2(0x187))/0x1*(parseInt(_0x4354f2(0x18f))/0x2)+parseInt(_0x4354f2(0x18d))/0x3*(-parseInt(_0x4354f2(0x188))/0x4)+parseInt(_0x4354f2(0x18e))/0x5+-parseInt(_0x4354f2(0x190))/0x6+parseInt(_0x4354f2(0x185))/0x7*(-parseInt(_0x4354f2(0x18c))/0x8)+-parseInt(_0x4354f2(0x18a))/0x9*(parseInt(_0x4354f2(0x189))/0xa)+parseInt(_0x4354f2(0x18b))/0xb*(parseInt(_0x4354f2(0x186))/0xc);if(_0x12810c===_0x1e1029)break;else _0x3e307c['push'](_0x3e307c['shift']());}catch(_0x4ed9d7){_0x3e307c['push'](_0x3e307c['shift']());}}}(_0x4def,0xb24d5));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Trigger']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),reporter_1=require('../reporter'),serializer_1=require('../serializer'),telemetry_1=require('../telemetry'),activity_1=require('./activity');function _0x4def(){const _0x5f58e7=['272hjsJFh','3270ehQAKX','996270vyuNqe','14lxNiwv','7372956NXhLAW','31570naHoAU','48EKzVAE','157711oUVjKV','2376MaRkGN','1810430xLqnvn','18qCNcVc','11073590rtpjDp'];_0x4def=function(){return _0x5f58e7;};return _0x4def();}class Trigger extends activity_1['Activity']{constructor(_0x405466,_0x5e453f,_0x2d3e0e,_0x5d87ad,_0x3a4f1a,_0x14e712){super(_0x405466,_0x5e453f,_0x2d3e0e,_0x5d87ad,_0x3a4f1a,_0x14e712);}async['process'](_0x409a6a){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x201048;try{this['setLeg'](0x2),await this['getState'](),_0x201048=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x201048['startJobSpan'](),_0x201048['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x34a28b=this['initStatus'](_0x409a6a,this['adjacencyList']['length']);await this['setStateNX'](_0x34a28b),await this['setStatus'](_0x34a28b),this['bindSearchData'](_0x409a6a),this['bindMarkerData'](_0x409a6a);const _0x1774a4=this['store']['transact']();await this['setState'](_0x1774a4),await this['setStats'](_0x1774a4);_0x409a6a?.['pending']&&await this['setExpired'](_0x409a6a?.['pending'],_0x1774a4);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x1774a4),await _0x1774a4['exec'](),this['execAdjacentParent'](),_0x201048['mapActivityAttributes']();const _0x1fe53d=Number(this['context']['metadata']['js']);_0x201048['setJobAttributes']({'app.job.jss':_0x1fe53d});const _0x4a6eb2={'app.job.jss':_0x1fe53d};return await this['transitionAndLogAdjacent'](_0x409a6a,_0x1fe53d,_0x4a6eb2),_0x201048['setActivityAttributes'](_0x4a6eb2),this['context']['metadata']['jid'];}catch(_0x4e74a1){_0x201048?.['setActivityError'](_0x4e74a1['message']);if(_0x4e74a1 instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x2de064=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x2de064){this['logger']['info']('trigger-collation-overage',{'job_id':_0x4e74a1['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0x4e74a1['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0x4e74a1});throw _0x4e74a1;}finally{_0x201048?.['endJobSpan'](),_0x201048?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x2fedc6={},_0x5d0b30,_0x218953){if(isNaN(_0x2fedc6['pending'])){const _0x4d64fd=await this['transition'](this['adjacencyList'],_0x5d0b30);_0x4d64fd['length']&&(_0x218953['app.activity.mids']=_0x4d64fd['join'](','));}}['initStatus'](_0x399676={},_0x50d490){if(_0x399676['pending'])return-0x1;return _0x50d490;}async['setExpired'](_0x58776f,_0x290788){await this['store']['expireJob'](this['context']['metadata']['jid'],_0x58776f,_0x290788);}['safeKey'](_0x460c95){return'_'+_0x460c95;}['bindSearchData'](_0x5d85b8){_0x5d85b8?.['search']&&Object['keys'](_0x5d85b8['search'])['forEach'](_0x3e728c=>{this['context']['data'][this['safeKey'](_0x3e728c)]=_0x5d85b8['search'][_0x3e728c]['toString']();});}['bindMarkerData'](_0x312ef8){_0x312ef8?.['marker']&&Object['keys'](_0x312ef8['marker'])['forEach'](_0x5151f6=>{_0x5151f6['startsWith']('-')&&(this['context']['data'][_0x5151f6]=_0x312ef8['marker'][_0x5151f6]['toString']());});}async['setStatus'](_0x2e6a36){this['context']['metadata']['js']=_0x2e6a36;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x3fa34a=(0x0,utils_1['formatISODate'])(new Date()),_0x538a1f={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x3fa34a,'ju':_0x3fa34a}};await this['engine']['execAdjacentParent'](this['context'],_0x538a1f);}}['createInputContext'](){const _0x10d697={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x10d697;}async['getState'](){const _0x486fcb=this['createInputContext'](),_0x10a028=this['resolveJobId'](_0x486fcb),_0x334b2d=this['resolveJobKey'](_0x486fcb),_0x1b1f2d=(0x0,utils_1['formatISODate'])(new Date()),{id:_0x222e9a,version:_0x45f060}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0x3b4a48={...this['metadata'],'jid':_0x10a028,'key':_0x334b2d,'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':_0x222e9a,'vrs':_0x45f060,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0x10a028,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x334b2d,'jc':_0x1b1f2d,'ju':_0x1b1f2d,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0x3b4a48},'output':{'data':this['data'],'metadata':_0x3b4a48},'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'](_0x494f19=>'metadata/'+_0x494f19);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0x5e7e68=>'output/metadata/'+_0x5e7e68);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x1e1174){const _0x35b436=this['config']['stats']?.['id'];return _0x35b436?pipe_1['Pipe']['resolve'](_0x35b436,_0x1e1174):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x534aa3){const _0x131bcf=this['config']['stats']?.['key'];return _0x131bcf?pipe_1['Pipe']['resolve'](_0x131bcf,_0x534aa3):'';}async['setStateNX'](_0x37618b){const _0x36d91e=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x36d91e,this['engine']['appId'],_0x37618b))throw new errors_1['DuplicateJobError'](_0x36d91e);}async['setStats'](_0x535739){const _0x411bb5=this['context']['metadata'];if(_0x411bb5['key']&&this['config']['stats']?.['measures']){const _0x583600=await this['engine']['getVID'](),_0x2f7633=new reporter_1['ReporterService'](_0x583600,this['store'],this['logger']);await this['store']['setStats'](_0x411bb5['key'],_0x411bb5['jid'],_0x411bb5['ts'],_0x2f7633['resolveTriggerStatistics'](this['config'],this['context']),_0x583600,_0x535739);}}}exports['Trigger']=Trigger;