@hotmeshio/hotmesh 0.3.18 → 0.3.19

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 (81) hide show
  1. package/README.md +160 -63
  2. package/build/modules/key.js +1 -1
  3. package/build/modules/utils.js +1 -1
  4. package/build/package.json +6 -4
  5. package/build/services/activities/activity.js +1 -1
  6. package/build/services/activities/await.js +1 -1
  7. package/build/services/activities/cycle.js +1 -1
  8. package/build/services/activities/hook.js +1 -1
  9. package/build/services/activities/index.js +1 -1
  10. package/build/services/activities/interrupt.js +1 -1
  11. package/build/services/activities/signal.js +1 -1
  12. package/build/services/activities/trigger.js +1 -1
  13. package/build/services/activities/worker.js +1 -1
  14. package/build/services/collator/index.js +1 -1
  15. package/build/services/compiler/deployer.js +1 -1
  16. package/build/services/compiler/index.js +1 -1
  17. package/build/services/compiler/validator.js +1 -1
  18. package/build/services/engine/index.d.ts +1 -1
  19. package/build/services/engine/index.js +1 -1
  20. package/build/services/exporter/index.js +1 -1
  21. package/build/services/mapper/index.js +1 -1
  22. package/build/services/meshflow/exporter.js +1 -1
  23. package/build/services/pipe/functions/array.js +1 -1
  24. package/build/services/pipe/functions/bitwise.js +1 -1
  25. package/build/services/pipe/functions/conditional.js +1 -1
  26. package/build/services/pipe/functions/cron.js +1 -1
  27. package/build/services/pipe/functions/date.js +1 -1
  28. package/build/services/pipe/functions/index.js +1 -1
  29. package/build/services/pipe/functions/json.js +1 -1
  30. package/build/services/pipe/functions/logical.js +1 -1
  31. package/build/services/pipe/functions/math.js +1 -1
  32. package/build/services/pipe/functions/number.js +1 -1
  33. package/build/services/pipe/functions/object.js +1 -1
  34. package/build/services/pipe/functions/string.js +1 -1
  35. package/build/services/pipe/functions/symbol.js +1 -1
  36. package/build/services/pipe/functions/unary.js +1 -1
  37. package/build/services/pipe/index.js +1 -1
  38. package/build/services/quorum/index.d.ts +1 -1
  39. package/build/services/quorum/index.js +1 -1
  40. package/build/services/reporter/index.js +1 -1
  41. package/build/services/router/index.js +1 -1
  42. package/build/services/search/providers/postgres/postgres.js +1 -1
  43. package/build/services/search/providers/redis/ioredis.js +1 -1
  44. package/build/services/search/providers/redis/redis.js +1 -1
  45. package/build/services/serializer/index.js +1 -1
  46. package/build/services/store/providers/postgres/kvsql.js +1 -1
  47. package/build/services/store/providers/postgres/kvtables.d.ts +1 -0
  48. package/build/services/store/providers/postgres/kvtables.js +1 -1
  49. package/build/services/store/providers/postgres/kvtransaction.js +1 -1
  50. package/build/services/store/providers/postgres/kvtypes/hash.d.ts +1 -0
  51. package/build/services/store/providers/postgres/kvtypes/hash.js +1 -1
  52. package/build/services/store/providers/postgres/kvtypes/list.js +1 -1
  53. package/build/services/store/providers/postgres/kvtypes/string.js +1 -1
  54. package/build/services/store/providers/postgres/kvtypes/zset.js +1 -1
  55. package/build/services/store/providers/postgres/postgres.js +1 -1
  56. package/build/services/store/providers/redis/_base.js +1 -1
  57. package/build/services/store/providers/redis/ioredis.js +1 -1
  58. package/build/services/store/providers/redis/redis.js +1 -1
  59. package/build/services/store/providers/store-initializable.js +1 -1
  60. package/build/services/stream/providers/nats/nats.js +1 -1
  61. package/build/services/stream/providers/postgres/postgres.d.ts +1 -0
  62. package/build/services/stream/providers/postgres/postgres.js +1 -1
  63. package/build/services/stream/providers/redis/ioredis.js +1 -1
  64. package/build/services/stream/providers/redis/redis.js +1 -1
  65. package/build/services/stream/providers/stream-initializable.js +1 -1
  66. package/build/services/sub/factory.d.ts +2 -2
  67. package/build/services/sub/factory.js +8 -4
  68. package/build/services/sub/index.d.ts +3 -2
  69. package/build/services/sub/providers/postgres/postgres.d.ts +18 -0
  70. package/build/services/sub/providers/postgres/postgres.js +1 -0
  71. package/build/services/sub/providers/redis/ioredis.d.ts +1 -1
  72. package/build/services/sub/providers/redis/ioredis.js +1 -1
  73. package/build/services/sub/providers/redis/redis.d.ts +1 -1
  74. package/build/services/sub/providers/redis/redis.js +1 -1
  75. package/build/services/task/index.js +1 -1
  76. package/build/services/telemetry/index.js +1 -1
  77. package/build/services/worker/index.d.ts +1 -1
  78. package/build/services/worker/index.js +1 -1
  79. package/build/types/redis.d.ts +8 -8
  80. package/package.json +6 -4
  81. package/types/redis.ts +8 -8
