@hotmeshio/hotmesh 0.3.11 → 0.3.12

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 (83) hide show
  1. package/README.md +6 -8
  2. package/build/modules/key.js +1 -1
  3. package/build/modules/utils.js +1 -1
  4. package/build/package.json +4 -4
  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/meshdata/index.d.ts +4 -3
  22. package/build/services/meshdata/index.js +3 -2
  23. package/build/services/meshflow/client.d.ts +1 -0
  24. package/build/services/meshflow/client.js +18 -6
  25. package/build/services/meshflow/connection.d.ts +2 -2
  26. package/build/services/meshflow/connection.js +1 -1
  27. package/build/services/meshflow/exporter.js +1 -1
  28. package/build/services/meshflow/worker.d.ts +2 -1
  29. package/build/services/meshflow/worker.js +27 -16
  30. package/build/services/meshos/index.d.ts +2 -1
  31. package/build/services/meshos/index.js +7 -4
  32. package/build/services/pipe/functions/array.js +1 -1
  33. package/build/services/pipe/functions/bitwise.js +1 -1
  34. package/build/services/pipe/functions/conditional.js +1 -1
  35. package/build/services/pipe/functions/cron.js +1 -1
  36. package/build/services/pipe/functions/date.js +1 -1
  37. package/build/services/pipe/functions/index.js +1 -1
  38. package/build/services/pipe/functions/json.js +1 -1
  39. package/build/services/pipe/functions/logical.js +1 -1
  40. package/build/services/pipe/functions/math.js +1 -1
  41. package/build/services/pipe/functions/number.js +1 -1
  42. package/build/services/pipe/functions/object.js +1 -1
  43. package/build/services/pipe/functions/string.js +1 -1
  44. package/build/services/pipe/functions/symbol.js +1 -1
  45. package/build/services/pipe/functions/unary.js +1 -1
  46. package/build/services/pipe/index.js +1 -1
  47. package/build/services/quorum/index.js +1 -1
  48. package/build/services/reporter/index.js +1 -1
  49. package/build/services/router/index.js +1 -1
  50. package/build/services/search/factory.d.ts +2 -2
  51. package/build/services/search/factory.js +8 -4
  52. package/build/services/search/providers/postgres/postgres.d.ts +21 -0
  53. package/build/services/search/providers/postgres/postgres.js +1 -0
  54. package/build/services/search/providers/redis/ioredis.js +1 -1
  55. package/build/services/search/providers/redis/redis.js +1 -1
  56. package/build/services/serializer/index.js +1 -1
  57. package/build/services/store/providers/postgres/kvsql.d.ts +2 -1
  58. package/build/services/store/providers/postgres/kvsql.js +1 -1
  59. package/build/services/store/providers/postgres/postgres.d.ts +1 -1
  60. package/build/services/store/providers/postgres/postgres.js +1 -1
  61. package/build/services/store/providers/redis/_base.js +1 -1
  62. package/build/services/store/providers/redis/ioredis.js +1 -1
  63. package/build/services/store/providers/redis/redis.js +1 -1
  64. package/build/services/store/providers/store-initializable.js +1 -1
  65. package/build/services/stream/providers/nats/nats.js +1 -1
  66. package/build/services/stream/providers/postgres/postgres.js +1 -1
  67. package/build/services/stream/providers/redis/ioredis.js +1 -1
  68. package/build/services/stream/providers/redis/redis.js +1 -1
  69. package/build/services/stream/providers/stream-initializable.js +1 -1
  70. package/build/services/sub/providers/redis/ioredis.js +1 -1
  71. package/build/services/sub/providers/redis/redis.js +1 -1
  72. package/build/services/task/index.js +1 -1
  73. package/build/services/telemetry/index.js +1 -1
  74. package/build/services/worker/index.js +1 -1
  75. package/build/types/manifest.d.ts +12 -3
  76. package/build/types/meshflow.d.ts +2 -2
  77. package/build/types/postgres.d.ts +1 -0
  78. package/build/types/provider.d.ts +7 -0
  79. package/package.json +4 -4
  80. package/types/manifest.ts +12 -3
  81. package/types/meshflow.ts +2 -2
  82. package/types/postgres.ts +2 -0
  83. package/types/provider.ts +7 -0
package/README.md CHANGED
@@ -1,17 +1,15 @@
1
1
  # HotMesh
