@hotmeshio/hotmesh 0.3.16 → 0.3.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +9 -4
  2. package/build/modules/key.js +1 -1
  3. package/build/modules/utils.js +1 -1
  4. package/build/package.json +3 -2
  5. package/build/services/activities/activity.js +1 -1
  6. package/build/services/activities/await.js +1 -1
  7. package/build/services/activities/cycle.js +1 -1
  8. package/build/services/activities/hook.js +1 -1
  9. package/build/services/activities/index.js +1 -1
  10. package/build/services/activities/interrupt.js +1 -1
  11. package/build/services/activities/signal.js +1 -1
  12. package/build/services/activities/trigger.js +1 -1
  13. package/build/services/activities/worker.js +1 -1
  14. package/build/services/collator/index.js +1 -1
  15. package/build/services/compiler/deployer.js +1 -1
  16. package/build/services/compiler/index.js +1 -1
  17. package/build/services/compiler/validator.js +1 -1
  18. package/build/services/engine/index.js +1 -1
  19. package/build/services/exporter/index.js +1 -1
  20. package/build/services/mapper/index.js +1 -1
  21. package/build/services/meshflow/exporter.js +1 -1
  22. package/build/services/pipe/functions/array.js +1 -1
  23. package/build/services/pipe/functions/bitwise.js +1 -1
  24. package/build/services/pipe/functions/conditional.js +1 -1
  25. package/build/services/pipe/functions/cron.js +1 -1
  26. package/build/services/pipe/functions/date.js +1 -1
  27. package/build/services/pipe/functions/index.js +1 -1
  28. package/build/services/pipe/functions/json.js +1 -1
  29. package/build/services/pipe/functions/logical.js +1 -1
  30. package/build/services/pipe/functions/math.js +1 -1
  31. package/build/services/pipe/functions/number.js +1 -1
  32. package/build/services/pipe/functions/object.js +1 -1
  33. package/build/services/pipe/functions/string.js +1 -1
  34. package/build/services/pipe/functions/symbol.js +1 -1
  35. package/build/services/pipe/functions/unary.js +1 -1
  36. package/build/services/pipe/index.js +1 -1
  37. package/build/services/quorum/index.js +1 -1
  38. package/build/services/reporter/index.js +1 -1
  39. package/build/services/router/index.js +1 -1
  40. package/build/services/search/providers/postgres/postgres.js +1 -1
  41. package/build/services/search/providers/redis/ioredis.js +1 -1
  42. package/build/services/search/providers/redis/redis.js +1 -1
  43. package/build/services/serializer/index.js +1 -1
  44. package/build/services/store/providers/postgres/kvsql.js +1 -1
  45. package/build/services/store/providers/postgres/kvtables.js +1 -1
  46. package/build/services/store/providers/postgres/kvtransaction.js +1 -1
  47. package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
  48. package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
  49. package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
  50. package/build/services/store/providers/postgres/kvtypes/zset.js +1 -1
  51. package/build/services/store/providers/postgres/postgres.js +1 -1
  52. package/build/services/store/providers/redis/_base.js +1 -1
  53. package/build/services/store/providers/redis/ioredis.js +1 -1
  54. package/build/services/store/providers/redis/redis.js +1 -1
  55. package/build/services/store/providers/store-initializable.js +1 -1
  56. package/build/services/stream/providers/nats/nats.js +1 -1
  57. package/build/services/stream/providers/postgres/postgres.js +1 -1
  58. package/build/services/stream/providers/redis/ioredis.js +1 -1
  59. package/build/services/stream/providers/redis/redis.js +1 -1
  60. package/build/services/stream/providers/stream-initializable.js +1 -1
  61. package/build/services/sub/providers/redis/ioredis.js +1 -1
  62. package/build/services/sub/providers/redis/redis.js +1 -1
  63. package/build/services/task/index.js +1 -1
  64. package/build/services/telemetry/index.js +1 -1
  65. package/build/services/worker/index.js +1 -1
  66. package/package.json +3 -2
