@hotmeshio/hotmesh 0.3.8 → 0.3.9

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 (154) hide show
  1. package/README.md +2 -17
  2. package/build/index.d.ts +4 -2
  3. package/build/index.js +6 -3
  4. package/build/modules/key.js +1 -1
  5. package/build/modules/utils.d.ts +12 -4
  6. package/build/modules/utils.js +1 -1
  7. package/build/package.json +14 -7
  8. package/build/services/activities/activity.d.ts +9 -9
  9. package/build/services/activities/activity.js +1 -1
  10. package/build/services/activities/await.d.ts +2 -2
  11. package/build/services/activities/await.js +1 -1
  12. package/build/services/activities/cycle.d.ts +2 -2
  13. package/build/services/activities/cycle.js +1 -1
  14. package/build/services/activities/hook.d.ts +2 -2
  15. package/build/services/activities/hook.js +1 -1
  16. package/build/services/activities/index.js +1 -1
  17. package/build/services/activities/interrupt.js +1 -1
  18. package/build/services/activities/signal.js +1 -1
  19. package/build/services/activities/trigger.d.ts +3 -3
  20. package/build/services/activities/trigger.js +1 -1
  21. package/build/services/activities/worker.d.ts +2 -2
  22. package/build/services/activities/worker.js +1 -1
  23. package/build/services/collator/index.d.ts +9 -9
  24. package/build/services/collator/index.js +1 -1
  25. package/build/services/compiler/deployer.d.ts +4 -4
  26. package/build/services/compiler/deployer.js +1 -1
  27. package/build/services/compiler/index.d.ts +4 -4
  28. package/build/services/compiler/index.js +1 -1
  29. package/build/services/compiler/validator.d.ts +3 -3
  30. package/build/services/compiler/validator.js +1 -1
  31. package/build/services/connector/factory.d.ts +6 -0
  32. package/build/services/connector/factory.js +56 -0
  33. package/build/services/connector/index.d.ts +13 -4
  34. package/build/services/connector/index.js +30 -23
  35. package/build/services/connector/providers/ioredis.d.ts +9 -0
  36. package/build/services/connector/providers/ioredis.js +26 -0
  37. package/build/services/connector/providers/nats.d.ts +9 -0
  38. package/build/services/connector/providers/nats.js +26 -0
  39. package/build/services/connector/providers/postgres.d.ts +9 -0
  40. package/build/services/connector/providers/postgres.js +39 -0
  41. package/build/services/connector/providers/redis.d.ts +9 -0
  42. package/build/services/connector/providers/redis.js +38 -0
  43. package/build/services/engine/index.d.ts +12 -12
  44. package/build/services/engine/index.js +1 -1
  45. package/build/services/exporter/index.d.ts +3 -3
  46. package/build/services/exporter/index.js +1 -1
  47. package/build/services/hotmesh/index.js +4 -4
  48. package/build/services/mapper/index.js +1 -1
  49. package/build/services/meshcall/index.d.ts +5 -4
  50. package/build/services/meshcall/index.js +31 -14
  51. package/build/services/meshdata/index.d.ts +6 -6
  52. package/build/services/meshdata/index.js +7 -15
  53. package/build/services/meshflow/connection.d.ts +3 -2
  54. package/build/services/meshflow/exporter.d.ts +3 -3
  55. package/build/services/meshflow/exporter.js +1 -1
  56. package/build/services/meshflow/search.js +12 -4
  57. package/build/services/meshflow/worker.js +7 -7
  58. package/build/services/meshos/index.d.ts +1 -4
  59. package/build/services/meshos/index.js +11 -44
  60. package/build/services/pipe/functions/array.js +1 -1
  61. package/build/services/pipe/functions/bitwise.js +1 -1
  62. package/build/services/pipe/functions/conditional.js +1 -1
  63. package/build/services/pipe/functions/cron.d.ts +2 -0
  64. package/build/services/pipe/functions/cron.js +1 -1
  65. package/build/services/pipe/functions/date.js +1 -1
  66. package/build/services/pipe/functions/index.js +1 -1
  67. package/build/services/pipe/functions/json.js +1 -1
  68. package/build/services/pipe/functions/logical.js +1 -1
  69. package/build/services/pipe/functions/math.js +1 -1
  70. package/build/services/pipe/functions/number.js +1 -1
  71. package/build/services/pipe/functions/object.js +1 -1
  72. package/build/services/pipe/functions/string.js +1 -1
  73. package/build/services/pipe/functions/symbol.js +1 -1
  74. package/build/services/pipe/functions/unary.js +1 -1
  75. package/build/services/pipe/index.js +1 -1
  76. package/build/services/quorum/index.d.ts +5 -5
  77. package/build/services/quorum/index.js +1 -1
  78. package/build/services/reporter/index.d.ts +2 -2
  79. package/build/services/reporter/index.js +1 -1
  80. package/build/services/router/index.d.ts +8 -13
  81. package/build/services/router/index.js +1 -1
  82. package/build/services/search/factory.d.ts +2 -2
  83. package/build/services/search/factory.js +1 -1
  84. package/build/services/search/index.d.ts +5 -4
  85. package/build/services/search/providers/redis/ioredis.js +1 -1
  86. package/build/services/search/providers/redis/redis.js +1 -1
  87. package/build/services/serializer/index.js +1 -1
  88. package/build/services/store/factory.d.ts +3 -3
  89. package/build/services/store/factory.js +1 -1
  90. package/build/services/store/index.d.ts +18 -17
  91. package/build/services/store/providers/redis/_base.d.ts +13 -15
  92. package/build/services/store/providers/redis/_base.js +1 -1
  93. package/build/services/store/providers/redis/ioredis.d.ts +2 -2
  94. package/build/services/store/providers/redis/ioredis.js +1 -1
  95. package/build/services/store/providers/redis/redis.d.ts +2 -2
  96. package/build/services/store/providers/redis/redis.js +1 -1
  97. package/build/services/store/providers/store-initializable.js +1 -1
  98. package/build/services/stream/factory.d.ts +3 -3
  99. package/build/services/stream/factory.js +16 -4
  100. package/build/services/stream/index.d.ts +57 -18
  101. package/build/services/stream/index.js +2 -1
  102. package/build/services/stream/providers/nats/nats.d.ts +59 -0
  103. package/build/services/stream/providers/nats/nats.js +1 -0
  104. package/build/services/stream/providers/postgres/_deploy.d.ts +2 -1
  105. package/build/services/stream/providers/postgres/_deploy.js +1 -1
  106. package/build/services/stream/providers/postgres/postgres.d.ts +0 -0
  107. package/build/services/stream/providers/postgres/postgres.js +0 -0
  108. package/build/services/stream/providers/redis/ioredis.d.ts +53 -14
  109. package/build/services/stream/providers/redis/ioredis.js +1 -1
  110. package/build/services/stream/providers/redis/redis.d.ts +54 -15
  111. package/build/services/stream/providers/redis/redis.js +1 -1
  112. package/build/services/stream/providers/stream-initializable.d.ts +1 -2
  113. package/build/services/stream/providers/stream-initializable.js +1 -1
  114. package/build/services/sub/factory.d.ts +2 -2
  115. package/build/services/sub/factory.js +1 -1
  116. package/build/services/sub/index.d.ts +6 -5
  117. package/build/services/sub/providers/redis/ioredis.d.ts +1 -1
  118. package/build/services/sub/providers/redis/ioredis.js +1 -1
  119. package/build/services/sub/providers/redis/redis.d.ts +4 -4
  120. package/build/services/sub/providers/redis/redis.js +1 -1
  121. package/build/services/task/index.d.ts +5 -5
  122. package/build/services/task/index.js +1 -1
  123. package/build/services/telemetry/index.js +1 -1
  124. package/build/services/worker/index.d.ts +9 -9
  125. package/build/services/worker/index.js +1 -1
  126. package/build/types/hotmesh.d.ts +26 -14
  127. package/build/types/index.d.ts +6 -5
  128. package/build/types/manifest.d.ts +1 -9
  129. package/build/types/meshcall.d.ts +12 -7
  130. package/build/types/meshflow.d.ts +3 -7
  131. package/build/types/nats.d.ts +150 -0
  132. package/build/types/nats.js +2 -0
  133. package/build/types/postgres.d.ts +48 -0
  134. package/build/types/postgres.js +2 -0
  135. package/build/types/provider.d.ts +26 -0
  136. package/build/types/provider.js +2 -0
  137. package/build/types/redis.d.ts +33 -15
  138. package/build/types/stream.d.ts +65 -1
  139. package/index.ts +8 -5
  140. package/package.json +14 -7
  141. package/types/hotmesh.ts +139 -22
  142. package/types/index.ts +26 -17
  143. package/types/manifest.ts +1 -10
  144. package/types/meshcall.ts +38 -13
  145. package/types/meshflow.ts +2 -7
  146. package/types/nats.ts +231 -0
  147. package/types/postgres.ts +54 -0
  148. package/types/provider.ts +71 -0
  149. package/types/redis.ts +63 -18
  150. package/types/stream.ts +85 -1
  151. package/build/services/connector/clients/ioredis.d.ts +0 -13
  152. package/build/services/connector/clients/ioredis.js +0 -48
  153. package/build/services/connector/clients/redis.d.ts +0 -13
  154. package/build/services/connector/clients/redis.js +0 -60