2
2
  ![beta release](https://img.shields.io/badge/release-beta-blue.svg)
3
3
 
4
- **HotMesh** offers the power of orchestration platforms like Temporal.io in a flexible, decentralized manner. Replace everything with robust **Queues** and **Routers**...even the app server.
5
-
6
- *Note: This is a beta release and currently focuses on TypeScript/Redis.*
4
+ **HotMesh** offers the power of Temporal.io as a decentralized serverless swarm. It's a drop-in replacement that runs on Postgres or Redis (Your choice!). And there's no need for a central server. Just install the package and start orchestrating your microservices.
7
5
 
8
6
  ## Features
9
7
 
10
- - **Temporal Your Way**: Orchestrate your microservices using message queues and routers, without the need for a central server.
11
- - **Pluggable Middleware**: Mix and match technologies through a standard interface. Currently supporting **Redis/ValKey/Dragonfly/KVRocks**, with **Postgres**, **ElasticSearch**, and **NATS** coming next.
12
- - **Decentralized Orchestration**: Build a resilient architecture with decentralized queues and routers.
13
- - **Linear Scalability**: Scale your application by scaling the database.
14
- - **Real-Time Analytics**: Gain insights into your workflows with real-time analytics.
8
+ - **Temporal Your Way**: Orchestrate your microservices without the need for a central server. Just point to your Postgres or Redis instance.
9
+ - **Pluggable Middleware**: Mix and match technologies through a standard interface. Currently supporting **Redis/ValKey/Dragonfly/KVRocks** and **Postgres**.
10
+ - **Decentralized Orchestration**: Centralized data with decentralized execution.
11
+ - **Linear Scalability**: Scale your database to scale your application.
12
+ - **Real-Time Analytics**: Gain process insights with real-time analytics.
15
13
 
16
14
  ## Install
17
15
 
@@ -1 +1 @@
1
- 'use strict';(function(_0x414fec,_0x4b6a92){const _0x1374da=_0x56b1,_0x2ef3c6=_0x414fec();while(!![]){try{const _0x225463=-parseInt(_0x1374da(0x90))/0x1*(parseInt(_0x1374da(0x8d))/0x2)+-parseInt(_0x1374da(0x8f))/0x3*(-parseInt(_0x1374da(0x91))/0x4)+parseInt(_0x1374da(0x8b))/0x5+parseInt(_0x1374da(0x93))/0x6+parseInt(_0x1374da(0x95))/0x7*(parseInt(_0x1374da(0x92))/0x8)+parseInt(_0x1374da(0x8c))/0x9*(-parseInt(_0x1374da(0x94))/0xa)+-parseInt(_0x1374da(0x8e))/0xb;if(_0x225463===_0x4b6a92)break;else _0x2ef3c6['push'](_0x2ef3c6['shift']());}catch(_0x106df1){_0x2ef3c6['push'](_0x2ef3c6['shift']());}}}(_0x2438,0x9f799));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=':';function _0x2438(){const _0x3089cc=['8844649tlayQW','98229ZUDdQR','99039gIZIQC','16MJXlqs','8103688dEXwhD','1773012tKWtZx','584450IxFwPN','7nAJbyC','4838145CJhNEF','9IcmBBi','18oLdUqu'];_0x2438=function(){return _0x3089cc;};return _0x2438();}exports['KEYSEP']=KEYSEP;function _0x56b1(_0x5ec26c,_0x96186c){const _0x243820=_0x2438();return _0x56b1=function(_0x56b1ae,_0xf19c20){_0x56b1ae=_0x56b1ae-0x8b;let _0x5a88cc=_0x243820[_0x56b1ae];return _0x5a88cc;},_0x56b1(_0x5ec26c,_0x96186c);}const VALSEP='::';exports['VALSEP']=VALSEP;const WEBSEP='::';exports['WEBSEP']=WEBSEP;const TYPSEP='::';exports['TYPSEP']=TYPSEP;class KeyService{static['mintKey'](_0x16926a,_0x16323a,_0x2afd29){switch(_0x16323a){case hotmesh_1['KeyType']['HOTMESH']:return _0x16926a;case hotmesh_1['KeyType']['THROTTLE_RATE']:return _0x16926a+':'+_0x2afd29['appId']+':r:';case hotmesh_1['KeyType']['WORK_ITEMS']:return _0x16926a+':'+_0x2afd29['appId']+':w:'+(_0x2afd29['scoutType']||'');case hotmesh_1['KeyType']['TIME_RANGE']:return _0x16926a+':'+_0x2afd29['appId']+':t:'+(_0x2afd29['timeValue']||'');case hotmesh_1['KeyType']['APP']:return _0x16926a+':a:'+(_0x2afd29['appId']||'');case hotmesh_1['KeyType']['QUORUM']:return _0x16926a+':'+_0x2afd29['appId']+':q:'+(_0x2afd29['engineId']||'');case hotmesh_1['KeyType']['JOB_STATE']:return _0x16926a+':'+_0x2afd29['appId']+':j:'+_0x2afd29['jobId'];case hotmesh_1['KeyType']['JOB_DEPENDENTS']:return _0x16926a+':'+_0x2afd29['appId']+':d:'+_0x2afd29['jobId'];case hotmesh_1['KeyType']['JOB_STATS_GENERAL']:return _0x16926a+':'+_0x2afd29['appId']+':s:'+_0x2afd29['jobKey']+':'+_0x2afd29['dateTime'];case hotmesh_1['KeyType']['JOB_STATS_MEDIAN']:return _0x16926a+':'+_0x2afd29['appId']+':s:'+_0x2afd29['jobKey']+':'+_0x2afd29['dateTime']+':'+_0x2afd29['facet'];case hotmesh_1['KeyType']['JOB_STATS_INDEX']:return _0x16926a+':'+_0x2afd29['appId']+':s:'+_0x2afd29['jobKey']+':'+_0x2afd29['dateTime']+':'+_0x2afd29['facet'];case hotmesh_1['KeyType']['SCHEMAS']:return _0x16926a+':'+_0x2afd29['appId']+':v:'+_0x2afd29['appVersion']+':schemas';case hotmesh_1['KeyType']['SUBSCRIPTIONS']:return _0x16926a+':'+_0x2afd29['appId']+':v:'+_0x2afd29['appVersion']+':subscriptions';case hotmesh_1['KeyType']['SUBSCRIPTION_PATTERNS']:return _0x16926a+':'+_0x2afd29['appId']+':v:'+_0x2afd29['appVersion']+':transitions';case hotmesh_1['KeyType']['HOOKS']:return _0x16926a+':'+_0x2afd29['appId']+':hooks';case hotmesh_1['KeyType']['SIGNALS']:return _0x16926a+':'+_0x2afd29['appId']+':signals';case hotmesh_1['KeyType']['SYMKEYS']:return _0x16926a+':'+_0x2afd29['appId']+':sym:keys:'+(_0x2afd29['activityId']||'');case hotmesh_1['KeyType']['SYMVALS']:return _0x16926a+':'+_0x2afd29['appId']+':sym:vals:';case hotmesh_1['KeyType']['STREAMS']:return _0x16926a+':'+(_0x2afd29['appId']||'')+':x:'+(_0x2afd29['topic']||'');default:throw new Error('Invalid\x20key\x20type.');}}static['parseKey'](_0x22b734){const [_0x314354,_0x259e84,_0x2d5380,..._0x143bfc]=_0x22b734['split'](KEYSEP),_0x591ced=_0x143bfc['join'](KEYSEP)||'';return{'namespace':_0x314354,'app':_0x2d5380==='a'?_0x259e84:undefined,'entity':_0x2d5380,'id':_0x591ced};}static['reconstituteKey'](_0x39f139){const {namespace:_0x322ecf,app:_0x17f489,entity:_0x2b984b,id:_0x78c976}=_0x39f139;return''+_0x322ecf+KEYSEP+_0x17f489+KEYSEP+_0x2b984b+KEYSEP+(_0x78c976||'');}static['resolveEntityType'](_0x37b85c,_0x1c4d06=''){switch(_0x37b85c){case'a':return'applications';case'r':return'throttles';case'w':return _0x1c4d06===''?'task_priorities':'roles';case't':return _0x1c4d06===''?'task_schedules':'task_lists';case'q':return'events';case'j':return'jobs';case's':return'stats';case'v':return'versions';case'x':return _0x1c4d06===''?'streams':'stream_topics';case'hooks':return'signal_patterns';case'signals':return'signal_registry';case'sym':return'symbols';default:return'unknown_entity';}}static['resolveAbbreviation'](_0x358e1e){switch(_0x358e1e){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(_0x499e9d,_0x80a66a){const _0x45026a=_0x32f5,_0x46da9a=_0x499e9d();while(!![]){try{const _0x3e0533=-parseInt(_0x45026a(0x100))/0x1*(-parseInt(_0x45026a(0xfc))/0x2)+parseInt(_0x45026a(0xf9))/0x3*(parseInt(_0x45026a(0xff))/0x4)+parseInt(_0x45026a(0x102))/0x5+-parseInt(_0x45026a(0xfb))/0x6*(parseInt(_0x45026a(0x101))/0x7)+parseInt(_0x45026a(0xf8))/0x8*(-parseInt(_0x45026a(0xfa))/0x9)+-parseInt(_0x45026a(0xfd))/0xa+parseInt(_0x45026a(0xfe))/0xb;if(_0x3e0533===_0x80a66a)break;else _0x46da9a['push'](_0x46da9a['shift']());}catch(_0x37b440){_0x46da9a['push'](_0x46da9a['shift']());}}}(_0x4627,0x6572d));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['VALSEP']=exports['WEBSEP']=exports['TYPSEP']=exports['KEYSEP']=exports['HMNS']=exports['KeyType']=exports['KeyService']=void 0x0;const hotmesh_1=require('../types/hotmesh');Object['defineProperty'](exports,'KeyType',{'enumerable':!![],'get':function(){return hotmesh_1['KeyType'];}});const HMNS='hmsh';exports['HMNS']=HMNS;const KEYSEP=':';exports['KEYSEP']=KEYSEP;function _0x4627(){const _0x89131=['29601HsNoRB','18sAJEAh','136BqLAHj','6566510ayyNKU','18524429clzbfs','36kswYvF','2957AMtBfX','1719886ciwoxp','365675njgSQR','1304KlDKHw','129045NhTgjE'];_0x4627=function(){return _0x89131;};return _0x4627();}const VALSEP='::';exports['VALSEP']=VALSEP;const WEBSEP='::';function _0x32f5(_0x40f88f,_0x34513e){const _0x462735=_0x4627();return _0x32f5=function(_0x32f593,_0x5c82d9){_0x32f593=_0x32f593-0xf8;let _0x587f1f=_0x462735[_0x32f593];return _0x587f1f;},_0x32f5(_0x40f88f,_0x34513e);}exports['WEBSEP']=WEBSEP;const TYPSEP='::';exports['TYPSEP']=TYPSEP;class KeyService{static['mintKey'](_0xe5afd8,_0x1c09da,_0x32daf1){switch(_0x1c09da){case hotmesh_1['KeyType']['HOTMESH']:return _0xe5afd8;case hotmesh_1['KeyType']['THROTTLE_RATE']:return _0xe5afd8+':'+_0x32daf1['appId']+':r:';case hotmesh_1['KeyType']['WORK_ITEMS']:return _0xe5afd8+':'+_0x32daf1['appId']+':w:'+(_0x32daf1['scoutType']||'');case hotmesh_1['KeyType']['TIME_RANGE']:return _0xe5afd8+':'+_0x32daf1['appId']+':t:'+(_0x32daf1['timeValue']||'');case hotmesh_1['KeyType']['APP']:return _0xe5afd8+':a:'+(_0x32daf1['appId']||'');case hotmesh_1['KeyType']['QUORUM']:return _0xe5afd8+':'+_0x32daf1['appId']+':q:'+(_0x32daf1['engineId']||'');case hotmesh_1['KeyType']['JOB_STATE']:return _0xe5afd8+':'+_0x32daf1['appId']+':j:'+_0x32daf1['jobId'];case hotmesh_1['KeyType']['JOB_DEPENDENTS']:return _0xe5afd8+':'+_0x32daf1['appId']+':d:'+_0x32daf1['jobId'];case hotmesh_1['KeyType']['JOB_STATS_GENERAL']:return _0xe5afd8+':'+_0x32daf1['appId']+':s:'+_0x32daf1['jobKey']+':'+_0x32daf1['dateTime'];case hotmesh_1['KeyType']['JOB_STATS_MEDIAN']:return _0xe5afd8+':'+_0x32daf1['appId']+':s:'+_0x32daf1['jobKey']+':'+_0x32daf1['dateTime']+':'+_0x32daf1['facet'];case hotmesh_1['KeyType']['JOB_STATS_INDEX']:return _0xe5afd8+':'+_0x32daf1['appId']+':s:'+_0x32daf1['jobKey']+':'+_0x32daf1['dateTime']+':'+_0x32daf1['facet'];case hotmesh_1['KeyType']['SCHEMAS']:return _0xe5afd8+':'+_0x32daf1['appId']+':v:'+_0x32daf1['appVersion']+':schemas';case hotmesh_1['KeyType']['SUBSCRIPTIONS']:return _0xe5afd8+':'+_0x32daf1['appId']+':v:'+_0x32daf1['appVersion']+':subscriptions';case hotmesh_1['KeyType']['SUBSCRIPTION_PATTERNS']:return _0xe5afd8+':'+_0x32daf1['appId']+':v:'+_0x32daf1['appVersion']+':transitions';case hotmesh_1['KeyType']['HOOKS']:return _0xe5afd8+':'+_0x32daf1['appId']+':hooks';case hotmesh_1['KeyType']['SIGNALS']:return _0xe5afd8+':'+_0x32daf1['appId']+':signals';case hotmesh_1['KeyType']['SYMKEYS']:return _0xe5afd8+':'+_0x32daf1['appId']+':sym:keys:'+(_0x32daf1['activityId']||'');case hotmesh_1['KeyType']['SYMVALS']:return _0xe5afd8+':'+_0x32daf1['appId']+':sym:vals:';case hotmesh_1['KeyType']['STREAMS']:return _0xe5afd8+':'+(_0x32daf1['appId']||'')+':x:'+(_0x32daf1['topic']||'');default:throw new Error('Invalid\x20key\x20type.');}}static['parseKey'](_0x2d4859){const [_0x464007,_0x2e4961,_0x594126,..._0x13b94f]=_0x2d4859['split'](KEYSEP),_0x2f6728=_0x13b94f['join'](KEYSEP)||'';return{'namespace':_0x464007,'app':_0x594126==='a'?_0x2e4961:undefined,'entity':_0x594126,'id':_0x2f6728};}static['reconstituteKey'](_0x3da961){const {namespace:_0x2da274,app:_0x1d113b,entity:_0x27479d,id:_0x535750}=_0x3da961;return''+_0x2da274+KEYSEP+_0x1d113b+KEYSEP+_0x27479d+KEYSEP+(_0x535750||'');}static['resolveEntityType'](_0x56e38d,_0x316bc9=''){switch(_0x56e38d){case'a':return'applications';case'r':return'throttles';case'w':return _0x316bc9===''?'task_priorities':'roles';case't':return _0x316bc9===''?'task_schedules':'task_lists';case'q':return'events';case'j':return'jobs';case's':return'stats';case'v':return'versions';case'x':return _0x316bc9===''?'streams':'stream_topics';case'hooks':return'signal_patterns';case'signals':return'signal_registry';case'sym':return'symbols';default:return'unknown_entity';}}static['resolveAbbreviation'](_0x3b9ee3){switch(_0x3b9ee3){case'applications':return'a';case'throttles':return'r';case'roles':return'w';case'task_schedules':return't';case'task_lists':return't';case'events':return'q';case'jobs':return'j';case'stats':return's';case'versions':return'v';case'streams':return'x';case'signal_patterns':return'hooks';case'signal_registry':return'signals';case'symbols':return'sym';default:return'unknown_entity';}}}exports['KeyService']=KeyService;
@@ -1 +1 @@
1
- 'use strict';(function(_0x3ff2b5,_0xdcbdaf){const _0x5b9d3a=_0x26a8,_0x1f4c40=_0x3ff2b5();while(!![]){try{const _0x554312=parseInt(_0x5b9d3a(0xac))/0x1*(-parseInt(_0x5b9d3a(0xa7))/0x2)+parseInt(_0x5b9d3a(0xae))/0x3*(-parseInt(_0x5b9d3a(0xad))/0x4)+-parseInt(_0x5b9d3a(0xa4))/0x5+-parseInt(_0x5b9d3a(0xab))/0x6*(-parseInt(_0x5b9d3a(0xa8))/0x7)+parseInt(_0x5b9d3a(0xa9))/0x8+-parseInt(_0x5b9d3a(0xa6))/0x9+-parseInt(_0x5b9d3a(0xa5))/0xa*(-parseInt(_0x5b9d3a(0xaa))/0xb);if(_0x554312===_0xdcbdaf)break;else _0x1f4c40['push'](_0x1f4c40['shift']());}catch(_0x4ced60){_0x1f4c40['push'](_0x1f4c40['shift']());}}}(_0x1a9f,0x63351));var __importDefault=this&&this['__importDefault']||function(_0x3fa36e){return _0x3fa36e&&_0x3fa36e['__esModule']?_0x3fa36e:{'default':_0x3fa36e};};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=_0x1ff00b=>{const _0x4dbc16=JSON['stringify'](_0x1ff00b);return(0x0,crypto_1['createHash'])('sha256')['update'](_0x4dbc16)['digest']('hex');};exports['hashOptions']=hashOptions;async function getSystemHealth(){const _0x446aeb=os_1['default']['totalmem'](),_0x11eb65=os_1['default']['freemem'](),_0x500e04=_0x446aeb-_0x11eb65,_0x2df003={'TotalMemoryGB':(_0x446aeb/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','FreeMemoryGB':(_0x11eb65/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','UsedMemoryGB':(_0x500e04/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};return _0x2df003;}exports['getSystemHealth']=getSystemHealth;function deepCopy(_0x4a5841){return JSON['parse'](JSON['stringify'](_0x4a5841));}exports['deepCopy']=deepCopy;function deterministicRandom(_0x5ef778){const _0x5d3213=Math['sin'](_0x5ef778)*0x2710;return _0x5d3213-Math['floor'](_0x5d3213);}exports['deterministicRandom']=deterministicRandom;function guid(_0x4164d0=enums_1['HMSH_GUID_SIZE']){return'H'+(0x0,nanoid_1['nanoid'])(_0x4164d0);}exports['guid']=guid;async function sleepFor(_0x3a343c){return new Promise(_0x1dc9b6=>setTimeout(_0x1dc9b6,_0x3a343c));}exports['sleepFor']=sleepFor;function sleepImmediate(){return new Promise(_0x397900=>setImmediate(_0x397900));}exports['sleepImmediate']=sleepImmediate;function _0x26a8(_0x495ed4,_0x109f77){const _0x1a9f4f=_0x1a9f();return _0x26a8=function(_0x26a8f4,_0x4967d5){_0x26a8f4=_0x26a8f4-0xa4;let _0x2590af=_0x1a9f4f[_0x26a8f4];return _0x2590af;},_0x26a8(_0x495ed4,_0x109f77);}function XSleepFor(_0x2481d5){let _0x41ba3c;const _0x53d4ed=new Promise(_0x244acd=>{_0x41ba3c=setTimeout(_0x244acd,_0x2481d5);});return{'promise':_0x53d4ed,'timerId':_0x41ba3c};}exports['XSleepFor']=XSleepFor;function identifyProvider(_0x19f256){const _0x2a3d9b=Object['getPrototypeOf'](_0x19f256);if(_0x19f256['Query']?.['prototype']||Object['keys'](_0x19f256)['includes']('database'))return'postgres';else{if(_0x19f256['constructor']&&_0x19f256['constructor']['name']==='Client')return'nats';else{if('defineCommand'in _0x2a3d9b||Object['keys'](_0x2a3d9b)['includes']('multi'))return'ioredis';else{if(Object['keys'](_0x2a3d9b)['includes']('Multi'))return'redis';}}}if(_0x19f256['constructor']){if(_0x19f256['constructor']['name']==='Redis'||_0x19f256['constructor']['name']==='EventEmitter'){if('hset'in _0x19f256)return'ioredis';}else{if(_0x19f256['constructor']['name']==='ProviderClient'||_0x19f256['constructor']['name']==='Commander'){if('HSET'in _0x19f256)return'redis';}}}let _0x55ab25=null;if(Object['keys'](_0x19f256)['includes']('connection'))_0x55ab25='postgres';else{if(Object['keys'](_0x19f256)['includes']('Pipeline'))_0x55ab25='ioredis';else{if(Object['keys'](_0x19f256)['includes']('createClient'))_0x55ab25='redis';else Object['keys'](_0x19f256)['includes']('jetstream')&&(_0x55ab25='nats');}}return _0x55ab25;}exports['identifyProvider']=identifyProvider,exports['polyfill']={'resolveActivityType'(_0x5e24dd){return _0x5e24dd==='activity'?'hook':_0x5e24dd;},'providerConfig'(_0x4ea563){return _0x4ea563?.['connection']??_0x4ea563?.['redis'];},'meshDataConfig'(_0x5dce2d){return _0x5dce2d?.['connection']??{'class':_0x5dce2d?.['redisClass'],'options':_0x5dce2d?.['redisOptions']};}};function identifyRedisTypeFromClass(_0x3cf34c){if(_0x3cf34c&&_0x3cf34c['name']==='Redis'||_0x3cf34c['name']==='EventEmitter')return'ioredis';else{if(_0x3cf34c&&'createClient'in _0x3cf34c)return'redis';}return null;}exports['identifyRedisTypeFromClass']=identifyRedisTypeFromClass;function matchesStatusCode(_0x5081a5,_0x181ef4){if(typeof _0x181ef4==='string'){const _0x2cab7d='^'+_0x181ef4['replace'](/\*/g,'\x5cd')+'$';return new RegExp(_0x2cab7d)['test'](_0x5081a5['toString']());}return _0x181ef4['test'](_0x5081a5['toString']());}exports['matchesStatusCode']=matchesStatusCode;function matchesStatus(_0x1e265a,_0x5076ab){return _0x1e265a===_0x5076ab;}exports['matchesStatus']=matchesStatus;function findTopKey(_0x49ae58,_0x7a5b21){for(const [_0x347c7c,_0xd2d815]of Object['entries'](_0x49ae58)){if(_0xd2d815['hasOwnProperty'](_0x7a5b21)){const _0x23425a=findTopKey(_0x49ae58,_0x347c7c['replace'](/^\./,''));return(_0x23425a||_0x347c7c)['replace'](/^\./,'');}}return null;}exports['findTopKey']=findTopKey;function findSubscriptionForTrigger(_0x488f21,_0x3ddbec){for(const [_0x1d09cc,_0x1b93e7]of Object['entries'](_0x488f21)){if(_0x1b93e7===_0x3ddbec)return _0x1d09cc;}return null;}exports['findSubscriptionForTrigger']=findSubscriptionForTrigger;async function getSubscriptionTopic(_0x4eeca,_0xc33f85,_0x4b1ff4){const _0x3d61f1=await _0xc33f85['getTransitions'](_0x4b1ff4),_0x55fbfa=await _0xc33f85['getSubscriptions'](_0x4b1ff4),_0x59a03e=findTopKey(_0x3d61f1,_0x4eeca),_0x46bd11=findSubscriptionForTrigger(_0x55fbfa,_0x59a03e);return _0x46bd11;}exports['getSubscriptionTopic']=getSubscriptionTopic;function _0x1a9f(){const _0xc8b003=['2202840yaFlfl','8486nonaSE','7LCuKXl','436424OPexRJ','22ocVkVG','2423802bUxgiq','164BmYxxu','358044AnbZbz','21TuheiU','3563140CCIAIN','11138250VfFPRG'];_0x1a9f=function(){return _0xc8b003;};return _0x1a9f();}function getTimeSeries(_0x1ce8ad){if(_0x1ce8ad['toString']()==='infinity')return'0';const _0x33ccb3=new Date(),_0x4d2225=_0x1ce8ad['slice'](-0x1),_0x5db396=parseInt(_0x1ce8ad['slice'](0x0,-0x1),0xa);if(_0x4d2225==='m'){const _0x4ef70b=Math['floor'](_0x33ccb3['getMinutes']()/_0x5db396)*_0x5db396;_0x33ccb3['setUTCMinutes'](_0x4ef70b,0x0,0x0);}else _0x4d2225==='h'&&_0x33ccb3['setUTCMinutes'](0x0,0x0,0x0);return _0x33ccb3['toISOString']()['replace'](/:\d\d\..+|-|T/g,'')['replace'](':','');}exports['getTimeSeries']=getTimeSeries;function formatISODate(_0x43992c){const _0x1346a0=_0x43992c instanceof Date?_0x43992c:new Date(_0x43992c);return _0x1346a0['toISOString']()['replace'](/[:TZ-]/g,'');}exports['formatISODate']=formatISODate;function getSymKey(_0x4bdf81){const _0x59ab39='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x359439=_0x59ab39['length'];if(_0x4bdf81<0x0||_0x4bdf81>=Math['pow'](_0x359439,0x3))throw new Error('Number\x20out\x20of\x20range');const [_0x521fe1,_0x9fe410]=divmod(_0x4bdf81,_0x359439),[_0x1022b0,_0xcc7d5b]=divmod(_0x521fe1,_0x359439);return _0x59ab39[_0x1022b0]+_0x59ab39[_0x9fe410]+_0x59ab39[_0xcc7d5b];}exports['getSymKey']=getSymKey;function getSymVal(_0x1f7aeb){const _0x34db25='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x483339=_0x34db25['length'];if(_0x1f7aeb<0x0||_0x1f7aeb>=Math['pow'](_0x483339,0x2))throw new Error('Number\x20out\x20of\x20range');const [_0x247552,_0x17d6a5]=divmod(_0x1f7aeb,_0x483339);return _0x34db25[_0x247552]+_0x34db25[_0x17d6a5];}exports['getSymVal']=getSymVal;function divmod(_0x26c319,_0x4e7a51){return[Math['floor'](_0x26c319/_0x4e7a51),_0x26c319%_0x4e7a51];}function getIndexedHash(_0x3c2b44,_0x25561f){const _0xaa3552=_0x3c2b44[_0x25561f]||0x0,_0x2cfaf2={..._0x3c2b44};return delete _0x2cfaf2[_0x25561f],[_0xaa3552,_0x2cfaf2];}exports['getIndexedHash']=getIndexedHash;function getValueByPath(_0x5287d3,_0xe2b7c0){const _0xb79ef3=_0xe2b7c0['split']('/');let _0x7cc04d=_0x5287d3;for(const _0x59ef65 of _0xb79ef3){if(_0x7cc04d[_0x59ef65]!==undefined)_0x7cc04d=_0x7cc04d[_0x59ef65];else return undefined;}return _0x7cc04d;}exports['getValueByPath']=getValueByPath;function restoreHierarchy(_0x7a3cc5){const _0x3929ed={};for(const _0x2cb18a in _0x7a3cc5){if(_0x7a3cc5[_0x2cb18a]===undefined)continue;const _0x220d1c=_0x2cb18a['split']('/');let _0x4fbb12=_0x3929ed;for(let _0x2f674b=0x0;_0x2f674b<_0x220d1c['length'];_0x2f674b++){_0x2f674b===_0x220d1c['length']-0x1?_0x4fbb12[_0x220d1c[_0x2f674b]]=_0x7a3cc5[_0x2cb18a]:(_0x4fbb12[_0x220d1c[_0x2f674b]]=_0x4fbb12[_0x220d1c[_0x2f674b]]||{},_0x4fbb12=_0x4fbb12[_0x220d1c[_0x2f674b]]);}}return _0x3929ed;}exports['restoreHierarchy']=restoreHierarchy;function isValidCron(_0x21ec65){const _0x3c9262=/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/;return _0x3c9262['test'](_0x21ec65);}exports['isValidCron']=isValidCron;const s=_0x4a1217=>{return(0x0,ms_1['default'])(_0x4a1217)/0x3e8;};exports['s']=s;const parseStreamMessage=_0x42203d=>{try{return JSON['parse'](_0x42203d);}catch(_0x16abb0){logger['error']('Error\x20parsing\x20Stream\x20message',{..._0x16abb0});throw _0x16abb0;}};exports['parseStreamMessage']=parseStreamMessage;const isStreamMessage=_0xac6fc5=>{return Array['isArray'](_0xac6fc5)&&Array['isArray'](_0xac6fc5[0x0]);};exports['isStreamMessage']=isStreamMessage;const arrayToHash=_0x48d338=>{const _0x1b4be5=[];let _0x46bfc2;for(let _0x2560ff=0x1;_0x2560ff<_0x48d338['length'];_0x2560ff++){const _0x35379d=_0x48d338[_0x2560ff],_0x5d925b={};if(Array['isArray'](_0x35379d)){for(let _0x10a71f=0x0;_0x10a71f<_0x35379d['length'];_0x10a71f+=0x2){const _0x5c849b=_0x35379d[_0x10a71f],_0x2c5c3d=_0x35379d[_0x10a71f+0x1];_0x5d925b[_0x5c849b]=_0x2c5c3d;}_0x46bfc2&&(_0x5d925b['$']=_0x46bfc2),_0x1b4be5['push'](_0x5d925b),_0x46bfc2=undefined;}else _0x46bfc2=_0x35379d;}return _0x1b4be5;};exports['arrayToHash']=arrayToHash;
1
+ 'use strict';(function(_0x263c50,_0x514054){const _0x33abb6=_0x5899,_0x415fa5=_0x263c50();while(!![]){try{const _0x2261f6=parseInt(_0x33abb6(0x110))/0x1+-parseInt(_0x33abb6(0x113))/0x2+parseInt(_0x33abb6(0x10c))/0x3+-parseInt(_0x33abb6(0x10d))/0x4+-parseInt(_0x33abb6(0x114))/0x5*(-parseInt(_0x33abb6(0x10e))/0x6)+parseInt(_0x33abb6(0x111))/0x7+parseInt(_0x33abb6(0x10f))/0x8*(-parseInt(_0x33abb6(0x112))/0x9);if(_0x2261f6===_0x514054)break;else _0x415fa5['push'](_0x415fa5['shift']());}catch(_0x148ad1){_0x415fa5['push'](_0x415fa5['shift']());}}}(_0x5529,0x9c84d));var __importDefault=this&&this['__importDefault']||function(_0x22e3f1){return _0x22e3f1&&_0x22e3f1['__esModule']?_0x22e3f1:{'default':_0x22e3f1};};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=_0x41fc47=>{const _0x16f811=JSON['stringify'](_0x41fc47);return(0x0,crypto_1['createHash'])('sha256')['update'](_0x16f811)['digest']('hex');};exports['hashOptions']=hashOptions;async function getSystemHealth(){const _0xd0f0b8=os_1['default']['totalmem'](),_0x5801d3=os_1['default']['freemem'](),_0x265174=_0xd0f0b8-_0x5801d3,_0x5377a7={'TotalMemoryGB':(_0xd0f0b8/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','FreeMemoryGB':(_0x5801d3/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','UsedMemoryGB':(_0x265174/0x400/0x400/0x400)['toFixed'](0x2)+'\x20GB','CPULoad':[],'NetworkStats':[]};return _0x5377a7;}exports['getSystemHealth']=getSystemHealth;function deepCopy(_0x35e6bb){return JSON['parse'](JSON['stringify'](_0x35e6bb));}exports['deepCopy']=deepCopy;function _0x5899(_0x3a22d6,_0x56a18c){const _0x55297f=_0x5529();return _0x5899=function(_0x5899c0,_0x40b4d4){_0x5899c0=_0x5899c0-0x10c;let _0x318bd6=_0x55297f[_0x5899c0];return _0x318bd6;},_0x5899(_0x3a22d6,_0x56a18c);}function deterministicRandom(_0x4dd413){const _0x276087=Math['sin'](_0x4dd413)*0x2710;return _0x276087-Math['floor'](_0x276087);}exports['deterministicRandom']=deterministicRandom;function guid(_0x2bfa9a=enums_1['HMSH_GUID_SIZE']){return'H'+(0x0,nanoid_1['nanoid'])(_0x2bfa9a);}exports['guid']=guid;async function sleepFor(_0x113b89){return new Promise(_0x245c86=>setTimeout(_0x245c86,_0x113b89));}exports['sleepFor']=sleepFor;function sleepImmediate(){return new Promise(_0x5f3778=>setImmediate(_0x5f3778));}exports['sleepImmediate']=sleepImmediate;function XSleepFor(_0x51c3bc){let _0x4a06a5;const _0x2a827d=new Promise(_0x16e9b3=>{_0x4a06a5=setTimeout(_0x16e9b3,_0x51c3bc);});return{'promise':_0x2a827d,'timerId':_0x4a06a5};}exports['XSleepFor']=XSleepFor;function _0x5529(){const _0x26faa5=['1370100NlhrPH','1410130pIdZYh','1412388JJytFs','4975184EoHvMu','6LIRfcI','3512gJYllw','600468mHJfbB','8814680icIhqW','873Czfjho'];_0x5529=function(){return _0x26faa5;};return _0x5529();}function identifyProvider(_0x2afada){const _0x42e6b3=Object['getPrototypeOf'](_0x2afada);if(_0x2afada['Query']?.['prototype']||Object['keys'](_0x2afada)['includes']('database'))return'postgres';else{if(_0x2afada['constructor']&&_0x2afada['constructor']['name']==='Client')return'nats';else{if('defineCommand'in _0x42e6b3||Object['keys'](_0x42e6b3)['includes']('multi'))return'ioredis';else{if(Object['keys'](_0x42e6b3)['includes']('Multi'))return'redis';}}}if(_0x2afada['constructor']){if(_0x2afada['constructor']['name']==='Redis'||_0x2afada['constructor']['name']==='EventEmitter'){if('hset'in _0x2afada)return'ioredis';}else{if(_0x2afada['constructor']['name']==='ProviderClient'||_0x2afada['constructor']['name']==='Commander'){if('HSET'in _0x2afada)return'redis';}}}let _0x343c1b=null;if(Object['keys'](_0x2afada)['includes']('connection'))_0x343c1b='postgres';else{if(Object['keys'](_0x2afada)['includes']('Pipeline'))_0x343c1b='ioredis';else{if(Object['keys'](_0x2afada)['includes']('createClient'))_0x343c1b='redis';else Object['keys'](_0x2afada)['includes']('jetstream')&&(_0x343c1b='nats');}}return _0x343c1b;}exports['identifyProvider']=identifyProvider,exports['polyfill']={'resolveActivityType'(_0x2d7e6d){return _0x2d7e6d==='activity'?'hook':_0x2d7e6d;},'providerConfig'(_0x3279fb){return _0x3279fb?.['connection']??_0x3279fb?.['redis'];},'meshDataConfig'(_0x163a65){return _0x163a65?.['connection']??{'class':_0x163a65?.['redisClass'],'options':_0x163a65?.['redisOptions']};}};function identifyRedisTypeFromClass(_0x2b8b2a){if(_0x2b8b2a&&_0x2b8b2a['name']==='Redis'||_0x2b8b2a['name']==='EventEmitter')return'ioredis';else{if(_0x2b8b2a&&'createClient'in _0x2b8b2a)return'redis';}return null;}exports['identifyRedisTypeFromClass']=identifyRedisTypeFromClass;function matchesStatusCode(_0x2776fa,_0x11f119){if(typeof _0x11f119==='string'){const _0x1ed51e='^'+_0x11f119['replace'](/\*/g,'\x5cd')+'$';return new RegExp(_0x1ed51e)['test'](_0x2776fa['toString']());}return _0x11f119['test'](_0x2776fa['toString']());}exports['matchesStatusCode']=matchesStatusCode;function matchesStatus(_0x41b9a8,_0xa15df5){return _0x41b9a8===_0xa15df5;}exports['matchesStatus']=matchesStatus;function findTopKey(_0x258cac,_0x18eb4e){for(const [_0x766369,_0x2f532f]of Object['entries'](_0x258cac)){if(_0x2f532f['hasOwnProperty'](_0x18eb4e)){const _0x5b7504=findTopKey(_0x258cac,_0x766369['replace'](/^\./,''));return(_0x5b7504||_0x766369)['replace'](/^\./,'');}}return null;}exports['findTopKey']=findTopKey;function findSubscriptionForTrigger(_0x491761,_0x4db611){for(const [_0x2cb36f,_0x544818]of Object['entries'](_0x491761)){if(_0x544818===_0x4db611)return _0x2cb36f;}return null;}exports['findSubscriptionForTrigger']=findSubscriptionForTrigger;async function getSubscriptionTopic(_0x164545,_0xc8e829,_0x354e50){const _0x1965fb=await _0xc8e829['getTransitions'](_0x354e50),_0x5b5ccc=await _0xc8e829['getSubscriptions'](_0x354e50),_0x5d5670=findTopKey(_0x1965fb,_0x164545),_0x5458ec=findSubscriptionForTrigger(_0x5b5ccc,_0x5d5670);return _0x5458ec;}exports['getSubscriptionTopic']=getSubscriptionTopic;function getTimeSeries(_0x25ba84){if(_0x25ba84['toString']()==='infinity')return'0';const _0x5d11fc=new Date(),_0x3b611a=_0x25ba84['slice'](-0x1),_0x221a2c=parseInt(_0x25ba84['slice'](0x0,-0x1),0xa);if(_0x3b611a==='m'){const _0x1b865b=Math['floor'](_0x5d11fc['getMinutes']()/_0x221a2c)*_0x221a2c;_0x5d11fc['setUTCMinutes'](_0x1b865b,0x0,0x0);}else _0x3b611a==='h'&&_0x5d11fc['setUTCMinutes'](0x0,0x0,0x0);return _0x5d11fc['toISOString']()['replace'](/:\d\d\..+|-|T/g,'')['replace'](':','');}exports['getTimeSeries']=getTimeSeries;function formatISODate(_0x3f20c5){const _0x55eaa1=_0x3f20c5 instanceof Date?_0x3f20c5:new Date(_0x3f20c5);return _0x55eaa1['toISOString']()['replace'](/[:TZ-]/g,'');}exports['formatISODate']=formatISODate;function getSymKey(_0x2aab08){const _0x1534ef='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x3f9f3a=_0x1534ef['length'];if(_0x2aab08<0x0||_0x2aab08>=Math['pow'](_0x3f9f3a,0x3))throw new Error('Number\x20out\x20of\x20range');const [_0x31eb16,_0x244ff8]=divmod(_0x2aab08,_0x3f9f3a),[_0x19ca2f,_0x4b0695]=divmod(_0x31eb16,_0x3f9f3a);return _0x1534ef[_0x19ca2f]+_0x1534ef[_0x244ff8]+_0x1534ef[_0x4b0695];}exports['getSymKey']=getSymKey;function getSymVal(_0x197ee7){const _0x45d80f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',_0x346a12=_0x45d80f['length'];if(_0x197ee7<0x0||_0x197ee7>=Math['pow'](_0x346a12,0x2))throw new Error('Number\x20out\x20of\x20range');const [_0x4f0db6,_0x2ccfe8]=divmod(_0x197ee7,_0x346a12);return _0x45d80f[_0x4f0db6]+_0x45d80f[_0x2ccfe8];}exports['getSymVal']=getSymVal;function divmod(_0x51a25f,_0x591514){return[Math['floor'](_0x51a25f/_0x591514),_0x51a25f%_0x591514];}function getIndexedHash(_0x481da9,_0x27980c){const _0x25ecad=_0x481da9[_0x27980c]||0x0,_0x31dd64={..._0x481da9};return delete _0x31dd64[_0x27980c],[_0x25ecad,_0x31dd64];}exports['getIndexedHash']=getIndexedHash;function getValueByPath(_0x459abf,_0x35a70a){const _0x16932e=_0x35a70a['split']('/');let _0x32b6ce=_0x459abf;for(const _0x40e6f9 of _0x16932e){if(_0x32b6ce[_0x40e6f9]!==undefined)_0x32b6ce=_0x32b6ce[_0x40e6f9];else return undefined;}return _0x32b6ce;}exports['getValueByPath']=getValueByPath;function restoreHierarchy(_0x2a51fe){const _0x5504d0={};for(const _0x257718 in _0x2a51fe){if(_0x2a51fe[_0x257718]===undefined)continue;const _0xbefef7=_0x257718['split']('/');let _0x5c83c9=_0x5504d0;for(let _0x2717c0=0x0;_0x2717c0<_0xbefef7['length'];_0x2717c0++){_0x2717c0===_0xbefef7['length']-0x1?_0x5c83c9[_0xbefef7[_0x2717c0]]=_0x2a51fe[_0x257718]:(_0x5c83c9[_0xbefef7[_0x2717c0]]=_0x5c83c9[_0xbefef7[_0x2717c0]]||{},_0x5c83c9=_0x5c83c9[_0xbefef7[_0x2717c0]]);}}return _0x5504d0;}exports['restoreHierarchy']=restoreHierarchy;function isValidCron(_0x2cebc8){const _0x4b0b5a=/^(\*|([0-5]?\d)) (\*|([01]?\d|2[0-3])) (\*|([12]?\d|3[01])) (\*|([1-9]|1[0-2])) (\*|([0-6](?:-[0-6])?(?:,[0-6])?))$/;return _0x4b0b5a['test'](_0x2cebc8);}exports['isValidCron']=isValidCron;const s=_0x37f2aa=>{return(0x0,ms_1['default'])(_0x37f2aa)/0x3e8;};exports['s']=s;const parseStreamMessage=_0x2c3df5=>{try{return JSON['parse'](_0x2c3df5);}catch(_0x1bca27){logger['error']('Error\x20parsing\x20Stream\x20message',{..._0x1bca27});throw _0x1bca27;}};exports['parseStreamMessage']=parseStreamMessage;const isStreamMessage=_0x8bdfd5=>{return Array['isArray'](_0x8bdfd5)&&Array['isArray'](_0x8bdfd5[0x0]);};exports['isStreamMessage']=isStreamMessage;const arrayToHash=_0x31b79b=>{const _0x5b1ec8=[];let _0x40bc86;for(let _0xc72157=0x1;_0xc72157<_0x31b79b['length'];_0xc72157++){const _0x122a78=_0x31b79b[_0xc72157],_0x52cc12={};if(Array['isArray'](_0x122a78)){for(let _0x388ecc=0x0;_0x388ecc<_0x122a78['length'];_0x388ecc+=0x2){const _0x24357a=_0x122a78[_0x388ecc],_0x85826=_0x122a78[_0x388ecc+0x1];_0x52cc12[_0x24357a]=_0x85826;}_0x40bc86&&(_0x52cc12['$']=_0x40bc86),_0x5b1ec8['push'](_0x52cc12),_0x40bc86=undefined;}else _0x40bc86=_0x122a78;}return _0x5b1ec8;};exports['arrayToHash']=arrayToHash;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.3.11",
3
+ "version": "0.3.12",
4
4
  "description": "Unbreakable Workflows",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -30,12 +30,12 @@
30
30
  "test:connect:redis": "NODE_ENV=test jest ./tests/unit/services/connector/providers/redis.test.ts --detectOpenHandles --forceExit --verbose",
31
31
  "test:connect:nats": "NODE_ENV=test jest ./tests/unit/services/connector/providers/nats.test.ts --detectOpenHandles --forceExit --verbose",
32
32
  "test:cycle": "NODE_ENV=test jest ./tests/functional/cycle/*.test.ts --detectOpenHandles --forceExit --verbose",
33
- "test:meshflow": "NODE_ENV=test jest ./tests/meshflow/*/index.test.ts --detectOpenHandles --forceExit --verbose",
33
+ "test:meshflow": "NODE_ENV=test jest ./tests/meshflow/*/*.test.ts --detectOpenHandles --forceExit --verbose",
34
34
  "test:meshflow:basic": "NODE_ENV=test jest ./tests/meshflow/basic/index.test.ts --detectOpenHandles --forceExit --verbose",
35
35
  "test:meshflow:collision": "NODE_ENV=test HMSH_LOGLEVEL=debug jest ./tests/meshflow/collision/index.test.ts --detectOpenHandles --forceExit --verbose",
36
36
  "test:meshflow:fatal": "NODE_ENV=test jest ./tests/meshflow/fatal/index.test.ts --detectOpenHandles --forceExit --verbose",
37
- "test:meshflow:goodbye": "NODE_ENV=test jest ./tests/meshflow/goodbye/index.test.ts --detectOpenHandles --forceExit --verbose",
38
- "test:meshflow:hello": "HMSH_IS_CLUSTER=true NODE_ENV=test jest ./tests/meshflow/helloworld/index.test.ts --detectOpenHandles --forceExit --verbose",
37
+ "test:meshflow:goodbye": "NODE_ENV=test jest ./tests/meshflow/goodbye/*.test.ts --detectOpenHandles --forceExit --verbose",
38
+ "test:meshflow:hello": "HMSH_LOGLEVEL=debug HMSH_IS_CLUSTER=true NODE_ENV=test jest ./tests/meshflow/helloworld/*.test.ts --detectOpenHandles --forceExit --verbose",
39
39
  "test:meshflow:hook": "NODE_ENV=test jest ./tests/meshflow/hook/index.test.ts --detectOpenHandles --forceExit --verbose",
40
40
  "test:meshflow:interrupt": "NODE_ENV=test jest ./tests/meshflow/interrupt/index.test.ts --detectOpenHandles --forceExit --verbose",
41
41
  "test:meshflow:loopactivity": "NODE_ENV=test jest ./tests/meshflow/loopactivity/index.test.ts --detectOpenHandles --forceExit --verbose",
@@ -1 +1 @@
1
- 'use strict';(function(_0xd88cda,_0x40cf49){const _0xdc612b=_0x1664,_0x471446=_0xd88cda();while(!![]){try{const _0x39808e=parseInt(_0xdc612b(0x99))/0x1+parseInt(_0xdc612b(0x91))/0x2+-parseInt(_0xdc612b(0x93))/0x3*(-parseInt(_0xdc612b(0x97))/0x4)+parseInt(_0xdc612b(0x96))/0x5*(-parseInt(_0xdc612b(0x8f))/0x6)+parseInt(_0xdc612b(0x92))/0x7*(parseInt(_0xdc612b(0x95))/0x8)+parseInt(_0xdc612b(0x94))/0x9*(-parseInt(_0xdc612b(0x98))/0xa)+parseInt(_0xdc612b(0x90))/0xb;if(_0x39808e===_0x40cf49)break;else _0x471446['push'](_0x471446['shift']());}catch(_0x45649f){_0x471446['push'](_0x471446['shift']());}}}(_0x5e52,0x86c84));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Activity']=void 0x0;function _0x5e52(){const _0x6995c5=['438JpEKDe','4140972UNbkag','956440IDgWZT','4482744nIjVUA','3iaqAtZ','27rPxhaF','8RvVEqh','41315eUQoLC','506732NQekbi','1811570aWyIgK','76991sipzvt'];_0x5e52=function(){return _0x6995c5;};return _0x5e52();}function _0x1664(_0x414ad3,_0x2a2edb){const _0x5e5290=_0x5e52();return _0x1664=function(_0x16645b,_0x15dab1){_0x16645b=_0x16645b-0x8f;let _0x351fcc=_0x5e5290[_0x16645b];return _0x351fcc;},_0x1664(_0x414ad3,_0x2a2edb);}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(_0x33a928,_0x12c7f7,_0x24eaed,_0x1823d0,_0x49a468,_0x4e3ec7){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x33a928,this['data']=_0x12c7f7,this['metadata']=_0x24eaed,this['hook']=_0x1823d0,this['engine']=_0x49a468,this['context']=_0x4e3ec7||{'data':{},'metadata':{}},this['logger']=_0x49a468['logger'],this['store']=_0x49a468['store'];}['setLeg'](_0xbedb42){this['leg']=_0xbedb42;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0x46f014=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0x46f014!==undefined&&!isNaN(Number(_0x46f014)))return _0x46f014;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x10a886=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x10a886);}catch(_0x581b5a){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x10a886>0x0){if(this['context']['metadata']['js']===_0x10a886){const _0x4b792f=await this['setStatus'](-_0x10a886);Number(_0x4b792f)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x581b5a;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0x3f824d=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,_0x3f824d);}async['processEvent'](_0x5dc63b=stream_1['StreamStatus']['SUCCESS'],_0x253f43=0xc8,_0x593123='output'){this['setLeg'](0x2);const _0x3844d2=this['context']['metadata']['jid'];if(!_0x3844d2){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x2e417b=this['metadata']['aid'];this['status']=_0x5dc63b,this['code']=_0x253f43,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x3844d2,'aid':_0x2e417b,'status':_0x5dc63b,'code':_0x253f43});let _0x458dea;try{const _0x4559db=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x4559db),_0x458dea=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x458dea['startActivitySpan'](this['leg']);let _0x54de31;if(_0x5dc63b===stream_1['StreamStatus']['PENDING'])_0x54de31=await this['processPending'](_0x593123);else _0x5dc63b===stream_1['StreamStatus']['SUCCESS']?_0x54de31=await this['processSuccess'](_0x593123):_0x54de31=await this['processError']();this['transitionAdjacent'](_0x54de31,_0x458dea);}catch(_0x44ba62){if(_0x44ba62 instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0x44ba62['fault']+'-error',{..._0x44ba62});return;}else{if(_0x44ba62 instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0x44ba62});return;}else{if(_0x44ba62 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x44ba62});return;}else{if(_0x44ba62 instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0x44ba62});return;}}}}this['logger']['error']('activity-process-event-error',{..._0x44ba62,'message':_0x44ba62['message'],'stack':_0x44ba62['stack'],'name':_0x44ba62['name']}),_0x458dea?.['setActivityError'](_0x44ba62['message']);throw _0x44ba62;}finally{_0x458dea?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x3844d2,'aid':_0x2e417b});}}async['processPending'](_0xa7e2cf){this['bindActivityData'](_0xa7e2cf),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x491797=this['store']['transact']();return await this['setState'](_0x491797),await collator_1['CollatorService']['notarizeContinuation'](this,_0x491797),await this['setStatus'](this['adjacencyList']['length'],_0x491797),await _0x491797['exec']();}async['processSuccess'](_0x45487c){this['bindActivityData'](_0x45487c),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x140b87=this['store']['transact']();return await this['setState'](_0x140b87),await collator_1['CollatorService']['notarizeCompletion'](this,_0x140b87),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x140b87),await _0x140b87['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0xd26ce6=this['store']['transact']();return await this['setState'](_0xd26ce6),await collator_1['CollatorService']['notarizeCompletion'](this,_0xd26ce6),await this['setStatus'](this['adjacencyList']['length']-0x1,_0xd26ce6),await _0xd26ce6['exec']();}async['transitionAdjacent'](_0x47778a,_0x51bc52){_0x51bc52['mapActivityAttributes']();const _0xcf6c3e=this['resolveStatus'](_0x47778a),_0x57730f={'app.job.jss':_0xcf6c3e},_0x30ca42=await this['transition'](this['adjacencyList'],_0xcf6c3e);_0x30ca42?.['length']&&(_0x57730f['app.activity.mids']=_0x30ca42['join'](',')),_0x51bc52['setActivityAttributes'](_0x57730f);}['resolveStatus'](_0x416dc0){const _0x33a458=_0x416dc0[_0x416dc0['length']-0x1];return Array['isArray'](_0x33a458)?Number(_0x33a458[0x1]):Number(_0x33a458);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x22650f=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0xb4a0b4=_0x22650f['mapRules']();if(_0xb4a0b4)for(const _0x104e74 in _0xb4a0b4){const _0x43c78b=_0x104e74['indexOf']('[');if(_0x43c78b>-0x1){const _0x481fc6=_0x104e74['substring'](_0x43c78b+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x481fc6))){const _0x354dc8=_0x104e74['substring'](0x0,_0x43c78b);_0xb4a0b4[_0x354dc8]=_0xb4a0b4[_0x104e74],delete _0xb4a0b4[_0x104e74];}else{if(_0x481fc6==='-'||_0x481fc6==='_'){const _0x1248b4=_0xb4a0b4[_0x104e74];Object['keys'](_0x1248b4)['forEach'](_0x515955=>{_0xb4a0b4[_0x515955]=_0x1248b4[_0x515955];});}}}}this['context']['data']=_0xb4a0b4;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x5886d5=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x5886d5['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x56a8f1=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x4d2689=_0x56a8f1['mapRules'](),_0x2e45b2=this['metadata']['aid'],_0x47a635={...this['context'][_0x2e45b2]['output'],..._0x4d2689};this['context'][_0x2e45b2]['output']['data']=_0x47a635;}}async['registerTimeout'](){}['bindActivityError'](_0x57c85b){const _0x1e5e92=this['context'][this['metadata']['aid']]['output']['metadata'];_0x1e5e92['err']=JSON['stringify'](this['data']),_0x1e5e92['$error']={..._0x57c85b,'is_stream_error':!![]};}['bindJobError'](_0x41e475){this['context']['metadata']['err']=JSON['stringify']({..._0x41e475,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0x2f3137,_0x50d349){const {id:_0x440653}=await this['engine']['getVID']();return await this['store']['setStatus'](_0x2f3137,this['context']['metadata']['jid'],_0x440653,_0x50d349);}['authorizeEntry'](_0x4631ad){return this['adjacencyList']?.['map'](_0x5462d5=>{const {metadata:{aid:_0x3d00c4}}=_0x5462d5;return _0x4631ad[_0x3d00c4+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x3d00c4;})??[];}['bindDimensionalAddress'](_0x4a5d83){const _0x57cb91=this['resolveDad']();_0x4a5d83[this['metadata']['aid']+'/output/metadata/dad']=_0x57cb91;}async['setState'](_0x378c69){const _0x206423=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x512c43={};await this['bindJobState'](_0x512c43);const _0x1590a8=this['authorizeEntry'](_0x512c43);this['bindDimensionalAddress'](_0x512c43),this['bindActivityState'](_0x512c43);const _0x105e1f=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x1590a8],_0x231dd3=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x512c43,this['getJobStatus'](),_0x206423,_0x105e1f,_0x231dd3,_0x378c69);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x3adfb7=this['context']['$self'];!_0x3adfb7['output']['metadata']&&(_0x3adfb7['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x3adfb7['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x55a808=(0x0,utils_1['formatISODate'])(new Date());_0x3adfb7['output']['metadata']['ac']=_0x55a808,_0x3adfb7['output']['metadata']['au']=_0x55a808,_0x3adfb7['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x3adfb7['output']['metadata']['stp']=this['config']['subtype']),_0x3adfb7['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x17d07f){const _0x2aba0e=await this['getTriggerConfig'](),_0x53bcb9=[..._0x2aba0e['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x3823ac of _0x53bcb9){const _0x2628a2=(0x0,utils_1['getValueByPath'])(this['context'],_0x3823ac);_0x2628a2!==undefined&&(_0x17d07f[_0x3823ac]=_0x2628a2);}for(const _0x5329f2 in this['context']?.['data']??{}){(_0x5329f2['startsWith']('-')||_0x5329f2['startsWith']('_'))&&(_0x17d07f[_0x5329f2]=this['context']['data'][_0x5329f2]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x17d07f,this['config'],this['context']);}['bindActivityState'](_0x5b0235){const _0x125f6c=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0x364536 of _0x125f6c){const _0x3f03d5=this['metadata']['aid']+'/'+_0x364536,_0x2926d3=(0x0,utils_1['getValueByPath'])(this['context'],_0x3f03d5);_0x2926d3!==undefined&&(_0x5b0235[_0x3f03d5]=_0x2926d3);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x5b0235,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x4d0916=>'metadata/'+_0x4d0916);}['bindActivityMetadataPaths'](){const _0x4ccd3d=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x4ccd3d]['KEYS']['map'](_0x3f9e27=>'output/metadata/'+_0x3f9e27);}async['getState'](){const _0x2940cd=this['context']['metadata']['gid'],_0x5244e8='$'+this['config']['subscribes'],_0x5bc01c={[_0x5244e8]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x3f6d58=>'metadata/'+_0x3f6d58)};for(let [_0x3294d4,_0x349185]of Object['entries'](this['config']['consumes'])){if(_0x3294d4==='$job')for(const _0x1a7a13 of _0x349185){_0x5bc01c[_0x5244e8]['push'](_0x1a7a13);}else{_0x3294d4==='$self'&&(_0x3294d4=this['metadata']['aid']);!_0x5bc01c[_0x3294d4]&&(_0x5bc01c[_0x3294d4]=[]);for(const _0x25350d of _0x349185){_0x5bc01c[_0x3294d4]['push'](_0x3294d4+'/'+_0x25350d);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0x5bc01c,this['config'],this['metadata'],this['leg']);const {dad:_0x1770db,jid:_0x48c071}=this['context']['metadata'],_0x941e13=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x1770db||''),[_0xd7f701,_0x5be94d]=await this['store']['getState'](_0x48c071,_0x5bc01c,_0x941e13);this['context']=(0x0,utils_1['restoreHierarchy'])(_0xd7f701),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x2940cd),this['initDimensionalAddress'](_0x1770db),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x54c9a1,_0x55211c){if(_0x55211c!==_0x54c9a1)throw new errors_1['GenerationalError'](_0x54c9a1,_0x55211c,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0x3419de){this['metadata']['dad']=_0x3419de;}['initSelf'](_0x324311){const _0x4e978b=this['metadata']['aid'];!_0x324311[_0x4e978b]&&(_0x324311[_0x4e978b]={});const _0x502773=_0x324311[_0x4e978b];return!_0x502773['output']&&(_0x502773['output']={}),!_0x502773['input']&&(_0x502773['input']={}),!_0x502773['hook']&&(_0x502773['hook']={}),!_0x502773['output']['metadata']&&(_0x502773['output']['metadata']={}),_0x502773['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x324311['$self']=_0x502773,_0x324311['$job']=_0x324311,_0x324311;}['initPolicies'](_0x411191){const _0x49990a=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0x411191);_0x411191['metadata']['expire']=_0x49990a;if(this['config']['persistent']!=undefined){const _0x4c5f2a=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0x411191);_0x411191['metadata']['persistent']=_0x4c5f2a;}}['bindActivityData'](_0x2da65b){this['context'][this['metadata']['aid']][_0x2da65b]['data']=this['data'];}['resolveDad'](){let _0x207f5b=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x207f5b=_0x207f5b['substring'](0x0,_0x207f5b['lastIndexOf'](','))+','+this['adjacentIndex']),_0x207f5b;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0x1d4998=[],_0x1d5fcf=await this['store']['getTransitions'](await this['engine']['getVID']()),_0x52a8c1=_0x1d5fcf['.'+this['metadata']['aid']],_0x1f25bf=this['resolveAdjacentDad']();if(_0x52a8c1)for(const _0x564cec in _0x52a8c1){const _0x258017=_0x52a8c1[_0x564cec];mapper_1['MapperService']['evaluate'](_0x258017,this['context'],this['code'])&&_0x1d4998['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x1f25bf,'aid':_0x564cec,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0x1d4998;}['isJobComplete'](_0x51c6e2){return _0x51c6e2<=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'](_0x2a35e7,_0x1cea2d){if(this['jobWasInterrupted'](_0x1cea2d))return;let _0x9cea6=[];(this['shouldEmit']()||this['isJobComplete'](_0x1cea2d)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x1cea2d)&&!this['shouldPersistJob']()});if(_0x2a35e7['length']&&!this['isJobComplete'](_0x1cea2d)){const _0x3ffe26=this['store']['transact']();for(const _0x166f63 of _0x2a35e7){await this['engine']['router']?.['publishMessage'](null,_0x166f63,_0x3ffe26);}_0x9cea6=await _0x3ffe26['exec']();}return _0x9cea6;}['jobWasInterrupted'](_0x202b45){return _0x202b45<-0x5f5e100;}}exports['Activity']=Activity;
1
+ 'use strict';function _0x5d10(_0x1c2517,_0x5e79ff){const _0x29dfc1=_0x29df();return _0x5d10=function(_0x5d1096,_0x20267d){_0x5d1096=_0x5d1096-0x179;let _0xdeb4d7=_0x29dfc1[_0x5d1096];return _0xdeb4d7;},_0x5d10(_0x1c2517,_0x5e79ff);}function _0x29df(){const _0x8309b2=['42036mMGRYg','3005055aSiAxe','4032eAOnFg','258787wCYHiJ','3589340tKiUAK','7tDefVY','3419080lXgBHO','305484HvJKbY','22GRaLZl','840oMSSdE'];_0x29df=function(){return _0x8309b2;};return _0x29df();}(function(_0x280216,_0x43d843){const _0x549a56=_0x5d10,_0x47826d=_0x280216();while(!![]){try{const _0x1a7a1a=parseInt(_0x549a56(0x179))/0x1+-parseInt(_0x549a56(0x17e))/0x2*(-parseInt(_0x549a56(0x180))/0x3)+parseInt(_0x549a56(0x17d))/0x4+-parseInt(_0x549a56(0x17f))/0x5*(-parseInt(_0x549a56(0x182))/0x6)+parseInt(_0x549a56(0x17b))/0x7*(parseInt(_0x549a56(0x17c))/0x8)+-parseInt(_0x549a56(0x181))/0x9+-parseInt(_0x549a56(0x17a))/0xa;if(_0x1a7a1a===_0x43d843)break;else _0x47826d['push'](_0x47826d['shift']());}catch(_0xcdb7a1){_0x47826d['push'](_0x47826d['shift']());}}}(_0x29df,0x52366));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Activity']=void 0x0;const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),mapper_1=require('../mapper'),pipe_1=require('../pipe'),serializer_1=require('../serializer'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream');class Activity{constructor(_0x28931e,_0x24ed92,_0xc234e7,_0x241fe5,_0x1bc1d1,_0xffea47){this['status']=stream_1['StreamStatus']['SUCCESS'],this['code']=0xc8,this['adjacentIndex']=0x0,this['config']=_0x28931e,this['data']=_0x24ed92,this['metadata']=_0xc234e7,this['hook']=_0x241fe5,this['engine']=_0x1bc1d1,this['context']=_0xffea47||{'data':{},'metadata':{}},this['logger']=_0x1bc1d1['logger'],this['store']=_0x1bc1d1['store'];}['setLeg'](_0x4710df){this['leg']=_0x4710df;}['mapStatusThreshold'](){if(this['config']['statusThreshold']!==undefined){const _0x15ac73=pipe_1['Pipe']['resolve'](this['config']['statusThreshold'],this['context']);if(_0x15ac73!==undefined&&!isNaN(Number(_0x15ac73)))return _0x15ac73;}return 0x0;}async['verifyEntry'](){this['setLeg'](0x1),await this['getState']();const _0x1981d5=this['mapStatusThreshold']();try{collator_1['CollatorService']['assertJobActive'](this['context']['metadata']['js'],this['context']['metadata']['jid'],this['metadata']['aid'],_0x1981d5);}catch(_0x4ad59c){await collator_1['CollatorService']['notarizeEntry'](this);if(_0x1981d5>0x0){if(this['context']['metadata']['js']===_0x1981d5){const _0x3fc6ce=await this['setStatus'](-_0x1981d5);Number(_0x3fc6ce)===0x0&&await this['engine']['runJobCompletionTasks'](this['context']);}}else throw _0x4ad59c;return;}await collator_1['CollatorService']['notarizeEntry'](this);}async['verifyReentry'](){const _0x3c3f21=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,_0x3c3f21);}async['processEvent'](_0x4fd195=stream_1['StreamStatus']['SUCCESS'],_0x2238dd=0xc8,_0x4730c1='output'){this['setLeg'](0x2);const _0x226140=this['context']['metadata']['jid'];if(!_0x226140){this['logger']['error']('activity-process-event-error',{'message':'job\x20id\x20is\x20undefined'});return;}const _0x1a97a8=this['metadata']['aid'];this['status']=_0x4fd195,this['code']=_0x2238dd,this['logger']['debug']('activity-process-event',{'topic':this['config']['subtype'],'jid':_0x226140,'aid':_0x1a97a8,'status':_0x4fd195,'code':_0x2238dd});let _0x2af52f;try{const _0x50bfc0=await this['verifyReentry']();this['adjacentIndex']=collator_1['CollatorService']['getDimensionalIndex'](_0x50bfc0),_0x2af52f=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x2af52f['startActivitySpan'](this['leg']);let _0x28f869;if(_0x4fd195===stream_1['StreamStatus']['PENDING'])_0x28f869=await this['processPending'](_0x4730c1);else _0x4fd195===stream_1['StreamStatus']['SUCCESS']?_0x28f869=await this['processSuccess'](_0x4730c1):_0x28f869=await this['processError']();this['transitionAdjacent'](_0x28f869,_0x2af52f);}catch(_0xb40119){if(_0xb40119 instanceof errors_1['CollationError']){this['logger']['info']('process-event-'+_0xb40119['fault']+'-error',{..._0xb40119});return;}else{if(_0xb40119 instanceof errors_1['InactiveJobError']){this['logger']['info']('process-event-inactive-job-error',{..._0xb40119});return;}else{if(_0xb40119 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0xb40119});return;}else{if(_0xb40119 instanceof errors_1['GetStateError']){this['logger']['info']('process-event-get-job-error',{..._0xb40119});return;}}}}this['logger']['error']('activity-process-event-error',{..._0xb40119,'message':_0xb40119['message'],'stack':_0xb40119['stack'],'name':_0xb40119['name']}),_0x2af52f?.['setActivityError'](_0xb40119['message']);throw _0xb40119;}finally{_0x2af52f?.['endActivitySpan'](),this['logger']['debug']('activity-process-event-end',{'jid':_0x226140,'aid':_0x1a97a8});}}async['processPending'](_0x30c0e6){this['bindActivityData'](_0x30c0e6),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0x4a8ae0=this['store']['transact']();return await this['setState'](_0x4a8ae0),await collator_1['CollatorService']['notarizeContinuation'](this,_0x4a8ae0),await this['setStatus'](this['adjacencyList']['length'],_0x4a8ae0),await _0x4a8ae0['exec']();}async['processSuccess'](_0x23aa07){this['bindActivityData'](_0x23aa07),this['adjacencyList']=await this['filterAdjacent'](),this['mapJobData']();const _0xadc87b=this['store']['transact']();return await this['setState'](_0xadc87b),await collator_1['CollatorService']['notarizeCompletion'](this,_0xadc87b),await this['setStatus'](this['adjacencyList']['length']-0x1,_0xadc87b),await _0xadc87b['exec']();}async['processError'](){this['bindActivityError'](this['data']),this['adjacencyList']=await this['filterAdjacent']();!this['adjacencyList']['length']&&this['bindJobError'](this['data']);this['mapJobData']();const _0x31bf27=this['store']['transact']();return await this['setState'](_0x31bf27),await collator_1['CollatorService']['notarizeCompletion'](this,_0x31bf27),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x31bf27),await _0x31bf27['exec']();}async['transitionAdjacent'](_0x87d3c0,_0x265cf9){_0x265cf9['mapActivityAttributes']();const _0x2212bf=this['resolveStatus'](_0x87d3c0),_0x4155cb={'app.job.jss':_0x2212bf},_0x4cf0b3=await this['transition'](this['adjacencyList'],_0x2212bf);_0x4cf0b3?.['length']&&(_0x4155cb['app.activity.mids']=_0x4cf0b3['join'](',')),_0x265cf9['setActivityAttributes'](_0x4155cb);}['resolveStatus'](_0x3a938f){const _0x2fb9ae=_0x3a938f[_0x3a938f['length']-0x1];return Array['isArray'](_0x2fb9ae)?Number(_0x2fb9ae[0x1]):Number(_0x2fb9ae);}['mapJobData'](){if(this['config']['job']?.['maps']){const _0x3980fb=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['job']['maps']),this['context']),_0x1c8970=_0x3980fb['mapRules']();if(_0x1c8970)for(const _0x5f2c50 in _0x1c8970){const _0x1b0fa6=_0x5f2c50['indexOf']('[');if(_0x1b0fa6>-0x1){const _0x3ce2a0=_0x5f2c50['substring'](_0x1b0fa6+0x1)['split'](']')[0x0];if(!isNaN(Number(_0x3ce2a0))){const _0x8793c6=_0x5f2c50['substring'](0x0,_0x1b0fa6);_0x1c8970[_0x8793c6]=_0x1c8970[_0x5f2c50],delete _0x1c8970[_0x5f2c50];}else{if(_0x3ce2a0==='-'||_0x3ce2a0==='_'){const _0x52d939=_0x1c8970[_0x5f2c50];Object['keys'](_0x52d939)['forEach'](_0x5bffa5=>{_0x1c8970[_0x5bffa5]=_0x52d939[_0x5bffa5];});}}}}this['context']['data']=_0x1c8970;}}['mapInputData'](){if(this['config']['input']?.['maps']){const _0x43f320=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['input']['maps']),this['context']);this['context']['data']=_0x43f320['mapRules']();}}['mapOutputData'](){if(this['config']['output']?.['maps']){const _0x1a93de=new mapper_1['MapperService']((0x0,utils_1['deepCopy'])(this['config']['output']['maps']),this['context']),_0x36afc4=_0x1a93de['mapRules'](),_0x2183c5=this['metadata']['aid'],_0x400b9a={...this['context'][_0x2183c5]['output'],..._0x36afc4};this['context'][_0x2183c5]['output']['data']=_0x400b9a;}}async['registerTimeout'](){}['bindActivityError'](_0x4d7501){const _0x2e3c5e=this['context'][this['metadata']['aid']]['output']['metadata'];_0x2e3c5e['err']=JSON['stringify'](this['data']),_0x2e3c5e['$error']={..._0x4d7501,'is_stream_error':!![]};}['bindJobError'](_0x41c76d){this['context']['metadata']['err']=JSON['stringify']({..._0x41c76d,'is_stream_error':!![]});}async['getTriggerConfig'](){return await this['store']['getSchema'](this['config']['trigger'],await this['engine']['getVID']());}['getJobStatus'](){return null;}async['setStatus'](_0x49aee1,_0x5e8079){const {id:_0x3a7597}=await this['engine']['getVID']();return await this['store']['setStatus'](_0x49aee1,this['context']['metadata']['jid'],_0x3a7597,_0x5e8079);}['authorizeEntry'](_0x27f1ed){return this['adjacencyList']?.['map'](_0x23ef88=>{const {metadata:{aid:_0x17ce72}}=_0x23ef88;return _0x27f1ed[_0x17ce72+'/output/metadata/as']=collator_1['CollatorService']['getSeed'](),_0x17ce72;})??[];}['bindDimensionalAddress'](_0x51487f){const _0x843312=this['resolveDad']();_0x51487f[this['metadata']['aid']+'/output/metadata/dad']=_0x843312;}async['setState'](_0x1e2a50){const _0x2b5ef3=this['context']['metadata']['jid'];this['bindJobMetadata'](),this['bindActivityMetadata']();const _0x59c5f6={};await this['bindJobState'](_0x59c5f6);const _0x47c5c7=this['authorizeEntry'](_0x59c5f6);this['bindDimensionalAddress'](_0x59c5f6),this['bindActivityState'](_0x59c5f6);const _0x4e1075=['$'+this['config']['subscribes'],this['metadata']['aid'],..._0x47c5c7],_0x65b72c=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],this['resolveDad']());return await this['store']['setState'](_0x59c5f6,this['getJobStatus'](),_0x2b5ef3,_0x4e1075,_0x65b72c,_0x1e2a50);}['bindJobMetadata'](){this['context']['metadata']['ju']=(0x0,utils_1['formatISODate'])(new Date());}['bindActivityMetadata'](){const _0x28b7b6=this['context']['$self'];!_0x28b7b6['output']['metadata']&&(_0x28b7b6['output']['metadata']={});this['status']===stream_1['StreamStatus']['ERROR']&&(_0x28b7b6['output']['metadata']['err']=JSON['stringify'](this['data']));const _0x5288c4=(0x0,utils_1['formatISODate'])(new Date());_0x28b7b6['output']['metadata']['ac']=_0x5288c4,_0x28b7b6['output']['metadata']['au']=_0x5288c4,_0x28b7b6['output']['metadata']['atp']=this['config']['type'],this['config']['subtype']&&(_0x28b7b6['output']['metadata']['stp']=this['config']['subtype']),_0x28b7b6['output']['metadata']['aid']=this['metadata']['aid'];}async['bindJobState'](_0x32e199){const _0x1c2993=await this['getTriggerConfig'](),_0x23af4b=[..._0x1c2993['PRODUCES']||[],...this['bindJobMetadataPaths']()];for(const _0x587043 of _0x23af4b){const _0x36302a=(0x0,utils_1['getValueByPath'])(this['context'],_0x587043);_0x36302a!==undefined&&(_0x32e199[_0x587043]=_0x36302a);}for(const _0x35db61 in this['context']?.['data']??{}){(_0x35db61['startsWith']('-')||_0x35db61['startsWith']('_'))&&(_0x32e199[_0x35db61]=this['context']['data'][_0x35db61]);}telemetry_1['TelemetryService']['bindJobTelemetryToState'](_0x32e199,this['config'],this['context']);}['bindActivityState'](_0x541a4a){const _0x303a1e=[...this['config']['produces'],...this['bindActivityMetadataPaths']()];for(const _0x11cb87 of _0x303a1e){const _0x19dd3c=this['metadata']['aid']+'/'+_0x11cb87,_0x5c2d79=(0x0,utils_1['getValueByPath'])(this['context'],_0x19dd3c);_0x5c2d79!==undefined&&(_0x541a4a[_0x19dd3c]=_0x5c2d79);}telemetry_1['TelemetryService']['bindActivityTelemetryToState'](_0x541a4a,this['config'],this['metadata'],this['context'],this['leg']);}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB_UPDATE']['KEYS']['map'](_0x153f71=>'metadata/'+_0x153f71);}['bindActivityMetadataPaths'](){const _0x106a2f=this['leg']===0x1?'ACTIVITY':'ACTIVITY_UPDATE';return serializer_1['MDATA_SYMBOLS'][_0x106a2f]['KEYS']['map'](_0x36f084=>'output/metadata/'+_0x36f084);}async['getState'](){const _0x14f186=this['context']['metadata']['gid'],_0x1e53a8='$'+this['config']['subscribes'],_0xbe5be6={[_0x1e53a8]:serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x51fde8=>'metadata/'+_0x51fde8)};for(let [_0x20cf68,_0x32f06e]of Object['entries'](this['config']['consumes'])){if(_0x20cf68==='$job')for(const _0x3d4c0b of _0x32f06e){_0xbe5be6[_0x1e53a8]['push'](_0x3d4c0b);}else{_0x20cf68==='$self'&&(_0x20cf68=this['metadata']['aid']);!_0xbe5be6[_0x20cf68]&&(_0xbe5be6[_0x20cf68]=[]);for(const _0x14d5d1 of _0x32f06e){_0xbe5be6[_0x20cf68]['push'](_0x20cf68+'/'+_0x14d5d1);}}}telemetry_1['TelemetryService']['addTargetTelemetryPaths'](_0xbe5be6,this['config'],this['metadata'],this['leg']);const {dad:_0x30e4b2,jid:_0x37e2fa}=this['context']['metadata'],_0x4acd20=collator_1['CollatorService']['getDimensionsById']([...this['config']['ancestors'],this['metadata']['aid']],_0x30e4b2||''),[_0x3c6ea0,_0x56dcd1]=await this['store']['getState'](_0x37e2fa,_0xbe5be6,_0x4acd20);this['context']=(0x0,utils_1['restoreHierarchy'])(_0x3c6ea0),this['assertGenerationalId'](this['context']?.['metadata']?.['gid'],_0x14f186),this['initDimensionalAddress'](_0x30e4b2),this['initSelf'](this['context']),this['initPolicies'](this['context']);}['assertGenerationalId'](_0x49a1a1,_0x108264){if(_0x108264!==_0x49a1a1)throw new errors_1['GenerationalError'](_0x49a1a1,_0x108264,this['context']?.['metadata']?.['jid']??'',this['context']?.['metadata']?.['aid']??'',this['context']?.['metadata']?.['dad']??'');}['initDimensionalAddress'](_0x422731){this['metadata']['dad']=_0x422731;}['initSelf'](_0x3b9f8b){const _0x5b882a=this['metadata']['aid'];!_0x3b9f8b[_0x5b882a]&&(_0x3b9f8b[_0x5b882a]={});const _0x3412e5=_0x3b9f8b[_0x5b882a];return!_0x3412e5['output']&&(_0x3412e5['output']={}),!_0x3412e5['input']&&(_0x3412e5['input']={}),!_0x3412e5['hook']&&(_0x3412e5['hook']={}),!_0x3412e5['output']['metadata']&&(_0x3412e5['output']['metadata']={}),_0x3412e5['output']['metadata']['au']=(0x0,utils_1['formatISODate'])(new Date()),_0x3b9f8b['$self']=_0x3412e5,_0x3b9f8b['$job']=_0x3b9f8b,_0x3b9f8b;}['initPolicies'](_0x4bfa94){const _0x538903=pipe_1['Pipe']['resolve'](this['config']['expire']??enums_1['HMSH_EXPIRE_DURATION'],_0x4bfa94);_0x4bfa94['metadata']['expire']=_0x538903;if(this['config']['persistent']!=undefined){const _0x38d35d=pipe_1['Pipe']['resolve'](this['config']['persistent']??![],_0x4bfa94);_0x4bfa94['metadata']['persistent']=_0x38d35d;}}['bindActivityData'](_0x350ec8){this['context'][this['metadata']['aid']][_0x350ec8]['data']=this['data'];}['resolveDad'](){let _0x7baa0=this['metadata']['dad'];return this['adjacentIndex']>0x0&&(_0x7baa0=_0x7baa0['substring'](0x0,_0x7baa0['lastIndexOf'](','))+','+this['adjacentIndex']),_0x7baa0;}['resolveAdjacentDad'](){return''+this['resolveDad']()+collator_1['CollatorService']['getDimensionalSeed'](0x0);}async['filterAdjacent'](){const _0xa02e33=[],_0x460295=await this['store']['getTransitions'](await this['engine']['getVID']()),_0x42de9e=_0x460295['.'+this['metadata']['aid']],_0x3cafd7=this['resolveAdjacentDad']();if(_0x42de9e)for(const _0x573ea5 in _0x42de9e){const _0x213953=_0x42de9e[_0x573ea5];mapper_1['MapperService']['evaluate'](_0x213953,this['context'],this['code'])&&_0xa02e33['push']({'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':_0x3cafd7,'aid':_0x573ea5,'spn':this['context']['$self']['output']['metadata']?.['l2s'],'trc':this['context']['metadata']['trc']},'type':stream_1['StreamDataType']['TRANSITION'],'data':{}});}return _0xa02e33;}['isJobComplete'](_0x580bf3){return _0x580bf3<=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'](_0x5e82ff,_0x28d0f8){if(this['jobWasInterrupted'](_0x28d0f8))return;let _0x4b001d=[];(this['shouldEmit']()||this['isJobComplete'](_0x28d0f8)||this['shouldPersistJob']())&&await this['engine']['runJobCompletionTasks'](this['context'],{'emit':!this['isJobComplete'](_0x28d0f8)&&!this['shouldPersistJob']()});if(_0x5e82ff['length']&&!this['isJobComplete'](_0x28d0f8)){const _0x5e65c9=this['store']['transact']();for(const _0x5daa05 of _0x5e82ff){await this['engine']['router']?.['publishMessage'](null,_0x5daa05,_0x5e65c9);}_0x4b001d=await _0x5e65c9['exec']();}return _0x4b001d;}['jobWasInterrupted'](_0x139218){return _0x139218<-0x5f5e100;}}exports['Activity']=Activity;
@@ -1 +1 @@
1
- 'use strict';(function(_0x2d5c2a,_0x33cd34){const _0x1820d2=_0x2643,_0x37c391=_0x2d5c2a();while(!![]){try{const _0x5390bc=parseInt(_0x1820d2(0x12c))/0x1*(parseInt(_0x1820d2(0x130))/0x2)+parseInt(_0x1820d2(0x126))/0x3*(-parseInt(_0x1820d2(0x131))/0x4)+parseInt(_0x1820d2(0x12d))/0x5+parseInt(_0x1820d2(0x12e))/0x6*(parseInt(_0x1820d2(0x12a))/0x7)+parseInt(_0x1820d2(0x128))/0x8+-parseInt(_0x1820d2(0x12f))/0x9*(parseInt(_0x1820d2(0x12b))/0xa)+-parseInt(_0x1820d2(0x127))/0xb*(-parseInt(_0x1820d2(0x129))/0xc);if(_0x5390bc===_0x33cd34)break;else _0x37c391['push'](_0x37c391['shift']());}catch(_0x2baa7e){_0x37c391['push'](_0x37c391['shift']());}}}(_0x1339,0x9d11d));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Await']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');function _0x1339(){const _0x360355=['6200195eXJFlu','30xwGaXS','4333941laOTkf','122372TWDzKp','4wbuTOX','3083151zGmlzL','4475845zRhBCm','886672sPqxkL','12RRsSEe','124495KiFMAN','10tDCZuA','5BdgErh'];_0x1339=function(){return _0x360355;};return _0x1339();}function _0x2643(_0x471fc4,_0x5ee4e8){const _0x1339b1=_0x1339();return _0x2643=function(_0x26431e,_0x529810){_0x26431e=_0x26431e-0x126;let _0x43ed0d=_0x1339b1[_0x26431e];return _0x43ed0d;},_0x2643(_0x471fc4,_0x5ee4e8);}class Await extends activity_1['Activity']{constructor(_0x20b662,_0x8fd8c0,_0x27f66a,_0x426c5e,_0x47a103,_0x39fc1e){super(_0x20b662,_0x8fd8c0,_0x27f66a,_0x426c5e,_0x47a103,_0x39fc1e);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x4d3ce1;try{await this['verifyEntry'](),_0x4d3ce1=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x4d3ce1['startActivitySpan'](this['leg']),this['mapInputData']();const _0x5d96c8=this['store']['transact'](),_0x446a8f=await this['execActivity'](_0x5d96c8);await collator_1['CollatorService']['authorizeReentry'](this,_0x5d96c8),await this['setState'](_0x5d96c8),await this['setStatus'](0x0,_0x5d96c8);const _0x30eb70=await _0x5d96c8['exec']();_0x4d3ce1['mapActivityAttributes']();const _0x5f191a=this['resolveStatus'](_0x30eb70);return _0x4d3ce1['setActivityAttributes']({'app.activity.mid':_0x446a8f,'app.job.jss':_0x5f191a}),this['context']['metadata']['aid'];}catch(_0xf45b52){if(_0xf45b52 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0xf45b52});return;}else{if(_0xf45b52 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0xf45b52});return;}else{if(_0xf45b52 instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0xf45b52});return;}else{if(_0xf45b52 instanceof errors_1['CollationError']){if(_0xf45b52['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',{..._0xf45b52});}else this['logger']['error']('await-process-error',{..._0xf45b52});}}}_0x4d3ce1?.['setActivityError'](_0xf45b52['message']);throw _0xf45b52;}finally{_0x4d3ce1?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x454b4c){const _0x4b98bc=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x490c29={'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':_0x4b98bc,'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 _0x44f543=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x44f543===![]&&(_0x490c29['metadata']['await']=![]);}return this['config']['retry']&&(_0x490c29['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x490c29,_0x454b4c);}}exports['Await']=Await;
1
+ 'use strict';(function(_0x56133e,_0x34dc42){const _0x26944b=_0x3c33,_0x464df2=_0x56133e();while(!![]){try{const _0x9e8c6f=parseInt(_0x26944b(0x127))/0x1+-parseInt(_0x26944b(0x128))/0x2*(parseInt(_0x26944b(0x12c))/0x3)+-parseInt(_0x26944b(0x129))/0x4+-parseInt(_0x26944b(0x123))/0x5*(-parseInt(_0x26944b(0x12d))/0x6)+-parseInt(_0x26944b(0x126))/0x7+-parseInt(_0x26944b(0x12a))/0x8*(-parseInt(_0x26944b(0x125))/0x9)+-parseInt(_0x26944b(0x124))/0xa*(-parseInt(_0x26944b(0x12b))/0xb);if(_0x9e8c6f===_0x34dc42)break;else _0x464df2['push'](_0x464df2['shift']());}catch(_0x4cf9d6){_0x464df2['push'](_0x464df2['shift']());}}}(_0x4a2e,0x41096));function _0x4a2e(){const _0x2646f8=['423220wvxkQA','460873eUmhqJ','4liwXTk','1609216cNsKDe','480176LLYqAa','11vairKj','275202xPcKKR','6LTvoUz','581385BuJrvS','2754500bekIaL','9QhYCVf'];_0x4a2e=function(){return _0x2646f8;};return _0x4a2e();}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(_0x3bcc72,_0x340b3a,_0x51d7ae,_0x3b9be8,_0x7ff093,_0xffc080){super(_0x3bcc72,_0x340b3a,_0x51d7ae,_0x3b9be8,_0x7ff093,_0xffc080);}async['process'](){this['logger']['debug']('await-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x204d7f;try{await this['verifyEntry'](),_0x204d7f=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x204d7f['startActivitySpan'](this['leg']),this['mapInputData']();const _0x2528f6=this['store']['transact'](),_0xcf3f75=await this['execActivity'](_0x2528f6);await collator_1['CollatorService']['authorizeReentry'](this,_0x2528f6),await this['setState'](_0x2528f6),await this['setStatus'](0x0,_0x2528f6);const _0x336537=await _0x2528f6['exec']();_0x204d7f['mapActivityAttributes']();const _0x1d9ac5=this['resolveStatus'](_0x336537);return _0x204d7f['setActivityAttributes']({'app.activity.mid':_0xcf3f75,'app.job.jss':_0x1d9ac5}),this['context']['metadata']['aid'];}catch(_0x152157){if(_0x152157 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x152157});return;}else{if(_0x152157 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x152157});return;}else{if(_0x152157 instanceof errors_1['GetStateError']){this['logger']['error']('await-get-state-error',{..._0x152157});return;}else{if(_0x152157 instanceof errors_1['CollationError']){if(_0x152157['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',{..._0x152157});}else this['logger']['error']('await-process-error',{..._0x152157});}}}_0x204d7f?.['setActivityError'](_0x152157['message']);throw _0x152157;}finally{_0x204d7f?.['endActivitySpan'](),this['logger']['debug']('await-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x397d87){const _0x58bc42=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x46a617={'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':_0x58bc42,'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 _0x3e6ca1=pipe_1['Pipe']['resolve'](this['config']['await'],this['context']);_0x3e6ca1===![]&&(_0x46a617['metadata']['await']=![]);}return this['config']['retry']&&(_0x46a617['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](null,_0x46a617,_0x397d87);}}function _0x3c33(_0x21fe4e,_0x12daef){const _0x4a2e78=_0x4a2e();return _0x3c33=function(_0x3c33de,_0x3c912c){_0x3c33de=_0x3c33de-0x123;let _0x4f0726=_0x4a2e78[_0x3c33de];return _0x4f0726;},_0x3c33(_0x21fe4e,_0x12daef);}exports['Await']=Await;
@@ -1 +1 @@
1
- 'use strict';function _0x2e93(_0x5f1b42,_0x42941){const _0x271166=_0x2711();return _0x2e93=function(_0x2e93c1,_0x18f39b){_0x2e93c1=_0x2e93c1-0xd5;let _0x42b3d2=_0x271166[_0x2e93c1];return _0x42b3d2;},_0x2e93(_0x5f1b42,_0x42941);}(function(_0x2ab1a8,_0x5b1c05){const _0x4e981b=_0x2e93,_0x5cb260=_0x2ab1a8();while(!![]){try{const _0x3d1f30=-parseInt(_0x4e981b(0xd8))/0x1+-parseInt(_0x4e981b(0xda))/0x2+-parseInt(_0x4e981b(0xdc))/0x3+-parseInt(_0x4e981b(0xdd))/0x4*(parseInt(_0x4e981b(0xd6))/0x5)+parseInt(_0x4e981b(0xd7))/0x6*(-parseInt(_0x4e981b(0xd5))/0x7)+parseInt(_0x4e981b(0xdb))/0x8*(parseInt(_0x4e981b(0xde))/0x9)+parseInt(_0x4e981b(0xd9))/0xa;if(_0x3d1f30===_0x5b1c05)break;else _0x5cb260['push'](_0x5cb260['shift']());}catch(_0x26184){_0x5cb260['push'](_0x5cb260['shift']());}}}(_0x2711,0xac0c4));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Cycle']=void 0x0;function _0x2711(){const _0x3c68a6=['7xJrZCz','40WWCmiK','1701162Slozyn','645991pkHzwT','31275590uBInRG','1883652FudHfI','6376zQMhWd','3266403iAAdRZ','419164OJZjzb','15534kQbUgv'];_0x2711=function(){return _0x3c68a6;};return _0x2711();}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(_0x14a288,_0x5918ab,_0x5be438,_0x1fc43e,_0x238a22,_0x59570d){super(_0x14a288,_0x5918ab,_0x5be438,_0x1fc43e,_0x238a22,_0x59570d);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x44d86a;try{await this['verifyEntry'](),_0x44d86a=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x44d86a['startActivitySpan'](this['leg']),this['mapInputData']();let _0x232391=this['store']['transact']();await this['setState'](_0x232391),await this['setStatus'](0x0,_0x232391);const _0x2cb149=await _0x232391['exec']();_0x44d86a['mapActivityAttributes']();const _0x1056d4=this['resolveStatus'](_0x2cb149);_0x232391=this['store']['transact']();const _0x56fc27=await this['cycleAncestorActivity'](_0x232391);return _0x44d86a['setActivityAttributes']({'app.activity.mid':_0x56fc27,'app.job.jss':_0x1056d4}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0x232391),await _0x232391['exec'](),this['context']['metadata']['aid'];}catch(_0x540896){if(_0x540896 instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x540896});return;}else{if(_0x540896 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x540896});return;}else{if(_0x540896 instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x540896});return;}else{if(_0x540896 instanceof errors_1['CollationError']){if(_0x540896['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',{..._0x540896});}else this['logger']['error']('cycle-process-error',{..._0x540896});}}}_0x44d86a?.['setActivityError'](_0x540896['message']);throw _0x540896;}finally{_0x44d86a?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0x6b6087){this['mapInputData']();const _0x3d7425={'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,_0x3d7425,_0x6b6087);}}exports['Cycle']=Cycle;
1
+ 'use strict';(function(_0x30cbd6,_0x2f8635){const _0x11f6fe=_0x1763,_0x2c0931=_0x30cbd6();while(!![]){try{const _0xa16ac9=parseInt(_0x11f6fe(0x16c))/0x1*(parseInt(_0x11f6fe(0x16b))/0x2)+-parseInt(_0x11f6fe(0x165))/0x3*(-parseInt(_0x11f6fe(0x161))/0x4)+-parseInt(_0x11f6fe(0x167))/0x5+-parseInt(_0x11f6fe(0x164))/0x6+parseInt(_0x11f6fe(0x162))/0x7*(-parseInt(_0x11f6fe(0x168))/0x8)+parseInt(_0x11f6fe(0x16a))/0x9*(-parseInt(_0x11f6fe(0x166))/0xa)+parseInt(_0x11f6fe(0x163))/0xb*(parseInt(_0x11f6fe(0x169))/0xc);if(_0xa16ac9===_0x2f8635)break;else _0x2c0931['push'](_0x2c0931['shift']());}catch(_0x41d1ae){_0x2c0931['push'](_0x2c0931['shift']());}}}(_0x4896,0xb916c));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Cycle']=void 0x0;function _0x1763(_0x54af48,_0x294cc5){const _0x4896e4=_0x4896();return _0x1763=function(_0x1763e7,_0x236d46){_0x1763e7=_0x1763e7-0x161;let _0x452c5d=_0x4896e4[_0x1763e7];return _0x452c5d;},_0x1763(_0x54af48,_0x294cc5);}function _0x4896(){const _0x28b34b=['14rTOZLw','346841PRBZjT','3729750cEJYmI','42dTtEnZ','2390UIUuQW','6235440CxwcUR','5431984OGPhHn','1236GtDVUO','54243hWrehs','2YpxuvT','673223VBXZbX','429820wtUhfm'];_0x4896=function(){return _0x28b34b;};return _0x4896();}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(_0x441392,_0x377458,_0x8c69b2,_0x587f80,_0x23bf43,_0x523dc3){super(_0x441392,_0x377458,_0x8c69b2,_0x587f80,_0x23bf43,_0x523dc3);}async['process'](){this['logger']['debug']('cycle-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x439bc0;try{await this['verifyEntry'](),_0x439bc0=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x439bc0['startActivitySpan'](this['leg']),this['mapInputData']();let _0x31fd25=this['store']['transact']();await this['setState'](_0x31fd25),await this['setStatus'](0x0,_0x31fd25);const _0x491348=await _0x31fd25['exec']();_0x439bc0['mapActivityAttributes']();const _0x30d212=this['resolveStatus'](_0x491348);_0x31fd25=this['store']['transact']();const _0x20c9f2=await this['cycleAncestorActivity'](_0x31fd25);return _0x439bc0['setActivityAttributes']({'app.activity.mid':_0x20c9f2,'app.job.jss':_0x30d212}),await collator_1['CollatorService']['notarizeEarlyExit'](this,_0x31fd25),await _0x31fd25['exec'](),this['context']['metadata']['aid'];}catch(_0x59b60a){if(_0x59b60a instanceof errors_1['InactiveJobError']){this['logger']['error']('cycle-inactive-job-error',{..._0x59b60a});return;}else{if(_0x59b60a instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x59b60a});return;}else{if(_0x59b60a instanceof errors_1['GetStateError']){this['logger']['error']('cycle-get-state-error',{..._0x59b60a});return;}else{if(_0x59b60a instanceof errors_1['CollationError']){if(_0x59b60a['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',{..._0x59b60a});}else this['logger']['error']('cycle-process-error',{..._0x59b60a});}}}_0x439bc0?.['setActivityError'](_0x59b60a['message']);throw _0x59b60a;}finally{_0x439bc0?.['endActivitySpan'](),this['logger']['debug']('cycle-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['cycleAncestorActivity'](_0x2353c6){this['mapInputData']();const _0x5ed768={'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,_0x5ed768,_0x2353c6);}}exports['Cycle']=Cycle;
@@ -1 +1 @@
1
- 'use strict';(function(_0x2de032,_0x335a54){const _0x3240be=_0x36af,_0x2baaa1=_0x2de032();while(!![]){try{const _0x380067=-parseInt(_0x3240be(0x1bf))/0x1+parseInt(_0x3240be(0x1b9))/0x2+-parseInt(_0x3240be(0x1bb))/0x3+-parseInt(_0x3240be(0x1ba))/0x4*(parseInt(_0x3240be(0x1be))/0x5)+-parseInt(_0x3240be(0x1bc))/0x6+-parseInt(_0x3240be(0x1b8))/0x7+parseInt(_0x3240be(0x1bd))/0x8;if(_0x380067===_0x335a54)break;else _0x2baaa1['push'](_0x2baaa1['shift']());}catch(_0x5253d8){_0x2baaa1['push'](_0x2baaa1['shift']());}}}(_0x39b1,0xec9b4));function _0x39b1(){const _0x5e1d45=['3384963WiEtIg','6425940dLnfqA','49209712lpXWzy','5flaasX','315685FusRRw','10888283ypedkq','432892HvovVI','5312220PFpDzz'];_0x39b1=function(){return _0x5e1d45;};return _0x39b1();}function _0x36af(_0x24b680,_0x1b8ff7){const _0x39b188=_0x39b1();return _0x36af=function(_0x36afb0,_0x2f604e){_0x36afb0=_0x36afb0-0x1b8;let _0x18c402=_0x39b188[_0x36afb0];return _0x18c402;},_0x36af(_0x24b680,_0x1b8ff7);}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(_0x475cc2,_0x1b4623,_0x5ed7f8,_0x2d1d33,_0x207641,_0x564663){super(_0x475cc2,_0x1b4623,_0x5ed7f8,_0x2d1d33,_0x207641,_0x564663);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0xb4deb9;try{return await this['verifyEntry'](),_0xb4deb9=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0xb4deb9['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0xb4deb9):await this['doPassThrough'](_0xb4deb9),this['context']['metadata']['aid'];}catch(_0x4a2cc8){if(_0x4a2cc8 instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x4a2cc8});return;}else{if(_0x4a2cc8 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x4a2cc8});return;}else{if(_0x4a2cc8 instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x4a2cc8});return;}else{if(_0x4a2cc8 instanceof errors_1['CollationError']){if(_0x4a2cc8['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',{..._0x4a2cc8});}else this['logger']['error']('hook-process-error',{..._0x4a2cc8});}}}_0xb4deb9?.['setActivityError'](_0x4a2cc8['message']);throw _0x4a2cc8;}finally{_0xb4deb9?.['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 _0x5720c3=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x5720c3)&&Number(_0x5720c3)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x6bb862){const _0x35c264=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x35c264),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x35c264),await collator_1['CollatorService']['authorizeReentry'](this,_0x35c264),await this['setStatus'](0x0,_0x35c264),await _0x35c264['exec'](),_0x6bb862['mapActivityAttributes']();}async['doPassThrough'](_0x1ff5d7){const _0x1486ac=this['store']['transact']();let _0x3185a0;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x1486ac),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x1486ac),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x1486ac),_0x3185a0=await _0x1486ac['exec'](),_0x1ff5d7['mapActivityAttributes']();const _0x29e822=this['resolveStatus'](_0x3185a0),_0x2c35c2={'app.job.jss':_0x29e822},_0x2dcc51=await this['transition'](this['adjacencyList'],_0x29e822);_0x2dcc51['length']&&(_0x2c35c2['app.activity.mids']=_0x2dcc51['join'](',')),_0x1ff5d7['setActivityAttributes'](_0x2c35c2);}async['getHookRule'](_0x57724b){const _0x5e784f=await this['store']['getHookRules']();return _0x5e784f?.[_0x57724b]?.[0x0];}async['registerHook'](_0x5b5e77){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x5b5e77);else{if(this['config']['sleep']){const _0x2b879f=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',_0x2b879f,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x18f351=stream_1['StreamStatus']['SUCCESS'],_0x45c197=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x18f351,'code':_0x45c197});const _0x1779c9=new task_1['TaskService'](this['store'],this['logger']),_0x1a72c7={...this['data']},_0x3dc301=await _0x1779c9['processWebHookSignal'](this['config']['hook']['topic'],_0x1a72c7);if(_0x3dc301){const [_0x6a4bb2,_0x16a851,_0x23d189,_0x2056a2]=_0x3dc301;this['context']['metadata']['jid']=_0x6a4bb2,this['context']['metadata']['gid']=_0x2056a2,this['context']['metadata']['dad']=_0x23d189,await this['processEvent'](_0x18f351,_0x45c197,'hook'),_0x45c197===0xc8&&await _0x1779c9['deleteWebHookSignal'](this['config']['hook']['topic'],_0x1a72c7);}}async['processTimeHookEvent'](_0x4ba6e7){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x4ba6e7,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}exports['Hook']=Hook;
1
+ 'use strict';(function(_0x4487d0,_0x350ca4){const _0xdb5895=_0x5c26,_0x42a1de=_0x4487d0();while(!![]){try{const _0x580845=-parseInt(_0xdb5895(0x1dd))/0x1+parseInt(_0xdb5895(0x1e1))/0x2*(parseInt(_0xdb5895(0x1df))/0x3)+parseInt(_0xdb5895(0x1e4))/0x4+-parseInt(_0xdb5895(0x1e5))/0x5*(parseInt(_0xdb5895(0x1e7))/0x6)+-parseInt(_0xdb5895(0x1e3))/0x7+-parseInt(_0xdb5895(0x1de))/0x8*(-parseInt(_0xdb5895(0x1e0))/0x9)+-parseInt(_0xdb5895(0x1e6))/0xa*(-parseInt(_0xdb5895(0x1e2))/0xb);if(_0x580845===_0x350ca4)break;else _0x42a1de['push'](_0x42a1de['shift']());}catch(_0x1d9ad6){_0x42a1de['push'](_0x42a1de['shift']());}}}(_0x3589,0x3a97f));function _0x5c26(_0x3f5e8d,_0x35420b){const _0x3589b4=_0x3589();return _0x5c26=function(_0x5c2628,_0x23e2d7){_0x5c2628=_0x5c2628-0x1dd;let _0xcdab3b=_0x3589b4[_0x5c2628];return _0xcdab3b;},_0x5c26(_0x3f5e8d,_0x35420b);}function _0x3589(){const _0x165e82=['43350IKYGOw','6168gjFyxC','375339MGOqqm','8XFAXxE','3CeFQFq','774666qdZyNE','159956xKXEXE','946fNxHHs','154007XcRUnJ','1598724ansFFq','1465oejjen'];_0x3589=function(){return _0x165e82;};return _0x3589();}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(_0x2f5823,_0x2abe78,_0x4c65a9,_0x5f5aa5,_0x277bb4,_0x118e7c){super(_0x2f5823,_0x2abe78,_0x4c65a9,_0x5f5aa5,_0x277bb4,_0x118e7c);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x42b868;try{return await this['verifyEntry'](),_0x42b868=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x42b868['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x42b868):await this['doPassThrough'](_0x42b868),this['context']['metadata']['aid'];}catch(_0x3b9aec){if(_0x3b9aec instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x3b9aec});return;}else{if(_0x3b9aec instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x3b9aec});return;}else{if(_0x3b9aec instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x3b9aec});return;}else{if(_0x3b9aec instanceof errors_1['CollationError']){if(_0x3b9aec['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',{..._0x3b9aec});}else this['logger']['error']('hook-process-error',{..._0x3b9aec});}}}_0x42b868?.['setActivityError'](_0x3b9aec['message']);throw _0x3b9aec;}finally{_0x42b868?.['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 _0x5a3f17=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x5a3f17)&&Number(_0x5a3f17)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x24ccf3){const _0x2c4227=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x2c4227),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x2c4227),await collator_1['CollatorService']['authorizeReentry'](this,_0x2c4227),await this['setStatus'](0x0,_0x2c4227),await _0x2c4227['exec'](),_0x24ccf3['mapActivityAttributes']();}async['doPassThrough'](_0x120f5b){const _0x1c94c0=this['store']['transact']();let _0x1ff097;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x1c94c0),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x1c94c0),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x1c94c0),_0x1ff097=await _0x1c94c0['exec'](),_0x120f5b['mapActivityAttributes']();const _0x2c0173=this['resolveStatus'](_0x1ff097),_0x1da83c={'app.job.jss':_0x2c0173},_0x40adf6=await this['transition'](this['adjacencyList'],_0x2c0173);_0x40adf6['length']&&(_0x1da83c['app.activity.mids']=_0x40adf6['join'](',')),_0x120f5b['setActivityAttributes'](_0x1da83c);}async['getHookRule'](_0x2e690f){const _0x49ffa0=await this['store']['getHookRules']();return _0x49ffa0?.[_0x2e690f]?.[0x0];}async['registerHook'](_0x20cd62){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x20cd62);else{if(this['config']['sleep']){const _0x1ad697=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',_0x1ad697,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x28bc2e=stream_1['StreamStatus']['SUCCESS'],_0x192867=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x28bc2e,'code':_0x192867});const _0x155cdf=new task_1['TaskService'](this['store'],this['logger']),_0x226834={...this['data']},_0x10debb=await _0x155cdf['processWebHookSignal'](this['config']['hook']['topic'],_0x226834);if(_0x10debb){const [_0x5bd24b,_0x4ecb33,_0x1a64a5,_0x4aa05b]=_0x10debb;this['context']['metadata']['jid']=_0x5bd24b,this['context']['metadata']['gid']=_0x4aa05b,this['context']['metadata']['dad']=_0x1a64a5,await this['processEvent'](_0x28bc2e,_0x192867,'hook'),_0x192867===0xc8&&await _0x155cdf['deleteWebHookSignal'](this['config']['hook']['topic'],_0x226834);}}async['processTimeHookEvent'](_0x2e5454){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x2e5454,'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 _0x231a(_0x708b3f,_0x239d6b){const _0x189a74=_0x189a();return _0x231a=function(_0x231a7f,_0x5bda1c){_0x231a7f=_0x231a7f-0xc3;let _0x24f9eb=_0x189a74[_0x231a7f];return _0x24f9eb;},_0x231a(_0x708b3f,_0x239d6b);}(function(_0x440884,_0x3073d5){const _0xcec1e7=_0x231a,_0x4bfe95=_0x440884();while(!![]){try{const _0x33cee0=-parseInt(_0xcec1e7(0xc6))/0x1*(parseInt(_0xcec1e7(0xcb))/0x2)+parseInt(_0xcec1e7(0xc4))/0x3+-parseInt(_0xcec1e7(0xc5))/0x4+-parseInt(_0xcec1e7(0xca))/0x5+parseInt(_0xcec1e7(0xc8))/0x6*(-parseInt(_0xcec1e7(0xcc))/0x7)+parseInt(_0xcec1e7(0xc7))/0x8+-parseInt(_0xcec1e7(0xc3))/0x9*(-parseInt(_0xcec1e7(0xc9))/0xa);if(_0x33cee0===_0x3073d5)break;else _0x4bfe95['push'](_0x4bfe95['shift']());}catch(_0x32f9a8){_0x4bfe95['push'](_0x4bfe95['shift']());}}}(_0x189a,0x8611f));function _0x189a(){const _0x1ae205=['200323KfmKuI','2912432UFVObJ','144MxMFSx','5280hCIVXe','4299560wxnODb','10XKmQrU','14161ztXOBT','37278GmISDb','1096899mENpSX','1829732VUCufB'];_0x189a=function(){return _0x1ae205;};return _0x189a();}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 _0xee22(){const _0x31ffa9=['2050092cMCWoT','24897ZtyKwb','7DsEhQV','1810391XjPjCt','150KYjdrk','111285oivlWd','146ZnLwlK','1019132gMKXtZ','5ldYiQY','369630KKTeXo','2564888IaNdzU'];_0xee22=function(){return _0x31ffa9;};return _0xee22();}(function(_0x415bbb,_0x44e013){const _0x37c037=_0xa6b4,_0x5ad9c8=_0x415bbb();while(!![]){try{const _0x49e7b4=parseInt(_0x37c037(0x185))/0x1+parseInt(_0x37c037(0x182))/0x2*(parseInt(_0x37c037(0x17d))/0x3)+-parseInt(_0x37c037(0x183))/0x4*(parseInt(_0x37c037(0x184))/0x5)+-parseInt(_0x37c037(0x17c))/0x6*(parseInt(_0x37c037(0x17e))/0x7)+parseInt(_0x37c037(0x186))/0x8+-parseInt(_0x37c037(0x181))/0x9*(parseInt(_0x37c037(0x180))/0xa)+-parseInt(_0x37c037(0x17f))/0xb;if(_0x49e7b4===_0x44e013)break;else _0x5ad9c8['push'](_0x5ad9c8['shift']());}catch(_0x326875){_0x5ad9c8['push'](_0x5ad9c8['shift']());}}}(_0xee22,0x5556b));function _0xa6b4(_0x379443,_0x2296d7){const _0xee22f9=_0xee22();return _0xa6b4=function(_0xa6b4ca,_0x35b266){_0xa6b4ca=_0xa6b4ca-0x17c;let _0x40f4eb=_0xee22f9[_0xa6b4ca];return _0x40f4eb;},_0xa6b4(_0x379443,_0x2296d7);}Object['defineProperty'](exports,'__esModule',{'value':!![]});const activity_1=require('./activity'),await_1=require('./await'),cycle_1=require('./cycle'),hook_1=require('./hook'),interrupt_1=require('./interrupt'),signal_1=require('./signal'),trigger_1=require('./trigger'),worker_1=require('./worker');exports['default']={'activity':activity_1['Activity'],'await':await_1['Await'],'cycle':cycle_1['Cycle'],'hook':hook_1['Hook'],'interrupt':interrupt_1['Interrupt'],'signal':signal_1['Signal'],'trigger':trigger_1['Trigger'],'worker':worker_1['Worker']};
@@ -1 +1 @@
1
- 'use strict';(function(_0x5b30b2,_0x7d8ab8){const _0x5733b2=_0x5962,_0x1d97f9=_0x5b30b2();while(!![]){try{const _0x19d0a1=-parseInt(_0x5733b2(0xfa))/0x1*(parseInt(_0x5733b2(0xfb))/0x2)+-parseInt(_0x5733b2(0xfc))/0x3+parseInt(_0x5733b2(0xfe))/0x4*(-parseInt(_0x5733b2(0xf6))/0x5)+-parseInt(_0x5733b2(0xfd))/0x6+-parseInt(_0x5733b2(0xf7))/0x7+-parseInt(_0x5733b2(0xf9))/0x8+parseInt(_0x5733b2(0xf8))/0x9;if(_0x19d0a1===_0x7d8ab8)break;else _0x1d97f9['push'](_0x1d97f9['shift']());}catch(_0x19a983){_0x1d97f9['push'](_0x1d97f9['shift']());}}}(_0x34f5,0x9d9ff));function _0x5962(_0x3583b2,_0x3ef5ad){const _0x34f55e=_0x34f5();return _0x5962=function(_0x5962a4,_0x50f66d){_0x5962a4=_0x5962a4-0xf6;let _0x48613c=_0x34f55e[_0x5962a4];return _0x48613c;},_0x5962(_0x3583b2,_0x3ef5ad);}function _0x34f5(){const _0x2a8f97=['2308OILDBU','3600MbmCKl','1923173jpcSgN','28180431PWQaFX','2814112DEdrUF','312701UJgBMr','2pymTFU','1613835mvAZRy','3557634wLGRJC'];_0x34f5=function(){return _0x2a8f97;};return _0x34f5();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Interrupt']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Interrupt extends activity_1['Activity']{constructor(_0x30b31e,_0x3795c9,_0x23e3f7,_0x507b93,_0x54539c,_0x36506c){super(_0x30b31e,_0x3795c9,_0x23e3f7,_0x507b93,_0x54539c,_0x36506c);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x259c4a;try{await this['verifyEntry'](),_0x259c4a=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x259c4a['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x259c4a):await this['interruptAnother'](_0x259c4a);}catch(_0x546cb5){if(_0x546cb5 instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x546cb5});return;}else{if(_0x546cb5 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x546cb5});return;}else{if(_0x546cb5 instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x546cb5});return;}else{if(_0x546cb5 instanceof errors_1['CollationError']){if(_0x546cb5['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',{..._0x546cb5});}else this['logger']['error']('interrupt-process-error',{..._0x546cb5});}}}_0x259c4a?.['setActivityError'](_0x546cb5['message']);throw _0x546cb5;}finally{_0x259c4a?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x23999e){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x1f08b7=await this['interrupt']();_0x23999e['mapActivityAttributes']();const _0x160605=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x160605),await this['setStatus'](-0x1,_0x160605);const _0x190adb=await _0x160605['exec'](),_0x20f70a=this['resolveStatus'](_0x190adb);return _0x23999e['setActivityAttributes']({'app.activity.mid':_0x1f08b7,'app.job.jss':_0x20f70a}),this['context']['metadata']['aid'];}async['interruptAnother'](_0x4702ac){const _0x530867=await this['interrupt'](),_0x68521a={'app.activity.mid':_0x530867};_0x4702ac['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x28044a=this['store']['transact']();await this['setState'](_0x28044a);}const _0x2d718c=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x2d718c),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x2d718c);const _0x35ded7=await _0x2d718c['exec'](),_0x4de808=this['resolveStatus'](_0x35ded7);_0x68521a['app.job.jss']=_0x4de808;const _0x4e45d0=await this['transition'](this['adjacencyList'],_0x4de808);return _0x4e45d0['length']&&(_0x68521a['app.activity.mids']=_0x4e45d0['join'](',')),_0x4702ac['setActivityAttributes'](_0x68521a),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x485994=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x485994==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 _0x451302=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'],_0x451302);}}exports['Interrupt']=Interrupt;
1
+ 'use strict';(function(_0x73cc0a,_0x1ce37d){const _0x53e5f1=_0x8d54,_0x16e12e=_0x73cc0a();while(!![]){try{const _0x4abd44=parseInt(_0x53e5f1(0x1b8))/0x1+-parseInt(_0x53e5f1(0x1ba))/0x2*(-parseInt(_0x53e5f1(0x1bc))/0x3)+parseInt(_0x53e5f1(0x1bb))/0x4+-parseInt(_0x53e5f1(0x1bf))/0x5*(-parseInt(_0x53e5f1(0x1b9))/0x6)+parseInt(_0x53e5f1(0x1bd))/0x7+parseInt(_0x53e5f1(0x1b7))/0x8+-parseInt(_0x53e5f1(0x1be))/0x9;if(_0x4abd44===_0x1ce37d)break;else _0x16e12e['push'](_0x16e12e['shift']());}catch(_0x779e81){_0x16e12e['push'](_0x16e12e['shift']());}}}(_0xdffb,0xd630c));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 _0x8d54(_0x5e5bfa,_0x4da227){const _0xdffb2a=_0xdffb();return _0x8d54=function(_0x8d546,_0x2bb90a){_0x8d546=_0x8d546-0x1b7;let _0x45149e=_0xdffb2a[_0x8d546];return _0x45149e;},_0x8d54(_0x5e5bfa,_0x4da227);}class Interrupt extends activity_1['Activity']{constructor(_0x8004bd,_0x1c6411,_0x431f84,_0x3e3bf9,_0x5bdb31,_0x411caf){super(_0x8004bd,_0x1c6411,_0x431f84,_0x3e3bf9,_0x5bdb31,_0x411caf);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x4957bf;try{await this['verifyEntry'](),_0x4957bf=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x4957bf['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x4957bf):await this['interruptAnother'](_0x4957bf);}catch(_0x265d13){if(_0x265d13 instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x265d13});return;}else{if(_0x265d13 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x265d13});return;}else{if(_0x265d13 instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x265d13});return;}else{if(_0x265d13 instanceof errors_1['CollationError']){if(_0x265d13['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',{..._0x265d13});}else this['logger']['error']('interrupt-process-error',{..._0x265d13});}}}_0x4957bf?.['setActivityError'](_0x265d13['message']);throw _0x265d13;}finally{_0x4957bf?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x3b1111){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x286f0d=await this['interrupt']();_0x3b1111['mapActivityAttributes']();const _0x21f54a=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x21f54a),await this['setStatus'](-0x1,_0x21f54a);const _0x19f103=await _0x21f54a['exec'](),_0x209854=this['resolveStatus'](_0x19f103);return _0x3b1111['setActivityAttributes']({'app.activity.mid':_0x286f0d,'app.job.jss':_0x209854}),this['context']['metadata']['aid'];}async['interruptAnother'](_0x2d78de){const _0x22e0e7=await this['interrupt'](),_0x1240a8={'app.activity.mid':_0x22e0e7};_0x2d78de['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x58f9ce=this['store']['transact']();await this['setState'](_0x58f9ce);}const _0x3c8407=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x3c8407),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x3c8407);const _0x422823=await _0x3c8407['exec'](),_0x2e27db=this['resolveStatus'](_0x422823);_0x1240a8['app.job.jss']=_0x2e27db;const _0x464139=await this['transition'](this['adjacencyList'],_0x2e27db);return _0x464139['length']&&(_0x1240a8['app.activity.mids']=_0x464139['join'](',')),_0x2d78de['setActivityAttributes'](_0x1240a8),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x524399=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x524399==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 _0x5edfa4=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'],_0x5edfa4);}}function _0xdffb(){const _0x1ca770=['39558906SxCbIp','3315liyPHo','3766144xpVXHx','506074jymuZZ','2478szLdJc','78zISODG','5404992CGNQZi','106026riuZZT','9047577wYYovz'];_0xdffb=function(){return _0x1ca770;};return _0xdffb();}exports['Interrupt']=Interrupt;
@@ -1 +1 @@
1
- 'use strict';function _0x3734(_0x1e9434,_0x5df5c1){const _0x57e2bb=_0x57e2();return _0x3734=function(_0x3734d3,_0x4c1257){_0x3734d3=_0x3734d3-0x161;let _0xcf3acd=_0x57e2bb[_0x3734d3];return _0xcf3acd;},_0x3734(_0x1e9434,_0x5df5c1);}(function(_0x24c7c6,_0x4e2f8f){const _0x12b58b=_0x3734,_0x21bbe2=_0x24c7c6();while(!![]){try{const _0x209080=parseInt(_0x12b58b(0x168))/0x1+parseInt(_0x12b58b(0x163))/0x2+parseInt(_0x12b58b(0x164))/0x3+-parseInt(_0x12b58b(0x165))/0x4+parseInt(_0x12b58b(0x166))/0x5+parseInt(_0x12b58b(0x167))/0x6+-parseInt(_0x12b58b(0x161))/0x7*(parseInt(_0x12b58b(0x162))/0x8);if(_0x209080===_0x4e2f8f)break;else _0x21bbe2['push'](_0x21bbe2['shift']());}catch(_0x1c5cc2){_0x21bbe2['push'](_0x21bbe2['shift']());}}}(_0x57e2,0x759fd));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Signal']=void 0x0;function _0x57e2(){const _0x42c82c=['4519458ZkQfYr','460447Yreghl','14UHafOw','9755840fnjMsB','1842498yLAEKt','2405151WXMhzy','2130044IVyqUY','2583020bkPMLl'];_0x57e2=function(){return _0x42c82c;};return _0x57e2();}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(_0x289a47,_0x6d9f34,_0x38b608,_0xfc712e,_0x377c96,_0x45450d){super(_0x289a47,_0x6d9f34,_0x38b608,_0xfc712e,_0x377c96,_0x45450d);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x31e55b;try{await this['verifyEntry'](),_0x31e55b=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x31e55b['startActivitySpan'](this['leg']);const _0x4ffb8e=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x4ffb8e),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x4ffb8e),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x4ffb8e);const _0x59f879=await _0x4ffb8e['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x1fd1e7=this['resolveStatus'](_0x59f879),_0xca3f16={'app.job.jss':_0x1fd1e7},_0x35c61c=await this['transition'](this['adjacencyList'],_0x1fd1e7);return _0x35c61c['length']&&(_0xca3f16['app.activity.mids']=_0x35c61c['join'](',')),_0x31e55b['mapActivityAttributes'](),_0x31e55b['setActivityAttributes'](_0xca3f16),this['context']['metadata']['aid'];}catch(_0x11616b){if(_0x11616b instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x11616b});return;}else{if(_0x11616b instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x11616b});return;}else{if(_0x11616b instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x11616b});return;}else{if(_0x11616b instanceof errors_1['CollationError']){if(_0x11616b['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',{..._0x11616b});}else this['logger']['error']('signal-process-error',{..._0x11616b});}}}_0x31e55b?.['setActivityError'](_0x11616b['message']);throw _0x11616b;}finally{_0x31e55b?.['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 _0x4c8597=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x4c8597['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x12b02b=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x12b02b['mapRules']();}}async['hookOne'](){const _0x3b9ae7=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x40ca7e=this['mapSignalData'](),_0x3fdfd8=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x55da97=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x3b9ae7,_0x40ca7e,_0x3fdfd8,_0x55da97);}async['hookAll'](){const _0x333c5e=this['mapSignalData'](),_0xf6f6c5=this['mapResolverData']();this['config']['scrub']&&(_0xf6f6c5['scrub']=!![]);const _0x4ddb15=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x3c744e=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x26b49e=[_0x4ddb15+':'+_0x3c744e];return await this['engine']['hookAll'](this['config']['topic'],_0x333c5e,_0xf6f6c5,_0x26b49e);}}exports['Signal']=Signal;
1
+ 'use strict';function _0xe698(_0x1f87cd,_0x16019d){const _0x49415b=_0x4941();return _0xe698=function(_0xe698be,_0x40c2fa){_0xe698be=_0xe698be-0x161;let _0x4dc752=_0x49415b[_0xe698be];return _0x4dc752;},_0xe698(_0x1f87cd,_0x16019d);}(function(_0x55587f,_0x10e2af){const _0x58b3ad=_0xe698,_0x3198f1=_0x55587f();while(!![]){try{const _0x38dc2a=parseInt(_0x58b3ad(0x16a))/0x1*(parseInt(_0x58b3ad(0x162))/0x2)+-parseInt(_0x58b3ad(0x169))/0x3+parseInt(_0x58b3ad(0x167))/0x4+parseInt(_0x58b3ad(0x163))/0x5*(-parseInt(_0x58b3ad(0x166))/0x6)+-parseInt(_0x58b3ad(0x16b))/0x7+-parseInt(_0x58b3ad(0x168))/0x8*(parseInt(_0x58b3ad(0x161))/0x9)+-parseInt(_0x58b3ad(0x165))/0xa*(parseInt(_0x58b3ad(0x164))/0xb);if(_0x38dc2a===_0x10e2af)break;else _0x3198f1['push'](_0x3198f1['shift']());}catch(_0xeaa8ef){_0x3198f1['push'](_0x3198f1['shift']());}}}(_0x4941,0x29bc7));function _0x4941(){const _0x361aa8=['48354iJeURb','113TiYXWq','928361PUDuEU','852372meehLj','5108UMEHDr','5YFIFvV','150634kyoPwp','50lZjCvY','162786aqmOea','1264428xrlvqZ','16VtvpvG'];_0x4941=function(){return _0x361aa8;};return _0x4941();}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(_0x4b6967,_0x5ac007,_0x1f596d,_0x1e8be3,_0x257c44,_0x3cb58e){super(_0x4b6967,_0x5ac007,_0x1f596d,_0x1e8be3,_0x257c44,_0x3cb58e);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x18d30e;try{await this['verifyEntry'](),_0x18d30e=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x18d30e['startActivitySpan'](this['leg']);const _0xcf24a1=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0xcf24a1),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0xcf24a1),await this['setStatus'](this['adjacencyList']['length']-0x1,_0xcf24a1);const _0x14bd4f=await _0xcf24a1['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x18daa5=this['resolveStatus'](_0x14bd4f),_0x4b4aad={'app.job.jss':_0x18daa5},_0x38c6e2=await this['transition'](this['adjacencyList'],_0x18daa5);return _0x38c6e2['length']&&(_0x4b4aad['app.activity.mids']=_0x38c6e2['join'](',')),_0x18d30e['mapActivityAttributes'](),_0x18d30e['setActivityAttributes'](_0x4b4aad),this['context']['metadata']['aid'];}catch(_0x2ecc18){if(_0x2ecc18 instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x2ecc18});return;}else{if(_0x2ecc18 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x2ecc18});return;}else{if(_0x2ecc18 instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x2ecc18});return;}else{if(_0x2ecc18 instanceof errors_1['CollationError']){if(_0x2ecc18['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',{..._0x2ecc18});}else this['logger']['error']('signal-process-error',{..._0x2ecc18});}}}_0x18d30e?.['setActivityError'](_0x2ecc18['message']);throw _0x2ecc18;}finally{_0x18d30e?.['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 _0x3715bc=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x3715bc['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x19a518=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x19a518['mapRules']();}}async['hookOne'](){const _0x32a717=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x417d57=this['mapSignalData'](),_0x2e321d=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x29ce5d=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x32a717,_0x417d57,_0x2e321d,_0x29ce5d);}async['hookAll'](){const _0x1c0bfa=this['mapSignalData'](),_0x1bde8a=this['mapResolverData']();this['config']['scrub']&&(_0x1bde8a['scrub']=!![]);const _0x173771=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x3ae777=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x162526=[_0x173771+':'+_0x3ae777];return await this['engine']['hookAll'](this['config']['topic'],_0x1c0bfa,_0x1bde8a,_0x162526);}}exports['Signal']=Signal;
@@ -1 +1 @@
1
- 'use strict';(function(_0x3ba18e,_0x151cc){const _0x30c0ac=_0x4154,_0x5bdfa6=_0x3ba18e();while(!![]){try{const _0x4b2d24=parseInt(_0x30c0ac(0x149))/0x1+parseInt(_0x30c0ac(0x145))/0x2+-parseInt(_0x30c0ac(0x14a))/0x3*(parseInt(_0x30c0ac(0x144))/0x4)+-parseInt(_0x30c0ac(0x146))/0x5+parseInt(_0x30c0ac(0x147))/0x6*(parseInt(_0x30c0ac(0x142))/0x7)+parseInt(_0x30c0ac(0x148))/0x8*(parseInt(_0x30c0ac(0x143))/0x9)+parseInt(_0x30c0ac(0x141))/0xa;if(_0x4b2d24===_0x151cc)break;else _0x5bdfa6['push'](_0x5bdfa6['shift']());}catch(_0x1f64f7){_0x5bdfa6['push'](_0x5bdfa6['shift']());}}}(_0x14c3,0x6feec));function _0x4154(_0x5383f0,_0x293c80){const _0x14c3ec=_0x14c3();return _0x4154=function(_0x4154d0,_0x3f79c6){_0x4154d0=_0x4154d0-0x141;let _0x32b11b=_0x14c3ec[_0x4154d0];return _0x32b11b;},_0x4154(_0x5383f0,_0x293c80);}function _0x14c3(){const _0x39835e=['30eofFsT','1823520YSYiuP','28wEDyfm','27IBUaRd','116092kRWlhK','1123298lSfaUs','3139180dcdkqG','604122lHaame','357832mjQSCK','95606mEyXfk'];_0x14c3=function(){return _0x39835e;};return _0x14c3();}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(_0x55d8b5,_0x1648db,_0x534b20,_0x15e28f,_0xcb2a55,_0x5ac719){super(_0x55d8b5,_0x1648db,_0x534b20,_0x15e28f,_0xcb2a55,_0x5ac719);}async['process'](_0xf2c5b){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x568bee;try{this['setLeg'](0x2),await this['getState'](),_0x568bee=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x568bee['startJobSpan'](),_0x568bee['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x3a7626=this['initStatus'](_0xf2c5b,this['adjacencyList']['length']);await this['setStateNX'](_0x3a7626),await this['setStatus'](_0x3a7626),this['bindSearchData'](_0xf2c5b),this['bindMarkerData'](_0xf2c5b);const _0x473cb9=this['store']['transact']();await this['setState'](_0x473cb9),await this['setStats'](_0x473cb9);_0xf2c5b?.['pending']&&await this['setExpired'](_0xf2c5b?.['pending'],_0x473cb9);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x473cb9),await _0x473cb9['exec'](),this['execAdjacentParent'](),_0x568bee['mapActivityAttributes']();const _0x460778=Number(this['context']['metadata']['js']);_0x568bee['setJobAttributes']({'app.job.jss':_0x460778});const _0x57ad1a={'app.job.jss':_0x460778};return await this['transitionAndLogAdjacent'](_0xf2c5b,_0x460778,_0x57ad1a),_0x568bee['setActivityAttributes'](_0x57ad1a),this['context']['metadata']['jid'];}catch(_0x353b39){_0x568bee?.['setActivityError'](_0x353b39['message']);if(_0x353b39 instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x132bfb=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x132bfb){this['logger']['info']('trigger-collation-overage',{'job_id':_0x353b39['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0x353b39['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0x353b39});throw _0x353b39;}finally{_0x568bee?.['endJobSpan'](),_0x568bee?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x120710={},_0x9782d9,_0x85d573){if(isNaN(_0x120710['pending'])){const _0x11f688=await this['transition'](this['adjacencyList'],_0x9782d9);_0x11f688['length']&&(_0x85d573['app.activity.mids']=_0x11f688['join'](','));}}['initStatus'](_0x10efea={},_0x4cae3f){if(_0x10efea['pending'])return-0x1;return _0x4cae3f;}async['setExpired'](_0x14e91a,_0x37fc37){await this['store']['expireJob'](this['context']['metadata']['jid'],_0x14e91a,_0x37fc37);}['safeKey'](_0x290e09){return'_'+_0x290e09;}['bindSearchData'](_0xd951d7){_0xd951d7?.['search']&&Object['keys'](_0xd951d7['search'])['forEach'](_0x377679=>{this['context']['data'][this['safeKey'](_0x377679)]=_0xd951d7['search'][_0x377679]['toString']();});}['bindMarkerData'](_0x8f3bf9){_0x8f3bf9?.['marker']&&Object['keys'](_0x8f3bf9['marker'])['forEach'](_0x33f1f3=>{_0x33f1f3['startsWith']('-')&&(this['context']['data'][_0x33f1f3]=_0x8f3bf9['marker'][_0x33f1f3]['toString']());});}async['setStatus'](_0x881399){this['context']['metadata']['js']=_0x881399;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x39c4a0=(0x0,utils_1['formatISODate'])(new Date()),_0x9284ed={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x39c4a0,'ju':_0x39c4a0}};await this['engine']['execAdjacentParent'](this['context'],_0x9284ed);}}['createInputContext'](){const _0xcd112f={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0xcd112f;}async['getState'](){const _0x2e5135=this['createInputContext'](),_0x1e5bd1=this['resolveJobId'](_0x2e5135),_0x3fdc02=this['resolveJobKey'](_0x2e5135),_0x4fd071=(0x0,utils_1['formatISODate'])(new Date()),{id:_0x1fbf52,version:_0x1c72f3}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0xff9535={...this['metadata'],'jid':_0x1e5bd1,'key':_0x3fdc02,'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':_0x1fbf52,'vrs':_0x1c72f3,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0x1e5bd1,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x3fdc02,'jc':_0x4fd071,'ju':_0x4fd071,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0xff9535},'output':{'data':this['data'],'metadata':_0xff9535},'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'](_0x136cdf=>'metadata/'+_0x136cdf);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0x4db5d3=>'output/metadata/'+_0x4db5d3);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x2e557d){const _0x1e062a=this['config']['stats']?.['id'];return _0x1e062a?pipe_1['Pipe']['resolve'](_0x1e062a,_0x2e557d):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x295191){const _0x553c12=this['config']['stats']?.['key'];return _0x553c12?pipe_1['Pipe']['resolve'](_0x553c12,_0x295191):'';}async['setStateNX'](_0x5b857f){const _0x14b438=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x14b438,this['engine']['appId'],_0x5b857f))throw new errors_1['DuplicateJobError'](_0x14b438);}async['setStats'](_0x201efa){const _0x337538=this['context']['metadata'];if(_0x337538['key']&&this['config']['stats']?.['measures']){const _0x4d1b0c=await this['engine']['getVID'](),_0x5b03f7=new reporter_1['ReporterService'](_0x4d1b0c,this['store'],this['logger']);await this['store']['setStats'](_0x337538['key'],_0x337538['jid'],_0x337538['ts'],_0x5b03f7['resolveTriggerStatistics'](this['config'],this['context']),_0x4d1b0c,_0x201efa);}}}exports['Trigger']=Trigger;
1
+ 'use strict';function _0x43b8(_0x1d16c7,_0x5058bd){const _0x2c833f=_0x2c83();return _0x43b8=function(_0x43b8fc,_0x5242ae){_0x43b8fc=_0x43b8fc-0x1ad;let _0x3a9061=_0x2c833f[_0x43b8fc];return _0x3a9061;},_0x43b8(_0x1d16c7,_0x5058bd);}function _0x2c83(){const _0x467a9a=['482036tHCXsm','8090664Uogyqm','342108bVZgdi','15aNITtE','3178143XWHXSh','6dFkihn','11616087ROhLBW','278289YGQZCa','1590eyqnVH','657468pssCSI'];_0x2c83=function(){return _0x467a9a;};return _0x2c83();}(function(_0x175543,_0x40f95f){const _0x78674a=_0x43b8,_0x14893d=_0x175543();while(!![]){try{const _0x1fcc67=parseInt(_0x78674a(0x1b2))/0x1+-parseInt(_0x78674a(0x1af))/0x2+-parseInt(_0x78674a(0x1b4))/0x3+-parseInt(_0x78674a(0x1b0))/0x4*(parseInt(_0x78674a(0x1b3))/0x5)+parseInt(_0x78674a(0x1b5))/0x6*(-parseInt(_0x78674a(0x1b6))/0x7)+-parseInt(_0x78674a(0x1b1))/0x8+-parseInt(_0x78674a(0x1ad))/0x9*(-parseInt(_0x78674a(0x1ae))/0xa);if(_0x1fcc67===_0x40f95f)break;else _0x14893d['push'](_0x14893d['shift']());}catch(_0x50ba55){_0x14893d['push'](_0x14893d['shift']());}}}(_0x2c83,0xcc9f3));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(_0x5b7a9f,_0x10f5f2,_0xe21cbd,_0x3de72d,_0x1391c0,_0x2cf1aa){super(_0x5b7a9f,_0x10f5f2,_0xe21cbd,_0x3de72d,_0x1391c0,_0x2cf1aa);}async['process'](_0xde7ba3){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x1a7009;try{this['setLeg'](0x2),await this['getState'](),_0x1a7009=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x1a7009['startJobSpan'](),_0x1a7009['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x57a5a7=this['initStatus'](_0xde7ba3,this['adjacencyList']['length']);await this['setStateNX'](_0x57a5a7),await this['setStatus'](_0x57a5a7),this['bindSearchData'](_0xde7ba3),this['bindMarkerData'](_0xde7ba3);const _0x2300a3=this['store']['transact']();await this['setState'](_0x2300a3),await this['setStats'](_0x2300a3);_0xde7ba3?.['pending']&&await this['setExpired'](_0xde7ba3?.['pending'],_0x2300a3);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x2300a3),await _0x2300a3['exec'](),this['execAdjacentParent'](),_0x1a7009['mapActivityAttributes']();const _0xab4ba3=Number(this['context']['metadata']['js']);_0x1a7009['setJobAttributes']({'app.job.jss':_0xab4ba3});const _0x1bb54e={'app.job.jss':_0xab4ba3};return await this['transitionAndLogAdjacent'](_0xde7ba3,_0xab4ba3,_0x1bb54e),_0x1a7009['setActivityAttributes'](_0x1bb54e),this['context']['metadata']['jid'];}catch(_0x26e60e){_0x1a7009?.['setActivityError'](_0x26e60e['message']);if(_0x26e60e instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x54687e=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x54687e){this['logger']['info']('trigger-collation-overage',{'job_id':_0x26e60e['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0x26e60e['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0x26e60e});throw _0x26e60e;}finally{_0x1a7009?.['endJobSpan'](),_0x1a7009?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x25fba1={},_0x484361,_0x1a6194){if(isNaN(_0x25fba1['pending'])){const _0x5aed56=await this['transition'](this['adjacencyList'],_0x484361);_0x5aed56['length']&&(_0x1a6194['app.activity.mids']=_0x5aed56['join'](','));}}['initStatus'](_0x208810={},_0x47b59a){if(_0x208810['pending'])return-0x1;return _0x47b59a;}async['setExpired'](_0x2b6d50,_0x30be38){await this['store']['expireJob'](this['context']['metadata']['jid'],_0x2b6d50,_0x30be38);}['safeKey'](_0x5c357a){return'_'+_0x5c357a;}['bindSearchData'](_0x3c2481){_0x3c2481?.['search']&&Object['keys'](_0x3c2481['search'])['forEach'](_0x4c167e=>{this['context']['data'][this['safeKey'](_0x4c167e)]=_0x3c2481['search'][_0x4c167e]['toString']();});}['bindMarkerData'](_0x13a53b){_0x13a53b?.['marker']&&Object['keys'](_0x13a53b['marker'])['forEach'](_0x9a97ba=>{_0x9a97ba['startsWith']('-')&&(this['context']['data'][_0x9a97ba]=_0x13a53b['marker'][_0x9a97ba]['toString']());});}async['setStatus'](_0x35c384){this['context']['metadata']['js']=_0x35c384;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0xe92982=(0x0,utils_1['formatISODate'])(new Date()),_0x11f193={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0xe92982,'ju':_0xe92982}};await this['engine']['execAdjacentParent'](this['context'],_0x11f193);}}['createInputContext'](){const _0x2068db={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x2068db;}async['getState'](){const _0x3baa2e=this['createInputContext'](),_0x12f5d2=this['resolveJobId'](_0x3baa2e),_0x389820=this['resolveJobKey'](_0x3baa2e),_0x176cc6=(0x0,utils_1['formatISODate'])(new Date()),{id:_0x1c372f,version:_0x534c83}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0x511745={...this['metadata'],'jid':_0x12f5d2,'key':_0x389820,'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':_0x1c372f,'vrs':_0x534c83,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0x12f5d2,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x389820,'jc':_0x176cc6,'ju':_0x176cc6,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0x511745},'output':{'data':this['data'],'metadata':_0x511745},'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'](_0x1b3557=>'metadata/'+_0x1b3557);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0x328f39=>'output/metadata/'+_0x328f39);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x3b40f5){const _0x311076=this['config']['stats']?.['id'];return _0x311076?pipe_1['Pipe']['resolve'](_0x311076,_0x3b40f5):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x397f7b){const _0x1f4b49=this['config']['stats']?.['key'];return _0x1f4b49?pipe_1['Pipe']['resolve'](_0x1f4b49,_0x397f7b):'';}async['setStateNX'](_0x4a8ecf){const _0x4dd26e=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x4dd26e,this['engine']['appId'],_0x4a8ecf))throw new errors_1['DuplicateJobError'](_0x4dd26e);}async['setStats'](_0x399e2b){const _0x1e2675=this['context']['metadata'];if(_0x1e2675['key']&&this['config']['stats']?.['measures']){const _0x534edf=await this['engine']['getVID'](),_0x3ce7f1=new reporter_1['ReporterService'](_0x534edf,this['store'],this['logger']);await this['store']['setStats'](_0x1e2675['key'],_0x1e2675['jid'],_0x1e2675['ts'],_0x3ce7f1['resolveTriggerStatistics'](this['config'],this['context']),_0x534edf,_0x399e2b);}}}exports['Trigger']=Trigger;