@hotmeshio/hotmesh 0.3.19 → 0.3.21

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 (102) hide show
  1. package/README.md +72 -36
  2. package/build/index.d.ts +7 -1
  3. package/build/index.js +13 -1
  4. package/build/modules/key.js +1 -1
  5. package/build/modules/utils.d.ts +1 -3
  6. package/build/modules/utils.js +1 -1
  7. package/build/package.json +5 -4
  8. package/build/services/activities/activity.js +1 -1
  9. package/build/services/activities/await.js +1 -1
  10. package/build/services/activities/cycle.js +1 -1
  11. package/build/services/activities/hook.js +1 -1
  12. package/build/services/activities/index.js +1 -1
  13. package/build/services/activities/interrupt.js +1 -1
  14. package/build/services/activities/signal.js +1 -1
  15. package/build/services/activities/trigger.js +1 -1
  16. package/build/services/activities/worker.js +1 -1
  17. package/build/services/collator/index.js +1 -1
  18. package/build/services/compiler/deployer.js +1 -1
  19. package/build/services/compiler/index.js +1 -1
  20. package/build/services/compiler/validator.js +1 -1
  21. package/build/services/connector/factory.d.ts +1 -0
  22. package/build/services/connector/factory.js +35 -32
  23. package/build/services/connector/index.d.ts +4 -2
  24. package/build/services/connector/index.js +10 -5
  25. package/build/services/connector/providers/postgres.d.ts +13 -2
  26. package/build/services/connector/providers/postgres.js +54 -9
  27. package/build/services/engine/index.js +1 -1
  28. package/build/services/exporter/index.js +1 -1
  29. package/build/services/hotmesh/index.js +1 -6
  30. package/build/services/mapper/index.js +1 -1
  31. package/build/services/meshcall/index.js +3 -5
  32. package/build/services/meshdata/index.d.ts +3 -4
  33. package/build/services/meshdata/index.js +4 -9
  34. package/build/services/meshflow/client.js +1 -2
  35. package/build/services/meshflow/connection.js +1 -0
  36. package/build/services/meshflow/exporter.js +1 -1
  37. package/build/services/meshflow/worker.js +5 -8
  38. package/build/services/meshos/index.d.ts +2 -2
  39. package/build/services/meshos/index.js +6 -9
  40. package/build/services/pipe/functions/array.js +1 -1
  41. package/build/services/pipe/functions/bitwise.js +1 -1
  42. package/build/services/pipe/functions/conditional.js +1 -1
  43. package/build/services/pipe/functions/cron.js +1 -1
  44. package/build/services/pipe/functions/date.js +1 -1
  45. package/build/services/pipe/functions/index.js +1 -1
  46. package/build/services/pipe/functions/json.js +1 -1
  47. package/build/services/pipe/functions/logical.js +1 -1
  48. package/build/services/pipe/functions/math.js +1 -1
  49. package/build/services/pipe/functions/number.js +1 -1
  50. package/build/services/pipe/functions/object.js +1 -1
  51. package/build/services/pipe/functions/string.js +1 -1
  52. package/build/services/pipe/functions/symbol.js +1 -1
  53. package/build/services/pipe/functions/unary.js +1 -1
  54. package/build/services/pipe/index.js +1 -1
  55. package/build/services/quorum/index.js +1 -1
  56. package/build/services/reporter/index.js +1 -1
  57. package/build/services/router/index.js +1 -1
  58. package/build/services/search/providers/postgres/postgres.js +1 -1
  59. package/build/services/search/providers/redis/ioredis.js +1 -1
  60. package/build/services/search/providers/redis/redis.js +1 -1
  61. package/build/services/serializer/index.js +1 -1
  62. package/build/services/store/providers/postgres/kvsql.js +1 -1
  63. package/build/services/store/providers/postgres/kvtables.d.ts +2 -2
  64. package/build/services/store/providers/postgres/kvtables.js +1 -1
  65. package/build/services/store/providers/postgres/kvtransaction.js +1 -1
  66. package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
  67. package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
  68. package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
  69. package/build/services/store/providers/postgres/kvtypes/zset.js +1 -1
  70. package/build/services/store/providers/postgres/postgres.js +1 -1
  71. package/build/services/store/providers/redis/_base.js +1 -1
  72. package/build/services/store/providers/redis/ioredis.js +1 -1
  73. package/build/services/store/providers/redis/redis.js +1 -1
  74. package/build/services/store/providers/store-initializable.js +1 -1
  75. package/build/services/stream/providers/nats/nats.js +1 -1
  76. package/build/services/stream/providers/postgres/postgres.js +1 -1
  77. package/build/services/stream/providers/redis/ioredis.js +1 -1
  78. package/build/services/stream/providers/redis/redis.js +1 -1
  79. package/build/services/stream/providers/stream-initializable.js +1 -1
  80. package/build/services/sub/factory.d.ts +2 -2
  81. package/build/services/sub/factory.js +13 -8
  82. package/build/services/sub/providers/nats/nats.d.ts +19 -0
  83. package/build/services/sub/providers/nats/nats.js +1 -0
  84. package/build/services/sub/providers/postgres/postgres.d.ts +1 -0
  85. package/build/services/sub/providers/postgres/postgres.js +1 -1
  86. package/build/services/sub/providers/redis/ioredis.js +1 -1
  87. package/build/services/sub/providers/redis/redis.js +1 -1
  88. package/build/services/task/index.js +1 -1
  89. package/build/services/telemetry/index.js +1 -1
  90. package/build/services/worker/index.js +1 -1
  91. package/build/types/hotmesh.d.ts +3 -17
  92. package/build/types/manifest.d.ts +2 -10
  93. package/build/types/nats.d.ts +8 -0
  94. package/build/types/postgres.d.ts +10 -1
  95. package/build/types/provider.d.ts +1 -0
  96. package/index.ts +24 -5
  97. package/package.json +5 -4
  98. package/types/hotmesh.ts +17 -17
  99. package/types/manifest.ts +2 -10
  100. package/types/nats.ts +34 -0
  101. package/types/postgres.ts +13 -2
  102. package/types/provider.ts +4 -0
