@hotmeshio/hotmesh 0.3.7 → 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 (157) hide show
  1. package/README.md +15 -18
  2. package/build/index.d.ts +4 -1
  3. package/build/index.js +7 -1
  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/index.d.ts +2 -0
  57. package/build/services/meshflow/index.js +2 -0
  58. package/build/services/meshflow/search.js +12 -4
  59. package/build/services/meshflow/worker.js +7 -7
  60. package/build/services/meshos/index.d.ts +1 -4
  61. package/build/services/meshos/index.js +11 -44
  62. package/build/services/pipe/functions/array.js +1 -1
  63. package/build/services/pipe/functions/bitwise.js +1 -1
  64. package/build/services/pipe/functions/conditional.js +1 -1
  65. package/build/services/pipe/functions/cron.d.ts +2 -0
  66. package/build/services/pipe/functions/cron.js +1 -1
  67. package/build/services/pipe/functions/date.js +1 -1
  68. package/build/services/pipe/functions/index.js +1 -1
  69. package/build/services/pipe/functions/json.js +1 -1
  70. package/build/services/pipe/functions/logical.js +1 -1
  71. package/build/services/pipe/functions/math.js +1 -1
  72. package/build/services/pipe/functions/number.js +1 -1
  73. package/build/services/pipe/functions/object.js +1 -1
  74. package/build/services/pipe/functions/string.js +1 -1
  75. package/build/services/pipe/functions/symbol.js +1 -1
  76. package/build/services/pipe/functions/unary.js +1 -1
  77. package/build/services/pipe/index.js +1 -1
  78. package/build/services/quorum/index.d.ts +5 -5
  79. package/build/services/quorum/index.js +1 -1
  80. package/build/services/reporter/index.d.ts +2 -2
  81. package/build/services/reporter/index.js +1 -1
  82. package/build/services/router/index.d.ts +8 -13
  83. package/build/services/router/index.js +1 -1
  84. package/build/services/search/factory.d.ts +2 -2
  85. package/build/services/search/factory.js +1 -1
  86. package/build/services/search/index.d.ts +5 -4
  87. package/build/services/search/providers/redis/ioredis.js +1 -1
  88. package/build/services/search/providers/redis/redis.js +1 -1
  89. package/build/services/serializer/index.js +1 -1
  90. package/build/services/store/factory.d.ts +3 -3
  91. package/build/services/store/factory.js +1 -1
  92. package/build/services/store/index.d.ts +18 -17
  93. package/build/services/store/providers/redis/_base.d.ts +13 -15
  94. package/build/services/store/providers/redis/_base.js +1 -1
  95. package/build/services/store/providers/redis/ioredis.d.ts +2 -2
  96. package/build/services/store/providers/redis/ioredis.js +1 -1
  97. package/build/services/store/providers/redis/redis.d.ts +2 -2
  98. package/build/services/store/providers/redis/redis.js +1 -1
  99. package/build/services/store/providers/store-initializable.js +1 -1
  100. package/build/services/stream/factory.d.ts +3 -3
  101. package/build/services/stream/factory.js +16 -4
  102. package/build/services/stream/index.d.ts +57 -18
  103. package/build/services/stream/index.js +2 -1
  104. package/build/services/stream/providers/nats/nats.d.ts +59 -0
  105. package/build/services/stream/providers/nats/nats.js +1 -0
  106. package/build/services/stream/providers/postgres/_deploy.d.ts +2 -1
  107. package/build/services/stream/providers/postgres/_deploy.js +1 -1
  108. package/build/services/stream/providers/postgres/postgres.d.ts +0 -0
  109. package/build/services/stream/providers/postgres/postgres.js +0 -0
  110. package/build/services/stream/providers/redis/ioredis.d.ts +53 -14
  111. package/build/services/stream/providers/redis/ioredis.js +1 -1
  112. package/build/services/stream/providers/redis/redis.d.ts +54 -15
  113. package/build/services/stream/providers/redis/redis.js +1 -1
  114. package/build/services/stream/providers/stream-initializable.d.ts +1 -2
  115. package/build/services/stream/providers/stream-initializable.js +1 -1
  116. package/build/services/sub/factory.d.ts +2 -2
  117. package/build/services/sub/factory.js +1 -1
  118. package/build/services/sub/index.d.ts +6 -5
  119. package/build/services/sub/providers/redis/ioredis.d.ts +1 -1
  120. package/build/services/sub/providers/redis/ioredis.js +1 -1
  121. package/build/services/sub/providers/redis/redis.d.ts +4 -4
  122. package/build/services/sub/providers/redis/redis.js +1 -1
  123. package/build/services/task/index.d.ts +5 -5
  124. package/build/services/task/index.js +1 -1
  125. package/build/services/telemetry/index.js +1 -1
  126. package/build/services/worker/index.d.ts +9 -9
  127. package/build/services/worker/index.js +1 -1
  128. package/build/types/hotmesh.d.ts +26 -14
  129. package/build/types/index.d.ts +6 -5
  130. package/build/types/manifest.d.ts +1 -9
  131. package/build/types/meshcall.d.ts +12 -7
  132. package/build/types/meshflow.d.ts +3 -7
  133. package/build/types/nats.d.ts +150 -0
  134. package/build/types/nats.js +2 -0
  135. package/build/types/postgres.d.ts +48 -0
  136. package/build/types/postgres.js +2 -0
  137. package/build/types/provider.d.ts +26 -0
  138. package/build/types/provider.js +2 -0
  139. package/build/types/redis.d.ts +33 -15
  140. package/build/types/stream.d.ts +65 -1
  141. package/index.ts +10 -4
  142. package/package.json +14 -7
  143. package/typedoc.json +2 -1
  144. package/types/hotmesh.ts +139 -22
  145. package/types/index.ts +26 -17
  146. package/types/manifest.ts +1 -10
  147. package/types/meshcall.ts +38 -13
  148. package/types/meshflow.ts +2 -7
  149. package/types/nats.ts +231 -0
  150. package/types/postgres.ts +54 -0
  151. package/types/provider.ts +71 -0
  152. package/types/redis.ts +63 -18
  153. package/types/stream.ts +85 -1
  154. package/build/services/connector/clients/ioredis.d.ts +0 -13
  155. package/build/services/connector/clients/ioredis.js +0 -48
  156. package/build/services/connector/clients/redis.d.ts +0 -13
  157. package/build/services/connector/clients/redis.js +0 -60
