@hotmeshio/hotmesh 0.3.16 → 0.3.18

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 (66) hide show
  1. package/README.md +10 -5
  2. package/build/modules/key.js +1 -1
  3. package/build/modules/utils.js +1 -1
  4. package/build/package.json +3 -6
  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/engine/index.js +1 -1
  19. package/build/services/exporter/index.js +1 -1
  20. package/build/services/mapper/index.js +1 -1
  21. package/build/services/meshflow/exporter.js +1 -1
  22. package/build/services/pipe/functions/array.js +1 -1
  23. package/build/services/pipe/functions/bitwise.js +1 -1
  24. package/build/services/pipe/functions/conditional.js +1 -1
  25. package/build/services/pipe/functions/cron.js +1 -1
  26. package/build/services/pipe/functions/date.js +1 -1
  27. package/build/services/pipe/functions/index.js +1 -1
  28. package/build/services/pipe/functions/json.js +1 -1
  29. package/build/services/pipe/functions/logical.js +1 -1
  30. package/build/services/pipe/functions/math.js +1 -1
  31. package/build/services/pipe/functions/number.js +1 -1
  32. package/build/services/pipe/functions/object.js +1 -1
  33. package/build/services/pipe/functions/string.js +1 -1
  34. package/build/services/pipe/functions/symbol.js +1 -1
  35. package/build/services/pipe/functions/unary.js +1 -1
  36. package/build/services/pipe/index.js +1 -1
  37. package/build/services/quorum/index.js +1 -1
  38. package/build/services/reporter/index.js +1 -1
  39. package/build/services/router/index.js +1 -1
  40. package/build/services/search/providers/postgres/postgres.js +1 -1
  41. package/build/services/search/providers/redis/ioredis.js +1 -1
  42. package/build/services/search/providers/redis/redis.js +1 -1
  43. package/build/services/serializer/index.js +1 -1
  44. package/build/services/store/providers/postgres/kvsql.js +1 -1
  45. package/build/services/store/providers/postgres/kvtables.js +1 -1
  46. package/build/services/store/providers/postgres/kvtransaction.js +1 -1
  47. package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
  48. package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
  49. package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
  50. package/build/services/store/providers/postgres/kvtypes/zset.js +1 -1
  51. package/build/services/store/providers/postgres/postgres.js +1 -1
  52. package/build/services/store/providers/redis/_base.js +1 -1
  53. package/build/services/store/providers/redis/ioredis.js +1 -1
  54. package/build/services/store/providers/redis/redis.js +1 -1
  55. package/build/services/store/providers/store-initializable.js +1 -1
  56. package/build/services/stream/providers/nats/nats.js +1 -1
  57. package/build/services/stream/providers/postgres/postgres.js +1 -1
  58. package/build/services/stream/providers/redis/ioredis.js +1 -1
  59. package/build/services/stream/providers/redis/redis.js +1 -1
  60. package/build/services/stream/providers/stream-initializable.js +1 -1
  61. package/build/services/sub/providers/redis/ioredis.js +1 -1
  62. package/build/services/sub/providers/redis/redis.js +1 -1
  63. package/build/services/task/index.js +1 -1
  64. package/build/services/telemetry/index.js +1 -1
  65. package/build/services/worker/index.js +1 -1
  66. package/package.json +3 -6
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # HotMesh
2
2
  ![beta release](https://img.shields.io/badge/release-beta-blue.svg)
3
3
 
4
- **HotMesh** offers the power of Temporal.io in a fully serverless architecture.
4
+ **HotMesh** offers the power of [Temporal.io](https://temporal.io) in a fully serverless architecture.
5
5
 
6
6
 
7
7
  <br/>
@@ -9,10 +9,9 @@
9
9
  ## Features
10
10
 
11
11
  - **Serverless Orchestration**: Orchestrate your microservices without adding infrastructure.
12
- - **BYODB**: Bring your own database, and avoid lockin. Choose *Postgres* or *Redis*.
13
- - **Decentralized Execution**: Centralized persistence with decentralized execution.
12
+ - **No Vendor Lock-in**: Use your preferred database: *Postgres*, *Redis*, ...
14
13
  - **Linear Scalability**: Scale your database to scale your application.
15
- - **Process Analytics**: Gain process insights with real-time analytics.
14
+ - **Process Analytics**: Gain process insights with optional analytics.
16
15
 
17
16
 
18
17
  <br/>
@@ -526,7 +525,7 @@ This example calls an activity and then sleeps for a week. It runs indefinitely
526
525
  <br/>
527
526
 
528
527
  ## MeshData | Transactional Analytics
529
- [MeshData](https://hotmeshio.github.io/sdk-typescript/classes/services_meshdata.MeshData.html) extends the **MeshFlow** service, surfacing transactional workflows as searchable data records.
528
+ [MeshData](https://hotmeshio.github.io/sdk-typescript/classes/services_meshdata.MeshData.html) adds analytics to your workflows.
530
529
 
531
530
  <details style="padding: .5em">
532
531
  <summary style="font-size:1.25em;">Create a search index <small>[more]</small></summary>
@@ -725,3 +724,9 @@ Refer to the [hotmeshio/temporal-patterns-typescript](https://github.com/hotmesh
725
724
 
726
725
  ## Advanced
727
726
  The theory that underlies the architecture is applicable to any number of data storage and streaming backends: [A Message-Oriented Approach to Decentralized Process Orchestration](https://zenodo.org/records/12168558).
727
+
728
+ <br/>
729
+
730
+ ## Disclaimer
731
+
732
+ This project is not affiliated with, endorsed by, or sponsored by Temporal Technologies, Inc. Temporal is a trademark of Temporal Technologies, Inc., and all references to Temporal and related technologies are for educational and demonstration purposes only.
@@ -1 +1 @@
1
- 'use strict';(function(_0x29bb14,_0x21925d){const _0x3647f4=_0x151e,_0xf45515=_0x29bb14();while(!![]){try{const _0x463fa0=parseInt(_0x3647f4(0x1d4))/0x1*(-parseInt(_0x3647f4(0x1d2))/0x2)+parseInt(_0x3647f4(0x1d3))/0x3*(-parseInt(_0x3647f4(0x1cd))/0x4)+-parseInt(_0x3647f4(0x1d0))/0x5+parseInt(_0x3647f4(0x1ca))/0x6*(parseInt(_0x3647f4(0x1d1))/0x7)+-parseInt(_0x3647f4(0x1c9))/0x8*(-parseInt(_0x3647f4(0x1cb))/0x9)+-parseInt(_0x3647f4(0x1cf))/0xa*(parseInt(_0x3647f4(0x1ce))/0xb)+parseInt(_0x3647f4(0x1cc))/0xc;if(_0x463fa0===_0x21925d)break;else _0xf45515['push'](_0xf45515['shift']());}catch(_0x39c202){_0xf45515['push'](_0xf45515['shift']());}}}(_0x92fa,0x6cee7));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['VALSEP']=exports['WEBSEP']=exports['TYPSEP']=exports['KEYSEP']=exports['HMNS']=exports['KeyType']=exports['KeyService']=void 0x0;const hotmesh_1=require('../types/hotmesh');function _0x151e(_0x12bcbd,_0x7cc2b8){const _0x92fa1c=_0x92fa();return _0x151e=function(_0x151e6b,_0x1aab9a){_0x151e6b=_0x151e6b-0x1c9;let _0x1d3957=_0x92fa1c[_0x151e6b];return _0x1d3957;},_0x151e(_0x12bcbd,_0x7cc2b8);}Object['defineProperty'](exports,'KeyType',{'enumerable':!![],'get':function(){return hotmesh_1['KeyType'];}});const HMNS='hmsh';exports['HMNS']=HMNS;const KEYSEP=':';function _0x92fa(){const _0x3914b6=['6832600IILaeT','1215085zVsHig','21PTuWLF','1152362CAsIOL','3564LpjbZo','1gsnLjG','144472eGiDhs','1477716iqXHYb','45EOCQzo','17653632hUlOgN','1184CumJOo','11pOikvb'];_0x92fa=function(){return _0x3914b6;};return _0x92fa();}exports['KEYSEP']=KEYSEP;const VALSEP='::';exports['VALSEP']=VALSEP;const WEBSEP='::';exports['WEBSEP']=WEBSEP;const TYPSEP='::';exports['TYPSEP']=TYPSEP;class KeyService{static['mintKey'](_0x44dbf8,_0x2661fb,_0x43bcf6){switch(_0x2661fb){case hotmesh_1['KeyType']['HOTMESH']:return _0x44dbf8;case hotmesh_1['KeyType']['THROTTLE_RATE']:return _0x44dbf8+':'+_0x43bcf6['appId']+':r:';case hotmesh_1['KeyType']['WORK_ITEMS']:return _0x44dbf8+':'+_0x43bcf6['appId']+':w:'+(_0x43bcf6['scoutType']||'');case hotmesh_1['KeyType']['TIME_RANGE']:return _0x44dbf8+':'+_0x43bcf6['appId']+':t:'+(_0x43bcf6['timeValue']||'');case hotmesh_1['KeyType']['APP']:return _0x44dbf8+':a:'+(_0x43bcf6['appId']||'');case hotmesh_1['KeyType']['QUORUM']:return _0x44dbf8+':'+_0x43bcf6['appId']+':q:'+(_0x43bcf6['engineId']||'');case hotmesh_1['KeyType']['JOB_STATE']:return _0x44dbf8+':'+_0x43bcf6['appId']+':j:'+_0x43bcf6['jobId'];case hotmesh_1['KeyType']['JOB_DEPENDENTS']:return _0x44dbf8+':'+_0x43bcf6['appId']+':d:'+_0x43bcf6['jobId'];case hotmesh_1['KeyType']['JOB_STATS_GENERAL']:return _0x44dbf8+':'+_0x43bcf6['appId']+':s:'+_0x43bcf6['jobKey']+':'+_0x43bcf6['dateTime'];case hotmesh_1['KeyType']['JOB_STATS_MEDIAN']:return _0x44dbf8+':'+_0x43bcf6['appId']+':s:'+_0x43bcf6['jobKey']+':'+_0x43bcf6['dateTime']+':'+_0x43bcf6['facet'];case hotmesh_1['KeyType']['JOB_STATS_INDEX']:return _0x44dbf8+':'+_0x43bcf6['appId']+':s:'+_0x43bcf6['jobKey']+':'+_0x43bcf6['dateTime']+':'+_0x43bcf6['facet'];case hotmesh_1['KeyType']['SCHEMAS']:return _0x44dbf8+':'+_0x43bcf6['appId']+':v:'+_0x43bcf6['appVersion']+':schemas';case hotmesh_1['KeyType']['SUBSCRIPTIONS']:return _0x44dbf8+':'+_0x43bcf6['appId']+':v:'+_0x43bcf6['appVersion']+':subscriptions';case hotmesh_1['KeyType']['SUBSCRIPTION_PATTERNS']:return _0x44dbf8+':'+_0x43bcf6['appId']+':v:'+_0x43bcf6['appVersion']+':transitions';case hotmesh_1['KeyType']['HOOKS']:return _0x44dbf8+':'+_0x43bcf6['appId']+':hooks';case hotmesh_1['KeyType']['SIGNALS']:return _0x44dbf8+':'+_0x43bcf6['appId']+':signals';case hotmesh_1['KeyType']['SYMKEYS']:return _0x44dbf8+':'+_0x43bcf6['appId']+':sym:keys:'+(_0x43bcf6['activityId']||'');case hotmesh_1['KeyType']['SYMVALS']:return _0x44dbf8+':'+_0x43bcf6['appId']+':sym:vals:';case hotmesh_1['KeyType']['STREAMS']:return _0x44dbf8+':'+(_0x43bcf6['appId']||'')+':x:'+(_0x43bcf6['topic']||'');default:throw new Error('Invalid\x20key\x20type.');}}static['parseKey'](_0x438124){const [_0x1c12fc,_0x32b252,_0x1b5401,..._0x22b4f0]=_0x438124['split'](KEYSEP),_0x51737a=_0x22b4f0['join'](KEYSEP)||'';return{'namespace':_0x1c12fc,'app':_0x1b5401==='a'?_0x32b252:undefined,'entity':_0x1b5401,'id':_0x51737a};}static['reconstituteKey'](_0x2fa318){const {namespace:_0x5db64f,app:_0x52bf7a,entity:_0x1f73b2,id:_0x3a454f}=_0x2fa318;return''+_0x5db64f+KEYSEP+_0x52bf7a+KEYSEP+_0x1f73b2+KEYSEP+(_0x3a454f||'');}static['resolveEntityType'](_0x4e9dbf,_0x2eb091=''){switch(_0x4e9dbf){case'a':return'applications';case'r':return'throttles';case'w':return _0x2eb091===''?'task_priorities':'roles';case't':return _0x2eb091===''?'task_schedules':'task_lists';case'q':return'events';case'j':return'jobs';case's':return'stats';case'v':return'versions';case'x':return _0x2eb091===''?'streams':'stream_topics';case'hooks':return'signal_patterns';case'signals':return'signal_registry';case'sym':return'symbols';default:return'unknown_entity';}}static['resolveAbbreviation'](_0x10a586){switch(_0x10a586){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(_0x159f20,_0x2fe477){const _0x132eee=_0x4f35,_0x38ec67=_0x159f20();while(!![]){try{const _0x544ba6=parseInt(_0x132eee(0xb5))/0x1+-parseInt(_0x132eee(0xb2))/0x2+parseInt(_0x132eee(0xb7))/0x3+parseInt(_0x132eee(0xb9))/0x4*(parseInt(_0x132eee(0xb6))/0x5)+-parseInt(_0x132eee(0xb4))/0x6*(parseInt(_0x132eee(0xb8))/0x7)+parseInt(_0x132eee(0xb1))/0x8+parseInt(_0x132eee(0xb3))/0x9;if(_0x544ba6===_0x2fe477)break;else _0x38ec67['push'](_0x38ec67['shift']());}catch(_0xab2d32){_0x38ec67['push'](_0x38ec67['shift']());}}}(_0x368b,0x33906));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['VALSEP']=exports['WEBSEP']=exports['TYPSEP']=exports['KEYSEP']=exports['HMNS']=exports['KeyType']=exports['KeyService']=void 0x0;const hotmesh_1=require('../types/hotmesh');Object['defineProperty'](exports,'KeyType',{'enumerable':!![],'get':function(){return hotmesh_1['KeyType'];}});const HMNS='hmsh';exports['HMNS']=HMNS;const KEYSEP=':';exports['KEYSEP']=KEYSEP;const VALSEP='::';exports['VALSEP']=VALSEP;const WEBSEP='::';exports['WEBSEP']=WEBSEP;const TYPSEP='::';exports['TYPSEP']=TYPSEP;class KeyService{static['mintKey'](_0x331bdf,_0x554323,_0x26a4bc){switch(_0x554323){case hotmesh_1['KeyType']['HOTMESH']:return _0x331bdf;case hotmesh_1['KeyType']['THROTTLE_RATE']:return _0x331bdf+':'+_0x26a4bc['appId']+':r:';case hotmesh_1['KeyType']['WORK_ITEMS']:return _0x331bdf+':'+_0x26a4bc['appId']+':w:'+(_0x26a4bc['scoutType']||'');case hotmesh_1['KeyType']['TIME_RANGE']:return _0x331bdf+':'+_0x26a4bc['appId']+':t:'+(_0x26a4bc['timeValue']||'');case hotmesh_1['KeyType']['APP']:return _0x331bdf+':a:'+(_0x26a4bc['appId']||'');case hotmesh_1['KeyType']['QUORUM']:return _0x331bdf+':'+_0x26a4bc['appId']+':q:'+(_0x26a4bc['engineId']||'');case hotmesh_1['KeyType']['JOB_STATE']:return _0x331bdf+':'+_0x26a4bc['appId']+':j:'+_0x26a4bc['jobId'];case hotmesh_1['KeyType']['JOB_DEPENDENTS']:return _0x331bdf+':'+_0x26a4bc['appId']+':d:'+_0x26a4bc['jobId'];case hotmesh_1['KeyType']['JOB_STATS_GENERAL']:return _0x331bdf+':'+_0x26a4bc['appId']+':s:'+_0x26a4bc['jobKey']+':'+_0x26a4bc['dateTime'];case hotmesh_1['KeyType']['JOB_STATS_MEDIAN']:return _0x331bdf+':'+_0x26a4bc['appId']+':s:'+_0x26a4bc['jobKey']+':'+_0x26a4bc['dateTime']+':'+_0x26a4bc['facet'];case hotmesh_1['KeyType']['JOB_STATS_INDEX']:return _0x331bdf+':'+_0x26a4bc['appId']+':s:'+_0x26a4bc['jobKey']+':'+_0x26a4bc['dateTime']+':'+_0x26a4bc['facet'];case hotmesh_1['KeyType']['SCHEMAS']:return _0x331bdf+':'+_0x26a4bc['appId']+':v:'+_0x26a4bc['appVersion']+':schemas';case hotmesh_1['KeyType']['SUBSCRIPTIONS']:return _0x331bdf+':'+_0x26a4bc['appId']+':v:'+_0x26a4bc['appVersion']+':subscriptions';case hotmesh_1['KeyType']['SUBSCRIPTION_PATTERNS']:return _0x331bdf+':'+_0x26a4bc['appId']+':v:'+_0x26a4bc['appVersion']+':transitions';case hotmesh_1['KeyType']['HOOKS']:return _0x331bdf+':'+_0x26a4bc['appId']+':hooks';case hotmesh_1['KeyType']['SIGNALS']:return _0x331bdf+':'+_0x26a4bc['appId']+':signals';case hotmesh_1['KeyType']['SYMKEYS']:return _0x331bdf+':'+_0x26a4bc['appId']+':sym:keys:'+(_0x26a4bc['activityId']||'');case hotmesh_1['KeyType']['SYMVALS']:return _0x331bdf+':'+_0x26a4bc['appId']+':sym:vals:';case hotmesh_1['KeyType']['STREAMS']:return _0x331bdf+':'+(_0x26a4bc['appId']||'')+':x:'+(_0x26a4bc['topic']||'');default:throw new Error('Invalid\x20key\x20type.');}}static['parseKey'](_0x2d3490){const [_0x3fc06c,_0x564357,_0x189958,..._0x1eff6e]=_0x2d3490['split'](KEYSEP),_0x21e22e=_0x1eff6e['join'](KEYSEP)||'';return{'namespace':_0x3fc06c,'app':_0x189958==='a'?_0x564357:undefined,'entity':_0x189958,'id':_0x21e22e};}static['reconstituteKey'](_0x5e3511){const {namespace:_0x87bef0,app:_0xcafe04,entity:_0x42127e,id:_0x194900}=_0x5e3511;return''+_0x87bef0+KEYSEP+_0xcafe04+KEYSEP+_0x42127e+KEYSEP+(_0x194900||'');}static['resolveEntityType'](_0x45db7d,_0x239237=''){switch(_0x45db7d){case'a':return'applications';case'r':return'throttles';case'w':return _0x239237===''?'task_priorities':'roles';case't':return _0x239237===''?'task_schedules':'task_lists';case'q':return'events';case'j':return'jobs';case's':return'stats';case'v':return'versions';case'x':return _0x239237===''?'streams':'stream_topics';case'hooks':return'signal_patterns';case'signals':return'signal_registry';case'sym':return'symbols';default:return'unknown_entity';}}static['resolveAbbreviation'](_0x1b2a43){switch(_0x1b2a43){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';}}}function _0x4f35(_0x18a1aa,_0x15040d){const _0x368bcb=_0x368b();return _0x4f35=function(_0x4f3578,_0x4346d3){_0x4f3578=_0x4f3578-0xb1;let _0x59fd71=_0x368bcb[_0x4f3578];return _0x59fd71;},_0x4f35(_0x18a1aa,_0x15040d);}function _0x368b(){const _0x5004f5=['461106EBFnpc','3000186EQkZxi','90QJDWEx','30927kKRUaJ','790KhTaTc','704058CVKOfU','125041oiMwBs','56ATXLqq','868200bgItBm'];_0x368b=function(){return _0x5004f5;};return _0x368b();}exports['KeyService']=KeyService;
@@ -1 +1 @@
1
- 'use strict';(function(_0x1f8b74,_0x4ed473){const _0x5c6dcf=_0x10cf,_0x421192=_0x1f8b74();while(!![]){try{const _0x49033b=parseInt(_0x5c6dcf(0x6b))/0x1+parseInt(_0x5c6dcf(0x6a))/0x2+-parseInt(_0x5c6dcf(0x6f))/0x3*(parseInt(_0x5c6dcf(0x6e))/0x4)+parseInt(_0x5c6dcf(0x6d))/0x5+parseInt(_0x5c6dcf(0x68))/0x6+parseInt(_0x5c6dcf(0x67))/0x7+-parseInt(_0x5c6dcf(0x6c))/0x8*(parseInt(_0x5c6dcf(0x69))/0x9);if(_0x49033b===_0x4ed473)break;else _0x421192['push'](_0x421192['shift']());}catch(_0x30dd14){_0x421192['push'](_0x421192['shift']());}}}(_0x2940,0xedcc2));var __importDefault=this&&this['__importDefault']||function(_0x1e1ca5){return _0x1e1ca5&&_0x1e1ca5['__esModule']?_0x1e1ca5:{'default':_0x1e1ca5};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['arrayToHash']=exports['isStreamMessage']=exports['parseStreamMessage']=exports['s']=exports['isValidCron']=exports['restoreHierarchy']=exports['getValueByPath']=exports['getIndexedHash']=exports['getSymVal']=exports['getSymKey']=exports['formatISODate']=exports['getTimeSeries']=exports['getSubscriptionTopic']=exports['findSubscriptionForTrigger']=exports['findTopKey']=exports['matchesStatus']=exports['matchesStatusCode']=exports['identifyRedisTypeFromClass']=exports['polyfill']=exports['identifyProvider']=exports['XSleepFor']=exports['sleepImmediate']=exports['sleepFor']=exports['guid']=exports['deterministicRandom']=exports['deepCopy']=exports['getSystemHealth']=exports['hashOptions']=void 0x0;const os_1=__importDefault(require('os')),crypto_1=require('crypto'),nanoid_1=require('nanoid'),ms_1=__importDefault(require('ms')),logger_1=require('../services/logger'),enums_1=require('./enums'),logger=new logger_1['LoggerService']('hotmesh','utils'),hashOptions=_0x35069e=>{const _0x32b1a6=JSON['stringify'](_0x35069e);return(0x0,crypto_1['createHash'])('sha256')['update'](_0x32b1a6)['digest']('hex');};exports['hashOptions']=hashOptions;async function getSystemHealth(){const _0xe21a68=os_1['default']['totalmem'](),_0x256ef0=os_1['default']['freemem'](),_0x2a0fe6=_0xe21a68-_0x256ef0,_0x50adb3={'TotalMemoryGB':(_0xe21a68/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','FreeMemoryGB':(_0x256ef0/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','UsedMemoryGB':(_0x2a0fe6/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};return _0x50adb3;}function _0x10cf(_0x2c41b4,_0x11f0e0){const _0x2940e7=_0x2940();return _0x10cf=function(_0x10cfda,_0x5db4ce){_0x10cfda=_0x10cfda-0x67;let _0xe8bd99=_0x2940e7[_0x10cfda];return _0xe8bd99;},_0x10cf(_0x2c41b4,_0x11f0e0);}exports['getSystemHealth']=getSystemHealth;function deepCopy(_0x2ef356){return JSON['parse'](JSON['stringify'](_0x2ef356));}exports['deepCopy']=deepCopy;function deterministicRandom(_0x4a2b91){const _0x3a9569=Math['sin'](_0x4a2b91)*0x2710;return _0x3a9569-Math['floor'](_0x3a9569);}exports['deterministicRandom']=deterministicRandom;function guid(_0x41589d=enums_1['HMSH_GUID_SIZE']){return'H'+(0x0,nanoid_1['nanoid'])(_0x41589d);}exports['guid']=guid;async function sleepFor(_0x959cd3){return new Promise(_0x59511d=>setTimeout(_0x59511d,_0x959cd3));}exports['sleepFor']=sleepFor;function sleepImmediate(){return new Promise(_0x1cdc0c=>setImmediate(_0x1cdc0c));}exports['sleepImmediate']=sleepImmediate;function XSleepFor(_0x354dad){let _0x1259fd;const _0x4a8f3d=new Promise(_0x23887f=>{_0x1259fd=setTimeout(_0x23887f,_0x354dad);});return{'promise':_0x4a8f3d,'timerId':_0x1259fd};}exports['XSleepFor']=XSleepFor;function identifyProvider(_0x4b6795){const _0x57a301=Object['getPrototypeOf'](_0x4b6795);if(_0x4b6795['Query']?.['prototype']||Object['keys'](_0x4b6795)['includes']('database'))return'postgres';else{if(_0x4b6795['constructor']&&_0x4b6795['constructor']['name']==='Client')return'nats';else{if('defineCommand'in _0x57a301||Object['keys'](_0x57a301)['includes']('multi'))return'ioredis';else{if(Object['keys'](_0x57a301)['includes']('Multi'))return'redis';}}}if(_0x4b6795['constructor']){if(_0x4b6795['constructor']['name']==='Redis'||_0x4b6795['constructor']['name']==='EventEmitter'){if('hset'in _0x4b6795)return'ioredis';}else{if(_0x4b6795['constructor']['name']==='ProviderClient'||_0x4b6795['constructor']['name']==='Commander'){if('HSET'in _0x4b6795)return'redis';}}}let _0x1f9580=null;if(Object['keys'](_0x4b6795)['includes']('connection'))_0x1f9580='postgres';else{if(Object['keys'](_0x4b6795)['includes']('Pipeline'))_0x1f9580='ioredis';else{if(Object['keys'](_0x4b6795)['includes']('createClient'))_0x1f9580='redis';else Object['keys'](_0x4b6795)['includes']('jetstream')&&(_0x1f9580='nats');}}return _0x1f9580;}exports['identifyProvider']=identifyProvider,exports['polyfill']={'resolveActivityType'(_0x38afda){return _0x38afda==='activity'?'hook':_0x38afda;},'providerConfig'(_0x460c56){return _0x460c56?.['connection']??_0x460c56?.['redis']??_0x460c56?.['connections'];},'meshDataConfig'(_0x242657){if(_0x242657?.['connections'])return _0x242657['connections'];return _0x242657?.['connection']??{'class':_0x242657?.['redisClass'],'options':_0x242657?.['redisOptions']};}};function identifyRedisTypeFromClass(_0x5dc712){if(_0x5dc712&&_0x5dc712['name']==='Redis'||_0x5dc712['name']==='EventEmitter')return'ioredis';else{if(_0x5dc712&&'createClient'in _0x5dc712)return'redis';}return null;}exports['identifyRedisTypeFromClass']=identifyRedisTypeFromClass;function matchesStatusCode(_0x403263,_0x155d04){if(typeof _0x155d04==='string'){const _0x3d337f='^'+_0x155d04['replace'](/\*/g,'\x5cd')+'$';return new RegExp(_0x3d337f)['test'](_0x403263['toString']());}return _0x155d04['test'](_0x403263['toString']());}exports['matchesStatusCode']=matchesStatusCode;function matchesStatus(_0x4a36c2,_0x1406d6){return _0x4a36c2===_0x1406d6;}exports['matchesStatus']=matchesStatus;function findTopKey(_0x21e7fe,_0x1c4389){for(const [_0x101850,_0x6c30cf]of Object['entries'](_0x21e7fe)){if(_0x6c30cf['hasOwnProperty'](_0x1c4389)){const _0x5a4fbc=findTopKey(_0x21e7fe,_0x101850['replace'](/^\./,''));return(_0x5a4fbc||_0x101850)['replace'](/^\./,'');}}return null;}exports['findTopKey']=findTopKey;function findSubscriptionForTrigger(_0x34b3db,_0x150f7){for(const [_0x23b76e,_0x2fb8ff]of Object['entries'](_0x34b3db)){if(_0x2fb8ff===_0x150f7)return _0x23b76e;}return null;}exports['findSubscriptionForTrigger']=findSubscriptionForTrigger;async function getSubscriptionTopic(_0x1ba39a,_0x1f2fb8,_0x2187b2){const _0x2e359a=await _0x1f2fb8['getTransitions'](_0x2187b2),_0x2a0ec7=await _0x1f2fb8['getSubscriptions'](_0x2187b2),_0x491ca3=findTopKey(_0x2e359a,_0x1ba39a),_0x207555=findSubscriptionForTrigger(_0x2a0ec7,_0x491ca3);return _0x207555;}exports['getSubscriptionTopic']=getSubscriptionTopic;function _0x2940(){const _0x26f952=['4683903hSTJpi','5892798mSXIZV','2924838wqbvhu','571326orCBoQ','1054245jnhCqx','48wLwmxA','6230325XZfrau','60bDNqWr','262665KTLYEb'];_0x2940=function(){return _0x26f952;};return _0x2940();}function getTimeSeries(_0x2ac3d7){if(_0x2ac3d7['toString']()==='infinity')return'0';const _0x2c3e76=new Date(),_0x1e46c1=_0x2ac3d7['slice'](-0x1),_0x11e778=parseInt(_0x2ac3d7['slice'](0x0,-0x1),0xa);if(_0x1e46c1==='m'){const _0x563f74=Math['floor'](_0x2c3e76['getMinutes']()/_0x11e778)*_0x11e778;_0x2c3e76['setUTCMinutes'](_0x563f74,0x0,0x0);}else _0x1e46c1==='h'&&_0x2c3e76['setUTCMinutes'](0x0,0x0,0x0);return _0x2c3e76['toISOString']()['replace'](/:\d\d\..+|-|T/g,'')['replace'](':','');}exports['getTimeSeries']=getTimeSeries;function formatISODate(_0x45c550){const _0x4eb390=_0x45c550 instanceof Date?_0x45c550:new Date(_0x45c550);return _0x4eb390['toISOString']()['replace'](/[:TZ-]/g,'');}exports['formatISODate']=formatISODate;function getSymKey(_0x160b58){const _0x559366='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x16e9fc=_0x559366['length'];if(_0x160b58<0x0||_0x160b58>=Math['pow'](_0x16e9fc,0x3))throw new Error('Number\x20out\x20of\x20range');const [_0x5d6647,_0x33629c]=divmod(_0x160b58,_0x16e9fc),[_0x112fed,_0x36f767]=divmod(_0x5d6647,_0x16e9fc);return _0x559366[_0x112fed]+_0x559366[_0x33629c]+_0x559366[_0x36f767];}exports['getSymKey']=getSymKey;function getSymVal(_0x8ebcd){const _0x548d93='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x1b5395=_0x548d93['length'];if(_0x8ebcd<0x0||_0x8ebcd>=Math['pow'](_0x1b5395,0x2))throw new Error('Number\x20out\x20of\x20range');const [_0x54af93,_0x5439ad]=divmod(_0x8ebcd,_0x1b5395);return _0x548d93[_0x54af93]+_0x548d93[_0x5439ad];}exports['getSymVal']=getSymVal;function divmod(_0xeacae,_0x1b627e){return[Math['floor'](_0xeacae/_0x1b627e),_0xeacae%_0x1b627e];}function getIndexedHash(_0x108e34,_0x1cd8eb){const _0x552c04=_0x108e34[_0x1cd8eb]||0x0,_0x8cfdf5={..._0x108e34};return delete _0x8cfdf5[_0x1cd8eb],[_0x552c04,_0x8cfdf5];}exports['getIndexedHash']=getIndexedHash;function getValueByPath(_0x538bb7,_0x43c508){const _0x38bd62=_0x43c508['split']('/');let _0x71c1dd=_0x538bb7;for(const _0x40adc5 of _0x38bd62){if(_0x71c1dd[_0x40adc5]!==undefined)_0x71c1dd=_0x71c1dd[_0x40adc5];else return undefined;}return _0x71c1dd;}exports['getValueByPath']=getValueByPath;function restoreHierarchy(_0x4a6f29){const _0x172556={};for(const _0x51531a in _0x4a6f29){if(_0x4a6f29[_0x51531a]===undefined)continue;const _0x41b182=_0x51531a['split']('/');let _0x549449=_0x172556;for(let _0x3fd7cb=0x0;_0x3fd7cb<_0x41b182['length'];_0x3fd7cb++){_0x3fd7cb===_0x41b182['length']-0x1?_0x549449[_0x41b182[_0x3fd7cb]]=_0x4a6f29[_0x51531a]:(_0x549449[_0x41b182[_0x3fd7cb]]=_0x549449[_0x41b182[_0x3fd7cb]]||{},_0x549449=_0x549449[_0x41b182[_0x3fd7cb]]);}}return _0x172556;}exports['restoreHierarchy']=restoreHierarchy;function isValidCron(_0x3551bf){const _0x1de96c=/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/;return _0x1de96c['test'](_0x3551bf);}exports['isValidCron']=isValidCron;const s=_0xe18acf=>{return(0x0,ms_1['default'])(_0xe18acf)/0x3e8;};exports['s']=s;const parseStreamMessage=_0x4d8b82=>{try{return JSON['parse'](_0x4d8b82);}catch(_0x3c6ce1){logger['error']('Error\x20parsing\x20Stream\x20message',{..._0x3c6ce1});throw _0x3c6ce1;}};exports['parseStreamMessage']=parseStreamMessage;const isStreamMessage=_0x2b8013=>{return Array['isArray'](_0x2b8013)&&Array['isArray'](_0x2b8013[0x0]);};exports['isStreamMessage']=isStreamMessage;const arrayToHash=_0x3cad2c=>{const _0x2d7c51=[];let _0x10b407;for(let _0x4d0ba5=0x1;_0x4d0ba5<_0x3cad2c['length'];_0x4d0ba5++){const _0x199c20=_0x3cad2c[_0x4d0ba5],_0xa9afd6={};if(Array['isArray'](_0x199c20)){for(let _0x59c246=0x0;_0x59c246<_0x199c20['length'];_0x59c246+=0x2){const _0x4b010e=_0x199c20[_0x59c246],_0x77ac96=_0x199c20[_0x59c246+0x1];_0xa9afd6[_0x4b010e]=_0x77ac96;}_0x10b407&&(_0xa9afd6['$']=_0x10b407),_0x2d7c51['push'](_0xa9afd6),_0x10b407=undefined;}else _0x10b407=_0x199c20;}return _0x2d7c51;};exports['arrayToHash']=arrayToHash;
1
+ 'use strict';(function(_0x16a751,_0x2a3159){const _0x5155e1=_0x5584,_0x516818=_0x16a751();while(!![]){try{const _0x415dbc=-parseInt(_0x5155e1(0x15d))/0x1*(parseInt(_0x5155e1(0x15f))/0x2)+parseInt(_0x5155e1(0x164))/0x3+-parseInt(_0x5155e1(0x160))/0x4+parseInt(_0x5155e1(0x163))/0x5*(parseInt(_0x5155e1(0x15c))/0x6)+parseInt(_0x5155e1(0x162))/0x7+-parseInt(_0x5155e1(0x15e))/0x8+parseInt(_0x5155e1(0x161))/0x9;if(_0x415dbc===_0x2a3159)break;else _0x516818['push'](_0x516818['shift']());}catch(_0x22aba9){_0x516818['push'](_0x516818['shift']());}}}(_0xd3fe,0x6d447));var __importDefault=this&&this['__importDefault']||function(_0x171ed6){return _0x171ed6&&_0x171ed6['__esModule']?_0x171ed6:{'default':_0x171ed6};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['arrayToHash']=exports['isStreamMessage']=exports['parseStreamMessage']=exports['s']=exports['isValidCron']=exports['restoreHierarchy']=exports['getValueByPath']=exports['getIndexedHash']=exports['getSymVal']=exports['getSymKey']=exports['formatISODate']=exports['getTimeSeries']=exports['getSubscriptionTopic']=exports['findSubscriptionForTrigger']=exports['findTopKey']=exports['matchesStatus']=exports['matchesStatusCode']=exports['identifyRedisTypeFromClass']=exports['polyfill']=exports['identifyProvider']=exports['XSleepFor']=exports['sleepImmediate']=exports['sleepFor']=exports['guid']=exports['deterministicRandom']=exports['deepCopy']=exports['getSystemHealth']=exports['hashOptions']=void 0x0;const os_1=__importDefault(require('os')),crypto_1=require('crypto'),nanoid_1=require('nanoid'),ms_1=__importDefault(require('ms')),logger_1=require('../services/logger'),enums_1=require('./enums'),logger=new logger_1['LoggerService']('hotmesh','utils'),hashOptions=_0x24105d=>{const _0x58a096=JSON['stringify'](_0x24105d);return(0x0,crypto_1['createHash'])('sha256')['update'](_0x58a096)['digest']('hex');};exports['hashOptions']=hashOptions;async function getSystemHealth(){const _0x56105d=os_1['default']['totalmem'](),_0x3b4f91=os_1['default']['freemem'](),_0x599035=_0x56105d-_0x3b4f91,_0x2dc39e={'TotalMemoryGB':(_0x56105d/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','FreeMemoryGB':(_0x3b4f91/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','UsedMemoryGB':(_0x599035/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};return _0x2dc39e;}exports['getSystemHealth']=getSystemHealth;function deepCopy(_0xf3c9e4){return JSON['parse'](JSON['stringify'](_0xf3c9e4));}function _0x5584(_0x6c3732,_0x1cb7c7){const _0xd3fe24=_0xd3fe();return _0x5584=function(_0x558475,_0x2c0d6f){_0x558475=_0x558475-0x15c;let _0x17a202=_0xd3fe24[_0x558475];return _0x17a202;},_0x5584(_0x6c3732,_0x1cb7c7);}exports['deepCopy']=deepCopy;function deterministicRandom(_0x238dbb){const _0x4699a0=Math['sin'](_0x238dbb)*0x2710;return _0x4699a0-Math['floor'](_0x4699a0);}exports['deterministicRandom']=deterministicRandom;function guid(_0x2ebdca=enums_1['HMSH_GUID_SIZE']){return'H'+(0x0,nanoid_1['nanoid'])(_0x2ebdca);}exports['guid']=guid;async function sleepFor(_0x49ba7c){return new Promise(_0x4b0040=>setTimeout(_0x4b0040,_0x49ba7c));}exports['sleepFor']=sleepFor;function sleepImmediate(){return new Promise(_0x2d9037=>setImmediate(_0x2d9037));}exports['sleepImmediate']=sleepImmediate;function XSleepFor(_0xeff5cd){let _0x226f17;const _0x2bfc13=new Promise(_0x5c8cb5=>{_0x226f17=setTimeout(_0x5c8cb5,_0xeff5cd);});return{'promise':_0x2bfc13,'timerId':_0x226f17};}exports['XSleepFor']=XSleepFor;function identifyProvider(_0x5c2f11){const _0x2676f2=Object['getPrototypeOf'](_0x5c2f11);if(_0x5c2f11['Query']?.['prototype']||Object['keys'](_0x5c2f11)['includes']('database'))return'postgres';else{if(_0x5c2f11['constructor']&&_0x5c2f11['constructor']['name']==='Client')return'nats';else{if('defineCommand'in _0x2676f2||Object['keys'](_0x2676f2)['includes']('multi'))return'ioredis';else{if(Object['keys'](_0x2676f2)['includes']('Multi'))return'redis';}}}if(_0x5c2f11['constructor']){if(_0x5c2f11['constructor']['name']==='Redis'||_0x5c2f11['constructor']['name']==='EventEmitter'){if('hset'in _0x5c2f11)return'ioredis';}else{if(_0x5c2f11['constructor']['name']==='ProviderClient'||_0x5c2f11['constructor']['name']==='Commander'){if('HSET'in _0x5c2f11)return'redis';}}}let _0x3841af=null;if(Object['keys'](_0x5c2f11)['includes']('connection'))_0x3841af='postgres';else{if(Object['keys'](_0x5c2f11)['includes']('Pipeline'))_0x3841af='ioredis';else{if(Object['keys'](_0x5c2f11)['includes']('createClient'))_0x3841af='redis';else Object['keys'](_0x5c2f11)['includes']('jetstream')&&(_0x3841af='nats');}}return _0x3841af;}exports['identifyProvider']=identifyProvider,exports['polyfill']={'resolveActivityType'(_0x5672ef){return _0x5672ef==='activity'?'hook':_0x5672ef;},'providerConfig'(_0x4d0049){return _0x4d0049?.['connection']??_0x4d0049?.['redis']??_0x4d0049?.['connections'];},'meshDataConfig'(_0x298b4a){if(_0x298b4a?.['connections'])return _0x298b4a['connections'];return _0x298b4a?.['connection']??{'class':_0x298b4a?.['redisClass'],'options':_0x298b4a?.['redisOptions']};}};function identifyRedisTypeFromClass(_0xc11cc1){if(_0xc11cc1&&_0xc11cc1['name']==='Redis'||_0xc11cc1['name']==='EventEmitter')return'ioredis';else{if(_0xc11cc1&&'createClient'in _0xc11cc1)return'redis';}return null;}exports['identifyRedisTypeFromClass']=identifyRedisTypeFromClass;function matchesStatusCode(_0x3e23f0,_0xeb21b0){if(typeof _0xeb21b0==='string'){const _0x1ee860='^'+_0xeb21b0['replace'](/\*/g,'\x5cd')+'$';return new RegExp(_0x1ee860)['test'](_0x3e23f0['toString']());}return _0xeb21b0['test'](_0x3e23f0['toString']());}exports['matchesStatusCode']=matchesStatusCode;function matchesStatus(_0x56b11f,_0x55935b){return _0x56b11f===_0x55935b;}exports['matchesStatus']=matchesStatus;function findTopKey(_0x3de7a3,_0x52ff6f){for(const [_0x336564,_0x138abe]of Object['entries'](_0x3de7a3)){if(_0x138abe['hasOwnProperty'](_0x52ff6f)){const _0x6b3c17=findTopKey(_0x3de7a3,_0x336564['replace'](/^\./,''));return(_0x6b3c17||_0x336564)['replace'](/^\./,'');}}return null;}exports['findTopKey']=findTopKey;function findSubscriptionForTrigger(_0x52884d,_0x2a41d3){for(const [_0x13da14,_0x70c63f]of Object['entries'](_0x52884d)){if(_0x70c63f===_0x2a41d3)return _0x13da14;}return null;}exports['findSubscriptionForTrigger']=findSubscriptionForTrigger;async function getSubscriptionTopic(_0x1b4e7f,_0x3bd00c,_0x359189){const _0x2de5b0=await _0x3bd00c['getTransitions'](_0x359189),_0x2fd7d3=await _0x3bd00c['getSubscriptions'](_0x359189),_0x296bbc=findTopKey(_0x2de5b0,_0x1b4e7f),_0x54954a=findSubscriptionForTrigger(_0x2fd7d3,_0x296bbc);return _0x54954a;}exports['getSubscriptionTopic']=getSubscriptionTopic;function getTimeSeries(_0x1ec5e7){if(_0x1ec5e7['toString']()==='infinity')return'0';const _0xb79395=new Date(),_0x4d40bc=_0x1ec5e7['slice'](-0x1),_0x2dcf72=parseInt(_0x1ec5e7['slice'](0x0,-0x1),0xa);if(_0x4d40bc==='m'){const _0x316ddd=Math['floor'](_0xb79395['getMinutes']()/_0x2dcf72)*_0x2dcf72;_0xb79395['setUTCMinutes'](_0x316ddd,0x0,0x0);}else _0x4d40bc==='h'&&_0xb79395['setUTCMinutes'](0x0,0x0,0x0);return _0xb79395['toISOString']()['replace'](/:\d\d\..+|-|T/g,'')['replace'](':','');}function _0xd3fe(){const _0x1badf6=['401989NfHLCQ','5ZPnRhl','1419861nBcBWH','43158wojIFj','5541fvvSqY','3371336gHxfLm','198oPeQGK','1206428abxWDo','10631115DQUiFI'];_0xd3fe=function(){return _0x1badf6;};return _0xd3fe();}exports['getTimeSeries']=getTimeSeries;function formatISODate(_0x50f7ea){const _0x58e10d=_0x50f7ea instanceof Date?_0x50f7ea:new Date(_0x50f7ea);return _0x58e10d['toISOString']()['replace'](/[:TZ-]/g,'');}exports['formatISODate']=formatISODate;function getSymKey(_0x57f555){const _0x51ca56='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x424a49=_0x51ca56['length'];if(_0x57f555<0x0||_0x57f555>=Math['pow'](_0x424a49,0x3))throw new Error('Number\x20out\x20of\x20range');const [_0x47ab7e,_0x49411c]=divmod(_0x57f555,_0x424a49),[_0x9e4a85,_0x1f0876]=divmod(_0x47ab7e,_0x424a49);return _0x51ca56[_0x9e4a85]+_0x51ca56[_0x49411c]+_0x51ca56[_0x1f0876];}exports['getSymKey']=getSymKey;function getSymVal(_0x5c389e){const _0xc1d45f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x59e80f=_0xc1d45f['length'];if(_0x5c389e<0x0||_0x5c389e>=Math['pow'](_0x59e80f,0x2))throw new Error('Number\x20out\x20of\x20range');const [_0x360aa0,_0x4ff49a]=divmod(_0x5c389e,_0x59e80f);return _0xc1d45f[_0x360aa0]+_0xc1d45f[_0x4ff49a];}exports['getSymVal']=getSymVal;function divmod(_0x5628c8,_0x5001d6){return[Math['floor'](_0x5628c8/_0x5001d6),_0x5628c8%_0x5001d6];}function getIndexedHash(_0x5a7a83,_0x5249bc){const _0x255cae=_0x5a7a83[_0x5249bc]||0x0,_0x50a278={..._0x5a7a83};return delete _0x50a278[_0x5249bc],[_0x255cae,_0x50a278];}exports['getIndexedHash']=getIndexedHash;function getValueByPath(_0x49b02c,_0x1b3f84){const _0x3d3200=_0x1b3f84['split']('/');let _0x2989f2=_0x49b02c;for(const _0x297c10 of _0x3d3200){if(_0x2989f2[_0x297c10]!==undefined)_0x2989f2=_0x2989f2[_0x297c10];else return undefined;}return _0x2989f2;}exports['getValueByPath']=getValueByPath;function restoreHierarchy(_0x58756d){const _0x2b1860={};for(const _0x53211e in _0x58756d){if(_0x58756d[_0x53211e]===undefined)continue;const _0x4c5124=_0x53211e['split']('/');let _0xf28b95=_0x2b1860;for(let _0x1c896b=0x0;_0x1c896b<_0x4c5124['length'];_0x1c896b++){_0x1c896b===_0x4c5124['length']-0x1?_0xf28b95[_0x4c5124[_0x1c896b]]=_0x58756d[_0x53211e]:(_0xf28b95[_0x4c5124[_0x1c896b]]=_0xf28b95[_0x4c5124[_0x1c896b]]||{},_0xf28b95=_0xf28b95[_0x4c5124[_0x1c896b]]);}}return _0x2b1860;}exports['restoreHierarchy']=restoreHierarchy;function isValidCron(_0x368cad){const _0x23898f=/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/;return _0x23898f['test'](_0x368cad);}exports['isValidCron']=isValidCron;const s=_0x2c5346=>{return(0x0,ms_1['default'])(_0x2c5346)/0x3e8;};exports['s']=s;const parseStreamMessage=_0x557cec=>{try{return JSON['parse'](_0x557cec);}catch(_0x3074f8){logger['error']('Error\x20parsing\x20Stream\x20message',{..._0x3074f8});throw _0x3074f8;}};exports['parseStreamMessage']=parseStreamMessage;const isStreamMessage=_0x1f21dd=>{return Array['isArray'](_0x1f21dd)&&Array['isArray'](_0x1f21dd[0x0]);};exports['isStreamMessage']=isStreamMessage;const arrayToHash=_0x1d67f5=>{const _0x39c14c=[];let _0x2d1a32;for(let _0x14b9ba=0x1;_0x14b9ba<_0x1d67f5['length'];_0x14b9ba++){const _0x11f31b=_0x1d67f5[_0x14b9ba],_0x3861b8={};if(Array['isArray'](_0x11f31b)){for(let _0x20c8c1=0x0;_0x20c8c1<_0x11f31b['length'];_0x20c8c1+=0x2){const _0xbb9c2e=_0x11f31b[_0x20c8c1],_0x5c33b0=_0x11f31b[_0x20c8c1+0x1];_0x3861b8[_0xbb9c2e]=_0x5c33b0;}_0x2d1a32&&(_0x3861b8['$']=_0x2d1a32),_0x39c14c['push'](_0x3861b8),_0x2d1a32=undefined;}else _0x2d1a32=_0x11f31b;}return _0x39c14c;};exports['arrayToHash']=arrayToHash;
@@ -1,13 +1,9 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.3.16",
4
- "description": "Unbreakable Workflows",
3
+ "version": "0.3.18",
4
+ "description": "Serverless Workflow",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
7
- "repository": {
8
- "type": "git",
9
- "url": "https://github.com/hotmeshio/sdk-typescript.git"
10
- },
11
7
  "homepage": "https://hotmesh.io/",
12
8
  "publishConfig": {
13
9
  "access": "public"
@@ -78,6 +74,7 @@
78
74
  },
79
75
  "keywords": [
80
76
  "Serverless Orchestration",
77
+ "Serverless Workflow",
81
78
  "Durable Workflow",
82
79
  "Operational Data",
83
80
  "Service Mesh",
@@ -1 +1 @@
1
- 'use strict';function _0x2f10(){const _0x2b8cbc=['699IQfqRr','15292QQvvLa','14922PiddbE','1568260zfPoMN','198sSrTSl','4638TWeamq','1704588xjUlaS','6900586JxExPj','7415qJxiZb','2519rROqLm','24liWRUM'];_0x2f10=function(){return _0x2b8cbc;};return _0x2f10();}(function(_0xc834f6,_0x504b97){const _0x3ee58f=_0x935f,_0x57da7e=_0xc834f6();while(!![]){try{const _0x4de376=parseInt(_0x3ee58f(0xa5))/0x1+parseInt(_0x3ee58f(0xa2))/0x2+-parseInt(_0x3ee58f(0xa7))/0x3*(parseInt(_0x3ee58f(0x9d))/0x4)+-parseInt(_0x3ee58f(0xa4))/0x5*(parseInt(_0x3ee58f(0xa1))/0x6)+-parseInt(_0x3ee58f(0xa3))/0x7+parseInt(_0x3ee58f(0xa6))/0x8*(parseInt(_0x3ee58f(0x9e))/0x9)+-parseInt(_0x3ee58f(0x9f))/0xa*(-parseInt(_0x3ee58f(0xa0))/0xb);if(_0x4de376===_0x504b97)break;else _0x57da7e['push'](_0x57da7e['shift']());}catch(_0x5e9d67){_0x57da7e['push'](_0x57da7e['shift']());}}}(_0x2f10,0xa111b));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Activity']=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),mapper_1=require('../mapper'),pipe_1=require('../pipe'),serializer_1=require('../serializer'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream');function _0x935f(_0x12a711,_0x12d423){const _0x2f1069=_0x2f10();return _0x935f=function(_0x935f9d,_0x58e1c6){_0x935f9d=_0x935f9d-0x9d;let _0x1258b7=_0x2f1069[_0x935f9d];return _0x1258b7;},_0x935f(_0x12a711,_0x12d423);}class Activity{constructor(_0x1dd435,_0x428d92,_0xf366f8,_0x3b192d,_0xc3024b,_0x1a9f03){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x1dd435,this['data']=_0x428d92,this['metadata']=_0xf366f8,this['hook']=_0x3b192d,this['engine']=_0xc3024b,this['context']=_0x1a9f03||{'data':{},'metadata':{}},this['logger']=_0xc3024b['logger'],this['store']=_0xc3024b['store'];}['setLeg'](_0x2eac9b){this['leg']=_0x2eac9b;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0x5dd45d=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0x5dd45d!==undefined&&!isNaN(Number(_0x5dd45d)))return _0x5dd45d;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x519622=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x519622);}catch(_0x376b2a){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x519622>0x0){if(this['context']['metadata']['js']===_0x519622){const _0x1d66a5=await this['setStatus'](-_0x519622);Number(_0x1d66a5)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x376b2a;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0x54d788=this['context']['metadata']['guid'];return this['setLeg'](0x2),await this['getState'](),collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid']),await collator_1['CollatorService']['notarizeReentry'](this,_0x54d788);}async['processEvent'](_0x5c9851=stream_1['StreamStatus']['SUCCESS'],_0x2a5e91=0xc8,_0x2e2073='output'){this['setLeg'](0x2);const _0x3aaf9e=this['context']['metadata']['jid'];if(!_0x3aaf9e){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x5522f4=this['metadata']['aid'];this['status']=_0x5c9851,this['code']=_0x2a5e91,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x3aaf9e,'aid':_0x5522f4,'status':_0x5c9851,'code':_0x2a5e91});let _0x1cbf12;try{const _0x4ee0fa=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x4ee0fa),_0x1cbf12=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x1cbf12['startActivitySpan'](this['leg']);let _0x48fc9f;if(_0x5c9851===stream_1['StreamStatus']['PENDING'])_0x48fc9f=await this['processPending'](_0x2e2073);else _0x5c9851===stream_1['StreamStatus']['SUCCESS']?_0x48fc9f=await this['processSuccess'](_0x2e2073):_0x48fc9f=await this['processError']();this['transitionAdjacent'](_0x48fc9f,_0x1cbf12);}catch(_0x33ed51){if(_0x33ed51 instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x33ed51['fault']+'-error',{..._0x33ed51});return;}else{if(_0x33ed51 instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x33ed51});return;}else{if(_0x33ed51 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x33ed51});return;}else{if(_0x33ed51 instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x33ed51});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x33ed51,'message':_0x33ed51['message'],'stack':_0x33ed51['stack'],'name':_0x33ed51['name']}),_0x1cbf12?.['setActivityError'](_0x33ed51['message']);throw _0x33ed51;}finally{_0x1cbf12?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x3aaf9e,'aid':_0x5522f4});}}async['processPending'](_0x2634a7){this['bindActivityData'](_0x2634a7),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0xf6d18f=this['store']['transact']();return await this['setState'](_0xf6d18f),await collator_1['CollatorService']['notarizeContinuation'](this,_0xf6d18f),await this['setStatus'](this['adjacencyList']['length'],_0xf6d18f),await _0xf6d18f['exec']();}async['processSuccess'](_0x3330a7){this['bindActivityData'](_0x3330a7),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x2cb0ff=this['store']['transact']();return await this['setState'](_0x2cb0ff),await collator_1['CollatorService']['notarizeCompletion'](this,_0x2cb0ff),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x2cb0ff),await _0x2cb0ff['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0x15312b=this['store']['transact']();return await this['setState'](_0x15312b),await collator_1['CollatorService']['notarizeCompletion'](this,_0x15312b),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x15312b),await _0x15312b['exec']();}async['transitionAdjacent'](_0x6debfc,_0x11f3b9){_0x11f3b9['mapActivityAttributes']();const _0x591895=this['resolveStatus'](_0x6debfc),_0x395485={'app.job.jss':_0x591895},_0x349724=await this['transition'](this['adjacencyList'],_0x591895);_0x349724?.['length']&&(_0x395485['app.activity.mids']=_0x349724['join'](',')),_0x11f3b9['setActivityAttributes'](_0x395485);}['resolveStatus'](_0x5bb455){const _0x2f9e80=_0x5bb455[_0x5bb455['length']-0x1];return Array['isArray'](_0x2f9e80)?Number(_0x2f9e80[0x1]):Number(_0x2f9e80);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x2ce69c=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x329ad7=_0x2ce69c['mapRules']();if(_0x329ad7)for(const _0x21f5db in _0x329ad7){const _0x5d53a2=_0x21f5db['indexOf']('[');if(_0x5d53a2>-0x1){const _0x31d329=_0x21f5db['substring'](_0x5d53a2+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x31d329))){const _0x4c21a4=_0x21f5db['substring'](0x0,_0x5d53a2);_0x329ad7[_0x4c21a4]=_0x329ad7[_0x21f5db],delete _0x329ad7[_0x21f5db];}else{if(_0x31d329==='-'||_0x31d329==='_'){const _0x53e999=_0x329ad7[_0x21f5db];Object['keys'](_0x53e999)['forEach'](_0x4a856b=>{_0x329ad7[_0x4a856b]=_0x53e999[_0x4a856b];});}}}}this['context']['data']=_0x329ad7;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x3aa0aa=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x3aa0aa['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x4f9e0f=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x8edd99=_0x4f9e0f['mapRules'](),_0xc17d0c=this['metadata']['aid'],_0x488854={...this['context'][_0xc17d0c]['output'],..._0x8edd99};this['context'][_0xc17d0c]['output']['data']=_0x488854;}}async['registerTimeout'](){}['bindActivityError'](_0x2ab8c4){const _0x2f405a=this['context'][this['metadata']['aid']]['output']['metadata'];_0x2f405a['err']=JSON['stringify'](this['data']),_0x2f405a['$error']={..._0x2ab8c4,'is_stream_error':!![]};}['bindJobError'](_0x8da1f2){this['context']['metadata']['err']=JSON['stringify']({..._0x8da1f2,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0x2a963d,_0x2fb5d7){const {id:_0x2ea274}=await this['engine']['getVID']();return await this['store']['setStatus'](_0x2a963d,this['context']['metadata']['jid'],_0x2ea274,_0x2fb5d7);}['authorizeEntry'](_0x538cd5){return this['adjacencyList']?.['map'](_0x5c96bd=>{const {metadata:{aid:_0x557f6f}}=_0x5c96bd;return _0x538cd5[_0x557f6f+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x557f6f;})??[];}['bindDimensionalAddress'](_0x82ba1c){const _0x280b92=this['resolveDad']();_0x82ba1c[this['metadata']['aid']+'/output/metadata/dad']=_0x280b92;}async['setState'](_0x10a85a){const _0x2c57c4=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x14f59e={};await this['bindJobState'](_0x14f59e);const _0x28109d=this['authorizeEntry'](_0x14f59e);this['bindDimensionalAddress'](_0x14f59e),this['bindActivityState'](_0x14f59e);const _0x1de136=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x28109d],_0x3e0376=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x14f59e,this['getJobStatus'](),_0x2c57c4,_0x1de136,_0x3e0376,_0x10a85a);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x72848b=this['context']['$self'];!_0x72848b['output']['metadata']&&(_0x72848b['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x72848b['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x54e9dd=(0x0,utils_1['formatISODate'])(new Date());_0x72848b['output']['metadata']['ac']=_0x54e9dd,_0x72848b['output']['metadata']['au']=_0x54e9dd,_0x72848b['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x72848b['output']['metadata']['stp']=this['config']['subtype']),_0x72848b['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x4564f4){const _0x1624ee=await this['getTriggerConfig'](),_0x1ccb3d=[..._0x1624ee['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x5c5948 of _0x1ccb3d){const _0x4f7810=(0x0,utils_1['getValueByPath'])(this['context'],_0x5c5948);_0x4f7810!==undefined&&(_0x4564f4[_0x5c5948]=_0x4f7810);}for(const _0x1330c0 in this['context']?.['data']??{}){(_0x1330c0['startsWith']('-')||_0x1330c0['startsWith']('_'))&&(_0x4564f4[_0x1330c0]=this['context']['data'][_0x1330c0]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x4564f4,this['config'],this['context']);}['bindActivityState'](_0x46c649){const _0x1c10b8=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0x302e4e of _0x1c10b8){const _0x2edf60=this['metadata']['aid']+'/'+_0x302e4e,_0x405cfd=(0x0,utils_1['getValueByPath'])(this['context'],_0x2edf60);_0x405cfd!==undefined&&(_0x46c649[_0x2edf60]=_0x405cfd);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x46c649,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x143dd1=>'metadata/'+_0x143dd1);}['bindActivityMetadataPaths'](){const _0x514172=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x514172]['KEYS']['map'](_0x1f2bc2=>'output/metadata/'+_0x1f2bc2);}async['getState'](){const _0x2870e8=this['context']['metadata']['gid'],_0x4aa1b8='$'+this['config']['subscribes'],_0x49911c={[_0x4aa1b8]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x1cc65c=>'metadata/'+_0x1cc65c)};for(let [_0x30508b,_0x1e4b8b]of Object['entries'](this['config']['consumes'])){if(_0x30508b==='$job')for(const _0x46919f of _0x1e4b8b){_0x49911c[_0x4aa1b8]['push'](_0x46919f);}else{_0x30508b==='$self'&&(_0x30508b=this['metadata']['aid']);!_0x49911c[_0x30508b]&&(_0x49911c[_0x30508b]=[]);for(const _0x6d9555 of _0x1e4b8b){_0x49911c[_0x30508b]['push'](_0x30508b+'/'+_0x6d9555);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0x49911c,this['config'],this['metadata'],this['leg']);const {dad:_0x4eb857,jid:_0x1718d5}=this['context']['metadata'],_0xed7e82=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x4eb857||''),[_0x33a263,_0x417570]=await this['store']['getState'](_0x1718d5,_0x49911c,_0xed7e82);this['context']=(0x0,utils_1['restoreHierarchy'])(_0x33a263),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x2870e8),this['initDimensionalAddress'](_0x4eb857),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x9907bd,_0x10b334){if(_0x10b334!==_0x9907bd)throw new errors_1['GenerationalError'](_0x9907bd,_0x10b334,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0x5ccbe0){this['metadata']['dad']=_0x5ccbe0;}['initSelf'](_0x27f2e7){const _0x3492f7=this['metadata']['aid'];!_0x27f2e7[_0x3492f7]&&(_0x27f2e7[_0x3492f7]={});const _0x523641=_0x27f2e7[_0x3492f7];return!_0x523641['output']&&(_0x523641['output']={}),!_0x523641['input']&&(_0x523641['input']={}),!_0x523641['hook']&&(_0x523641['hook']={}),!_0x523641['output']['metadata']&&(_0x523641['output']['metadata']={}),_0x523641['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x27f2e7['$self']=_0x523641,_0x27f2e7['$job']=_0x27f2e7,_0x27f2e7;}['initPolicies'](_0x1cb2d6){const _0x30b9f3=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0x1cb2d6);_0x1cb2d6['metadata']['expire']=_0x30b9f3;if(this['config']['persistent']!=undefined){const _0x56ca8d=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0x1cb2d6);_0x1cb2d6['metadata']['persistent']=_0x56ca8d;}}['bindActivityData'](_0x3aaab0){this['context'][this['metadata']['aid']][_0x3aaab0]['data']=this['data'];}['resolveDad'](){let _0x3e008f=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x3e008f=_0x3e008f['substring'](0x0,_0x3e008f['lastIndexOf'](','))+','+this['adjacentIndex']),_0x3e008f;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x2f7585=[],_0x3ce044=await this['store']['getTransitions'](await this['engine']['getVID']()),_0x4d73e8=_0x3ce044['.'+this['metadata']['aid']],_0x3db42f=this['resolveAdjacentDad']();if(_0x4d73e8)for(const _0x15987e in _0x4d73e8){const _0x21557e=_0x4d73e8[_0x15987e];mapper_1['MapperService']['evaluate'](_0x21557e,this['context'],this['code'])&&_0x2f7585['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x3db42f,'aid':_0x15987e,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x2f7585;}['isJobComplete'](_0x16cd9b){return _0x16cd9b<=0x0;}['shouldEmit'](){if(this['config']['emit'])return pipe_1['Pipe']['resolve'](this['config']['emit'],this['context'])===!![];return![];}['shouldPersistJob'](){if(this['config']['persist']!==undefined)return pipe_1['Pipe']['resolve'](this['config']['persist'],this['context'])===!![];return![];}async['transition'](_0x107c98,_0x5c6fcf){if(this['jobWasInterrupted'](_0x5c6fcf))return;let _0xa5503e=[];(this['shouldEmit']()||this['isJobComplete'](_0x5c6fcf)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x5c6fcf)&&!this['shouldPersistJob']()});if(_0x107c98['length']&&!this['isJobComplete'](_0x5c6fcf)){const _0x5b7429=this['store']['transact']();for(const _0x3e8cdc of _0x107c98){await this['engine']['router']?.['publishMessage'](null,_0x3e8cdc,_0x5b7429);}_0xa5503e=await _0x5b7429['exec']();}return _0xa5503e;}['jobWasInterrupted'](_0x2cd4df){return _0x2cd4df<-0x5f5e100;}}exports['Activity']=Activity;
1
+ 'use strict';(function(_0x48b863,_0x4b0cc9){const _0x1b1569=_0x59b2,_0x10e5cc=_0x48b863();while(!![]){try{const _0x3592f9=-parseInt(_0x1b1569(0xcd))/0x1+parseInt(_0x1b1569(0xce))/0x2+parseInt(_0x1b1569(0xd0))/0x3+-parseInt(_0x1b1569(0xd2))/0x4+-parseInt(_0x1b1569(0xcf))/0x5+-parseInt(_0x1b1569(0xd3))/0x6+-parseInt(_0x1b1569(0xcc))/0x7*(-parseInt(_0x1b1569(0xd1))/0x8);if(_0x3592f9===_0x4b0cc9)break;else _0x10e5cc['push'](_0x10e5cc['shift']());}catch(_0x1607cd){_0x10e5cc['push'](_0x10e5cc['shift']());}}}(_0x20d0,0x33fd5));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Activity']=void 0x0;function _0x59b2(_0x217ff5,_0x2c9b84){const _0x20d095=_0x20d0();return _0x59b2=function(_0x59b2a4,_0x2c6129){_0x59b2a4=_0x59b2a4-0xcc;let _0x3e7a57=_0x20d095[_0x59b2a4];return _0x3e7a57;},_0x59b2(_0x217ff5,_0x2c9b84);}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(_0x4057e9,_0x3b63eb,_0x3a92da,_0x5d3ff0,_0x3bf558,_0x25e7a5){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x4057e9,this['data']=_0x3b63eb,this['metadata']=_0x3a92da,this['hook']=_0x5d3ff0,this['engine']=_0x3bf558,this['context']=_0x25e7a5||{'data':{},'metadata':{}},this['logger']=_0x3bf558['logger'],this['store']=_0x3bf558['store'];}['setLeg'](_0x31399c){this['leg']=_0x31399c;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0x273ef0=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0x273ef0!==undefined&&!isNaN(Number(_0x273ef0)))return _0x273ef0;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x3333c6=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x3333c6);}catch(_0x203d0b){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x3333c6>0x0){if(this['context']['metadata']['js']===_0x3333c6){const _0x3fa0fc=await this['setStatus'](-_0x3333c6);Number(_0x3fa0fc)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x203d0b;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0x3ec99f=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,_0x3ec99f);}async['processEvent'](_0x4a969f=stream_1['StreamStatus']['SUCCESS'],_0x51e0dc=0xc8,_0x261f4d='output'){this['setLeg'](0x2);const _0xcdbe03=this['context']['metadata']['jid'];if(!_0xcdbe03){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x306256=this['metadata']['aid'];this['status']=_0x4a969f,this['code']=_0x51e0dc,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0xcdbe03,'aid':_0x306256,'status':_0x4a969f,'code':_0x51e0dc});let _0x1a6618;try{const _0xf1a665=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0xf1a665),_0x1a6618=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x1a6618['startActivitySpan'](this['leg']);let _0x40c540;if(_0x4a969f===stream_1['StreamStatus']['PENDING'])_0x40c540=await this['processPending'](_0x261f4d);else _0x4a969f===stream_1['StreamStatus']['SUCCESS']?_0x40c540=await this['processSuccess'](_0x261f4d):_0x40c540=await this['processError']();this['transitionAdjacent'](_0x40c540,_0x1a6618);}catch(_0x3278f3){if(_0x3278f3 instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x3278f3['fault']+'-error',{..._0x3278f3});return;}else{if(_0x3278f3 instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x3278f3});return;}else{if(_0x3278f3 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x3278f3});return;}else{if(_0x3278f3 instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x3278f3});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x3278f3,'message':_0x3278f3['message'],'stack':_0x3278f3['stack'],'name':_0x3278f3['name']}),_0x1a6618?.['setActivityError'](_0x3278f3['message']);throw _0x3278f3;}finally{_0x1a6618?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0xcdbe03,'aid':_0x306256});}}async['processPending'](_0x43e38b){this['bindActivityData'](_0x43e38b),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0xe21c61=this['store']['transact']();return await this['setState'](_0xe21c61),await collator_1['CollatorService']['notarizeContinuation'](this,_0xe21c61),await this['setStatus'](this['adjacencyList']['length'],_0xe21c61),await _0xe21c61['exec']();}async['processSuccess'](_0x517c92){this['bindActivityData'](_0x517c92),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x52ef17=this['store']['transact']();return await this['setState'](_0x52ef17),await collator_1['CollatorService']['notarizeCompletion'](this,_0x52ef17),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x52ef17),await _0x52ef17['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0x25ce48=this['store']['transact']();return await this['setState'](_0x25ce48),await collator_1['CollatorService']['notarizeCompletion'](this,_0x25ce48),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x25ce48),await _0x25ce48['exec']();}async['transitionAdjacent'](_0x3c833f,_0x17c7c){_0x17c7c['mapActivityAttributes']();const _0x5b2dd8=this['resolveStatus'](_0x3c833f),_0x35f665={'app.job.jss':_0x5b2dd8},_0x11a491=await this['transition'](this['adjacencyList'],_0x5b2dd8);_0x11a491?.['length']&&(_0x35f665['app.activity.mids']=_0x11a491['join'](',')),_0x17c7c['setActivityAttributes'](_0x35f665);}['resolveStatus'](_0x59e20c){const _0x127288=_0x59e20c[_0x59e20c['length']-0x1];return Array['isArray'](_0x127288)?Number(_0x127288[0x1]):Number(_0x127288);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x201f6d=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x23def6=_0x201f6d['mapRules']();if(_0x23def6)for(const _0x3d681d in _0x23def6){const _0x3ae779=_0x3d681d['indexOf']('[');if(_0x3ae779>-0x1){const _0xdd8b7f=_0x3d681d['substring'](_0x3ae779+0x1)['split'](']')[0x0];if(!isNaN(Number(_0xdd8b7f))){const _0xf92657=_0x3d681d['substring'](0x0,_0x3ae779);_0x23def6[_0xf92657]=_0x23def6[_0x3d681d],delete _0x23def6[_0x3d681d];}else{if(_0xdd8b7f==='-'||_0xdd8b7f==='_'){const _0x3d30ea=_0x23def6[_0x3d681d];Object['keys'](_0x3d30ea)['forEach'](_0xd5d2b0=>{_0x23def6[_0xd5d2b0]=_0x3d30ea[_0xd5d2b0];});}}}}this['context']['data']=_0x23def6;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x4cd575=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x4cd575['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x34a26f=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0xa1b112=_0x34a26f['mapRules'](),_0x2f895e=this['metadata']['aid'],_0x2e7fec={...this['context'][_0x2f895e]['output'],..._0xa1b112};this['context'][_0x2f895e]['output']['data']=_0x2e7fec;}}async['registerTimeout'](){}['bindActivityError'](_0x2a215d){const _0x30a141=this['context'][this['metadata']['aid']]['output']['metadata'];_0x30a141['err']=JSON['stringify'](this['data']),_0x30a141['$error']={..._0x2a215d,'is_stream_error':!![]};}['bindJobError'](_0x153a5c){this['context']['metadata']['err']=JSON['stringify']({..._0x153a5c,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0x733909,_0x387ab1){const {id:_0x117dff}=await this['engine']['getVID']();return await this['store']['setStatus'](_0x733909,this['context']['metadata']['jid'],_0x117dff,_0x387ab1);}['authorizeEntry'](_0x3fc57e){return this['adjacencyList']?.['map'](_0x513868=>{const {metadata:{aid:_0x5ec849}}=_0x513868;return _0x3fc57e[_0x5ec849+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x5ec849;})??[];}['bindDimensionalAddress'](_0x5e520c){const _0x18ce3c=this['resolveDad']();_0x5e520c[this['metadata']['aid']+'/output/metadata/dad']=_0x18ce3c;}async['setState'](_0x4bdfd9){const _0x1b4fbb=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x332dba={};await this['bindJobState'](_0x332dba);const _0x59066c=this['authorizeEntry'](_0x332dba);this['bindDimensionalAddress'](_0x332dba),this['bindActivityState'](_0x332dba);const _0x7bf667=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x59066c],_0x14aba7=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x332dba,this['getJobStatus'](),_0x1b4fbb,_0x7bf667,_0x14aba7,_0x4bdfd9);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x3e1cf4=this['context']['$self'];!_0x3e1cf4['output']['metadata']&&(_0x3e1cf4['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x3e1cf4['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x21cd15=(0x0,utils_1['formatISODate'])(new Date());_0x3e1cf4['output']['metadata']['ac']=_0x21cd15,_0x3e1cf4['output']['metadata']['au']=_0x21cd15,_0x3e1cf4['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x3e1cf4['output']['metadata']['stp']=this['config']['subtype']),_0x3e1cf4['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x47d4a3){const _0x271732=await this['getTriggerConfig'](),_0xd831c7=[..._0x271732['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0xc49ae0 of _0xd831c7){const _0x4a71d7=(0x0,utils_1['getValueByPath'])(this['context'],_0xc49ae0);_0x4a71d7!==undefined&&(_0x47d4a3[_0xc49ae0]=_0x4a71d7);}for(const _0x5099c0 in this['context']?.['data']??{}){(_0x5099c0['startsWith']('-')||_0x5099c0['startsWith']('_'))&&(_0x47d4a3[_0x5099c0]=this['context']['data'][_0x5099c0]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x47d4a3,this['config'],this['context']);}['bindActivityState'](_0x31dbca){const _0x371194=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0x1021a2 of _0x371194){const _0x3a0233=this['metadata']['aid']+'/'+_0x1021a2,_0x228e6a=(0x0,utils_1['getValueByPath'])(this['context'],_0x3a0233);_0x228e6a!==undefined&&(_0x31dbca[_0x3a0233]=_0x228e6a);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x31dbca,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x5f5717=>'metadata/'+_0x5f5717);}['bindActivityMetadataPaths'](){const _0x15f42d=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x15f42d]['KEYS']['map'](_0x5617b3=>'output/metadata/'+_0x5617b3);}async['getState'](){const _0x21bebc=this['context']['metadata']['gid'],_0x4d56c4='$'+this['config']['subscribes'],_0x2634a5={[_0x4d56c4]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x475627=>'metadata/'+_0x475627)};for(let [_0x5ba4cd,_0x26171a]of Object['entries'](this['config']['consumes'])){if(_0x5ba4cd==='$job')for(const _0xabab87 of _0x26171a){_0x2634a5[_0x4d56c4]['push'](_0xabab87);}else{_0x5ba4cd==='$self'&&(_0x5ba4cd=this['metadata']['aid']);!_0x2634a5[_0x5ba4cd]&&(_0x2634a5[_0x5ba4cd]=[]);for(const _0xd36a1b of _0x26171a){_0x2634a5[_0x5ba4cd]['push'](_0x5ba4cd+'/'+_0xd36a1b);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0x2634a5,this['config'],this['metadata'],this['leg']);const {dad:_0x42ad77,jid:_0x25fcd1}=this['context']['metadata'],_0x5f3514=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x42ad77||''),[_0x49f552,_0x4bc809]=await this['store']['getState'](_0x25fcd1,_0x2634a5,_0x5f3514);this['context']=(0x0,utils_1['restoreHierarchy'])(_0x49f552),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x21bebc),this['initDimensionalAddress'](_0x42ad77),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x319ddb,_0x4aac68){if(_0x4aac68!==_0x319ddb)throw new errors_1['GenerationalError'](_0x319ddb,_0x4aac68,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0x2f6162){this['metadata']['dad']=_0x2f6162;}['initSelf'](_0x2a4f83){const _0x27454b=this['metadata']['aid'];!_0x2a4f83[_0x27454b]&&(_0x2a4f83[_0x27454b]={});const _0x3e640d=_0x2a4f83[_0x27454b];return!_0x3e640d['output']&&(_0x3e640d['output']={}),!_0x3e640d['input']&&(_0x3e640d['input']={}),!_0x3e640d['hook']&&(_0x3e640d['hook']={}),!_0x3e640d['output']['metadata']&&(_0x3e640d['output']['metadata']={}),_0x3e640d['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x2a4f83['$self']=_0x3e640d,_0x2a4f83['$job']=_0x2a4f83,_0x2a4f83;}['initPolicies'](_0x46782d){const _0x5440f0=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0x46782d);_0x46782d['metadata']['expire']=_0x5440f0;if(this['config']['persistent']!=undefined){const _0x197876=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0x46782d);_0x46782d['metadata']['persistent']=_0x197876;}}['bindActivityData'](_0x5576d5){this['context'][this['metadata']['aid']][_0x5576d5]['data']=this['data'];}['resolveDad'](){let _0x4c7f5c=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x4c7f5c=_0x4c7f5c['substring'](0x0,_0x4c7f5c['lastIndexOf'](','))+','+this['adjacentIndex']),_0x4c7f5c;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x5e262b=[],_0x5ab1f8=await this['store']['getTransitions'](await this['engine']['getVID']()),_0x2292b6=_0x5ab1f8['.'+this['metadata']['aid']],_0x3199af=this['resolveAdjacentDad']();if(_0x2292b6)for(const _0x212214 in _0x2292b6){const _0x436305=_0x2292b6[_0x212214];mapper_1['MapperService']['evaluate'](_0x436305,this['context'],this['code'])&&_0x5e262b['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x3199af,'aid':_0x212214,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x5e262b;}['isJobComplete'](_0x300d37){return _0x300d37<=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'](_0x548911,_0x3c3bcd){if(this['jobWasInterrupted'](_0x3c3bcd))return;let _0x26b0ff=[];(this['shouldEmit']()||this['isJobComplete'](_0x3c3bcd)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x3c3bcd)&&!this['shouldPersistJob']()});if(_0x548911['length']&&!this['isJobComplete'](_0x3c3bcd)){const _0x38dd76=this['store']['transact']();for(const _0x47530c of _0x548911){await this['engine']['router']?.['publishMessage'](null,_0x47530c,_0x38dd76);}_0x26b0ff=await _0x38dd76['exec']();}return _0x26b0ff;}['jobWasInterrupted'](_0x5c1b38){return _0x5c1b38<-0x5f5e100;}}function _0x20d0(){const _0x543fa2=['1303572dbjZCu','304059cwMZol','330124jvSfbr','612260MIFLIV','325145LFHTxV','670293vnIxLO','112qWMHtr','1249260pSFsCA'];_0x20d0=function(){return _0x543fa2;};return _0x20d0();}exports['Activity']=Activity;
@@ -1 +1 @@
1
- 'use strict';(function(_0x483647,_0x3f2ac3){const _0x3bbfe8=_0x2d44,_0xa815de=_0x483647();while(!![]){try{const _0x20bacc=parseInt(_0x3bbfe8(0x71))/0x1+-parseInt(_0x3bbfe8(0x74))/0x2+parseInt(_0x3bbfe8(0x70))/0x3+parseInt(_0x3bbfe8(0x72))/0x4*(-parseInt(_0x3bbfe8(0x77))/0x5)+-parseInt(_0x3bbfe8(0x76))/0x6+-parseInt(_0x3bbfe8(0x6f))/0x7+parseInt(_0x3bbfe8(0x75))/0x8*(parseInt(_0x3bbfe8(0x73))/0x9);if(_0x20bacc===_0x3f2ac3)break;else _0xa815de['push'](_0xa815de['shift']());}catch(_0x55aba5){_0xa815de['push'](_0xa815de['shift']());}}}(_0x4d88,0x80e8c));function _0x4d88(){const _0x219874=['1995004xxsjPo','27799632GnAAeH','2954562uSmKPi','1025QNYlAL','7386190FOgQqz','379476EGQVoq','345580fqyciS','17052UrVikL','9nBeqRi'];_0x4d88=function(){return _0x219874;};return _0x4d88();}function _0x2d44(_0x519b03,_0x3a512f){const _0x4d88ac=_0x4d88();return _0x2d44=function(_0x2d44f1,_0x40f7b0){_0x2d44f1=_0x2d44f1-0x6f;let _0x21d7f8=_0x4d88ac[_0x2d44f1];return _0x21d7f8;},_0x2d44(_0x519b03,_0x3a512f);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Await']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');class Await extends activity_1['Activity']{constructor(_0x2d56af,_0x25efca,_0x3af6bd,_0x6b0755,_0xaa2961,_0x486406){super(_0x2d56af,_0x25efca,_0x3af6bd,_0x6b0755,_0xaa2961,_0x486406);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x521446;try{await this['verifyEntry'](),_0x521446=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x521446['startActivitySpan'](this['leg']),this['mapInputData']();const _0x1d55d4=this['store']['transact'](),_0x2de67d=await this['execActivity'](_0x1d55d4);await collator_1['CollatorService']['authorizeReentry'](this,_0x1d55d4),await this['setState'](_0x1d55d4),await this['setStatus'](0x0,_0x1d55d4);const _0x433560=await _0x1d55d4['exec']();_0x521446['mapActivityAttributes']();const _0x2885c2=this['resolveStatus'](_0x433560);return _0x521446['setActivityAttributes']({'app.activity.mid':_0x2de67d,'app.job.jss':_0x2885c2}),this['context']['metadata']['aid'];}catch(_0xf621f9){if(_0xf621f9 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0xf621f9});return;}else{if(_0xf621f9 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0xf621f9});return;}else{if(_0xf621f9 instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0xf621f9});return;}else{if(_0xf621f9 instanceof errors_1['CollationError']){if(_0xf621f9['fault']==='duplicate'){this['logger']['info']('await-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('await-collation-error',{..._0xf621f9});}else this['logger']['error']('await-process-error',{..._0xf621f9});}}}_0x521446?.['setActivityError'](_0xf621f9['message']);throw _0xf621f9;}finally{_0x521446?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x1f9563){const _0x51ad6c=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x358423={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':this['metadata']['dad'],'aid':this['metadata']['aid'],'topic':_0x51ad6c,'spn':this['context']['$self']['output']['metadata']?.['l1s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['AWAIT'],'data':this['context']['data']};if(this['config']['await']!==!![]){const _0x3f8178=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x3f8178===![]&&(_0x358423['metadata']['await']=![]);}return this['config']['retry']&&(_0x358423['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x358423,_0x1f9563);}}exports['Await']=Await;
1
+ 'use strict';(function(_0x2fc717,_0x428e0f){const _0x3c3869=_0x5ba6,_0x1cfa96=_0x2fc717();while(!![]){try{const _0x58ef44=-parseInt(_0x3c3869(0xbf))/0x1*(parseInt(_0x3c3869(0xbc))/0x2)+-parseInt(_0x3c3869(0xba))/0x3+-parseInt(_0x3c3869(0xbe))/0x4*(-parseInt(_0x3c3869(0xc0))/0x5)+-parseInt(_0x3c3869(0xb9))/0x6*(parseInt(_0x3c3869(0xbb))/0x7)+parseInt(_0x3c3869(0xbd))/0x8+parseInt(_0x3c3869(0xb8))/0x9+parseInt(_0x3c3869(0xc1))/0xa;if(_0x58ef44===_0x428e0f)break;else _0x1cfa96['push'](_0x1cfa96['shift']());}catch(_0x3a3fde){_0x1cfa96['push'](_0x1cfa96['shift']());}}}(_0x31c9,0x4939a));function _0x31c9(){const _0x50eb93=['2GtFgJR','526680XCSePO','13492lVFqhS','336911pzfnVS','135wHVyPN','11996310hcCzKi','12303aaEaBs','642MBJEVZ','787383QzKXdP','30002THPgbI'];_0x31c9=function(){return _0x50eb93;};return _0x31c9();}function _0x5ba6(_0xb02e10,_0xc091fe){const _0x31c9d2=_0x31c9();return _0x5ba6=function(_0x5ba6eb,_0x78bf4d){_0x5ba6eb=_0x5ba6eb-0xb8;let _0x5343b1=_0x31c9d2[_0x5ba6eb];return _0x5343b1;},_0x5ba6(_0xb02e10,_0xc091fe);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Await']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');class Await extends activity_1['Activity']{constructor(_0x3adb8c,_0xa8c846,_0xd176dd,_0x34c1b9,_0x11303e,_0x30b3e0){super(_0x3adb8c,_0xa8c846,_0xd176dd,_0x34c1b9,_0x11303e,_0x30b3e0);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0xa93543;try{await this['verifyEntry'](),_0xa93543=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0xa93543['startActivitySpan'](this['leg']),this['mapInputData']();const _0x3557db=this['store']['transact'](),_0x52283a=await this['execActivity'](_0x3557db);await collator_1['CollatorService']['authorizeReentry'](this,_0x3557db),await this['setState'](_0x3557db),await this['setStatus'](0x0,_0x3557db);const _0x598620=await _0x3557db['exec']();_0xa93543['mapActivityAttributes']();const _0x135e67=this['resolveStatus'](_0x598620);return _0xa93543['setActivityAttributes']({'app.activity.mid':_0x52283a,'app.job.jss':_0x135e67}),this['context']['metadata']['aid'];}catch(_0x3fae98){if(_0x3fae98 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x3fae98});return;}else{if(_0x3fae98 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x3fae98});return;}else{if(_0x3fae98 instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0x3fae98});return;}else{if(_0x3fae98 instanceof errors_1['CollationError']){if(_0x3fae98['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',{..._0x3fae98});}else this['logger']['error']('await-process-error',{..._0x3fae98});}}}_0xa93543?.['setActivityError'](_0x3fae98['message']);throw _0x3fae98;}finally{_0xa93543?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x30ea48){const _0x35abaa=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x2fbb7f={'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':_0x35abaa,'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 _0x4b1d3e=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x4b1d3e===![]&&(_0x2fbb7f['metadata']['await']=![]);}return this['config']['retry']&&(_0x2fbb7f['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x2fbb7f,_0x30ea48);}}exports['Await']=Await;
@@ -1 +1 @@
1
- 'use strict';(function(_0x205c18,_0x164f42){const _0x1f001d=_0x3596,_0x54fa59=_0x205c18();while(!![]){try{const _0x5c61b2=parseInt(_0x1f001d(0x18c))/0x1*(parseInt(_0x1f001d(0x18a))/0x2)+parseInt(_0x1f001d(0x18d))/0x3+parseInt(_0x1f001d(0x189))/0x4+parseInt(_0x1f001d(0x186))/0x5*(parseInt(_0x1f001d(0x187))/0x6)+-parseInt(_0x1f001d(0x188))/0x7+parseInt(_0x1f001d(0x18b))/0x8+parseInt(_0x1f001d(0x184))/0x9*(-parseInt(_0x1f001d(0x185))/0xa);if(_0x5c61b2===_0x164f42)break;else _0x54fa59['push'](_0x54fa59['shift']());}catch(_0x51fd28){_0x54fa59['push'](_0x54fa59['shift']());}}}(_0x3898,0x75125));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Cycle']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Cycle extends activity_1['Activity']{constructor(_0xc5c3c5,_0x77ff2d,_0x48f387,_0x9e3d3,_0x2f7ca0,_0xfc0d1){super(_0xc5c3c5,_0x77ff2d,_0x48f387,_0x9e3d3,_0x2f7ca0,_0xfc0d1);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x5de5d5;try{await this['verifyEntry'](),_0x5de5d5=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5de5d5['startActivitySpan'](this['leg']),this['mapInputData']();let _0x4d6475=this['store']['transact']();await this['setState'](_0x4d6475),await this['setStatus'](0x0,_0x4d6475);const _0x379134=await _0x4d6475['exec']();_0x5de5d5['mapActivityAttributes']();const _0x3c9466=this['resolveStatus'](_0x379134);_0x4d6475=this['store']['transact']();const _0x12ff3c=await this['cycleAncestorActivity'](_0x4d6475);return _0x5de5d5['setActivityAttributes']({'app.activity.mid':_0x12ff3c,'app.job.jss':_0x3c9466}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0x4d6475),await _0x4d6475['exec'](),this['context']['metadata']['aid'];}catch(_0x1333b1){if(_0x1333b1 instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x1333b1});return;}else{if(_0x1333b1 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x1333b1});return;}else{if(_0x1333b1 instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x1333b1});return;}else{if(_0x1333b1 instanceof errors_1['CollationError']){if(_0x1333b1['fault']==='duplicate'){this['logger']['info']('cycle-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('cycle-collation-error',{..._0x1333b1});}else this['logger']['error']('cycle-process-error',{..._0x1333b1});}}}_0x5de5d5?.['setActivityError'](_0x1333b1['message']);throw _0x1333b1;}finally{_0x5de5d5?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0x3c083c){this['mapInputData']();const _0x2528e4={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':collator_1['CollatorService']['resolveReentryDimension'](this),'aid':this['config']['ancestor'],'spn':this['context']['$self']['output']['metadata']?.['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return await this['engine']['router']?.['publishMessage'](null,_0x2528e4,_0x3c083c);}}function _0x3898(){const _0x2654a2=['3410UaYEwZ','4572DSZrjY','2762522kFBqqj','1690024eHKYdt','2UMruGJ','4157464hLfVbK','101485IiSILl','1200078KOOimY','171981uBnOxe','570QbyKZl'];_0x3898=function(){return _0x2654a2;};return _0x3898();}function _0x3596(_0x29b4ec,_0x37db09){const _0x389894=_0x3898();return _0x3596=function(_0x3596e8,_0x50a174){_0x3596e8=_0x3596e8-0x184;let _0x56281b=_0x389894[_0x3596e8];return _0x56281b;},_0x3596(_0x29b4ec,_0x37db09);}exports['Cycle']=Cycle;
1
+ 'use strict';function _0x46b4(_0x185874,_0x50345b){const _0x2317fd=_0x2317();return _0x46b4=function(_0x46b4d7,_0x54f8cc){_0x46b4d7=_0x46b4d7-0x155;let _0x987565=_0x2317fd[_0x46b4d7];return _0x987565;},_0x46b4(_0x185874,_0x50345b);}(function(_0x2b6586,_0x3d9154){const _0x4f83fa=_0x46b4,_0x1fd2e8=_0x2b6586();while(!![]){try{const _0x272d6c=-parseInt(_0x4f83fa(0x15f))/0x1*(-parseInt(_0x4f83fa(0x15d))/0x2)+parseInt(_0x4f83fa(0x159))/0x3*(-parseInt(_0x4f83fa(0x15e))/0x4)+parseInt(_0x4f83fa(0x156))/0x5*(parseInt(_0x4f83fa(0x15b))/0x6)+-parseInt(_0x4f83fa(0x15c))/0x7*(-parseInt(_0x4f83fa(0x158))/0x8)+parseInt(_0x4f83fa(0x155))/0x9+-parseInt(_0x4f83fa(0x157))/0xa+-parseInt(_0x4f83fa(0x15a))/0xb;if(_0x272d6c===_0x3d9154)break;else _0x1fd2e8['push'](_0x1fd2e8['shift']());}catch(_0x18800c){_0x1fd2e8['push'](_0x1fd2e8['shift']());}}}(_0x2317,0x7ee60));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Cycle']=void 0x0;function _0x2317(){const _0x2d0d63=['2mIktOw','4VsQXBy','37587ZwGxfw','4219173QzGUXo','5faApUN','6245190quyiKp','60392ghlMJf','785931IhKcEK','3808409KvXMcp','5664882TqeZdb','280ARvWsE'];_0x2317=function(){return _0x2d0d63;};return _0x2317();}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(_0x25fc9d,_0x6e841b,_0x37b32b,_0x26f86e,_0x310e51,_0x4c1640){super(_0x25fc9d,_0x6e841b,_0x37b32b,_0x26f86e,_0x310e51,_0x4c1640);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x28c0b8;try{await this['verifyEntry'](),_0x28c0b8=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x28c0b8['startActivitySpan'](this['leg']),this['mapInputData']();let _0x1a8b2a=this['store']['transact']();await this['setState'](_0x1a8b2a),await this['setStatus'](0x0,_0x1a8b2a);const _0x2f8e4a=await _0x1a8b2a['exec']();_0x28c0b8['mapActivityAttributes']();const _0x518ebd=this['resolveStatus'](_0x2f8e4a);_0x1a8b2a=this['store']['transact']();const _0x144d70=await this['cycleAncestorActivity'](_0x1a8b2a);return _0x28c0b8['setActivityAttributes']({'app.activity.mid':_0x144d70,'app.job.jss':_0x518ebd}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0x1a8b2a),await _0x1a8b2a['exec'](),this['context']['metadata']['aid'];}catch(_0x3e0d29){if(_0x3e0d29 instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x3e0d29});return;}else{if(_0x3e0d29 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x3e0d29});return;}else{if(_0x3e0d29 instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x3e0d29});return;}else{if(_0x3e0d29 instanceof errors_1['CollationError']){if(_0x3e0d29['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',{..._0x3e0d29});}else this['logger']['error']('cycle-process-error',{..._0x3e0d29});}}}_0x28c0b8?.['setActivityError'](_0x3e0d29['message']);throw _0x3e0d29;}finally{_0x28c0b8?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0xb6a1cc){this['mapInputData']();const _0x223351={'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,_0x223351,_0xb6a1cc);}}exports['Cycle']=Cycle;
@@ -1 +1 @@
1
- 'use strict';(function(_0x170588,_0x23d93a){const _0x1c5e60=_0x4299,_0x54c181=_0x170588();while(!![]){try{const _0x352308=-parseInt(_0x1c5e60(0x1c8))/0x1+parseInt(_0x1c5e60(0x1c9))/0x2*(-parseInt(_0x1c5e60(0x1cf))/0x3)+parseInt(_0x1c5e60(0x1d1))/0x4+parseInt(_0x1c5e60(0x1cc))/0x5+parseInt(_0x1c5e60(0x1ca))/0x6+-parseInt(_0x1c5e60(0x1cd))/0x7*(parseInt(_0x1c5e60(0x1d0))/0x8)+parseInt(_0x1c5e60(0x1ce))/0x9*(parseInt(_0x1c5e60(0x1cb))/0xa);if(_0x352308===_0x23d93a)break;else _0x54c181['push'](_0x54c181['shift']());}catch(_0x1f725a){_0x54c181['push'](_0x54c181['shift']());}}}(_0x4919,0xd4b5b));function _0x4299(_0x2cd789,_0x49e111){const _0x4919c9=_0x4919();return _0x4299=function(_0x4299dc,_0x3d4a9f){_0x4299dc=_0x4299dc-0x1c8;let _0x788d42=_0x4919c9[_0x4299dc];return _0x788d42;},_0x4299(_0x2cd789,_0x49e111);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Hook']=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),task_1=require('../task'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');class Hook extends activity_1['Activity']{constructor(_0x5ec456,_0x16d6eb,_0x586ea0,_0x399838,_0x8e848e,_0x27e50d){super(_0x5ec456,_0x16d6eb,_0x586ea0,_0x399838,_0x8e848e,_0x27e50d);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x68f2ac;try{return await this['verifyEntry'](),_0x68f2ac=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x68f2ac['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x68f2ac):await this['doPassThrough'](_0x68f2ac),this['context']['metadata']['aid'];}catch(_0x58881e){if(_0x58881e instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x58881e});return;}else{if(_0x58881e instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x58881e});return;}else{if(_0x58881e instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x58881e});return;}else{if(_0x58881e instanceof errors_1['CollationError']){if(_0x58881e['fault']==='duplicate'){this['logger']['info']('hook-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('hook-collation-error',{..._0x58881e});}else this['logger']['error']('hook-process-error',{..._0x58881e});}}}_0x68f2ac?.['setActivityError'](_0x58881e['message']);throw _0x58881e;}finally{_0x68f2ac?.['endActivitySpan'](),this['logger']['debug']('hook-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}['doesHook'](){if(this['config']['sleep']){const _0x47f36c=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x47f36c)&&Number(_0x47f36c)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x112db4){const _0x43139b=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x43139b),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x43139b),await collator_1['CollatorService']['authorizeReentry'](this,_0x43139b),await this['setStatus'](0x0,_0x43139b),await _0x43139b['exec'](),_0x112db4['mapActivityAttributes']();}async['doPassThrough'](_0x8e0f0a){const _0x522189=this['store']['transact']();let _0x4d931c;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x522189),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x522189),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x522189),_0x4d931c=await _0x522189['exec'](),_0x8e0f0a['mapActivityAttributes']();const _0x4061e9=this['resolveStatus'](_0x4d931c),_0x43ec3a={'app.job.jss':_0x4061e9},_0x127842=await this['transition'](this['adjacencyList'],_0x4061e9);_0x127842['length']&&(_0x43ec3a['app.activity.mids']=_0x127842['join'](',')),_0x8e0f0a['setActivityAttributes'](_0x43ec3a);}async['getHookRule'](_0x530e2d){const _0x2f5743=await this['store']['getHookRules']();return _0x2f5743?.[_0x530e2d]?.[0x0];}async['registerHook'](_0x31ec8e){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x31ec8e);else{if(this['config']['sleep']){const _0x4cd3ad=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return await this['engine']['taskService']['registerTimeHook'](this['context']['metadata']['jid'],this['context']['metadata']['gid'],''+this['metadata']['aid']+(this['metadata']['dad']||''),'sleep',_0x4cd3ad,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x21f8c5=stream_1['StreamStatus']['SUCCESS'],_0x2c0375=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x21f8c5,'code':_0x2c0375});const _0x38a282=new task_1['TaskService'](this['store'],this['logger']),_0xbd42b8={...this['data']},_0x5f05b5=await _0x38a282['processWebHookSignal'](this['config']['hook']['topic'],_0xbd42b8);if(_0x5f05b5){const [_0x4f5b55,_0x40157f,_0x4dbf09,_0x72cda5]=_0x5f05b5;this['context']['metadata']['jid']=_0x4f5b55,this['context']['metadata']['gid']=_0x72cda5,this['context']['metadata']['dad']=_0x4dbf09,await this['processEvent'](_0x21f8c5,_0x2c0375,'hook'),_0x2c0375===0xc8&&await _0x38a282['deleteWebHookSignal'](this['config']['hook']['topic'],_0xbd42b8);}}async['processTimeHookEvent'](_0x1af847){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x1af847,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}function _0x4919(){const _0x489ac3=['542040QAYuaV','15376740bySpMG','1746460xevNtt','1002624emNsqy','18iuSLlO','45831FunrJa','96xewcsl','595944ANtRWY','126749JWhHsy','124ScOTQD'];_0x4919=function(){return _0x489ac3;};return _0x4919();}exports['Hook']=Hook;
1
+ 'use strict';(function(_0xf49f04,_0x4eb98d){const _0x576364=_0x16dd,_0x520a8a=_0xf49f04();while(!![]){try{const _0x3a5745=parseInt(_0x576364(0x1b5))/0x1+parseInt(_0x576364(0x1bc))/0x2*(-parseInt(_0x576364(0x1b8))/0x3)+-parseInt(_0x576364(0x1be))/0x4+-parseInt(_0x576364(0x1b7))/0x5*(-parseInt(_0x576364(0x1ba))/0x6)+-parseInt(_0x576364(0x1b6))/0x7+parseInt(_0x576364(0x1bb))/0x8*(-parseInt(_0x576364(0x1b9))/0x9)+-parseInt(_0x576364(0x1b4))/0xa*(-parseInt(_0x576364(0x1bd))/0xb);if(_0x3a5745===_0x4eb98d)break;else _0x520a8a['push'](_0x520a8a['shift']());}catch(_0x1d2640){_0x520a8a['push'](_0x520a8a['shift']());}}}(_0x43e0,0x19b78));function _0x43e0(){const _0x59075c=['721892BWLjIc','50TVDqpJ','63191hrkLvX','768103wKWnWX','175QZLgMv','6KwUfcA','16857RMZiEy','28686qjPHRG','696sGPPdy','82492RtseUf','903001HZzgsT'];_0x43e0=function(){return _0x59075c;};return _0x43e0();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Hook']=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),task_1=require('../task'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');function _0x16dd(_0x1a1dbf,_0x27cab9){const _0x43e028=_0x43e0();return _0x16dd=function(_0x16dd3a,_0x1a67b4){_0x16dd3a=_0x16dd3a-0x1b4;let _0x339e8e=_0x43e028[_0x16dd3a];return _0x339e8e;},_0x16dd(_0x1a1dbf,_0x27cab9);}class Hook extends activity_1['Activity']{constructor(_0x5bd654,_0x15a78d,_0x364b2c,_0x2f6d06,_0x13fc5c,_0x3ab673){super(_0x5bd654,_0x15a78d,_0x364b2c,_0x2f6d06,_0x13fc5c,_0x3ab673);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x5a5c04;try{return await this['verifyEntry'](),_0x5a5c04=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5a5c04['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x5a5c04):await this['doPassThrough'](_0x5a5c04),this['context']['metadata']['aid'];}catch(_0x42d352){if(_0x42d352 instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x42d352});return;}else{if(_0x42d352 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x42d352});return;}else{if(_0x42d352 instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x42d352});return;}else{if(_0x42d352 instanceof errors_1['CollationError']){if(_0x42d352['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',{..._0x42d352});}else this['logger']['error']('hook-process-error',{..._0x42d352});}}}_0x5a5c04?.['setActivityError'](_0x42d352['message']);throw _0x42d352;}finally{_0x5a5c04?.['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 _0x21b6a6=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x21b6a6)&&Number(_0x21b6a6)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0xbfb9ac){const _0x2f657b=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x2f657b),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x2f657b),await collator_1['CollatorService']['authorizeReentry'](this,_0x2f657b),await this['setStatus'](0x0,_0x2f657b),await _0x2f657b['exec'](),_0xbfb9ac['mapActivityAttributes']();}async['doPassThrough'](_0x318278){const _0x25638e=this['store']['transact']();let _0x42e877;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x25638e),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x25638e),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x25638e),_0x42e877=await _0x25638e['exec'](),_0x318278['mapActivityAttributes']();const _0x3eec29=this['resolveStatus'](_0x42e877),_0x55f8ec={'app.job.jss':_0x3eec29},_0x2748db=await this['transition'](this['adjacencyList'],_0x3eec29);_0x2748db['length']&&(_0x55f8ec['app.activity.mids']=_0x2748db['join'](',')),_0x318278['setActivityAttributes'](_0x55f8ec);}async['getHookRule'](_0x2188bb){const _0x458ac3=await this['store']['getHookRules']();return _0x458ac3?.[_0x2188bb]?.[0x0];}async['registerHook'](_0xe40811){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0xe40811);else{if(this['config']['sleep']){const _0x309f67=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',_0x309f67,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x55f999=stream_1['StreamStatus']['SUCCESS'],_0x78a68c=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x55f999,'code':_0x78a68c});const _0x50066b=new task_1['TaskService'](this['store'],this['logger']),_0x5bebb7={...this['data']},_0x460692=await _0x50066b['processWebHookSignal'](this['config']['hook']['topic'],_0x5bebb7);if(_0x460692){const [_0x171819,_0x5ed1af,_0x4bfd5f,_0x35b84d]=_0x460692;this['context']['metadata']['jid']=_0x171819,this['context']['metadata']['gid']=_0x35b84d,this['context']['metadata']['dad']=_0x4bfd5f,await this['processEvent'](_0x55f999,_0x78a68c,'hook'),_0x78a68c===0xc8&&await _0x50066b['deleteWebHookSignal'](this['config']['hook']['topic'],_0x5bebb7);}}async['processTimeHookEvent'](_0x1ef5cc){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x1ef5cc,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}exports['Hook']=Hook;
@@ -1 +1 @@
1
- 'use strict';(function(_0x180c22,_0x2c26b7){const _0x7dd0d9=_0x5cff,_0x546256=_0x180c22();while(!![]){try{const _0x5089c7=-parseInt(_0x7dd0d9(0x110))/0x1+parseInt(_0x7dd0d9(0x107))/0x2+-parseInt(_0x7dd0d9(0x10e))/0x3*(-parseInt(_0x7dd0d9(0x10b))/0x4)+parseInt(_0x7dd0d9(0x10d))/0x5*(-parseInt(_0x7dd0d9(0x111))/0x6)+parseInt(_0x7dd0d9(0x10c))/0x7+parseInt(_0x7dd0d9(0x108))/0x8*(parseInt(_0x7dd0d9(0x10f))/0x9)+-parseInt(_0x7dd0d9(0x109))/0xa*(parseInt(_0x7dd0d9(0x10a))/0xb);if(_0x5089c7===_0x2c26b7)break;else _0x546256['push'](_0x546256['shift']());}catch(_0x3c4c60){_0x546256['push'](_0x546256['shift']());}}}(_0x214c,0xcf009));function _0x214c(){const _0xdb7767=['1912ZQlpzA','109390ehIiDG','704fWcSMe','21220MQHVUn','6175498HqQVLT','1024065ttTXbo','813UZAaSj','5958uJMXsq','943139TVlpjF','12JAtZup','845310XGQugb'];_0x214c=function(){return _0xdb7767;};return _0x214c();}function _0x5cff(_0x9e598b,_0x32b18f){const _0x214c1a=_0x214c();return _0x5cff=function(_0x5cff17,_0x369b7f){_0x5cff17=_0x5cff17-0x107;let _0x58f0a0=_0x214c1a[_0x5cff17];return _0x58f0a0;},_0x5cff(_0x9e598b,_0x32b18f);}Object['defineProperty'](exports,'__esModule',{'value':!![]});const activity_1=require('./activity'),await_1=require('./await'),cycle_1=require('./cycle'),hook_1=require('./hook'),interrupt_1=require('./interrupt'),signal_1=require('./signal'),trigger_1=require('./trigger'),worker_1=require('./worker');exports['default']={'activity':activity_1['Activity'],'await':await_1['Await'],'cycle':cycle_1['Cycle'],'hook':hook_1['Hook'],'interrupt':interrupt_1['Interrupt'],'signal':signal_1['Signal'],'trigger':trigger_1['Trigger'],'worker':worker_1['Worker']};
1
+ 'use strict';function _0x5569(){const _0x287b47=['146350EVSPuL','24UeMxdV','2251294UNZsGT','2992479yhxGxy','3526068ADZUYV','5216748vIkNrn','7629310mnTENf','1980UobxsY','1761287GAmAHs','3Bgdose'];_0x5569=function(){return _0x287b47;};return _0x5569();}(function(_0xacc002,_0x822f99){const _0x18aecd=_0x9855,_0x1fe03a=_0xacc002();while(!![]){try{const _0x5e5011=-parseInt(_0x18aecd(0x121))/0x1+parseInt(_0x18aecd(0x125))/0x2*(parseInt(_0x18aecd(0x122))/0x3)+-parseInt(_0x18aecd(0x11e))/0x4+parseInt(_0x18aecd(0x11f))/0x5+-parseInt(_0x18aecd(0x11d))/0x6+parseInt(_0x18aecd(0x11c))/0x7*(-parseInt(_0x18aecd(0x124))/0x8)+parseInt(_0x18aecd(0x120))/0x9*(parseInt(_0x18aecd(0x123))/0xa);if(_0x5e5011===_0x822f99)break;else _0x1fe03a['push'](_0x1fe03a['shift']());}catch(_0xbcebeb){_0x1fe03a['push'](_0x1fe03a['shift']());}}}(_0x5569,0xe468e));Object['defineProperty'](exports,'__esModule',{'value':!![]});function _0x9855(_0x3b3571,_0xdae485){const _0x55697d=_0x5569();return _0x9855=function(_0x985596,_0x1b1669){_0x985596=_0x985596-0x11c;let _0x10752b=_0x55697d[_0x985596];return _0x10752b;},_0x9855(_0x3b3571,_0xdae485);}const activity_1=require('./activity'),await_1=require('./await'),cycle_1=require('./cycle'),hook_1=require('./hook'),interrupt_1=require('./interrupt'),signal_1=require('./signal'),trigger_1=require('./trigger'),worker_1=require('./worker');exports['default']={'activity':activity_1['Activity'],'await':await_1['Await'],'cycle':cycle_1['Cycle'],'hook':hook_1['Hook'],'interrupt':interrupt_1['Interrupt'],'signal':signal_1['Signal'],'trigger':trigger_1['Trigger'],'worker':worker_1['Worker']};
@@ -1 +1 @@
1
- 'use strict';(function(_0xdd270f,_0x37fd80){const _0x330c75=_0x517e,_0xeb9aa1=_0xdd270f();while(!![]){try{const _0x434dba=parseInt(_0x330c75(0x199))/0x1*(parseInt(_0x330c75(0x197))/0x2)+parseInt(_0x330c75(0x194))/0x3*(-parseInt(_0x330c75(0x198))/0x4)+parseInt(_0x330c75(0x193))/0x5+-parseInt(_0x330c75(0x191))/0x6*(-parseInt(_0x330c75(0x190))/0x7)+-parseInt(_0x330c75(0x196))/0x8+-parseInt(_0x330c75(0x192))/0x9+parseInt(_0x330c75(0x195))/0xa;if(_0x434dba===_0x37fd80)break;else _0xeb9aa1['push'](_0xeb9aa1['shift']());}catch(_0x3608da){_0xeb9aa1['push'](_0xeb9aa1['shift']());}}}(_0x5168,0x52461));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Interrupt']=void 0x0;function _0x5168(){const _0x2576b0=['8AesACS','1bETqIQ','280Kidgzs','64266wiKyzH','5664051bUoNam','2474115sMqIKW','452586HOtxip','322640zzEisG','1757352uuFkTh','1064396OWKFiH'];_0x5168=function(){return _0x2576b0;};return _0x5168();}const errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');function _0x517e(_0x750dac,_0x11bb8f){const _0x5168ea=_0x5168();return _0x517e=function(_0x517e8e,_0x2a2634){_0x517e8e=_0x517e8e-0x190;let _0x77c378=_0x5168ea[_0x517e8e];return _0x77c378;},_0x517e(_0x750dac,_0x11bb8f);}class Interrupt extends activity_1['Activity']{constructor(_0x4a339f,_0x4d5bcc,_0x5f51fc,_0x424984,_0x428674,_0x276d47){super(_0x4a339f,_0x4d5bcc,_0x5f51fc,_0x424984,_0x428674,_0x276d47);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x142ddf;try{await this['verifyEntry'](),_0x142ddf=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x142ddf['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x142ddf):await this['interruptAnother'](_0x142ddf);}catch(_0x59142){if(_0x59142 instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x59142});return;}else{if(_0x59142 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x59142});return;}else{if(_0x59142 instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x59142});return;}else{if(_0x59142 instanceof errors_1['CollationError']){if(_0x59142['fault']==='duplicate'){this['logger']['info']('interrupt-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('interrupt-collation-error',{..._0x59142});}else this['logger']['error']('interrupt-process-error',{..._0x59142});}}}_0x142ddf?.['setActivityError'](_0x59142['message']);throw _0x59142;}finally{_0x142ddf?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x188080){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x17d868=await this['interrupt']();_0x188080['mapActivityAttributes']();const _0x4831b9=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x4831b9),await this['setStatus'](-0x1,_0x4831b9);const _0x311f93=await _0x4831b9['exec'](),_0x235b44=this['resolveStatus'](_0x311f93);return _0x188080['setActivityAttributes']({'app.activity.mid':_0x17d868,'app.job.jss':_0x235b44}),this['context']['metadata']['aid'];}async['interruptAnother'](_0x6595df){const _0x84e6e5=await this['interrupt'](),_0x3d58cc={'app.activity.mid':_0x84e6e5};_0x6595df['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x443e66=this['store']['transact']();await this['setState'](_0x443e66);}const _0x2b9e16=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x2b9e16),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x2b9e16);const _0x17e7a3=await _0x2b9e16['exec'](),_0x2477dd=this['resolveStatus'](_0x17e7a3);_0x3d58cc['app.job.jss']=_0x2477dd;const _0x3c632f=await this['transition'](this['adjacencyList'],_0x2477dd);return _0x3c632f['length']&&(_0x3d58cc['app.activity.mids']=_0x3c632f['join'](',')),_0x6595df['setActivityAttributes'](_0x3d58cc),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x129295=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x129295==this['context']['metadata']['jid'];}['resolveInterruptOptions'](){return{'reason':this['config']['reason']!==undefined?pipe_1['Pipe']['resolve'](this['config']['reason'],this['context']):undefined,'throw':this['config']['throw']!==undefined?pipe_1['Pipe']['resolve'](this['config']['throw'],this['context']):undefined,'descend':this['config']['descend']!==undefined?pipe_1['Pipe']['resolve'](this['config']['descend'],this['context']):undefined,'code':this['config']['code']!==undefined?pipe_1['Pipe']['resolve'](this['config']['code'],this['context']):undefined,'expire':this['config']['expire']!==undefined?pipe_1['Pipe']['resolve'](this['config']['expire'],this['context']):undefined,'stack':this['config']['stack']!==undefined?pipe_1['Pipe']['resolve'](this['config']['stack'],this['context']):undefined};}async['interrupt'](){const _0x44cd4a=this['resolveInterruptOptions']();return await this['engine']['interrupt'](this['config']['topic']!==undefined?pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']):this['context']['metadata']['tpc'],this['config']['target']!==undefined?pipe_1['Pipe']['resolve'](this['config']['target'],this['context']):this['context']['metadata']['jid'],_0x44cd4a);}}exports['Interrupt']=Interrupt;
1
+ 'use strict';(function(_0x212363,_0x351f6d){const _0x4aad0e=_0x454d,_0x3c4929=_0x212363();while(!![]){try{const _0xfd6327=-parseInt(_0x4aad0e(0xa0))/0x1+parseInt(_0x4aad0e(0x99))/0x2+parseInt(_0x4aad0e(0x9a))/0x3*(-parseInt(_0x4aad0e(0xa1))/0x4)+-parseInt(_0x4aad0e(0x96))/0x5*(-parseInt(_0x4aad0e(0x9b))/0x6)+parseInt(_0x4aad0e(0x9d))/0x7*(-parseInt(_0x4aad0e(0x9c))/0x8)+parseInt(_0x4aad0e(0x97))/0x9*(parseInt(_0x4aad0e(0x9e))/0xa)+-parseInt(_0x4aad0e(0x98))/0xb*(-parseInt(_0x4aad0e(0x9f))/0xc);if(_0xfd6327===_0x351f6d)break;else _0x3c4929['push'](_0x3c4929['shift']());}catch(_0x4acad5){_0x3c4929['push'](_0x3c4929['shift']());}}}(_0x153d,0xb6acc));function _0x153d(){const _0x2bb62a=['7721288FmDDtR','7rsfDeO','190JnaDKs','36mxrtoP','1389467wtOnRc','7352ElCXjb','5708350pYvrBs','169038XCVNBV','7769278VwPGtN','1036796Kigpfq','1686llGbrJ','6wtOSqE'];_0x153d=function(){return _0x2bb62a;};return _0x153d();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Interrupt']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');function _0x454d(_0x1ac4e2,_0x1f259b){const _0x153dcc=_0x153d();return _0x454d=function(_0x454d46,_0x116001){_0x454d46=_0x454d46-0x96;let _0xcd999a=_0x153dcc[_0x454d46];return _0xcd999a;},_0x454d(_0x1ac4e2,_0x1f259b);}class Interrupt extends activity_1['Activity']{constructor(_0x258aae,_0x1ca944,_0x2d26cd,_0x450f4e,_0x49495d,_0x51ea7b){super(_0x258aae,_0x1ca944,_0x2d26cd,_0x450f4e,_0x49495d,_0x51ea7b);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x57ad21;try{await this['verifyEntry'](),_0x57ad21=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x57ad21['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x57ad21):await this['interruptAnother'](_0x57ad21);}catch(_0x561f19){if(_0x561f19 instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x561f19});return;}else{if(_0x561f19 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x561f19});return;}else{if(_0x561f19 instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x561f19});return;}else{if(_0x561f19 instanceof errors_1['CollationError']){if(_0x561f19['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',{..._0x561f19});}else this['logger']['error']('interrupt-process-error',{..._0x561f19});}}}_0x57ad21?.['setActivityError'](_0x561f19['message']);throw _0x561f19;}finally{_0x57ad21?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x58b891){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x155e7e=await this['interrupt']();_0x58b891['mapActivityAttributes']();const _0x21a51f=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x21a51f),await this['setStatus'](-0x1,_0x21a51f);const _0x4d44c8=await _0x21a51f['exec'](),_0x2f0a25=this['resolveStatus'](_0x4d44c8);return _0x58b891['setActivityAttributes']({'app.activity.mid':_0x155e7e,'app.job.jss':_0x2f0a25}),this['context']['metadata']['aid'];}async['interruptAnother'](_0x33e98e){const _0x1772b4=await this['interrupt'](),_0x1f28db={'app.activity.mid':_0x1772b4};_0x33e98e['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x18cb85=this['store']['transact']();await this['setState'](_0x18cb85);}const _0x1808d0=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x1808d0),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x1808d0);const _0x326e4a=await _0x1808d0['exec'](),_0x3ef6b6=this['resolveStatus'](_0x326e4a);_0x1f28db['app.job.jss']=_0x3ef6b6;const _0x296a9e=await this['transition'](this['adjacencyList'],_0x3ef6b6);return _0x296a9e['length']&&(_0x1f28db['app.activity.mids']=_0x296a9e['join'](',')),_0x33e98e['setActivityAttributes'](_0x1f28db),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x2b713d=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x2b713d==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 _0x89410b=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'],_0x89410b);}}exports['Interrupt']=Interrupt;
@@ -1 +1 @@
1
- 'use strict';function _0x5e28(_0x5ed500,_0x37537e){const _0x1e7883=_0x1e78();return _0x5e28=function(_0x5e2812,_0x54d62a){_0x5e2812=_0x5e2812-0x75;let _0x53d775=_0x1e7883[_0x5e2812];return _0x53d775;},_0x5e28(_0x5ed500,_0x37537e);}function _0x1e78(){const _0x6a0d68=['6068Wvjhfb','338142RouauL','9hkMpqO','357MmNzJT','1cAuSpF','320022hldkcN','12LrKhEu','11244558jryCse','1068670uexyQe','9012WKFXUp','10434017lmanRl','435fvluou','32XqyGqi'];_0x1e78=function(){return _0x6a0d68;};return _0x1e78();}(function(_0x3432c3,_0x397eda){const _0x495509=_0x5e28,_0x3de935=_0x3432c3();while(!![]){try{const _0x3aadd3=-parseInt(_0x495509(0x7b))/0x1*(-parseInt(_0x495509(0x7c))/0x2)+-parseInt(_0x495509(0x7a))/0x3*(-parseInt(_0x495509(0x77))/0x4)+parseInt(_0x495509(0x75))/0x5*(parseInt(_0x495509(0x80))/0x6)+-parseInt(_0x495509(0x78))/0x7*(-parseInt(_0x495509(0x76))/0x8)+parseInt(_0x495509(0x79))/0x9*(-parseInt(_0x495509(0x7f))/0xa)+-parseInt(_0x495509(0x81))/0xb*(-parseInt(_0x495509(0x7d))/0xc)+-parseInt(_0x495509(0x7e))/0xd;if(_0x3aadd3===_0x397eda)break;else _0x3de935['push'](_0x3de935['shift']());}catch(_0x3c32f7){_0x3de935['push'](_0x3de935['shift']());}}}(_0x1e78,0x9c87a));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Signal']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../collator'),mapper_1=require('../mapper'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Signal extends activity_1['Activity']{constructor(_0x217309,_0x2c04e2,_0x58901e,_0x35d6a9,_0x46ad25,_0x412fa3){super(_0x217309,_0x2c04e2,_0x58901e,_0x35d6a9,_0x46ad25,_0x412fa3);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x344e9b;try{await this['verifyEntry'](),_0x344e9b=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x344e9b['startActivitySpan'](this['leg']);const _0x556fe9=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x556fe9),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x556fe9),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x556fe9);const _0x56fe1a=await _0x556fe9['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x227f37=this['resolveStatus'](_0x56fe1a),_0x189a57={'app.job.jss':_0x227f37},_0x136193=await this['transition'](this['adjacencyList'],_0x227f37);return _0x136193['length']&&(_0x189a57['app.activity.mids']=_0x136193['join'](',')),_0x344e9b['mapActivityAttributes'](),_0x344e9b['setActivityAttributes'](_0x189a57),this['context']['metadata']['aid'];}catch(_0x52a46e){if(_0x52a46e instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x52a46e});return;}else{if(_0x52a46e instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x52a46e});return;}else{if(_0x52a46e instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x52a46e});return;}else{if(_0x52a46e instanceof errors_1['CollationError']){if(_0x52a46e['fault']==='duplicate'){this['logger']['info']('signal-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('signal-collation-error',{..._0x52a46e});}else this['logger']['error']('signal-process-error',{..._0x52a46e});}}}_0x344e9b?.['setActivityError'](_0x52a46e['message']);throw _0x52a46e;}finally{_0x344e9b?.['endActivitySpan'](),this['logger']['debug']('signal-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}['mapSignalData'](){if(this['config']['signal']?.['maps']){const _0x1f3a11=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x1f3a11['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x2ba88d=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x2ba88d['mapRules']();}}async['hookOne'](){const _0x59b4cb=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x21660a=this['mapSignalData'](),_0x5e0d3a=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x4072fe=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x59b4cb,_0x21660a,_0x5e0d3a,_0x4072fe);}async['hookAll'](){const _0x2fa035=this['mapSignalData'](),_0x4d263e=this['mapResolverData']();this['config']['scrub']&&(_0x4d263e['scrub']=!![]);const _0x22f949=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x4c2df0=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x2dc661=[_0x22f949+':'+_0x4c2df0];return await this['engine']['hookAll'](this['config']['topic'],_0x2fa035,_0x4d263e,_0x2dc661);}}exports['Signal']=Signal;
1
+ 'use strict';(function(_0x2ced6,_0x2266e9){const _0x225d3a=_0x5f5a,_0x1aac62=_0x2ced6();while(!![]){try{const _0x282b30=parseInt(_0x225d3a(0xfb))/0x1+parseInt(_0x225d3a(0xfc))/0x2*(parseInt(_0x225d3a(0xfd))/0x3)+-parseInt(_0x225d3a(0xfa))/0x4+-parseInt(_0x225d3a(0xff))/0x5+-parseInt(_0x225d3a(0x100))/0x6*(-parseInt(_0x225d3a(0xfe))/0x7)+parseInt(_0x225d3a(0xf9))/0x8*(-parseInt(_0x225d3a(0x102))/0x9)+parseInt(_0x225d3a(0x101))/0xa;if(_0x282b30===_0x2266e9)break;else _0x1aac62['push'](_0x1aac62['shift']());}catch(_0xf3c959){_0x1aac62['push'](_0x1aac62['shift']());}}}(_0x1d58,0x41a2a));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Signal']=void 0x0;function _0x5f5a(_0x517253,_0x11f640){const _0x1d5850=_0x1d58();return _0x5f5a=function(_0x5f5aa0,_0x370531){_0x5f5aa0=_0x5f5aa0-0xf9;let _0x323694=_0x1d5850[_0x5f5aa0];return _0x323694;},_0x5f5a(_0x517253,_0x11f640);}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(_0x455aad,_0x56a3c3,_0x2cfdce,_0xb0956f,_0x5e1dc3,_0x3893f9){super(_0x455aad,_0x56a3c3,_0x2cfdce,_0xb0956f,_0x5e1dc3,_0x3893f9);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x14fb76;try{await this['verifyEntry'](),_0x14fb76=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x14fb76['startActivitySpan'](this['leg']);const _0x42bcfe=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x42bcfe),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x42bcfe),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x42bcfe);const _0x5c0c2e=await _0x42bcfe['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x4f89fd=this['resolveStatus'](_0x5c0c2e),_0x5b3e5a={'app.job.jss':_0x4f89fd},_0x509504=await this['transition'](this['adjacencyList'],_0x4f89fd);return _0x509504['length']&&(_0x5b3e5a['app.activity.mids']=_0x509504['join'](',')),_0x14fb76['mapActivityAttributes'](),_0x14fb76['setActivityAttributes'](_0x5b3e5a),this['context']['metadata']['aid'];}catch(_0x5529bc){if(_0x5529bc instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x5529bc});return;}else{if(_0x5529bc instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x5529bc});return;}else{if(_0x5529bc instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x5529bc});return;}else{if(_0x5529bc instanceof errors_1['CollationError']){if(_0x5529bc['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',{..._0x5529bc});}else this['logger']['error']('signal-process-error',{..._0x5529bc});}}}_0x14fb76?.['setActivityError'](_0x5529bc['message']);throw _0x5529bc;}finally{_0x14fb76?.['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 _0x33a110=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x33a110['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x341670=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x341670['mapRules']();}}async['hookOne'](){const _0x33b857=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x2505fe=this['mapSignalData'](),_0x37de6d=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x48e4ec=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x33b857,_0x2505fe,_0x37de6d,_0x48e4ec);}async['hookAll'](){const _0x5f275e=this['mapSignalData'](),_0x254640=this['mapResolverData']();this['config']['scrub']&&(_0x254640['scrub']=!![]);const _0x56b807=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x49e5ee=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x36f341=[_0x56b807+':'+_0x49e5ee];return await this['engine']['hookAll'](this['config']['topic'],_0x5f275e,_0x254640,_0x36f341);}}function _0x1d58(){const _0x3cea3e=['3sNfSeF','16751QqqXqf','997080XMTcTB','330hLtttB','1456860DWVJUi','752778uSSQeZ','8jHLsqp','602384XTpKQb','42360wllnKR','765670nvsGYU'];_0x1d58=function(){return _0x3cea3e;};return _0x1d58();}exports['Signal']=Signal;
@@ -1 +1 @@
1
- 'use strict';(function(_0x12979b,_0x10a51c){const _0x50b821=_0x567c,_0x2e348e=_0x12979b();while(!![]){try{const _0x305fd2=-parseInt(_0x50b821(0x114))/0x1+-parseInt(_0x50b821(0x115))/0x2*(parseInt(_0x50b821(0x10e))/0x3)+parseInt(_0x50b821(0x110))/0x4+parseInt(_0x50b821(0x117))/0x5*(parseInt(_0x50b821(0x111))/0x6)+parseInt(_0x50b821(0x113))/0x7*(parseInt(_0x50b821(0x118))/0x8)+-parseInt(_0x50b821(0x112))/0x9*(parseInt(_0x50b821(0x10f))/0xa)+parseInt(_0x50b821(0x116))/0xb*(parseInt(_0x50b821(0x10d))/0xc);if(_0x305fd2===_0x10a51c)break;else _0x2e348e['push'](_0x2e348e['shift']());}catch(_0x412e6d){_0x2e348e['push'](_0x2e348e['shift']());}}}(_0xa821,0xe8027));function _0x567c(_0x4705d5,_0x5bced7){const _0xa82126=_0xa821();return _0x567c=function(_0x567cfb,_0x5be81c){_0x567cfb=_0x567cfb-0x10d;let _0x48c67f=_0xa82126[_0x567cfb];return _0x48c67f;},_0x567c(_0x4705d5,_0x5bced7);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Trigger']=void 0x0;function _0xa821(){const _0x501508=['276549vDBGHZ','1163118vcJyFM','51892jlUgsQ','135773yeEmeo','18585KzWDnm','200owNPLf','3180dgVzCn','198asyuRy','210RYXIfa','4813536RoZBrY','66xYtBhm','718704HFTgOo'];_0xa821=function(){return _0x501508;};return _0xa821();}const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),reporter_1=require('../reporter'),serializer_1=require('../serializer'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Trigger extends activity_1['Activity']{constructor(_0x564f5b,_0x306da3,_0x442f92,_0x575ba6,_0xc3006e,_0xfdbd90){super(_0x564f5b,_0x306da3,_0x442f92,_0x575ba6,_0xc3006e,_0xfdbd90);}async['process'](_0xe9b14){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x5b01e2;try{this['setLeg'](0x2),await this['getState'](),_0x5b01e2=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5b01e2['startJobSpan'](),_0x5b01e2['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x5c24a7=this['initStatus'](_0xe9b14,this['adjacencyList']['length']);await this['setStateNX'](_0x5c24a7),await this['setStatus'](_0x5c24a7),this['bindSearchData'](_0xe9b14),this['bindMarkerData'](_0xe9b14);const _0x13ee14=this['store']['transact']();await this['setState'](_0x13ee14),await this['setStats'](_0x13ee14);_0xe9b14?.['pending']&&await this['setExpired'](_0xe9b14?.['pending'],_0x13ee14);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x13ee14),await _0x13ee14['exec'](),this['execAdjacentParent'](),_0x5b01e2['mapActivityAttributes']();const _0x14fb66=Number(this['context']['metadata']['js']);_0x5b01e2['setJobAttributes']({'app.job.jss':_0x14fb66});const _0x5186db={'app.job.jss':_0x14fb66};return await this['transitionAndLogAdjacent'](_0xe9b14,_0x14fb66,_0x5186db),_0x5b01e2['setActivityAttributes'](_0x5186db),this['context']['metadata']['jid'];}catch(_0xf664e0){_0x5b01e2?.['setActivityError'](_0xf664e0['message']);if(_0xf664e0 instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x267c3a=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x267c3a){this['logger']['info']('trigger-collation-overage',{'job_id':_0xf664e0['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0xf664e0['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0xf664e0});throw _0xf664e0;}finally{_0x5b01e2?.['endJobSpan'](),_0x5b01e2?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x572803={},_0xc120fb,_0x11b791){if(isNaN(_0x572803['pending'])){const _0x17d88d=await this['transition'](this['adjacencyList'],_0xc120fb);_0x17d88d['length']&&(_0x11b791['app.activity.mids']=_0x17d88d['join'](','));}}['initStatus'](_0x30c281={},_0x33311e){if(_0x30c281['pending'])return-0x1;return _0x33311e;}async['setExpired'](_0x502fc8,_0x193fc0){await this['store']['expireJob'](this['context']['metadata']['jid'],_0x502fc8,_0x193fc0);}['safeKey'](_0x36d4ff){return'_'+_0x36d4ff;}['bindSearchData'](_0x4333e5){_0x4333e5?.['search']&&Object['keys'](_0x4333e5['search'])['forEach'](_0x243537=>{this['context']['data'][this['safeKey'](_0x243537)]=_0x4333e5['search'][_0x243537]['toString']();});}['bindMarkerData'](_0x551552){_0x551552?.['marker']&&Object['keys'](_0x551552['marker'])['forEach'](_0x6bce07=>{_0x6bce07['startsWith']('-')&&(this['context']['data'][_0x6bce07]=_0x551552['marker'][_0x6bce07]['toString']());});}async['setStatus'](_0x9dc153){this['context']['metadata']['js']=_0x9dc153;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x37d4f1=(0x0,utils_1['formatISODate'])(new Date()),_0x191c93={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x37d4f1,'ju':_0x37d4f1}};await this['engine']['execAdjacentParent'](this['context'],_0x191c93);}}['createInputContext'](){const _0x37995e={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x37995e;}async['getState'](){const _0x4fbc05=this['createInputContext'](),_0x379e28=this['resolveJobId'](_0x4fbc05),_0x22efec=this['resolveJobKey'](_0x4fbc05),_0x388bff=(0x0,utils_1['formatISODate'])(new Date()),{id:_0x3debeb,version:_0x55c21c}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0x419c49={...this['metadata'],'jid':_0x379e28,'key':_0x22efec,'as':collator_1['CollatorService']['getTriggerSeed']()};this['context']={'metadata':{...this['metadata'],'gid':(0x0,utils_1['guid'])(),'ngn':this['context']['metadata']['ngn'],'pj':this['context']['metadata']['pj'],'pg':this['context']['metadata']['pg'],'pd':this['context']['metadata']['pd'],'pa':this['context']['metadata']['pa'],'px':this['context']['metadata']['px'],'app':_0x3debeb,'vrs':_0x55c21c,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0x379e28,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x22efec,'jc':_0x388bff,'ju':_0x388bff,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0x419c49},'output':{'data':this['data'],'metadata':_0x419c49},'settings':{'data':{}},'errors':{'data':{}}}},this['context']['$self']=this['context'][this['metadata']['aid']],this['context']['$job']=this['context'];}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x2dc0a2=>'metadata/'+_0x2dc0a2);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0x4e5236=>'output/metadata/'+_0x4e5236);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x39ccda){const _0x192776=this['config']['stats']?.['id'];return _0x192776?pipe_1['Pipe']['resolve'](_0x192776,_0x39ccda):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x46b882){const _0x3109f4=this['config']['stats']?.['key'];return _0x3109f4?pipe_1['Pipe']['resolve'](_0x3109f4,_0x46b882):'';}async['setStateNX'](_0x37502a){const _0x225ea1=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x225ea1,this['engine']['appId'],_0x37502a))throw new errors_1['DuplicateJobError'](_0x225ea1);}async['setStats'](_0x1f022b){const _0x3552e4=this['context']['metadata'];if(_0x3552e4['key']&&this['config']['stats']?.['measures']){const _0x50f951=await this['engine']['getVID'](),_0x29dc5b=new reporter_1['ReporterService'](_0x50f951,this['store'],this['logger']);await this['store']['setStats'](_0x3552e4['key'],_0x3552e4['jid'],_0x3552e4['ts'],_0x29dc5b['resolveTriggerStatistics'](this['config'],this['context']),_0x50f951,_0x1f022b);}}}exports['Trigger']=Trigger;
1
+ 'use strict';function _0x493a(_0x35b711,_0x68073a){const _0x1d3bcd=_0x1d3b();return _0x493a=function(_0x493a98,_0x5de222){_0x493a98=_0x493a98-0x74;let _0x1ef1d7=_0x1d3bcd[_0x493a98];return _0x1ef1d7;},_0x493a(_0x35b711,_0x68073a);}(function(_0x5484e5,_0x422b60){const _0x415a06=_0x493a,_0x39ea20=_0x5484e5();while(!![]){try{const _0x1a4915=-parseInt(_0x415a06(0x75))/0x1*(parseInt(_0x415a06(0x7c))/0x2)+-parseInt(_0x415a06(0x7a))/0x3+-parseInt(_0x415a06(0x78))/0x4+parseInt(_0x415a06(0x79))/0x5*(-parseInt(_0x415a06(0x76))/0x6)+parseInt(_0x415a06(0x7b))/0x7*(parseInt(_0x415a06(0x7d))/0x8)+parseInt(_0x415a06(0x7e))/0x9*(-parseInt(_0x415a06(0x77))/0xa)+parseInt(_0x415a06(0x74))/0xb;if(_0x1a4915===_0x422b60)break;else _0x39ea20['push'](_0x39ea20['shift']());}catch(_0x389e78){_0x39ea20['push'](_0x39ea20['shift']());}}}(_0x1d3b,0xe0fe5));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(_0x171c33,_0x595a7b,_0x4426ec,_0x45c8aa,_0x3f431a,_0x23e7ba){super(_0x171c33,_0x595a7b,_0x4426ec,_0x45c8aa,_0x3f431a,_0x23e7ba);}async['process'](_0x1a765b){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x1c604c;try{this['setLeg'](0x2),await this['getState'](),_0x1c604c=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x1c604c['startJobSpan'](),_0x1c604c['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x229c17=this['initStatus'](_0x1a765b,this['adjacencyList']['length']);await this['setStateNX'](_0x229c17),await this['setStatus'](_0x229c17),this['bindSearchData'](_0x1a765b),this['bindMarkerData'](_0x1a765b);const _0x58958c=this['store']['transact']();await this['setState'](_0x58958c),await this['setStats'](_0x58958c);_0x1a765b?.['pending']&&await this['setExpired'](_0x1a765b?.['pending'],_0x58958c);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x58958c),await _0x58958c['exec'](),this['execAdjacentParent'](),_0x1c604c['mapActivityAttributes']();const _0x1cded7=Number(this['context']['metadata']['js']);_0x1c604c['setJobAttributes']({'app.job.jss':_0x1cded7});const _0x131f8f={'app.job.jss':_0x1cded7};return await this['transitionAndLogAdjacent'](_0x1a765b,_0x1cded7,_0x131f8f),_0x1c604c['setActivityAttributes'](_0x131f8f),this['context']['metadata']['jid'];}catch(_0x35a151){_0x1c604c?.['setActivityError'](_0x35a151['message']);if(_0x35a151 instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x16fe86=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x16fe86){this['logger']['info']('trigger-collation-overage',{'job_id':_0x35a151['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0x35a151['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0x35a151});throw _0x35a151;}finally{_0x1c604c?.['endJobSpan'](),_0x1c604c?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x2ab283={},_0x35adfc,_0x4ace2a){if(isNaN(_0x2ab283['pending'])){const _0x46c0b1=await this['transition'](this['adjacencyList'],_0x35adfc);_0x46c0b1['length']&&(_0x4ace2a['app.activity.mids']=_0x46c0b1['join'](','));}}['initStatus'](_0x59d1d0={},_0x5b1e53){if(_0x59d1d0['pending'])return-0x1;return _0x5b1e53;}async['setExpired'](_0x10f4a6,_0x285d47){await this['store']['expireJob'](this['context']['metadata']['jid'],_0x10f4a6,_0x285d47);}['safeKey'](_0x516289){return'_'+_0x516289;}['bindSearchData'](_0x1018d0){_0x1018d0?.['search']&&Object['keys'](_0x1018d0['search'])['forEach'](_0x2d6e50=>{this['context']['data'][this['safeKey'](_0x2d6e50)]=_0x1018d0['search'][_0x2d6e50]['toString']();});}['bindMarkerData'](_0x29852b){_0x29852b?.['marker']&&Object['keys'](_0x29852b['marker'])['forEach'](_0x52b383=>{_0x52b383['startsWith']('-')&&(this['context']['data'][_0x52b383]=_0x29852b['marker'][_0x52b383]['toString']());});}async['setStatus'](_0x58852e){this['context']['metadata']['js']=_0x58852e;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x1616ab=(0x0,utils_1['formatISODate'])(new Date()),_0x62174c={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x1616ab,'ju':_0x1616ab}};await this['engine']['execAdjacentParent'](this['context'],_0x62174c);}}['createInputContext'](){const _0x52bbf1={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x52bbf1;}async['getState'](){const _0x36efdf=this['createInputContext'](),_0x2bd328=this['resolveJobId'](_0x36efdf),_0x40a070=this['resolveJobKey'](_0x36efdf),_0x5bec04=(0x0,utils_1['formatISODate'])(new Date()),{id:_0x327a0c,version:_0x57d965}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0xbfc640={...this['metadata'],'jid':_0x2bd328,'key':_0x40a070,'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':_0x327a0c,'vrs':_0x57d965,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0x2bd328,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x40a070,'jc':_0x5bec04,'ju':_0x5bec04,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0xbfc640},'output':{'data':this['data'],'metadata':_0xbfc640},'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'](_0x5f1dfc=>'metadata/'+_0x5f1dfc);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0x47168d=>'output/metadata/'+_0x47168d);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x3ecba1){const _0x3e09a1=this['config']['stats']?.['id'];return _0x3e09a1?pipe_1['Pipe']['resolve'](_0x3e09a1,_0x3ecba1):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x16ac46){const _0x3d45f6=this['config']['stats']?.['key'];return _0x3d45f6?pipe_1['Pipe']['resolve'](_0x3d45f6,_0x16ac46):'';}async['setStateNX'](_0x46ba38){const _0x2b54a2=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x2b54a2,this['engine']['appId'],_0x46ba38))throw new errors_1['DuplicateJobError'](_0x2b54a2);}async['setStats'](_0x145915){const _0x17a171=this['context']['metadata'];if(_0x17a171['key']&&this['config']['stats']?.['measures']){const _0x55f15d=await this['engine']['getVID'](),_0x5cf2b0=new reporter_1['ReporterService'](_0x55f15d,this['store'],this['logger']);await this['store']['setStats'](_0x17a171['key'],_0x17a171['jid'],_0x17a171['ts'],_0x5cf2b0['resolveTriggerStatistics'](this['config'],this['context']),_0x55f15d,_0x145915);}}}exports['Trigger']=Trigger;function _0x1d3b(){const _0x37b605=['10KKUURo','2279904pqlbCN','1079025WRjbFf','2289816zvKnEC','459592JvCRwe','3202wkQvdW','80TQSLpb','453555YVAkvX','26109369NwTIot','318vcgMjZ','6rYrvXB'];_0x1d3b=function(){return _0x37b605;};return _0x1d3b();}