@@ -1 +1 @@
1
- 'use strict';(function(_0x83f999,_0x462620){const _0x415737=_0x1d22,_0x4dad87=_0x83f999();while(!![]){try{const _0x3d0a36=-parseInt(_0x415737(0x1ba))/0x1+-parseInt(_0x415737(0x1c0))/0x2*(-parseInt(_0x415737(0x1b9))/0x3)+parseInt(_0x415737(0x1be))/0x4+-parseInt(_0x415737(0x1c1))/0x5+-parseInt(_0x415737(0x1bc))/0x6*(parseInt(_0x415737(0x1c2))/0x7)+-parseInt(_0x415737(0x1bd))/0x8*(-parseInt(_0x415737(0x1bb))/0x9)+parseInt(_0x415737(0x1c3))/0xa*(-parseInt(_0x415737(0x1bf))/0xb);if(_0x3d0a36===_0x462620)break;else _0x4dad87['push'](_0x4dad87['shift']());}catch(_0x286296){_0x4dad87['push'](_0x4dad87['shift']());}}}(_0xdd51,0x89679));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(_0x487c15,_0x8822ca,_0x51687f,_0x442276,_0x1ba5cc,_0x540f32){super(_0x487c15,_0x8822ca,_0x51687f,_0x442276,_0x1ba5cc,_0x540f32);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x32aa59;try{return await this['verifyEntry'](),_0x32aa59=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x32aa59['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x32aa59):await this['doPassThrough'](_0x32aa59),this['context']['metadata']['aid'];}catch(_0x2ef7a7){if(_0x2ef7a7 instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x2ef7a7});return;}else{if(_0x2ef7a7 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x2ef7a7});return;}else{if(_0x2ef7a7 instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x2ef7a7});return;}else{if(_0x2ef7a7 instanceof errors_1['CollationError']){if(_0x2ef7a7['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',{..._0x2ef7a7});}else this['logger']['error']('hook-process-error',{..._0x2ef7a7});}}}_0x32aa59?.['setActivityError'](_0x2ef7a7['message']);throw _0x2ef7a7;}finally{_0x32aa59?.['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 _0x29de5a=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x29de5a)&&Number(_0x29de5a)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x23acb6){const _0x4c446f=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x4c446f),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x4c446f),await collator_1['CollatorService']['authorizeReentry'](this,_0x4c446f),await this['setStatus'](0x0,_0x4c446f),await _0x4c446f['exec'](),_0x23acb6['mapActivityAttributes']();}async['doPassThrough'](_0x1563b0){const _0x445844=this['store']['transact']();let _0x245078;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x445844),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x445844),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x445844),_0x245078=await _0x445844['exec'](),_0x1563b0['mapActivityAttributes']();const _0x4bc50f=this['resolveStatus'](_0x245078),_0x30b2ae={'app.job.jss':_0x4bc50f},_0x5df644=await this['transition'](this['adjacencyList'],_0x4bc50f);_0x5df644['length']&&(_0x30b2ae['app.activity.mids']=_0x5df644['join'](',')),_0x1563b0['setActivityAttributes'](_0x30b2ae);}async['getHookRule'](_0x4e11d5){const _0x3ec500=await this['store']['getHookRules']();return _0x3ec500?.[_0x4e11d5]?.[0x0];}async['registerHook'](_0x2798d8){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x2798d8);else{if(this['config']['sleep']){const _0x336d14=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',_0x336d14,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x77fe6a=stream_1['StreamStatus']['SUCCESS'],_0x53fa19=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x77fe6a,'code':_0x53fa19});const _0x580cb2=new task_1['TaskService'](this['store'],this['logger']),_0x45a866={...this['data']},_0x40014a=await _0x580cb2['processWebHookSignal'](this['config']['hook']['topic'],_0x45a866);if(_0x40014a){const [_0xc41dc2,_0xf19b42,_0x4303d0,_0x32e12b]=_0x40014a;this['context']['metadata']['jid']=_0xc41dc2,this['context']['metadata']['gid']=_0x32e12b,this['context']['metadata']['dad']=_0x4303d0,await this['processEvent'](_0x77fe6a,_0x53fa19,'hook'),_0x53fa19===0xc8&&await _0x580cb2['deleteWebHookSignal'](this['config']['hook']['topic'],_0x45a866);}}async['processTimeHookEvent'](_0x2d1f75){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x2d1f75,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}function _0xdd51(){const _0x6222ca=['1202862nmTADS','900590ofodwU','7OblhjJ','923690VLlcyg','3eLwVJx','1082230paAzbB','70641YUYzHv','1295274vcFrTg','472KLsNqS','4275532mNkEBi','11RUJvjz'];_0xdd51=function(){return _0x6222ca;};return _0xdd51();}function _0x1d22(_0x445990,_0x5ea212){const _0xdd5189=_0xdd51();return _0x1d22=function(_0x1d228b,_0x104aa3){_0x1d228b=_0x1d228b-0x1b9;let _0xbe5cd=_0xdd5189[_0x1d228b];return _0xbe5cd;},_0x1d22(_0x445990,_0x5ea212);}exports['Hook']=Hook;
1
+ 'use strict';function _0x4c9e(){const _0x44516f=['16630QEKvnl','391621JAWnll','78759ZshnyU','3184762QyUnon','974022yeIvrE','672opPAkk','800HQKxkb','3156736SWizCc','1317627LKqeRR'];_0x4c9e=function(){return _0x44516f;};return _0x4c9e();}(function(_0x11eacf,_0x3a5109){const _0x27fea7=_0x1d48,_0x4aadc9=_0x11eacf();while(!![]){try{const _0x5f3442=parseInt(_0x27fea7(0xb7))/0x1+parseInt(_0x27fea7(0xba))/0x2+parseInt(_0x27fea7(0xbe))/0x3+-parseInt(_0x27fea7(0xbd))/0x4+-parseInt(_0x27fea7(0xbf))/0x5*(-parseInt(_0x27fea7(0xbb))/0x6)+parseInt(_0x27fea7(0xb9))/0x7+-parseInt(_0x27fea7(0xbc))/0x8*(parseInt(_0x27fea7(0xb8))/0x9);if(_0x5f3442===_0x3a5109)break;else _0x4aadc9['push'](_0x4aadc9['shift']());}catch(_0x242f9a){_0x4aadc9['push'](_0x4aadc9['shift']());}}}(_0x4c9e,0x7570b));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Hook']=void 0x0;function _0x1d48(_0x3a5d16,_0x1a2206){const _0x4c9ed9=_0x4c9e();return _0x1d48=function(_0x1d48dc,_0x561c53){_0x1d48dc=_0x1d48dc-0xb7;let _0xf4caa0=_0x4c9ed9[_0x1d48dc];return _0xf4caa0;},_0x1d48(_0x3a5d16,_0x1a2206);}const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),task_1=require('../task'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');class Hook extends activity_1['Activity']{constructor(_0x11d971,_0x15fd47,_0x909b36,_0xc9dafc,_0x16a169,_0x6364ee){super(_0x11d971,_0x15fd47,_0x909b36,_0xc9dafc,_0x16a169,_0x6364ee);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x3f8e30;try{return await this['verifyEntry'](),_0x3f8e30=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x3f8e30['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x3f8e30):await this['doPassThrough'](_0x3f8e30),this['context']['metadata']['aid'];}catch(_0x4dee6a){if(_0x4dee6a instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x4dee6a});return;}else{if(_0x4dee6a instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x4dee6a});return;}else{if(_0x4dee6a instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x4dee6a});return;}else{if(_0x4dee6a instanceof errors_1['CollationError']){if(_0x4dee6a['fault']==='duplicate'){this['logger']['info']('hook-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('hook-collation-error',{..._0x4dee6a});}else this['logger']['error']('hook-process-error',{..._0x4dee6a});}}}_0x3f8e30?.['setActivityError'](_0x4dee6a['message']);throw _0x4dee6a;}finally{_0x3f8e30?.['endActivitySpan'](),this['logger']['debug']('hook-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}['doesHook'](){if(this['config']['sleep']){const _0x5a89da=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x5a89da)&&Number(_0x5a89da)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x31fe85){const _0x4572a9=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x4572a9),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x4572a9),await collator_1['CollatorService']['authorizeReentry'](this,_0x4572a9),await this['setStatus'](0x0,_0x4572a9),await _0x4572a9['exec'](),_0x31fe85['mapActivityAttributes']();}async['doPassThrough'](_0x4d47d5){const _0x3b502e=this['store']['transact']();let _0x48780d;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x3b502e),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x3b502e),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x3b502e),_0x48780d=await _0x3b502e['exec'](),_0x4d47d5['mapActivityAttributes']();const _0x488e34=this['resolveStatus'](_0x48780d),_0x513470={'app.job.jss':_0x488e34},_0x47f854=await this['transition'](this['adjacencyList'],_0x488e34);_0x47f854['length']&&(_0x513470['app.activity.mids']=_0x47f854['join'](',')),_0x4d47d5['setActivityAttributes'](_0x513470);}async['getHookRule'](_0x3ac9ff){const _0x4a3260=await this['store']['getHookRules']();return _0x4a3260?.[_0x3ac9ff]?.[0x0];}async['registerHook'](_0x5b4adb){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x5b4adb);else{if(this['config']['sleep']){const _0xfa1b53=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return await this['engine']['taskService']['registerTimeHook'](this['context']['metadata']['jid'],this['context']['metadata']['gid'],''+this['metadata']['aid']+(this['metadata']['dad']||''),'sleep',_0xfa1b53,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x4ecf31=stream_1['StreamStatus']['SUCCESS'],_0x361384=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x4ecf31,'code':_0x361384});const _0x356b08=new task_1['TaskService'](this['store'],this['logger']),_0x30e8e0={...this['data']},_0x302319=await _0x356b08['processWebHookSignal'](this['config']['hook']['topic'],_0x30e8e0);if(_0x302319){const [_0x54d52e,_0x9c1ab3,_0x53488e,_0x5660bc]=_0x302319;this['context']['metadata']['jid']=_0x54d52e,this['context']['metadata']['gid']=_0x5660bc,this['context']['metadata']['dad']=_0x53488e,await this['processEvent'](_0x4ecf31,_0x361384,'hook'),_0x361384===0xc8&&await _0x356b08['deleteWebHookSignal'](this['config']['hook']['topic'],_0x30e8e0);}}async['processTimeHookEvent'](_0x366cf5){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x366cf5,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}exports['Hook']=Hook;
@@ -1 +1 @@
1
- 'use strict';(function(_0x16b4f6,_0x2a95f6){const _0x4d7e72=_0xb4c3,_0x443f08=_0x16b4f6();while(!![]){try{const _0x88cdb4=-parseInt(_0x4d7e72(0x92))/0x1*(parseInt(_0x4d7e72(0x93))/0x2)+-parseInt(_0x4d7e72(0x95))/0x3+-parseInt(_0x4d7e72(0x90))/0x4*(parseInt(_0x4d7e72(0x8f))/0x5)+-parseInt(_0x4d7e72(0x96))/0x6+-parseInt(_0x4d7e72(0x94))/0x7*(-parseInt(_0x4d7e72(0x91))/0x8)+-parseInt(_0x4d7e72(0x98))/0x9+-parseInt(_0x4d7e72(0x8e))/0xa*(-parseInt(_0x4d7e72(0x97))/0xb);if(_0x88cdb4===_0x2a95f6)break;else _0x443f08['push'](_0x443f08['shift']());}catch(_0x3a7014){_0x443f08['push'](_0x443f08['shift']());}}}(_0x5c2d,0x1b1fb));function _0x5c2d(){const _0x233c5e=['4ScTYdu','8mWsrFu','68lAcqPS','3718IyGnEQ','1266083YCSlXq','291867esdHEF','473082hFVdVS','5554461OjVPEc','1082700evklns','10wykVKs','759365rvccTV'];_0x5c2d=function(){return _0x233c5e;};return _0x5c2d();}Object['defineProperty'](exports,'__esModule',{'value':!![]});function _0xb4c3(_0xd92c27,_0x48f444){const _0x5c2d6c=_0x5c2d();return _0xb4c3=function(_0xb4c371,_0x387e4f){_0xb4c371=_0xb4c371-0x8e;let _0x4d4a47=_0x5c2d6c[_0xb4c371];return _0x4d4a47;},_0xb4c3(_0xd92c27,_0x48f444);}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(_0x3a4a5d,_0x24bd9f){const _0x15b3b8=_0x424f,_0x3a6b29=_0x3a4a5d();while(!![]){try{const _0x2f40e7=parseInt(_0x15b3b8(0x159))/0x1*(-parseInt(_0x15b3b8(0x157))/0x2)+-parseInt(_0x15b3b8(0x153))/0x3*(-parseInt(_0x15b3b8(0x14f))/0x4)+parseInt(_0x15b3b8(0x151))/0x5+parseInt(_0x15b3b8(0x158))/0x6*(-parseInt(_0x15b3b8(0x156))/0x7)+parseInt(_0x15b3b8(0x150))/0x8+parseInt(_0x15b3b8(0x152))/0x9*(-parseInt(_0x15b3b8(0x154))/0xa)+parseInt(_0x15b3b8(0x14e))/0xb*(parseInt(_0x15b3b8(0x155))/0xc);if(_0x2f40e7===_0x24bd9f)break;else _0x3a6b29['push'](_0x3a6b29['shift']());}catch(_0x358ab5){_0x3a6b29['push'](_0x3a6b29['shift']());}}}(_0x45a8,0x85bee));function _0x424f(_0x1a0cdc,_0x5c5101){const _0x45a854=_0x45a8();return _0x424f=function(_0x424f21,_0x4341b4){_0x424f21=_0x424f21-0x14e;let _0x52fd40=_0x45a854[_0x424f21];return _0x52fd40;},_0x424f(_0x1a0cdc,_0x5c5101);}Object['defineProperty'](exports,'__esModule',{'value':!![]});const activity_1=require('./activity'),await_1=require('./await'),cycle_1=require('./cycle'),hook_1=require('./hook'),interrupt_1=require('./interrupt'),signal_1=require('./signal'),trigger_1=require('./trigger'),worker_1=require('./worker');exports['default']={'activity':activity_1['Activity'],'await':await_1['Await'],'cycle':cycle_1['Cycle'],'hook':hook_1['Hook'],'interrupt':interrupt_1['Interrupt'],'signal':signal_1['Signal'],'trigger':trigger_1['Trigger'],'worker':worker_1['Worker']};function _0x45a8(){const _0x1afd00=['180HdfzoG','9305292NVfxnb','637TlnEJH','2QtlGvm','55194RvkJKS','596402NqRepW','33srNmyt','292GLXgra','1068024LLAeKr','1648630JGhhgn','544671iGuxtI','11553xqpQIv'];_0x45a8=function(){return _0x1afd00;};return _0x45a8();}
@@ -1 +1 @@
1
- 'use strict';(function(_0xb438e1,_0x18cad8){const _0x2eef09=_0x4a32,_0x503346=_0xb438e1();while(!![]){try{const _0x48a627=parseInt(_0x2eef09(0x147))/0x1+parseInt(_0x2eef09(0x143))/0x2+-parseInt(_0x2eef09(0x144))/0x3+-parseInt(_0x2eef09(0x148))/0x4+parseInt(_0x2eef09(0x14b))/0x5*(parseInt(_0x2eef09(0x145))/0x6)+-parseInt(_0x2eef09(0x146))/0x7*(parseInt(_0x2eef09(0x149))/0x8)+parseInt(_0x2eef09(0x14a))/0x9;if(_0x48a627===_0x18cad8)break;else _0x503346['push'](_0x503346['shift']());}catch(_0x3f5c70){_0x503346['push'](_0x503346['shift']());}}}(_0x9ec7,0x642a0));function _0x4a32(_0x3865d6,_0x5f059b){const _0x9ec75e=_0x9ec7();return _0x4a32=function(_0x4a3261,_0x22c157){_0x4a3261=_0x4a3261-0x143;let _0x475837=_0x9ec75e[_0x4a3261];return _0x475837;},_0x4a32(_0x3865d6,_0x5f059b);}function _0x9ec7(){const _0x2a66c6=['5vrpAjp','731996OwGvTM','1026207TMeZcI','218490TaidJN','7SmrzFZ','184919wdrIIY','570836jOblvV','3836488Tniuuj','7085511LgLNFw'];_0x9ec7=function(){return _0x2a66c6;};return _0x9ec7();}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(_0x4ee637,_0x20efae,_0x422a22,_0x12d8d1,_0x441523,_0x15d4ce){super(_0x4ee637,_0x20efae,_0x422a22,_0x12d8d1,_0x441523,_0x15d4ce);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x2c3ddf;try{await this['verifyEntry'](),_0x2c3ddf=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x2c3ddf['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x2c3ddf):await this['interruptAnother'](_0x2c3ddf);}catch(_0x30800a){if(_0x30800a instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x30800a});return;}else{if(_0x30800a instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x30800a});return;}else{if(_0x30800a instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x30800a});return;}else{if(_0x30800a instanceof errors_1['CollationError']){if(_0x30800a['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',{..._0x30800a});}else this['logger']['error']('interrupt-process-error',{..._0x30800a});}}}_0x2c3ddf?.['setActivityError'](_0x30800a['message']);throw _0x30800a;}finally{_0x2c3ddf?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x5d9de7){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x34bd2d=await this['interrupt']();_0x5d9de7['mapActivityAttributes']();const _0x44b37b=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x44b37b),await this['setStatus'](-0x1,_0x44b37b);const _0x40cecb=await _0x44b37b['exec'](),_0x13ffa9=this['resolveStatus'](_0x40cecb);return _0x5d9de7['setActivityAttributes']({'app.activity.mid':_0x34bd2d,'app.job.jss':_0x13ffa9}),this['context']['metadata']['aid'];}async['interruptAnother'](_0xe49fbe){const _0xb91115=await this['interrupt'](),_0x33e9b3={'app.activity.mid':_0xb91115};_0xe49fbe['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x6da264=this['store']['transact']();await this['setState'](_0x6da264);}const _0x3a584b=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x3a584b),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x3a584b);const _0x171fce=await _0x3a584b['exec'](),_0x9d4ac5=this['resolveStatus'](_0x171fce);_0x33e9b3['app.job.jss']=_0x9d4ac5;const _0xb48546=await this['transition'](this['adjacencyList'],_0x9d4ac5);return _0xb48546['length']&&(_0x33e9b3['app.activity.mids']=_0xb48546['join'](',')),_0xe49fbe['setActivityAttributes'](_0x33e9b3),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x1e8e8a=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x1e8e8a==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 _0x28b759=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'],_0x28b759);}}exports['Interrupt']=Interrupt;
1
+ 'use strict';(function(_0x25289b,_0x498717){const _0xef3e69=_0x18f6,_0x59b016=_0x25289b();while(!![]){try{const _0xc0e726=-parseInt(_0xef3e69(0x80))/0x1*(-parseInt(_0xef3e69(0x7f))/0x2)+parseInt(_0xef3e69(0x7d))/0x3*(-parseInt(_0xef3e69(0x86))/0x4)+-parseInt(_0xef3e69(0x83))/0x5*(-parseInt(_0xef3e69(0x87))/0x6)+parseInt(_0xef3e69(0x82))/0x7+parseInt(_0xef3e69(0x81))/0x8+parseInt(_0xef3e69(0x7e))/0x9*(-parseInt(_0xef3e69(0x84))/0xa)+parseInt(_0xef3e69(0x85))/0xb;if(_0xc0e726===_0x498717)break;else _0x59b016['push'](_0x59b016['shift']());}catch(_0x35bdc0){_0x59b016['push'](_0x59b016['shift']());}}}(_0x2b64,0x61143));function _0x18f6(_0x7df3d9,_0x38eb51){const _0x2b642b=_0x2b64();return _0x18f6=function(_0x18f627,_0x4d1ee6){_0x18f627=_0x18f627-0x7d;let _0x4f3256=_0x2b642b[_0x18f627];return _0x4f3256;},_0x18f6(_0x7df3d9,_0x38eb51);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Interrupt']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');function _0x2b64(){const _0xbd66c7=['62628CBiqMF','13htlcaF','5206776IBXiqB','443331oORzKd','29165mBguQU','179650NGqrUE','1638263VQyRSx','68XNoilK','96VEyqVF','129237WeaePV','117GHtqzl'];_0x2b64=function(){return _0xbd66c7;};return _0x2b64();}class Interrupt extends activity_1['Activity']{constructor(_0x475f4a,_0x1c335a,_0x3c48ed,_0x34c3de,_0x3f1e9c,_0xa0bdb0){super(_0x475f4a,_0x1c335a,_0x3c48ed,_0x34c3de,_0x3f1e9c,_0xa0bdb0);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x5a4d29;try{await this['verifyEntry'](),_0x5a4d29=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x5a4d29['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x5a4d29):await this['interruptAnother'](_0x5a4d29);}catch(_0xd0afe6){if(_0xd0afe6 instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0xd0afe6});return;}else{if(_0xd0afe6 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0xd0afe6});return;}else{if(_0xd0afe6 instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0xd0afe6});return;}else{if(_0xd0afe6 instanceof errors_1['CollationError']){if(_0xd0afe6['fault']==='duplicate'){this['logger']['info']('interrupt-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('interrupt-collation-error',{..._0xd0afe6});}else this['logger']['error']('interrupt-process-error',{..._0xd0afe6});}}}_0x5a4d29?.['setActivityError'](_0xd0afe6['message']);throw _0xd0afe6;}finally{_0x5a4d29?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x37fc26){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x4c3227=await this['interrupt']();_0x37fc26['mapActivityAttributes']();const _0x198533=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x198533),await this['setStatus'](-0x1,_0x198533);const _0x29efd5=await _0x198533['exec'](),_0x2f9252=this['resolveStatus'](_0x29efd5);return _0x37fc26['setActivityAttributes']({'app.activity.mid':_0x4c3227,'app.job.jss':_0x2f9252}),this['context']['metadata']['aid'];}async['interruptAnother'](_0xe845c2){const _0x3d7cd1=await this['interrupt'](),_0x46d4ef={'app.activity.mid':_0x3d7cd1};_0xe845c2['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x5d0344=this['store']['transact']();await this['setState'](_0x5d0344);}const _0x29fab5=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x29fab5),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x29fab5);const _0x4b30b6=await _0x29fab5['exec'](),_0x5da38d=this['resolveStatus'](_0x4b30b6);_0x46d4ef['app.job.jss']=_0x5da38d;const _0x135092=await this['transition'](this['adjacencyList'],_0x5da38d);return _0x135092['length']&&(_0x46d4ef['app.activity.mids']=_0x135092['join'](',')),_0xe845c2['setActivityAttributes'](_0x46d4ef),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x433c49=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x433c49==this['context']['metadata']['jid'];}['resolveInterruptOptions'](){return{'reason':this['config']['reason']!==undefined?pipe_1['Pipe']['resolve'](this['config']['reason'],this['context']):undefined,'throw':this['config']['throw']!==undefined?pipe_1['Pipe']['resolve'](this['config']['throw'],this['context']):undefined,'descend':this['config']['descend']!==undefined?pipe_1['Pipe']['resolve'](this['config']['descend'],this['context']):undefined,'code':this['config']['code']!==undefined?pipe_1['Pipe']['resolve'](this['config']['code'],this['context']):undefined,'expire':this['config']['expire']!==undefined?pipe_1['Pipe']['resolve'](this['config']['expire'],this['context']):undefined,'stack':this['config']['stack']!==undefined?pipe_1['Pipe']['resolve'](this['config']['stack'],this['context']):undefined};}async['interrupt'](){const _0x2d39ac=this['resolveInterruptOptions']();return await this['engine']['interrupt'](this['config']['topic']!==undefined?pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']):this['context']['metadata']['tpc'],this['config']['target']!==undefined?pipe_1['Pipe']['resolve'](this['config']['target'],this['context']):this['context']['metadata']['jid'],_0x2d39ac);}}exports['Interrupt']=Interrupt;
@@ -1 +1 @@
1
- 'use strict';(function(_0x2ad3e1,_0x11ca21){const _0x559a2c=_0x14bf,_0x47a60e=_0x2ad3e1();while(!![]){try{const _0x14864b=parseInt(_0x559a2c(0x1b2))/0x1+-parseInt(_0x559a2c(0x1ae))/0x2*(parseInt(_0x559a2c(0x1b5))/0x3)+parseInt(_0x559a2c(0x1ad))/0x4+parseInt(_0x559a2c(0x1b4))/0x5+parseInt(_0x559a2c(0x1b3))/0x6*(parseInt(_0x559a2c(0x1b0))/0x7)+-parseInt(_0x559a2c(0x1af))/0x8+-parseInt(_0x559a2c(0x1b1))/0x9;if(_0x14864b===_0x11ca21)break;else _0x47a60e['push'](_0x47a60e['shift']());}catch(_0xf6f797){_0x47a60e['push'](_0x47a60e['shift']());}}}(_0x41b6,0x51f54));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(_0x3ccc7f,_0x113f8b,_0x19f5a3,_0x4f5e02,_0x4808c7,_0xebcfa4){super(_0x3ccc7f,_0x113f8b,_0x19f5a3,_0x4f5e02,_0x4808c7,_0xebcfa4);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x119241;try{await this['verifyEntry'](),_0x119241=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x119241['startActivitySpan'](this['leg']);const _0x2b8fcb=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x2b8fcb),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x2b8fcb),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x2b8fcb);const _0x9df118=await _0x2b8fcb['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x78630b=this['resolveStatus'](_0x9df118),_0x25fdd7={'app.job.jss':_0x78630b},_0x223d53=await this['transition'](this['adjacencyList'],_0x78630b);return _0x223d53['length']&&(_0x25fdd7['app.activity.mids']=_0x223d53['join'](',')),_0x119241['mapActivityAttributes'](),_0x119241['setActivityAttributes'](_0x25fdd7),this['context']['metadata']['aid'];}catch(_0x10d994){if(_0x10d994 instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x10d994});return;}else{if(_0x10d994 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x10d994});return;}else{if(_0x10d994 instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x10d994});return;}else{if(_0x10d994 instanceof errors_1['CollationError']){if(_0x10d994['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',{..._0x10d994});}else this['logger']['error']('signal-process-error',{..._0x10d994});}}}_0x119241?.['setActivityError'](_0x10d994['message']);throw _0x10d994;}finally{_0x119241?.['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 _0x3e5629=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x3e5629['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x2c75b1=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x2c75b1['mapRules']();}}async['hookOne'](){const _0x1dc8ac=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x1f0807=this['mapSignalData'](),_0x26fea4=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x38f7e8=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x1dc8ac,_0x1f0807,_0x26fea4,_0x38f7e8);}async['hookAll'](){const _0x379e5d=this['mapSignalData'](),_0x43a61d=this['mapResolverData']();this['config']['scrub']&&(_0x43a61d['scrub']=!![]);const _0xb26c1=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0xd53eb=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x1d6b1a=[_0xb26c1+':'+_0xd53eb];return await this['engine']['hookAll'](this['config']['topic'],_0x379e5d,_0x43a61d,_0x1d6b1a);}}function _0x14bf(_0x387049,_0x397783){const _0x41b6e4=_0x41b6();return _0x14bf=function(_0x14bfd6,_0x2370d8){_0x14bfd6=_0x14bfd6-0x1ad;let _0x5d79c5=_0x41b6e4[_0x14bfd6];return _0x5d79c5;},_0x14bf(_0x387049,_0x397783);}exports['Signal']=Signal;function _0x41b6(){const _0x37d430=['509424sAatRH','3872757NMxwgt','7222644putSnB','260444DcEnbI','6kJTKRD','1357670DYVspu','835656dkNoNt','1580868wPALrk','2rJRWKj'];_0x41b6=function(){return _0x37d430;};return _0x41b6();}
1
+ 'use strict';(function(_0x4988dc,_0x571043){const _0x3e1079=_0x1397,_0x5cb3ea=_0x4988dc();while(!![]){try{const _0x5927f4=-parseInt(_0x3e1079(0x107))/0x1*(-parseInt(_0x3e1079(0x108))/0x2)+parseInt(_0x3e1079(0x101))/0x3*(parseInt(_0x3e1079(0x102))/0x4)+parseInt(_0x3e1079(0x104))/0x5*(parseInt(_0x3e1079(0x109))/0x6)+-parseInt(_0x3e1079(0x106))/0x7+parseInt(_0x3e1079(0x10a))/0x8*(parseInt(_0x3e1079(0x100))/0x9)+parseInt(_0x3e1079(0x105))/0xa+-parseInt(_0x3e1079(0x103))/0xb;if(_0x5927f4===_0x571043)break;else _0x5cb3ea['push'](_0x5cb3ea['shift']());}catch(_0x5f0517){_0x5cb3ea['push'](_0x5cb3ea['shift']());}}}(_0x2b61,0xcc4ac));function _0x2b61(){const _0x2c8858=['2DoqOvC','798890YZBZDf','6QKTYsp','296pZMJqg','339111QVsAZh','5883IlxjmI','24TZNEwp','32478864duKaZl','7301130lkJTJL','1570770fLYrXb','228746MDBmCW'];_0x2b61=function(){return _0x2c8858;};return _0x2b61();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Signal']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../collator'),mapper_1=require('../mapper'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Signal extends activity_1['Activity']{constructor(_0x44ec9e,_0x203931,_0x191c15,_0x3d16bf,_0xd05bdb,_0x5e2361){super(_0x44ec9e,_0x203931,_0x191c15,_0x3d16bf,_0xd05bdb,_0x5e2361);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x50976b;try{await this['verifyEntry'](),_0x50976b=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x50976b['startActivitySpan'](this['leg']);const _0x43a126=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x43a126),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x43a126),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x43a126);const _0x22df37=await _0x43a126['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x2fbe64=this['resolveStatus'](_0x22df37),_0x2590aa={'app.job.jss':_0x2fbe64},_0x35bca0=await this['transition'](this['adjacencyList'],_0x2fbe64);return _0x35bca0['length']&&(_0x2590aa['app.activity.mids']=_0x35bca0['join'](',')),_0x50976b['mapActivityAttributes'](),_0x50976b['setActivityAttributes'](_0x2590aa),this['context']['metadata']['aid'];}catch(_0x3d90e1){if(_0x3d90e1 instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x3d90e1});return;}else{if(_0x3d90e1 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x3d90e1});return;}else{if(_0x3d90e1 instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x3d90e1});return;}else{if(_0x3d90e1 instanceof errors_1['CollationError']){if(_0x3d90e1['fault']==='duplicate'){this['logger']['info']('signal-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('signal-collation-error',{..._0x3d90e1});}else this['logger']['error']('signal-process-error',{..._0x3d90e1});}}}_0x50976b?.['setActivityError'](_0x3d90e1['message']);throw _0x3d90e1;}finally{_0x50976b?.['endActivitySpan'](),this['logger']['debug']('signal-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}['mapSignalData'](){if(this['config']['signal']?.['maps']){const _0xed4262=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0xed4262['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x394ff6=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x394ff6['mapRules']();}}async['hookOne'](){const _0xd40d92=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x75c92c=this['mapSignalData'](),_0x20f273=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x5b4538=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0xd40d92,_0x75c92c,_0x20f273,_0x5b4538);}async['hookAll'](){const _0x32580d=this['mapSignalData'](),_0xea5e2a=this['mapResolverData']();this['config']['scrub']&&(_0xea5e2a['scrub']=!![]);const _0x32b1f1=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x4a007e=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x5a18b0=[_0x32b1f1+':'+_0x4a007e];return await this['engine']['hookAll'](this['config']['topic'],_0x32580d,_0xea5e2a,_0x5a18b0);}}function _0x1397(_0x2daa76,_0x44813d){const _0x2b61c4=_0x2b61();return _0x1397=function(_0x1397e6,_0x324d95){_0x1397e6=_0x1397e6-0x100;let _0x381535=_0x2b61c4[_0x1397e6];return _0x381535;},_0x1397(_0x2daa76,_0x44813d);}exports['Signal']=Signal;
@@ -1 +1 @@
1
- 'use strict';(function(_0x139e42,_0x4326a2){const _0x12292e=_0x14e7,_0x5cf956=_0x139e42();while(!![]){try{const _0x2bccf1=parseInt(_0x12292e(0x79))/0x1*(-parseInt(_0x12292e(0x71))/0x2)+parseInt(_0x12292e(0x75))/0x3+parseInt(_0x12292e(0x76))/0x4*(-parseInt(_0x12292e(0x77))/0x5)+-parseInt(_0x12292e(0x74))/0x6+parseInt(_0x12292e(0x78))/0x7*(-parseInt(_0x12292e(0x7a))/0x8)+parseInt(_0x12292e(0x73))/0x9+parseInt(_0x12292e(0x72))/0xa;if(_0x2bccf1===_0x4326a2)break;else _0x5cf956['push'](_0x5cf956['shift']());}catch(_0x1dd5aa){_0x5cf956['push'](_0x5cf956['shift']());}}}(_0x5c92,0xe8b52));function _0x14e7(_0x1c98f1,_0xe6c837){const _0x5c92a9=_0x5c92();return _0x14e7=function(_0x14e77e,_0x3f0aca){_0x14e77e=_0x14e77e-0x71;let _0x1da300=_0x5c92a9[_0x14e77e];return _0x1da300;},_0x14e7(_0x1c98f1,_0xe6c837);}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(_0x9f81ab,_0x35db49,_0x12cdcc,_0x5e82ba,_0x45747f,_0x4c02ed){super(_0x9f81ab,_0x35db49,_0x12cdcc,_0x5e82ba,_0x45747f,_0x4c02ed);}async['process'](_0x4c1604){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x307cbf;try{this['setLeg'](0x2),await this['getState'](),_0x307cbf=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x307cbf['startJobSpan'](),_0x307cbf['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0xbe9b26=this['initStatus'](_0x4c1604,this['adjacencyList']['length']);await this['setStateNX'](_0xbe9b26),await this['setStatus'](_0xbe9b26),this['bindSearchData'](_0x4c1604),this['bindMarkerData'](_0x4c1604);const _0x178353=this['store']['transact']();await this['setState'](_0x178353),await this['setStats'](_0x178353);_0x4c1604?.['pending']&&await this['setExpired'](_0x4c1604?.['pending'],_0x178353);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x178353),await _0x178353['exec'](),this['execAdjacentParent'](),_0x307cbf['mapActivityAttributes']();const _0x417ccb=Number(this['context']['metadata']['js']);_0x307cbf['setJobAttributes']({'app.job.jss':_0x417ccb});const _0x1ebe85={'app.job.jss':_0x417ccb};return await this['transitionAndLogAdjacent'](_0x4c1604,_0x417ccb,_0x1ebe85),_0x307cbf['setActivityAttributes'](_0x1ebe85),this['context']['metadata']['jid'];}catch(_0x31d467){_0x307cbf?.['setActivityError'](_0x31d467['message']);if(_0x31d467 instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x151806=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x151806){this['logger']['info']('trigger-collation-overage',{'job_id':_0x31d467['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0x31d467['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0x31d467});throw _0x31d467;}finally{_0x307cbf?.['endJobSpan'](),_0x307cbf?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x1fd3e1={},_0x51f95b,_0x519a87){if(isNaN(_0x1fd3e1['pending'])){const _0x28ad5d=await this['transition'](this['adjacencyList'],_0x51f95b);_0x28ad5d['length']&&(_0x519a87['app.activity.mids']=_0x28ad5d['join'](','));}}['initStatus'](_0x126394={},_0x1bdfb9){if(_0x126394['pending'])return-0x1;return _0x1bdfb9;}async['setExpired'](_0xd85a65,_0x3d5003){await this['store']['expireJob'](this['context']['metadata']['jid'],_0xd85a65,_0x3d5003);}['safeKey'](_0xde152e){return'_'+_0xde152e;}['bindSearchData'](_0x30e40b){_0x30e40b?.['search']&&Object['keys'](_0x30e40b['search'])['forEach'](_0x5cd385=>{this['context']['data'][this['safeKey'](_0x5cd385)]=_0x30e40b['search'][_0x5cd385]['toString']();});}['bindMarkerData'](_0x251da0){_0x251da0?.['marker']&&Object['keys'](_0x251da0['marker'])['forEach'](_0x1b72b7=>{_0x1b72b7['startsWith']('-')&&(this['context']['data'][_0x1b72b7]=_0x251da0['marker'][_0x1b72b7]['toString']());});}async['setStatus'](_0x10cf24){this['context']['metadata']['js']=_0x10cf24;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x3a7aaa=(0x0,utils_1['formatISODate'])(new Date()),_0x18dfab={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x3a7aaa,'ju':_0x3a7aaa}};await this['engine']['execAdjacentParent'](this['context'],_0x18dfab);}}['createInputContext'](){const _0x1f420c={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x1f420c;}async['getState'](){const _0xdab977=this['createInputContext'](),_0xd25e30=this['resolveJobId'](_0xdab977),_0x2d5246=this['resolveJobKey'](_0xdab977),_0x241ae7=(0x0,utils_1['formatISODate'])(new Date()),{id:_0x5f479d,version:_0x577ab4}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0x156853={...this['metadata'],'jid':_0xd25e30,'key':_0x2d5246,'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':_0x5f479d,'vrs':_0x577ab4,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0xd25e30,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x2d5246,'jc':_0x241ae7,'ju':_0x241ae7,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0x156853},'output':{'data':this['data'],'metadata':_0x156853},'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'](_0xc4626a=>'metadata/'+_0xc4626a);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0x2ce363=>'output/metadata/'+_0x2ce363);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x47b8b9){const _0x542fc9=this['config']['stats']?.['id'];return _0x542fc9?pipe_1['Pipe']['resolve'](_0x542fc9,_0x47b8b9):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x36ec3a){const _0x14a7e7=this['config']['stats']?.['key'];return _0x14a7e7?pipe_1['Pipe']['resolve'](_0x14a7e7,_0x36ec3a):'';}async['setStateNX'](_0x42091e){const _0x2da680=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x2da680,this['engine']['appId'],_0x42091e))throw new errors_1['DuplicateJobError'](_0x2da680);}async['setStats'](_0x241ffc){const _0x117329=this['context']['metadata'];if(_0x117329['key']&&this['config']['stats']?.['measures']){const _0x37db6b=await this['engine']['getVID'](),_0x1f21b3=new reporter_1['ReporterService'](_0x37db6b,this['store'],this['logger']);await this['store']['setStats'](_0x117329['key'],_0x117329['jid'],_0x117329['ts'],_0x1f21b3['resolveTriggerStatistics'](this['config'],this['context']),_0x37db6b,_0x241ffc);}}}function _0x5c92(){const _0x242852=['7385658fPDlcR','3680193qEGBNJ','28VUYwED','489125fTIECr','217014QqWyAn','97506dwGRRP','328NbttCU','12AswdOq','16190230IYnala','16913268MEUzxC'];_0x5c92=function(){return _0x242852;};return _0x5c92();}exports['Trigger']=Trigger;
1
+ 'use strict';function _0x2a92(){const _0x22d754=['22LwtlKL','36oDbdCu','4015975VmQhET','335841aSLjos','28RSptny','5732490lLevVI','690403HKgKvH','44296GncYAF','7404430SyWXYw','35870CcmrRI','783MXaCHL'];_0x2a92=function(){return _0x22d754;};return _0x2a92();}(function(_0x326c6e,_0x4bd50b){const _0x42721b=_0xe2a7,_0x34b8da=_0x326c6e();while(!![]){try{const _0x3e65f5=parseInt(_0x42721b(0x132))/0x1*(parseInt(_0x42721b(0x129))/0x2)+-parseInt(_0x42721b(0x12c))/0x3*(parseInt(_0x42721b(0x12d))/0x4)+parseInt(_0x42721b(0x12b))/0x5+-parseInt(_0x42721b(0x12a))/0x6*(-parseInt(_0x42721b(0x12f))/0x7)+-parseInt(_0x42721b(0x130))/0x8*(parseInt(_0x42721b(0x133))/0x9)+parseInt(_0x42721b(0x12e))/0xa+-parseInt(_0x42721b(0x131))/0xb;if(_0x3e65f5===_0x4bd50b)break;else _0x34b8da['push'](_0x34b8da['shift']());}catch(_0x2b3f12){_0x34b8da['push'](_0x34b8da['shift']());}}}(_0x2a92,0x67976));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Trigger']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),reporter_1=require('../reporter'),serializer_1=require('../serializer'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Trigger extends activity_1['Activity']{constructor(_0x233d45,_0x373a2a,_0x1e1cfd,_0x186a12,_0x1e2458,_0x5bb07e){super(_0x233d45,_0x373a2a,_0x1e1cfd,_0x186a12,_0x1e2458,_0x5bb07e);}async['process'](_0x50f1e5){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x55adee;try{this['setLeg'](0x2),await this['getState'](),_0x55adee=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x55adee['startJobSpan'](),_0x55adee['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x3ed448=this['initStatus'](_0x50f1e5,this['adjacencyList']['length']);await this['setStateNX'](_0x3ed448),await this['setStatus'](_0x3ed448),this['bindSearchData'](_0x50f1e5),this['bindMarkerData'](_0x50f1e5);const _0x18062d=this['store']['transact']();await this['setState'](_0x18062d),await this['setStats'](_0x18062d);_0x50f1e5?.['pending']&&await this['setExpired'](_0x50f1e5?.['pending'],_0x18062d);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x18062d),await _0x18062d['exec'](),this['execAdjacentParent'](),_0x55adee['mapActivityAttributes']();const _0xcc4393=Number(this['context']['metadata']['js']);_0x55adee['setJobAttributes']({'app.job.jss':_0xcc4393});const _0x5bf17a={'app.job.jss':_0xcc4393};return await this['transitionAndLogAdjacent'](_0x50f1e5,_0xcc4393,_0x5bf17a),_0x55adee['setActivityAttributes'](_0x5bf17a),this['context']['metadata']['jid'];}catch(_0x4243c4){_0x55adee?.['setActivityError'](_0x4243c4['message']);if(_0x4243c4 instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x4ea19d=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x4ea19d){this['logger']['info']('trigger-collation-overage',{'job_id':_0x4243c4['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0x4243c4['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0x4243c4});throw _0x4243c4;}finally{_0x55adee?.['endJobSpan'](),_0x55adee?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x445d97={},_0x3f8b93,_0xd61cd7){if(isNaN(_0x445d97['pending'])){const _0x1f948d=await this['transition'](this['adjacencyList'],_0x3f8b93);_0x1f948d['length']&&(_0xd61cd7['app.activity.mids']=_0x1f948d['join'](','));}}['initStatus'](_0x2b9a7={},_0x2eee6f){if(_0x2b9a7['pending'])return-0x1;return _0x2eee6f;}async['setExpired'](_0x4ce2c2,_0x434405){await this['store']['expireJob'](this['context']['metadata']['jid'],_0x4ce2c2,_0x434405);}['safeKey'](_0xbf12b){return'_'+_0xbf12b;}['bindSearchData'](_0x527957){_0x527957?.['search']&&Object['keys'](_0x527957['search'])['forEach'](_0x584985=>{this['context']['data'][this['safeKey'](_0x584985)]=_0x527957['search'][_0x584985]['toString']();});}['bindMarkerData'](_0x2d02ff){_0x2d02ff?.['marker']&&Object['keys'](_0x2d02ff['marker'])['forEach'](_0xf395b3=>{_0xf395b3['startsWith']('-')&&(this['context']['data'][_0xf395b3]=_0x2d02ff['marker'][_0xf395b3]['toString']());});}async['setStatus'](_0x5f1e5e){this['context']['metadata']['js']=_0x5f1e5e;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x3acdf5=(0x0,utils_1['formatISODate'])(new Date()),_0x41da02={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x3acdf5,'ju':_0x3acdf5}};await this['engine']['execAdjacentParent'](this['context'],_0x41da02);}}['createInputContext'](){const _0x426028={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x426028;}async['getState'](){const _0x3ad596=this['createInputContext'](),_0x77fc12=this['resolveJobId'](_0x3ad596),_0x14dcd4=this['resolveJobKey'](_0x3ad596),_0x1afb06=(0x0,utils_1['formatISODate'])(new Date()),{id:_0xd0652e,version:_0x4cea27}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0x53ce09={...this['metadata'],'jid':_0x77fc12,'key':_0x14dcd4,'as':collator_1['CollatorService']['getTriggerSeed']()};this['context']={'metadata':{...this['metadata'],'gid':(0x0,utils_1['guid'])(),'ngn':this['context']['metadata']['ngn'],'pj':this['context']['metadata']['pj'],'pg':this['context']['metadata']['pg'],'pd':this['context']['metadata']['pd'],'pa':this['context']['metadata']['pa'],'px':this['context']['metadata']['px'],'app':_0xd0652e,'vrs':_0x4cea27,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0x77fc12,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x14dcd4,'jc':_0x1afb06,'ju':_0x1afb06,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0x53ce09},'output':{'data':this['data'],'metadata':_0x53ce09},'settings':{'data':{}},'errors':{'data':{}}}},this['context']['$self']=this['context'][this['metadata']['aid']],this['context']['$job']=this['context'];}['bindJobMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['JOB']['KEYS']['map'](_0x14f04d=>'metadata/'+_0x14f04d);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0xc6ef26=>'output/metadata/'+_0xc6ef26);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x541afb){const _0x16908d=this['config']['stats']?.['id'];return _0x16908d?pipe_1['Pipe']['resolve'](_0x16908d,_0x541afb):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x151f29){const _0x106217=this['config']['stats']?.['key'];return _0x106217?pipe_1['Pipe']['resolve'](_0x106217,_0x151f29):'';}async['setStateNX'](_0x10fa4c){const _0x7f7082=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x7f7082,this['engine']['appId'],_0x10fa4c))throw new errors_1['DuplicateJobError'](_0x7f7082);}async['setStats'](_0x4c3738){const _0x2e5023=this['context']['metadata'];if(_0x2e5023['key']&&this['config']['stats']?.['measures']){const _0x47f437=await this['engine']['getVID'](),_0x53072e=new reporter_1['ReporterService'](_0x47f437,this['store'],this['logger']);await this['store']['setStats'](_0x2e5023['key'],_0x2e5023['jid'],_0x2e5023['ts'],_0x53072e['resolveTriggerStatistics'](this['config'],this['context']),_0x47f437,_0x4c3738);}}}function _0xe2a7(_0x64ec34,_0x3621b7){const _0x2a926f=_0x2a92();return _0xe2a7=function(_0xe2a7c4,_0x30685){_0xe2a7c4=_0xe2a7c4-0x129;let _0x3aff15=_0x2a926f[_0xe2a7c4];return _0x3aff15;},_0xe2a7(_0x64ec34,_0x3621b7);}exports['Trigger']=Trigger;
@@ -1 +1 @@
1
- 'use strict';function _0x55dc(){const _0x3c3d02=['5817664pEuTEN','3429EjeJWI','9yugCoj','14012750xIlrAh','5zEHNle','6525192xAytiY','7024XLLERx','1242126hRlvEg','421422pMHURQ','8999081snounN'];_0x55dc=function(){return _0x3c3d02;};return _0x55dc();}(function(_0x7f505c,_0x74f23e){const _0x854c0=_0x5bd7,_0x3caf1f=_0x7f505c();while(!![]){try{const _0x4b15cf=-parseInt(_0x854c0(0x11c))/0x1+-parseInt(_0x854c0(0x11d))/0x2*(parseInt(_0x854c0(0x117))/0x3)+parseInt(_0x854c0(0x115))/0x4+parseInt(_0x854c0(0x119))/0x5*(-parseInt(_0x854c0(0x11a))/0x6)+parseInt(_0x854c0(0x114))/0x7+-parseInt(_0x854c0(0x11b))/0x8*(parseInt(_0x854c0(0x116))/0x9)+parseInt(_0x854c0(0x118))/0xa;if(_0x4b15cf===_0x74f23e)break;else _0x3caf1f['push'](_0x3caf1f['shift']());}catch(_0x3dbe3f){_0x3caf1f['push'](_0x3caf1f['shift']());}}}(_0x55dc,0xce4a5));function _0x5bd7(_0x154944,_0x2027db){const _0x55dc92=_0x55dc();return _0x5bd7=function(_0x5bd738,_0x11b0a5){_0x5bd738=_0x5bd738-0x114;let _0x568780=_0x55dc92[_0x5bd738];return _0x568780;},_0x5bd7(_0x154944,_0x2027db);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Worker']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Worker extends activity_1['Activity']{constructor(_0x54fb86,_0x3a59e1,_0xeac259,_0x4e94fa,_0x4880e1,_0x8dd9ba){super(_0x54fb86,_0x3a59e1,_0xeac259,_0x4e94fa,_0x4880e1,_0x8dd9ba);}async['process'](){this['logger']['debug']('worker-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x41db9d;try{await this['verifyEntry'](),_0x41db9d=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x41db9d['startActivitySpan'](this['leg']),this['mapInputData']();const _0x125391=this['store']['transact'](),_0x923fe0=await this['execActivity'](_0x125391);await collator_1['CollatorService']['authorizeReentry'](this,_0x125391),await this['setState'](_0x125391),await this['setStatus'](0x0,_0x125391);const _0x25e8f3=await _0x125391['exec']();_0x41db9d['mapActivityAttributes']();const _0x5dfd5d=this['resolveStatus'](_0x25e8f3);return _0x41db9d['setActivityAttributes']({'app.activity.mid':_0x923fe0,'app.job.jss':_0x5dfd5d}),this['context']['metadata']['aid'];}catch(_0x5cb4c8){if(_0x5cb4c8 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x5cb4c8});return;}else{if(_0x5cb4c8 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x5cb4c8});return;}else{if(_0x5cb4c8 instanceof errors_1['GetStateError']){this['logger']['error']('worker-get-state-error',{..._0x5cb4c8});return;}else{if(_0x5cb4c8 instanceof errors_1['CollationError']){if(_0x5cb4c8['fault']==='duplicate'){this['logger']['info']('worker-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('worker-collation-error',{..._0x5cb4c8});}else this['logger']['error']('worker-process-error',{..._0x5cb4c8});}}}_0x41db9d?.['setActivityError'](_0x5cb4c8['message']);throw _0x5cb4c8;}finally{_0x41db9d?.['endActivitySpan'](),this['logger']['debug']('worker-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0xd67b12){const _0x495a4c=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x5428bd={'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':_0x495a4c,'spn':this['context']['$self']['output']['metadata']['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return this['config']['retry']&&(_0x5428bd['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](_0x495a4c,_0x5428bd,_0xd67b12);}}exports['Worker']=Worker;
1
+ 'use strict';function _0x4122(){const _0x52b839=['90420Seyuvl','471866bECRIp','216179ThQINc','40ghYHfM','456400MzaeQB','210uwTBYv','182fSkqio','285462jgprPD','314952SVWIdz'];_0x4122=function(){return _0x52b839;};return _0x4122();}(function(_0x1cd437,_0x16cd8c){const _0x391883=_0x1bea,_0x3886fe=_0x1cd437();while(!![]){try{const _0x164ca4=-parseInt(_0x391883(0x1bf))/0x1+parseInt(_0x391883(0x1be))/0x2+parseInt(_0x391883(0x1c5))/0x3+-parseInt(_0x391883(0x1c6))/0x4+-parseInt(_0x391883(0x1c1))/0x5+parseInt(_0x391883(0x1c2))/0x6*(parseInt(_0x391883(0x1c3))/0x7)+parseInt(_0x391883(0x1c0))/0x8*(parseInt(_0x391883(0x1c4))/0x9);if(_0x164ca4===_0x16cd8c)break;else _0x3886fe['push'](_0x3886fe['shift']());}catch(_0x89dad6){_0x3886fe['push'](_0x3886fe['shift']());}}}(_0x4122,0x29971));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Worker']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');class Worker extends activity_1['Activity']{constructor(_0x563049,_0x7d9a4,_0x5ef7b7,_0x13c51d,_0x4c8892,_0x24f05c){super(_0x563049,_0x7d9a4,_0x5ef7b7,_0x13c51d,_0x4c8892,_0x24f05c);}async['process'](){this['logger']['debug']('worker-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x3303f2;try{await this['verifyEntry'](),_0x3303f2=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x3303f2['startActivitySpan'](this['leg']),this['mapInputData']();const _0x50a521=this['store']['transact'](),_0x4c804a=await this['execActivity'](_0x50a521);await collator_1['CollatorService']['authorizeReentry'](this,_0x50a521),await this['setState'](_0x50a521),await this['setStatus'](0x0,_0x50a521);const _0x3da954=await _0x50a521['exec']();_0x3303f2['mapActivityAttributes']();const _0x4ad494=this['resolveStatus'](_0x3da954);return _0x3303f2['setActivityAttributes']({'app.activity.mid':_0x4c804a,'app.job.jss':_0x4ad494}),this['context']['metadata']['aid'];}catch(_0x548893){if(_0x548893 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x548893});return;}else{if(_0x548893 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x548893});return;}else{if(_0x548893 instanceof errors_1['GetStateError']){this['logger']['error']('worker-get-state-error',{..._0x548893});return;}else{if(_0x548893 instanceof errors_1['CollationError']){if(_0x548893['fault']==='duplicate'){this['logger']['info']('worker-collation-overage',{'job_id':this['context']['metadata']['jid'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('worker-collation-error',{..._0x548893});}else this['logger']['error']('worker-process-error',{..._0x548893});}}}_0x3303f2?.['setActivityError'](_0x548893['message']);throw _0x548893;}finally{_0x3303f2?.['endActivitySpan'](),this['logger']['debug']('worker-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x47c04a){const _0x1d6b79=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x3377aa={'metadata':{'guid':(0x0,utils_1['guid'])(),'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'dad':this['metadata']['dad'],'aid':this['metadata']['aid'],'topic':_0x1d6b79,'spn':this['context']['$self']['output']['metadata']['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return this['config']['retry']&&(_0x3377aa['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](_0x1d6b79,_0x3377aa,_0x47c04a);}}function _0x1bea(_0x14c129,_0x2b36c3){const _0x41224c=_0x4122();return _0x1bea=function(_0x1bea12,_0x3f9d2a){_0x1bea12=_0x1bea12-0x1be;let _0x563700=_0x41224c[_0x1bea12];return _0x563700;},_0x1bea(_0x14c129,_0x2b36c3);}exports['Worker']=Worker;
@@ -1 +1 @@
1
- 'use strict';(function(_0x5e553c,_0xfe434a){const _0x101698=_0x2a7e,_0x2b5742=_0x5e553c();while(!![]){try{const _0x5341ba=-parseInt(_0x101698(0x183))/0x1+-parseInt(_0x101698(0x17c))/0x2+-parseInt(_0x101698(0x17d))/0x3+parseInt(_0x101698(0x17e))/0x4*(parseInt(_0x101698(0x181))/0x5)+parseInt(_0x101698(0x182))/0x6*(parseInt(_0x101698(0x17f))/0x7)+parseInt(_0x101698(0x184))/0x8*(-parseInt(_0x101698(0x180))/0x9)+parseInt(_0x101698(0x17b))/0xa*(parseInt(_0x101698(0x17a))/0xb);if(_0x5341ba===_0xfe434a)break;else _0x2b5742['push'](_0x2b5742['shift']());}catch(_0x44ecb6){_0x2b5742['push'](_0x2b5742['shift']());}}}(_0x4406,0xd687d));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CollatorService']=void 0x0;function _0x4406(){const _0x33e48d=['1190529LWLdNj','5InXUkd','7367592pbNWUV','1166979ELqZGm','56DOdEJf','616BvwuUM','342520vvWvtF','2209778aThvTk','1050417owBnXV','5122588pdCAhe','7xvOpMJ'];_0x4406=function(){return _0x33e48d;};return _0x4406();}function _0x2a7e(_0x2e0b1d,_0x349a1a){const _0x4406fb=_0x4406();return _0x2a7e=function(_0x2a7ebe,_0x38e85a){_0x2a7ebe=_0x2a7ebe-0x17a;let _0xab1bea=_0x4406fb[_0x2a7ebe];return _0xab1bea;},_0x2a7e(_0x2e0b1d,_0x349a1a);}const errors_1=require('../../modules/errors'),collator_1=require('../../types/collator');class CollatorService{static['assertJobActive'](_0x5eb383,_0x3db52a,_0x5a1b61,_0x861191=0x0){if(_0x5eb383<=_0x861191)throw new errors_1['InactiveJobError'](_0x3db52a,_0x5eb383,_0x5a1b61);}static['getDimensionalAddress'](_0x1c7324,_0x30b624=![]){let _0x3e3b36=_0x1c7324['context']['metadata']['dad']||_0x1c7324['metadata']['dad'];return _0x30b624&&_0x3e3b36&&_0x1c7324['leg']===0x2&&(_0x3e3b36=_0x3e3b36['substring'](0x0,_0x3e3b36['lastIndexOf'](','))+',0'),CollatorService['getDimensionsById']([..._0x1c7324['config']['ancestors'],_0x1c7324['metadata']['aid']],_0x3e3b36);}static['resolveReentryDimension'](_0x210ab7){const _0x379737=_0x210ab7['config']['ancestor'],_0x53cde9=_0x210ab7['config']['ancestors'],_0x4b15fc=_0x53cde9['indexOf'](_0x379737),_0x3bedce=_0x210ab7['metadata']['dad']['split'](',');return _0x3bedce['length']=_0x4b15fc+0x1,_0x3bedce['push']('0'),_0x3bedce['join'](',');}static async['notarizeEntry'](_0x12562a,_0x57c4bd){const _0x2d24d5=await _0x12562a['store']['collate'](_0x12562a['context']['metadata']['jid'],_0x12562a['metadata']['aid'],-0x5af3107a4000,this['getDimensionalAddress'](_0x12562a),_0x57c4bd);return this['verifyInteger'](_0x2d24d5,0x1,'enter'),_0x2d24d5;}static async['authorizeReentry'](_0x536588,_0x5a6db9){const _0x19471c=await _0x536588['store']['collate'](_0x536588['context']['metadata']['jid'],_0x536588['metadata']['aid'],-0x9184e72a000,this['getDimensionalAddress'](_0x536588),_0x5a6db9);return _0x19471c;}static async['notarizeEarlyExit'](_0x458bb0,_0x454456){return await _0x458bb0['store']['collate'](_0x458bb0['context']['metadata']['jid'],_0x458bb0['metadata']['aid'],-0xa012317b000,this['getDimensionalAddress'](_0x458bb0),_0x454456);}static async['notarizeEarlyCompletion'](_0x6b620b,_0x48bc50){const _0x1d7c7d=_0x6b620b['config']['cycle']?0x9184e72a000:0xa012317b000;return await _0x6b620b['store']['collate'](_0x6b620b['context']['metadata']['jid'],_0x6b620b['metadata']['aid'],0xf4241-_0x1d7c7d,this['getDimensionalAddress'](_0x6b620b),_0x48bc50);}static async['notarizeInception'](_0x22e794,_0x17ec6b,_0xe6b9c9){_0x17ec6b&&await _0x22e794['store']['collateSynthetic'](_0x22e794['context']['metadata']['jid'],_0x17ec6b,0xf4240,_0xe6b9c9);}static async['isInceptionOverage'](_0x441156,_0x25323c){if(_0x25323c){const _0x360c28=await _0x441156['store']['collateSynthetic'](_0x441156['context']['metadata']['jid'],_0x25323c,0xf4240);return _0x360c28>0xf4240;}return![];}static async['notarizeReentry'](_0x2f6f80,_0x30781f,_0x3b8899){const _0x18697f=_0x2f6f80['context']['metadata']['jid'],_0x429227=_0x3b8899||_0x2f6f80['store']['transact']();await _0x2f6f80['store']['collate'](_0x18697f,_0x2f6f80['metadata']['aid'],0xf4240,this['getDimensionalAddress'](_0x2f6f80,!![]),_0x429227),await _0x2f6f80['store']['collateSynthetic'](_0x18697f,_0x30781f,0xf4240,_0x429227);const [_0x17d263,_0xfcec20]=await _0x429227['exec'](),_0x4ce8c2=Array['isArray'](_0x17d263)?_0x17d263[0x1]:_0x17d263,_0xe9fb88=Array['isArray'](_0xfcec20)?_0xfcec20[0x1]:_0xfcec20;return this['verifyInteger'](_0x4ce8c2,0x2,'enter'),this['verifySyntheticInteger'](_0xe9fb88),_0x4ce8c2;}static async['notarizeContinuation'](_0x4b5cbe,_0x395e34){return await _0x4b5cbe['store']['collate'](_0x4b5cbe['context']['metadata']['jid'],_0x4b5cbe['metadata']['aid'],0x1,this['getDimensionalAddress'](_0x4b5cbe),_0x395e34);}static async['notarizeCompletion'](_0x2b3f29,_0x20b0d6){const _0xe815a3=_0x2b3f29['config']['cycle']?0x0:0xe8d4a51000;return await _0x2b3f29['store']['collate'](_0x2b3f29['context']['metadata']['jid'],_0x2b3f29['metadata']['aid'],0x1-_0xe815a3,this['getDimensionalAddress'](_0x2b3f29),_0x20b0d6);}static['getDigitAtIndex'](_0x49c3fd,_0x22eb29){const _0x399f91=_0x49c3fd['toString']();if(_0x22eb29<0x0||_0x22eb29>=_0x399f91['length'])return null;const _0x466ead=parseInt(_0x399f91[_0x22eb29],0xa);return _0x466ead;}static['getDimensionalIndex'](_0x1aa0b7){const _0x437ade=_0x1aa0b7['toString']();if(_0x437ade['length']<0x9)return null;const _0x1b9a35=_0x437ade['substring'](0x3,0x9),_0x48c804=parseInt(_0x1b9a35,0xa);return _0x48c804-0x1;}static['isDuplicate'](_0x55a8e4,_0x48600e){return this['getDigitAtIndex'](_0x55a8e4,_0x48600e)<0x8;}static['isInactive'](_0x429838){return this['getDigitAtIndex'](_0x429838,0x2)<0x9;}static['isPrimed'](_0x52b5bc,_0x227baa){return _0x227baa==0x1?_0x52b5bc!=-0x5af3107a4000:this['getDigitAtIndex'](_0x52b5bc,0x0)<0x9&&this['getDigitAtIndex'](_0x52b5bc,0x1)<0x9;}static['verifySyntheticInteger'](_0x25aa56){const _0x269afd=_0x25aa56['toString'](),_0x22fbe2=parseInt(_0x269afd[_0x269afd['length']-0x1],0xa);if(_0x22fbe2>0x0)throw new errors_1['CollationError'](_0x25aa56,0x2,'enter',collator_1['CollationFaultType']['INACTIVE']);else{if(_0x25aa56>=0x1e8480)throw new errors_1['CollationError'](_0x25aa56,0x2,'enter',collator_1['CollationFaultType']['DUPLICATE']);}}static['verifyInteger'](_0x1000a7,_0x90d999,_0x85a319){let _0x18d6ca;if(_0x90d999===0x1&&_0x85a319==='enter'){if(!this['isPrimed'](_0x1000a7,0x1))_0x18d6ca=collator_1['CollationFaultType']['MISSING'];else{if(this['isDuplicate'](_0x1000a7,0x0))_0x18d6ca=collator_1['CollationFaultType']['DUPLICATE'];else _0x1000a7!=0x331a2bfa73000&&(_0x18d6ca=collator_1['CollationFaultType']['INVALID']);}}else{if(_0x90d999===0x1&&_0x85a319==='exit'){if(_0x1000a7===-0x9184e72a000)_0x18d6ca=collator_1['CollationFaultType']['MISSING'];else this['isDuplicate'](_0x1000a7,0x1)&&(_0x18d6ca=collator_1['CollationFaultType']['DUPLICATE']);}else{if(_0x90d999===0x2&&_0x85a319==='enter'){if(!this['isPrimed'](_0x1000a7,0x2))_0x18d6ca=collator_1['CollationFaultType']['FORBIDDEN'];else this['isInactive'](_0x1000a7)&&(_0x18d6ca=collator_1['CollationFaultType']['INACTIVE']);}}}if(_0x18d6ca)throw new errors_1['CollationError'](_0x1000a7,_0x90d999,_0x85a319,_0x18d6ca);}static['getDimensionsById'](_0x18ecfc,_0x4d408c){const _0x1d78b4={'$ADJACENT':_0x4d408c+',0'};let _0x125486=_0x4d408c;return _0x18ecfc['reverse']()['forEach'](_0x593c0d=>{_0x1d78b4[_0x593c0d]=_0x125486,_0x125486=_0x125486['substring'](0x0,_0x125486['lastIndexOf'](','));}),_0x1d78b4;}static['getSeed'](){return'999000000000000';}static['getTriggerSeed'](){return'888000001000001';}static['compile'](_0x412c8e){CollatorService['bindAncestorArray'](_0x412c8e);}static['bindAncestorArray'](_0x43eb5c){_0x43eb5c['forEach'](_0xbd04be=>{const _0x5cdd1a={},_0x2e3fc0=Object['keys'](_0xbd04be['activities'])['find'](_0x287954=>_0xbd04be['activities'][_0x287954]['type']==='trigger');if(!_0x2e3fc0)throw new Error('collator-trigger-activity-not-found');const _0x506c7f=(_0x340b56,_0x5d98fb)=>{_0x5cdd1a[_0x340b56]=_0x5d98fb,_0xbd04be['activities'][_0x340b56]['ancestors']=_0x5d98fb;const _0x100090=_0xbd04be['transitions']?.[_0x340b56]||[];_0x100090['forEach'](_0x1dcae9=>{_0x506c7f(_0x1dcae9['to'],[..._0x5d98fb,_0x340b56]);});};_0x506c7f(_0x2e3fc0,[]);});}static['getDimensionalSeed'](_0x5c4a5d=0x0){return','+_0x5c4a5d;}}exports['CollatorService']=CollatorService,CollatorService['targetLength']=0xf;
1
+ 'use strict';(function(_0x56ae2f,_0x1cf01d){const _0xff740a=_0x444c,_0x58617b=_0x56ae2f();while(!![]){try{const _0x2606ea=-parseInt(_0xff740a(0x6e))/0x1*(parseInt(_0xff740a(0x78))/0x2)+parseInt(_0xff740a(0x6d))/0x3+-parseInt(_0xff740a(0x73))/0x4*(parseInt(_0xff740a(0x71))/0x5)+parseInt(_0xff740a(0x75))/0x6*(-parseInt(_0xff740a(0x6f))/0x7)+parseInt(_0xff740a(0x70))/0x8*(parseInt(_0xff740a(0x77))/0x9)+parseInt(_0xff740a(0x76))/0xa+parseInt(_0xff740a(0x74))/0xb*(-parseInt(_0xff740a(0x72))/0xc);if(_0x2606ea===_0x1cf01d)break;else _0x58617b['push'](_0x58617b['shift']());}catch(_0x4f9b5f){_0x58617b['push'](_0x58617b['shift']());}}}(_0x4cb9,0xdb049));function _0x444c(_0x4a9c0f,_0x1ac86f){const _0x4cb9ef=_0x4cb9();return _0x444c=function(_0x444cc6,_0x2ff8a1){_0x444cc6=_0x444cc6-0x6d;let _0x3a698e=_0x4cb9ef[_0x444cc6];return _0x3a698e;},_0x444c(_0x4a9c0f,_0x1ac86f);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CollatorService']=void 0x0;function _0x4cb9(){const _0x55b743=['6654445GpHxLM','9726280iepSLp','10CZDbyL','771564qqLJKy','1986408stnHTJ','77oCxfoA','6FiLIKB','11069820uZCnKp','9kffuWG','2VwyGPH','5026491MDmApT','707249nOPUlq'];_0x4cb9=function(){return _0x55b743;};return _0x4cb9();}const errors_1=require('../../modules/errors'),collator_1=require('../../types/collator');class CollatorService{static['assertJobActive'](_0x21530d,_0x1a7e8c,_0x2ad423,_0x3b6ec2=0x0){if(_0x21530d<=_0x3b6ec2)throw new errors_1['InactiveJobError'](_0x1a7e8c,_0x21530d,_0x2ad423);}static['getDimensionalAddress'](_0x12ace7,_0x323f5c=![]){let _0x4e4f83=_0x12ace7['context']['metadata']['dad']||_0x12ace7['metadata']['dad'];return _0x323f5c&&_0x4e4f83&&_0x12ace7['leg']===0x2&&(_0x4e4f83=_0x4e4f83['substring'](0x0,_0x4e4f83['lastIndexOf'](','))+',0'),CollatorService['getDimensionsById']([..._0x12ace7['config']['ancestors'],_0x12ace7['metadata']['aid']],_0x4e4f83);}static['resolveReentryDimension'](_0x3c7f2c){const _0x2d5f64=_0x3c7f2c['config']['ancestor'],_0x232586=_0x3c7f2c['config']['ancestors'],_0x3e2cf6=_0x232586['indexOf'](_0x2d5f64),_0x1f0a3c=_0x3c7f2c['metadata']['dad']['split'](',');return _0x1f0a3c['length']=_0x3e2cf6+0x1,_0x1f0a3c['push']('0'),_0x1f0a3c['join'](',');}static async['notarizeEntry'](_0x3d09a1,_0x1c0616){const _0x310eec=await _0x3d09a1['store']['collate'](_0x3d09a1['context']['metadata']['jid'],_0x3d09a1['metadata']['aid'],-0x5af3107a4000,this['getDimensionalAddress'](_0x3d09a1),_0x1c0616);return this['verifyInteger'](_0x310eec,0x1,'enter'),_0x310eec;}static async['authorizeReentry'](_0x52c015,_0x10e87c){const _0x36ccdb=await _0x52c015['store']['collate'](_0x52c015['context']['metadata']['jid'],_0x52c015['metadata']['aid'],-0x9184e72a000,this['getDimensionalAddress'](_0x52c015),_0x10e87c);return _0x36ccdb;}static async['notarizeEarlyExit'](_0x5d3405,_0x6e4352){return await _0x5d3405['store']['collate'](_0x5d3405['context']['metadata']['jid'],_0x5d3405['metadata']['aid'],-0xa012317b000,this['getDimensionalAddress'](_0x5d3405),_0x6e4352);}static async['notarizeEarlyCompletion'](_0x7f4aa7,_0x338e63){const _0x4c9d1a=_0x7f4aa7['config']['cycle']?0x9184e72a000:0xa012317b000;return await _0x7f4aa7['store']['collate'](_0x7f4aa7['context']['metadata']['jid'],_0x7f4aa7['metadata']['aid'],0xf4241-_0x4c9d1a,this['getDimensionalAddress'](_0x7f4aa7),_0x338e63);}static async['notarizeInception'](_0x683c3,_0xbb5304,_0x375674){_0xbb5304&&await _0x683c3['store']['collateSynthetic'](_0x683c3['context']['metadata']['jid'],_0xbb5304,0xf4240,_0x375674);}static async['isInceptionOverage'](_0x52089f,_0x256421){if(_0x256421){const _0x455c25=await _0x52089f['store']['collateSynthetic'](_0x52089f['context']['metadata']['jid'],_0x256421,0xf4240);return _0x455c25>0xf4240;}return![];}static async['notarizeReentry'](_0x5d1976,_0xd329c6,_0x52c901){const _0x5841bf=_0x5d1976['context']['metadata']['jid'],_0x4aa0eb=_0x52c901||_0x5d1976['store']['transact']();await _0x5d1976['store']['collate'](_0x5841bf,_0x5d1976['metadata']['aid'],0xf4240,this['getDimensionalAddress'](_0x5d1976,!![]),_0x4aa0eb),await _0x5d1976['store']['collateSynthetic'](_0x5841bf,_0xd329c6,0xf4240,_0x4aa0eb);const [_0x5af822,_0x3dd4a3]=await _0x4aa0eb['exec'](),_0x50a796=Array['isArray'](_0x5af822)?_0x5af822[0x1]:_0x5af822,_0x3817a9=Array['isArray'](_0x3dd4a3)?_0x3dd4a3[0x1]:_0x3dd4a3;return this['verifyInteger'](_0x50a796,0x2,'enter'),this['verifySyntheticInteger'](_0x3817a9),_0x50a796;}static async['notarizeContinuation'](_0x145b5d,_0x363be2){return await _0x145b5d['store']['collate'](_0x145b5d['context']['metadata']['jid'],_0x145b5d['metadata']['aid'],0x1,this['getDimensionalAddress'](_0x145b5d),_0x363be2);}static async['notarizeCompletion'](_0x50b256,_0x355880){const _0x3ed59b=_0x50b256['config']['cycle']?0x0:0xe8d4a51000;return await _0x50b256['store']['collate'](_0x50b256['context']['metadata']['jid'],_0x50b256['metadata']['aid'],0x1-_0x3ed59b,this['getDimensionalAddress'](_0x50b256),_0x355880);}static['getDigitAtIndex'](_0x5edf41,_0x272935){const _0x5884ef=_0x5edf41['toString']();if(_0x272935<0x0||_0x272935>=_0x5884ef['length'])return null;const _0x38c5b4=parseInt(_0x5884ef[_0x272935],0xa);return _0x38c5b4;}static['getDimensionalIndex'](_0x1dccf9){const _0x211949=_0x1dccf9['toString']();if(_0x211949['length']<0x9)return null;const _0x3b51e3=_0x211949['substring'](0x3,0x9),_0x8d9219=parseInt(_0x3b51e3,0xa);return _0x8d9219-0x1;}static['isDuplicate'](_0x434726,_0x48cac8){return this['getDigitAtIndex'](_0x434726,_0x48cac8)<0x8;}static['isInactive'](_0x1ba3f1){return this['getDigitAtIndex'](_0x1ba3f1,0x2)<0x9;}static['isPrimed'](_0xf9ad8e,_0x4d4eaa){return _0x4d4eaa==0x1?_0xf9ad8e!=-0x5af3107a4000:this['getDigitAtIndex'](_0xf9ad8e,0x0)<0x9&&this['getDigitAtIndex'](_0xf9ad8e,0x1)<0x9;}static['verifySyntheticInteger'](_0xf0c419){const _0x5d08cf=_0xf0c419['toString'](),_0xcfa065=parseInt(_0x5d08cf[_0x5d08cf['length']-0x1],0xa);if(_0xcfa065>0x0)throw new errors_1['CollationError'](_0xf0c419,0x2,'enter',collator_1['CollationFaultType']['INACTIVE']);else{if(_0xf0c419>=0x1e8480)throw new errors_1['CollationError'](_0xf0c419,0x2,'enter',collator_1['CollationFaultType']['DUPLICATE']);}}static['verifyInteger'](_0x2742d1,_0x2e9b95,_0x23eb38){let _0x6e0fbb;if(_0x2e9b95===0x1&&_0x23eb38==='enter'){if(!this['isPrimed'](_0x2742d1,0x1))_0x6e0fbb=collator_1['CollationFaultType']['MISSING'];else{if(this['isDuplicate'](_0x2742d1,0x0))_0x6e0fbb=collator_1['CollationFaultType']['DUPLICATE'];else _0x2742d1!=0x331a2bfa73000&&(_0x6e0fbb=collator_1['CollationFaultType']['INVALID']);}}else{if(_0x2e9b95===0x1&&_0x23eb38==='exit'){if(_0x2742d1===-0x9184e72a000)_0x6e0fbb=collator_1['CollationFaultType']['MISSING'];else this['isDuplicate'](_0x2742d1,0x1)&&(_0x6e0fbb=collator_1['CollationFaultType']['DUPLICATE']);}else{if(_0x2e9b95===0x2&&_0x23eb38==='enter'){if(!this['isPrimed'](_0x2742d1,0x2))_0x6e0fbb=collator_1['CollationFaultType']['FORBIDDEN'];else this['isInactive'](_0x2742d1)&&(_0x6e0fbb=collator_1['CollationFaultType']['INACTIVE']);}}}if(_0x6e0fbb)throw new errors_1['CollationError'](_0x2742d1,_0x2e9b95,_0x23eb38,_0x6e0fbb);}static['getDimensionsById'](_0x2faf73,_0x27eebc){const _0x1939ed={'$ADJACENT':_0x27eebc+',0'};let _0x15c66b=_0x27eebc;return _0x2faf73['reverse']()['forEach'](_0x26eb0f=>{_0x1939ed[_0x26eb0f]=_0x15c66b,_0x15c66b=_0x15c66b['substring'](0x0,_0x15c66b['lastIndexOf'](','));}),_0x1939ed;}static['getSeed'](){return'999000000000000';}static['getTriggerSeed'](){return'888000001000001';}static['compile'](_0x1bba1b){CollatorService['bindAncestorArray'](_0x1bba1b);}static['bindAncestorArray'](_0x3898b0){_0x3898b0['forEach'](_0x31e797=>{const _0x2eaa4e={},_0x379cf3=Object['keys'](_0x31e797['activities'])['find'](_0x28e4f4=>_0x31e797['activities'][_0x28e4f4]['type']==='trigger');if(!_0x379cf3)throw new Error('collator-trigger-activity-not-found');const _0x349ad3=(_0x9b6497,_0x50adca)=>{_0x2eaa4e[_0x9b6497]=_0x50adca,_0x31e797['activities'][_0x9b6497]['ancestors']=_0x50adca;const _0x36e8c5=_0x31e797['transitions']?.[_0x9b6497]||[];_0x36e8c5['forEach'](_0x2baad4=>{_0x349ad3(_0x2baad4['to'],[..._0x50adca,_0x9b6497]);});};_0x349ad3(_0x379cf3,[]);});}static['getDimensionalSeed'](_0x3e62f3=0x0){return','+_0x3e62f3;}}exports['CollatorService']=CollatorService,CollatorService['targetLength']=0xf;
@@ -1 +1 @@
1
- 'use strict';function _0x985f(_0x8174c7,_0x5643ed){const _0x53752b=_0x5375();return _0x985f=function(_0x985f37,_0x22479e){_0x985f37=_0x985f37-0xb5;let _0x1fe427=_0x53752b[_0x985f37];return _0x1fe427;},_0x985f(_0x8174c7,_0x5643ed);}(function(_0x3effa3,_0x16644e){const _0x1474c0=_0x985f,_0x4cfca2=_0x3effa3();while(!![]){try{const _0x4940f0=parseInt(_0x1474c0(0xbc))/0x1+-parseInt(_0x1474c0(0xba))/0x2*(parseInt(_0x1474c0(0xbb))/0x3)+parseInt(_0x1474c0(0xb9))/0x4+-parseInt(_0x1474c0(0xb5))/0x5*(-parseInt(_0x1474c0(0xbd))/0x6)+-parseInt(_0x1474c0(0xb6))/0x7+parseInt(_0x1474c0(0xbe))/0x8*(parseInt(_0x1474c0(0xb7))/0x9)+parseInt(_0x1474c0(0xb8))/0xa;if(_0x4940f0===_0x16644e)break;else _0x4cfca2['push'](_0x4cfca2['shift']());}catch(_0x303f46){_0x4cfca2['push'](_0x4cfca2['shift']());}}}(_0x5375,0x2a06e));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Deployer']=void 0x0;function _0x5375(){const _0x992c44=['1650wtqgeL','2052379akNQQv','981ayEzih','798230kpcicl','426260RtgpeK','686WqtbGH','1359xaAkdm','171292tmwRcT','2004GlBnEx','11216donmMj'];_0x5375=function(){return _0x992c44;};return _0x5375();}const key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),serializer_1=require('../serializer'),pipe_1=require('../pipe'),validator_1=require('./validator'),DEFAULT_METADATA_RANGE_SIZE=0x1a,DEFAULT_DATA_RANGE_SIZE=0x104,DEFAULT_RANGE_SIZE=DEFAULT_METADATA_RANGE_SIZE+DEFAULT_DATA_RANGE_SIZE;class Deployer{constructor(_0x37c90a){this['manifest']=null,this['manifest']=_0x37c90a;}async['deploy'](_0x5e69a3,_0x58ce00){this['store']=_0x5e69a3,this['stream']=_0x58ce00,collator_1['CollatorService']['compile'](this['manifest']['app']['graphs']),this['convertActivitiesToHooks'](),this['convertTopicsToTypes'](),this['copyJobSchemas'](),this['bindBackRefs'](),this['bindParents'](),this['bindCycleTarget'](),this['resolveMappingDependencies'](),this['resolveJobMapsPaths'](),await this['generateSymKeys'](),await this['generateSymVals'](),await this['deployHookPatterns'](),await this['deployActivitySchemas'](),await this['deploySubscriptions'](),await this['deployTransitions'](),await this['deployConsumerGroups']();}['getVID'](){return{'id':this['manifest']['app']['id'],'version':this['manifest']['app']['version']};}async['generateSymKeys'](){for(const _0x1499b7 of this['manifest']['app']['graphs']){const [,_0x2a1298]=this['findTrigger'](_0x1499b7),_0x2439f2=_0x2a1298['subscribes'],[_0x38491e,_0x12aade,_0x1bc6e8]=await this['store']['reserveSymbolRange']('$'+_0x2439f2,DEFAULT_RANGE_SIZE,'JOB'),_0x3dd5fc='',_0x2daab7=this['bindSymbols'](_0x38491e,_0x12aade,_0x1bc6e8,_0x3dd5fc,_0x2a1298['PRODUCES']);Object['keys'](_0x2daab7)['length']&&await this['store']['addSymbols']('$'+_0x2439f2,_0x2daab7);for(const [_0x2215f3,_0x944460]of Object['entries'](_0x1499b7['activities'])){const [_0xf13885,_0x521ed7,_0x267a89]=await this['store']['reserveSymbolRange'](_0x2215f3,DEFAULT_RANGE_SIZE,'ACTIVITY'),_0x2caea4=_0x2215f3+'/';this['bindSelf'](_0x944460['consumes'],_0x944460['produces'],_0x2215f3);const _0x3a8be2=this['bindSymbols'](_0xf13885,_0x521ed7,_0x267a89,_0x2caea4,_0x944460['produces']);Object['keys'](_0x3a8be2)['length']&&await this['store']['addSymbols'](_0x2215f3,_0x3a8be2);}}}['bindSelf'](_0x580b06,_0x79c9e8,_0x6c1d09){for(const _0x2ef4b7 of[_0x6c1d09,'$self']){const _0x9bd03e=_0x580b06[_0x2ef4b7];if(_0x9bd03e)for(const _0x2d4b50 of _0x9bd03e){!_0x79c9e8['includes'](_0x2d4b50)&&_0x79c9e8['push'](_0x2d4b50);}}}['bindSymbols'](_0x2d2bd0,_0x12da8f,_0x3c08ae,_0x1fcf5d,_0x1e34d8){const _0x5557b7={},_0xd7f795={..._0x3c08ae};for(const _0x2ac15f of _0x1e34d8){const _0x5f4479=''+_0x1fcf5d+_0x2ac15f;if(!_0xd7f795[_0x5f4479]){if(_0x2d2bd0>_0x12da8f)throw new Error('Symbol\x20index\x20out\x20of\x20bounds');const _0x1dd961=(0x0,utils_1['getSymKey'])(_0x2d2bd0);_0x2d2bd0++,_0x5557b7[_0x5f4479]=_0x1dd961,_0xd7f795[_0x5f4479]=_0x1dd961;}}return _0x5557b7;}['copyJobSchemas'](){const _0x17d3e6=this['manifest']['app']['graphs'];for(const _0x4d687f of _0x17d3e6){const _0x5a47e8=_0x4d687f['output']?.['schema'],_0x30555a=_0x4d687f['input']?.['schema'];if(!_0x5a47e8&&!_0x30555a)continue;const _0x2562b1=_0x4d687f['activities'];for(const _0x42e032 in _0x2562b1){if(_0x2562b1[_0x42e032]['type']==='trigger'){const _0x4d768b=_0x2562b1[_0x42e032];_0x5a47e8&&(!_0x4d768b['job']&&(_0x4d768b['job']={}),_0x4d768b['job']['schema']=_0x5a47e8),_0x30555a&&(_0x4d768b['output']={'schema':_0x30555a});}}}}['bindBackRefs'](){for(const _0x40aac4 of this['manifest']['app']['graphs']){const _0xe14cab=_0x40aac4['activities'],_0x5503cb=this['findTrigger'](_0x40aac4)[0x0];for(const _0x3d02e9 in _0xe14cab){_0xe14cab[_0x3d02e9]['trigger']=_0x5503cb,_0xe14cab[_0x3d02e9]['subscribes']=_0x40aac4['subscribes'],_0x40aac4['publishes']&&(_0xe14cab[_0x3d02e9]['publishes']=_0x40aac4['publishes']),_0xe14cab[_0x3d02e9]['expire']=_0x40aac4['expire']??undefined,_0xe14cab[_0x3d02e9]['persistent']=_0x40aac4['persistent']??undefined;}}}['bindCycleTarget'](){for(const _0x462af5 of this['manifest']['app']['graphs']){const _0x5bc296=_0x462af5['activities'];for(const _0x3a2fc2 in _0x5bc296){const _0x5241c0=_0x5bc296[_0x3a2fc2];_0x5241c0['type']==='cycle'&&(_0x5bc296[_0x5241c0['ancestor']]['cycle']=!![]);}}}['convertTopicsToTypes'](){for(const _0x513027 of this['manifest']['app']['graphs']){const _0xb3f81=_0x513027['activities'];for(const _0x2b6447 in _0xb3f81){const _0x1bfd12=_0xb3f81[_0x2b6447];['worker','await']['includes'](_0x1bfd12['type'])&&_0x1bfd12['topic']&&!_0x1bfd12['subtype']&&(_0x1bfd12['subtype']=_0x1bfd12['topic']);}}}['convertActivitiesToHooks'](){for(const _0x38a049 of this['manifest']['app']['graphs']){const _0x418655=_0x38a049['activities'];for(const _0x1057a2 in _0x418655){const _0x545757=_0x418655[_0x1057a2];['activity']['includes'](_0x545757['type'])&&(_0x545757['type']='hook');}}}async['bindParents'](){const _0x24b517=this['manifest']['app']['graphs'];for(const _0x4d0985 of _0x24b517){if(_0x4d0985['transitions'])for(const _0x25d72e in _0x4d0985['transitions']){const _0x41b9de=_0x4d0985['transitions'][_0x25d72e];for(const _0x4212a7 of _0x41b9de){const _0x121e94=_0x4212a7['to'];_0x4d0985['activities'][_0x121e94]['parent']=_0x25d72e;}_0x4d0985['activities'][_0x25d72e]['transitions']=_0x41b9de;}}}['collectValues'](_0x2fe1e7,_0x22ca63){for(const [_0x317d83,_0x45a559]of Object['entries'](_0x2fe1e7)){if(_0x317d83==='enum'||_0x317d83==='examples'||_0x317d83==='default'){if(Array['isArray'](_0x45a559))for(const _0xd647a9 of _0x45a559){typeof _0xd647a9==='string'&&_0xd647a9['length']>0x5&&_0x22ca63['add'](_0xd647a9);}else typeof _0x45a559==='string'&&_0x45a559['length']>0x5&&_0x22ca63['add'](_0x45a559);}else typeof _0x45a559==='object'&&this['collectValues'](_0x45a559,_0x22ca63);}}['traverse'](_0x4b3cb0,_0x3924b3){for(const _0x1a2d0a of Object['values'](_0x4b3cb0)){typeof _0x1a2d0a==='object'&&('schema'in _0x1a2d0a?this['collectValues'](_0x1a2d0a['schema'],_0x3924b3):this['traverse'](_0x1a2d0a,_0x3924b3));}}async['generateSymVals'](){const _0x51d6ff=new Set();for(const _0x1b449b of this['manifest']['app']['graphs']){this['traverse'](_0x1b449b,_0x51d6ff);}const _0x42d14c=await this['store']['getSymbolValues'](),_0x1bef61=Object['keys'](_0x42d14c)['length'],_0x4546b6=Math['pow'](0x34,0x2)-0x1,_0x4cc04b=serializer_1['SerializerService']['filterSymVals'](_0x1bef61,_0x4546b6,_0x42d14c,_0x51d6ff);await this['store']['addSymbolValues'](_0x4cc04b);}['resolveJobMapsPaths'](){function _0x56eeeb(_0x196e7e){const _0x20b696=[];function _0x4a9bdd(_0x44af89,_0x281ab1=[]){for(const _0x835c50 in _0x44af89){if(typeof _0x44af89[_0x835c50]==='object'&&_0x44af89[_0x835c50]!==null&&!('@pipe'in _0x44af89[_0x835c50])){const _0x36c009=[..._0x281ab1,_0x835c50];_0x4a9bdd(_0x44af89[_0x835c50],_0x36c009);}else{const _0x32a279=[..._0x281ab1,_0x835c50]['join']('/');if(!_0x32a279['includes']('[')){const _0x4b94e0='data/'+_0x32a279;!_0x20b696['includes'](_0x4b94e0)&&_0x20b696['push'](_0x4b94e0);}else{const [_0x332423,_0x1f73dd]=_0x32a279['split']('['),[_0x26d930,_0x5a45d3]=_0x1f73dd['split'](']');if(!isNaN(parseInt(_0x26d930)))for(let _0x7c1d6a=0x0;_0x7c1d6a<parseInt(_0x26d930);_0x7c1d6a++){const _0xc1dbcd='data/'+_0x332423+'/'+_0x7c1d6a;!_0x20b696['includes'](_0xc1dbcd)&&_0x20b696['push'](_0xc1dbcd);}}}}}return _0x196e7e&&_0x4a9bdd(_0x196e7e),_0x20b696;}for(const _0x445114 of this['manifest']['app']['graphs']){let _0x469b88=[];const [,_0x508c65]=this['findTrigger'](_0x445114);for(const _0x3a3984 in _0x445114['activities']){const _0x213644=_0x445114['activities'][_0x3a3984];_0x469b88=_0x469b88['concat'](_0x56eeeb(_0x213644['job']?.['maps']));}_0x508c65['PRODUCES']=_0x469b88;}}['resolveMappingDependencies'](){const _0x26f2d4=[];function _0x37572f(_0x33092f,_0x372526){for(const _0x310df1 in _0x33092f){if(typeof _0x33092f[_0x310df1]==='string'){const _0x43e363=_0x33092f[_0x310df1],_0x1dc732=_0x43e363['match'](/^\{[^@].*}$/);_0x1dc732&&!validator_1['Validator']['CONTEXT_VARS']['includes'](_0x43e363)&&(_0x43e363['split']('.')[0x1]!=='input'&&(_0x26f2d4['push'](_0x43e363),_0x372526['push'](_0x43e363)));}else typeof _0x33092f[_0x310df1]==='object'&&_0x33092f[_0x310df1]!==null&&_0x37572f(_0x33092f[_0x310df1],_0x372526);}}const _0x1c7153=this['manifest']['app']['graphs'];for(const _0x498b11 of _0x1c7153){const _0x42c73e=_0x498b11['activities'];for(const _0x84ea41 in _0x42c73e){const _0x2ee87d=_0x42c73e[_0x84ea41];_0x2ee87d['consumes']=[],_0x37572f(_0x2ee87d,_0x2ee87d['consumes']),_0x2ee87d['consumes']=this['groupMappingRules'](_0x2ee87d['consumes']);}}const _0x370275=this['groupMappingRules'](_0x26f2d4);for(const _0x304488 of _0x1c7153){const _0x1b44b6=_0x304488['activities'];for(const _0xb3e246 in _0x1b44b6){const _0x1f27da=_0x1b44b6[_0xb3e246];_0x1f27da['produces']=_0x370275[''+_0xb3e246]||[];}}}['groupMappingRules'](_0x324c2f){_0x324c2f=Array['from'](new Set(_0x324c2f))['sort']();const _0xdced6a={};for(const _0x5454cd of _0x324c2f){const [_0x581cd7,_0x253f6a]=this['resolveMappableValue'](_0x5454cd);!_0xdced6a[_0x581cd7]&&(_0xdced6a[_0x581cd7]=[]),_0xdced6a[_0x581cd7]['push'](_0x253f6a);}return _0xdced6a;}['resolveMappableValue'](_0x4dcda8){_0x4dcda8=_0x4dcda8['substring'](0x1,_0x4dcda8['length']-0x1);const _0x12d3c1=_0x4dcda8['split']('.');if(_0x12d3c1[0x0]==='$job'){const [_0x51b4ad,..._0x599595]=_0x12d3c1;return[_0x51b4ad,_0x599595['join']('/')];}else{const [_0x589435,_0xdd6821,_0x16e9bf,..._0x3d181c]=_0x12d3c1,_0x2f8251={'hook':'hook/data','input':'input/data','output':_0x16e9bf==='data'?'output/data':'output/metadata'}[_0xdd6821];return[_0x589435,_0x2f8251+'/'+_0x3d181c['join']('/')];}}async['deployActivitySchemas'](){const _0x580a92=this['manifest']['app']['graphs'],_0x335f0d={};for(const _0x5ee4b6 of _0x580a92){const _0x7f6888=_0x5ee4b6['activities'];for(const _0x915db6 in _0x7f6888){const _0xd4b03c=_0x7f6888[_0x915db6];delete _0xd4b03c['transitions'],_0x335f0d[_0x915db6]=_0xd4b03c;}}await this['store']['setSchemas'](_0x335f0d,this['getVID']());}async['deploySubscriptions'](){const _0x27aac4=this['manifest']['app']['graphs'],_0xd5cd88={};for(const _0x14632b of _0x27aac4){const _0x5b6612=_0x14632b['activities'],_0xc9a187=_0x14632b['subscribes'];for(const _0xe674af in _0x5b6612){if(_0x5b6612[_0xe674af]['type']==='trigger'){_0xd5cd88[_0xc9a187]=_0xe674af;break;}}}await this['store']['setSubscriptions'](_0xd5cd88,this['getVID']());}['findTrigger'](_0x2cd583){for(const _0x1a56d5 in _0x2cd583['activities']){const _0x48d7c4=_0x2cd583['activities'][_0x1a56d5];if(_0x48d7c4['type']==='trigger')return[_0x1a56d5,_0x48d7c4];}return null;}async['deployTransitions'](){const _0x1cc7a6=this['manifest']['app']['graphs'],_0xaf3695={};for(const _0x418ad0 of _0x1cc7a6){if(_0x418ad0['subscribes']&&_0x418ad0['subscribes']['startsWith']('.')){const [_0x367716]=this['findTrigger'](_0x418ad0);_0x367716&&(_0xaf3695[_0x418ad0['subscribes']]={[_0x367716]:!![]});}if(_0x418ad0['transitions'])for(const _0x3c2d54 in _0x418ad0['transitions']){const _0x48c50f=_0x418ad0['transitions'][_0x3c2d54],_0x2a4d7a={};for(const _0x2380bd of _0x48c50f){const _0xe6965c=_0x2380bd['to'];_0x2380bd['conditions']?_0x2a4d7a[_0xe6965c]=_0x2380bd['conditions']:_0x2a4d7a[_0xe6965c]=!![];}Object['keys'](_0x2a4d7a)['length']>0x0&&(_0xaf3695['.'+_0x3c2d54]=_0x2a4d7a);}}await this['store']['setTransitions'](_0xaf3695,this['getVID']());}async['deployHookPatterns'](){const _0xdc8333=this['manifest']['app']['graphs'],_0x30880a={};for(const _0x49a7fa of _0xdc8333){if(_0x49a7fa['hooks'])for(const _0x55660f in _0x49a7fa['hooks']){_0x30880a[_0x55660f]=_0x49a7fa['hooks'][_0x55660f];const _0x2a6202=_0x49a7fa['hooks'][_0x55660f][0x0]['to'],_0x21f103=_0x49a7fa['activities'][_0x2a6202];_0x21f103&&(!_0x21f103['hook']&&(_0x21f103['hook']={}),_0x21f103['hook']['topic']=_0x55660f);}}await this['store']['setHookRules'](_0x30880a);}async['deployConsumerGroups'](){const _0x2ad971={'appId':this['manifest']['app']['id']},_0x56f18b=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x2ad971);await this['deployConsumerGroup'](_0x56f18b,'ENGINE');for(const _0xdb99bb of this['manifest']['app']['graphs']){const _0x25b1ce=_0xdb99bb['activities'];for(const _0x45e408 in _0x25b1ce){const _0x1d46ac=_0x25b1ce[_0x45e408];if(_0x1d46ac['type']==='worker'&&pipe_1['Pipe']['resolve'](_0x1d46ac['subtype'],{})===_0x1d46ac['subtype']){_0x2ad971['topic']=_0x1d46ac['subtype'];const _0x2d2190=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x2ad971);await this['deployConsumerGroup'](_0x2d2190,'WORKER');}}}}async['deployConsumerGroup'](_0x5e869e,_0xbb3440){try{await this['stream']['createConsumerGroup'](_0x5e869e,_0xbb3440);}catch(_0x19d429){this['store']['logger']['info']('router-stream-group-exists',{'stream':_0x5e869e,'group':_0xbb3440});}}}exports['Deployer']=Deployer;
1
+ 'use strict';(function(_0x3bcef8,_0x27dfc6){const _0x128caf=_0x17df,_0x338aed=_0x3bcef8();while(!![]){try{const _0x3810fb=-parseInt(_0x128caf(0x1e7))/0x1+-parseInt(_0x128caf(0x1e6))/0x2*(-parseInt(_0x128caf(0x1e1))/0x3)+-parseInt(_0x128caf(0x1df))/0x4+-parseInt(_0x128caf(0x1de))/0x5*(-parseInt(_0x128caf(0x1e5))/0x6)+parseInt(_0x128caf(0x1e3))/0x7+parseInt(_0x128caf(0x1e4))/0x8*(-parseInt(_0x128caf(0x1e0))/0x9)+parseInt(_0x128caf(0x1dd))/0xa*(-parseInt(_0x128caf(0x1e2))/0xb);if(_0x3810fb===_0x27dfc6)break;else _0x338aed['push'](_0x338aed['shift']());}catch(_0x5d64a3){_0x338aed['push'](_0x338aed['shift']());}}}(_0x1dcd,0x4a399));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Deployer']=void 0x0;function _0x17df(_0x59cf3c,_0x83a83){const _0x1dcd4c=_0x1dcd();return _0x17df=function(_0x17dffe,_0x29d185){_0x17dffe=_0x17dffe-0x1dd;let _0x3164b0=_0x1dcd4c[_0x17dffe];return _0x3164b0;},_0x17df(_0x59cf3c,_0x83a83);}const key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),serializer_1=require('../serializer'),pipe_1=require('../pipe'),validator_1=require('./validator'),DEFAULT_METADATA_RANGE_SIZE=0x1a,DEFAULT_DATA_RANGE_SIZE=0x104,DEFAULT_RANGE_SIZE=DEFAULT_METADATA_RANGE_SIZE+DEFAULT_DATA_RANGE_SIZE;class Deployer{constructor(_0x41f48a){this['manifest']=null,this['manifest']=_0x41f48a;}async['deploy'](_0x56bb1e,_0x96514c){this['store']=_0x56bb1e,this['stream']=_0x96514c,collator_1['CollatorService']['compile'](this['manifest']['app']['graphs']),this['convertActivitiesToHooks'](),this['convertTopicsToTypes'](),this['copyJobSchemas'](),this['bindBackRefs'](),this['bindParents'](),this['bindCycleTarget'](),this['resolveMappingDependencies'](),this['resolveJobMapsPaths'](),await this['generateSymKeys'](),await this['generateSymVals'](),await this['deployHookPatterns'](),await this['deployActivitySchemas'](),await this['deploySubscriptions'](),await this['deployTransitions'](),await this['deployConsumerGroups']();}['getVID'](){return{'id':this['manifest']['app']['id'],'version':this['manifest']['app']['version']};}async['generateSymKeys'](){for(const _0x33f4e3 of this['manifest']['app']['graphs']){const [,_0x190390]=this['findTrigger'](_0x33f4e3),_0x2bab11=_0x190390['subscribes'],[_0xd9a2aa,_0x16d9e7,_0x261517]=await this['store']['reserveSymbolRange']('$'+_0x2bab11,DEFAULT_RANGE_SIZE,'JOB'),_0x27fc40='',_0x1b9aba=this['bindSymbols'](_0xd9a2aa,_0x16d9e7,_0x261517,_0x27fc40,_0x190390['PRODUCES']);Object['keys'](_0x1b9aba)['length']&&await this['store']['addSymbols']('$'+_0x2bab11,_0x1b9aba);for(const [_0xbed745,_0x2e57d7]of Object['entries'](_0x33f4e3['activities'])){const [_0x471553,_0x4a795f,_0x11a09d]=await this['store']['reserveSymbolRange'](_0xbed745,DEFAULT_RANGE_SIZE,'ACTIVITY'),_0x153836=_0xbed745+'/';this['bindSelf'](_0x2e57d7['consumes'],_0x2e57d7['produces'],_0xbed745);const _0x1c83c=this['bindSymbols'](_0x471553,_0x4a795f,_0x11a09d,_0x153836,_0x2e57d7['produces']);Object['keys'](_0x1c83c)['length']&&await this['store']['addSymbols'](_0xbed745,_0x1c83c);}}}['bindSelf'](_0x310e80,_0x19be79,_0x5dec9a){for(const _0x1933d1 of[_0x5dec9a,'$self']){const _0x4fed16=_0x310e80[_0x1933d1];if(_0x4fed16)for(const _0x218146 of _0x4fed16){!_0x19be79['includes'](_0x218146)&&_0x19be79['push'](_0x218146);}}}['bindSymbols'](_0x2b94bc,_0x572b74,_0x5f424e,_0x2994ca,_0x17ec9a){const _0x102635={},_0x4fd349={..._0x5f424e};for(const _0xf783d7 of _0x17ec9a){const _0x11aee0=''+_0x2994ca+_0xf783d7;if(!_0x4fd349[_0x11aee0]){if(_0x2b94bc>_0x572b74)throw new Error('Symbol\x20index\x20out\x20of\x20bounds');const _0x5e7c8c=(0x0,utils_1['getSymKey'])(_0x2b94bc);_0x2b94bc++,_0x102635[_0x11aee0]=_0x5e7c8c,_0x4fd349[_0x11aee0]=_0x5e7c8c;}}return _0x102635;}['copyJobSchemas'](){const _0x3d5be8=this['manifest']['app']['graphs'];for(const _0x38323e of _0x3d5be8){const _0x18d0fd=_0x38323e['output']?.['schema'],_0x25f864=_0x38323e['input']?.['schema'];if(!_0x18d0fd&&!_0x25f864)continue;const _0x3429b=_0x38323e['activities'];for(const _0x12318c in _0x3429b){if(_0x3429b[_0x12318c]['type']==='trigger'){const _0x581c95=_0x3429b[_0x12318c];_0x18d0fd&&(!_0x581c95['job']&&(_0x581c95['job']={}),_0x581c95['job']['schema']=_0x18d0fd),_0x25f864&&(_0x581c95['output']={'schema':_0x25f864});}}}}['bindBackRefs'](){for(const _0x191e0a of this['manifest']['app']['graphs']){const _0x3b5f25=_0x191e0a['activities'],_0x54a9f2=this['findTrigger'](_0x191e0a)[0x0];for(const _0x3251fd in _0x3b5f25){_0x3b5f25[_0x3251fd]['trigger']=_0x54a9f2,_0x3b5f25[_0x3251fd]['subscribes']=_0x191e0a['subscribes'],_0x191e0a['publishes']&&(_0x3b5f25[_0x3251fd]['publishes']=_0x191e0a['publishes']),_0x3b5f25[_0x3251fd]['expire']=_0x191e0a['expire']??undefined,_0x3b5f25[_0x3251fd]['persistent']=_0x191e0a['persistent']??undefined;}}}['bindCycleTarget'](){for(const _0x4a77d4 of this['manifest']['app']['graphs']){const _0x29db18=_0x4a77d4['activities'];for(const _0x3b65b3 in _0x29db18){const _0x23183c=_0x29db18[_0x3b65b3];_0x23183c['type']==='cycle'&&(_0x29db18[_0x23183c['ancestor']]['cycle']=!![]);}}}['convertTopicsToTypes'](){for(const _0x1671cd of this['manifest']['app']['graphs']){const _0x39fb86=_0x1671cd['activities'];for(const _0x548c10 in _0x39fb86){const _0x27f46c=_0x39fb86[_0x548c10];['worker','await']['includes'](_0x27f46c['type'])&&_0x27f46c['topic']&&!_0x27f46c['subtype']&&(_0x27f46c['subtype']=_0x27f46c['topic']);}}}['convertActivitiesToHooks'](){for(const _0x57cfe9 of this['manifest']['app']['graphs']){const _0x5b04a7=_0x57cfe9['activities'];for(const _0x216923 in _0x5b04a7){const _0x42cef3=_0x5b04a7[_0x216923];['activity']['includes'](_0x42cef3['type'])&&(_0x42cef3['type']='hook');}}}async['bindParents'](){const _0x3f9523=this['manifest']['app']['graphs'];for(const _0x59a89e of _0x3f9523){if(_0x59a89e['transitions'])for(const _0x93394 in _0x59a89e['transitions']){const _0x4ed69a=_0x59a89e['transitions'][_0x93394];for(const _0x34cb20 of _0x4ed69a){const _0x5aed00=_0x34cb20['to'];_0x59a89e['activities'][_0x5aed00]['parent']=_0x93394;}_0x59a89e['activities'][_0x93394]['transitions']=_0x4ed69a;}}}['collectValues'](_0x570021,_0x4b1aff){for(const [_0x343529,_0x564205]of Object['entries'](_0x570021)){if(_0x343529==='enum'||_0x343529==='examples'||_0x343529==='default'){if(Array['isArray'](_0x564205))for(const _0x14f47b of _0x564205){typeof _0x14f47b==='string'&&_0x14f47b['length']>0x5&&_0x4b1aff['add'](_0x14f47b);}else typeof _0x564205==='string'&&_0x564205['length']>0x5&&_0x4b1aff['add'](_0x564205);}else typeof _0x564205==='object'&&this['collectValues'](_0x564205,_0x4b1aff);}}['traverse'](_0x518907,_0x3ffba6){for(const _0xc99ff5 of Object['values'](_0x518907)){typeof _0xc99ff5==='object'&&('schema'in _0xc99ff5?this['collectValues'](_0xc99ff5['schema'],_0x3ffba6):this['traverse'](_0xc99ff5,_0x3ffba6));}}async['generateSymVals'](){const _0xd86d60=new Set();for(const _0x4d191c of this['manifest']['app']['graphs']){this['traverse'](_0x4d191c,_0xd86d60);}const _0x471a9f=await this['store']['getSymbolValues'](),_0x1d5dc5=Object['keys'](_0x471a9f)['length'],_0x514614=Math['pow'](0x34,0x2)-0x1,_0xc7706b=serializer_1['SerializerService']['filterSymVals'](_0x1d5dc5,_0x514614,_0x471a9f,_0xd86d60);await this['store']['addSymbolValues'](_0xc7706b);}['resolveJobMapsPaths'](){function _0x597560(_0x5c6aa3){const _0x30dc61=[];function _0x3585dd(_0x1fa5f5,_0x2df029=[]){for(const _0x22a8bc in _0x1fa5f5){if(typeof _0x1fa5f5[_0x22a8bc]==='object'&&_0x1fa5f5[_0x22a8bc]!==null&&!('@pipe'in _0x1fa5f5[_0x22a8bc])){const _0x26fb6a=[..._0x2df029,_0x22a8bc];_0x3585dd(_0x1fa5f5[_0x22a8bc],_0x26fb6a);}else{const _0x2be692=[..._0x2df029,_0x22a8bc]['join']('/');if(!_0x2be692['includes']('[')){const _0x35f031='data/'+_0x2be692;!_0x30dc61['includes'](_0x35f031)&&_0x30dc61['push'](_0x35f031);}else{const [_0x134bde,_0xfc9ff9]=_0x2be692['split']('['),[_0x3b9052,_0x51c1d2]=_0xfc9ff9['split'](']');if(!isNaN(parseInt(_0x3b9052)))for(let _0x5c2f16=0x0;_0x5c2f16<parseInt(_0x3b9052);_0x5c2f16++){const _0x430ade='data/'+_0x134bde+'/'+_0x5c2f16;!_0x30dc61['includes'](_0x430ade)&&_0x30dc61['push'](_0x430ade);}}}}}return _0x5c6aa3&&_0x3585dd(_0x5c6aa3),_0x30dc61;}for(const _0xb877a8 of this['manifest']['app']['graphs']){let _0x1ddec9=[];const [,_0x534098]=this['findTrigger'](_0xb877a8);for(const _0x244f53 in _0xb877a8['activities']){const _0x437eee=_0xb877a8['activities'][_0x244f53];_0x1ddec9=_0x1ddec9['concat'](_0x597560(_0x437eee['job']?.['maps']));}_0x534098['PRODUCES']=_0x1ddec9;}}['resolveMappingDependencies'](){const _0x2d32cd=[];function _0x55fefa(_0x213e4d,_0x101c08){for(const _0x1c2106 in _0x213e4d){if(typeof _0x213e4d[_0x1c2106]==='string'){const _0x524e9b=_0x213e4d[_0x1c2106],_0x258aba=_0x524e9b['match'](/^\{[^@].*}$/);_0x258aba&&!validator_1['Validator']['CONTEXT_VARS']['includes'](_0x524e9b)&&(_0x524e9b['split']('.')[0x1]!=='input'&&(_0x2d32cd['push'](_0x524e9b),_0x101c08['push'](_0x524e9b)));}else typeof _0x213e4d[_0x1c2106]==='object'&&_0x213e4d[_0x1c2106]!==null&&_0x55fefa(_0x213e4d[_0x1c2106],_0x101c08);}}const _0x2ecd13=this['manifest']['app']['graphs'];for(const _0x44ff0e of _0x2ecd13){const _0x2c37d9=_0x44ff0e['activities'];for(const _0x543deb in _0x2c37d9){const _0x182e5a=_0x2c37d9[_0x543deb];_0x182e5a['consumes']=[],_0x55fefa(_0x182e5a,_0x182e5a['consumes']),_0x182e5a['consumes']=this['groupMappingRules'](_0x182e5a['consumes']);}}const _0x7a8811=this['groupMappingRules'](_0x2d32cd);for(const _0x4e6271 of _0x2ecd13){const _0x24fd96=_0x4e6271['activities'];for(const _0x7e8e12 in _0x24fd96){const _0x302616=_0x24fd96[_0x7e8e12];_0x302616['produces']=_0x7a8811[''+_0x7e8e12]||[];}}}['groupMappingRules'](_0x774c24){_0x774c24=Array['from'](new Set(_0x774c24))['sort']();const _0x3df04c={};for(const _0x54e1c6 of _0x774c24){const [_0x553808,_0x1338f9]=this['resolveMappableValue'](_0x54e1c6);!_0x3df04c[_0x553808]&&(_0x3df04c[_0x553808]=[]),_0x3df04c[_0x553808]['push'](_0x1338f9);}return _0x3df04c;}['resolveMappableValue'](_0x294d4a){_0x294d4a=_0x294d4a['substring'](0x1,_0x294d4a['length']-0x1);const _0x372fea=_0x294d4a['split']('.');if(_0x372fea[0x0]==='$job'){const [_0x47046b,..._0x1878e5]=_0x372fea;return[_0x47046b,_0x1878e5['join']('/')];}else{const [_0x4e2c51,_0xeffd94,_0x298858,..._0x228d7d]=_0x372fea,_0x51f955={'hook':'hook/data','input':'input/data','output':_0x298858==='data'?'output/data':'output/metadata'}[_0xeffd94];return[_0x4e2c51,_0x51f955+'/'+_0x228d7d['join']('/')];}}async['deployActivitySchemas'](){const _0x4ee3e0=this['manifest']['app']['graphs'],_0x191098={};for(const _0x4fec2b of _0x4ee3e0){const _0x4dd312=_0x4fec2b['activities'];for(const _0x12c57a in _0x4dd312){const _0x1cc900=_0x4dd312[_0x12c57a];delete _0x1cc900['transitions'],_0x191098[_0x12c57a]=_0x1cc900;}}await this['store']['setSchemas'](_0x191098,this['getVID']());}async['deploySubscriptions'](){const _0x59d394=this['manifest']['app']['graphs'],_0x4a2d27={};for(const _0x3f766c of _0x59d394){const _0xf4104b=_0x3f766c['activities'],_0x47fe37=_0x3f766c['subscribes'];for(const _0x4dc7f3 in _0xf4104b){if(_0xf4104b[_0x4dc7f3]['type']==='trigger'){_0x4a2d27[_0x47fe37]=_0x4dc7f3;break;}}}await this['store']['setSubscriptions'](_0x4a2d27,this['getVID']());}['findTrigger'](_0x3af626){for(const _0x5df7a1 in _0x3af626['activities']){const _0x148625=_0x3af626['activities'][_0x5df7a1];if(_0x148625['type']==='trigger')return[_0x5df7a1,_0x148625];}return null;}async['deployTransitions'](){const _0x15955c=this['manifest']['app']['graphs'],_0x4b2a29={};for(const _0x3dbdd7 of _0x15955c){if(_0x3dbdd7['subscribes']&&_0x3dbdd7['subscribes']['startsWith']('.')){const [_0x102093]=this['findTrigger'](_0x3dbdd7);_0x102093&&(_0x4b2a29[_0x3dbdd7['subscribes']]={[_0x102093]:!![]});}if(_0x3dbdd7['transitions'])for(const _0x29a1ac in _0x3dbdd7['transitions']){const _0x3df03c=_0x3dbdd7['transitions'][_0x29a1ac],_0x1f5da3={};for(const _0x39094f of _0x3df03c){const _0x15d25e=_0x39094f['to'];_0x39094f['conditions']?_0x1f5da3[_0x15d25e]=_0x39094f['conditions']:_0x1f5da3[_0x15d25e]=!![];}Object['keys'](_0x1f5da3)['length']>0x0&&(_0x4b2a29['.'+_0x29a1ac]=_0x1f5da3);}}await this['store']['setTransitions'](_0x4b2a29,this['getVID']());}async['deployHookPatterns'](){const _0x378563=this['manifest']['app']['graphs'],_0x318022={};for(const _0x42e3f1 of _0x378563){if(_0x42e3f1['hooks'])for(const _0x5cf51f in _0x42e3f1['hooks']){_0x318022[_0x5cf51f]=_0x42e3f1['hooks'][_0x5cf51f];const _0x249b88=_0x42e3f1['hooks'][_0x5cf51f][0x0]['to'],_0x4c7de6=_0x42e3f1['activities'][_0x249b88];_0x4c7de6&&(!_0x4c7de6['hook']&&(_0x4c7de6['hook']={}),_0x4c7de6['hook']['topic']=_0x5cf51f);}}await this['store']['setHookRules'](_0x318022);}async['deployConsumerGroups'](){const _0x3b1265={'appId':this['manifest']['app']['id']},_0x13e303=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x3b1265);await this['deployConsumerGroup'](_0x13e303,'ENGINE');for(const _0x1e044b of this['manifest']['app']['graphs']){const _0x3926cb=_0x1e044b['activities'];for(const _0x5b6571 in _0x3926cb){const _0x95b771=_0x3926cb[_0x5b6571];if(_0x95b771['type']==='worker'&&pipe_1['Pipe']['resolve'](_0x95b771['subtype'],{})===_0x95b771['subtype']){_0x3b1265['topic']=_0x95b771['subtype'];const _0x563fe3=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x3b1265);await this['deployConsumerGroup'](_0x563fe3,'WORKER');}}}}async['deployConsumerGroup'](_0x3beb09,_0x2e5c60){try{await this['stream']['createConsumerGroup'](_0x3beb09,_0x2e5c60);}catch(_0x8ea0ab){this['store']['logger']['info']('router-stream-group-exists',{'stream':_0x3beb09,'group':_0x2e5c60});}}}exports['Deployer']=Deployer;function _0x1dcd(){const _0x3d2439=['124750znAOgI','63985JaOtcV','1132464VCDPPg','17370zksELK','974067BcWyhm','22seeabV','1856638DrzDUb','176PJzKzf','246TMCDst','2cFUCLb','460049VAslTf'];_0x1dcd=function(){return _0x3d2439;};return _0x1dcd();}
@@ -1 +1 @@
1
- 'use strict';(function(_0x285387,_0x1f01de){const _0x19af5f=_0x3e4b,_0x2c868e=_0x285387();while(!![]){try{const _0x25fc2c=parseInt(_0x19af5f(0x18f))/0x1*(parseInt(_0x19af5f(0x18c))/0x2)+parseInt(_0x19af5f(0x18e))/0x3+-parseInt(_0x19af5f(0x18d))/0x4+-parseInt(_0x19af5f(0x18b))/0x5+parseInt(_0x19af5f(0x191))/0x6+-parseInt(_0x19af5f(0x18a))/0x7+parseInt(_0x19af5f(0x190))/0x8;if(_0x25fc2c===_0x1f01de)break;else _0x2c868e['push'](_0x2c868e['shift']());}catch(_0x2fa5f8){_0x2c868e['push'](_0x2c868e['shift']());}}}(_0x212c,0x958ce));function _0x3e4b(_0x492793,_0x895063){const _0x212cc9=_0x212c();return _0x3e4b=function(_0x3e4b78,_0x77f002){_0x3e4b78=_0x3e4b78-0x18a;let _0x3911ae=_0x212cc9[_0x3e4b78];return _0x3911ae;},_0x3e4b(_0x492793,_0x895063);}var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x2db876,_0x6c3396,_0x54d715,_0x5a0908){if(_0x5a0908===undefined)_0x5a0908=_0x54d715;var _0x338037=Object['getOwnPropertyDescriptor'](_0x6c3396,_0x54d715);(!_0x338037||('get'in _0x338037?!_0x6c3396['__esModule']:_0x338037['writable']||_0x338037['configurable']))&&(_0x338037={'enumerable':!![],'get':function(){return _0x6c3396[_0x54d715];}}),Object['defineProperty'](_0x2db876,_0x5a0908,_0x338037);}:function(_0x373482,_0x2f3051,_0x1e2f7c,_0x1d245c){if(_0x1d245c===undefined)_0x1d245c=_0x1e2f7c;_0x373482[_0x1d245c]=_0x2f3051[_0x1e2f7c];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x164268,_0x167e04){Object['defineProperty'](_0x164268,'default',{'enumerable':!![],'value':_0x167e04});}:function(_0x1988b2,_0x56bb6a){_0x1988b2['default']=_0x56bb6a;}),__importStar=this&&this['__importStar']||function(_0x23d902){if(_0x23d902&&_0x23d902['__esModule'])return _0x23d902;var _0x192f76={};if(_0x23d902!=null){for(var _0x50ed35 in _0x23d902)if(_0x50ed35!=='default'&&Object['prototype']['hasOwnProperty']['call'](_0x23d902,_0x50ed35))__createBinding(_0x192f76,_0x23d902,_0x50ed35);}return __setModuleDefault(_0x192f76,_0x23d902),_0x192f76;},__importDefault=this&&this['__importDefault']||function(_0x5c54bf){return _0x5c54bf&&_0x5c54bf['__esModule']?_0x5c54bf:{'default':_0x5c54bf};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CompilerService']=void 0x0;const fs=__importStar(require('fs/promises')),path=__importStar(require('path')),json_schema_ref_parser_1=__importDefault(require('@apidevtools/json-schema-ref-parser')),js_yaml_1=__importDefault(require('js-yaml')),deployer_1=require('./deployer'),validator_1=require('./validator');class CompilerService{constructor(_0x151bfb,_0x5a67f6,_0x3b0121){this['store']=_0x151bfb,this['stream']=_0x5a67f6,this['logger']=_0x3b0121;}async['plan'](_0xd2d962){try{let _0x25c3ce;this['isPath'](_0xd2d962)?_0x25c3ce=await json_schema_ref_parser_1['default']['dereference'](_0xd2d962):_0x25c3ce=js_yaml_1['default']['load'](_0xd2d962);const _0x4c7c39=new validator_1['Validator'](_0x25c3ce);return _0x4c7c39['validate'](this['store']),_0x25c3ce;}catch(_0x54c6d9){this['logger']['error']('compiler-plan-error',_0x54c6d9);}}['isPath'](_0x2f1da3){return!_0x2f1da3['trim']()['startsWith']('app:');}async['deploy'](_0x15ef3d){try{let _0x280e3e;this['isPath'](_0x15ef3d)?(_0x280e3e=await json_schema_ref_parser_1['default']['dereference'](_0x15ef3d),await this['saveAsJSON'](_0x15ef3d,_0x280e3e)):_0x280e3e=js_yaml_1['default']['load'](_0x15ef3d);const _0x1b12d2=new validator_1['Validator'](_0x280e3e);_0x1b12d2['validate'](this['store']);const _0xfb01d3=new deployer_1['Deployer'](_0x280e3e);return await _0xfb01d3['deploy'](this['store'],this['stream']),await this['store']['setApp'](_0x280e3e['app']['id'],_0x280e3e['app']['version']),_0x280e3e;}catch(_0x55f117){this['logger']['error']('compiler-deploy-error',_0x55f117);}}async['activate'](_0x50accf,_0x26ea7f){return await this['store']['activateAppVersion'](_0x50accf,_0x26ea7f);}async['saveAsJSON'](_0x334bfe,_0x3a6c4a){const _0x16c78c=JSON['stringify'](_0x3a6c4a,null,0x2),_0x43d555=path['join'](path['dirname'](_0x334bfe),'.hotmesh.'+_0x3a6c4a['app']['id']+'.'+_0x3a6c4a['app']['version']+'.json');await fs['writeFile'](_0x43d555,_0x16c78c,'utf8');}}exports['CompilerService']=CompilerService;function _0x212c(){const _0x3f269a=['2903872zcAHHc','5290428sTGURG','7895440UouHaC','4397185NhRnWD','1202rSLixu','1053076fzDSKs','1637532MIovFP','1818aEJAuF'];_0x212c=function(){return _0x3f269a;};return _0x212c();}
1
+ 'use strict';function _0x3e77(){const _0x5f3243=['8PKUlbK','165oqDNNn','2436707dLJQvK','1686830LeYPph','1900385jCuosB','34598lAVeEC','5lPKwrM','15216yvErWH','3145824vbfMEQ','277404ZHjuRk'];_0x3e77=function(){return _0x5f3243;};return _0x3e77();}(function(_0x7d0eaa,_0x597253){const _0x570c87=_0xa970,_0x3ec8d1=_0x7d0eaa();while(!![]){try{const _0x558259=parseInt(_0x570c87(0x73))/0x1*(-parseInt(_0x570c87(0x7c))/0x2)+parseInt(_0x570c87(0x78))/0x3*(-parseInt(_0x570c87(0x74))/0x4)+parseInt(_0x570c87(0x7b))/0x5+-parseInt(_0x570c87(0x76))/0x6+-parseInt(_0x570c87(0x79))/0x7*(-parseInt(_0x570c87(0x77))/0x8)+-parseInt(_0x570c87(0x75))/0x9+parseInt(_0x570c87(0x7a))/0xa;if(_0x558259===_0x597253)break;else _0x3ec8d1['push'](_0x3ec8d1['shift']());}catch(_0x308c5d){_0x3ec8d1['push'](_0x3ec8d1['shift']());}}}(_0x3e77,0x32240));function _0xa970(_0x25a6c6,_0x57a853){const _0x3e7712=_0x3e77();return _0xa970=function(_0xa9707f,_0x4a92f0){_0xa9707f=_0xa9707f-0x73;let _0x2adc00=_0x3e7712[_0xa9707f];return _0x2adc00;},_0xa970(_0x25a6c6,_0x57a853);}var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x357e67,_0x28c397,_0x188149,_0x5e7243){if(_0x5e7243===undefined)_0x5e7243=_0x188149;var _0xb8b761=Object['getOwnPropertyDescriptor'](_0x28c397,_0x188149);(!_0xb8b761||('get'in _0xb8b761?!_0x28c397['__esModule']:_0xb8b761['writable']||_0xb8b761['configurable']))&&(_0xb8b761={'enumerable':!![],'get':function(){return _0x28c397[_0x188149];}}),Object['defineProperty'](_0x357e67,_0x5e7243,_0xb8b761);}:function(_0x52adb1,_0x550d4d,_0x5550b2,_0x1d4aef){if(_0x1d4aef===undefined)_0x1d4aef=_0x5550b2;_0x52adb1[_0x1d4aef]=_0x550d4d[_0x5550b2];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x1dbc18,_0x4316cd){Object['defineProperty'](_0x1dbc18,'default',{'enumerable':!![],'value':_0x4316cd});}:function(_0x492eb1,_0x31643e){_0x492eb1['default']=_0x31643e;}),__importStar=this&&this['__importStar']||function(_0x2b4bf3){if(_0x2b4bf3&&_0x2b4bf3['__esModule'])return _0x2b4bf3;var _0x5399ed={};if(_0x2b4bf3!=null){for(var _0x5281f6 in _0x2b4bf3)if(_0x5281f6!=='default'&&Object['prototype']['hasOwnProperty']['call'](_0x2b4bf3,_0x5281f6))__createBinding(_0x5399ed,_0x2b4bf3,_0x5281f6);}return __setModuleDefault(_0x5399ed,_0x2b4bf3),_0x5399ed;},__importDefault=this&&this['__importDefault']||function(_0x5591d5){return _0x5591d5&&_0x5591d5['__esModule']?_0x5591d5:{'default':_0x5591d5};};Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CompilerService']=void 0x0;const fs=__importStar(require('fs/promises')),path=__importStar(require('path')),json_schema_ref_parser_1=__importDefault(require('@apidevtools/json-schema-ref-parser')),js_yaml_1=__importDefault(require('js-yaml')),deployer_1=require('./deployer'),validator_1=require('./validator');class CompilerService{constructor(_0x4ea21a,_0x44ff6b,_0x19a19d){this['store']=_0x4ea21a,this['stream']=_0x44ff6b,this['logger']=_0x19a19d;}async['plan'](_0x5825cc){try{let _0x2cc14d;this['isPath'](_0x5825cc)?_0x2cc14d=await json_schema_ref_parser_1['default']['dereference'](_0x5825cc):_0x2cc14d=js_yaml_1['default']['load'](_0x5825cc);const _0x145559=new validator_1['Validator'](_0x2cc14d);return _0x145559['validate'](this['store']),_0x2cc14d;}catch(_0x142bdc){this['logger']['error']('compiler-plan-error',_0x142bdc);}}['isPath'](_0x1f06ab){return!_0x1f06ab['trim']()['startsWith']('app:');}async['deploy'](_0x42d218){try{let _0x367d7d;this['isPath'](_0x42d218)?(_0x367d7d=await json_schema_ref_parser_1['default']['dereference'](_0x42d218),await this['saveAsJSON'](_0x42d218,_0x367d7d)):_0x367d7d=js_yaml_1['default']['load'](_0x42d218);const _0x226e45=new validator_1['Validator'](_0x367d7d);_0x226e45['validate'](this['store']);const _0x3028d5=new deployer_1['Deployer'](_0x367d7d);return await _0x3028d5['deploy'](this['store'],this['stream']),await this['store']['setApp'](_0x367d7d['app']['id'],_0x367d7d['app']['version']),_0x367d7d;}catch(_0x248e08){this['logger']['error']('compiler-deploy-error',_0x248e08);}}async['activate'](_0x319628,_0x3db3fe){return await this['store']['activateAppVersion'](_0x319628,_0x3db3fe);}async['saveAsJSON'](_0x53594e,_0xbf0ccf){const _0x4014c7=JSON['stringify'](_0xbf0ccf,null,0x2),_0x489e26=path['join'](path['dirname'](_0x53594e),'.hotmesh.'+_0xbf0ccf['app']['id']+'.'+_0xbf0ccf['app']['version']+'.json');await fs['writeFile'](_0x489e26,_0x4014c7,'utf8');}}exports['CompilerService']=CompilerService;
@@ -1 +1 @@
1
- 'use strict';(function(_0x52b7e6,_0xa42856){const _0x119edd=_0x5664,_0x299583=_0x52b7e6();while(!![]){try{const _0x11f0f7=-parseInt(_0x119edd(0x10f))/0x1*(-parseInt(_0x119edd(0x10a))/0x2)+parseInt(_0x119edd(0x105))/0x3*(-parseInt(_0x119edd(0x10b))/0x4)+-parseInt(_0x119edd(0x106))/0x5+parseInt(_0x119edd(0x10c))/0x6*(parseInt(_0x119edd(0x10e))/0x7)+-parseInt(_0x119edd(0x109))/0x8*(parseInt(_0x119edd(0x10d))/0x9)+-parseInt(_0x119edd(0x108))/0xa*(-parseInt(_0x119edd(0x107))/0xb)+parseInt(_0x119edd(0x111))/0xc*(parseInt(_0x119edd(0x110))/0xd);if(_0x11f0f7===_0xa42856)break;else _0x299583['push'](_0x299583['shift']());}catch(_0x310ce9){_0x299583['push'](_0x299583['shift']());}}}(_0x516d,0xe91fd));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Validator']=void 0x0;const pipe_1=require('../pipe');function _0x516d(){const _0x2631a1=['1316otvbqp','1HznsOR','11833562URvZHS','12KOxAQW','3vmcpqA','5811170qegTGC','77QsElfZ','1384060rrPgcY','8XSKJsI','1989674BStBoB','4013468uBZrqA','27228hXIumQ','5459571dDKUBW'];_0x516d=function(){return _0x2631a1;};return _0x516d();}class Validator{constructor(_0x2617dc){this['manifest']=null,this['activityIds']=[],this['mappingStatements']={},this['store']=null,this['manifest']=_0x2617dc;}async['validate'](_0x31e804){this['store']=_0x31e804,this['getMappingStatements'](),this['validateActivityIds'](),this['validateReferencedActivityIds'](),this['validateMappingStatements'](),this['validateTransitions'](),this['validateTransitionConditions'](),this['validateStats'](),this['validateSchemas'](),this['validateUniqueHandledTopics'](),this['validateGraphPublishSubscribe'](),this['validateHooks'](),this['validateConditionalStatements']();}['validateActivityIds'](){const _0x4bc6bd=new Set();this['manifest']['app']['graphs']['forEach'](_0x2aad22=>{const _0x13a2e9=Object['keys'](_0x2aad22['activities']);_0x13a2e9['forEach'](_0x141a43=>{if(_0x4bc6bd['has'](_0x141a43))throw new Error('Duplicate\x20activity\x20id\x20found:\x20'+_0x141a43);else _0x4bc6bd['add'](_0x141a43);});}),this['activityIds']=Array['from'](_0x4bc6bd);}['isMappingStatement'](_0x514098){return typeof _0x514098==='string'&&_0x514098['startsWith']('{')&&_0x514098['endsWith']('}');}['extractMappingStatements'](_0x260cd6,_0x5be90a,_0x4d2faa){for(const _0x2ff55e in _0x260cd6){if(typeof _0x260cd6[_0x2ff55e]==='object'&&_0x260cd6[_0x2ff55e]!==null)this['extractMappingStatements'](_0x260cd6[_0x2ff55e],_0x5be90a,_0x4d2faa);else this['isMappingStatement'](_0x260cd6[_0x2ff55e])&&(!_0x5be90a[_0x4d2faa]&&(_0x5be90a[_0x4d2faa]=[]),_0x5be90a[_0x4d2faa]['push'](_0x260cd6[_0x2ff55e]));}}['getMappingStatements'](){const _0x3e8429={};this['manifest']['app']['graphs']['forEach'](_0x4b7b60=>{const _0x530867=_0x4b7b60['activities'];for(const _0x230b03 in _0x530867){const _0x512560=_0x530867[_0x230b03];this['extractMappingStatements'](_0x512560,_0x3e8429,_0x230b03);}}),this['mappingStatements']=_0x3e8429;}['validateReferencedActivityIds'](){const _0x5c5ecd=this['mappingStatements'],_0x427ccf=this['activityIds'];for(const _0x239c02 in _0x5c5ecd){const _0x19e989=_0x5c5ecd[_0x239c02];_0x19e989['forEach'](_0x163f3f=>{if(_0x163f3f['startsWith']('{')&&_0x163f3f['endsWith']('}')){const _0x3ef896=_0x163f3f['slice'](0x1,-0x1)['split']('.'),_0x40c992=_0x3ef896[0x0];if(!(Validator['SYS_VARS']['includes'](_0x40c992)||_0x427ccf['includes'](_0x40c992)||this['isFunction'](_0x163f3f)||this['isContextVariable'](_0x163f3f)))throw new Error('Mapping\x20statement\x20references\x20non-existent\x20activity:\x20'+_0x163f3f);}});}}['isFunction'](_0x300afa){return _0x300afa['startsWith']('{@')&&pipe_1['Pipe']['resolveFunction'](_0x300afa);}['isContextVariable'](_0x26f32d){return['{$input}','{$output}','{$item}','{$key}','{$index}']['includes'](_0x26f32d);}['validateMappingStatements'](){}['validateTransitions'](){}['validateTransitionConditions'](){}['validateStats'](){}['validateSchemas'](){}['validateUniqueHandledTopics'](){}['validateGraphPublishSubscribe'](){}['validateHooks'](){}['validateConditionalStatements'](){}}function _0x5664(_0x5bc2de,_0x575c4f){const _0x516dd2=_0x516d();return _0x5664=function(_0x566435,_0x1ff7c2){_0x566435=_0x566435-0x105;let _0x4e1dc4=_0x516dd2[_0x566435];return _0x4e1dc4;},_0x5664(_0x5bc2de,_0x575c4f);}exports['Validator']=Validator,Validator['SYS_VARS']=['$app','$self','$graph','$job'],Validator['CONTEXT_VARS']=['{$input}','{$output}','{$item}','{$key}','{$index}'];
1
+ 'use strict';(function(_0x2bf82f,_0x1c0e03){const _0xbe42f5=_0x1c0c,_0x372d73=_0x2bf82f();while(!![]){try{const _0x3d79ad=parseInt(_0xbe42f5(0x151))/0x1*(-parseInt(_0xbe42f5(0x14e))/0x2)+parseInt(_0xbe42f5(0x14f))/0x3+-parseInt(_0xbe42f5(0x153))/0x4+parseInt(_0xbe42f5(0x154))/0x5+-parseInt(_0xbe42f5(0x150))/0x6+-parseInt(_0xbe42f5(0x14d))/0x7+-parseInt(_0xbe42f5(0x155))/0x8*(-parseInt(_0xbe42f5(0x152))/0x9);if(_0x3d79ad===_0x1c0e03)break;else _0x372d73['push'](_0x372d73['shift']());}catch(_0x4ac662){_0x372d73['push'](_0x372d73['shift']());}}}(_0x5a85,0x4c1cd));function _0x1c0c(_0xcc5cd3,_0x298cb1){const _0x5a8577=_0x5a85();return _0x1c0c=function(_0x1c0cbe,_0x20339a){_0x1c0cbe=_0x1c0cbe-0x14d;let _0x52bbae=_0x5a8577[_0x1c0cbe];return _0x52bbae;},_0x1c0c(_0xcc5cd3,_0x298cb1);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Validator']=void 0x0;const pipe_1=require('../pipe');class Validator{constructor(_0x43e290){this['manifest']=null,this['activityIds']=[],this['mappingStatements']={},this['store']=null,this['manifest']=_0x43e290;}async['validate'](_0x8c5320){this['store']=_0x8c5320,this['getMappingStatements'](),this['validateActivityIds'](),this['validateReferencedActivityIds'](),this['validateMappingStatements'](),this['validateTransitions'](),this['validateTransitionConditions'](),this['validateStats'](),this['validateSchemas'](),this['validateUniqueHandledTopics'](),this['validateGraphPublishSubscribe'](),this['validateHooks'](),this['validateConditionalStatements']();}['validateActivityIds'](){const _0x2d4d0b=new Set();this['manifest']['app']['graphs']['forEach'](_0x28cb50=>{const _0x2463ad=Object['keys'](_0x28cb50['activities']);_0x2463ad['forEach'](_0x25399d=>{if(_0x2d4d0b['has'](_0x25399d))throw new Error('Duplicate\x20activity\x20id\x20found:\x20'+_0x25399d);else _0x2d4d0b['add'](_0x25399d);});}),this['activityIds']=Array['from'](_0x2d4d0b);}['isMappingStatement'](_0x3fa145){return typeof _0x3fa145==='string'&&_0x3fa145['startsWith']('{')&&_0x3fa145['endsWith']('}');}['extractMappingStatements'](_0x4ecadf,_0x17e4b1,_0x15b4b8){for(const _0x342c45 in _0x4ecadf){if(typeof _0x4ecadf[_0x342c45]==='object'&&_0x4ecadf[_0x342c45]!==null)this['extractMappingStatements'](_0x4ecadf[_0x342c45],_0x17e4b1,_0x15b4b8);else this['isMappingStatement'](_0x4ecadf[_0x342c45])&&(!_0x17e4b1[_0x15b4b8]&&(_0x17e4b1[_0x15b4b8]=[]),_0x17e4b1[_0x15b4b8]['push'](_0x4ecadf[_0x342c45]));}}['getMappingStatements'](){const _0x2794b8={};this['manifest']['app']['graphs']['forEach'](_0x1a7881=>{const _0x1fc73b=_0x1a7881['activities'];for(const _0x1ae915 in _0x1fc73b){const _0x5e27a7=_0x1fc73b[_0x1ae915];this['extractMappingStatements'](_0x5e27a7,_0x2794b8,_0x1ae915);}}),this['mappingStatements']=_0x2794b8;}['validateReferencedActivityIds'](){const _0x3a83e1=this['mappingStatements'],_0x2dcb10=this['activityIds'];for(const _0x1a8eda in _0x3a83e1){const _0x42d88a=_0x3a83e1[_0x1a8eda];_0x42d88a['forEach'](_0x345477=>{if(_0x345477['startsWith']('{')&&_0x345477['endsWith']('}')){const _0x44eadf=_0x345477['slice'](0x1,-0x1)['split']('.'),_0x42aec7=_0x44eadf[0x0];if(!(Validator['SYS_VARS']['includes'](_0x42aec7)||_0x2dcb10['includes'](_0x42aec7)||this['isFunction'](_0x345477)||this['isContextVariable'](_0x345477)))throw new Error('Mapping\x20statement\x20references\x20non-existent\x20activity:\x20'+_0x345477);}});}}['isFunction'](_0x5cc70c){return _0x5cc70c['startsWith']('{@')&&pipe_1['Pipe']['resolveFunction'](_0x5cc70c);}['isContextVariable'](_0x1254ca){return['{$input}','{$output}','{$item}','{$key}','{$index}']['includes'](_0x1254ca);}['validateMappingStatements'](){}['validateTransitions'](){}['validateTransitionConditions'](){}['validateStats'](){}['validateSchemas'](){}['validateUniqueHandledTopics'](){}['validateGraphPublishSubscribe'](){}['validateHooks'](){}['validateConditionalStatements'](){}}exports['Validator']=Validator,Validator['SYS_VARS']=['$app','$self','$graph','$job'],Validator['CONTEXT_VARS']=['{$input}','{$output}','{$item}','{$key}','{$index}'];function _0x5a85(){const _0x4b6584=['2078356zQmXqr','594485vQqpvS','9686744oavBTH','1512504xJKXam','2VcsXDp','1368945mvRykt','1779750sMNWlk','442012DyLLiQ','9taFqgr'];_0x5a85=function(){return _0x4b6584;};return _0x5a85();}
@@ -1,6 +1,7 @@
1
1
  import { HotMeshEngine, HotMeshWorker } from '../../types/hotmesh';
2
2
  import { ProviderConfig, ProviderNativeClient } from '../../types/provider';
3
3
  export declare class ConnectorService {
4
+ static disconnectAll(): Promise<void>;
4
5
  static connectClient(ProviderConfig: ProviderConfig): Promise<ProviderNativeClient>;
5
6
  static initClients(target: HotMeshEngine | HotMeshWorker): Promise<void>;
6
7
  static initClient(ProviderConfig: ProviderConfig, target: HotMeshEngine | HotMeshWorker, field: string): Promise<void>;