@@ -17,7 +17,7 @@ declare class WorkerService {
17
17
  callback: (streamData: StreamData) => Promise<StreamDataResponse | void>;
18
18
  store: StoreService<ProviderClient, ProviderTransaction> | null;
19
19
  stream: StreamService<ProviderClient, ProviderTransaction> | null;
20
- subscribe: SubService<ProviderClient, ProviderTransaction> | null;
20
+ subscribe: SubService<ProviderClient> | null;
21
21
  router: Router<typeof this.stream> | null;
22
22
  logger: ILogger;
23
23
  reporting: boolean;
@@ -1 +1 @@
1
- 'use strict';function _0x5a14(){const _0x336a98=['1103430TpgsEJ','12752946GALWrN','4CHZdSx','600320auUQje','4228128kjqTqg','4360370houwGz','2724996LGsONi','4OalZmc','5816562vgoUHg'];_0x5a14=function(){return _0x336a98;};return _0x5a14();}function _0x8c25(_0x30c82e,_0xfb0ace){const _0x5a147b=_0x5a14();return _0x8c25=function(_0x8c2578,_0x2d79bb){_0x8c2578=_0x8c2578-0x1ba;let _0x4dc3bf=_0x5a147b[_0x8c2578];return _0x4dc3bf;},_0x8c25(_0x30c82e,_0xfb0ace);}(function(_0x39af62,_0x1167e8){const _0xee6693=_0x8c25,_0x34d955=_0x39af62();while(!![]){try{const _0x4052a0=parseInt(_0xee6693(0x1be))/0x1*(parseInt(_0xee6693(0x1ba))/0x2)+-parseInt(_0xee6693(0x1bd))/0x3+-parseInt(_0xee6693(0x1c2))/0x4*(parseInt(_0xee6693(0x1c0))/0x5)+-parseInt(_0xee6693(0x1bf))/0x6+parseInt(_0xee6693(0x1bc))/0x7+-parseInt(_0xee6693(0x1bb))/0x8+parseInt(_0xee6693(0x1c1))/0x9;if(_0x4052a0===_0x1167e8)break;else _0x34d955['push'](_0x34d955['shift']());}catch(_0x2e51b2){_0x34d955['push'](_0x34d955['shift']());}}}(_0x5a14,0x95ccf));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');class WorkerService{constructor(){this['reporting']=![];}static async['init'](_0xa5be15,_0xfda74f,_0x4663b5,_0x146d38,_0x2c7971){const _0x138a32=[];if(Array['isArray'](_0x146d38['workers']))for(const _0x44660c of _0x146d38['workers']){await factory_1['ConnectorService']['initClients'](_0x44660c);const _0x20a6c5=new WorkerService();_0x20a6c5['verifyWorkerFields'](_0x44660c),_0x20a6c5['namespace']=_0xa5be15,_0x20a6c5['appId']=_0xfda74f,_0x20a6c5['guid']=_0x4663b5,_0x20a6c5['callback']=_0x44660c['callback'],_0x20a6c5['topic']=_0x44660c['topic'],_0x20a6c5['config']=_0x146d38,_0x20a6c5['logger']=_0x2c7971,await _0x20a6c5['initStoreChannel'](_0x20a6c5,_0x44660c['store']),await _0x20a6c5['initSubChannel'](_0x20a6c5,_0x44660c['sub'],_0x44660c['pub']),await _0x20a6c5['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x20a6c5['subscriptionHandler'](),_0xfda74f),await _0x20a6c5['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x20a6c5['subscriptionHandler'](),_0xfda74f,_0x20a6c5['topic']),await _0x20a6c5['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x20a6c5['subscriptionHandler'](),_0xfda74f,_0x20a6c5['guid']),await _0x20a6c5['initStreamChannel'](_0x20a6c5,_0x44660c['stream'],_0x44660c['store']),_0x20a6c5['router']=await _0x20a6c5['initRouter'](_0x44660c,_0x2c7971);const _0x44c1bc=_0x20a6c5['store']['mintKey'](key_1['KeyType']['STREAMS'],{'appId':_0x20a6c5['appId'],'topic':_0x44660c['topic']});await _0x20a6c5['router']['consumeMessages'](_0x44c1bc,'WORKER',_0x20a6c5['guid'],_0x44660c['callback']),_0x20a6c5['inited']=(0x0,utils_1['formatISODate'])(new Date()),_0x138a32['push'](_0x20a6c5);}return _0x138a32;}['verifyWorkerFields'](_0xad6639){if(!(0x0,utils_1['identifyProvider'])(_0xad6639['store'])||!(0x0,utils_1['identifyProvider'])(_0xad6639['stream'])||!(0x0,utils_1['identifyProvider'])(_0xad6639['sub'])||!(_0xad6639['topic']&&_0xad6639['callback']))throw new Error('worker\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields\x20along\x20with\x20a\x20callback\x20function\x20and\x20topic.');}async['initStoreChannel'](_0x511361,_0x48be44){_0x511361['store']=await factory_4['StoreServiceFactory']['init'](_0x48be44,_0x511361['namespace'],_0x511361['appId'],_0x511361['logger']);}async['initSubChannel'](_0x21b83d,_0x5585a3,_0x26c294){_0x21b83d['subscribe']=await factory_3['SubServiceFactory']['init'](_0x5585a3,_0x26c294,_0x21b83d['namespace'],_0x21b83d['appId'],_0x21b83d['guid'],_0x21b83d['logger']);}async['initStreamChannel'](_0x32f1b8,_0x2b14d3,_0x4b66ca){_0x32f1b8['stream']=await factory_2['StreamServiceFactory']['init'](_0x2b14d3,_0x4b66ca,_0x32f1b8['namespace'],_0x32f1b8['appId'],_0x32f1b8['logger']);}async['initRouter'](_0x1ce5d1,_0x1f5954){const _0x1ca37e=await this['store']['getThrottleRate'](_0x1ce5d1['topic']);return new router_1['Router']({'namespace':this['namespace'],'appId':this['appId'],'guid':this['guid'],'role':stream_1['StreamRole']['WORKER'],'topic':_0x1ce5d1['topic'],'reclaimDelay':_0x1ce5d1['reclaimDelay'],'reclaimCount':_0x1ce5d1['reclaimCount'],'throttle':_0x1ca37e},this['stream'],_0x1f5954);}['subscriptionHandler'](){const _0x26a05a=this;return async(_0x56c89b,_0x47117c)=>{_0x26a05a['logger']['debug']('worker-event-received',{'topic':_0x56c89b,'type':_0x47117c['type']});if(_0x47117c['type']==='throttle')_0x47117c['topic']!==null&&_0x26a05a['throttle'](_0x47117c['throttle']);else{if(_0x47117c['type']==='ping')_0x26a05a['sayPong'](_0x26a05a['appId'],_0x26a05a['guid'],_0x47117c['originator'],_0x47117c['details']);else _0x47117c['type']==='rollcall'&&(_0x47117c['topic']!==null&&_0x26a05a['doRollCall'](_0x47117c));}};}async['doRollCall'](_0x58806e){let _0x5d4e24=0x0;const _0x47f947=!isNaN(_0x58806e['max'])?_0x58806e['max']:enums_1['HMSH_QUORUM_ROLLCALL_CYCLES'];if(this['rollCallInterval'])clearTimeout(this['rollCallInterval']);const _0x3f57de=_0x58806e['interval']/0x2,_0x38a536=_0x3f57de+Math['ceil'](Math['random']()*_0x3f57de);do{await(0x0,utils_1['sleepFor'])(Math['ceil'](Math['random']()*0x3e8)),await this['sayPong'](this['appId'],this['guid'],null,!![],_0x58806e['signature']);if(!_0x58806e['interval'])return;const {promise:_0x2dcaa9,timerId:_0x56212e}=(0x0,utils_1['XSleepFor'])(_0x38a536*0x3e8);this['rollCallInterval']=_0x56212e,await _0x2dcaa9;}while(this['rollCallInterval']&&_0x5d4e24++<_0x47f947-0x1);}['cancelRollCall'](){this['rollCallInterval']&&(clearTimeout(this['rollCallInterval']),delete this['rollCallInterval']);}['stop'](){this['cancelRollCall']();}async['sayPong'](_0x3ce58d,_0x4f1ee1,_0x52cbaf,_0xacebe1=![],_0x264186=![]){let _0x49afec;if(_0xacebe1){const _0x2646e3={'appId':this['appId'],'topic':this['topic']};_0x49afec={'engine_id':this['guid'],'namespace':this['namespace'],'app_id':this['appId'],'worker_topic':this['topic'],'stream':this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x2646e3),'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':_0x264186?this['callback']['toString']():undefined};}this['subscribe']['publish'](key_1['KeyType']['QUORUM'],{'type':'pong','guid':_0x4f1ee1,'originator':_0x52cbaf,'profile':_0x49afec},_0x3ce58d);}async['throttle'](_0x4199ad){this['router']?.['setThrottle'](_0x4199ad);}}exports['WorkerService']=WorkerService;
1
+ 'use strict';(function(_0x3df943,_0x2dd111){const _0x21bcb0=_0x2207,_0x1d5043=_0x3df943();while(!![]){try{const _0x2b4bb7=parseInt(_0x21bcb0(0x186))/0x1*(-parseInt(_0x21bcb0(0x183))/0x2)+parseInt(_0x21bcb0(0x189))/0x3*(parseInt(_0x21bcb0(0x180))/0x4)+parseInt(_0x21bcb0(0x185))/0x5*(parseInt(_0x21bcb0(0x18a))/0x6)+parseInt(_0x21bcb0(0x188))/0x7*(-parseInt(_0x21bcb0(0x18b))/0x8)+parseInt(_0x21bcb0(0x187))/0x9+-parseInt(_0x21bcb0(0x182))/0xa+parseInt(_0x21bcb0(0x184))/0xb*(parseInt(_0x21bcb0(0x181))/0xc);if(_0x2b4bb7===_0x2dd111)break;else _0x1d5043['push'](_0x1d5043['shift']());}catch(_0x35590a){_0x1d5043['push'](_0x1d5043['shift']());}}}(_0x2057,0x4633e));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');class WorkerService{constructor(){this['reporting']=![];}static async['init'](_0x345fdf,_0x32bd74,_0x3fe81c,_0x533a53,_0x3ef399){const _0x8f6977=[];if(Array['isArray'](_0x533a53['workers']))for(const _0x54239d of _0x533a53['workers']){await factory_1['ConnectorService']['initClients'](_0x54239d);const _0x259cb6=new WorkerService();_0x259cb6['verifyWorkerFields'](_0x54239d),_0x259cb6['namespace']=_0x345fdf,_0x259cb6['appId']=_0x32bd74,_0x259cb6['guid']=_0x3fe81c,_0x259cb6['callback']=_0x54239d['callback'],_0x259cb6['topic']=_0x54239d['topic'],_0x259cb6['config']=_0x533a53,_0x259cb6['logger']=_0x3ef399,await _0x259cb6['initStoreChannel'](_0x259cb6,_0x54239d['store']),await _0x259cb6['initSubChannel'](_0x259cb6,_0x54239d['sub'],_0x54239d['pub']),await _0x259cb6['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x259cb6['subscriptionHandler'](),_0x32bd74),await _0x259cb6['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x259cb6['subscriptionHandler'](),_0x32bd74,_0x259cb6['topic']),await _0x259cb6['subscribe']['subscribe'](key_1['KeyType']['QUORUM'],_0x259cb6['subscriptionHandler'](),_0x32bd74,_0x259cb6['guid']),await _0x259cb6['initStreamChannel'](_0x259cb6,_0x54239d['stream'],_0x54239d['store']),_0x259cb6['router']=await _0x259cb6['initRouter'](_0x54239d,_0x3ef399);const _0x3501d7=_0x259cb6['store']['mintKey'](key_1['KeyType']['STREAMS'],{'appId':_0x259cb6['appId'],'topic':_0x54239d['topic']});await _0x259cb6['router']['consumeMessages'](_0x3501d7,'WORKER',_0x259cb6['guid'],_0x54239d['callback']),_0x259cb6['inited']=(0x0,utils_1['formatISODate'])(new Date()),_0x8f6977['push'](_0x259cb6);}return _0x8f6977;}['verifyWorkerFields'](_0x4c78b4){if(!(0x0,utils_1['identifyProvider'])(_0x4c78b4['store'])||!(0x0,utils_1['identifyProvider'])(_0x4c78b4['stream'])||!(0x0,utils_1['identifyProvider'])(_0x4c78b4['sub'])||!(_0x4c78b4['topic']&&_0x4c78b4['callback']))throw new Error('worker\x20must\x20include\x20`store`,\x20`stream`,\x20and\x20`sub`\x20fields\x20along\x20with\x20a\x20callback\x20function\x20and\x20topic.');}async['initStoreChannel'](_0x56051f,_0x46b189){_0x56051f['store']=await factory_4['StoreServiceFactory']['init'](_0x46b189,_0x56051f['namespace'],_0x56051f['appId'],_0x56051f['logger']);}async['initSubChannel'](_0x229302,_0x35505e,_0x18f105){_0x229302['subscribe']=await factory_3['SubServiceFactory']['init'](_0x35505e,_0x18f105,_0x229302['namespace'],_0x229302['appId'],_0x229302['guid'],_0x229302['logger']);}async['initStreamChannel'](_0x56b31d,_0x4608fe,_0x13096b){_0x56b31d['stream']=await factory_2['StreamServiceFactory']['init'](_0x4608fe,_0x13096b,_0x56b31d['namespace'],_0x56b31d['appId'],_0x56b31d['logger']);}async['initRouter'](_0x4892f9,_0x55b423){const _0x1d6b9b=await this['store']['getThrottleRate'](_0x4892f9['topic']);return new router_1['Router']({'namespace':this['namespace'],'appId':this['appId'],'guid':this['guid'],'role':stream_1['StreamRole']['WORKER'],'topic':_0x4892f9['topic'],'reclaimDelay':_0x4892f9['reclaimDelay'],'reclaimCount':_0x4892f9['reclaimCount'],'throttle':_0x1d6b9b},this['stream'],_0x55b423);}['subscriptionHandler'](){const _0x3176fb=this;return async(_0x45a6c4,_0x4a02a7)=>{_0x3176fb['logger']['debug']('worker-event-received',{'topic':_0x45a6c4,'type':_0x4a02a7['type']});if(_0x4a02a7['type']==='throttle')_0x4a02a7['topic']!==null&&_0x3176fb['throttle'](_0x4a02a7['throttle']);else{if(_0x4a02a7['type']==='ping')_0x3176fb['sayPong'](_0x3176fb['appId'],_0x3176fb['guid'],_0x4a02a7['originator'],_0x4a02a7['details']);else _0x4a02a7['type']==='rollcall'&&(_0x4a02a7['topic']!==null&&_0x3176fb['doRollCall'](_0x4a02a7));}};}async['doRollCall'](_0x2b331b){let _0x1baf49=0x0;const _0xa69b76=!isNaN(_0x2b331b['max'])?_0x2b331b['max']:enums_1['HMSH_QUORUM_ROLLCALL_CYCLES'];if(this['rollCallInterval'])clearTimeout(this['rollCallInterval']);const _0x541a38=_0x2b331b['interval']/0x2,_0x404f2f=_0x541a38+Math['ceil'](Math['random']()*_0x541a38);do{await(0x0,utils_1['sleepFor'])(Math['ceil'](Math['random']()*0x3e8)),await this['sayPong'](this['appId'],this['guid'],null,!![],_0x2b331b['signature']);if(!_0x2b331b['interval'])return;const {promise:_0x59a546,timerId:_0x2f6241}=(0x0,utils_1['XSleepFor'])(_0x404f2f*0x3e8);this['rollCallInterval']=_0x2f6241,await _0x59a546;}while(this['rollCallInterval']&&_0x1baf49++<_0xa69b76-0x1);}['cancelRollCall'](){this['rollCallInterval']&&(clearTimeout(this['rollCallInterval']),delete this['rollCallInterval']);}['stop'](){this['cancelRollCall']();}async['sayPong'](_0x583c69,_0x3b01d3,_0x5a6433,_0xd4f6a0=![],_0x19e39a=![]){let _0xb2df0;if(_0xd4f6a0){const _0x5b6dd6={'appId':this['appId'],'topic':this['topic']};_0xb2df0={'engine_id':this['guid'],'namespace':this['namespace'],'app_id':this['appId'],'worker_topic':this['topic'],'stream':this['store']['mintKey'](key_1['KeyType']['STREAMS'],_0x5b6dd6),'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':_0x19e39a?this['callback']['toString']():undefined};}this['subscribe']['publish'](key_1['KeyType']['QUORUM'],{'type':'pong','guid':_0x3b01d3,'originator':_0x5a6433,'profile':_0xb2df0},_0x583c69);}async['throttle'](_0x562e44){this['router']?.['setThrottle'](_0x562e44);}}function _0x2207(_0x4da059,_0x56c7a4){const _0x205753=_0x2057();return _0x2207=function(_0x2207a2,_0x49dd29){_0x2207a2=_0x2207a2-0x180;let _0x485e0b=_0x205753[_0x2207a2];return _0x485e0b;},_0x2207(_0x4da059,_0x56c7a4);}function _0x2057(){const _0x5bacc5=['4638456hEYXgu','120253MpPXII','1187148uhoMKo','2159898DGOOZb','40ojCcRH','4ODlYAu','132CbaRWo','5655480slbqFm','22dQORXO','197263oCtZWH','5nMjtIe','48123xbbBqz'];_0x2057=function(){return _0x5bacc5;};return _0x2057();}exports['WorkerService']=WorkerService;
@@ -104,10 +104,10 @@ interface RedisRedisClientType extends ProviderClient {
104
104
  duplicate(): RedisRedisClientType;
105
105
  on(event: string, callback: (...args: any[]) => void): void;
106
106
  publish(channel: string, message: string): Promise<number>;
107
- pSubscribe(pattern: string, callback: (channel: string, message: string) => void): void;
108
- pUnsubscribe(pattern: string): void;
109
- subscribe(channel: string, callback: (channel: string, message: string) => void): void;
110
- unsubscribe(channel: string): void;
107
+ pSubscribe(pattern: string, callback: (channel: string, message: string) => void): Promise<void>;
108
+ pUnsubscribe(pattern: string): Promise<void>;
109
+ subscribe(channel: string, callback: (channel: string, message: string) => void): Promise<void>;
110
+ unsubscribe(channel: string): Promise<void>;
111
111
  punsubscribe(channel: string): void;
112
112
  get(key: string): Promise<string | null>;
113
113
  set(key: string, value: string): Promise<string>;
@@ -179,10 +179,10 @@ interface IORedisClient extends ProviderClient {
179
179
  flushdb(): Promise<string>;
180
180
  publish(channel: string, message: string): Promise<number>;
181
181
  psubscribe(pattern: string, callback: (channel: string, message: string) => void): Promise<void>;
182
- punsubscribe(pattern: string): void;
183
- subscribe(channel: string, callback: (channel: string, message: string) => void): void;
184
- unsubscribe(channel: string): void;
185
- punsubscribe(channel: string): void;
182
+ punsubscribe(pattern: string): Promise<number>;
183
+ subscribe(channel: string, callback: (channel: string, message: string) => void): Promise<void>;
184
+ unsubscribe(channel: string): Promise<number>;
185
+ punsubscribe(channel: string): Promise<number>;
186
186
  xadd(key: string, id: string, fields: any, message?: string): Promise<string>;
187
187
  xack(key: string, group: string, id: string): Promise<number>;
188
188
  xack(key: string, group: string, ...ids: string[]): Promise<number>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.3.18",
3
+ "version": "0.3.19",
4
4
  "description": "Serverless Workflow",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -40,7 +40,7 @@
40
40
  "test:meshflow:sleep": "NODE_ENV=test jest ./tests/meshflow/sleep/*.test.ts --detectOpenHandles --forceExit --verbose",
41
41
  "test:meshflow:signal": "NODE_ENV=test jest ./tests/meshflow/signal/*.test.ts --detectOpenHandles --forceExit --verbose",
42
42
  "test:meshflow:unknown": "NODE_ENV=test jest ./tests/meshflow/unknown/*.test.ts --detectOpenHandles --forceExit --verbose",
43
- "test:emit": "NODE_ENV=test jest ./tests/functional/emit/index.test.ts --detectOpenHandles --forceExit --verbose",
43
+ "test:emit": "NODE_ENV=test jest ./tests/functional/emit/*.test.ts --detectOpenHandles --forceExit --verbose",
44
44
  "test:pending": "NODE_ENV=test jest ./tests/functional/pending/index.test.ts --detectOpenHandles --forceExit --verbose",
45
45
  "test:functional": "NODE_ENV=test jest ./tests/functional/* --detectOpenHandles --forceExit --verbose",
46
46
  "test:hmsh": "NODE_ENV=test jest ./tests/functional/*.test.ts --detectOpenHandles --verbose --forceExit",
@@ -52,11 +52,12 @@
52
52
  "test:reclaim": "NODE_ENV=test jest ./tests/functional/reclaim/index.test.ts --detectOpenHandles --forceExit --verbose",
53
53
  "test:redeploy": "NODE_ENV=test jest ./tests/functional/redeploy/*.test.ts --detectOpenHandles --forceExit --verbose",
54
54
  "test:reporter": "NODE_ENV=test jest ./tests/unit/services/reporter/index.test.ts --detectOpenHandles --forceExit --verbose",
55
- "test:reentrant": "NODE_ENV=test jest ./tests/functional/reentrant/index.test.ts --detectOpenHandles --forceExit --verbose",
55
+ "test:reentrant": "NODE_ENV=test jest ./tests/functional/reentrant/*.test.ts --detectOpenHandles --forceExit --verbose",
56
56
  "test:retry": "NODE_ENV=test jest ./tests/functional/retry/*.test.ts --detectOpenHandles --forceExit --verbose",
57
57
  "test:sequence": "NODE_ENV=test HMSH_LOGLEVEL=debug jest ./tests/functional/sequence/*.test.ts --detectOpenHandles --forceExit --verbose",
58
- "test:signal": "NODE_ENV=test jest ./tests/functional/signal/index.test.ts --detectOpenHandles --forceExit --verbose",
58
+ "test:signal": "NODE_ENV=test jest ./tests/functional/signal/*.test.ts --detectOpenHandles --forceExit --verbose",
59
59
  "test:status": "NODE_ENV=test jest ./tests/functional/status/index.test.ts --detectOpenHandles --forceExit --verbose",
60
+ "test:providers": "NODE_ENV=test jest ./tests/functional/*/providers/*/*.test.ts --detectOpenHandles --forceExit --verbose",
60
61
  "test:store:ioredis": "NODE_ENV=test jest ./tests/functional/store/providers/redis/ioredis.test.ts --detectOpenHandles --forceExit --verbose",
61
62
  "test:store:redis": "NODE_ENV=test jest ./tests/functional/store/providers/redis/redis.test.ts --detectOpenHandles --forceExit --verbose",
62
63
  "test:store:postgres": "NODE_ENV=test jest ./tests/functional/store/providers/postgres/postgres.test.ts --detectOpenHandles --forceExit --verbose",
@@ -66,6 +67,7 @@
66
67
  "test:stream:nats": "NODE_ENV=test jest ./tests/functional/stream/providers/nats/nats.test.ts --detectOpenHandles --forceExit --verbose",
67
68
  "test:sub:ioredis": "NODE_ENV=test jest ./tests/functional/sub/providers/redis/ioredis.test.ts --detectOpenHandles --forceExit --verbose",
68
69
  "test:sub:redis": "NODE_ENV=test jest ./tests/functional/sub/providers/redis/redis.test.ts --detectOpenHandles --forceExit --verbose",
70
+ "test:sub:postgres": "NODE_ENV=test jest ./tests/functional/sub/providers/postgres/postgres.test.ts --detectOpenHandles --forceExit --verbose",
69
71
  "test:trigger": "NODE_ENV=test jest ./tests/unit/services/activities/trigger.test.ts --detectOpenHandles --forceExit --verbose",
70
72
  "test:meshdata": "NODE_ENV=test jest ./tests/meshdata/postgres.test.ts --forceExit --verbose --detectOpenHandles",
71
73
  "test:meshos": "NODE_ENV=test HMSH_IS_CLUSTER=true jest ./tests/meshos/*.test.ts --forceExit --verbose --detectOpenHandles",
package/types/redis.ts CHANGED
@@ -139,13 +139,13 @@ interface RedisRedisClientType extends ProviderClient {
139
139
  pSubscribe(
140
140
  pattern: string,
141
141
  callback: (channel: string, message: string) => void,
142
- ): void;
143
- pUnsubscribe(pattern: string): void;
142
+ ): Promise<void>;
143
+ pUnsubscribe(pattern: string): Promise<void>;
144
144
  subscribe(
145
145
  channel: string,
146
146
  callback: (channel: string, message: string) => void,
147
- ): void;
148
- unsubscribe(channel: string): void;
147
+ ): Promise<void>;
148
+ unsubscribe(channel: string): Promise<void>;
149
149
  punsubscribe(channel: string): void;
150
150
  get(key: string): Promise<string | null>;
151
151
  set(key: string, value: string): Promise<string>;
@@ -239,13 +239,13 @@ interface IORedisClient extends ProviderClient {
239
239
  pattern: string,
240
240
  callback: (channel: string, message: string) => void,
241
241
  ): Promise<void>;
242
- punsubscribe(pattern: string): void;
242
+ punsubscribe(pattern: string): Promise<number>;
243
243
  subscribe(
244
244
  channel: string,
245
245
  callback: (channel: string, message: string) => void,
246
- ): void;
247
- unsubscribe(channel: string): void;
248
- punsubscribe(channel: string): void;
246
+ ): Promise<void>;
247
+ unsubscribe(channel: string): Promise<number>;
248
+ punsubscribe(channel: string): Promise<number>;
249
249
 
250
250
  xadd(key: string, id: string, fields: any, message?: string): Promise<string>;
251
251
  xack(key: string, group: string, id: string): Promise<number>;