@@ -1 +1 @@
1
- 'use strict';(function(_0x28b1e6,_0x2c02d1){const _0x3dbe41=_0x2acd,_0x214d91=_0x28b1e6();while(!![]){try{const _0x42a5ea=-parseInt(_0x3dbe41(0x174))/0x1*(parseInt(_0x3dbe41(0x173))/0x2)+parseInt(_0x3dbe41(0x17a))/0x3*(-parseInt(_0x3dbe41(0x176))/0x4)+parseInt(_0x3dbe41(0x172))/0x5+-parseInt(_0x3dbe41(0x178))/0x6+parseInt(_0x3dbe41(0x175))/0x7+parseInt(_0x3dbe41(0x177))/0x8*(-parseInt(_0x3dbe41(0x179))/0x9)+parseInt(_0x3dbe41(0x17b))/0xa;if(_0x42a5ea===_0x2c02d1)break;else _0x214d91['push'](_0x214d91['shift']());}catch(_0x5133a8){_0x214d91['push'](_0x214d91['shift']());}}}(_0x2068,0x727c3));function _0x2acd(_0x3ee7b4,_0x3652f){const _0x20683d=_0x2068();return _0x2acd=function(_0x2acdcb,_0x2c9930){_0x2acdcb=_0x2acdcb-0x172;let _0x4eac86=_0x20683d[_0x2acdcb];return _0x4eac86;},_0x2acd(_0x3ee7b4,_0x3652f);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['WorkerService']=void 0x0;const key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),factory_1=require('../connector/factory'),router_1=require('../router'),stream_1=require('../../types/stream'),enums_1=require('../../modules/enums'),factory_2=require('../stream/factory'),factory_3=require('../sub/factory'),factory_4=require('../store/factory');function _0x2068(){const _0x3d635e=['2045586tOWYeY','18412400pdtKiu','83425fmDAed','220ntYnIi','5918sjCfMs','5003411OjMZqJ','4BqrbsD','3036568WYGWPi','2348124ySKjtu','9GpGsKL'];_0x2068=function(){return _0x3d635e;};return _0x2068();}class WorkerService{constructor(){this['reporting']=![];}static async['init'](_0x5278e9,_0x14b7bb,_0x3fb3ab,_0x3c4e4f,_0x5e1efb){const _0x397da8=[];if(Array['isArray'](_0x3c4e4f['workers']))for(const _0x4c88a4 of _0x3c4e4f['workers']){await factory_1['ConnectorService']['initClients'](_0x4c88a4);const _0x4966e3=new WorkerService();_0x4966e3['verifyWorkerFields'](_0x4c88a4),_0x4966e3['namespace']=_0x5278e9,_0x4966e3['appId']=_0x14b7bb,_0x4966e3['guid']=_0x3fb3ab,_0x4966e3['callback']=_0x4c88a4['callback'],_0x4966e3['topic']=_0x4c88a4['topic'],_0x4966e3['config']=_0x3c4e4f,_0x4966e3['logger']=_0x5e1efb,await _0x4966e3['initStoreChannel'](_0x4966e3,_0x4c88a4['store']),await _0x4966e3['initSubChannel'](_0x4966e3,_0x4c88a4['sub'],_0x4c88a4['pub']),await _0x4966e3['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x4966e3['subscriptionHandler'](),_0x14b7bb),await _0x4966e3['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x4966e3['subscriptionHandler'](),_0x14b7bb,_0x4966e3['topic']),await _0x4966e3['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x4966e3['subscriptionHandler'](),_0x14b7bb,_0x4966e3['guid']),await _0x4966e3['initStreamChannel'](_0x4966e3,_0x4c88a4['stream'],_0x4c88a4['store']),_0x4966e3['router']=await _0x4966e3['initRouter'](_0x4c88a4,_0x5e1efb);const _0x5bcc7e=_0x4966e3['store']['mintKey'](key_1['KeyType']['STREAMS'],{'appId':_0x4966e3['appId'],'topic':_0x4c88a4['topic']});await _0x4966e3['router']['consumeMessages'](_0x5bcc7e,'WORKER',_0x4966e3['guid'],_0x4c88a4['callback']),_0x4966e3['inited']=(0x0,utils_1['formatISODate'])(new Date()),_0x397da8['push'](_0x4966e3);}return _0x397da8;}['verifyWorkerFields'](_0x2ea73c){if(!(0x0,utils_1['identifyProvider'])(_0x2ea73c['store'])||!(0x0,utils_1['identifyProvider'])(_0x2ea73c['stream'])||!(0x0,utils_1['identifyProvider'])(_0x2ea73c['sub'])||!(_0x2ea73c['topic']&&_0x2ea73c['callback']))throw new Error('worker\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields\x20along\x20with\x20a\x20callback\x20function\x20and\x20topic.');}async['initStoreChannel'](_0x50810a,_0x23809b){_0x50810a['store']=await factory_4['StoreServiceFactory']['init'](_0x23809b,_0x50810a['namespace'],_0x50810a['appId'],_0x50810a['logger']);}async['initSubChannel'](_0xa5930,_0x3b768f,_0x591fac){_0xa5930['subscribe']=await factory_3['SubServiceFactory']['init'](_0x3b768f,_0x591fac,_0xa5930['namespace'],_0xa5930['appId'],_0xa5930['guid'],_0xa5930['logger']);}async['initStreamChannel'](_0x1d4661,_0x334441,_0x1c421b){_0x1d4661['stream']=await factory_2['StreamServiceFactory']['init'](_0x334441,_0x1c421b,_0x1d4661['namespace'],_0x1d4661['appId'],_0x1d4661['logger']);}async['initRouter'](_0x40f822,_0x5ebb61){const _0x3499dd=await this['store']['getThrottleRate'](_0x40f822['topic']);return new router_1['Router']({'namespace':this['namespace'],'appId':this['appId'],'guid':this['guid'],'role':stream_1['StreamRole']['WORKER'],'topic':_0x40f822['topic'],'reclaimDelay':_0x40f822['reclaimDelay'],'reclaimCount':_0x40f822['reclaimCount'],'throttle':_0x3499dd},this['stream'],_0x5ebb61);}['subscriptionHandler'](){const _0x3dc13c=this;return async(_0x25e4ee,_0x4d8b21)=>{_0x3dc13c['logger']['debug']('worker-event-received',{'topic':_0x25e4ee,'type':_0x4d8b21['type']});if(_0x4d8b21['type']==='throttle')_0x4d8b21['topic']!==null&&_0x3dc13c['throttle'](_0x4d8b21['throttle']);else{if(_0x4d8b21['type']==='ping')_0x3dc13c['sayPong'](_0x3dc13c['appId'],_0x3dc13c['guid'],_0x4d8b21['originator'],_0x4d8b21['details']);else _0x4d8b21['type']==='rollcall'&&(_0x4d8b21['topic']!==null&&_0x3dc13c['doRollCall'](_0x4d8b21));}};}async['doRollCall'](_0x4ddb30){let _0xbe1421=0x0;const _0x22a966=!isNaN(_0x4ddb30['max'])?_0x4ddb30['max']:enums_1['HMSH_QUORUM_ROLLCALL_CYCLES'];if(this['rollCallInterval'])clearTimeout(this['rollCallInterval']);const _0x5e7b85=_0x4ddb30['interval']/0x2,_0x538bfe=_0x5e7b85+Math['ceil'](Math['random']()*_0x5e7b85);do{await(0x0,utils_1['sleepFor'])(Math['ceil'](Math['random']()*0x3e8)),await this['sayPong'](this['appId'],this['guid'],null,!![],_0x4ddb30['signature']);if(!_0x4ddb30['interval'])return;const {promise:_0x576adb,timerId:_0x5ca756}=(0x0,utils_1['XSleepFor'])(_0x538bfe*0x3e8);this['rollCallInterval']=_0x5ca756,await _0x576adb;}while(this['rollCallInterval']&&_0xbe1421++<_0x22a966-0x1);}['cancelRollCall'](){this['rollCallInterval']&&(clearTimeout(this['rollCallInterval']),delete this['rollCallInterval']);}['stop'](){this['cancelRollCall']();}async['sayPong'](_0x5349e3,_0x56b17b,_0x328af4,_0x306753=![],_0x35aa37=![]){let _0xe541b5;if(_0x306753){const _0x292104={'appId':this['appId'],'topic':this['topic']};_0xe541b5={'engine_id':this['guid'],'namespace':this['namespace'],'app_id':this['appId'],'worker_topic':this['topic'],'stream':this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x292104),'counts':this['router']?.['counts'],'timestamp':(0x0,utils_1['formatISODate'])(new Date()),'inited':this['inited'],'throttle':this['router']?.['throttle'],'reclaimDelay':this['router']?.['reclaimDelay'],'reclaimCount':this['router']?.['reclaimCount'],'system':await(0x0,utils_1['getSystemHealth'])(),'signature':_0x35aa37?this['callback']['toString']():undefined};}this['subscribe']['publish'](key_1['KeyType']['QUORUM'],{'type':'pong','guid':_0x56b17b,'originator':_0x328af4,'profile':_0xe541b5},_0x5349e3);}async['throttle'](_0x405219){this['router']?.['setThrottle'](_0x405219);}}exports['WorkerService']=WorkerService;
1
+ 'use strict';function _0x3e5a(){const _0x3f2bb4=['3105840fQLgXH','54564QFgPnN','1273293TBpDbU','53721gOPfLX','15906520hbhSbk','9UHcKuA','98NPknet','66115beAoVS','270wKACqz','2825348IMPuhw'];_0x3e5a=function(){return _0x3f2bb4;};return _0x3e5a();}(function(_0x1d3b5a,_0x301abf){const _0x16398b=_0x6513,_0x5d66d7=_0x1d3b5a();while(!![]){try{const _0x23ddfa=-parseInt(_0x16398b(0x14a))/0x1+parseInt(_0x16398b(0x145))/0x2*(parseInt(_0x16398b(0x142))/0x3)+-parseInt(_0x16398b(0x148))/0x4+-parseInt(_0x16398b(0x146))/0x5*(parseInt(_0x16398b(0x147))/0x6)+-parseInt(_0x16398b(0x141))/0x7+-parseInt(_0x16398b(0x149))/0x8+parseInt(_0x16398b(0x144))/0x9*(parseInt(_0x16398b(0x143))/0xa);if(_0x23ddfa===_0x301abf)break;else _0x5d66d7['push'](_0x5d66d7['shift']());}catch(_0x57b442){_0x5d66d7['push'](_0x5d66d7['shift']());}}}(_0x3e5a,0x8454e));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['WorkerService']=void 0x0;const key_1=require('../../modules/key'),utils_1=require('../../modules/utils'),factory_1=require('../connector/factory'),router_1=require('../router'),stream_1=require('../../types/stream'),enums_1=require('../../modules/enums'),factory_2=require('../stream/factory'),factory_3=require('../sub/factory'),factory_4=require('../store/factory');function _0x6513(_0x39bec2,_0x2535a8){const _0x3e5a5e=_0x3e5a();return _0x6513=function(_0x65133a,_0x4ae5ad){_0x65133a=_0x65133a-0x141;let _0x2d81ae=_0x3e5a5e[_0x65133a];return _0x2d81ae;},_0x6513(_0x39bec2,_0x2535a8);}class WorkerService{constructor(){this['reporting']=![];}static async['init'](_0x4b15c1,_0x4e268b,_0x4f2aa6,_0x449879,_0x6f8858){const _0x5b5a66=[];if(Array['isArray'](_0x449879['workers']))for(const _0x325582 of _0x449879['workers']){await factory_1['ConnectorService']['initClients'](_0x325582);const _0x12c208=new WorkerService();_0x12c208['verifyWorkerFields'](_0x325582),_0x12c208['namespace']=_0x4b15c1,_0x12c208['appId']=_0x4e268b,_0x12c208['guid']=_0x4f2aa6,_0x12c208['callback']=_0x325582['callback'],_0x12c208['topic']=_0x325582['topic'],_0x12c208['config']=_0x449879,_0x12c208['logger']=_0x6f8858,await _0x12c208['initStoreChannel'](_0x12c208,_0x325582['store']),await _0x12c208['initSubChannel'](_0x12c208,_0x325582['sub'],_0x325582['pub']),await _0x12c208['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x12c208['subscriptionHandler'](),_0x4e268b),await _0x12c208['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x12c208['subscriptionHandler'](),_0x4e268b,_0x12c208['topic']),await _0x12c208['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x12c208['subscriptionHandler'](),_0x4e268b,_0x12c208['guid']),await _0x12c208['initStreamChannel'](_0x12c208,_0x325582['stream'],_0x325582['store']),_0x12c208['router']=await _0x12c208['initRouter'](_0x325582,_0x6f8858);const _0x117645=_0x12c208['store']['mintKey'](key_1['KeyType']['STREAMS'],{'appId':_0x12c208['appId'],'topic':_0x325582['topic']});await _0x12c208['router']['consumeMessages'](_0x117645,'WORKER',_0x12c208['guid'],_0x325582['callback']),_0x12c208['inited']=(0x0,utils_1['formatISODate'])(new Date()),_0x5b5a66['push'](_0x12c208);}return _0x5b5a66;}['verifyWorkerFields'](_0x1c5d45){if(!(0x0,utils_1['identifyProvider'])(_0x1c5d45['store'])||!(0x0,utils_1['identifyProvider'])(_0x1c5d45['stream'])||!(0x0,utils_1['identifyProvider'])(_0x1c5d45['sub'])||!(_0x1c5d45['topic']&&_0x1c5d45['callback']))throw new Error('worker\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields\x20along\x20with\x20a\x20callback\x20function\x20and\x20topic.');}async['initStoreChannel'](_0x1de461,_0x47205f){_0x1de461['store']=await factory_4['StoreServiceFactory']['init'](_0x47205f,_0x1de461['namespace'],_0x1de461['appId'],_0x1de461['logger']);}async['initSubChannel'](_0x1cf2fe,_0x44b1a1,_0x111474){_0x1cf2fe['subscribe']=await factory_3['SubServiceFactory']['init'](_0x44b1a1,_0x111474,_0x1cf2fe['namespace'],_0x1cf2fe['appId'],_0x1cf2fe['guid'],_0x1cf2fe['logger']);}async['initStreamChannel'](_0x500c8e,_0x32c5a3,_0x1bd7cc){_0x500c8e['stream']=await factory_2['StreamServiceFactory']['init'](_0x32c5a3,_0x1bd7cc,_0x500c8e['namespace'],_0x500c8e['appId'],_0x500c8e['logger']);}async['initRouter'](_0x38192a,_0x56b274){const _0x15bdb6=await this['store']['getThrottleRate'](_0x38192a['topic']);return new router_1['Router']({'namespace':this['namespace'],'appId':this['appId'],'guid':this['guid'],'role':stream_1['StreamRole']['WORKER'],'topic':_0x38192a['topic'],'reclaimDelay':_0x38192a['reclaimDelay'],'reclaimCount':_0x38192a['reclaimCount'],'throttle':_0x15bdb6},this['stream'],_0x56b274);}['subscriptionHandler'](){const _0x5e19af=this;return async(_0x449f3a,_0x1f29fc)=>{_0x5e19af['logger']['debug']('worker-event-received',{'topic':_0x449f3a,'type':_0x1f29fc['type']});if(_0x1f29fc['type']==='throttle')_0x1f29fc['topic']!==null&&_0x5e19af['throttle'](_0x1f29fc['throttle']);else{if(_0x1f29fc['type']==='ping')_0x5e19af['sayPong'](_0x5e19af['appId'],_0x5e19af['guid'],_0x1f29fc['originator'],_0x1f29fc['details']);else _0x1f29fc['type']==='rollcall'&&(_0x1f29fc['topic']!==null&&_0x5e19af['doRollCall'](_0x1f29fc));}};}async['doRollCall'](_0x1dc188){let _0x181b7c=0x0;const _0x2e7e24=!isNaN(_0x1dc188['max'])?_0x1dc188['max']:enums_1['HMSH_QUORUM_ROLLCALL_CYCLES'];if(this['rollCallInterval'])clearTimeout(this['rollCallInterval']);const _0x1fa31c=_0x1dc188['interval']/0x2,_0x42f090=_0x1fa31c+Math['ceil'](Math['random']()*_0x1fa31c);do{await(0x0,utils_1['sleepFor'])(Math['ceil'](Math['random']()*0x3e8)),await this['sayPong'](this['appId'],this['guid'],null,!![],_0x1dc188['signature']);if(!_0x1dc188['interval'])return;const {promise:_0x28e811,timerId:_0x333ffc}=(0x0,utils_1['XSleepFor'])(_0x42f090*0x3e8);this['rollCallInterval']=_0x333ffc,await _0x28e811;}while(this['rollCallInterval']&&_0x181b7c++<_0x2e7e24-0x1);}['cancelRollCall'](){this['rollCallInterval']&&(clearTimeout(this['rollCallInterval']),delete this['rollCallInterval']);}['stop'](){this['cancelRollCall']();}async['sayPong'](_0x335e93,_0x2c0d41,_0x2ac8ce,_0x3558c1=![],_0x1a3bd1=![]){let _0x4502c3;if(_0x3558c1){const _0x18598a={'appId':this['appId'],'topic':this['topic']};_0x4502c3={'engine_id':this['guid'],'namespace':this['namespace'],'app_id':this['appId'],'worker_topic':this['topic'],'stream':this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x18598a),'counts':this['router']?.['counts'],'timestamp':(0x0,utils_1['formatISODate'])(new Date()),'inited':this['inited'],'throttle':this['router']?.['throttle'],'reclaimDelay':this['router']?.['reclaimDelay'],'reclaimCount':this['router']?.['reclaimCount'],'system':await(0x0,utils_1['getSystemHealth'])(),'signature':_0x1a3bd1?this['callback']['toString']():undefined};}this['subscribe']['publish'](key_1['KeyType']['QUORUM'],{'type':'pong','guid':_0x2c0d41,'originator':_0x2ac8ce,'profile':_0x4502c3},_0x335e93);}async['throttle'](_0x5ecc4b){this['router']?.['setThrottle'](_0x5ecc4b);}}exports['WorkerService']=WorkerService;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.3.16",
4
- "description": "Unbreakable Workflows",
3
+ "version": "0.3.17",
4
+ "description": "Serverless Workflow",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
7
7
  "repository": {
@@ -78,6 +78,7 @@
78
78
  },
79
79
  "keywords": [
80
80
  "Serverless Orchestration",
81
+ "Serverless Workflow",
81
82
  "Durable Workflow",
82
83
  "Operational Data",
83
84
  "Service Mesh",