@@ -1 +1 @@
1
- 'use strict';(function(_0x2dd0d2,_0x3e40a6){const _0x2767e2=_0xc2b4,_0x55db08=_0x2dd0d2();while(!![]){try{const _0x30fe9e=parseInt(_0x2767e2(0xee))/0x1+-parseInt(_0x2767e2(0xf6))/0x2+parseInt(_0x2767e2(0xed))/0x3*(-parseInt(_0x2767e2(0xf4))/0x4)+-parseInt(_0x2767e2(0xf2))/0x5*(-parseInt(_0x2767e2(0xf0))/0x6)+-parseInt(_0x2767e2(0xf5))/0x7+-parseInt(_0x2767e2(0xf1))/0x8*(parseInt(_0x2767e2(0xf3))/0x9)+parseInt(_0x2767e2(0xef))/0xa*(parseInt(_0x2767e2(0xf7))/0xb);if(_0x30fe9e===_0x3e40a6)break;else _0x55db08['push'](_0x55db08['shift']());}catch(_0x50ca3d){_0x55db08['push'](_0x55db08['shift']());}}}(_0x3343,0x6c53a));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Hook']=void 0x0;function _0x3343(){const _0x4d4b38=['36wRCQIq','2526340MVLiPp','4276671JHuWDi','56044YjbrvB','1001bCskts','3FYJSDf','883003kGHpfY','58890kVeMHb','896544NdddtP','604664YMkFZe','20KMbBDY'];_0x3343=function(){return _0x4d4b38;};return _0x3343();}const 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'),enums_1=require('../../modules/enums'),activity_1=require('./activity');function _0xc2b4(_0x90a16e,_0x76d493){const _0x334373=_0x3343();return _0xc2b4=function(_0xc2b4b4,_0xa3b9b5){_0xc2b4b4=_0xc2b4b4-0xed;let _0x1dfc93=_0x334373[_0xc2b4b4];return _0x1dfc93;},_0xc2b4(_0x90a16e,_0x76d493);}class Hook extends activity_1['Activity']{constructor(_0x36d5f7,_0x5cafae,_0x1db6d4,_0x3e3416,_0x5e3898,_0x5e0bd1){super(_0x36d5f7,_0x5cafae,_0x1db6d4,_0x3e3416,_0x5e3898,_0x5e0bd1);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x4b816f;try{return await this['verifyEntry'](),_0x4b816f=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x4b816f['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x4b816f):await this['doPassThrough'](_0x4b816f),this['context']['metadata']['aid'];}catch(_0x592f1d){if(_0x592f1d instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x592f1d});return;}else{if(_0x592f1d instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x592f1d});return;}else{if(_0x592f1d instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x592f1d});return;}else{if(_0x592f1d instanceof errors_1['CollationError']){if(_0x592f1d['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',{..._0x592f1d});}else this['logger']['error']('hook-process-error',{..._0x592f1d});}}}_0x4b816f?.['setActivityError'](_0x592f1d['message']);throw _0x592f1d;}finally{_0x4b816f?.['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 _0x959006=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x959006)&&Number(_0x959006)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x291b80){const _0x583556=this['store']['getMulti']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x583556),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x583556),await collator_1['CollatorService']['authorizeReentry'](this,_0x583556),await this['setStatus'](0x0,_0x583556),await _0x583556['exec'](),_0x291b80['mapActivityAttributes']();}async['doPassThrough'](_0x498b7d){const _0x31142f=this['store']['getMulti']();let _0x1c237d;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x31142f),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x31142f),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x31142f),_0x1c237d=await _0x31142f['exec'](),_0x498b7d['mapActivityAttributes']();const _0x4371c9=this['resolveStatus'](_0x1c237d),_0x112106={'app.job.jss':_0x4371c9},_0x269371=await this['transition'](this['adjacencyList'],_0x4371c9);_0x269371['length']&&(_0x112106['app.activity.mids']=_0x269371['join'](',')),_0x498b7d['setActivityAttributes'](_0x112106);}async['getHookRule'](_0x15b3c1){const _0x52ec1b=await this['store']['getHookRules']();return _0x52ec1b?.[_0x15b3c1]?.[0x0];}async['registerHook'](_0x1d3f91){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x1d3f91);else{if(this['config']['sleep']){const _0x227b01=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',_0x227b01,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x19db3a=stream_1['StreamStatus']['SUCCESS'],_0x19be00=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x19db3a,'code':_0x19be00});const _0x3a41b9=new task_1['TaskService'](this['store'],this['logger']),_0x39021b={...this['data']},_0x76b032=await _0x3a41b9['processWebHookSignal'](this['config']['hook']['topic'],_0x39021b);if(_0x76b032){const [_0x439568,_0x26b3b0,_0x7ae9c9,_0x259f08]=_0x76b032;this['context']['metadata']['jid']=_0x439568,this['context']['metadata']['gid']=_0x259f08,this['context']['metadata']['dad']=_0x7ae9c9,await this['processEvent'](_0x19db3a,_0x19be00,'hook'),_0x19be00===0xc8&&await _0x3a41b9['deleteWebHookSignal'](this['config']['hook']['topic'],_0x39021b);}}async['processTimeHookEvent'](_0x12a4cc){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x12a4cc,'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']}),await this['processEvent'](stream_1['StreamStatus']['SUCCESS'],0xc8,'hook');}}exports['Hook']=Hook;
1
+ 'use strict';(function(_0x590457,_0x5dac72){const _0xabda80=_0x471e,_0x4bc816=_0x590457();while(!![]){try{const _0x17a806=-parseInt(_0xabda80(0x6a))/0x1*(parseInt(_0xabda80(0x6e))/0x2)+parseInt(_0xabda80(0x72))/0x3+parseInt(_0xabda80(0x68))/0x4*(parseInt(_0xabda80(0x69))/0x5)+parseInt(_0xabda80(0x70))/0x6*(parseInt(_0xabda80(0x6b))/0x7)+-parseInt(_0xabda80(0x71))/0x8+parseInt(_0xabda80(0x6c))/0x9+parseInt(_0xabda80(0x6d))/0xa*(-parseInt(_0xabda80(0x6f))/0xb);if(_0x17a806===_0x5dac72)break;else _0x4bc816['push'](_0x4bc816['shift']());}catch(_0x3ef958){_0x4bc816['push'](_0x4bc816['shift']());}}}(_0x5d3b,0xd79bd));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Hook']=void 0x0;function _0x5d3b(){const _0x2e9adf=['5280087WDaRVL','2804grokbG','7375BgekjU','463ZUhKLP','131299peAtJO','6939882ZFzinb','20968990mnLqRh','5594kzoSIx','11tmBtrV','342ndnabA','2873664PPlpTl'];_0x5d3b=function(){return _0x2e9adf;};return _0x5d3b();}const enums_1=require('../../modules/enums'),errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),task_1=require('../task'),telemetry_1=require('../telemetry'),stream_1=require('../../types/stream'),activity_1=require('./activity');function _0x471e(_0x3fc3a5,_0x495ac9){const _0x5d3b5c=_0x5d3b();return _0x471e=function(_0x471e9c,_0x1ec7b2){_0x471e9c=_0x471e9c-0x68;let _0xa61a73=_0x5d3b5c[_0x471e9c];return _0xa61a73;},_0x471e(_0x3fc3a5,_0x495ac9);}class Hook extends activity_1['Activity']{constructor(_0x38be93,_0x2e6d3,_0x53ae7f,_0x3a0d56,_0x578838,_0x274510){super(_0x38be93,_0x2e6d3,_0x53ae7f,_0x3a0d56,_0x578838,_0x274510);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x7a0d71;try{return await this['verifyEntry'](),_0x7a0d71=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x7a0d71['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x7a0d71):await this['doPassThrough'](_0x7a0d71),this['context']['metadata']['aid'];}catch(_0x535885){if(_0x535885 instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x535885});return;}else{if(_0x535885 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x535885});return;}else{if(_0x535885 instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x535885});return;}else{if(_0x535885 instanceof errors_1['CollationError']){if(_0x535885['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',{..._0x535885});}else this['logger']['error']('hook-process-error',{..._0x535885});}}}_0x7a0d71?.['setActivityError'](_0x535885['message']);throw _0x535885;}finally{_0x7a0d71?.['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 _0x51c63c=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x51c63c)&&Number(_0x51c63c)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x5bb61f){const _0x2065b5=this['store']['transact']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x2065b5),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x2065b5),await collator_1['CollatorService']['authorizeReentry'](this,_0x2065b5),await this['setStatus'](0x0,_0x2065b5),await _0x2065b5['exec'](),_0x5bb61f['mapActivityAttributes']();}async['doPassThrough'](_0x4472fa){const _0x71e043=this['store']['transact']();let _0x438888;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x71e043),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x71e043),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x71e043),_0x438888=await _0x71e043['exec'](),_0x4472fa['mapActivityAttributes']();const _0xdc16fb=this['resolveStatus'](_0x438888),_0xf052bf={'app.job.jss':_0xdc16fb},_0x465a1e=await this['transition'](this['adjacencyList'],_0xdc16fb);_0x465a1e['length']&&(_0xf052bf['app.activity.mids']=_0x465a1e['join'](',')),_0x4472fa['setActivityAttributes'](_0xf052bf);}async['getHookRule'](_0x462f28){const _0x2d4a1c=await this['store']['getHookRules']();return _0x2d4a1c?.[_0x462f28]?.[0x0];}async['registerHook'](_0x3bd0da){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x3bd0da);else{if(this['config']['sleep']){const _0x34b190=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',_0x34b190,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x538f8e=stream_1['StreamStatus']['SUCCESS'],_0x4c6866=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x538f8e,'code':_0x4c6866});const _0x3c834f=new task_1['TaskService'](this['store'],this['logger']),_0x1ac949={...this['data']},_0x395665=await _0x3c834f['processWebHookSignal'](this['config']['hook']['topic'],_0x1ac949);if(_0x395665){const [_0x96c72f,_0xab57c6,_0x22ded8,_0x292294]=_0x395665;this['context']['metadata']['jid']=_0x96c72f,this['context']['metadata']['gid']=_0x292294,this['context']['metadata']['dad']=_0x22ded8,await this['processEvent'](_0x538f8e,_0x4c6866,'hook'),_0x4c6866===0xc8&&await _0x3c834f['deleteWebHookSignal'](this['config']['hook']['topic'],_0x1ac949);}}async['processTimeHookEvent'](_0x3f656f){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x3f656f,'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 _0x5391(){const _0x195724=['25885704rdufMO','608885yqIpmd','801800gxMkwV','1523487SpxrXG','6DMUFsN','3242244kCLxXY','1447314NwBKQt','140356Mtdfjt'];_0x5391=function(){return _0x195724;};return _0x5391();}(function(_0x1fa930,_0x45c3b5){const _0x7bad52=_0x42c8,_0x195965=_0x1fa930();while(!![]){try{const _0x5e8aa6=-parseInt(_0x7bad52(0x1f6))/0x1+-parseInt(_0x7bad52(0x1f5))/0x2+-parseInt(_0x7bad52(0x1f4))/0x3+-parseInt(_0x7bad52(0x1f1))/0x4+-parseInt(_0x7bad52(0x1f0))/0x5+parseInt(_0x7bad52(0x1f3))/0x6*(-parseInt(_0x7bad52(0x1f2))/0x7)+parseInt(_0x7bad52(0x1f7))/0x8;if(_0x5e8aa6===_0x45c3b5)break;else _0x195965['push'](_0x195965['shift']());}catch(_0x424cca){_0x195965['push'](_0x195965['shift']());}}}(_0x5391,0xb75ec));Object['defineProperty'](exports,'__esModule',{'value':!![]});const activity_1=require('./activity'),await_1=require('./await'),cycle_1=require('./cycle'),hook_1=require('./hook'),interrupt_1=require('./interrupt'),signal_1=require('./signal'),trigger_1=require('./trigger'),worker_1=require('./worker');function _0x42c8(_0x2e03ba,_0x247f76){const _0x5391b2=_0x5391();return _0x42c8=function(_0x42c8ef,_0x2e2dbb){_0x42c8ef=_0x42c8ef-0x1f0;let _0x545b4a=_0x5391b2[_0x42c8ef];return _0x545b4a;},_0x42c8(_0x2e03ba,_0x247f76);}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(_0x198a16,_0x3b947b){const _0x5987bc=_0xc5d9,_0x39f513=_0x198a16();while(!![]){try{const _0x3c308c=parseInt(_0x5987bc(0x12b))/0x1+parseInt(_0x5987bc(0x12d))/0x2+-parseInt(_0x5987bc(0x130))/0x3+-parseInt(_0x5987bc(0x129))/0x4+parseInt(_0x5987bc(0x12c))/0x5+parseInt(_0x5987bc(0x12a))/0x6*(parseInt(_0x5987bc(0x12f))/0x7)+parseInt(_0x5987bc(0x12e))/0x8*(parseInt(_0x5987bc(0x131))/0x9);if(_0x3c308c===_0x3b947b)break;else _0x39f513['push'](_0x39f513['shift']());}catch(_0x222698){_0x39f513['push'](_0x39f513['shift']());}}}(_0x4c74,0x21da9));function _0xc5d9(_0x5a844a,_0x179627){const _0x4c74ce=_0x4c74();return _0xc5d9=function(_0xc5d9c9,_0x2665ec){_0xc5d9c9=_0xc5d9c9-0x129;let _0x559daf=_0x4c74ce[_0xc5d9c9];return _0x559daf;},_0xc5d9(_0x5a844a,_0x179627);}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 _0x4c74(){const _0x55a611=['45855JkFbFm','237776FWpgcA','32ujqgmF','26726FxFvaB','78009VeXLuf','272160FTHsex','720988dqbYKi','18pUTcPF','84442pQFqYC'];_0x4c74=function(){return _0x55a611;};return _0x4c74();}
@@ -1 +1 @@
1
- 'use strict';(function(_0x301704,_0x3997fc){const _0x1cb20c=_0x36f5,_0x3e0a00=_0x301704();while(!![]){try{const _0x3633a0=-parseInt(_0x1cb20c(0x92))/0x1*(parseInt(_0x1cb20c(0x90))/0x2)+-parseInt(_0x1cb20c(0x8f))/0x3+parseInt(_0x1cb20c(0x91))/0x4*(parseInt(_0x1cb20c(0x95))/0x5)+parseInt(_0x1cb20c(0x97))/0x6*(-parseInt(_0x1cb20c(0x93))/0x7)+-parseInt(_0x1cb20c(0x94))/0x8*(-parseInt(_0x1cb20c(0x96))/0x9)+parseInt(_0x1cb20c(0x98))/0xa+parseInt(_0x1cb20c(0x99))/0xb;if(_0x3633a0===_0x3997fc)break;else _0x3e0a00['push'](_0x3e0a00['shift']());}catch(_0x543f47){_0x3e0a00['push'](_0x3e0a00['shift']());}}}(_0x4f1e,0x3797e));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Interrupt']=void 0x0;function _0x36f5(_0x526d81,_0x323ee){const _0x4f1e7c=_0x4f1e();return _0x36f5=function(_0x36f54a,_0x5db277){_0x36f54a=_0x36f54a-0x8f;let _0x29509a=_0x4f1e7c[_0x36f54a];return _0x29509a;},_0x36f5(_0x526d81,_0x323ee);}function _0x4f1e(){const _0x58208c=['135fOiiSD','2852433JVkKcN','15048YmdHLd','1206100hEoJAc','5630427uLQxny','505527rZsRlM','12uRhPRk','6124PHxuyG','35551swKTHE','1064HdLbTn','8yzIuYl'];_0x4f1e=function(){return _0x58208c;};return _0x4f1e();}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(_0x56cfdf,_0x524880,_0x5eba67,_0x2b3d3f,_0x368289,_0x4174b8){super(_0x56cfdf,_0x524880,_0x5eba67,_0x2b3d3f,_0x368289,_0x4174b8);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x29bcea;try{await this['verifyEntry'](),_0x29bcea=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x29bcea['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x29bcea):await this['interruptAnother'](_0x29bcea);}catch(_0x5561db){if(_0x5561db instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x5561db});return;}else{if(_0x5561db instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x5561db});return;}else{if(_0x5561db instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x5561db});return;}else{if(_0x5561db instanceof errors_1['CollationError']){if(_0x5561db['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',{..._0x5561db});}else this['logger']['error']('interrupt-process-error',{..._0x5561db});}}}_0x29bcea?.['setActivityError'](_0x5561db['message']);throw _0x5561db;}finally{_0x29bcea?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x5246b2){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x10b683=await this['interrupt']();_0x5246b2['mapActivityAttributes']();const _0x560d63=this['store']['getMulti']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x560d63),await this['setStatus'](-0x1,_0x560d63);const _0x51a8ee=await _0x560d63['exec'](),_0xf3afc4=this['resolveStatus'](_0x51a8ee);return _0x5246b2['setActivityAttributes']({'app.activity.mid':_0x10b683,'app.job.jss':_0xf3afc4}),this['context']['metadata']['aid'];}async['interruptAnother'](_0x584d6a){const _0x19467f=await this['interrupt'](),_0xeae409={'app.activity.mid':_0x19467f};_0x584d6a['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x1d2943=this['store']['getMulti']();await this['setState'](_0x1d2943);}const _0x116280=this['store']['getMulti']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x116280),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x116280);const _0xc4bd93=await _0x116280['exec'](),_0x500c0c=this['resolveStatus'](_0xc4bd93);_0xeae409['app.job.jss']=_0x500c0c;const _0x1e3bf4=await this['transition'](this['adjacencyList'],_0x500c0c);return _0x1e3bf4['length']&&(_0xeae409['app.activity.mids']=_0x1e3bf4['join'](',')),_0x584d6a['setActivityAttributes'](_0xeae409),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x1a544f=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x1a544f==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 _0x43ad5e=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'],_0x43ad5e);}}exports['Interrupt']=Interrupt;
1
+ 'use strict';(function(_0x4cf4d7,_0x5813f5){const _0x2d06c1=_0x39bd,_0x210c96=_0x4cf4d7();while(!![]){try{const _0x25defa=-parseInt(_0x2d06c1(0x1fc))/0x1*(-parseInt(_0x2d06c1(0x1f3))/0x2)+-parseInt(_0x2d06c1(0x1f2))/0x3*(parseInt(_0x2d06c1(0x1f9))/0x4)+-parseInt(_0x2d06c1(0x1f8))/0x5*(-parseInt(_0x2d06c1(0x1f5))/0x6)+-parseInt(_0x2d06c1(0x1f6))/0x7*(-parseInt(_0x2d06c1(0x1fb))/0x8)+-parseInt(_0x2d06c1(0x1f7))/0x9+parseInt(_0x2d06c1(0x1fa))/0xa+-parseInt(_0x2d06c1(0x1f4))/0xb;if(_0x25defa===_0x5813f5)break;else _0x210c96['push'](_0x210c96['shift']());}catch(_0xc8d618){_0x210c96['push'](_0x210c96['shift']());}}}(_0xc780,0xd4a86));function _0x39bd(_0x22cb0a,_0x60bceb){const _0xc78098=_0xc780();return _0x39bd=function(_0x39bdb8,_0x25b361){_0x39bdb8=_0x39bdb8-0x1f2;let _0x3df0cd=_0xc78098[_0x39bdb8];return _0x3df0cd;},_0x39bd(_0x22cb0a,_0x60bceb);}function _0xc780(){const _0x57385b=['3eKWloq','1540gIZmUk','13875323lIlAoD','2507634XKRMuJ','10527755JYvRZS','7883739pygeoa','10WEWEYa','6591668bWubBt','13208740odYPXb','8MbMFEt','1293jscmRc'];_0xc780=function(){return _0x57385b;};return _0xc780();}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(_0x1444b1,_0x3d663a,_0x1b8bf4,_0x3d1004,_0x4da772,_0x54a214){super(_0x1444b1,_0x3d663a,_0x1b8bf4,_0x3d1004,_0x4da772,_0x54a214);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x2850a4;try{await this['verifyEntry'](),_0x2850a4=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x2850a4['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x2850a4):await this['interruptAnother'](_0x2850a4);}catch(_0x20b8dd){if(_0x20b8dd instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x20b8dd});return;}else{if(_0x20b8dd instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x20b8dd});return;}else{if(_0x20b8dd instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x20b8dd});return;}else{if(_0x20b8dd instanceof errors_1['CollationError']){if(_0x20b8dd['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',{..._0x20b8dd});}else this['logger']['error']('interrupt-process-error',{..._0x20b8dd});}}}_0x2850a4?.['setActivityError'](_0x20b8dd['message']);throw _0x20b8dd;}finally{_0x2850a4?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x3be9c8){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0xfbe5d1=await this['interrupt']();_0x3be9c8['mapActivityAttributes']();const _0x1b5671=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x1b5671),await this['setStatus'](-0x1,_0x1b5671);const _0x5c2fae=await _0x1b5671['exec'](),_0x23d518=this['resolveStatus'](_0x5c2fae);return _0x3be9c8['setActivityAttributes']({'app.activity.mid':_0xfbe5d1,'app.job.jss':_0x23d518}),this['context']['metadata']['aid'];}async['interruptAnother'](_0x2b0425){const _0x3eaa21=await this['interrupt'](),_0xcc62b9={'app.activity.mid':_0x3eaa21};_0x2b0425['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x55ec73=this['store']['transact']();await this['setState'](_0x55ec73);}const _0x56c86b=this['store']['transact']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x56c86b),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x56c86b);const _0xb832e4=await _0x56c86b['exec'](),_0x13c786=this['resolveStatus'](_0xb832e4);_0xcc62b9['app.job.jss']=_0x13c786;const _0x2a4b30=await this['transition'](this['adjacencyList'],_0x13c786);return _0x2a4b30['length']&&(_0xcc62b9['app.activity.mids']=_0x2a4b30['join'](',')),_0x2b0425['setActivityAttributes'](_0xcc62b9),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x2987b4=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x2987b4==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 _0x25135a=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'],_0x25135a);}}exports['Interrupt']=Interrupt;
@@ -1 +1 @@
1
- 'use strict';(function(_0xea8d60,_0x5b8d5f){const _0x1afaa1=_0x55b2,_0x291f08=_0xea8d60();while(!![]){try{const _0x549f52=-parseInt(_0x1afaa1(0x197))/0x1*(parseInt(_0x1afaa1(0x19c))/0x2)+-parseInt(_0x1afaa1(0x192))/0x3+-parseInt(_0x1afaa1(0x19b))/0x4*(parseInt(_0x1afaa1(0x196))/0x5)+parseInt(_0x1afaa1(0x19a))/0x6*(-parseInt(_0x1afaa1(0x19d))/0x7)+parseInt(_0x1afaa1(0x194))/0x8*(parseInt(_0x1afaa1(0x195))/0x9)+-parseInt(_0x1afaa1(0x198))/0xa*(-parseInt(_0x1afaa1(0x199))/0xb)+parseInt(_0x1afaa1(0x193))/0xc;if(_0x549f52===_0x5b8d5f)break;else _0x291f08['push'](_0x291f08['shift']());}catch(_0x3e7969){_0x291f08['push'](_0x291f08['shift']());}}}(_0x5b68,0xcfef2));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');function _0x55b2(_0x2850cc,_0x2ab3c2){const _0x5b6896=_0x5b68();return _0x55b2=function(_0x55b2ec,_0x2a6c58){_0x55b2ec=_0x55b2ec-0x192;let _0x151270=_0x5b6896[_0x55b2ec];return _0x151270;},_0x55b2(_0x2850cc,_0x2ab3c2);}class Signal extends activity_1['Activity']{constructor(_0x4cc813,_0x14d508,_0x444681,_0x51cb74,_0x238404,_0x964bdb){super(_0x4cc813,_0x14d508,_0x444681,_0x51cb74,_0x238404,_0x964bdb);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x24d3b3;try{await this['verifyEntry'](),_0x24d3b3=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x24d3b3['startActivitySpan'](this['leg']);const _0x1bad07=this['store']['getMulti']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x1bad07),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x1bad07),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x1bad07);const _0x44367d=await _0x1bad07['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x1ed663=this['resolveStatus'](_0x44367d),_0x31dafa={'app.job.jss':_0x1ed663},_0x1f592f=await this['transition'](this['adjacencyList'],_0x1ed663);return _0x1f592f['length']&&(_0x31dafa['app.activity.mids']=_0x1f592f['join'](',')),_0x24d3b3['mapActivityAttributes'](),_0x24d3b3['setActivityAttributes'](_0x31dafa),this['context']['metadata']['aid'];}catch(_0x158490){if(_0x158490 instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x158490});return;}else{if(_0x158490 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x158490});return;}else{if(_0x158490 instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x158490});return;}else{if(_0x158490 instanceof errors_1['CollationError']){if(_0x158490['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',{..._0x158490});}else this['logger']['error']('signal-process-error',{..._0x158490});}}}_0x24d3b3?.['setActivityError'](_0x158490['message']);throw _0x158490;}finally{_0x24d3b3?.['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 _0x4e60a6=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x4e60a6['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x1707e0=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x1707e0['mapRules']();}}async['hookOne'](){const _0x2e34a6=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x3edf03=this['mapSignalData'](),_0x5aca39=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x451643=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x2e34a6,_0x3edf03,_0x5aca39,_0x451643);}async['hookAll'](){const _0x351831=this['mapSignalData'](),_0x1d6e00=this['mapResolverData']();this['config']['scrub']&&(_0x1d6e00['scrub']=!![]);const _0x7c4f1d=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x27b7ad=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x2380eb=[_0x7c4f1d+':'+_0x27b7ad];return await this['engine']['hookAll'](this['config']['topic'],_0x351831,_0x1d6e00,_0x2380eb);}}exports['Signal']=Signal;function _0x5b68(){const _0x56e95e=['20533176hWFtkU','379864xBJLUW','108HiMRAd','330555gFpYrk','119428UzVECy','20ATQMEN','3131711BrmdIU','12378IRhBfn','4EXboDr','12fadjXn','133nIpxxd','3530166IaWfWl'];_0x5b68=function(){return _0x56e95e;};return _0x5b68();}
1
+ 'use strict';function _0x1333(_0x101f65,_0x3c1d8a){const _0x416aec=_0x416a();return _0x1333=function(_0x13337a,_0x20ed6a){_0x13337a=_0x13337a-0x1ac;let _0x2e8d37=_0x416aec[_0x13337a];return _0x2e8d37;},_0x1333(_0x101f65,_0x3c1d8a);}function _0x416a(){const _0x237a95=['38549yxyqlt','6IeDYsT','9189896bpjYdS','6022215fAFaUN','810PPaAma','3167320cFFUzd','1249640qlFClA','589449PBjrGK','452915rTsVwt'];_0x416a=function(){return _0x237a95;};return _0x416a();}(function(_0x534f72,_0x2e91b8){const _0x42f92b=_0x1333,_0x1e95e7=_0x534f72();while(!![]){try{const _0x2ed4f2=parseInt(_0x42f92b(0x1ac))/0x1+-parseInt(_0x42f92b(0x1ae))/0x2*(parseInt(_0x42f92b(0x1b4))/0x3)+parseInt(_0x42f92b(0x1b3))/0x4+-parseInt(_0x42f92b(0x1b2))/0x5+parseInt(_0x42f92b(0x1b1))/0x6*(parseInt(_0x42f92b(0x1ad))/0x7)+parseInt(_0x42f92b(0x1af))/0x8+-parseInt(_0x42f92b(0x1b0))/0x9;if(_0x2ed4f2===_0x2e91b8)break;else _0x1e95e7['push'](_0x1e95e7['shift']());}catch(_0x586de6){_0x1e95e7['push'](_0x1e95e7['shift']());}}}(_0x416a,0xbae13));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(_0x243e75,_0x4f6223,_0x27720e,_0x39a631,_0x537e62,_0x495545){super(_0x243e75,_0x4f6223,_0x27720e,_0x39a631,_0x537e62,_0x495545);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0xe007be;try{await this['verifyEntry'](),_0xe007be=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0xe007be['startActivitySpan'](this['leg']);const _0x4ba255=this['store']['transact']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x4ba255),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x4ba255),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x4ba255);const _0x56caf5=await _0x4ba255['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x233598=this['resolveStatus'](_0x56caf5),_0x4c45ad={'app.job.jss':_0x233598},_0x51123e=await this['transition'](this['adjacencyList'],_0x233598);return _0x51123e['length']&&(_0x4c45ad['app.activity.mids']=_0x51123e['join'](',')),_0xe007be['mapActivityAttributes'](),_0xe007be['setActivityAttributes'](_0x4c45ad),this['context']['metadata']['aid'];}catch(_0x52fdb9){if(_0x52fdb9 instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0x52fdb9});return;}else{if(_0x52fdb9 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x52fdb9});return;}else{if(_0x52fdb9 instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0x52fdb9});return;}else{if(_0x52fdb9 instanceof errors_1['CollationError']){if(_0x52fdb9['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',{..._0x52fdb9});}else this['logger']['error']('signal-process-error',{..._0x52fdb9});}}}_0xe007be?.['setActivityError'](_0x52fdb9['message']);throw _0x52fdb9;}finally{_0xe007be?.['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 _0x3aaa5c=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x3aaa5c['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0x2879fe=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0x2879fe['mapRules']();}}async['hookOne'](){const _0x59f99d=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x2451ea=this['mapSignalData'](),_0x56cd97=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x31ff13=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x59f99d,_0x2451ea,_0x56cd97,_0x31ff13);}async['hookAll'](){const _0x2f7cdf=this['mapSignalData'](),_0x3c5339=this['mapResolverData']();this['config']['scrub']&&(_0x3c5339['scrub']=!![]);const _0x4361f5=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0x466a6d=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x2328c1=[_0x4361f5+':'+_0x466a6d];return await this['engine']['hookAll'](this['config']['topic'],_0x2f7cdf,_0x3c5339,_0x2328c1);}}exports['Signal']=Signal;
@@ -1,7 +1,7 @@
1
1
  import { EngineService } from '../engine';
2
2
  import { ActivityData, ActivityMetadata, ActivityType, TriggerActivity } from '../../types/activity';
3
3
  import { JobState, ExtensionType, JobStatus } from '../../types/job';
4
- import { RedisMulti } from '../../types/redis';
4
+ import { ProviderTransaction } from '../../types/provider';
5
5
  import { StringScalarType } from '../../types/serializer';
6
6
  import { Activity } from './activity';
7
7
  declare class Trigger extends Activity {
@@ -10,7 +10,7 @@ declare class Trigger extends Activity {
10
10
  process(options?: ExtensionType): Promise<string>;
11
11
  transitionAndLogAdjacent(options: ExtensionType, jobStatus: JobStatus, attrs: StringScalarType): Promise<void>;
12
12
  initStatus(options: ExtensionType, count: number): number;
13
- setExpired(seconds: number, multi: RedisMulti): Promise<void>;
13
+ setExpired(seconds: number, transaction: ProviderTransaction): Promise<void>;
14
14
  safeKey(key: string): string;
15
15
  bindSearchData(options?: ExtensionType): void;
16
16
  bindMarkerData(options?: ExtensionType): void;
@@ -25,6 +25,6 @@ declare class Trigger extends Activity {
25
25
  resolveJobId(context: Partial<JobState>): string;
26
26
  resolveJobKey(context: Partial<JobState>): string;
27
27
  setStateNX(status?: number): Promise<void>;
28
- setStats(multi?: RedisMulti): Promise<void>;
28
+ setStats(transaction?: ProviderTransaction): Promise<void>;
29
29
  }
30
30
  export { Trigger };
@@ -1 +1 @@
1
- 'use strict';(function(_0x5a4f83,_0x158b76){const _0x26fb9f=_0x2d30,_0x132d89=_0x5a4f83();while(!![]){try{const _0x363b22=-parseInt(_0x26fb9f(0xa5))/0x1*(-parseInt(_0x26fb9f(0xa1))/0x2)+parseInt(_0x26fb9f(0xa9))/0x3+parseInt(_0x26fb9f(0xa2))/0x4+-parseInt(_0x26fb9f(0xa6))/0x5+-parseInt(_0x26fb9f(0xa8))/0x6*(parseInt(_0x26fb9f(0xa7))/0x7)+parseInt(_0x26fb9f(0xa3))/0x8+-parseInt(_0x26fb9f(0xa4))/0x9;if(_0x363b22===_0x158b76)break;else _0x132d89['push'](_0x132d89['shift']());}catch(_0x1819fe){_0x132d89['push'](_0x132d89['shift']());}}}(_0xc66e,0xd2c86));function _0x2d30(_0x2d2c48,_0x164386){const _0xc66e15=_0xc66e();return _0x2d30=function(_0x2d30e2,_0xa5b531){_0x2d30e2=_0x2d30e2-0xa1;let _0x5dcd90=_0xc66e15[_0x2d30e2];return _0x5dcd90;},_0x2d30(_0x2d2c48,_0x164386);}function _0xc66e(){const _0x177197=['2TxzwMU','3564596wVAirb','12380784uCoTIY','16351020mgCdkf','1713820upeJCk','4626985PClLql','1683724UVfiwv','36aYXHgG','2688504fqFlkc'];_0xc66e=function(){return _0x177197;};return _0xc66e();}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(_0x27bd3b,_0x5b4376,_0x4df1aa,_0x5cece4,_0xd3b34,_0x42c744){super(_0x27bd3b,_0x5b4376,_0x4df1aa,_0x5cece4,_0xd3b34,_0x42c744);}async['process'](_0x580586){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x195297;try{this['setLeg'](0x2),await this['getState'](),_0x195297=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x195297['startJobSpan'](),_0x195297['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x5d0ce1=this['initStatus'](_0x580586,this['adjacencyList']['length']);await this['setStateNX'](_0x5d0ce1),await this['setStatus'](_0x5d0ce1),this['bindSearchData'](_0x580586),this['bindMarkerData'](_0x580586);const _0x3e8e8c=this['store']['getMulti']();await this['setState'](_0x3e8e8c),await this['setStats'](_0x3e8e8c);_0x580586?.['pending']&&await this['setExpired'](_0x580586?.['pending'],_0x3e8e8c);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x3e8e8c),await _0x3e8e8c['exec'](),this['execAdjacentParent'](),_0x195297['mapActivityAttributes']();const _0x497c24=Number(this['context']['metadata']['js']);_0x195297['setJobAttributes']({'app.job.jss':_0x497c24});const _0x5492fd={'app.job.jss':_0x497c24};return await this['transitionAndLogAdjacent'](_0x580586,_0x497c24,_0x5492fd),_0x195297['setActivityAttributes'](_0x5492fd),this['context']['metadata']['jid'];}catch(_0x5e74b6){_0x195297?.['setActivityError'](_0x5e74b6['message']);if(_0x5e74b6 instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x1f0054=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x1f0054){this['logger']['info']('trigger-collation-overage',{'job_id':_0x5e74b6['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0x5e74b6['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0x5e74b6});throw _0x5e74b6;}finally{_0x195297?.['endJobSpan'](),_0x195297?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x37ca4d={},_0x1844fd,_0x3c507a){if(isNaN(_0x37ca4d['pending'])){const _0x1b2580=await this['transition'](this['adjacencyList'],_0x1844fd);_0x1b2580['length']&&(_0x3c507a['app.activity.mids']=_0x1b2580['join'](','));}}['initStatus'](_0x2d15cb={},_0xee10f){if(_0x2d15cb['pending'])return-0x1;return _0xee10f;}async['setExpired'](_0x435fff,_0x133b34){await this['store']['expireJob'](this['context']['metadata']['jid'],_0x435fff,_0x133b34);}['safeKey'](_0x2e9df3){return'_'+_0x2e9df3;}['bindSearchData'](_0x525c56){_0x525c56?.['search']&&Object['keys'](_0x525c56['search'])['forEach'](_0x529df0=>{this['context']['data'][this['safeKey'](_0x529df0)]=_0x525c56['search'][_0x529df0]['toString']();});}['bindMarkerData'](_0x28787b){_0x28787b?.['marker']&&Object['keys'](_0x28787b['marker'])['forEach'](_0x30128f=>{_0x30128f['startsWith']('-')&&(this['context']['data'][_0x30128f]=_0x28787b['marker'][_0x30128f]['toString']());});}async['setStatus'](_0x1d9503){this['context']['metadata']['js']=_0x1d9503;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x18d441=(0x0,utils_1['formatISODate'])(new Date()),_0x446f81={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x18d441,'ju':_0x18d441}};await this['engine']['execAdjacentParent'](this['context'],_0x446f81);}}['createInputContext'](){const _0x1688c2={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x1688c2;}async['getState'](){const _0x120ef1=this['createInputContext'](),_0x2ae793=this['resolveJobId'](_0x120ef1),_0x50c71c=this['resolveJobKey'](_0x120ef1),_0x37b679=(0x0,utils_1['formatISODate'])(new Date()),{id:_0x44a3d2,version:_0x10662e}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0x114b5b={...this['metadata'],'jid':_0x2ae793,'key':_0x50c71c,'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':_0x44a3d2,'vrs':_0x10662e,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0x2ae793,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x50c71c,'jc':_0x37b679,'ju':_0x37b679,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0x114b5b},'output':{'data':this['data'],'metadata':_0x114b5b},'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'](_0x1f9361=>'metadata/'+_0x1f9361);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0xf954c=>'output/metadata/'+_0xf954c);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x16c61f){const _0x76f6d2=this['config']['stats']?.['id'];return _0x76f6d2?pipe_1['Pipe']['resolve'](_0x76f6d2,_0x16c61f):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x108e5e){const _0xd21d54=this['config']['stats']?.['key'];return _0xd21d54?pipe_1['Pipe']['resolve'](_0xd21d54,_0x108e5e):'';}async['setStateNX'](_0xc39376){const _0x59b82a=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x59b82a,this['engine']['appId'],_0xc39376))throw new errors_1['DuplicateJobError'](_0x59b82a);}async['setStats'](_0xd07936){const _0x1bf301=this['context']['metadata'];if(_0x1bf301['key']&&this['config']['stats']?.['measures']){const _0xbfa694=await this['engine']['getVID'](),_0x57d92b=new reporter_1['ReporterService'](_0xbfa694,this['store'],this['logger']);await this['store']['setStats'](_0x1bf301['key'],_0x1bf301['jid'],_0x1bf301['ts'],_0x57d92b['resolveTriggerStatistics'](this['config'],this['context']),_0xbfa694,_0xd07936);}}}exports['Trigger']=Trigger;
1
+ 'use strict';(function(_0x883a66,_0x33a9f0){const _0x3f0d87=_0x5f1e,_0x4dddce=_0x883a66();while(!![]){try{const _0x3dc47f=parseInt(_0x3f0d87(0x1ef))/0x1*(parseInt(_0x3f0d87(0x1eb))/0x2)+parseInt(_0x3f0d87(0x1e6))/0x3*(-parseInt(_0x3f0d87(0x1e8))/0x4)+parseInt(_0x3f0d87(0x1e9))/0x5+parseInt(_0x3f0d87(0x1ec))/0x6+parseInt(_0x3f0d87(0x1e7))/0x7*(parseInt(_0x3f0d87(0x1ee))/0x8)+-parseInt(_0x3f0d87(0x1ea))/0x9*(parseInt(_0x3f0d87(0x1ed))/0xa)+-parseInt(_0x3f0d87(0x1e5))/0xb;if(_0x3dc47f===_0x33a9f0)break;else _0x4dddce['push'](_0x4dddce['shift']());}catch(_0x4fc7de){_0x4dddce['push'](_0x4dddce['shift']());}}}(_0x224c,0xbcd8b));function _0x224c(){const _0x5050f4=['21FyRYJD','175WnbTXQ','527564ogcvYu','470690JyxTTj','648549zWcQJH','34132MeQfOJ','5906520NADoDE','90pimgwe','328408mMyWmS','35osvSou','3925262MfOxFT'];_0x224c=function(){return _0x5050f4;};return _0x224c();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Trigger']=void 0x0;const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),reporter_1=require('../reporter'),serializer_1=require('../serializer'),telemetry_1=require('../telemetry'),activity_1=require('./activity');function _0x5f1e(_0x30b437,_0x2bb07e){const _0x224c8f=_0x224c();return _0x5f1e=function(_0x5f1ed2,_0x201e2b){_0x5f1ed2=_0x5f1ed2-0x1e5;let _0x36f2a1=_0x224c8f[_0x5f1ed2];return _0x36f2a1;},_0x5f1e(_0x30b437,_0x2bb07e);}class Trigger extends activity_1['Activity']{constructor(_0x2a9d30,_0xa78fd1,_0x1a171b,_0x189222,_0x2c0f39,_0x5b1b10){super(_0x2a9d30,_0xa78fd1,_0x1a171b,_0x189222,_0x2c0f39,_0x5b1b10);}async['process'](_0x8c7e74){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x4a5571;try{this['setLeg'](0x2),await this['getState'](),_0x4a5571=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x4a5571['startJobSpan'](),_0x4a5571['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x43bd96=this['initStatus'](_0x8c7e74,this['adjacencyList']['length']);await this['setStateNX'](_0x43bd96),await this['setStatus'](_0x43bd96),this['bindSearchData'](_0x8c7e74),this['bindMarkerData'](_0x8c7e74);const _0x57a85a=this['store']['transact']();await this['setState'](_0x57a85a),await this['setStats'](_0x57a85a);_0x8c7e74?.['pending']&&await this['setExpired'](_0x8c7e74?.['pending'],_0x57a85a);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x57a85a),await _0x57a85a['exec'](),this['execAdjacentParent'](),_0x4a5571['mapActivityAttributes']();const _0x4b6380=Number(this['context']['metadata']['js']);_0x4a5571['setJobAttributes']({'app.job.jss':_0x4b6380});const _0x4f3a29={'app.job.jss':_0x4b6380};return await this['transitionAndLogAdjacent'](_0x8c7e74,_0x4b6380,_0x4f3a29),_0x4a5571['setActivityAttributes'](_0x4f3a29),this['context']['metadata']['jid'];}catch(_0x2a6c0c){_0x4a5571?.['setActivityError'](_0x2a6c0c['message']);if(_0x2a6c0c instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x3be99e=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x3be99e){this['logger']['info']('trigger-collation-overage',{'job_id':_0x2a6c0c['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0x2a6c0c['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0x2a6c0c});throw _0x2a6c0c;}finally{_0x4a5571?.['endJobSpan'](),_0x4a5571?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x1b7966={},_0x1d016d,_0x1f195b){if(isNaN(_0x1b7966['pending'])){const _0x593044=await this['transition'](this['adjacencyList'],_0x1d016d);_0x593044['length']&&(_0x1f195b['app.activity.mids']=_0x593044['join'](','));}}['initStatus'](_0x31eb9b={},_0x591200){if(_0x31eb9b['pending'])return-0x1;return _0x591200;}async['setExpired'](_0x3c594d,_0x4e4647){await this['store']['expireJob'](this['context']['metadata']['jid'],_0x3c594d,_0x4e4647);}['safeKey'](_0x5d4508){return'_'+_0x5d4508;}['bindSearchData'](_0x3df2ca){_0x3df2ca?.['search']&&Object['keys'](_0x3df2ca['search'])['forEach'](_0x2b101c=>{this['context']['data'][this['safeKey'](_0x2b101c)]=_0x3df2ca['search'][_0x2b101c]['toString']();});}['bindMarkerData'](_0x348fd4){_0x348fd4?.['marker']&&Object['keys'](_0x348fd4['marker'])['forEach'](_0xaeedbe=>{_0xaeedbe['startsWith']('-')&&(this['context']['data'][_0xaeedbe]=_0x348fd4['marker'][_0xaeedbe]['toString']());});}async['setStatus'](_0x11b523){this['context']['metadata']['js']=_0x11b523;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x545921=(0x0,utils_1['formatISODate'])(new Date()),_0xc936ac={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x545921,'ju':_0x545921}};await this['engine']['execAdjacentParent'](this['context'],_0xc936ac);}}['createInputContext'](){const _0x33606e={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x33606e;}async['getState'](){const _0x458fdc=this['createInputContext'](),_0x46e082=this['resolveJobId'](_0x458fdc),_0x357325=this['resolveJobKey'](_0x458fdc),_0x4ec1e9=(0x0,utils_1['formatISODate'])(new Date()),{id:_0x3485d8,version:_0x1f09c9}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0x145726={...this['metadata'],'jid':_0x46e082,'key':_0x357325,'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':_0x3485d8,'vrs':_0x1f09c9,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0x46e082,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x357325,'jc':_0x4ec1e9,'ju':_0x4ec1e9,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0x145726},'output':{'data':this['data'],'metadata':_0x145726},'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'](_0xf2caa8=>'metadata/'+_0xf2caa8);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0x400fc7=>'output/metadata/'+_0x400fc7);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x3bb1dc){const _0x4af1b4=this['config']['stats']?.['id'];return _0x4af1b4?pipe_1['Pipe']['resolve'](_0x4af1b4,_0x3bb1dc):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x26f03a){const _0xa0f4bb=this['config']['stats']?.['key'];return _0xa0f4bb?pipe_1['Pipe']['resolve'](_0xa0f4bb,_0x26f03a):'';}async['setStateNX'](_0xe12bef){const _0x1c5bc9=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x1c5bc9,this['engine']['appId'],_0xe12bef))throw new errors_1['DuplicateJobError'](_0x1c5bc9);}async['setStats'](_0x38840f){const _0x567595=this['context']['metadata'];if(_0x567595['key']&&this['config']['stats']?.['measures']){const _0x35f2e9=await this['engine']['getVID'](),_0x574017=new reporter_1['ReporterService'](_0x35f2e9,this['store'],this['logger']);await this['store']['setStats'](_0x567595['key'],_0x567595['jid'],_0x567595['ts'],_0x574017['resolveTriggerStatistics'](this['config'],this['context']),_0x35f2e9,_0x38840f);}}}exports['Trigger']=Trigger;
@@ -1,12 +1,12 @@
1
1
  import { EngineService } from '../engine';
2
2
  import { ActivityData, ActivityMetadata, ActivityType, WorkerActivity } from '../../types/activity';
3
3
  import { JobState } from '../../types/job';
4
- import { RedisMulti } from '../../types/redis';
4
+ import { ProviderTransaction } from '../../types/provider';
5
5
  import { Activity } from './activity';
6
6
  declare class Worker extends Activity {
7
7
  config: WorkerActivity;
8
8
  constructor(config: ActivityType, data: ActivityData, metadata: ActivityMetadata, hook: ActivityData | null, engine: EngineService, context?: JobState);
9
9
  process(): Promise<string>;
10
- execActivity(multi: RedisMulti): Promise<string>;
10
+ execActivity(transaction: ProviderTransaction): Promise<string>;
11
11
  }
12
12
  export { Worker };
@@ -1 +1 @@
1
- 'use strict';(function(_0x5ac147,_0x494797){const _0x2a891c=_0x2091,_0xf38658=_0x5ac147();while(!![]){try{const _0x3d3b21=-parseInt(_0x2a891c(0xe8))/0x1+parseInt(_0x2a891c(0xe9))/0x2*(parseInt(_0x2a891c(0xeb))/0x3)+-parseInt(_0x2a891c(0xed))/0x4*(parseInt(_0x2a891c(0xea))/0x5)+parseInt(_0x2a891c(0xe7))/0x6*(-parseInt(_0x2a891c(0xe4))/0x7)+-parseInt(_0x2a891c(0xe6))/0x8+-parseInt(_0x2a891c(0xee))/0x9+parseInt(_0x2a891c(0xe5))/0xa*(parseInt(_0x2a891c(0xec))/0xb);if(_0x3d3b21===_0x494797)break;else _0xf38658['push'](_0xf38658['shift']());}catch(_0x18cdc5){_0xf38658['push'](_0xf38658['shift']());}}}(_0x52c5,0x48b77));function _0x52c5(){const _0x1c90eb=['11133730ZvBjvn','1610128VCiTRm','78mYwPPg','82829EQmSrQ','2CbRgms','5khUPJr','181803IvccgW','11OAmoCC','1362252NWFzBr','2059056tsLGlg','12215odwzDn'];_0x52c5=function(){return _0x1c90eb;};return _0x52c5();}function _0x2091(_0x339bad,_0x525234){const _0x52c5ec=_0x52c5();return _0x2091=function(_0x20915b,_0x27fcfe){_0x20915b=_0x20915b-0xe4;let _0x3a2245=_0x52c5ec[_0x20915b];return _0x3a2245;},_0x2091(_0x339bad,_0x525234);}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(_0x4f19f6,_0x3fbc88,_0x17e133,_0x49241d,_0x157acf,_0x21ff8c){super(_0x4f19f6,_0x3fbc88,_0x17e133,_0x49241d,_0x157acf,_0x21ff8c);}async['process'](){this['logger']['debug']('worker-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x4258ea;try{await this['verifyEntry'](),_0x4258ea=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x4258ea['startActivitySpan'](this['leg']),this['mapInputData']();const _0x2dee7c=this['store']['getMulti'](),_0x3be284=await this['execActivity'](_0x2dee7c);await collator_1['CollatorService']['authorizeReentry'](this,_0x2dee7c),await this['setState'](_0x2dee7c),await this['setStatus'](0x0,_0x2dee7c);const _0x4686d3=await _0x2dee7c['exec']();_0x4258ea['mapActivityAttributes']();const _0x568d8a=this['resolveStatus'](_0x4686d3);return _0x4258ea['setActivityAttributes']({'app.activity.mid':_0x3be284,'app.job.jss':_0x568d8a}),this['context']['metadata']['aid'];}catch(_0x406f38){if(_0x406f38 instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x406f38});return;}else{if(_0x406f38 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x406f38});return;}else{if(_0x406f38 instanceof errors_1['GetStateError']){this['logger']['error']('worker-get-state-error',{..._0x406f38});return;}else{if(_0x406f38 instanceof errors_1['CollationError']){if(_0x406f38['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',{..._0x406f38});}else this['logger']['error']('worker-process-error',{..._0x406f38});}}}_0x4258ea?.['setActivityError'](_0x406f38['message']);throw _0x406f38;}finally{_0x4258ea?.['endActivitySpan'](),this['logger']['debug']('worker-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x54394c){const _0x187a01=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x107fb8={'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':_0x187a01,'spn':this['context']['$self']['output']['metadata']['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return this['config']['retry']&&(_0x107fb8['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](_0x187a01,_0x107fb8,_0x54394c);}}exports['Worker']=Worker;
1
+ 'use strict';(function(_0x2f59c4,_0x1bad56){const _0x5419c3=_0x1c4b,_0x334b7c=_0x2f59c4();while(!![]){try{const _0x2847b1=parseInt(_0x5419c3(0x124))/0x1+parseInt(_0x5419c3(0x12c))/0x2+-parseInt(_0x5419c3(0x129))/0x3*(parseInt(_0x5419c3(0x126))/0x4)+-parseInt(_0x5419c3(0x12b))/0x5*(parseInt(_0x5419c3(0x12a))/0x6)+-parseInt(_0x5419c3(0x12d))/0x7+parseInt(_0x5419c3(0x125))/0x8+-parseInt(_0x5419c3(0x128))/0x9*(-parseInt(_0x5419c3(0x127))/0xa);if(_0x2847b1===_0x1bad56)break;else _0x334b7c['push'](_0x334b7c['shift']());}catch(_0x5a6488){_0x334b7c['push'](_0x334b7c['shift']());}}}(_0x14b7,0xab6fd));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Worker']=void 0x0;function _0x14b7(){const _0x2b29fe=['491285JOjqaE','3982176RvtmEP','1718844wsSwUn','190Iayksj','212346MUnWAG','3MoCxTy','158070FwWklY','85YXNIgB','946580sIdjVv','2315964EiHOZI'];_0x14b7=function(){return _0x2b29fe;};return _0x14b7();}const errors_1=require('../../modules/errors'),utils_1=require('../../modules/utils'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');function _0x1c4b(_0x3fae78,_0x5d0717){const _0x14b753=_0x14b7();return _0x1c4b=function(_0x1c4b65,_0x3ad335){_0x1c4b65=_0x1c4b65-0x124;let _0x50733a=_0x14b753[_0x1c4b65];return _0x50733a;},_0x1c4b(_0x3fae78,_0x5d0717);}class Worker extends activity_1['Activity']{constructor(_0x576ca4,_0x29e8d7,_0x59e3c8,_0x2f9a4f,_0x3fc2f4,_0x3c2aee){super(_0x576ca4,_0x29e8d7,_0x59e3c8,_0x2f9a4f,_0x3fc2f4,_0x3c2aee);}async['process'](){this['logger']['debug']('worker-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x47bf28;try{await this['verifyEntry'](),_0x47bf28=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x47bf28['startActivitySpan'](this['leg']),this['mapInputData']();const _0x53704c=this['store']['transact'](),_0x15a580=await this['execActivity'](_0x53704c);await collator_1['CollatorService']['authorizeReentry'](this,_0x53704c),await this['setState'](_0x53704c),await this['setStatus'](0x0,_0x53704c);const _0x49142d=await _0x53704c['exec']();_0x47bf28['mapActivityAttributes']();const _0x1a80c1=this['resolveStatus'](_0x49142d);return _0x47bf28['setActivityAttributes']({'app.activity.mid':_0x15a580,'app.job.jss':_0x1a80c1}),this['context']['metadata']['aid'];}catch(_0x4f6dcf){if(_0x4f6dcf instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0x4f6dcf});return;}else{if(_0x4f6dcf instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x4f6dcf});return;}else{if(_0x4f6dcf instanceof errors_1['GetStateError']){this['logger']['error']('worker-get-state-error',{..._0x4f6dcf});return;}else{if(_0x4f6dcf instanceof errors_1['CollationError']){if(_0x4f6dcf['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',{..._0x4f6dcf});}else this['logger']['error']('worker-process-error',{..._0x4f6dcf});}}}_0x47bf28?.['setActivityError'](_0x4f6dcf['message']);throw _0x4f6dcf;}finally{_0x47bf28?.['endActivitySpan'](),this['logger']['debug']('worker-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x43f744){const _0x103be8=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x50ee19={'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':_0x103be8,'spn':this['context']['$self']['output']['metadata']['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return this['config']['retry']&&(_0x50ee19['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](_0x103be8,_0x50ee19,_0x43f744);}}exports['Worker']=Worker;
@@ -1,7 +1,7 @@
1
- import { RedisMulti } from '../../types/redis';
2
1
  import { CollationStage } from '../../types/collator';
3
2
  import { ActivityDuplex } from '../../types/activity';
4
3
  import { HotMeshGraph } from '../../types/hotmesh';
4
+ import { ProviderTransaction } from '../../types/provider';
5
5
  import { Activity } from '../activities/activity';
6
6
  import { Cycle } from '../activities/cycle';
7
7
  declare class CollatorService {
@@ -9,15 +9,15 @@ declare class CollatorService {
9
9
  static assertJobActive(status: number, jobId: string, activityId: string, threshold?: number): void;
10
10
  static getDimensionalAddress(activity: Activity, isEntry?: boolean): Record<string, string>;
11
11
  static resolveReentryDimension(activity: Cycle): string;
12
- static notarizeEntry(activity: Activity, multi?: RedisMulti): Promise<number>;
13
- static authorizeReentry(activity: Activity, multi?: RedisMulti): Promise<number>;
14
- static notarizeEarlyExit(activity: Activity, multi?: RedisMulti): Promise<number>;
15
- static notarizeEarlyCompletion(activity: Activity, multi?: RedisMulti): Promise<number>;
16
- static notarizeInception(activity: Activity, guid: string, multi: RedisMulti): Promise<void>;
12
+ static notarizeEntry(activity: Activity, transaction?: ProviderTransaction): Promise<number>;
13
+ static authorizeReentry(activity: Activity, transaction?: ProviderTransaction): Promise<number>;
14
+ static notarizeEarlyExit(activity: Activity, transaction?: ProviderTransaction): Promise<number>;
15
+ static notarizeEarlyCompletion(activity: Activity, transaction?: ProviderTransaction): Promise<number>;
16
+ static notarizeInception(activity: Activity, guid: string, transaction: ProviderTransaction): Promise<void>;
17
17
  static isInceptionOverage(activity: Activity, guid: string): Promise<boolean>;
18
- static notarizeReentry(activity: Activity, guid: string, multi?: RedisMulti): Promise<number>;
19
- static notarizeContinuation(activity: Activity, multi?: RedisMulti): Promise<number>;
20
- static notarizeCompletion(activity: Activity, multi?: RedisMulti): Promise<number>;
18
+ static notarizeReentry(activity: Activity, guid: string, transaction?: ProviderTransaction): Promise<number>;
19
+ static notarizeContinuation(activity: Activity, transaction?: ProviderTransaction): Promise<number>;
20
+ static notarizeCompletion(activity: Activity, transaction?: ProviderTransaction): Promise<number>;
21
21
  static getDigitAtIndex(num: number, targetDigitIndex: number): number | null;
22
22
  static getDimensionalIndex(num: number): number | null;
23
23
  static isDuplicate(num: number, targetDigitIndex: number): boolean;
@@ -1 +1 @@
1
- 'use strict';function _0x2f4f(_0x531bc9,_0x1ca7fb){const _0x427720=_0x4277();return _0x2f4f=function(_0x2f4f30,_0x55ec64){_0x2f4f30=_0x2f4f30-0x19f;let _0x1179aa=_0x427720[_0x2f4f30];return _0x1179aa;},_0x2f4f(_0x531bc9,_0x1ca7fb);}(function(_0x25aca5,_0x6be651){const _0x561044=_0x2f4f,_0x124270=_0x25aca5();while(!![]){try{const _0x264c32=parseInt(_0x561044(0x1a6))/0x1+-parseInt(_0x561044(0x1a4))/0x2*(-parseInt(_0x561044(0x19f))/0x3)+-parseInt(_0x561044(0x1a5))/0x4*(-parseInt(_0x561044(0x1a8))/0x5)+-parseInt(_0x561044(0x1a0))/0x6*(-parseInt(_0x561044(0x1a3))/0x7)+-parseInt(_0x561044(0x1a1))/0x8+-parseInt(_0x561044(0x1a9))/0x9*(-parseInt(_0x561044(0x1a2))/0xa)+-parseInt(_0x561044(0x1a7))/0xb;if(_0x264c32===_0x6be651)break;else _0x124270['push'](_0x124270['shift']());}catch(_0x149351){_0x124270['push'](_0x124270['shift']());}}}(_0x4277,0x30873));function _0x4277(){const _0x103add=['742119RxQeWl','33202zoqBLO','112852MzhZmF','283966QQIFKX','5509669HpkmDH','15ouwWim','25641JOPFvT','42yBIRWR','6IzSLsC','127464gvOkvs','30nCqhat'];_0x4277=function(){return _0x103add;};return _0x4277();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CollatorService']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../../types/collator');class CollatorService{static['assertJobActive'](_0x27fcf6,_0x1fa6bf,_0x576520,_0x2d998f=0x0){if(_0x27fcf6<=_0x2d998f)throw new errors_1['InactiveJobError'](_0x1fa6bf,_0x27fcf6,_0x576520);}static['getDimensionalAddress'](_0x567d2d,_0x5286c1=![]){let _0x328b79=_0x567d2d['context']['metadata']['dad']||_0x567d2d['metadata']['dad'];return _0x5286c1&&_0x328b79&&_0x567d2d['leg']===0x2&&(_0x328b79=_0x328b79['substring'](0x0,_0x328b79['lastIndexOf'](','))+',0'),CollatorService['getDimensionsById']([..._0x567d2d['config']['ancestors'],_0x567d2d['metadata']['aid']],_0x328b79);}static['resolveReentryDimension'](_0xde832f){const _0x1642c6=_0xde832f['config']['ancestor'],_0x365671=_0xde832f['config']['ancestors'],_0xbd40e0=_0x365671['indexOf'](_0x1642c6),_0x55af11=_0xde832f['metadata']['dad']['split'](',');return _0x55af11['length']=_0xbd40e0+0x1,_0x55af11['push']('0'),_0x55af11['join'](',');}static async['notarizeEntry'](_0x4708fe,_0x5d64e9){const _0x5d8121=await _0x4708fe['store']['collate'](_0x4708fe['context']['metadata']['jid'],_0x4708fe['metadata']['aid'],-0x5af3107a4000,this['getDimensionalAddress'](_0x4708fe),_0x5d64e9);return this['verifyInteger'](_0x5d8121,0x1,'enter'),_0x5d8121;}static async['authorizeReentry'](_0x226643,_0x38c4a6){const _0x47871d=await _0x226643['store']['collate'](_0x226643['context']['metadata']['jid'],_0x226643['metadata']['aid'],-0x9184e72a000,this['getDimensionalAddress'](_0x226643),_0x38c4a6);return _0x47871d;}static async['notarizeEarlyExit'](_0x12ab62,_0x1bf308){return await _0x12ab62['store']['collate'](_0x12ab62['context']['metadata']['jid'],_0x12ab62['metadata']['aid'],-0xa012317b000,this['getDimensionalAddress'](_0x12ab62),_0x1bf308);}static async['notarizeEarlyCompletion'](_0x6463ce,_0x4c2e00){const _0x597779=_0x6463ce['config']['cycle']?0x9184e72a000:0xa012317b000;return await _0x6463ce['store']['collate'](_0x6463ce['context']['metadata']['jid'],_0x6463ce['metadata']['aid'],0xf4241-_0x597779,this['getDimensionalAddress'](_0x6463ce),_0x4c2e00);}static async['notarizeInception'](_0x4f6858,_0x101390,_0x2987d4){_0x101390&&await _0x4f6858['store']['collateSynthetic'](_0x4f6858['context']['metadata']['jid'],_0x101390,0xf4240,_0x2987d4);}static async['isInceptionOverage'](_0x4c06cb,_0x268dfa){if(_0x268dfa){const _0x2d53d5=await _0x4c06cb['store']['collateSynthetic'](_0x4c06cb['context']['metadata']['jid'],_0x268dfa,0xf4240);return _0x2d53d5>0xf4240;}return![];}static async['notarizeReentry'](_0x54422f,_0x48fa8d,_0x477a9f){const _0x75cb72=_0x54422f['context']['metadata']['jid'],_0x141c77=_0x477a9f||_0x54422f['store']['getMulti']();await _0x54422f['store']['collate'](_0x75cb72,_0x54422f['metadata']['aid'],0xf4240,this['getDimensionalAddress'](_0x54422f,!![]),_0x141c77),await _0x54422f['store']['collateSynthetic'](_0x75cb72,_0x48fa8d,0xf4240,_0x141c77);const [_0xbe1cc5,_0x4475f2]=await _0x141c77['exec'](),_0x2b944d=Array['isArray'](_0xbe1cc5)?_0xbe1cc5[0x1]:_0xbe1cc5,_0x27b468=Array['isArray'](_0x4475f2)?_0x4475f2[0x1]:_0x4475f2;return this['verifyInteger'](_0x2b944d,0x2,'enter'),this['verifySyntheticInteger'](_0x27b468),_0x2b944d;}static async['notarizeContinuation'](_0x506dd9,_0x8eb7e7){return await _0x506dd9['store']['collate'](_0x506dd9['context']['metadata']['jid'],_0x506dd9['metadata']['aid'],0x1,this['getDimensionalAddress'](_0x506dd9),_0x8eb7e7);}static async['notarizeCompletion'](_0x3cccca,_0x58139a){const _0x3c71a3=_0x3cccca['config']['cycle']?0x0:0xe8d4a51000;return await _0x3cccca['store']['collate'](_0x3cccca['context']['metadata']['jid'],_0x3cccca['metadata']['aid'],0x1-_0x3c71a3,this['getDimensionalAddress'](_0x3cccca),_0x58139a);}static['getDigitAtIndex'](_0xdf0914,_0x5ad489){const _0x1ceff8=_0xdf0914['toString']();if(_0x5ad489<0x0||_0x5ad489>=_0x1ceff8['length'])return null;const _0x4013d2=parseInt(_0x1ceff8[_0x5ad489],0xa);return _0x4013d2;}static['getDimensionalIndex'](_0x3daa36){const _0x5c62cb=_0x3daa36['toString']();if(_0x5c62cb['length']<0x9)return null;const _0xa8a79f=_0x5c62cb['substring'](0x3,0x9),_0x4259af=parseInt(_0xa8a79f,0xa);return _0x4259af-0x1;}static['isDuplicate'](_0x46a9a4,_0x24fb38){return this['getDigitAtIndex'](_0x46a9a4,_0x24fb38)<0x8;}static['isInactive'](_0x20dfe2){return this['getDigitAtIndex'](_0x20dfe2,0x2)<0x9;}static['isPrimed'](_0x42545e,_0x6d0cfd){return _0x6d0cfd==0x1?_0x42545e!=-0x5af3107a4000:this['getDigitAtIndex'](_0x42545e,0x0)<0x9&&this['getDigitAtIndex'](_0x42545e,0x1)<0x9;}static['verifySyntheticInteger'](_0x1c5cb1){const _0x4514bd=_0x1c5cb1['toString'](),_0x478a83=parseInt(_0x4514bd[_0x4514bd['length']-0x1],0xa);if(_0x478a83>0x0)throw new errors_1['CollationError'](_0x1c5cb1,0x2,'enter',collator_1['CollationFaultType']['INACTIVE']);else{if(_0x1c5cb1>=0x1e8480)throw new errors_1['CollationError'](_0x1c5cb1,0x2,'enter',collator_1['CollationFaultType']['DUPLICATE']);}}static['verifyInteger'](_0x2e0f0f,_0x141190,_0x4911a2){let _0x7b8b52;if(_0x141190===0x1&&_0x4911a2==='enter'){if(!this['isPrimed'](_0x2e0f0f,0x1))_0x7b8b52=collator_1['CollationFaultType']['MISSING'];else{if(this['isDuplicate'](_0x2e0f0f,0x0))_0x7b8b52=collator_1['CollationFaultType']['DUPLICATE'];else _0x2e0f0f!=0x331a2bfa73000&&(_0x7b8b52=collator_1['CollationFaultType']['INVALID']);}}else{if(_0x141190===0x1&&_0x4911a2==='exit'){if(_0x2e0f0f===-0x9184e72a000)_0x7b8b52=collator_1['CollationFaultType']['MISSING'];else this['isDuplicate'](_0x2e0f0f,0x1)&&(_0x7b8b52=collator_1['CollationFaultType']['DUPLICATE']);}else{if(_0x141190===0x2&&_0x4911a2==='enter'){if(!this['isPrimed'](_0x2e0f0f,0x2))_0x7b8b52=collator_1['CollationFaultType']['FORBIDDEN'];else this['isInactive'](_0x2e0f0f)&&(_0x7b8b52=collator_1['CollationFaultType']['INACTIVE']);}}}if(_0x7b8b52)throw new errors_1['CollationError'](_0x2e0f0f,_0x141190,_0x4911a2,_0x7b8b52);}static['getDimensionsById'](_0x29ea83,_0x2ccb09){const _0x438b85={'$ADJACENT':_0x2ccb09+',0'};let _0x14dbe1=_0x2ccb09;return _0x29ea83['reverse']()['forEach'](_0xe52d97=>{_0x438b85[_0xe52d97]=_0x14dbe1,_0x14dbe1=_0x14dbe1['substring'](0x0,_0x14dbe1['lastIndexOf'](','));}),_0x438b85;}static['getSeed'](){return'999000000000000';}static['getTriggerSeed'](){return'888000001000001';}static['compile'](_0x515a01){CollatorService['bindAncestorArray'](_0x515a01);}static['bindAncestorArray'](_0xc0bdd2){_0xc0bdd2['forEach'](_0x3d5990=>{const _0x511ead={},_0x2f9036=Object['keys'](_0x3d5990['activities'])['find'](_0x1da814=>_0x3d5990['activities'][_0x1da814]['type']==='trigger');if(!_0x2f9036)throw new Error('collator-trigger-activity-not-found');const _0x23cf16=(_0x212067,_0x56da8a)=>{_0x511ead[_0x212067]=_0x56da8a,_0x3d5990['activities'][_0x212067]['ancestors']=_0x56da8a;const _0x41644=_0x3d5990['transitions']?.[_0x212067]||[];_0x41644['forEach'](_0x54f390=>{_0x23cf16(_0x54f390['to'],[..._0x56da8a,_0x212067]);});};_0x23cf16(_0x2f9036,[]);});}static['getDimensionalSeed'](_0x44d10c=0x0){return','+_0x44d10c;}}exports['CollatorService']=CollatorService,CollatorService['targetLength']=0xf;
1
+ 'use strict';(function(_0x302c87,_0x1e5642){const _0x251a3d=_0x4305,_0x5cca71=_0x302c87();while(!![]){try{const _0x1f2f0c=-parseInt(_0x251a3d(0x1f2))/0x1+-parseInt(_0x251a3d(0x1f3))/0x2*(-parseInt(_0x251a3d(0x1f1))/0x3)+-parseInt(_0x251a3d(0x1f5))/0x4+parseInt(_0x251a3d(0x1ef))/0x5+parseInt(_0x251a3d(0x1f0))/0x6+parseInt(_0x251a3d(0x1ed))/0x7+-parseInt(_0x251a3d(0x1f4))/0x8*(parseInt(_0x251a3d(0x1ee))/0x9);if(_0x1f2f0c===_0x1e5642)break;else _0x5cca71['push'](_0x5cca71['shift']());}catch(_0x3c066c){_0x5cca71['push'](_0x5cca71['shift']());}}}(_0x38e8,0xb2d06));function _0x38e8(){const _0x9350fe=['1283535PIfNVv','4625290qPvvtg','3766488xLOToC','51ikhJuT','297441dpaDnv','5084rqlyPX','8GWTwUK','2561588TvnpXA','1517985gvYLxD'];_0x38e8=function(){return _0x9350fe;};return _0x38e8();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CollatorService']=void 0x0;function _0x4305(_0x10189f,_0x2f15fd){const _0x38e836=_0x38e8();return _0x4305=function(_0x4305a6,_0x359d3d){_0x4305a6=_0x4305a6-0x1ed;let _0x28458f=_0x38e836[_0x4305a6];return _0x28458f;},_0x4305(_0x10189f,_0x2f15fd);}const errors_1=require('../../modules/errors'),collator_1=require('../../types/collator');class CollatorService{static['assertJobActive'](_0x468702,_0x5cc03a,_0x545f27,_0x1c7d62=0x0){if(_0x468702<=_0x1c7d62)throw new errors_1['InactiveJobError'](_0x5cc03a,_0x468702,_0x545f27);}static['getDimensionalAddress'](_0x45191c,_0x5aae67=![]){let _0x16f25b=_0x45191c['context']['metadata']['dad']||_0x45191c['metadata']['dad'];return _0x5aae67&&_0x16f25b&&_0x45191c['leg']===0x2&&(_0x16f25b=_0x16f25b['substring'](0x0,_0x16f25b['lastIndexOf'](','))+',0'),CollatorService['getDimensionsById']([..._0x45191c['config']['ancestors'],_0x45191c['metadata']['aid']],_0x16f25b);}static['resolveReentryDimension'](_0x1e4c7f){const _0xdd35de=_0x1e4c7f['config']['ancestor'],_0x46b509=_0x1e4c7f['config']['ancestors'],_0x4b0e96=_0x46b509['indexOf'](_0xdd35de),_0x5b28b0=_0x1e4c7f['metadata']['dad']['split'](',');return _0x5b28b0['length']=_0x4b0e96+0x1,_0x5b28b0['push']('0'),_0x5b28b0['join'](',');}static async['notarizeEntry'](_0x55915d,_0x4b6395){const _0x58b6a3=await _0x55915d['store']['collate'](_0x55915d['context']['metadata']['jid'],_0x55915d['metadata']['aid'],-0x5af3107a4000,this['getDimensionalAddress'](_0x55915d),_0x4b6395);return this['verifyInteger'](_0x58b6a3,0x1,'enter'),_0x58b6a3;}static async['authorizeReentry'](_0x340c47,_0x4eabcb){const _0xd8fe91=await _0x340c47['store']['collate'](_0x340c47['context']['metadata']['jid'],_0x340c47['metadata']['aid'],-0x9184e72a000,this['getDimensionalAddress'](_0x340c47),_0x4eabcb);return _0xd8fe91;}static async['notarizeEarlyExit'](_0x5091ad,_0x589967){return await _0x5091ad['store']['collate'](_0x5091ad['context']['metadata']['jid'],_0x5091ad['metadata']['aid'],-0xa012317b000,this['getDimensionalAddress'](_0x5091ad),_0x589967);}static async['notarizeEarlyCompletion'](_0x486f5d,_0x19bcf0){const _0x1b437a=_0x486f5d['config']['cycle']?0x9184e72a000:0xa012317b000;return await _0x486f5d['store']['collate'](_0x486f5d['context']['metadata']['jid'],_0x486f5d['metadata']['aid'],0xf4241-_0x1b437a,this['getDimensionalAddress'](_0x486f5d),_0x19bcf0);}static async['notarizeInception'](_0x3a4a44,_0x9b329c,_0x4abdb6){_0x9b329c&&await _0x3a4a44['store']['collateSynthetic'](_0x3a4a44['context']['metadata']['jid'],_0x9b329c,0xf4240,_0x4abdb6);}static async['isInceptionOverage'](_0x48ffae,_0x424c1e){if(_0x424c1e){const _0x1f7743=await _0x48ffae['store']['collateSynthetic'](_0x48ffae['context']['metadata']['jid'],_0x424c1e,0xf4240);return _0x1f7743>0xf4240;}return![];}static async['notarizeReentry'](_0x366737,_0xb5f1e7,_0x1f58e2){const _0x382935=_0x366737['context']['metadata']['jid'],_0x309964=_0x1f58e2||_0x366737['store']['transact']();await _0x366737['store']['collate'](_0x382935,_0x366737['metadata']['aid'],0xf4240,this['getDimensionalAddress'](_0x366737,!![]),_0x309964),await _0x366737['store']['collateSynthetic'](_0x382935,_0xb5f1e7,0xf4240,_0x309964);const [_0x19de21,_0x2afeab]=await _0x309964['exec'](),_0x565cd0=Array['isArray'](_0x19de21)?_0x19de21[0x1]:_0x19de21,_0x3c437e=Array['isArray'](_0x2afeab)?_0x2afeab[0x1]:_0x2afeab;return this['verifyInteger'](_0x565cd0,0x2,'enter'),this['verifySyntheticInteger'](_0x3c437e),_0x565cd0;}static async['notarizeContinuation'](_0x3e911e,_0x3a8cc3){return await _0x3e911e['store']['collate'](_0x3e911e['context']['metadata']['jid'],_0x3e911e['metadata']['aid'],0x1,this['getDimensionalAddress'](_0x3e911e),_0x3a8cc3);}static async['notarizeCompletion'](_0x518a6f,_0x42037a){const _0xe7e242=_0x518a6f['config']['cycle']?0x0:0xe8d4a51000;return await _0x518a6f['store']['collate'](_0x518a6f['context']['metadata']['jid'],_0x518a6f['metadata']['aid'],0x1-_0xe7e242,this['getDimensionalAddress'](_0x518a6f),_0x42037a);}static['getDigitAtIndex'](_0x15aad7,_0x4a13b7){const _0x37f66e=_0x15aad7['toString']();if(_0x4a13b7<0x0||_0x4a13b7>=_0x37f66e['length'])return null;const _0x4e81e7=parseInt(_0x37f66e[_0x4a13b7],0xa);return _0x4e81e7;}static['getDimensionalIndex'](_0x5344d7){const _0x448cf2=_0x5344d7['toString']();if(_0x448cf2['length']<0x9)return null;const _0x50dba8=_0x448cf2['substring'](0x3,0x9),_0xd5d527=parseInt(_0x50dba8,0xa);return _0xd5d527-0x1;}static['isDuplicate'](_0x56e908,_0x358978){return this['getDigitAtIndex'](_0x56e908,_0x358978)<0x8;}static['isInactive'](_0x5e2b0){return this['getDigitAtIndex'](_0x5e2b0,0x2)<0x9;}static['isPrimed'](_0x14d19c,_0x14ca5f){return _0x14ca5f==0x1?_0x14d19c!=-0x5af3107a4000:this['getDigitAtIndex'](_0x14d19c,0x0)<0x9&&this['getDigitAtIndex'](_0x14d19c,0x1)<0x9;}static['verifySyntheticInteger'](_0xa60bb){const _0x5accbc=_0xa60bb['toString'](),_0x559253=parseInt(_0x5accbc[_0x5accbc['length']-0x1],0xa);if(_0x559253>0x0)throw new errors_1['CollationError'](_0xa60bb,0x2,'enter',collator_1['CollationFaultType']['INACTIVE']);else{if(_0xa60bb>=0x1e8480)throw new errors_1['CollationError'](_0xa60bb,0x2,'enter',collator_1['CollationFaultType']['DUPLICATE']);}}static['verifyInteger'](_0x1539db,_0x10a64d,_0x3160f3){let _0x41bf15;if(_0x10a64d===0x1&&_0x3160f3==='enter'){if(!this['isPrimed'](_0x1539db,0x1))_0x41bf15=collator_1['CollationFaultType']['MISSING'];else{if(this['isDuplicate'](_0x1539db,0x0))_0x41bf15=collator_1['CollationFaultType']['DUPLICATE'];else _0x1539db!=0x331a2bfa73000&&(_0x41bf15=collator_1['CollationFaultType']['INVALID']);}}else{if(_0x10a64d===0x1&&_0x3160f3==='exit'){if(_0x1539db===-0x9184e72a000)_0x41bf15=collator_1['CollationFaultType']['MISSING'];else this['isDuplicate'](_0x1539db,0x1)&&(_0x41bf15=collator_1['CollationFaultType']['DUPLICATE']);}else{if(_0x10a64d===0x2&&_0x3160f3==='enter'){if(!this['isPrimed'](_0x1539db,0x2))_0x41bf15=collator_1['CollationFaultType']['FORBIDDEN'];else this['isInactive'](_0x1539db)&&(_0x41bf15=collator_1['CollationFaultType']['INACTIVE']);}}}if(_0x41bf15)throw new errors_1['CollationError'](_0x1539db,_0x10a64d,_0x3160f3,_0x41bf15);}static['getDimensionsById'](_0x3fcc11,_0x4b11b6){const _0x17e7cc={'$ADJACENT':_0x4b11b6+',0'};let _0x4b96ba=_0x4b11b6;return _0x3fcc11['reverse']()['forEach'](_0x547464=>{_0x17e7cc[_0x547464]=_0x4b96ba,_0x4b96ba=_0x4b96ba['substring'](0x0,_0x4b96ba['lastIndexOf'](','));}),_0x17e7cc;}static['getSeed'](){return'999000000000000';}static['getTriggerSeed'](){return'888000001000001';}static['compile'](_0x48b80b){CollatorService['bindAncestorArray'](_0x48b80b);}static['bindAncestorArray'](_0x4c0922){_0x4c0922['forEach'](_0x20f8cf=>{const _0x9f1af2={},_0x33f88f=Object['keys'](_0x20f8cf['activities'])['find'](_0x4aba3a=>_0x20f8cf['activities'][_0x4aba3a]['type']==='trigger');if(!_0x33f88f)throw new Error('collator-trigger-activity-not-found');const _0x107674=(_0x4d4343,_0x3999af)=>{_0x9f1af2[_0x4d4343]=_0x3999af,_0x20f8cf['activities'][_0x4d4343]['ancestors']=_0x3999af;const _0x4f8857=_0x20f8cf['transitions']?.[_0x4d4343]||[];_0x4f8857['forEach'](_0x13ca05=>{_0x107674(_0x13ca05['to'],[..._0x3999af,_0x4d4343]);});};_0x107674(_0x33f88f,[]);});}static['getDimensionalSeed'](_0x348062=0x0){return','+_0x348062;}}exports['CollatorService']=CollatorService,CollatorService['targetLength']=0xf;
@@ -1,14 +1,14 @@
1
1
  import { StoreService } from '../store';
2
2
  import { HotMeshGraph, HotMeshManifest } from '../../types/hotmesh';
3
- import { RedisClient, RedisMulti } from '../../types/redis';
3
+ import { ProviderClient, ProviderTransaction } from '../../types/provider';
4
4
  import { Symbols } from '../../types/serializer';
5
5
  import { StreamService } from '../stream';
6
6
  declare class Deployer {
7
7
  manifest: HotMeshManifest | null;
8
- store: StoreService<RedisClient, RedisMulti> | null;
9
- stream: StreamService<RedisClient, RedisMulti> | null;
8
+ store: StoreService<ProviderClient, ProviderTransaction> | null;
9
+ stream: StreamService<ProviderClient, ProviderTransaction> | null;
10
10
  constructor(manifest: HotMeshManifest);
11
- deploy(store: StoreService<RedisClient, RedisMulti>, stream: StreamService<RedisClient, RedisMulti>): Promise<void>;
11
+ deploy(store: StoreService<ProviderClient, ProviderTransaction>, stream: StreamService<ProviderClient, ProviderTransaction>): Promise<void>;
12
12
  getVID(): {
13
13
  id: string;
14
14
  version: string;
@@ -1 +1 @@
1
- 'use strict';function _0x3beb(){const _0xfe4acb=['921325VmmRpj','11392209mjcHpo','12DBvenF','947768HIBigc','33104929FBHGmp','394865Jzvbdt','2569406RLEZqq','3JCMHJj','2846514ESIBnU','35EOeKEt','10sGFSjD'];_0x3beb=function(){return _0xfe4acb;};return _0x3beb();}(function(_0x447d61,_0x3dc167){const _0x132e3b=_0x1384,_0x2459d4=_0x447d61();while(!![]){try{const _0x30a04c=-parseInt(_0x132e3b(0x9d))/0x1+parseInt(_0x132e3b(0x98))/0x2*(-parseInt(_0x132e3b(0x99))/0x3)+parseInt(_0x132e3b(0x9f))/0x4*(-parseInt(_0x132e3b(0xa2))/0x5)+-parseInt(_0x132e3b(0x9a))/0x6+parseInt(_0x132e3b(0x9b))/0x7*(-parseInt(_0x132e3b(0xa0))/0x8)+-parseInt(_0x132e3b(0x9e))/0x9*(-parseInt(_0x132e3b(0x9c))/0xa)+parseInt(_0x132e3b(0xa1))/0xb;if(_0x30a04c===_0x3dc167)break;else _0x2459d4['push'](_0x2459d4['shift']());}catch(_0x4212c1){_0x2459d4['push'](_0x2459d4['shift']());}}}(_0x3beb,0xbaeb3));function _0x1384(_0x4a47ec,_0x611cb1){const _0x3beb3d=_0x3beb();return _0x1384=function(_0x138419,_0x21ceae){_0x138419=_0x138419-0x98;let _0x3432ae=_0x3beb3d[_0x138419];return _0x3432ae;},_0x1384(_0x4a47ec,_0x611cb1);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Deployer']=void 0x0;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(_0x4e5c23){this['manifest']=null,this['manifest']=_0x4e5c23;}async['deploy'](_0xc5ee61,_0x5a1ffb){this['store']=_0xc5ee61,this['stream']=_0x5a1ffb,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 _0x323599 of this['manifest']['app']['graphs']){const [,_0x13256b]=this['findTrigger'](_0x323599),_0x3e1449=_0x13256b['subscribes'],[_0x2cf0cb,_0x576073,_0x508b72]=await this['store']['reserveSymbolRange']('$'+_0x3e1449,DEFAULT_RANGE_SIZE,'JOB'),_0x1ab800='',_0x17407a=this['bindSymbols'](_0x2cf0cb,_0x576073,_0x508b72,_0x1ab800,_0x13256b['PRODUCES']);Object['keys'](_0x17407a)['length']&&await this['store']['addSymbols']('$'+_0x3e1449,_0x17407a);for(const [_0x1ffcda,_0x33e3fa]of Object['entries'](_0x323599['activities'])){const [_0x25bcd9,_0x189e83,_0x16a50c]=await this['store']['reserveSymbolRange'](_0x1ffcda,DEFAULT_RANGE_SIZE,'ACTIVITY'),_0x39f9ce=_0x1ffcda+'/';this['bindSelf'](_0x33e3fa['consumes'],_0x33e3fa['produces'],_0x1ffcda);const _0x43dbd5=this['bindSymbols'](_0x25bcd9,_0x189e83,_0x16a50c,_0x39f9ce,_0x33e3fa['produces']);Object['keys'](_0x43dbd5)['length']&&await this['store']['addSymbols'](_0x1ffcda,_0x43dbd5);}}}['bindSelf'](_0x2985e0,_0x278122,_0x4b0eab){for(const _0x68e797 of[_0x4b0eab,'$self']){const _0xad7592=_0x2985e0[_0x68e797];if(_0xad7592)for(const _0x3d9e3f of _0xad7592){!_0x278122['includes'](_0x3d9e3f)&&_0x278122['push'](_0x3d9e3f);}}}['bindSymbols'](_0x51eed4,_0x31d6e7,_0x2deed8,_0x1de279,_0x4d3796){const _0x4743df={},_0x904b98={..._0x2deed8};for(const _0x2bf034 of _0x4d3796){const _0x19d6f3=''+_0x1de279+_0x2bf034;if(!_0x904b98[_0x19d6f3]){if(_0x51eed4>_0x31d6e7)throw new Error('Symbol\x20index\x20out\x20of\x20bounds');const _0x5652d3=(0x0,utils_1['getSymKey'])(_0x51eed4);_0x51eed4++,_0x4743df[_0x19d6f3]=_0x5652d3,_0x904b98[_0x19d6f3]=_0x5652d3;}}return _0x4743df;}['copyJobSchemas'](){const _0x2a5dc5=this['manifest']['app']['graphs'];for(const _0x3e2935 of _0x2a5dc5){const _0x2f9669=_0x3e2935['output']?.['schema'],_0x99877f=_0x3e2935['input']?.['schema'];if(!_0x2f9669&&!_0x99877f)continue;const _0x1be577=_0x3e2935['activities'];for(const _0x428114 in _0x1be577){if(_0x1be577[_0x428114]['type']==='trigger'){const _0x46779d=_0x1be577[_0x428114];_0x2f9669&&(!_0x46779d['job']&&(_0x46779d['job']={}),_0x46779d['job']['schema']=_0x2f9669),_0x99877f&&(_0x46779d['output']={'schema':_0x99877f});}}}}['bindBackRefs'](){for(const _0x31d6e8 of this['manifest']['app']['graphs']){const _0x3344d3=_0x31d6e8['activities'],_0x166ae4=this['findTrigger'](_0x31d6e8)[0x0];for(const _0x14086d in _0x3344d3){_0x3344d3[_0x14086d]['trigger']=_0x166ae4,_0x3344d3[_0x14086d]['subscribes']=_0x31d6e8['subscribes'],_0x31d6e8['publishes']&&(_0x3344d3[_0x14086d]['publishes']=_0x31d6e8['publishes']),_0x3344d3[_0x14086d]['expire']=_0x31d6e8['expire']??undefined,_0x3344d3[_0x14086d]['persistent']=_0x31d6e8['persistent']??undefined;}}}['bindCycleTarget'](){for(const _0x4695f7 of this['manifest']['app']['graphs']){const _0x272c8f=_0x4695f7['activities'];for(const _0x202ec9 in _0x272c8f){const _0x2461be=_0x272c8f[_0x202ec9];_0x2461be['type']==='cycle'&&(_0x272c8f[_0x2461be['ancestor']]['cycle']=!![]);}}}['convertTopicsToTypes'](){for(const _0x58988d of this['manifest']['app']['graphs']){const _0x405d44=_0x58988d['activities'];for(const _0x2c0ed5 in _0x405d44){const _0x33acaa=_0x405d44[_0x2c0ed5];['worker','await']['includes'](_0x33acaa['type'])&&_0x33acaa['topic']&&!_0x33acaa['subtype']&&(_0x33acaa['subtype']=_0x33acaa['topic']);}}}['convertActivitiesToHooks'](){for(const _0xabd160 of this['manifest']['app']['graphs']){const _0x536227=_0xabd160['activities'];for(const _0x35cd88 in _0x536227){const _0x400e84=_0x536227[_0x35cd88];['activity']['includes'](_0x400e84['type'])&&(_0x400e84['type']='hook');}}}async['bindParents'](){const _0x962d48=this['manifest']['app']['graphs'];for(const _0x54d136 of _0x962d48){if(_0x54d136['transitions'])for(const _0x1d0a43 in _0x54d136['transitions']){const _0x5b1cd9=_0x54d136['transitions'][_0x1d0a43];for(const _0x405022 of _0x5b1cd9){const _0x5b1717=_0x405022['to'];_0x54d136['activities'][_0x5b1717]['parent']=_0x1d0a43;}_0x54d136['activities'][_0x1d0a43]['transitions']=_0x5b1cd9;}}}['collectValues'](_0x4fa37c,_0x2166ad){for(const [_0x202f7e,_0x2c72c2]of Object['entries'](_0x4fa37c)){if(_0x202f7e==='enum'||_0x202f7e==='examples'||_0x202f7e==='default'){if(Array['isArray'](_0x2c72c2))for(const _0x12443d of _0x2c72c2){typeof _0x12443d==='string'&&_0x12443d['length']>0x5&&_0x2166ad['add'](_0x12443d);}else typeof _0x2c72c2==='string'&&_0x2c72c2['length']>0x5&&_0x2166ad['add'](_0x2c72c2);}else typeof _0x2c72c2==='object'&&this['collectValues'](_0x2c72c2,_0x2166ad);}}['traverse'](_0x18bee1,_0x496fdf){for(const _0x49ceec of Object['values'](_0x18bee1)){typeof _0x49ceec==='object'&&('schema'in _0x49ceec?this['collectValues'](_0x49ceec['schema'],_0x496fdf):this['traverse'](_0x49ceec,_0x496fdf));}}async['generateSymVals'](){const _0xa5ef56=new Set();for(const _0x7d4cb7 of this['manifest']['app']['graphs']){this['traverse'](_0x7d4cb7,_0xa5ef56);}const _0x49f68a=await this['store']['getSymbolValues'](),_0x9b826e=Object['keys'](_0x49f68a)['length'],_0x3db775=Math['pow'](0x34,0x2)-0x1,_0x6b4834=serializer_1['SerializerService']['filterSymVals'](_0x9b826e,_0x3db775,_0x49f68a,_0xa5ef56);await this['store']['addSymbolValues'](_0x6b4834);}['resolveJobMapsPaths'](){function _0x1ccd0f(_0x55bb32){const _0x5a22bb=[];function _0x55f42c(_0x531f08,_0x4087bf=[]){for(const _0x561d60 in _0x531f08){if(typeof _0x531f08[_0x561d60]==='object'&&_0x531f08[_0x561d60]!==null&&!('@pipe'in _0x531f08[_0x561d60])){const _0x37e082=[..._0x4087bf,_0x561d60];_0x55f42c(_0x531f08[_0x561d60],_0x37e082);}else{const _0x299009=[..._0x4087bf,_0x561d60]['join']('/');if(!_0x299009['includes']('[')){const _0x5a8038='data/'+_0x299009;!_0x5a22bb['includes'](_0x5a8038)&&_0x5a22bb['push'](_0x5a8038);}else{const [_0x575680,_0x2f0ccd]=_0x299009['split']('['),[_0x1fe2f1,_0x166169]=_0x2f0ccd['split'](']');if(!isNaN(parseInt(_0x1fe2f1)))for(let _0x4841a6=0x0;_0x4841a6<parseInt(_0x1fe2f1);_0x4841a6++){const _0x4bec11='data/'+_0x575680+'/'+_0x4841a6;!_0x5a22bb['includes'](_0x4bec11)&&_0x5a22bb['push'](_0x4bec11);}}}}}return _0x55bb32&&_0x55f42c(_0x55bb32),_0x5a22bb;}for(const _0x194ebf of this['manifest']['app']['graphs']){let _0x35b9aa=[];const [,_0x9dccb8]=this['findTrigger'](_0x194ebf);for(const _0x503533 in _0x194ebf['activities']){const _0x22dc08=_0x194ebf['activities'][_0x503533];_0x35b9aa=_0x35b9aa['concat'](_0x1ccd0f(_0x22dc08['job']?.['maps']));}_0x9dccb8['PRODUCES']=_0x35b9aa;}}['resolveMappingDependencies'](){const _0x120e77=[];function _0x29b634(_0x42f8c6,_0x3c4851){for(const _0xda40b2 in _0x42f8c6){if(typeof _0x42f8c6[_0xda40b2]==='string'){const _0x50471e=_0x42f8c6[_0xda40b2],_0x3ba168=_0x50471e['match'](/^\{[^@].*}$/);_0x3ba168&&!validator_1['Validator']['CONTEXT_VARS']['includes'](_0x50471e)&&(_0x50471e['split']('.')[0x1]!=='input'&&(_0x120e77['push'](_0x50471e),_0x3c4851['push'](_0x50471e)));}else typeof _0x42f8c6[_0xda40b2]==='object'&&_0x42f8c6[_0xda40b2]!==null&&_0x29b634(_0x42f8c6[_0xda40b2],_0x3c4851);}}const _0x3fc407=this['manifest']['app']['graphs'];for(const _0x174076 of _0x3fc407){const _0x5aafe0=_0x174076['activities'];for(const _0x4a0c7a in _0x5aafe0){const _0x1f64b2=_0x5aafe0[_0x4a0c7a];_0x1f64b2['consumes']=[],_0x29b634(_0x1f64b2,_0x1f64b2['consumes']),_0x1f64b2['consumes']=this['groupMappingRules'](_0x1f64b2['consumes']);}}const _0xab847=this['groupMappingRules'](_0x120e77);for(const _0x46502c of _0x3fc407){const _0x227433=_0x46502c['activities'];for(const _0x512571 in _0x227433){const _0x400c9b=_0x227433[_0x512571];_0x400c9b['produces']=_0xab847[''+_0x512571]||[];}}}['groupMappingRules'](_0x32d068){_0x32d068=Array['from'](new Set(_0x32d068))['sort']();const _0x389ed8={};for(const _0x273605 of _0x32d068){const [_0x3349f6,_0x5e0488]=this['resolveMappableValue'](_0x273605);!_0x389ed8[_0x3349f6]&&(_0x389ed8[_0x3349f6]=[]),_0x389ed8[_0x3349f6]['push'](_0x5e0488);}return _0x389ed8;}['resolveMappableValue'](_0xbef3b8){_0xbef3b8=_0xbef3b8['substring'](0x1,_0xbef3b8['length']-0x1);const _0x3f77b5=_0xbef3b8['split']('.');if(_0x3f77b5[0x0]==='$job'){const [_0x18af00,..._0x2ab7c4]=_0x3f77b5;return[_0x18af00,_0x2ab7c4['join']('/')];}else{const [_0x1fa3a5,_0x2a43dc,_0x44c45a,..._0x4719a6]=_0x3f77b5,_0x5ec526={'hook':'hook/data','input':'input/data','output':_0x44c45a==='data'?'output/data':'output/metadata'}[_0x2a43dc];return[_0x1fa3a5,_0x5ec526+'/'+_0x4719a6['join']('/')];}}async['deployActivitySchemas'](){const _0x45e75d=this['manifest']['app']['graphs'],_0x3f289f={};for(const _0x4177c1 of _0x45e75d){const _0x56a263=_0x4177c1['activities'];for(const _0x153598 in _0x56a263){const _0x7e79ad=_0x56a263[_0x153598];delete _0x7e79ad['transitions'],_0x3f289f[_0x153598]=_0x7e79ad;}}await this['store']['setSchemas'](_0x3f289f,this['getVID']());}async['deploySubscriptions'](){const _0x9f9428=this['manifest']['app']['graphs'],_0x3b1f1d={};for(const _0x5f38e9 of _0x9f9428){const _0x80c887=_0x5f38e9['activities'],_0x121314=_0x5f38e9['subscribes'];for(const _0x26ecb9 in _0x80c887){if(_0x80c887[_0x26ecb9]['type']==='trigger'){_0x3b1f1d[_0x121314]=_0x26ecb9;break;}}}await this['store']['setSubscriptions'](_0x3b1f1d,this['getVID']());}['findTrigger'](_0x4032a9){for(const _0x366c5f in _0x4032a9['activities']){const _0x45e181=_0x4032a9['activities'][_0x366c5f];if(_0x45e181['type']==='trigger')return[_0x366c5f,_0x45e181];}return null;}async['deployTransitions'](){const _0x46958a=this['manifest']['app']['graphs'],_0x41e462={};for(const _0x4bec24 of _0x46958a){if(_0x4bec24['subscribes']&&_0x4bec24['subscribes']['startsWith']('.')){const [_0xd390e7]=this['findTrigger'](_0x4bec24);_0xd390e7&&(_0x41e462[_0x4bec24['subscribes']]={[_0xd390e7]:!![]});}if(_0x4bec24['transitions'])for(const _0x5aa9d7 in _0x4bec24['transitions']){const _0x26651c=_0x4bec24['transitions'][_0x5aa9d7],_0x22f12d={};for(const _0x541838 of _0x26651c){const _0x4a3796=_0x541838['to'];_0x541838['conditions']?_0x22f12d[_0x4a3796]=_0x541838['conditions']:_0x22f12d[_0x4a3796]=!![];}Object['keys'](_0x22f12d)['length']>0x0&&(_0x41e462['.'+_0x5aa9d7]=_0x22f12d);}}await this['store']['setTransitions'](_0x41e462,this['getVID']());}async['deployHookPatterns'](){const _0x3e910f=this['manifest']['app']['graphs'],_0x28dfd6={};for(const _0x1a3bc2 of _0x3e910f){if(_0x1a3bc2['hooks'])for(const _0x5a57af in _0x1a3bc2['hooks']){_0x28dfd6[_0x5a57af]=_0x1a3bc2['hooks'][_0x5a57af];const _0x52b885=_0x1a3bc2['hooks'][_0x5a57af][0x0]['to'],_0x20af64=_0x1a3bc2['activities'][_0x52b885];_0x20af64&&(!_0x20af64['hook']&&(_0x20af64['hook']={}),_0x20af64['hook']['topic']=_0x5a57af);}}await this['store']['setHookRules'](_0x28dfd6);}async['deployConsumerGroups'](){const _0x2a5ebd={'appId':this['manifest']['app']['id']},_0xc5e84e=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x2a5ebd);await this['deployConsumerGroup'](_0xc5e84e,'ENGINE');for(const _0x34a895 of this['manifest']['app']['graphs']){const _0x4883d0=_0x34a895['activities'];for(const _0x48a8cf in _0x4883d0){const _0x128652=_0x4883d0[_0x48a8cf];if(_0x128652['type']==='worker'&&pipe_1['Pipe']['resolve'](_0x128652['subtype'],{})===_0x128652['subtype']){_0x2a5ebd['topic']=_0x128652['subtype'];const _0x4f9f13=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x2a5ebd);await this['deployConsumerGroup'](_0x4f9f13,'WORKER');}}}}async['deployConsumerGroup'](_0x20bd7e,_0x5ec12c){try{await this['stream']['createConsumerGroup'](_0x20bd7e,_0x5ec12c);}catch(_0x426c74){this['store']['logger']['info']('router-stream-group-exists',{'stream':_0x20bd7e,'group':_0x5ec12c});}}}exports['Deployer']=Deployer;
1
+ 'use strict';function _0x747b(_0x31416c,_0x40325a){const _0x50949d=_0x5094();return _0x747b=function(_0x747ba6,_0x4155e9){_0x747ba6=_0x747ba6-0x15e;let _0x5612ec=_0x50949d[_0x747ba6];return _0x5612ec;},_0x747b(_0x31416c,_0x40325a);}(function(_0x21ab5a,_0x46173c){const _0x1f24f7=_0x747b,_0x57cff2=_0x21ab5a();while(!![]){try{const _0x3043ca=-parseInt(_0x1f24f7(0x161))/0x1+-parseInt(_0x1f24f7(0x163))/0x2+-parseInt(_0x1f24f7(0x160))/0x3+parseInt(_0x1f24f7(0x15e))/0x4+parseInt(_0x1f24f7(0x164))/0x5+-parseInt(_0x1f24f7(0x15f))/0x6+parseInt(_0x1f24f7(0x162))/0x7;if(_0x3043ca===_0x46173c)break;else _0x57cff2['push'](_0x57cff2['shift']());}catch(_0x74f12d){_0x57cff2['push'](_0x57cff2['shift']());}}}(_0x5094,0x9754f));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Deployer']=void 0x0;function _0x5094(){const _0x983a39=['4389560CbRXln','5355972tyLlNU','2033751Uxdgtb','634345ctvZqc','3647420SfiGVs','14376NXNKCs','6067585oObxdr'];_0x5094=function(){return _0x983a39;};return _0x5094();}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(_0x389df1){this['manifest']=null,this['manifest']=_0x389df1;}async['deploy'](_0x31242c,_0x43990a){this['store']=_0x31242c,this['stream']=_0x43990a,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 _0x4d22e4 of this['manifest']['app']['graphs']){const [,_0x139367]=this['findTrigger'](_0x4d22e4),_0xf29d64=_0x139367['subscribes'],[_0x490468,_0x58eb5e,_0xccfe79]=await this['store']['reserveSymbolRange']('$'+_0xf29d64,DEFAULT_RANGE_SIZE,'JOB'),_0xa1766c='',_0x36ace3=this['bindSymbols'](_0x490468,_0x58eb5e,_0xccfe79,_0xa1766c,_0x139367['PRODUCES']);Object['keys'](_0x36ace3)['length']&&await this['store']['addSymbols']('$'+_0xf29d64,_0x36ace3);for(const [_0x4daf8a,_0x24c677]of Object['entries'](_0x4d22e4['activities'])){const [_0x4d9872,_0x2485d8,_0x444f48]=await this['store']['reserveSymbolRange'](_0x4daf8a,DEFAULT_RANGE_SIZE,'ACTIVITY'),_0x4541fb=_0x4daf8a+'/';this['bindSelf'](_0x24c677['consumes'],_0x24c677['produces'],_0x4daf8a);const _0x4a3e15=this['bindSymbols'](_0x4d9872,_0x2485d8,_0x444f48,_0x4541fb,_0x24c677['produces']);Object['keys'](_0x4a3e15)['length']&&await this['store']['addSymbols'](_0x4daf8a,_0x4a3e15);}}}['bindSelf'](_0x4c25cf,_0xbb54f0,_0x3ebbd3){for(const _0xde0aea of[_0x3ebbd3,'$self']){const _0x243067=_0x4c25cf[_0xde0aea];if(_0x243067)for(const _0x490ec4 of _0x243067){!_0xbb54f0['includes'](_0x490ec4)&&_0xbb54f0['push'](_0x490ec4);}}}['bindSymbols'](_0x5da448,_0x5773b9,_0xc6bf47,_0x362b64,_0x30b482){const _0x423554={},_0x462950={..._0xc6bf47};for(const _0x2e5ee9 of _0x30b482){const _0x508ac6=''+_0x362b64+_0x2e5ee9;if(!_0x462950[_0x508ac6]){if(_0x5da448>_0x5773b9)throw new Error('Symbol\x20index\x20out\x20of\x20bounds');const _0x3a3652=(0x0,utils_1['getSymKey'])(_0x5da448);_0x5da448++,_0x423554[_0x508ac6]=_0x3a3652,_0x462950[_0x508ac6]=_0x3a3652;}}return _0x423554;}['copyJobSchemas'](){const _0x53b9f6=this['manifest']['app']['graphs'];for(const _0x2cf0ed of _0x53b9f6){const _0x35a290=_0x2cf0ed['output']?.['schema'],_0x2bc874=_0x2cf0ed['input']?.['schema'];if(!_0x35a290&&!_0x2bc874)continue;const _0x18f4b1=_0x2cf0ed['activities'];for(const _0x162812 in _0x18f4b1){if(_0x18f4b1[_0x162812]['type']==='trigger'){const _0x1d1b28=_0x18f4b1[_0x162812];_0x35a290&&(!_0x1d1b28['job']&&(_0x1d1b28['job']={}),_0x1d1b28['job']['schema']=_0x35a290),_0x2bc874&&(_0x1d1b28['output']={'schema':_0x2bc874});}}}}['bindBackRefs'](){for(const _0x4c116b of this['manifest']['app']['graphs']){const _0x5967bc=_0x4c116b['activities'],_0x2a729f=this['findTrigger'](_0x4c116b)[0x0];for(const _0x4bbd8d in _0x5967bc){_0x5967bc[_0x4bbd8d]['trigger']=_0x2a729f,_0x5967bc[_0x4bbd8d]['subscribes']=_0x4c116b['subscribes'],_0x4c116b['publishes']&&(_0x5967bc[_0x4bbd8d]['publishes']=_0x4c116b['publishes']),_0x5967bc[_0x4bbd8d]['expire']=_0x4c116b['expire']??undefined,_0x5967bc[_0x4bbd8d]['persistent']=_0x4c116b['persistent']??undefined;}}}['bindCycleTarget'](){for(const _0x747ad9 of this['manifest']['app']['graphs']){const _0xa0067d=_0x747ad9['activities'];for(const _0x498e0c in _0xa0067d){const _0x6a54e1=_0xa0067d[_0x498e0c];_0x6a54e1['type']==='cycle'&&(_0xa0067d[_0x6a54e1['ancestor']]['cycle']=!![]);}}}['convertTopicsToTypes'](){for(const _0xf9f610 of this['manifest']['app']['graphs']){const _0x47ce9e=_0xf9f610['activities'];for(const _0x6deffe in _0x47ce9e){const _0x255669=_0x47ce9e[_0x6deffe];['worker','await']['includes'](_0x255669['type'])&&_0x255669['topic']&&!_0x255669['subtype']&&(_0x255669['subtype']=_0x255669['topic']);}}}['convertActivitiesToHooks'](){for(const _0x48f7d5 of this['manifest']['app']['graphs']){const _0x3c6033=_0x48f7d5['activities'];for(const _0x398ec9 in _0x3c6033){const _0x1c6cf6=_0x3c6033[_0x398ec9];['activity']['includes'](_0x1c6cf6['type'])&&(_0x1c6cf6['type']='hook');}}}async['bindParents'](){const _0x1caf18=this['manifest']['app']['graphs'];for(const _0x532350 of _0x1caf18){if(_0x532350['transitions'])for(const _0x1fab3e in _0x532350['transitions']){const _0x3b3efb=_0x532350['transitions'][_0x1fab3e];for(const _0x1c5171 of _0x3b3efb){const _0x177717=_0x1c5171['to'];_0x532350['activities'][_0x177717]['parent']=_0x1fab3e;}_0x532350['activities'][_0x1fab3e]['transitions']=_0x3b3efb;}}}['collectValues'](_0x1ca384,_0x504688){for(const [_0x1c37b6,_0x32ed33]of Object['entries'](_0x1ca384)){if(_0x1c37b6==='enum'||_0x1c37b6==='examples'||_0x1c37b6==='default'){if(Array['isArray'](_0x32ed33))for(const _0x2c6b51 of _0x32ed33){typeof _0x2c6b51==='string'&&_0x2c6b51['length']>0x5&&_0x504688['add'](_0x2c6b51);}else typeof _0x32ed33==='string'&&_0x32ed33['length']>0x5&&_0x504688['add'](_0x32ed33);}else typeof _0x32ed33==='object'&&this['collectValues'](_0x32ed33,_0x504688);}}['traverse'](_0xf7e8a9,_0x3bf59f){for(const _0x389f7d of Object['values'](_0xf7e8a9)){typeof _0x389f7d==='object'&&('schema'in _0x389f7d?this['collectValues'](_0x389f7d['schema'],_0x3bf59f):this['traverse'](_0x389f7d,_0x3bf59f));}}async['generateSymVals'](){const _0x4ad45d=new Set();for(const _0x39e62d of this['manifest']['app']['graphs']){this['traverse'](_0x39e62d,_0x4ad45d);}const _0x378fa0=await this['store']['getSymbolValues'](),_0x1ab8a9=Object['keys'](_0x378fa0)['length'],_0x11b445=Math['pow'](0x34,0x2)-0x1,_0x1aba1d=serializer_1['SerializerService']['filterSymVals'](_0x1ab8a9,_0x11b445,_0x378fa0,_0x4ad45d);await this['store']['addSymbolValues'](_0x1aba1d);}['resolveJobMapsPaths'](){function _0x159b38(_0x100121){const _0x5030c2=[];function _0x4f9c73(_0x118137,_0x29af85=[]){for(const _0x61d80a in _0x118137){if(typeof _0x118137[_0x61d80a]==='object'&&_0x118137[_0x61d80a]!==null&&!('@pipe'in _0x118137[_0x61d80a])){const _0x5127f1=[..._0x29af85,_0x61d80a];_0x4f9c73(_0x118137[_0x61d80a],_0x5127f1);}else{const _0x574677=[..._0x29af85,_0x61d80a]['join']('/');if(!_0x574677['includes']('[')){const _0x379288='data/'+_0x574677;!_0x5030c2['includes'](_0x379288)&&_0x5030c2['push'](_0x379288);}else{const [_0x318eaf,_0x247340]=_0x574677['split']('['),[_0x5ed879,_0x5e06ed]=_0x247340['split'](']');if(!isNaN(parseInt(_0x5ed879)))for(let _0x10ec07=0x0;_0x10ec07<parseInt(_0x5ed879);_0x10ec07++){const _0x3e0561='data/'+_0x318eaf+'/'+_0x10ec07;!_0x5030c2['includes'](_0x3e0561)&&_0x5030c2['push'](_0x3e0561);}}}}}return _0x100121&&_0x4f9c73(_0x100121),_0x5030c2;}for(const _0x13c812 of this['manifest']['app']['graphs']){let _0x4f659b=[];const [,_0x32a700]=this['findTrigger'](_0x13c812);for(const _0x10e6c9 in _0x13c812['activities']){const _0x43e066=_0x13c812['activities'][_0x10e6c9];_0x4f659b=_0x4f659b['concat'](_0x159b38(_0x43e066['job']?.['maps']));}_0x32a700['PRODUCES']=_0x4f659b;}}['resolveMappingDependencies'](){const _0x29cd43=[];function _0x4e98b1(_0x3755ee,_0x45dc99){for(const _0xd892db in _0x3755ee){if(typeof _0x3755ee[_0xd892db]==='string'){const _0x24b471=_0x3755ee[_0xd892db],_0x3c3e0a=_0x24b471['match'](/^\{[^@].*}$/);_0x3c3e0a&&!validator_1['Validator']['CONTEXT_VARS']['includes'](_0x24b471)&&(_0x24b471['split']('.')[0x1]!=='input'&&(_0x29cd43['push'](_0x24b471),_0x45dc99['push'](_0x24b471)));}else typeof _0x3755ee[_0xd892db]==='object'&&_0x3755ee[_0xd892db]!==null&&_0x4e98b1(_0x3755ee[_0xd892db],_0x45dc99);}}const _0x315af5=this['manifest']['app']['graphs'];for(const _0x35f675 of _0x315af5){const _0x5110c7=_0x35f675['activities'];for(const _0x14d31e in _0x5110c7){const _0x4ee619=_0x5110c7[_0x14d31e];_0x4ee619['consumes']=[],_0x4e98b1(_0x4ee619,_0x4ee619['consumes']),_0x4ee619['consumes']=this['groupMappingRules'](_0x4ee619['consumes']);}}const _0x22ba03=this['groupMappingRules'](_0x29cd43);for(const _0x4e0dbf of _0x315af5){const _0x7f4f65=_0x4e0dbf['activities'];for(const _0x363972 in _0x7f4f65){const _0x6cd34=_0x7f4f65[_0x363972];_0x6cd34['produces']=_0x22ba03[''+_0x363972]||[];}}}['groupMappingRules'](_0xec74ca){_0xec74ca=Array['from'](new Set(_0xec74ca))['sort']();const _0x800d1c={};for(const _0x1a6b5d of _0xec74ca){const [_0x4eba66,_0x324283]=this['resolveMappableValue'](_0x1a6b5d);!_0x800d1c[_0x4eba66]&&(_0x800d1c[_0x4eba66]=[]),_0x800d1c[_0x4eba66]['push'](_0x324283);}return _0x800d1c;}['resolveMappableValue'](_0x5b627a){_0x5b627a=_0x5b627a['substring'](0x1,_0x5b627a['length']-0x1);const _0x2fc355=_0x5b627a['split']('.');if(_0x2fc355[0x0]==='$job'){const [_0x272f9e,..._0x4df865]=_0x2fc355;return[_0x272f9e,_0x4df865['join']('/')];}else{const [_0x4e614c,_0x364b42,_0x356787,..._0x2c2d30]=_0x2fc355,_0x15853a={'hook':'hook/data','input':'input/data','output':_0x356787==='data'?'output/data':'output/metadata'}[_0x364b42];return[_0x4e614c,_0x15853a+'/'+_0x2c2d30['join']('/')];}}async['deployActivitySchemas'](){const _0x1f03cc=this['manifest']['app']['graphs'],_0x2a9473={};for(const _0x4f8b45 of _0x1f03cc){const _0x13f26f=_0x4f8b45['activities'];for(const _0x5728ad in _0x13f26f){const _0x784669=_0x13f26f[_0x5728ad];delete _0x784669['transitions'],_0x2a9473[_0x5728ad]=_0x784669;}}await this['store']['setSchemas'](_0x2a9473,this['getVID']());}async['deploySubscriptions'](){const _0xa93512=this['manifest']['app']['graphs'],_0x5cbbbc={};for(const _0x2a3527 of _0xa93512){const _0x292a1a=_0x2a3527['activities'],_0x20928c=_0x2a3527['subscribes'];for(const _0x57ccb6 in _0x292a1a){if(_0x292a1a[_0x57ccb6]['type']==='trigger'){_0x5cbbbc[_0x20928c]=_0x57ccb6;break;}}}await this['store']['setSubscriptions'](_0x5cbbbc,this['getVID']());}['findTrigger'](_0x588069){for(const _0x29f222 in _0x588069['activities']){const _0x3d7e7f=_0x588069['activities'][_0x29f222];if(_0x3d7e7f['type']==='trigger')return[_0x29f222,_0x3d7e7f];}return null;}async['deployTransitions'](){const _0x44b023=this['manifest']['app']['graphs'],_0x3d24fd={};for(const _0xf6e1a1 of _0x44b023){if(_0xf6e1a1['subscribes']&&_0xf6e1a1['subscribes']['startsWith']('.')){const [_0x106d20]=this['findTrigger'](_0xf6e1a1);_0x106d20&&(_0x3d24fd[_0xf6e1a1['subscribes']]={[_0x106d20]:!![]});}if(_0xf6e1a1['transitions'])for(const _0x1a04a4 in _0xf6e1a1['transitions']){const _0x424fcc=_0xf6e1a1['transitions'][_0x1a04a4],_0x5ef595={};for(const _0x27b7df of _0x424fcc){const _0x16eb27=_0x27b7df['to'];_0x27b7df['conditions']?_0x5ef595[_0x16eb27]=_0x27b7df['conditions']:_0x5ef595[_0x16eb27]=!![];}Object['keys'](_0x5ef595)['length']>0x0&&(_0x3d24fd['.'+_0x1a04a4]=_0x5ef595);}}await this['store']['setTransitions'](_0x3d24fd,this['getVID']());}async['deployHookPatterns'](){const _0x456556=this['manifest']['app']['graphs'],_0x5bf22f={};for(const _0x956df3 of _0x456556){if(_0x956df3['hooks'])for(const _0x4de3fe in _0x956df3['hooks']){_0x5bf22f[_0x4de3fe]=_0x956df3['hooks'][_0x4de3fe];const _0x2f1cef=_0x956df3['hooks'][_0x4de3fe][0x0]['to'],_0x43598e=_0x956df3['activities'][_0x2f1cef];_0x43598e&&(!_0x43598e['hook']&&(_0x43598e['hook']={}),_0x43598e['hook']['topic']=_0x4de3fe);}}await this['store']['setHookRules'](_0x5bf22f);}async['deployConsumerGroups'](){const _0x53c8f8={'appId':this['manifest']['app']['id']},_0x443a85=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x53c8f8);await this['deployConsumerGroup'](_0x443a85,'ENGINE');for(const _0x16f2c4 of this['manifest']['app']['graphs']){const _0x66df5f=_0x16f2c4['activities'];for(const _0x5b5ad0 in _0x66df5f){const _0x3b829a=_0x66df5f[_0x5b5ad0];if(_0x3b829a['type']==='worker'&&pipe_1['Pipe']['resolve'](_0x3b829a['subtype'],{})===_0x3b829a['subtype']){_0x53c8f8['topic']=_0x3b829a['subtype'];const _0x2bd3bd=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x53c8f8);await this['deployConsumerGroup'](_0x2bd3bd,'WORKER');}}}}async['deployConsumerGroup'](_0x445edc,_0x48d265){try{await this['stream']['createConsumerGroup'](_0x445edc,_0x48d265);}catch(_0x4254e1){this['store']['logger']['info']('router-stream-group-exists',{'stream':_0x445edc,'group':_0x48d265});}}}exports['Deployer']=Deployer;
@@ -1,13 +1,13 @@
1
1
  import { ILogger } from '../logger';
2
2
  import { StoreService } from '../store';
3
3
  import { HotMeshManifest } from '../../types/hotmesh';
4
- import { RedisClient, RedisMulti } from '../../types/redis';
4
+ import { ProviderClient, ProviderTransaction } from '../../types/provider';
5
5
  import { StreamService } from '../stream';
6
6
  declare class CompilerService {
7
- store: StoreService<RedisClient, RedisMulti> | null;
8
- stream: StreamService<RedisClient, RedisMulti> | null;
7
+ store: StoreService<ProviderClient, ProviderTransaction> | null;
8
+ stream: StreamService<ProviderClient, ProviderTransaction> | null;
9
9
  logger: ILogger;
10
- constructor(store: StoreService<RedisClient, RedisMulti>, stream: StreamService<RedisClient, RedisMulti>, logger: ILogger);
10
+ constructor(store: StoreService<ProviderClient, ProviderTransaction>, stream: StreamService<ProviderClient, ProviderTransaction>, logger: ILogger);
11
11
  plan(mySchemaOrPath: string): Promise<HotMeshManifest>;
12
12
  isPath(input: string): boolean;
13
13
  deploy(mySchemaOrPath: string): Promise<HotMeshManifest>;
@@ -1 +1 @@
1
- 'use strict';(function(_0xd4b70a,_0x5a2603){const _0x58409d=_0x28fa,_0x457d91=_0xd4b70a();while(!![]){try{const _0x4f0bfe=parseInt(_0x58409d(0xfd))/0x1*(parseInt(_0x58409d(0xf8))/0x2)+parseInt(_0x58409d(0xfb))/0x3*(parseInt(_0x58409d(0x100))/0x4)+-parseInt(_0x58409d(0xfa))/0x5*(parseInt(_0x58409d(0xf7))/0x6)+parseInt(_0x58409d(0xfe))/0x7+parseInt(_0x58409d(0xf6))/0x8*(-parseInt(_0x58409d(0xf9))/0x9)+-parseInt(_0x58409d(0xff))/0xa+parseInt(_0x58409d(0xfc))/0xb;if(_0x4f0bfe===_0x5a2603)break;else _0x457d91['push'](_0x457d91['shift']());}catch(_0x3a10a1){_0x457d91['push'](_0x457d91['shift']());}}}(_0x36c4,0xe560c));var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x32da81,_0x1e6e29,_0x273245,_0x35ed6f){if(_0x35ed6f===undefined)_0x35ed6f=_0x273245;var _0x10168e=Object['getOwnPropertyDescriptor'](_0x1e6e29,_0x273245);(!_0x10168e||('get'in _0x10168e?!_0x1e6e29['__esModule']:_0x10168e['writable']||_0x10168e['configurable']))&&(_0x10168e={'enumerable':!![],'get':function(){return _0x1e6e29[_0x273245];}}),Object['defineProperty'](_0x32da81,_0x35ed6f,_0x10168e);}:function(_0x557939,_0xe0051b,_0x55506e,_0x512e1f){if(_0x512e1f===undefined)_0x512e1f=_0x55506e;_0x557939[_0x512e1f]=_0xe0051b[_0x55506e];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x21e9c1,_0x1c673a){Object['defineProperty'](_0x21e9c1,'default',{'enumerable':!![],'value':_0x1c673a});}:function(_0xde5fd5,_0x8e0f5e){_0xde5fd5['default']=_0x8e0f5e;}),__importStar=this&&this['__importStar']||function(_0x1a3296){if(_0x1a3296&&_0x1a3296['__esModule'])return _0x1a3296;var _0x2f8351={};if(_0x1a3296!=null){for(var _0xd46ac in _0x1a3296)if(_0xd46ac!=='default'&&Object['prototype']['hasOwnProperty']['call'](_0x1a3296,_0xd46ac))__createBinding(_0x2f8351,_0x1a3296,_0xd46ac);}return __setModuleDefault(_0x2f8351,_0x1a3296),_0x2f8351;},__importDefault=this&&this['__importDefault']||function(_0x4274a9){return _0x4274a9&&_0x4274a9['__esModule']?_0x4274a9:{'default':_0x4274a9};};function _0x28fa(_0x33f299,_0x328fc8){const _0x36c43e=_0x36c4();return _0x28fa=function(_0x28fac1,_0x3a2ff8){_0x28fac1=_0x28fac1-0xf6;let _0x2bac90=_0x36c43e[_0x28fac1];return _0x2bac90;},_0x28fa(_0x33f299,_0x328fc8);}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(_0x49bbd6,_0x234ff2,_0x38f01d){this['store']=_0x49bbd6,this['stream']=_0x234ff2,this['logger']=_0x38f01d;}async['plan'](_0x509752){try{let _0x57cdbb;this['isPath'](_0x509752)?_0x57cdbb=await json_schema_ref_parser_1['default']['dereference'](_0x509752):_0x57cdbb=js_yaml_1['default']['load'](_0x509752);const _0x1a5886=new validator_1['Validator'](_0x57cdbb);return _0x1a5886['validate'](this['store']),_0x57cdbb;}catch(_0x5538c9){this['logger']['error']('compiler-plan-error',_0x5538c9);}}['isPath'](_0x50a6dd){return!_0x50a6dd['trim']()['startsWith']('app:');}async['deploy'](_0x517e78){try{let _0x179f51;this['isPath'](_0x517e78)?(_0x179f51=await json_schema_ref_parser_1['default']['dereference'](_0x517e78),await this['saveAsJSON'](_0x517e78,_0x179f51)):_0x179f51=js_yaml_1['default']['load'](_0x517e78);const _0x2786b4=new validator_1['Validator'](_0x179f51);_0x2786b4['validate'](this['store']);const _0x598ef0=new deployer_1['Deployer'](_0x179f51);return await _0x598ef0['deploy'](this['store'],this['stream']),await this['store']['setApp'](_0x179f51['app']['id'],_0x179f51['app']['version']),_0x179f51;}catch(_0x57caa6){this['logger']['error']('compiler-deploy-error',_0x57caa6);}}async['activate'](_0x2388aa,_0xfddbe3){return await this['store']['activateAppVersion'](_0x2388aa,_0xfddbe3);}async['saveAsJSON'](_0x52772b,_0x1a5bf6){const _0x1cdbb1=JSON['stringify'](_0x1a5bf6,null,0x2),_0x39efb9=path['join'](path['dirname'](_0x52772b),'.hotmesh.'+_0x1a5bf6['app']['id']+'.'+_0x1a5bf6['app']['version']+'.json');await fs['writeFile'](_0x39efb9,_0x1cdbb1,'utf8');}}function _0x36c4(){const _0x48aeda=['4309684CbYUwX','1437632lcfhGX','8573550ITkYKJ','121078vtPGeB','45fcaXSl','5tqPzes','3TEJmdU','5379242PMMeZz','31iqpnbj','3197299ALkVuB','6329320tFhsHm'];_0x36c4=function(){return _0x48aeda;};return _0x36c4();}exports['CompilerService']=CompilerService;
1
+ 'use strict';(function(_0x20a2bf,_0x208e1c){const _0x242f7e=_0x3be4,_0x3287a3=_0x20a2bf();while(!![]){try{const _0x16ad49=parseInt(_0x242f7e(0x125))/0x1*(parseInt(_0x242f7e(0x128))/0x2)+-parseInt(_0x242f7e(0x126))/0x3+parseInt(_0x242f7e(0x12c))/0x4+-parseInt(_0x242f7e(0x12a))/0x5*(parseInt(_0x242f7e(0x129))/0x6)+-parseInt(_0x242f7e(0x123))/0x7*(-parseInt(_0x242f7e(0x124))/0x8)+-parseInt(_0x242f7e(0x127))/0x9+parseInt(_0x242f7e(0x12b))/0xa;if(_0x16ad49===_0x208e1c)break;else _0x3287a3['push'](_0x3287a3['shift']());}catch(_0x569eea){_0x3287a3['push'](_0x3287a3['shift']());}}}(_0x3b5f,0x4d1e4));var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x14c9f7,_0x811f53,_0x2ce7d4,_0x140498){if(_0x140498===undefined)_0x140498=_0x2ce7d4;var _0xd708ba=Object['getOwnPropertyDescriptor'](_0x811f53,_0x2ce7d4);(!_0xd708ba||('get'in _0xd708ba?!_0x811f53['__esModule']:_0xd708ba['writable']||_0xd708ba['configurable']))&&(_0xd708ba={'enumerable':!![],'get':function(){return _0x811f53[_0x2ce7d4];}}),Object['defineProperty'](_0x14c9f7,_0x140498,_0xd708ba);}:function(_0x5b3be7,_0x2daf33,_0x5f2d16,_0x2e1108){if(_0x2e1108===undefined)_0x2e1108=_0x5f2d16;_0x5b3be7[_0x2e1108]=_0x2daf33[_0x5f2d16];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x291993,_0x15e999){Object['defineProperty'](_0x291993,'default',{'enumerable':!![],'value':_0x15e999});}:function(_0x11d08b,_0x432374){_0x11d08b['default']=_0x432374;}),__importStar=this&&this['__importStar']||function(_0x1b5ab4){if(_0x1b5ab4&&_0x1b5ab4['__esModule'])return _0x1b5ab4;var _0x59f9a5={};if(_0x1b5ab4!=null){for(var _0x315b9c in _0x1b5ab4)if(_0x315b9c!=='default'&&Object['prototype']['hasOwnProperty']['call'](_0x1b5ab4,_0x315b9c))__createBinding(_0x59f9a5,_0x1b5ab4,_0x315b9c);}return __setModuleDefault(_0x59f9a5,_0x1b5ab4),_0x59f9a5;},__importDefault=this&&this['__importDefault']||function(_0x4b198c){return _0x4b198c&&_0x4b198c['__esModule']?_0x4b198c:{'default':_0x4b198c};};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');function _0x3b5f(){const _0x2f7f0f=['6311yWhdKq','642756SgkHwI','540216qlhaDZ','172xhFcjZ','30bhQFgt','541110ojTaXp','170540wGvXRb','1543304NyHgSx','14JOGClb','742544odPMNk'];_0x3b5f=function(){return _0x2f7f0f;};return _0x3b5f();}function _0x3be4(_0x238924,_0xee953c){const _0x3b5ff6=_0x3b5f();return _0x3be4=function(_0x3be4af,_0x2a2138){_0x3be4af=_0x3be4af-0x123;let _0x2fb22e=_0x3b5ff6[_0x3be4af];return _0x2fb22e;},_0x3be4(_0x238924,_0xee953c);}class CompilerService{constructor(_0x4db1b0,_0x389184,_0x5045b3){this['store']=_0x4db1b0,this['stream']=_0x389184,this['logger']=_0x5045b3;}async['plan'](_0x49f479){try{let _0x41a0e2;this['isPath'](_0x49f479)?_0x41a0e2=await json_schema_ref_parser_1['default']['dereference'](_0x49f479):_0x41a0e2=js_yaml_1['default']['load'](_0x49f479);const _0x5c9e34=new validator_1['Validator'](_0x41a0e2);return _0x5c9e34['validate'](this['store']),_0x41a0e2;}catch(_0x347d17){this['logger']['error']('compiler-plan-error',_0x347d17);}}['isPath'](_0x2cd26a){return!_0x2cd26a['trim']()['startsWith']('app:');}async['deploy'](_0x2c86ea){try{let _0x33814b;this['isPath'](_0x2c86ea)?(_0x33814b=await json_schema_ref_parser_1['default']['dereference'](_0x2c86ea),await this['saveAsJSON'](_0x2c86ea,_0x33814b)):_0x33814b=js_yaml_1['default']['load'](_0x2c86ea);const _0x582d0d=new validator_1['Validator'](_0x33814b);_0x582d0d['validate'](this['store']);const _0xf2bd59=new deployer_1['Deployer'](_0x33814b);return await _0xf2bd59['deploy'](this['store'],this['stream']),await this['store']['setApp'](_0x33814b['app']['id'],_0x33814b['app']['version']),_0x33814b;}catch(_0x3bc84b){this['logger']['error']('compiler-deploy-error',_0x3bc84b);}}async['activate'](_0x55d478,_0x48e596){return await this['store']['activateAppVersion'](_0x55d478,_0x48e596);}async['saveAsJSON'](_0x215365,_0x217c9b){const _0x3b4db6=JSON['stringify'](_0x217c9b,null,0x2),_0x33a2d5=path['join'](path['dirname'](_0x215365),'.hotmesh.'+_0x217c9b['app']['id']+'.'+_0x217c9b['app']['version']+'.json');await fs['writeFile'](_0x33a2d5,_0x3b4db6,'utf8');}}exports['CompilerService']=CompilerService;