@@ -1 +1 @@
1
- 'use strict';function _0x5420(_0x535041,_0x25e30a){const _0x3bb880=_0x3bb8();return _0x5420=function(_0x542041,_0x47b3a7){_0x542041=_0x542041-0x15c;let _0x5f1de6=_0x3bb880[_0x542041];return _0x5f1de6;},_0x5420(_0x535041,_0x25e30a);}(function(_0x2bc871,_0x2ab16c){const _0x1dbbf2=_0x5420,_0x128883=_0x2bc871();while(!![]){try{const _0x55cdc1=parseInt(_0x1dbbf2(0x161))/0x1+-parseInt(_0x1dbbf2(0x15d))/0x2*(-parseInt(_0x1dbbf2(0x15f))/0x3)+parseInt(_0x1dbbf2(0x165))/0x4*(-parseInt(_0x1dbbf2(0x160))/0x5)+parseInt(_0x1dbbf2(0x162))/0x6*(parseInt(_0x1dbbf2(0x163))/0x7)+parseInt(_0x1dbbf2(0x15c))/0x8+-parseInt(_0x1dbbf2(0x15e))/0x9*(parseInt(_0x1dbbf2(0x166))/0xa)+-parseInt(_0x1dbbf2(0x164))/0xb;if(_0x55cdc1===_0x2ab16c)break;else _0x128883['push'](_0x128883['shift']());}catch(_0x100dba){_0x128883['push'](_0x128883['shift']());}}}(_0x3bb8,0x3fffd));function _0x3bb8(){const _0x1fd74a=['954rDKKqc','744411OTQtUQ','790kLaNmb','5903lEAdzl','4422SwQLbh','1561KJZAFu','5424452MwzNKf','7416mHUIcP','12030URDZrO','4073560wFwSgR','4bLkeFo'];_0x3bb8=function(){return _0x1fd74a;};return _0x3bb8();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Hook']=void 0x0;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');class Hook extends activity_1['Activity']{constructor(_0x3dd56d,_0x149c5c,_0x18992f,_0x5cdb28,_0x14c6ca,_0x42d42a){super(_0x3dd56d,_0x149c5c,_0x18992f,_0x5cdb28,_0x14c6ca,_0x42d42a);}async['process'](){this['logger']['debug']('hook-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x1755b8;try{return await this['verifyEntry'](),_0x1755b8=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x1755b8['startActivitySpan'](this['leg']),this['doesHook']()?await this['doHook'](_0x1755b8):await this['doPassThrough'](_0x1755b8),this['context']['metadata']['aid'];}catch(_0x4a94b7){if(_0x4a94b7 instanceof errors_1['InactiveJobError']){this['logger']['error']('hook-inactive-job-error',{..._0x4a94b7});return;}else{if(_0x4a94b7 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x4a94b7});return;}else{if(_0x4a94b7 instanceof errors_1['GetStateError']){this['logger']['error']('hook-get-state-error',{..._0x4a94b7});return;}else{if(_0x4a94b7 instanceof errors_1['CollationError']){if(_0x4a94b7['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',{..._0x4a94b7});}else this['logger']['error']('hook-process-error',{..._0x4a94b7});}}}_0x1755b8?.['setActivityError'](_0x4a94b7['message']);throw _0x4a94b7;}finally{_0x1755b8?.['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 _0x17af66=pipe_1['Pipe']['resolve'](this['config']['sleep'],this['context']);return!isNaN(_0x17af66)&&Number(_0x17af66)>0x0;}return!!this['config']['hook']?.['topic'];}async['doHook'](_0x3e9390){const _0x1c8ba2=this['store']['getMulti']();await this['registerHook'](enums_1['HMSH_IS_CLUSTER']?undefined:_0x1c8ba2),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x1c8ba2),await collator_1['CollatorService']['authorizeReentry'](this,_0x1c8ba2),await this['setStatus'](0x0,_0x1c8ba2),await _0x1c8ba2['exec'](),_0x3e9390['mapActivityAttributes']();}async['doPassThrough'](_0x2c8c45){const _0x43ebff=this['store']['getMulti']();let _0x3c1d27;this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x43ebff),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x43ebff),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x43ebff),_0x3c1d27=await _0x43ebff['exec'](),_0x2c8c45['mapActivityAttributes']();const _0x165282=this['resolveStatus'](_0x3c1d27),_0x491e1f={'app.job.jss':_0x165282},_0x1f1ec7=await this['transition'](this['adjacencyList'],_0x165282);_0x1f1ec7['length']&&(_0x491e1f['app.activity.mids']=_0x1f1ec7['join'](',')),_0x2c8c45['setActivityAttributes'](_0x491e1f);}async['getHookRule'](_0x3d66ad){const _0x336b60=await this['store']['getHookRules']();return _0x336b60?.[_0x3d66ad]?.[0x0];}async['registerHook'](_0x1ab072){if(this['config']['hook']?.['topic'])return await this['engine']['taskService']['registerWebHook'](this['config']['hook']['topic'],this['context'],this['resolveDad'](),this['context']['metadata']['expire'],_0x1ab072);else{if(this['config']['sleep']){const _0x490302=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',_0x490302,this['metadata']['dad']||''),this['context']['metadata']['jid'];}}}async['processWebHookEvent'](_0x552b70=stream_1['StreamStatus']['SUCCESS'],_0x2fe7a1=0xc8){this['logger']['debug']('hook-process-web-hook-event',{'topic':this['config']['hook']['topic'],'aid':this['metadata']['aid'],'status':_0x552b70,'code':_0x2fe7a1});const _0x2426bb=new task_1['TaskService'](this['store'],this['logger']),_0x55dc82={...this['data']},_0x5da35f=await _0x2426bb['processWebHookSignal'](this['config']['hook']['topic'],_0x55dc82);if(_0x5da35f){const [_0x543a68,_0x550119,_0x58b8f2,_0x23b805]=_0x5da35f;this['context']['metadata']['jid']=_0x543a68,this['context']['metadata']['gid']=_0x23b805,this['context']['metadata']['dad']=_0x58b8f2,await this['processEvent'](_0x552b70,_0x2fe7a1,'hook'),_0x2fe7a1===0xc8&&await _0x2426bb['deleteWebHookSignal'](this['config']['hook']['topic'],_0x55dc82);}}async['processTimeHookEvent'](_0x58002f){this['logger']['debug']('hook-process-time-hook-event',{'jid':_0x58002f,'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(_0x447765,_0x47861b){const _0x272d75=_0x1079,_0x4db7b8=_0x447765();while(!![]){try{const _0x4be681=parseInt(_0x272d75(0x87))/0x1*(parseInt(_0x272d75(0x8a))/0x2)+-parseInt(_0x272d75(0x82))/0x3+parseInt(_0x272d75(0x81))/0x4*(-parseInt(_0x272d75(0x83))/0x5)+-parseInt(_0x272d75(0x8b))/0x6*(parseInt(_0x272d75(0x80))/0x7)+parseInt(_0x272d75(0x89))/0x8+parseInt(_0x272d75(0x84))/0x9*(-parseInt(_0x272d75(0x85))/0xa)+-parseInt(_0x272d75(0x86))/0xb*(-parseInt(_0x272d75(0x88))/0xc);if(_0x4be681===_0x47861b)break;else _0x4db7b8['push'](_0x4db7b8['shift']());}catch(_0x5a0aed){_0x4db7b8['push'](_0x4db7b8['shift']());}}}(_0x27e1,0x9476c));Object['defineProperty'](exports,'__esModule',{'value':!![]});function _0x1079(_0x51719f,_0x1826e4){const _0x27e1ed=_0x27e1();return _0x1079=function(_0x1079fa,_0x466e53){_0x1079fa=_0x1079fa-0x80;let _0x461784=_0x27e1ed[_0x1079fa];return _0x461784;},_0x1079(_0x51719f,_0x1826e4);}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 _0x27e1(){const _0x5da83c=['2367HLMMdN','6920zIzDWF','11627UQviGw','1VtFrBi','19020tuPwTh','4811728tpBVvU','2271920fCHTVb','1542pBlzqV','28399acxhdV','9852TgbyIP','2405130ZPdrTd','1580YwsvJw'];_0x27e1=function(){return _0x5da83c;};return _0x27e1();}
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(_0xb9856f,_0x5dcb43){const _0xf753ac=_0x15bd,_0x3f8e0a=_0xb9856f();while(!![]){try{const _0x3a6585=parseInt(_0xf753ac(0x72))/0x1+parseInt(_0xf753ac(0x6f))/0x2*(-parseInt(_0xf753ac(0x79))/0x3)+parseInt(_0xf753ac(0x73))/0x4*(-parseInt(_0xf753ac(0x77))/0x5)+parseInt(_0xf753ac(0x75))/0x6*(-parseInt(_0xf753ac(0x76))/0x7)+parseInt(_0xf753ac(0x74))/0x8*(parseInt(_0xf753ac(0x6e))/0x9)+parseInt(_0xf753ac(0x78))/0xa*(-parseInt(_0xf753ac(0x70))/0xb)+parseInt(_0xf753ac(0x6d))/0xc*(parseInt(_0xf753ac(0x71))/0xd);if(_0x3a6585===_0x5dcb43)break;else _0x3f8e0a['push'](_0x3f8e0a['shift']());}catch(_0x5a67a4){_0x3f8e0a['push'](_0x3f8e0a['shift']());}}}(_0xdd16,0x86ac7));function _0x15bd(_0x3480fe,_0x5e984e){const _0xdd1655=_0xdd16();return _0x15bd=function(_0x15bd60,_0x595b6e){_0x15bd60=_0x15bd60-0x6d;let _0x16e394=_0xdd1655[_0x15bd60];return _0x16e394;},_0x15bd(_0x3480fe,_0x5e984e);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Interrupt']=void 0x0;const errors_1=require('../../modules/errors'),collator_1=require('../collator'),pipe_1=require('../pipe'),telemetry_1=require('../telemetry'),activity_1=require('./activity');function _0xdd16(){const _0x5206f9=['7010gWPwxh','3183FiBZCm','12cVEAtK','19638Qlcfxq','1302qGBHhR','253sUuzHG','21229WEUtPv','714214xtNdao','112BwrehH','2312nFSdRC','121656ghbPvu','21WAMlNg','4850XoosOs'];_0xdd16=function(){return _0x5206f9;};return _0xdd16();}class Interrupt extends activity_1['Activity']{constructor(_0x2e72ea,_0x4fcfba,_0x5262d0,_0x946437,_0x363e6a,_0x1b575a){super(_0x2e72ea,_0x4fcfba,_0x5262d0,_0x946437,_0x363e6a,_0x1b575a);}async['process'](){this['logger']['debug']('interrupt-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x3e0667;try{await this['verifyEntry'](),_0x3e0667=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x3e0667['startActivitySpan'](this['leg']),this['isInterruptingSelf']()?await this['interruptSelf'](_0x3e0667):await this['interruptAnother'](_0x3e0667);}catch(_0x46b7e9){if(_0x46b7e9 instanceof errors_1['InactiveJobError']){this['logger']['error']('interrupt-inactive-job-error',{..._0x46b7e9});return;}else{if(_0x46b7e9 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0x46b7e9});return;}else{if(_0x46b7e9 instanceof errors_1['GetStateError']){this['logger']['error']('interrupt-get-state-error',{..._0x46b7e9});return;}else{if(_0x46b7e9 instanceof errors_1['CollationError']){if(_0x46b7e9['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',{..._0x46b7e9});}else this['logger']['error']('interrupt-process-error',{..._0x46b7e9});}}}_0x3e0667?.['setActivityError'](_0x46b7e9['message']);throw _0x46b7e9;}finally{_0x3e0667?.['endActivitySpan'](),this['logger']['debug']('interrupt-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['interruptSelf'](_0x50bf35){this['config']['job']?.['maps']&&(this['mapJobData'](),await this['setState']());const _0x1fa45c=await this['interrupt']();_0x50bf35['mapActivityAttributes']();const _0x47d240=this['store']['getMulti']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x47d240),await this['setStatus'](-0x1,_0x47d240);const _0x2d9bcc=await _0x47d240['exec'](),_0x53f2fb=this['resolveStatus'](_0x2d9bcc);return _0x50bf35['setActivityAttributes']({'app.activity.mid':_0x1fa45c,'app.job.jss':_0x53f2fb}),this['context']['metadata']['aid'];}async['interruptAnother'](_0x339d48){const _0x4ef9cd=await this['interrupt'](),_0x562fa9={'app.activity.mid':_0x4ef9cd};_0x339d48['mapActivityAttributes'](),this['adjacencyList']=await this['filterAdjacent']();if(this['config']['job']?.['maps']||this['config']['output']?.['maps']){this['mapOutputData'](),this['mapJobData']();const _0x3051b8=this['store']['getMulti']();await this['setState'](_0x3051b8);}const _0x14c23d=this['store']['getMulti']();await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x14c23d),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x14c23d);const _0x4b9e6f=await _0x14c23d['exec'](),_0x17c8bc=this['resolveStatus'](_0x4b9e6f);_0x562fa9['app.job.jss']=_0x17c8bc;const _0x2226ae=await this['transition'](this['adjacencyList'],_0x17c8bc);return _0x2226ae['length']&&(_0x562fa9['app.activity.mids']=_0x2226ae['join'](',')),_0x339d48['setActivityAttributes'](_0x562fa9),this['context']['metadata']['aid'];}['isInterruptingSelf'](){if(!this['config']['target'])return!![];const _0x2e1971=pipe_1['Pipe']['resolve'](this['config']['target'],this['context']);return _0x2e1971==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 _0x189a53=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'],_0x189a53);}}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(_0x4a07e2,_0x1a68d0){const _0x3f9e5e=_0x2338,_0x2f2a2d=_0x4a07e2();while(!![]){try{const _0x2f845c=parseInt(_0x3f9e5e(0xe3))/0x1*(parseInt(_0x3f9e5e(0xe9))/0x2)+-parseInt(_0x3f9e5e(0xe5))/0x3*(parseInt(_0x3f9e5e(0xe6))/0x4)+-parseInt(_0x3f9e5e(0xed))/0x5+-parseInt(_0x3f9e5e(0xec))/0x6*(-parseInt(_0x3f9e5e(0xeb))/0x7)+-parseInt(_0x3f9e5e(0xe7))/0x8+parseInt(_0x3f9e5e(0xe4))/0x9+-parseInt(_0x3f9e5e(0xea))/0xa*(-parseInt(_0x3f9e5e(0xe8))/0xb);if(_0x2f845c===_0x1a68d0)break;else _0x2f2a2d['push'](_0x2f2a2d['shift']());}catch(_0x306528){_0x2f2a2d['push'](_0x2f2a2d['shift']());}}}(_0x4c52,0xc3be2));function _0x4c52(){const _0x1110f2=['560514aQJKoi','5849930QPzNOF','9pfZDhu','7162956okPfJK','1544847ApukzD','8sjgAsj','365192MDzZVt','17692917FTyuRE','39082KqJQiK','10XyJmRz','35yuSJnm'];_0x4c52=function(){return _0x1110f2;};return _0x4c52();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Signal']=void 0x0;function _0x2338(_0x154925,_0x769286){const _0x4c52fc=_0x4c52();return _0x2338=function(_0x2338b9,_0x1551db){_0x2338b9=_0x2338b9-0xe3;let _0x433b5d=_0x4c52fc[_0x2338b9];return _0x433b5d;},_0x2338(_0x154925,_0x769286);}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(_0x3850e9,_0x476ec8,_0x5739b4,_0x2d7791,_0x4bb375,_0x486a6f){super(_0x3850e9,_0x476ec8,_0x5739b4,_0x2d7791,_0x4bb375,_0x486a6f);}async['process'](){this['logger']['debug']('signal-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x18b012;try{await this['verifyEntry'](),_0x18b012=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x18b012['startActivitySpan'](this['leg']);const _0x37c7fe=this['store']['getMulti']();this['adjacencyList']=await this['filterAdjacent'](),this['mapOutputData'](),this['mapJobData'](),await this['setState'](_0x37c7fe),await collator_1['CollatorService']['notarizeEarlyCompletion'](this,_0x37c7fe),await this['setStatus'](this['adjacencyList']['length']-0x1,_0x37c7fe);const _0x165dab=await _0x37c7fe['exec']();this['config']['subtype']==='all'?await this['hookAll']():await this['hookOne']();const _0x143a64=this['resolveStatus'](_0x165dab),_0x48aea9={'app.job.jss':_0x143a64},_0x5a863a=await this['transition'](this['adjacencyList'],_0x143a64);return _0x5a863a['length']&&(_0x48aea9['app.activity.mids']=_0x5a863a['join'](',')),_0x18b012['mapActivityAttributes'](),_0x18b012['setActivityAttributes'](_0x48aea9),this['context']['metadata']['aid'];}catch(_0xef2dc8){if(_0xef2dc8 instanceof errors_1['InactiveJobError']){this['logger']['error']('signal-inactive-job-error',{..._0xef2dc8});return;}else{if(_0xef2dc8 instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0xef2dc8});return;}else{if(_0xef2dc8 instanceof errors_1['GetStateError']){this['logger']['error']('signal-get-state-error',{..._0xef2dc8});return;}else{if(_0xef2dc8 instanceof errors_1['CollationError']){if(_0xef2dc8['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',{..._0xef2dc8});}else this['logger']['error']('signal-process-error',{..._0xef2dc8});}}}_0x18b012?.['setActivityError'](_0xef2dc8['message']);throw _0xef2dc8;}finally{_0x18b012?.['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 _0x32bdc5=new mapper_1['MapperService'](this['config']['signal']['maps'],this['context']);return _0x32bdc5['mapRules']();}}['mapResolverData'](){if(this['config']['resolver']?.['maps']){const _0xd64a3d=new mapper_1['MapperService'](this['config']['resolver']['maps'],this['context']);return _0xd64a3d['mapRules']();}}async['hookOne'](){const _0x5508e0=pipe_1['Pipe']['resolve'](this['config']['topic'],this['context']),_0x289522=this['mapSignalData'](),_0x2335f1=pipe_1['Pipe']['resolve'](this['config']['status'],this['context']),_0x2a745b=pipe_1['Pipe']['resolve'](this['config']['code'],this['context']);return await this['engine']['hook'](_0x5508e0,_0x289522,_0x2335f1,_0x2a745b);}async['hookAll'](){const _0x508c94=this['mapSignalData'](),_0x536d54=this['mapResolverData']();this['config']['scrub']&&(_0x536d54['scrub']=!![]);const _0x3dd879=pipe_1['Pipe']['resolve'](this['config']['key_name'],this['context']),_0xf7707d=pipe_1['Pipe']['resolve'](this['config']['key_value'],this['context']),_0x4886d1=[_0x3dd879+':'+_0xf7707d];return await this['engine']['hookAll'](this['config']['topic'],_0x508c94,_0x536d54,_0x4886d1);}}exports['Signal']=Signal;
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(_0xc278a2,_0x4c766c){const _0x3c4e0b=_0x119e,_0x45249c=_0xc278a2();while(!![]){try{const _0x357776=-parseInt(_0x3c4e0b(0x1f9))/0x1*(parseInt(_0x3c4e0b(0x1fa))/0x2)+parseInt(_0x3c4e0b(0x1f8))/0x3*(parseInt(_0x3c4e0b(0x1f5))/0x4)+-parseInt(_0x3c4e0b(0x1f7))/0x5+parseInt(_0x3c4e0b(0x1f4))/0x6+parseInt(_0x3c4e0b(0x1fd))/0x7+parseInt(_0x3c4e0b(0x1fb))/0x8*(-parseInt(_0x3c4e0b(0x1f6))/0x9)+parseInt(_0x3c4e0b(0x1fc))/0xa;if(_0x357776===_0x4c766c)break;else _0x45249c['push'](_0x45249c['shift']());}catch(_0x51dded){_0x45249c['push'](_0x45249c['shift']());}}}(_0x3e50,0x8fef1));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 _0x119e(_0xb4d956,_0x32bd26){const _0x3e5095=_0x3e50();return _0x119e=function(_0x119eff,_0x9ae153){_0x119eff=_0x119eff-0x1f4;let _0x389c0e=_0x3e5095[_0x119eff];return _0x389c0e;},_0x119e(_0xb4d956,_0x32bd26);}class Trigger extends activity_1['Activity']{constructor(_0x3779c4,_0x2a99b9,_0x5cf5ad,_0x582af2,_0x5c85df,_0x34b3b4){super(_0x3779c4,_0x2a99b9,_0x5cf5ad,_0x582af2,_0x5c85df,_0x34b3b4);}async['process'](_0x46446b){this['logger']['debug']('trigger-process',{'subscribes':this['config']['subscribes']});let _0x4ba4c4;try{this['setLeg'](0x2),await this['getState'](),_0x4ba4c4=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x4ba4c4['startJobSpan'](),_0x4ba4c4['startActivitySpan'](this['leg']),this['mapJobData'](),this['adjacencyList']=await this['filterAdjacent']();const _0x1496fa=this['initStatus'](_0x46446b,this['adjacencyList']['length']);await this['setStateNX'](_0x1496fa),await this['setStatus'](_0x1496fa),this['bindSearchData'](_0x46446b),this['bindMarkerData'](_0x46446b);const _0x25c5ae=this['store']['getMulti']();await this['setState'](_0x25c5ae),await this['setStats'](_0x25c5ae);_0x46446b?.['pending']&&await this['setExpired'](_0x46446b?.['pending'],_0x25c5ae);await collator_1['CollatorService']['notarizeInception'](this,this['context']['metadata']['guid'],_0x25c5ae),await _0x25c5ae['exec'](),this['execAdjacentParent'](),_0x4ba4c4['mapActivityAttributes']();const _0x35d054=Number(this['context']['metadata']['js']);_0x4ba4c4['setJobAttributes']({'app.job.jss':_0x35d054});const _0x5e308f={'app.job.jss':_0x35d054};return await this['transitionAndLogAdjacent'](_0x46446b,_0x35d054,_0x5e308f),_0x4ba4c4['setActivityAttributes'](_0x5e308f),this['context']['metadata']['jid'];}catch(_0x1210af){_0x4ba4c4?.['setActivityError'](_0x1210af['message']);if(_0x1210af instanceof errors_1['DuplicateJobError']){await(0x0,utils_1['sleepFor'])(0x3e8);const _0x678316=await collator_1['CollatorService']['isInceptionOverage'](this,this['context']['metadata']['guid']);if(_0x678316){this['logger']['info']('trigger-collation-overage',{'job_id':_0x1210af['jobId'],'guid':this['context']['metadata']['guid']});return;}this['logger']['error']('duplicate-job-error',{'job_id':_0x1210af['jobId'],'guid':this['context']['metadata']['guid']});}else this['logger']['error']('trigger-process-error',{..._0x1210af});throw _0x1210af;}finally{_0x4ba4c4?.['endJobSpan'](),_0x4ba4c4?.['endActivitySpan'](),this['logger']['debug']('trigger-process-end',{'subscribes':this['config']['subscribes'],'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid']});}}async['transitionAndLogAdjacent'](_0x4b8bb0={},_0xe10ff9,_0x57da53){if(isNaN(_0x4b8bb0['pending'])){const _0x38005e=await this['transition'](this['adjacencyList'],_0xe10ff9);_0x38005e['length']&&(_0x57da53['app.activity.mids']=_0x38005e['join'](','));}}['initStatus'](_0x3ed189={},_0x582daf){if(_0x3ed189['pending'])return-0x1;return _0x582daf;}async['setExpired'](_0xd1d13,_0x547f74){await this['store']['expireJob'](this['context']['metadata']['jid'],_0xd1d13,_0x547f74);}['safeKey'](_0x5bba29){return'_'+_0x5bba29;}['bindSearchData'](_0x5c031b){_0x5c031b?.['search']&&Object['keys'](_0x5c031b['search'])['forEach'](_0x11f0d2=>{this['context']['data'][this['safeKey'](_0x11f0d2)]=_0x5c031b['search'][_0x11f0d2]['toString']();});}['bindMarkerData'](_0x3304b0){_0x3304b0?.['marker']&&Object['keys'](_0x3304b0['marker'])['forEach'](_0x2d4378=>{_0x2d4378['startsWith']('-')&&(this['context']['data'][_0x2d4378]=_0x3304b0['marker'][_0x2d4378]['toString']());});}async['setStatus'](_0x6254a4){this['context']['metadata']['js']=_0x6254a4;}async['execAdjacentParent'](){if(this['context']['metadata']['px']){const _0x315d6e=(0x0,utils_1['formatISODate'])(new Date()),_0x59ccdc={'metadata':this['context']['metadata'],'data':{'job_id':this['context']['metadata']['jid'],'jc':_0x315d6e,'ju':_0x315d6e}};await this['engine']['execAdjacentParent'](this['context'],_0x59ccdc);}}['createInputContext'](){const _0x12bef5={[this['metadata']['aid']]:{'input':{'data':this['data']}},'$self':{'input':{'data':this['data']},'output':{'data':this['data']}}};return _0x12bef5;}async['getState'](){const _0x5e80f4=this['createInputContext'](),_0x5724d0=this['resolveJobId'](_0x5e80f4),_0x4443=this['resolveJobKey'](_0x5e80f4),_0x2df460=(0x0,utils_1['formatISODate'])(new Date()),{id:_0x4c7b1c,version:_0x481207}=await this['engine']['getVID']();this['initDimensionalAddress'](collator_1['CollatorService']['getDimensionalSeed']());const _0xbf1f60={...this['metadata'],'jid':_0x5724d0,'key':_0x4443,'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':_0x4c7b1c,'vrs':_0x481207,'tpc':this['config']['subscribes'],'trc':this['context']['metadata']['trc'],'spn':this['context']['metadata']['spn'],'guid':this['context']['metadata']['guid'],'jid':_0x5724d0,'dad':collator_1['CollatorService']['getDimensionalSeed'](),'key':_0x4443,'jc':_0x2df460,'ju':_0x2df460,'ts':(0x0,utils_1['getTimeSeries'])(this['resolveGranularity']()),'js':0x0},'data':{},[this['metadata']['aid']]:{'input':{'data':this['data'],'metadata':_0xbf1f60},'output':{'data':this['data'],'metadata':_0xbf1f60},'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'](_0x55f5af=>'metadata/'+_0x55f5af);}['bindActivityMetadataPaths'](){return serializer_1['MDATA_SYMBOLS']['ACTIVITY']['KEYS']['map'](_0xf78879=>'output/metadata/'+_0xf78879);}['resolveGranularity'](){return this['config']['stats']?.['granularity']||reporter_1['ReporterService']['DEFAULT_GRANULARITY'];}['getJobStatus'](){return this['context']['metadata']['js'];}['resolveJobId'](_0x14a754){const _0x1bf685=this['config']['stats']?.['id'];return _0x1bf685?pipe_1['Pipe']['resolve'](_0x1bf685,_0x14a754):(0x0,utils_1['guid'])();}['resolveJobKey'](_0x5863ea){const _0x31fa28=this['config']['stats']?.['key'];return _0x31fa28?pipe_1['Pipe']['resolve'](_0x31fa28,_0x5863ea):'';}async['setStateNX'](_0x3b2453){const _0x145087=this['context']['metadata']['jid'];if(!await this['store']['setStateNX'](_0x145087,this['engine']['appId'],_0x3b2453))throw new errors_1['DuplicateJobError'](_0x145087);}async['setStats'](_0x19d722){const _0x2525eb=this['context']['metadata'];if(_0x2525eb['key']&&this['config']['stats']?.['measures']){const _0x227f68=await this['engine']['getVID'](),_0x2ab29a=new reporter_1['ReporterService'](_0x227f68,this['store'],this['logger']);await this['store']['setStats'](_0x2525eb['key'],_0x2525eb['jid'],_0x2525eb['ts'],_0x2ab29a['resolveTriggerStatistics'](this['config'],this['context']),_0x227f68,_0x19d722);}}}function _0x3e50(){const _0x489563=['5232258XOdrXn','24GbQkOY','305226TmUbLW','677610TLxlhm','95259SHzzSq','1rKNNfb','1289172XVUItv','184ZXMfLB','10863050uUWudC','5719xIjrWz'];_0x3e50=function(){return _0x489563;};return _0x3e50();}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(_0x1c0678,_0x194b19){const _0x2a6aa7=_0x36e3,_0xa40239=_0x1c0678();while(!![]){try{const _0x3aeb49=-parseInt(_0x2a6aa7(0x122))/0x1*(parseInt(_0x2a6aa7(0x126))/0x2)+parseInt(_0x2a6aa7(0x120))/0x3+parseInt(_0x2a6aa7(0x123))/0x4+parseInt(_0x2a6aa7(0x11e))/0x5*(parseInt(_0x2a6aa7(0x11d))/0x6)+parseInt(_0x2a6aa7(0x125))/0x7+parseInt(_0x2a6aa7(0x11f))/0x8*(-parseInt(_0x2a6aa7(0x124))/0x9)+parseInt(_0x2a6aa7(0x121))/0xa;if(_0x3aeb49===_0x194b19)break;else _0xa40239['push'](_0xa40239['shift']());}catch(_0xc20e50){_0xa40239['push'](_0xa40239['shift']());}}}(_0x3b56,0x5af1d));function _0x3b56(){const _0x1acbe0=['1426KbxiyN','593452oizVth','189108rjcEjs','868651kxiMdp','602sYYClK','12MEdHPp','407590OvFzPf','272ZIjJbm','1126692oWkkUt','7050870AOAPLs'];_0x3b56=function(){return _0x1acbe0;};return _0x3b56();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['Worker']=void 0x0;function _0x36e3(_0x2a9c99,_0x6f1877){const _0x3b5672=_0x3b56();return _0x36e3=function(_0x36e3ec,_0x362c66){_0x36e3ec=_0x36e3ec-0x11d;let _0x451348=_0x3b5672[_0x36e3ec];return _0x451348;},_0x36e3(_0x2a9c99,_0x6f1877);}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(_0xb390e8,_0x3cb264,_0x5a5c76,_0x33a938,_0x32bc7b,_0x15b1d8){super(_0xb390e8,_0x3cb264,_0x5a5c76,_0x33a938,_0x32bc7b,_0x15b1d8);}async['process'](){this['logger']['debug']('worker-process',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});let _0x338b48;try{await this['verifyEntry'](),_0x338b48=new telemetry_1['TelemetryService'](this['engine']['appId'],this['config'],this['metadata'],this['context']),_0x338b48['startActivitySpan'](this['leg']),this['mapInputData']();const _0x426b5c=this['store']['getMulti'](),_0x2d7974=await this['execActivity'](_0x426b5c);await collator_1['CollatorService']['authorizeReentry'](this,_0x426b5c),await this['setState'](_0x426b5c),await this['setStatus'](0x0,_0x426b5c);const _0xd2ad86=await _0x426b5c['exec']();_0x338b48['mapActivityAttributes']();const _0x21bfc5=this['resolveStatus'](_0xd2ad86);return _0x338b48['setActivityAttributes']({'app.activity.mid':_0x2d7974,'app.job.jss':_0x21bfc5}),this['context']['metadata']['aid'];}catch(_0xa270fe){if(_0xa270fe instanceof errors_1['InactiveJobError']){this['logger']['error']('await-inactive-job-error',{..._0xa270fe});return;}else{if(_0xa270fe instanceof errors_1['GenerationalError']){this['logger']['info']('process-event-generational-job-error',{..._0xa270fe});return;}else{if(_0xa270fe instanceof errors_1['GetStateError']){this['logger']['error']('worker-get-state-error',{..._0xa270fe});return;}else{if(_0xa270fe instanceof errors_1['CollationError']){if(_0xa270fe['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',{..._0xa270fe});}else this['logger']['error']('worker-process-error',{..._0xa270fe});}}}_0x338b48?.['setActivityError'](_0xa270fe['message']);throw _0xa270fe;}finally{_0x338b48?.['endActivitySpan'](),this['logger']['debug']('worker-process-end',{'jid':this['context']['metadata']['jid'],'gid':this['context']['metadata']['gid'],'aid':this['metadata']['aid']});}}async['execActivity'](_0x53eee7){const _0x35c54d=pipe_1['Pipe']['resolve'](this['config']['subtype'],this['context']),_0x4c625a={'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':_0x35c54d,'spn':this['context']['$self']['output']['metadata']['l1s'],'trc':this['context']['metadata']['trc']},'data':this['context']['data']};return this['config']['retry']&&(_0x4c625a['policies']={'retry':this['config']['retry']}),await this['engine']['router']?.['publishMessage'](_0x35c54d,_0x4c625a,_0x53eee7);}}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(_0x19e832,_0x16c2d2){const _0x5b7d22=_0x2951,_0x5c28bd=_0x19e832();while(!![]){try{const _0x2111f7=-parseInt(_0x5b7d22(0xbf))/0x1+parseInt(_0x5b7d22(0xc1))/0x2+-parseInt(_0x5b7d22(0xc5))/0x3+parseInt(_0x5b7d22(0xc0))/0x4+parseInt(_0x5b7d22(0xbd))/0x5+parseInt(_0x5b7d22(0xc2))/0x6*(parseInt(_0x5b7d22(0xbe))/0x7)+parseInt(_0x5b7d22(0xc4))/0x8*(-parseInt(_0x5b7d22(0xc3))/0x9);if(_0x2111f7===_0x16c2d2)break;else _0x5c28bd['push'](_0x5c28bd['shift']());}catch(_0x42b808){_0x5c28bd['push'](_0x5c28bd['shift']());}}}(_0x28a9,0xc3316));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['CollatorService']=void 0x0;function _0x2951(_0x2fed7a,_0x13b5a9){const _0x28a995=_0x28a9();return _0x2951=function(_0x29517e,_0x54b0df){_0x29517e=_0x29517e-0xbd;let _0x4baf9c=_0x28a995[_0x29517e];return _0x4baf9c;},_0x2951(_0x2fed7a,_0x13b5a9);}const errors_1=require('../../modules/errors'),collator_1=require('../../types/collator');class CollatorService{static['assertJobActive'](_0x1b4832,_0x59315d,_0x843173,_0x24abe9=0x0){if(_0x1b4832<=_0x24abe9)throw new errors_1['InactiveJobError'](_0x59315d,_0x1b4832,_0x843173);}static['getDimensionalAddress'](_0x57ab34,_0x25bb62=![]){let _0x3a38a3=_0x57ab34['context']['metadata']['dad']||_0x57ab34['metadata']['dad'];return _0x25bb62&&_0x3a38a3&&_0x57ab34['leg']===0x2&&(_0x3a38a3=_0x3a38a3['substring'](0x0,_0x3a38a3['lastIndexOf'](','))+',0'),CollatorService['getDimensionsById']([..._0x57ab34['config']['ancestors'],_0x57ab34['metadata']['aid']],_0x3a38a3);}static['resolveReentryDimension'](_0x1c36b0){const _0x26f9e4=_0x1c36b0['config']['ancestor'],_0x5626a3=_0x1c36b0['config']['ancestors'],_0x210378=_0x5626a3['indexOf'](_0x26f9e4),_0x449d14=_0x1c36b0['metadata']['dad']['split'](',');return _0x449d14['length']=_0x210378+0x1,_0x449d14['push']('0'),_0x449d14['join'](',');}static async['notarizeEntry'](_0x55dd0b,_0x508317){const _0x4172cc=await _0x55dd0b['store']['collate'](_0x55dd0b['context']['metadata']['jid'],_0x55dd0b['metadata']['aid'],-0x5af3107a4000,this['getDimensionalAddress'](_0x55dd0b),_0x508317);return this['verifyInteger'](_0x4172cc,0x1,'enter'),_0x4172cc;}static async['authorizeReentry'](_0x4f301e,_0x3648d6){const _0x1ba200=await _0x4f301e['store']['collate'](_0x4f301e['context']['metadata']['jid'],_0x4f301e['metadata']['aid'],-0x9184e72a000,this['getDimensionalAddress'](_0x4f301e),_0x3648d6);return _0x1ba200;}static async['notarizeEarlyExit'](_0x27187e,_0x4c996d){return await _0x27187e['store']['collate'](_0x27187e['context']['metadata']['jid'],_0x27187e['metadata']['aid'],-0xa012317b000,this['getDimensionalAddress'](_0x27187e),_0x4c996d);}static async['notarizeEarlyCompletion'](_0x27c1e0,_0x1cb5e4){const _0x4b98a4=_0x27c1e0['config']['cycle']?0x9184e72a000:0xa012317b000;return await _0x27c1e0['store']['collate'](_0x27c1e0['context']['metadata']['jid'],_0x27c1e0['metadata']['aid'],0xf4241-_0x4b98a4,this['getDimensionalAddress'](_0x27c1e0),_0x1cb5e4);}static async['notarizeInception'](_0x3f81ac,_0x411807,_0x357a9d){_0x411807&&await _0x3f81ac['store']['collateSynthetic'](_0x3f81ac['context']['metadata']['jid'],_0x411807,0xf4240,_0x357a9d);}static async['isInceptionOverage'](_0x446cf2,_0x251179){if(_0x251179){const _0x34202d=await _0x446cf2['store']['collateSynthetic'](_0x446cf2['context']['metadata']['jid'],_0x251179,0xf4240);return _0x34202d>0xf4240;}return![];}static async['notarizeReentry'](_0x565639,_0xff0fd9,_0x34a493){const _0x7f2d4d=_0x565639['context']['metadata']['jid'],_0x45582d=_0x34a493||_0x565639['store']['getMulti']();await _0x565639['store']['collate'](_0x7f2d4d,_0x565639['metadata']['aid'],0xf4240,this['getDimensionalAddress'](_0x565639,!![]),_0x45582d),await _0x565639['store']['collateSynthetic'](_0x7f2d4d,_0xff0fd9,0xf4240,_0x45582d);const [_0x1351fc,_0x57a207]=await _0x45582d['exec'](),_0x1882af=Array['isArray'](_0x1351fc)?_0x1351fc[0x1]:_0x1351fc,_0x4a993c=Array['isArray'](_0x57a207)?_0x57a207[0x1]:_0x57a207;return this['verifyInteger'](_0x1882af,0x2,'enter'),this['verifySyntheticInteger'](_0x4a993c),_0x1882af;}static async['notarizeContinuation'](_0x13d2f3,_0x27e49d){return await _0x13d2f3['store']['collate'](_0x13d2f3['context']['metadata']['jid'],_0x13d2f3['metadata']['aid'],0x1,this['getDimensionalAddress'](_0x13d2f3),_0x27e49d);}static async['notarizeCompletion'](_0x4ec5e3,_0x24b241){const _0x4a078f=_0x4ec5e3['config']['cycle']?0x0:0xe8d4a51000;return await _0x4ec5e3['store']['collate'](_0x4ec5e3['context']['metadata']['jid'],_0x4ec5e3['metadata']['aid'],0x1-_0x4a078f,this['getDimensionalAddress'](_0x4ec5e3),_0x24b241);}static['getDigitAtIndex'](_0x9aac95,_0x590582){const _0x39ecf6=_0x9aac95['toString']();if(_0x590582<0x0||_0x590582>=_0x39ecf6['length'])return null;const _0x59cced=parseInt(_0x39ecf6[_0x590582],0xa);return _0x59cced;}static['getDimensionalIndex'](_0x9d0bc){const _0x3572b6=_0x9d0bc['toString']();if(_0x3572b6['length']<0x9)return null;const _0x46f3af=_0x3572b6['substring'](0x3,0x9),_0x310dab=parseInt(_0x46f3af,0xa);return _0x310dab-0x1;}static['isDuplicate'](_0xdbe646,_0x5e6fdc){return this['getDigitAtIndex'](_0xdbe646,_0x5e6fdc)<0x8;}static['isInactive'](_0x5ab053){return this['getDigitAtIndex'](_0x5ab053,0x2)<0x9;}static['isPrimed'](_0x113411,_0x19291b){return _0x19291b==0x1?_0x113411!=-0x5af3107a4000:this['getDigitAtIndex'](_0x113411,0x0)<0x9&&this['getDigitAtIndex'](_0x113411,0x1)<0x9;}static['verifySyntheticInteger'](_0x414689){const _0x56235a=_0x414689['toString'](),_0x4991e5=parseInt(_0x56235a[_0x56235a['length']-0x1],0xa);if(_0x4991e5>0x0)throw new errors_1['CollationError'](_0x414689,0x2,'enter',collator_1['CollationFaultType']['INACTIVE']);else{if(_0x414689>=0x1e8480)throw new errors_1['CollationError'](_0x414689,0x2,'enter',collator_1['CollationFaultType']['DUPLICATE']);}}static['verifyInteger'](_0x5a613a,_0x8403cd,_0x57e3ee){let _0x569ac0;if(_0x8403cd===0x1&&_0x57e3ee==='enter'){if(!this['isPrimed'](_0x5a613a,0x1))_0x569ac0=collator_1['CollationFaultType']['MISSING'];else{if(this['isDuplicate'](_0x5a613a,0x0))_0x569ac0=collator_1['CollationFaultType']['DUPLICATE'];else _0x5a613a!=0x331a2bfa73000&&(_0x569ac0=collator_1['CollationFaultType']['INVALID']);}}else{if(_0x8403cd===0x1&&_0x57e3ee==='exit'){if(_0x5a613a===-0x9184e72a000)_0x569ac0=collator_1['CollationFaultType']['MISSING'];else this['isDuplicate'](_0x5a613a,0x1)&&(_0x569ac0=collator_1['CollationFaultType']['DUPLICATE']);}else{if(_0x8403cd===0x2&&_0x57e3ee==='enter'){if(!this['isPrimed'](_0x5a613a,0x2))_0x569ac0=collator_1['CollationFaultType']['FORBIDDEN'];else this['isInactive'](_0x5a613a)&&(_0x569ac0=collator_1['CollationFaultType']['INACTIVE']);}}}if(_0x569ac0)throw new errors_1['CollationError'](_0x5a613a,_0x8403cd,_0x57e3ee,_0x569ac0);}static['getDimensionsById'](_0x490889,_0x1eab5c){const _0x41beb1={'$ADJACENT':_0x1eab5c+',0'};let _0x39d6f4=_0x1eab5c;return _0x490889['reverse']()['forEach'](_0x46fd73=>{_0x41beb1[_0x46fd73]=_0x39d6f4,_0x39d6f4=_0x39d6f4['substring'](0x0,_0x39d6f4['lastIndexOf'](','));}),_0x41beb1;}static['getSeed'](){return'999000000000000';}static['getTriggerSeed'](){return'888000001000001';}static['compile'](_0x27fafd){CollatorService['bindAncestorArray'](_0x27fafd);}static['bindAncestorArray'](_0x132b32){_0x132b32['forEach'](_0x18cb21=>{const _0x3e88da={},_0x438bdc=Object['keys'](_0x18cb21['activities'])['find'](_0x6d6c33=>_0x18cb21['activities'][_0x6d6c33]['type']==='trigger');if(!_0x438bdc)throw new Error('collator-trigger-activity-not-found');const _0x3959e3=(_0x302685,_0x3917e8)=>{_0x3e88da[_0x302685]=_0x3917e8,_0x18cb21['activities'][_0x302685]['ancestors']=_0x3917e8;const _0x1a8d82=_0x18cb21['transitions']?.[_0x302685]||[];_0x1a8d82['forEach'](_0x384d0b=>{_0x3959e3(_0x384d0b['to'],[..._0x3917e8,_0x302685]);});};_0x3959e3(_0x438bdc,[]);});}static['getDimensionalSeed'](_0x40ea5f=0x0){return','+_0x40ea5f;}}function _0x28a9(){const _0x22ffb9=['692320WZBLrK','2278902eUCUcY','45dmzOlt','437848hHmnaL','4741077rhSCYS','1778135XCaSjb','14luvisN','194368dhfNvL','5545884CxQvYj'];_0x28a9=function(){return _0x22ffb9;};return _0x28a9();}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(_0x3cb55f,_0x1628e){const _0x3477a3=_0x1c02,_0x263714=_0x3cb55f();while(!![]){try{const _0x1688a6=parseInt(_0x3477a3(0x16b))/0x1+parseInt(_0x3477a3(0x164))/0x2+parseInt(_0x3477a3(0x168))/0x3*(-parseInt(_0x3477a3(0x162))/0x4)+-parseInt(_0x3477a3(0x163))/0x5*(parseInt(_0x3477a3(0x161))/0x6)+parseInt(_0x3477a3(0x167))/0x7*(-parseInt(_0x3477a3(0x16a))/0x8)+-parseInt(_0x3477a3(0x169))/0x9*(parseInt(_0x3477a3(0x165))/0xa)+-parseInt(_0x3477a3(0x166))/0xb*(-parseInt(_0x3477a3(0x160))/0xc);if(_0x1688a6===_0x1628e)break;else _0x263714['push'](_0x263714['shift']());}catch(_0x48b75e){_0x263714['push'](_0x263714['shift']());}}}(_0x45fa,0x34605));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;function _0x45fa(){const _0x53de22=['41462NSZiyB','210iIlKYF','494285ctIqlJ','14WMxENG','363MkgfzY','148518FtjWrD','162296UqMHTP','333513DhNAzq','288vxSRCy','2427786ijgWxF','14096RsQiLN','5zHawCI'];_0x45fa=function(){return _0x53de22;};return _0x45fa();}class Deployer{constructor(_0x36b6c0){this['manifest']=null,this['manifest']=_0x36b6c0;}async['deploy'](_0x4e90a7,_0x5bbafb){this['store']=_0x4e90a7,this['stream']=_0x5bbafb,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 _0x5d3b6f of this['manifest']['app']['graphs']){const [,_0x5de840]=this['findTrigger'](_0x5d3b6f),_0x3c6b72=_0x5de840['subscribes'],[_0x2cd7dc,_0x19ec46,_0x4076c1]=await this['store']['reserveSymbolRange']('$'+_0x3c6b72,DEFAULT_RANGE_SIZE,'JOB'),_0x3dac4e='',_0x1acfdb=this['bindSymbols'](_0x2cd7dc,_0x19ec46,_0x4076c1,_0x3dac4e,_0x5de840['PRODUCES']);Object['keys'](_0x1acfdb)['length']&&await this['store']['addSymbols']('$'+_0x3c6b72,_0x1acfdb);for(const [_0x58f4e8,_0x2ec42e]of Object['entries'](_0x5d3b6f['activities'])){const [_0x7c1f2c,_0x276cfb,_0x157625]=await this['store']['reserveSymbolRange'](_0x58f4e8,DEFAULT_RANGE_SIZE,'ACTIVITY'),_0x288970=_0x58f4e8+'/';this['bindSelf'](_0x2ec42e['consumes'],_0x2ec42e['produces'],_0x58f4e8);const _0x44575f=this['bindSymbols'](_0x7c1f2c,_0x276cfb,_0x157625,_0x288970,_0x2ec42e['produces']);Object['keys'](_0x44575f)['length']&&await this['store']['addSymbols'](_0x58f4e8,_0x44575f);}}}['bindSelf'](_0x523348,_0xa16667,_0x61f113){for(const _0x307a83 of[_0x61f113,'$self']){const _0x8bab42=_0x523348[_0x307a83];if(_0x8bab42)for(const _0x2f4918 of _0x8bab42){!_0xa16667['includes'](_0x2f4918)&&_0xa16667['push'](_0x2f4918);}}}['bindSymbols'](_0x2f72d9,_0x31b9b6,_0x1e1125,_0x51a792,_0x467ba3){const _0x5d23d0={},_0x24421c={..._0x1e1125};for(const _0x147e8d of _0x467ba3){const _0x292a56=''+_0x51a792+_0x147e8d;if(!_0x24421c[_0x292a56]){if(_0x2f72d9>_0x31b9b6)throw new Error('Symbol\x20index\x20out\x20of\x20bounds');const _0x8ddbf0=(0x0,utils_1['getSymKey'])(_0x2f72d9);_0x2f72d9++,_0x5d23d0[_0x292a56]=_0x8ddbf0,_0x24421c[_0x292a56]=_0x8ddbf0;}}return _0x5d23d0;}['copyJobSchemas'](){const _0x5b6c32=this['manifest']['app']['graphs'];for(const _0xb59bd7 of _0x5b6c32){const _0x4eec89=_0xb59bd7['output']?.['schema'],_0x15b479=_0xb59bd7['input']?.['schema'];if(!_0x4eec89&&!_0x15b479)continue;const _0x180cb1=_0xb59bd7['activities'];for(const _0x17630d in _0x180cb1){if(_0x180cb1[_0x17630d]['type']==='trigger'){const _0x80488d=_0x180cb1[_0x17630d];_0x4eec89&&(!_0x80488d['job']&&(_0x80488d['job']={}),_0x80488d['job']['schema']=_0x4eec89),_0x15b479&&(_0x80488d['output']={'schema':_0x15b479});}}}}['bindBackRefs'](){for(const _0x183f93 of this['manifest']['app']['graphs']){const _0x4811bd=_0x183f93['activities'],_0x986774=this['findTrigger'](_0x183f93)[0x0];for(const _0x2d6547 in _0x4811bd){_0x4811bd[_0x2d6547]['trigger']=_0x986774,_0x4811bd[_0x2d6547]['subscribes']=_0x183f93['subscribes'],_0x183f93['publishes']&&(_0x4811bd[_0x2d6547]['publishes']=_0x183f93['publishes']),_0x4811bd[_0x2d6547]['expire']=_0x183f93['expire']??undefined,_0x4811bd[_0x2d6547]['persistent']=_0x183f93['persistent']??undefined;}}}['bindCycleTarget'](){for(const _0x3ee136 of this['manifest']['app']['graphs']){const _0x31ba7e=_0x3ee136['activities'];for(const _0x3d6ed5 in _0x31ba7e){const _0x22f4e5=_0x31ba7e[_0x3d6ed5];_0x22f4e5['type']==='cycle'&&(_0x31ba7e[_0x22f4e5['ancestor']]['cycle']=!![]);}}}['convertTopicsToTypes'](){for(const _0x4b821a of this['manifest']['app']['graphs']){const _0xf8d041=_0x4b821a['activities'];for(const _0x8c5102 in _0xf8d041){const _0x52c36b=_0xf8d041[_0x8c5102];['worker','await']['includes'](_0x52c36b['type'])&&_0x52c36b['topic']&&!_0x52c36b['subtype']&&(_0x52c36b['subtype']=_0x52c36b['topic']);}}}['convertActivitiesToHooks'](){for(const _0x45e489 of this['manifest']['app']['graphs']){const _0x4742df=_0x45e489['activities'];for(const _0x28c6f2 in _0x4742df){const _0x1d9387=_0x4742df[_0x28c6f2];['activity']['includes'](_0x1d9387['type'])&&(_0x1d9387['type']='hook');}}}async['bindParents'](){const _0x4d62ee=this['manifest']['app']['graphs'];for(const _0x35f252 of _0x4d62ee){if(_0x35f252['transitions'])for(const _0x3b428d in _0x35f252['transitions']){const _0x5cf94c=_0x35f252['transitions'][_0x3b428d];for(const _0x3247bc of _0x5cf94c){const _0x4cc601=_0x3247bc['to'];_0x35f252['activities'][_0x4cc601]['parent']=_0x3b428d;}_0x35f252['activities'][_0x3b428d]['transitions']=_0x5cf94c;}}}['collectValues'](_0xb614df,_0x3bbab1){for(const [_0x597a3e,_0x59b41a]of Object['entries'](_0xb614df)){if(_0x597a3e==='enum'||_0x597a3e==='examples'||_0x597a3e==='default'){if(Array['isArray'](_0x59b41a))for(const _0x57afb8 of _0x59b41a){typeof _0x57afb8==='string'&&_0x57afb8['length']>0x5&&_0x3bbab1['add'](_0x57afb8);}else typeof _0x59b41a==='string'&&_0x59b41a['length']>0x5&&_0x3bbab1['add'](_0x59b41a);}else typeof _0x59b41a==='object'&&this['collectValues'](_0x59b41a,_0x3bbab1);}}['traverse'](_0x356724,_0x36245b){for(const _0x499708 of Object['values'](_0x356724)){typeof _0x499708==='object'&&('schema'in _0x499708?this['collectValues'](_0x499708['schema'],_0x36245b):this['traverse'](_0x499708,_0x36245b));}}async['generateSymVals'](){const _0x248518=new Set();for(const _0x45b304 of this['manifest']['app']['graphs']){this['traverse'](_0x45b304,_0x248518);}const _0x3fe54a=await this['store']['getSymbolValues'](),_0x11396c=Object['keys'](_0x3fe54a)['length'],_0x25a01c=Math['pow'](0x34,0x2)-0x1,_0x53ae08=serializer_1['SerializerService']['filterSymVals'](_0x11396c,_0x25a01c,_0x3fe54a,_0x248518);await this['store']['addSymbolValues'](_0x53ae08);}['resolveJobMapsPaths'](){function _0x2fa649(_0x533435){const _0x5cfeca=[];function _0xf5e1b(_0x958658,_0x3e84c2=[]){for(const _0x40a4b3 in _0x958658){if(typeof _0x958658[_0x40a4b3]==='object'&&_0x958658[_0x40a4b3]!==null&&!('@pipe'in _0x958658[_0x40a4b3])){const _0x100f2f=[..._0x3e84c2,_0x40a4b3];_0xf5e1b(_0x958658[_0x40a4b3],_0x100f2f);}else{const _0x9abf33=[..._0x3e84c2,_0x40a4b3]['join']('/');if(!_0x9abf33['includes']('[')){const _0x4d7001='data/'+_0x9abf33;!_0x5cfeca['includes'](_0x4d7001)&&_0x5cfeca['push'](_0x4d7001);}else{const [_0x1c9428,_0x270197]=_0x9abf33['split']('['),[_0x5adc04,_0x2b6af2]=_0x270197['split'](']');if(!isNaN(parseInt(_0x5adc04)))for(let _0x52c9b4=0x0;_0x52c9b4<parseInt(_0x5adc04);_0x52c9b4++){const _0x27aac2='data/'+_0x1c9428+'/'+_0x52c9b4;!_0x5cfeca['includes'](_0x27aac2)&&_0x5cfeca['push'](_0x27aac2);}}}}}return _0x533435&&_0xf5e1b(_0x533435),_0x5cfeca;}for(const _0xafd750 of this['manifest']['app']['graphs']){let _0x5681c5=[];const [,_0x481777]=this['findTrigger'](_0xafd750);for(const _0x1a43ef in _0xafd750['activities']){const _0x1dde8a=_0xafd750['activities'][_0x1a43ef];_0x5681c5=_0x5681c5['concat'](_0x2fa649(_0x1dde8a['job']?.['maps']));}_0x481777['PRODUCES']=_0x5681c5;}}['resolveMappingDependencies'](){const _0x1d78c8=[];function _0x30931d(_0x5441f7,_0x1cfe08){for(const _0x1b6552 in _0x5441f7){if(typeof _0x5441f7[_0x1b6552]==='string'){const _0x4cdaa9=_0x5441f7[_0x1b6552],_0x1c96ca=_0x4cdaa9['match'](/^\{[^@].*}$/);_0x1c96ca&&!validator_1['Validator']['CONTEXT_VARS']['includes'](_0x4cdaa9)&&(_0x4cdaa9['split']('.')[0x1]!=='input'&&(_0x1d78c8['push'](_0x4cdaa9),_0x1cfe08['push'](_0x4cdaa9)));}else typeof _0x5441f7[_0x1b6552]==='object'&&_0x5441f7[_0x1b6552]!==null&&_0x30931d(_0x5441f7[_0x1b6552],_0x1cfe08);}}const _0x246dee=this['manifest']['app']['graphs'];for(const _0x483977 of _0x246dee){const _0xf692e2=_0x483977['activities'];for(const _0x187831 in _0xf692e2){const _0x369866=_0xf692e2[_0x187831];_0x369866['consumes']=[],_0x30931d(_0x369866,_0x369866['consumes']),_0x369866['consumes']=this['groupMappingRules'](_0x369866['consumes']);}}const _0x2ec2c7=this['groupMappingRules'](_0x1d78c8);for(const _0x194b5e of _0x246dee){const _0x2b8160=_0x194b5e['activities'];for(const _0x4e2ebb in _0x2b8160){const _0x5d056b=_0x2b8160[_0x4e2ebb];_0x5d056b['produces']=_0x2ec2c7[''+_0x4e2ebb]||[];}}}['groupMappingRules'](_0x5d9471){_0x5d9471=Array['from'](new Set(_0x5d9471))['sort']();const _0x395ff0={};for(const _0x2be76e of _0x5d9471){const [_0x5b6d48,_0x50b088]=this['resolveMappableValue'](_0x2be76e);!_0x395ff0[_0x5b6d48]&&(_0x395ff0[_0x5b6d48]=[]),_0x395ff0[_0x5b6d48]['push'](_0x50b088);}return _0x395ff0;}['resolveMappableValue'](_0x528b48){_0x528b48=_0x528b48['substring'](0x1,_0x528b48['length']-0x1);const _0x5ac302=_0x528b48['split']('.');if(_0x5ac302[0x0]==='$job'){const [_0xb279d,..._0x3c4038]=_0x5ac302;return[_0xb279d,_0x3c4038['join']('/')];}else{const [_0x596b14,_0x5c1250,_0x4fee57,..._0x1572b3]=_0x5ac302,_0x225df5={'hook':'hook/data','input':'input/data','output':_0x4fee57==='data'?'output/data':'output/metadata'}[_0x5c1250];return[_0x596b14,_0x225df5+'/'+_0x1572b3['join']('/')];}}async['deployActivitySchemas'](){const _0x35ed8a=this['manifest']['app']['graphs'],_0x42652b={};for(const _0x13221c of _0x35ed8a){const _0x5bf15e=_0x13221c['activities'];for(const _0x43996e in _0x5bf15e){const _0x1962f3=_0x5bf15e[_0x43996e];delete _0x1962f3['transitions'],_0x42652b[_0x43996e]=_0x1962f3;}}await this['store']['setSchemas'](_0x42652b,this['getVID']());}async['deploySubscriptions'](){const _0x452b0a=this['manifest']['app']['graphs'],_0x4cfeed={};for(const _0x161dea of _0x452b0a){const _0x290abd=_0x161dea['activities'],_0xcc9b78=_0x161dea['subscribes'];for(const _0x12ca8c in _0x290abd){if(_0x290abd[_0x12ca8c]['type']==='trigger'){_0x4cfeed[_0xcc9b78]=_0x12ca8c;break;}}}await this['store']['setSubscriptions'](_0x4cfeed,this['getVID']());}['findTrigger'](_0x5479ad){for(const _0x53eb8b in _0x5479ad['activities']){const _0x57b78a=_0x5479ad['activities'][_0x53eb8b];if(_0x57b78a['type']==='trigger')return[_0x53eb8b,_0x57b78a];}return null;}async['deployTransitions'](){const _0x5e7d5c=this['manifest']['app']['graphs'],_0x4b96b4={};for(const _0x47b403 of _0x5e7d5c){if(_0x47b403['subscribes']&&_0x47b403['subscribes']['startsWith']('.')){const [_0x21365f]=this['findTrigger'](_0x47b403);_0x21365f&&(_0x4b96b4[_0x47b403['subscribes']]={[_0x21365f]:!![]});}if(_0x47b403['transitions'])for(const _0x60a097 in _0x47b403['transitions']){const _0x2e1f54=_0x47b403['transitions'][_0x60a097],_0x30af88={};for(const _0x10f096 of _0x2e1f54){const _0xab9958=_0x10f096['to'];_0x10f096['conditions']?_0x30af88[_0xab9958]=_0x10f096['conditions']:_0x30af88[_0xab9958]=!![];}Object['keys'](_0x30af88)['length']>0x0&&(_0x4b96b4['.'+_0x60a097]=_0x30af88);}}await this['store']['setTransitions'](_0x4b96b4,this['getVID']());}async['deployHookPatterns'](){const _0x33589a=this['manifest']['app']['graphs'],_0x558f5c={};for(const _0x4c692f of _0x33589a){if(_0x4c692f['hooks'])for(const _0x1554db in _0x4c692f['hooks']){_0x558f5c[_0x1554db]=_0x4c692f['hooks'][_0x1554db];const _0x2671dc=_0x4c692f['hooks'][_0x1554db][0x0]['to'],_0x559371=_0x4c692f['activities'][_0x2671dc];_0x559371&&(!_0x559371['hook']&&(_0x559371['hook']={}),_0x559371['hook']['topic']=_0x1554db);}}await this['store']['setHookRules'](_0x558f5c);}async['deployConsumerGroups'](){const _0xbda29d={'appId':this['manifest']['app']['id']},_0x1b87a8=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0xbda29d);await this['deployConsumerGroup'](_0x1b87a8,'ENGINE');for(const _0x3bd108 of this['manifest']['app']['graphs']){const _0x53f907=_0x3bd108['activities'];for(const _0x49f792 in _0x53f907){const _0x2b03b3=_0x53f907[_0x49f792];if(_0x2b03b3['type']==='worker'&&pipe_1['Pipe']['resolve'](_0x2b03b3['subtype'],{})===_0x2b03b3['subtype']){_0xbda29d['topic']=_0x2b03b3['subtype'];const _0x591597=this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0xbda29d);await this['deployConsumerGroup'](_0x591597,'WORKER');}}}}async['deployConsumerGroup'](_0x10cdca,_0x5b3af3){try{await this['stream']['createConsumerGroup'](_0x10cdca,_0x5b3af3);}catch(_0x217eac){this['store']['logger']['info']('router-stream-group-exists',{'stream':_0x10cdca,'group':_0x5b3af3});}}}function _0x1c02(_0x479911,_0x5e283c){const _0x45fa8d=_0x45fa();return _0x1c02=function(_0x1c02d2,_0x45720f){_0x1c02d2=_0x1c02d2-0x160;let _0x6d3b74=_0x45fa8d[_0x1c02d2];return _0x6d3b74;},_0x1c02(_0x479911,_0x5e283c);}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(_0xf07954,_0x7f3763){const _0x1f20d5=_0xe758,_0x45c2d8=_0xf07954();while(!![]){try{const _0x3a2201=-parseInt(_0x1f20d5(0x148))/0x1+parseInt(_0x1f20d5(0x149))/0x2+parseInt(_0x1f20d5(0x147))/0x3*(-parseInt(_0x1f20d5(0x14c))/0x4)+parseInt(_0x1f20d5(0x14e))/0x5*(parseInt(_0x1f20d5(0x14a))/0x6)+-parseInt(_0x1f20d5(0x14d))/0x7+-parseInt(_0x1f20d5(0x14b))/0x8*(parseInt(_0x1f20d5(0x14f))/0x9)+parseInt(_0x1f20d5(0x150))/0xa;if(_0x3a2201===_0x7f3763)break;else _0x45c2d8['push'](_0x45c2d8['shift']());}catch(_0x4571c1){_0x45c2d8['push'](_0x45c2d8['shift']());}}}(_0x472c,0x96fbd));function _0xe758(_0x52e21d,_0x2bb928){const _0x472c01=_0x472c();return _0xe758=function(_0xe75801,_0x2c6ecc){_0xe75801=_0xe75801-0x147;let _0x2c4a7f=_0x472c01[_0xe75801];return _0x2c4a7f;},_0xe758(_0x52e21d,_0x2bb928);}function _0x472c(){const _0x49bace=['41920920sguSoJ','846aqodSe','979133xaHDWe','346858OZpJWc','6lUgiBZ','54904zbBgNy','17324jGdWzI','3276560kfiUXr','166345XQzALM','1458yhMqNQ'];_0x472c=function(){return _0x49bace;};return _0x472c();}var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x5a6dea,_0x1fc0dd,_0x2ebb37,_0x50d77f){if(_0x50d77f===undefined)_0x50d77f=_0x2ebb37;var _0xc843df=Object['getOwnPropertyDescriptor'](_0x1fc0dd,_0x2ebb37);(!_0xc843df||('get'in _0xc843df?!_0x1fc0dd['__esModule']:_0xc843df['writable']||_0xc843df['configurable']))&&(_0xc843df={'enumerable':!![],'get':function(){return _0x1fc0dd[_0x2ebb37];}}),Object['defineProperty'](_0x5a6dea,_0x50d77f,_0xc843df);}:function(_0x5d7f9a,_0xa476f3,_0x334446,_0x55ecd2){if(_0x55ecd2===undefined)_0x55ecd2=_0x334446;_0x5d7f9a[_0x55ecd2]=_0xa476f3[_0x334446];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x4b79ba,_0x4f2862){Object['defineProperty'](_0x4b79ba,'default',{'enumerable':!![],'value':_0x4f2862});}:function(_0x51f0a6,_0x5bb7db){_0x51f0a6['default']=_0x5bb7db;}),__importStar=this&&this['__importStar']||function(_0x2a5a76){if(_0x2a5a76&&_0x2a5a76['__esModule'])return _0x2a5a76;var _0x1d9d6d={};if(_0x2a5a76!=null){for(var _0x2eb950 in _0x2a5a76)if(_0x2eb950!=='default'&&Object['prototype']['hasOwnProperty']['call'](_0x2a5a76,_0x2eb950))__createBinding(_0x1d9d6d,_0x2a5a76,_0x2eb950);}return __setModuleDefault(_0x1d9d6d,_0x2a5a76),_0x1d9d6d;},__importDefault=this&&this['__importDefault']||function(_0x4e79ef){return _0x4e79ef&&_0x4e79ef['__esModule']?_0x4e79ef:{'default':_0x4e79ef};};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(_0x5cbda4,_0x4f84b1,_0x268cc1){this['store']=_0x5cbda4,this['stream']=_0x4f84b1,this['logger']=_0x268cc1;}async['plan'](_0x5afd17){try{let _0x1f9a21;this['isPath'](_0x5afd17)?_0x1f9a21=await json_schema_ref_parser_1['default']['dereference'](_0x5afd17):_0x1f9a21=js_yaml_1['default']['load'](_0x5afd17);const _0x38f951=new validator_1['Validator'](_0x1f9a21);return _0x38f951['validate'](this['store']),_0x1f9a21;}catch(_0x569a62){this['logger']['error']('compiler-plan-error',_0x569a62);}}['isPath'](_0x4bdd43){return!_0x4bdd43['trim']()['startsWith']('app:');}async['deploy'](_0x27758b){try{let _0x226d0e;this['isPath'](_0x27758b)?(_0x226d0e=await json_schema_ref_parser_1['default']['dereference'](_0x27758b),await this['saveAsJSON'](_0x27758b,_0x226d0e)):_0x226d0e=js_yaml_1['default']['load'](_0x27758b);const _0x5ac208=new validator_1['Validator'](_0x226d0e);_0x5ac208['validate'](this['store']);const _0x13ea49=new deployer_1['Deployer'](_0x226d0e);return await _0x13ea49['deploy'](this['store'],this['stream']),await this['store']['setApp'](_0x226d0e['app']['id'],_0x226d0e['app']['version']),_0x226d0e;}catch(_0x1d4c18){this['logger']['error']('compiler-deploy-error',_0x1d4c18);}}async['activate'](_0x461908,_0x3704d5){return await this['store']['activateAppVersion'](_0x461908,_0x3704d5);}async['saveAsJSON'](_0x68c95d,_0x2ddfe7){const _0x34785b=JSON['stringify'](_0x2ddfe7,null,0x2),_0x1f3186=path['join'](path['dirname'](_0x68c95d),'.hotmesh.'+_0x2ddfe7['app']['id']+'.'+_0x2ddfe7['app']['version']+'.json');await fs['writeFile'](_0x1f3186,_0x34785b,'utf8');}}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;