@hotmeshio/hotmesh 0.3.8 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/README.md +2 -17
  2. package/build/index.d.ts +4 -2
  3. package/build/index.js +6 -3
  4. package/build/modules/key.js +1 -1
  5. package/build/modules/utils.d.ts +12 -4
  6. package/build/modules/utils.js +1 -1
  7. package/build/package.json +14 -7
  8. package/build/services/activities/activity.d.ts +9 -9
  9. package/build/services/activities/activity.js +1 -1
  10. package/build/services/activities/await.d.ts +2 -2
  11. package/build/services/activities/await.js +1 -1
  12. package/build/services/activities/cycle.d.ts +2 -2
  13. package/build/services/activities/cycle.js +1 -1
  14. package/build/services/activities/hook.d.ts +2 -2
  15. package/build/services/activities/hook.js +1 -1
  16. package/build/services/activities/index.js +1 -1
  17. package/build/services/activities/interrupt.js +1 -1
  18. package/build/services/activities/signal.js +1 -1
  19. package/build/services/activities/trigger.d.ts +3 -3
  20. package/build/services/activities/trigger.js +1 -1
  21. package/build/services/activities/worker.d.ts +2 -2
  22. package/build/services/activities/worker.js +1 -1
  23. package/build/services/collator/index.d.ts +9 -9
  24. package/build/services/collator/index.js +1 -1
  25. package/build/services/compiler/deployer.d.ts +4 -4
  26. package/build/services/compiler/deployer.js +1 -1
  27. package/build/services/compiler/index.d.ts +4 -4
  28. package/build/services/compiler/index.js +1 -1
  29. package/build/services/compiler/validator.d.ts +3 -3
  30. package/build/services/compiler/validator.js +1 -1
  31. package/build/services/connector/factory.d.ts +6 -0
  32. package/build/services/connector/factory.js +56 -0
  33. package/build/services/connector/index.d.ts +13 -4
  34. package/build/services/connector/index.js +30 -23
  35. package/build/services/connector/providers/ioredis.d.ts +9 -0
  36. package/build/services/connector/providers/ioredis.js +26 -0
  37. package/build/services/connector/providers/nats.d.ts +9 -0
  38. package/build/services/connector/providers/nats.js +26 -0
  39. package/build/services/connector/providers/postgres.d.ts +9 -0
  40. package/build/services/connector/providers/postgres.js +39 -0
  41. package/build/services/connector/providers/redis.d.ts +9 -0
  42. package/build/services/connector/providers/redis.js +38 -0
  43. package/build/services/engine/index.d.ts +12 -12
  44. package/build/services/engine/index.js +1 -1
  45. package/build/services/exporter/index.d.ts +3 -3
  46. package/build/services/exporter/index.js +1 -1
  47. package/build/services/hotmesh/index.js +4 -4
  48. package/build/services/mapper/index.js +1 -1
  49. package/build/services/meshcall/index.d.ts +5 -4
  50. package/build/services/meshcall/index.js +31 -14
  51. package/build/services/meshdata/index.d.ts +6 -6
  52. package/build/services/meshdata/index.js +7 -15
  53. package/build/services/meshflow/connection.d.ts +3 -2
  54. package/build/services/meshflow/exporter.d.ts +3 -3
  55. package/build/services/meshflow/exporter.js +1 -1
  56. package/build/services/meshflow/search.js +12 -4
  57. package/build/services/meshflow/worker.js +7 -7
  58. package/build/services/meshos/index.d.ts +1 -4
  59. package/build/services/meshos/index.js +11 -44
  60. package/build/services/pipe/functions/array.js +1 -1
  61. package/build/services/pipe/functions/bitwise.js +1 -1
  62. package/build/services/pipe/functions/conditional.js +1 -1
  63. package/build/services/pipe/functions/cron.d.ts +2 -0
  64. package/build/services/pipe/functions/cron.js +1 -1
  65. package/build/services/pipe/functions/date.js +1 -1
  66. package/build/services/pipe/functions/index.js +1 -1
  67. package/build/services/pipe/functions/json.js +1 -1
  68. package/build/services/pipe/functions/logical.js +1 -1
  69. package/build/services/pipe/functions/math.js +1 -1
  70. package/build/services/pipe/functions/number.js +1 -1
  71. package/build/services/pipe/functions/object.js +1 -1
  72. package/build/services/pipe/functions/string.js +1 -1
  73. package/build/services/pipe/functions/symbol.js +1 -1
  74. package/build/services/pipe/functions/unary.js +1 -1
  75. package/build/services/pipe/index.js +1 -1
  76. package/build/services/quorum/index.d.ts +5 -5
  77. package/build/services/quorum/index.js +1 -1
  78. package/build/services/reporter/index.d.ts +2 -2
  79. package/build/services/reporter/index.js +1 -1
  80. package/build/services/router/index.d.ts +8 -13
  81. package/build/services/router/index.js +1 -1
  82. package/build/services/search/factory.d.ts +2 -2
  83. package/build/services/search/factory.js +1 -1
  84. package/build/services/search/index.d.ts +5 -4
  85. package/build/services/search/providers/redis/ioredis.js +1 -1
  86. package/build/services/search/providers/redis/redis.js +1 -1
  87. package/build/services/serializer/index.js +1 -1
  88. package/build/services/store/factory.d.ts +3 -3
  89. package/build/services/store/factory.js +1 -1
  90. package/build/services/store/index.d.ts +18 -17
  91. package/build/services/store/providers/redis/_base.d.ts +13 -15
  92. package/build/services/store/providers/redis/_base.js +1 -1
  93. package/build/services/store/providers/redis/ioredis.d.ts +2 -2
  94. package/build/services/store/providers/redis/ioredis.js +1 -1
  95. package/build/services/store/providers/redis/redis.d.ts +2 -2
  96. package/build/services/store/providers/redis/redis.js +1 -1
  97. package/build/services/store/providers/store-initializable.js +1 -1
  98. package/build/services/stream/factory.d.ts +3 -3
  99. package/build/services/stream/factory.js +16 -4
  100. package/build/services/stream/index.d.ts +57 -18
  101. package/build/services/stream/index.js +2 -1
  102. package/build/services/stream/providers/nats/nats.d.ts +59 -0
  103. package/build/services/stream/providers/nats/nats.js +1 -0
  104. package/build/services/stream/providers/postgres/_deploy.d.ts +2 -1
  105. package/build/services/stream/providers/postgres/_deploy.js +1 -1
  106. package/build/services/stream/providers/postgres/postgres.d.ts +0 -0
  107. package/build/services/stream/providers/postgres/postgres.js +0 -0
  108. package/build/services/stream/providers/redis/ioredis.d.ts +53 -14
  109. package/build/services/stream/providers/redis/ioredis.js +1 -1
  110. package/build/services/stream/providers/redis/redis.d.ts +54 -15
  111. package/build/services/stream/providers/redis/redis.js +1 -1
  112. package/build/services/stream/providers/stream-initializable.d.ts +1 -2
  113. package/build/services/stream/providers/stream-initializable.js +1 -1
  114. package/build/services/sub/factory.d.ts +2 -2
  115. package/build/services/sub/factory.js +1 -1
  116. package/build/services/sub/index.d.ts +6 -5
  117. package/build/services/sub/providers/redis/ioredis.d.ts +1 -1
  118. package/build/services/sub/providers/redis/ioredis.js +1 -1
  119. package/build/services/sub/providers/redis/redis.d.ts +4 -4
  120. package/build/services/sub/providers/redis/redis.js +1 -1
  121. package/build/services/task/index.d.ts +5 -5
  122. package/build/services/task/index.js +1 -1
  123. package/build/services/telemetry/index.js +1 -1
  124. package/build/services/worker/index.d.ts +9 -9
  125. package/build/services/worker/index.js +1 -1
  126. package/build/types/hotmesh.d.ts +26 -14
  127. package/build/types/index.d.ts +6 -5
  128. package/build/types/manifest.d.ts +1 -9
  129. package/build/types/meshcall.d.ts +12 -7
  130. package/build/types/meshflow.d.ts +3 -7
  131. package/build/types/nats.d.ts +150 -0
  132. package/build/types/nats.js +2 -0
  133. package/build/types/postgres.d.ts +48 -0
  134. package/build/types/postgres.js +2 -0
  135. package/build/types/provider.d.ts +26 -0
  136. package/build/types/provider.js +2 -0
  137. package/build/types/redis.d.ts +33 -15
  138. package/build/types/stream.d.ts +65 -1
  139. package/index.ts +8 -5
  140. package/package.json +14 -7
  141. package/types/hotmesh.ts +139 -22
  142. package/types/index.ts +26 -17
  143. package/types/manifest.ts +1 -10
  144. package/types/meshcall.ts +38 -13
  145. package/types/meshflow.ts +2 -7
  146. package/types/nats.ts +231 -0
  147. package/types/postgres.ts +54 -0
  148. package/types/provider.ts +71 -0
  149. package/types/redis.ts +63 -18
  150. package/types/stream.ts +85 -1
  151. package/build/services/connector/clients/ioredis.d.ts +0 -13
  152. package/build/services/connector/clients/ioredis.js +0 -48
  153. package/build/services/connector/clients/redis.d.ts +0 -13
  154. package/build/services/connector/clients/redis.js +0 -60
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HotMesh = void 0;
4
4
  const key_1 = require("../../modules/key");
5
5
  const utils_1 = require("../../modules/utils");
6
- const redis_1 = require("../connector/clients/redis");
7
- const ioredis_1 = require("../connector/clients/ioredis");
8
- const connector_1 = require("../connector");
6
+ const redis_1 = require("../connector/providers/redis");
7
+ const ioredis_1 = require("../connector/providers/ioredis");
8
+ const factory_1 = require("../connector/factory");
9
9
  const engine_1 = require("../engine");
10
10
  const logger_1 = require("../logger");
11
11
  const quorum_1 = require("../quorum");
@@ -51,7 +51,7 @@ class HotMesh {
51
51
  }
52
52
  async initEngine(config, logger) {
53
53
  if (config.engine) {
54
- await connector_1.ConnectorService.initRedisClients(config.engine.redis?.class, config.engine.redis?.options, config.engine);
54
+ await factory_1.ConnectorService.initClients(config.engine);
55
55
  this.engine = await engine_1.EngineService.init(this.namespace, this.appId, this.guid, config, logger);
56
56
  }
57
57
  }
@@ -1 +1 @@
1
- 'use strict';(function(_0x22bdbc,_0x3b2f01){const _0x2366ee=_0x5cd1,_0x551bc3=_0x22bdbc();while(!![]){try{const _0x420112=parseInt(_0x2366ee(0x105))/0x1*(parseInt(_0x2366ee(0x107))/0x2)+parseInt(_0x2366ee(0x106))/0x3+-parseInt(_0x2366ee(0x102))/0x4+parseInt(_0x2366ee(0x101))/0x5+parseInt(_0x2366ee(0x108))/0x6+parseInt(_0x2366ee(0x104))/0x7+-parseInt(_0x2366ee(0x100))/0x8*(parseInt(_0x2366ee(0x103))/0x9);if(_0x420112===_0x3b2f01)break;else _0x551bc3['push'](_0x551bc3['shift']());}catch(_0x4c474d){_0x551bc3['push'](_0x551bc3['shift']());}}}(_0x366f,0x9844f));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['MapperService']=void 0x0;function _0x366f(){const _0x2eaa81=['5821530zoOLJQ','24FlZpiD','5838615sUfARP','1797980kCuyAG','10340622PIMAKy','6558804gegSLc','6063DeRcrR','2789277qItYsh','170PkMiIl'];_0x366f=function(){return _0x2eaa81;};return _0x366f();}function _0x5cd1(_0x1cb20b,_0x2a16ca){const _0x366f3c=_0x366f();return _0x5cd1=function(_0x5cd1d3,_0x143e8f){_0x5cd1d3=_0x5cd1d3-0x100;let _0x35d309=_0x366f3c[_0x5cd1d3];return _0x35d309;},_0x5cd1(_0x1cb20b,_0x2a16ca);}const pipe_1=require('../pipe');class MapperService{constructor(_0x4a95a0,_0x4e1483){this['rules']=_0x4a95a0,this['data']=_0x4e1483;}['mapRules'](){return this['traverseRules'](this['rules']);}['traverseRules'](_0xc1ebf8){if(typeof _0xc1ebf8==='object'&&'@pipe'in _0xc1ebf8)return this['pipe'](_0xc1ebf8['@pipe']);if(typeof _0xc1ebf8==='object'&&_0xc1ebf8!==null){const _0x5d4086={};for(const _0x3809fe in _0xc1ebf8){Object['prototype']['hasOwnProperty']['call'](_0xc1ebf8,_0x3809fe)&&(_0x5d4086[_0x3809fe]=this['traverseRules'](_0xc1ebf8[_0x3809fe]));}return _0x5d4086;}else return this['resolve'](_0xc1ebf8);}['pipe'](_0x5152da){const _0x3ab0ec=new pipe_1['Pipe'](_0x5152da,this['data']);return _0x3ab0ec['process']();}['resolve'](_0x341e17){const _0x480d3f=new pipe_1['Pipe']([[_0x341e17]],this['data']);return _0x480d3f['process']();}static['evaluate'](_0x132d3c,_0x1e5ea1,_0x18fcc4){if(typeof _0x132d3c==='boolean')return _0x132d3c;if(Array['isArray'](_0x132d3c['code'])&&_0x132d3c['code']['includes'](_0x18fcc4||0xc8)||_0x18fcc4['toString']()===(_0x132d3c['code']||0xc8)['toString']()){if(!_0x132d3c['match'])return!![];const _0x2825eb=_0x132d3c['gate']==='or';let _0x301f8d=!![],_0xb1c9dd=![];return _0x132d3c['match']['forEach'](({expected:_0x2a1257,actual:_0x2ade00})=>{if(_0x2825eb&&!_0xb1c9dd||!_0x2825eb&&_0x301f8d){const _0x81179a=pipe_1['Pipe']['resolve'](_0x2ade00,_0x1e5ea1)===_0x2a1257;if(_0x2825eb&&_0x81179a)_0xb1c9dd=!![];else!_0x2825eb&&!_0x81179a&&(_0x301f8d=![]);}}),_0x2825eb?_0xb1c9dd:_0x301f8d;}return![];}}exports['MapperService']=MapperService;
1
+ 'use strict';function _0x5283(_0x3530a8,_0x14697a){const _0x5f3849=_0x5f38();return _0x5283=function(_0x52838a,_0x2cb230){_0x52838a=_0x52838a-0x1b2;let _0x2504d0=_0x5f3849[_0x52838a];return _0x2504d0;},_0x5283(_0x3530a8,_0x14697a);}(function(_0x56158d,_0x342f6d){const _0x4275d9=_0x5283,_0x1ea07f=_0x56158d();while(!![]){try{const _0x41787e=-parseInt(_0x4275d9(0x1be))/0x1*(parseInt(_0x4275d9(0x1b3))/0x2)+-parseInt(_0x4275d9(0x1bd))/0x3*(-parseInt(_0x4275d9(0x1b5))/0x4)+-parseInt(_0x4275d9(0x1b8))/0x5+parseInt(_0x4275d9(0x1ba))/0x6*(-parseInt(_0x4275d9(0x1b9))/0x7)+parseInt(_0x4275d9(0x1b4))/0x8*(parseInt(_0x4275d9(0x1bc))/0x9)+parseInt(_0x4275d9(0x1b2))/0xa*(-parseInt(_0x4275d9(0x1bb))/0xb)+-parseInt(_0x4275d9(0x1b6))/0xc*(-parseInt(_0x4275d9(0x1b7))/0xd);if(_0x41787e===_0x342f6d)break;else _0x1ea07f['push'](_0x1ea07f['shift']());}catch(_0x43d258){_0x1ea07f['push'](_0x1ea07f['shift']());}}}(_0x5f38,0x63144));function _0x5f38(){const _0x3fe2e9=['315PbnApe','1584pVhNia','284kIZPeo','10rzBdFh','4156llzarK','30856uVYMpD','4600AwBmAv','29268ZeBjDj','6721LWZbzb','1854975cMesEZ','14KcgUTg','474018wZLStf','5259947UcWexB'];_0x5f38=function(){return _0x3fe2e9;};return _0x5f38();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['MapperService']=void 0x0;const pipe_1=require('../pipe');class MapperService{constructor(_0x3a12c5,_0x388f10){this['rules']=_0x3a12c5,this['data']=_0x388f10;}['mapRules'](){return this['traverseRules'](this['rules']);}['traverseRules'](_0x1bba9c){if(typeof _0x1bba9c==='object'&&'@pipe'in _0x1bba9c)return this['pipe'](_0x1bba9c['@pipe']);if(typeof _0x1bba9c==='object'&&_0x1bba9c!==null){const _0x46aa67={};for(const _0x9eed2 in _0x1bba9c){Object['prototype']['hasOwnProperty']['call'](_0x1bba9c,_0x9eed2)&&(_0x46aa67[_0x9eed2]=this['traverseRules'](_0x1bba9c[_0x9eed2]));}return _0x46aa67;}else return this['resolve'](_0x1bba9c);}['pipe'](_0x54fe87){const _0x5513b9=new pipe_1['Pipe'](_0x54fe87,this['data']);return _0x5513b9['process']();}['resolve'](_0x43acc8){const _0x53b672=new pipe_1['Pipe']([[_0x43acc8]],this['data']);return _0x53b672['process']();}static['evaluate'](_0x92d040,_0x302eae,_0x53d88c){if(typeof _0x92d040==='boolean')return _0x92d040;if(Array['isArray'](_0x92d040['code'])&&_0x92d040['code']['includes'](_0x53d88c||0xc8)||_0x53d88c['toString']()===(_0x92d040['code']||0xc8)['toString']()){if(!_0x92d040['match'])return!![];const _0x639f51=_0x92d040['gate']==='or';let _0x61d71c=!![],_0x2385cf=![];return _0x92d040['match']['forEach'](({expected:_0x556f3d,actual:_0x3e5d1f})=>{if(_0x639f51&&!_0x2385cf||!_0x639f51&&_0x61d71c){const _0x3ea0c1=pipe_1['Pipe']['resolve'](_0x3e5d1f,_0x302eae)===_0x556f3d;if(_0x639f51&&_0x3ea0c1)_0x2385cf=!![];else!_0x639f51&&!_0x3ea0c1&&(_0x61d71c=![]);}}),_0x639f51?_0x2385cf:_0x61d71c;}return![];}}exports['MapperService']=MapperService;
@@ -1,19 +1,20 @@
1
1
  import { HotMesh } from '../hotmesh';
2
2
  import { MeshCallConnectParams, MeshCallCronParams, MeshCallExecParams, MeshCallFlushParams, MeshCallInstanceOptions, MeshCallInterruptParams } from '../../types/meshcall';
3
- import { RedisConfig } from '../../types';
3
+ import { ProviderConfig } from '../../types/provider';
4
4
  declare class MeshCall {
5
5
  static workers: Map<string, HotMesh | Promise<HotMesh>>;
6
6
  static engines: Map<string, HotMesh | Promise<HotMesh>>;
7
7
  static connections: Map<string, any>;
8
8
  constructor();
9
- static findFirstMatching(targets: Map<string, HotMesh | Promise<HotMesh>>, namespace: string, config: RedisConfig, options?: MeshCallInstanceOptions): Promise<HotMesh | void>;
10
- static getHotMeshClient: (namespace: string, connection: RedisConfig, options?: MeshCallInstanceOptions) => Promise<HotMesh>;
9
+ static findFirstMatching(targets: Map<string, HotMesh | Promise<HotMesh>>, namespace: string, config: ProviderConfig, options?: MeshCallInstanceOptions): Promise<HotMesh | void>;
10
+ static getHotMeshClient: (namespace: string, connection: ProviderConfig, options?: MeshCallInstanceOptions) => Promise<HotMesh>;
11
11
  static verifyWorkflowActive(hotMesh: HotMesh, appId?: string, count?: number): Promise<boolean>;
12
12
  static activateWorkflow(hotMesh: HotMesh, appId?: string, version?: string): Promise<void>;
13
- static getInstance(namespace: string, redis: RedisConfig, options?: MeshCallInstanceOptions): Promise<HotMesh>;
13
+ static getInstance(namespace: string, providerConfig: ProviderConfig, options?: MeshCallInstanceOptions): Promise<HotMesh>;
14
14
  static connect(params: MeshCallConnectParams): Promise<HotMesh>;
15
15
  static exec<U>(params: MeshCallExecParams): Promise<U>;
16
16
  static flush(params: MeshCallFlushParams): Promise<void>;
17
+ static createStream: (hotMeshClient: HotMesh, workflowTopic: string, namespace?: string) => Promise<void>;
17
18
  static cron(params: MeshCallCronParams): Promise<boolean>;
18
19
  static interrupt(params: MeshCallInterruptParams): Promise<boolean>;
19
20
  static shutdown(): Promise<void>;
@@ -60,32 +60,32 @@ class MeshCall {
60
60
  }
61
61
  }
62
62
  }
63
- static async getInstance(namespace, redis, options = {}) {
63
+ static async getInstance(namespace, providerConfig, options = {}) {
64
64
  let hotMeshInstance;
65
65
  if (!options.readonly) {
66
- hotMeshInstance = await MeshCall.findFirstMatching(MeshCall.workers, namespace, redis, options);
66
+ hotMeshInstance = await MeshCall.findFirstMatching(MeshCall.workers, namespace, providerConfig, options);
67
67
  }
68
68
  if (!hotMeshInstance) {
69
- hotMeshInstance = await MeshCall.findFirstMatching(MeshCall.engines, namespace, redis, options);
69
+ hotMeshInstance = await MeshCall.findFirstMatching(MeshCall.engines, namespace, providerConfig, options);
70
70
  if (!hotMeshInstance) {
71
- hotMeshInstance = (await MeshCall.getHotMeshClient(namespace, redis, options));
71
+ hotMeshInstance = (await MeshCall.getHotMeshClient(namespace, providerConfig, options));
72
72
  }
73
73
  }
74
74
  return hotMeshInstance;
75
75
  }
76
76
  static async connect(params) {
77
77
  const targetNamespace = params.namespace ?? key_1.HMNS;
78
- const optionsHash = (0, utils_1.hashOptions)(params.redis?.options);
78
+ const optionsHash = (0, utils_1.hashOptions)(utils_1.polyfill.providerConfig(params)?.options);
79
79
  const targetTopic = `${optionsHash}.${targetNamespace}.${params.topic}`;
80
80
  const hotMeshWorker = await hotmesh_1.HotMesh.init({
81
81
  guid: params.guid,
82
82
  logLevel: params.logLevel ?? enums_1.HMSH_LOGLEVEL,
83
83
  appId: params.namespace ?? key_1.HMNS,
84
- engine: { redis: params.redis },
84
+ engine: { connection: utils_1.polyfill.providerConfig(params) },
85
85
  workers: [
86
86
  {
87
87
  topic: params.topic,
88
- redis: params.redis,
88
+ connection: utils_1.polyfill.providerConfig(params),
89
89
  callback: async function (input) {
90
90
  const response = await params.callback.apply(this, input.data.args);
91
91
  return {
@@ -102,7 +102,7 @@ class MeshCall {
102
102
  }
103
103
  static async exec(params) {
104
104
  const TOPIC = `${params.namespace ?? key_1.HMNS}.call`;
105
- const hotMeshInstance = await MeshCall.getInstance(params.namespace, params.redis);
105
+ const hotMeshInstance = await MeshCall.getInstance(params.namespace, utils_1.polyfill.providerConfig(params));
106
106
  let id = params.options?.id;
107
107
  if (id) {
108
108
  if (params.options?.flush) {
@@ -130,19 +130,24 @@ class MeshCall {
130
130
  return jobOutput?.data?.response;
131
131
  }
132
132
  static async flush(params) {
133
- const hotMeshInstance = await MeshCall.getInstance(params.namespace, params.redis);
133
+ const hotMeshInstance = await MeshCall.getInstance(params.namespace, utils_1.polyfill.providerConfig(params));
134
134
  await hotMeshInstance.scrub(params.id ?? params?.options?.id);
135
135
  }
136
136
  static async cron(params) {
137
+ let hotMeshInstance;
138
+ let readonly = true;
137
139
  if (params.callback) {
138
- await MeshCall.connect({
140
+ hotMeshInstance = await MeshCall.connect({
139
141
  logLevel: params.logLevel,
140
142
  guid: params.guid,
141
143
  topic: params.topic,
142
- redis: params.redis,
144
+ connection: utils_1.polyfill.providerConfig(params),
143
145
  callback: params.callback,
144
146
  namespace: params.namespace,
145
147
  });
148
+ readonly = false;
149
+ }
150
+ else {
146
151
  }
147
152
  const TOPIC = `${params.namespace ?? key_1.HMNS}.cron`;
148
153
  const maxCycles = params.options.maxCycles ?? 100000;
@@ -160,7 +165,10 @@ class MeshCall {
160
165
  delay = params.options.delay ? (0, utils_1.s)(params.options.delay) : undefined;
161
166
  }
162
167
  try {
163
- const hotMeshInstance = await MeshCall.getInstance(params.namespace, params.redis, { readonly: params.callback ? false : true, guid: params.guid });
168
+ if (!hotMeshInstance) {
169
+ hotMeshInstance = await MeshCall.getInstance(params.namespace, utils_1.polyfill.providerConfig(params), { readonly, guid: params.guid });
170
+ await MeshCall.createStream(hotMeshInstance, params.topic, params.namespace);
171
+ }
164
172
  await hotMeshInstance.pub(TOPIC, {
165
173
  id: params.options.id,
166
174
  topic: params.topic,
@@ -180,7 +188,7 @@ class MeshCall {
180
188
  }
181
189
  }
182
190
  static async interrupt(params) {
183
- const hotMeshInstance = await MeshCall.getInstance(params.namespace, params.redis);
191
+ const hotMeshInstance = await MeshCall.getInstance(params.namespace, utils_1.polyfill.providerConfig(params));
184
192
  try {
185
193
  await hotMeshInstance.interrupt(`${params.namespace ?? key_1.HMNS}.cron`, params.options.id, { throw: false, expire: 1 });
186
194
  }
@@ -218,7 +226,7 @@ MeshCall.getHotMeshClient = async (namespace, connection, options = {}) => {
218
226
  appId: targetNS,
219
227
  logLevel: enums_1.HMSH_LOGLEVEL,
220
228
  engine: {
221
- redis: {
229
+ connection: {
222
230
  class: connection.class,
223
231
  options: connection.options,
224
232
  },
@@ -229,3 +237,12 @@ MeshCall.getHotMeshClient = async (namespace, connection, options = {}) => {
229
237
  await _a.activateWorkflow(await hotMeshClient, targetNS);
230
238
  return hotMeshClient;
231
239
  };
240
+ MeshCall.createStream = async (hotMeshClient, workflowTopic, namespace) => {
241
+ const params = { appId: namespace ?? key_1.HMNS, topic: workflowTopic };
242
+ const streamKey = hotMeshClient.engine.store.mintKey(key_1.KeyType.STREAMS, params);
243
+ try {
244
+ await hotMeshClient.engine.stream.createConsumerGroup(streamKey, 'WORKER');
245
+ }
246
+ catch (err) {
247
+ }
248
+ };
@@ -1,15 +1,15 @@
1
1
  import { HotMesh } from '../hotmesh';
2
2
  import { WorkflowOptions, WorkflowSearchOptions, FindJobsOptions, FindOptions, FindWhereOptions, SearchResults, FindWhereQuery } from '../../types/meshflow';
3
3
  import { CallOptions, ConnectionInput, ExecInput, HookInput } from '../../types/meshdata';
4
- import { RedisClass, RedisOptions } from '../../types/redis';
5
4
  import { StringAnyType, StringStringType } from '../../types/serializer';
6
5
  import { JobInterruptOptions, JobOutput } from '../../types/job';
7
6
  import { QuorumMessage, QuorumMessageCallback, QuorumProfile, RollCallOptions, SubscriptionOptions, ThrottleOptions } from '../../types/quorum';
8
7
  import { MeshFlowJobExport, ExportOptions } from '../../types/exporter';
8
+ import { ProviderConfig } from '../../types';
9
+ import { ProviderClass } from '../../types/provider';
9
10
  declare class MeshData {
10
11
  connectionSignatures: StringStringType;
11
- redisOptions: RedisOptions;
12
- redisClass: RedisClass;
12
+ connection: Partial<ProviderConfig>;
13
13
  instances: Map<string, Promise<HotMesh> | HotMesh>;
14
14
  search: WorkflowSearchOptions;
15
15
  static workflow: {
@@ -28,13 +28,13 @@ declare class MeshData {
28
28
  executeChild: <T_1>(options?: Partial<WorkflowOptions>) => Promise<T_1>;
29
29
  startChild: (options?: Partial<WorkflowOptions>) => Promise<string>;
30
30
  };
31
- constructor(redisClass: Partial<RedisClass>, redisOptions: Partial<RedisOptions>, search?: WorkflowSearchOptions);
31
+ constructor(providerClass: ProviderClass, providerOptions: StringAnyType, search?: WorkflowSearchOptions);
32
32
  validate(entity: string): void;
33
- getConnection(): Promise<import("../../types/meshflow").ConnectionConfig>;
33
+ getConnection(): Promise<ProviderConfig>;
34
34
  getClient(): import("../meshflow/client").ClientService;
35
35
  safeKey(key: string): string;
36
36
  arrayToHash(input: [number, ...Array<string | string[]>]): StringStringType[];
37
- toString(value: any): string | undefined;
37
+ toString(value: unknown): string | undefined;
38
38
  static mintGuid(entity: string, id?: string): string;
39
39
  getHotMesh(namespace?: string): Promise<HotMesh>;
40
40
  mintKey(entity: string, workflowId: string, namespace?: string): Promise<string>;
@@ -8,8 +8,9 @@ const hotmesh_1 = require("../hotmesh");
8
8
  const hotmesh_2 = require("../../types/hotmesh");
9
9
  const enums_1 = require("../../modules/enums");
10
10
  class MeshData {
11
- constructor(redisClass, redisOptions, search) {
11
+ constructor(providerClass, providerOptions, search) {
12
12
  this.connectionSignatures = {};
13
+ this.connection = {};
13
14
  this.instances = new Map();
14
15
  this.mesh = {
15
16
  sub: async (callback, options = {}) => {
@@ -45,8 +46,8 @@ class MeshData {
45
46
  await hotMesh.quorum?.unsub(callback);
46
47
  },
47
48
  };
48
- this.redisClass = redisClass;
49
- this.redisOptions = redisOptions;
49
+ this.connection.class = providerClass;
50
+ this.connection.options = providerOptions;
50
51
  if (search) {
51
52
  this.search = search;
52
53
  }
@@ -57,17 +58,11 @@ class MeshData {
57
58
  }
58
59
  }
59
60
  async getConnection() {
60
- return await meshflow_1.MeshFlow.Connection.connect({
61
- class: this.redisClass,
62
- options: this.redisOptions,
63
- });
61
+ return await meshflow_1.MeshFlow.Connection.connect(utils_1.polyfill.meshDataConfig(this));
64
62
  }
65
63
  getClient() {
66
64
  return new meshflow_1.MeshFlow.Client({
67
- connection: {
68
- class: this.redisClass,
69
- options: this.redisOptions,
70
- },
65
+ connection: utils_1.polyfill.meshDataConfig(this),
71
66
  });
72
67
  }
73
68
  safeKey(key) {
@@ -138,10 +133,7 @@ class MeshData {
138
133
  hotMesh = hotmesh_1.HotMesh.init({
139
134
  appId: namespace,
140
135
  engine: {
141
- redis: {
142
- class: this.redisClass,
143
- options: this.redisOptions,
144
- },
136
+ connection: utils_1.polyfill.meshDataConfig(this),
145
137
  },
146
138
  });
147
139
  this.instances.set(namespace, hotMesh);
@@ -1,5 +1,6 @@
1
- import { Connection, ConnectionConfig } from '../../types/meshflow';
1
+ import { Connection } from '../../types/meshflow';
2
+ import { ProviderConfig } from '../../types/provider';
2
3
  export declare class ConnectionService {
3
4
  constructor();
4
- static connect(config: ConnectionConfig): Promise<Connection>;
5
+ static connect(config: ProviderConfig): Promise<Connection>;
5
6
  }
@@ -1,15 +1,15 @@
1
1
  import { ILogger } from '../logger';
2
2
  import { StoreService } from '../store';
3
3
  import { ExportOptions, MeshFlowJobExport, TimelineType, TransitionType, ExportFields } from '../../types/exporter';
4
- import { RedisClient, RedisMulti } from '../../types/redis';
4
+ import { ProviderClient, ProviderTransaction } from '../../types/provider';
5
5
  import { StringStringType, Symbols } from '../../types/serializer';
6
6
  declare class ExporterService {
7
7
  appId: string;
8
8
  logger: ILogger;
9
- store: StoreService<RedisClient, RedisMulti>;
9
+ store: StoreService<ProviderClient, ProviderTransaction>;
10
10
  symbols: Promise<Symbols> | Symbols;
11
11
  private static symbols;
12
- constructor(appId: string, store: StoreService<RedisClient, RedisMulti>, logger: ILogger);
12
+ constructor(appId: string, store: StoreService<ProviderClient, ProviderTransaction>, logger: ILogger);
13
13
  export(jobId: string, options?: ExportOptions): Promise<MeshFlowJobExport>;
14
14
  inflate(jobHash: StringStringType, options: ExportOptions): MeshFlowJobExport;
15
15
  resolveValue(raw: string, withValues: boolean): Record<string, any> | string | number | null;
@@ -1 +1 @@
1
- 'use strict';function _0x50fb(_0x35ae8c,_0x3dd2d6){const _0x2caefa=_0x2cae();return _0x50fb=function(_0x50fb10,_0x49e632){_0x50fb10=_0x50fb10-0x8a;let _0x4d0e72=_0x2caefa[_0x50fb10];return _0x4d0e72;},_0x50fb(_0x35ae8c,_0x3dd2d6);}(function(_0x4d6aeb,_0x47382e){const _0x5666d2=_0x50fb,_0x57df4e=_0x4d6aeb();while(!![]){try{const _0x49e336=parseInt(_0x5666d2(0x8c))/0x1*(-parseInt(_0x5666d2(0x8b))/0x2)+parseInt(_0x5666d2(0x90))/0x3*(-parseInt(_0x5666d2(0x8e))/0x4)+-parseInt(_0x5666d2(0x8f))/0x5+parseInt(_0x5666d2(0x91))/0x6+-parseInt(_0x5666d2(0x8a))/0x7+-parseInt(_0x5666d2(0x8d))/0x8+parseInt(_0x5666d2(0x92))/0x9;if(_0x49e336===_0x47382e)break;else _0x57df4e['push'](_0x57df4e['shift']());}catch(_0x537d8d){_0x57df4e['push'](_0x57df4e['shift']());}}}(_0x2cae,0x40318));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ExporterService']=void 0x0;const utils_1=require('../../modules/utils'),serializer_1=require('../serializer');class ExporterService{constructor(_0x447232,_0x560e22,_0x59fe84){this['appId']=_0x447232,this['logger']=_0x59fe84,this['store']=_0x560e22;}async['export'](_0x2f44a8,_0x5a245d={}){if(!ExporterService['symbols']['has'](this['appId'])){const _0x411ea4=this['store']['getAllSymbols']();ExporterService['symbols']['set'](this['appId'],await _0x411ea4);}const _0x42ea9c=await this['store']['getRaw'](_0x2f44a8),_0xc681cb=this['inflate'](_0x42ea9c,_0x5a245d);return _0xc681cb;}['inflate'](_0x497744,_0x306f5a){const _0xb8c1c6=[],_0x23144f={},_0x4b5e8c={},_0x265c4e={},_0x318f05=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object['entries'](_0x497744)['forEach'](([_0x3383ba,_0x52105c])=>{const _0xef78f9=_0x3383ba['match'](_0x318f05);if(_0xef78f9)this['inflateTransition'](_0xef78f9,_0x52105c,_0x265c4e);else{if(_0x3383ba['startsWith']('_'))_0x4b5e8c[_0x3383ba['substring'](0x1)]=_0x52105c;else{if(_0x3383ba['startsWith']('-')){const _0x5ce73a=this['keyToObject'](_0x3383ba);_0xb8c1c6['push']({..._0x5ce73a,'key':_0x3383ba,'value':this['resolveValue'](_0x52105c,_0x306f5a['values'])});}else _0x3383ba['length']===0x3&&(_0x23144f[this['inflateKey'](_0x3383ba)]=serializer_1['SerializerService']['fromString'](_0x52105c));}}}),this['filterFields']({'data':(0x0,utils_1['restoreHierarchy'])(_0x4b5e8c),'state':Object['entries']((0x0,utils_1['restoreHierarchy'])(_0x23144f))[0x0][0x1],'status':parseInt(_0x497744[':'],0xa),'timeline':this['sortParts'](_0xb8c1c6),'transitions':this['sortEntriesByCreated'](_0x265c4e)},_0x306f5a['block'],_0x306f5a['allow']);}['resolveValue'](_0x3f9991,_0x1405e7){const _0x1cca0a=serializer_1['SerializerService']['fromString'](_0x3f9991);if(_0x1405e7!==![])return _0x1cca0a;return _0x1cca0a&&typeof _0x1cca0a==='object'&&('data'in _0x1cca0a&&(_0x1cca0a['data']={}),'$error'in _0x1cca0a&&(_0x1cca0a['$error']={})),_0x1cca0a;}['inflateKey'](_0x44c895){const _0x4edc99=ExporterService['symbols']['get'](this['appId']);if(_0x44c895 in _0x4edc99){const _0xd1d1d5=_0x4edc99[_0x44c895],_0x390d7b=_0xd1d1d5['split']('/');return _0x390d7b['join']('/');}return _0x44c895;}['filterFields'](_0xfc3a3d,_0x4ad895=[],_0x4b5663=[]){let _0x1add43={};return _0x4b5663&&_0x4b5663['length']>0x0?_0x4b5663['forEach'](_0x287f1c=>{_0x287f1c in _0xfc3a3d&&(_0x1add43[_0x287f1c]=_0xfc3a3d[_0x287f1c]);}):_0x1add43={..._0xfc3a3d},_0x4ad895&&_0x4ad895['length']>0x0&&_0x4ad895['forEach'](_0x4f40e9=>{_0x4f40e9 in _0x1add43&&delete _0x1add43[_0x4f40e9];}),_0x1add43;}['inflateTransition'](_0xbeb979,_0x430e9c,_0x59b24d){const [_0x26caca,_0x2b3b90,_0xb9cd21]=_0xbeb979,_0x61546f=this['inflateKey'](_0x2b3b90),_0x514cf9=_0x61546f['split']('/'),_0x4db4b1=_0x514cf9[0x0],_0x2481c8=_0x61546f['endsWith']('/output/metadata/ac'),_0x913886=_0x61546f['endsWith']('/output/metadata/au');if(_0x2481c8||_0x913886){const _0x1c6984=_0x4db4b1+','+_0xb9cd21,_0x2fbacb=_0x59b24d[_0x1c6984];!_0x2fbacb?_0x59b24d[_0x1c6984]={'activity':_0x4db4b1,'dimensions':_0xb9cd21,'created':_0x2481c8?_0x430e9c:null,'updated':_0x913886?_0x430e9c:null}:_0x2fbacb[_0x2481c8?'created':'updated']=_0x430e9c;}}['sortEntriesByCreated'](_0x527ac9){const _0x55e79d=Object['values'](_0x527ac9);return _0x55e79d['sort']((_0x480766,_0x462c97)=>{return(_0x480766['created']||_0x480766['updated'])['localeCompare'](_0x462c97['created']||_0x462c97['updated']);}),_0x55e79d;}['keyToObject'](_0xb37eaf){function _0x42077b(_0x3f1200){const _0x247796=_0x3f1200['split'](',');if(_0x247796['length']>0x1)return _0x247796['shift'](),_0x247796['join'](',');}const _0x80136e=_0xb37eaf['split']('-');return _0x80136e['length']===0x4?{'index':parseInt(_0x80136e[0x2],0xa),'dimension':_0x42077b(_0x80136e[0x1])}:{'index':parseInt(_0x80136e[0x2],0xa),'secondary':parseInt(_0x80136e[0x3],0xa),'dimension':_0x42077b(_0x80136e[0x1])};}['sortParts'](_0xa0b706){return _0xa0b706['sort']((_0x1d3c31,_0x28feeb)=>{const {dimension:_0xa68eb3,index:_0x460d38,secondary:_0x11da3d}=_0x1d3c31,{dimension:_0x3068db,index:_0x89a786,secondary:_0xfe33a1}=_0x28feeb;if(_0xa68eb3===undefined&&_0x3068db!==undefined)return-0x1;if(_0xa68eb3!==undefined&&_0x3068db===undefined)return 0x1;if(_0xa68eb3!==undefined&&_0x3068db!==undefined){if(_0xa68eb3<_0x3068db)return-0x1;if(_0xa68eb3>_0x3068db)return 0x1;}if(_0x460d38<_0x89a786)return-0x1;if(_0x460d38>_0x89a786)return 0x1;if(_0x11da3d===undefined&&_0xfe33a1!==undefined)return-0x1;if(_0x11da3d!==undefined&&_0xfe33a1===undefined)return 0x1;if(_0x11da3d!==undefined&&_0xfe33a1!==undefined){if(_0x11da3d<_0xfe33a1)return-0x1;if(_0x11da3d>_0xfe33a1)return 0x1;}return 0x0;});}}function _0x2cae(){const _0x7242ac=['10090620imfzBI','1845382zpFpip','4652Mztojo','23MrXkVR','3068896izvdLq','8FLjDue','2412655PkMYEi','298275OsgBKq','3143238eSndhk'];_0x2cae=function(){return _0x7242ac;};return _0x2cae();}exports['ExporterService']=ExporterService,ExporterService['symbols']=new Map();
1
+ 'use strict';function _0x2b59(_0x14a297,_0x1cffde){const _0x4f44b6=_0x4f44();return _0x2b59=function(_0x2b5984,_0x33bc5b){_0x2b5984=_0x2b5984-0x1e4;let _0x41e4ac=_0x4f44b6[_0x2b5984];return _0x41e4ac;},_0x2b59(_0x14a297,_0x1cffde);}(function(_0x3db0d3,_0x36db1e){const _0xaeec59=_0x2b59,_0x569884=_0x3db0d3();while(!![]){try{const _0x1829d6=-parseInt(_0xaeec59(0x1e8))/0x1+-parseInt(_0xaeec59(0x1eb))/0x2+parseInt(_0xaeec59(0x1e5))/0x3+parseInt(_0xaeec59(0x1e6))/0x4*(parseInt(_0xaeec59(0x1e7))/0x5)+parseInt(_0xaeec59(0x1e4))/0x6+-parseInt(_0xaeec59(0x1ea))/0x7*(parseInt(_0xaeec59(0x1ec))/0x8)+parseInt(_0xaeec59(0x1e9))/0x9;if(_0x1829d6===_0x36db1e)break;else _0x569884['push'](_0x569884['shift']());}catch(_0x5e0abf){_0x569884['push'](_0x569884['shift']());}}}(_0x4f44,0x3b515));function _0x4f44(){const _0x2e070c=['5sBNmOJ','222007ijWFUI','3812796lIakrK','455707EkSrLQ','642576ObXqOJ','8VhgpQy','257922xMUJax','1075959AyrBBv','104308vSoWmL'];_0x4f44=function(){return _0x2e070c;};return _0x4f44();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ExporterService']=void 0x0;const utils_1=require('../../modules/utils'),serializer_1=require('../serializer');class ExporterService{constructor(_0x285c91,_0x833267,_0x363c77){this['appId']=_0x285c91,this['logger']=_0x363c77,this['store']=_0x833267;}async['export'](_0x24cb4a,_0x32cd55={}){if(!ExporterService['symbols']['has'](this['appId'])){const _0x374a23=this['store']['getAllSymbols']();ExporterService['symbols']['set'](this['appId'],await _0x374a23);}const _0xcf66a5=await this['store']['getRaw'](_0x24cb4a),_0x25b8c3=this['inflate'](_0xcf66a5,_0x32cd55);return _0x25b8c3;}['inflate'](_0x4af001,_0x43b373){const _0x1f4acb=[],_0x514b1b={},_0x454ad8={},_0x4e4a09={},_0x1f1793=/^([a-zA-Z]{3}),(\d+(?:,\d+)*)/;return Object['entries'](_0x4af001)['forEach'](([_0x55f53a,_0x428737])=>{const _0x4cf1c8=_0x55f53a['match'](_0x1f1793);if(_0x4cf1c8)this['inflateTransition'](_0x4cf1c8,_0x428737,_0x4e4a09);else{if(_0x55f53a['startsWith']('_'))_0x454ad8[_0x55f53a['substring'](0x1)]=_0x428737;else{if(_0x55f53a['startsWith']('-')){const _0x156954=this['keyToObject'](_0x55f53a);_0x1f4acb['push']({..._0x156954,'key':_0x55f53a,'value':this['resolveValue'](_0x428737,_0x43b373['values'])});}else _0x55f53a['length']===0x3&&(_0x514b1b[this['inflateKey'](_0x55f53a)]=serializer_1['SerializerService']['fromString'](_0x428737));}}}),this['filterFields']({'data':(0x0,utils_1['restoreHierarchy'])(_0x454ad8),'state':Object['entries']((0x0,utils_1['restoreHierarchy'])(_0x514b1b))[0x0][0x1],'status':parseInt(_0x4af001[':'],0xa),'timeline':this['sortParts'](_0x1f4acb),'transitions':this['sortEntriesByCreated'](_0x4e4a09)},_0x43b373['block'],_0x43b373['allow']);}['resolveValue'](_0x5cce7d,_0x5c68dc){const _0x913b83=serializer_1['SerializerService']['fromString'](_0x5cce7d);if(_0x5c68dc!==![])return _0x913b83;return _0x913b83&&typeof _0x913b83==='object'&&('data'in _0x913b83&&(_0x913b83['data']={}),'$error'in _0x913b83&&(_0x913b83['$error']={})),_0x913b83;}['inflateKey'](_0xf8bcb4){const _0x4f70e2=ExporterService['symbols']['get'](this['appId']);if(_0xf8bcb4 in _0x4f70e2){const _0x55725d=_0x4f70e2[_0xf8bcb4],_0x391c13=_0x55725d['split']('/');return _0x391c13['join']('/');}return _0xf8bcb4;}['filterFields'](_0x14e1ce,_0x2bd82f=[],_0x4a88bf=[]){let _0x4ed163={};return _0x4a88bf&&_0x4a88bf['length']>0x0?_0x4a88bf['forEach'](_0x429d55=>{_0x429d55 in _0x14e1ce&&(_0x4ed163[_0x429d55]=_0x14e1ce[_0x429d55]);}):_0x4ed163={..._0x14e1ce},_0x2bd82f&&_0x2bd82f['length']>0x0&&_0x2bd82f['forEach'](_0x207e14=>{_0x207e14 in _0x4ed163&&delete _0x4ed163[_0x207e14];}),_0x4ed163;}['inflateTransition'](_0x28f1db,_0x1b75e4,_0x5b5f43){const [_0x2258ce,_0x1ae549,_0x39e726]=_0x28f1db,_0x42db3c=this['inflateKey'](_0x1ae549),_0x2664b7=_0x42db3c['split']('/'),_0x2e3ac6=_0x2664b7[0x0],_0x462111=_0x42db3c['endsWith']('/output/metadata/ac'),_0x5928ab=_0x42db3c['endsWith']('/output/metadata/au');if(_0x462111||_0x5928ab){const _0x17c474=_0x2e3ac6+','+_0x39e726,_0xbda534=_0x5b5f43[_0x17c474];!_0xbda534?_0x5b5f43[_0x17c474]={'activity':_0x2e3ac6,'dimensions':_0x39e726,'created':_0x462111?_0x1b75e4:null,'updated':_0x5928ab?_0x1b75e4:null}:_0xbda534[_0x462111?'created':'updated']=_0x1b75e4;}}['sortEntriesByCreated'](_0x556df6){const _0x2c7085=Object['values'](_0x556df6);return _0x2c7085['sort']((_0xf1ae58,_0x49607e)=>{return(_0xf1ae58['created']||_0xf1ae58['updated'])['localeCompare'](_0x49607e['created']||_0x49607e['updated']);}),_0x2c7085;}['keyToObject'](_0x482440){function _0x17af06(_0x538458){const _0x54e12d=_0x538458['split'](',');if(_0x54e12d['length']>0x1)return _0x54e12d['shift'](),_0x54e12d['join'](',');}const _0x3560c9=_0x482440['split']('-');return _0x3560c9['length']===0x4?{'index':parseInt(_0x3560c9[0x2],0xa),'dimension':_0x17af06(_0x3560c9[0x1])}:{'index':parseInt(_0x3560c9[0x2],0xa),'secondary':parseInt(_0x3560c9[0x3],0xa),'dimension':_0x17af06(_0x3560c9[0x1])};}['sortParts'](_0x57017f){return _0x57017f['sort']((_0x50a507,_0x1f10b3)=>{const {dimension:_0x4f1b45,index:_0x440545,secondary:_0x505dc1}=_0x50a507,{dimension:_0x11088b,index:_0x876068,secondary:_0x19ed31}=_0x1f10b3;if(_0x4f1b45===undefined&&_0x11088b!==undefined)return-0x1;if(_0x4f1b45!==undefined&&_0x11088b===undefined)return 0x1;if(_0x4f1b45!==undefined&&_0x11088b!==undefined){if(_0x4f1b45<_0x11088b)return-0x1;if(_0x4f1b45>_0x11088b)return 0x1;}if(_0x440545<_0x876068)return-0x1;if(_0x440545>_0x876068)return 0x1;if(_0x505dc1===undefined&&_0x19ed31!==undefined)return-0x1;if(_0x505dc1!==undefined&&_0x19ed31===undefined)return 0x1;if(_0x505dc1!==undefined&&_0x19ed31!==undefined){if(_0x505dc1<_0x19ed31)return-0x1;if(_0x505dc1>_0x19ed31)return 0x1;}return 0x0;});}}exports['ExporterService']=ExporterService,ExporterService['symbols']=new Map();
@@ -98,7 +98,9 @@ class Search {
98
98
  }
99
99
  }
100
100
  const fieldCount = await this.search.setFields(this.jobId, fields);
101
- await this.search.setFields(this.jobId, { [ssGuid]: fieldCount.toString() });
101
+ await this.search.setFields(this.jobId, {
102
+ [ssGuid]: fieldCount.toString(),
103
+ });
102
104
  return fieldCount;
103
105
  }
104
106
  async get(id) {
@@ -163,8 +165,12 @@ class Search {
163
165
  return Number(replay[ssGuid]);
164
166
  }
165
167
  const response = await this.search.deleteFields(this.jobId, safeArgs);
166
- const formattedResponse = isNaN(response) ? 0 : Number(response);
167
- await this.search.setFields(this.jobId, { [ssGuid]: formattedResponse.toString() });
168
+ const formattedResponse = isNaN(response)
169
+ ? 0
170
+ : Number(response);
171
+ await this.search.setFields(this.jobId, {
172
+ [ssGuid]: formattedResponse.toString(),
173
+ });
168
174
  return formattedResponse;
169
175
  }
170
176
  async incr(key, val) {
@@ -191,7 +197,9 @@ class Search {
191
197
  if (ssGuidValue === 1) {
192
198
  const log = Math.log(val);
193
199
  const logTotal = await this.search.incrementFieldByFloat(this.jobId, this.safeKey(key), log);
194
- await this.search.setFields(this.jobId, { [ssGuid]: logTotal.toString() });
200
+ await this.search.setFields(this.jobId, {
201
+ [ssGuid]: logTotal.toString(),
202
+ });
195
203
  return Math.exp(logTotal);
196
204
  }
197
205
  else {
@@ -84,7 +84,7 @@ class WorkerService {
84
84
  this.workflowRunner.engine.logger.info('meshflow-worker-running');
85
85
  }
86
86
  async initActivityWorker(config, activityTopic) {
87
- const redisConfig = {
87
+ const providerConfig = {
88
88
  class: config.connection.class,
89
89
  options: config.connection.options,
90
90
  };
@@ -95,11 +95,11 @@ class WorkerService {
95
95
  guid: config.guid ? `${config.guid}XA` : undefined,
96
96
  logLevel: config.options?.logLevel ?? enums_1.HMSH_LOGLEVEL,
97
97
  appId: targetNamespace,
98
- engine: { redis: redisConfig },
98
+ engine: { connection: providerConfig },
99
99
  workers: [
100
100
  {
101
101
  topic: activityTopic,
102
- redis: redisConfig,
102
+ connection: providerConfig,
103
103
  callback: this.wrapActivityFunctions().bind(this),
104
104
  },
105
105
  ],
@@ -160,7 +160,7 @@ class WorkerService {
160
160
  };
161
161
  }
162
162
  async initWorkflowWorker(config, workflowTopic, workflowFunction) {
163
- const redisConfig = {
163
+ const providerConfig = {
164
164
  class: config.connection.class,
165
165
  options: config.connection.options,
166
166
  };
@@ -171,11 +171,11 @@ class WorkerService {
171
171
  guid: config.guid,
172
172
  logLevel: config.options?.logLevel ?? enums_1.HMSH_LOGLEVEL,
173
173
  appId: config.namespace ?? factory_1.APP_ID,
174
- engine: { redis: redisConfig },
174
+ engine: { connection: providerConfig },
175
175
  workers: [
176
176
  {
177
177
  topic: workflowTopic,
178
- redis: redisConfig,
178
+ connection: providerConfig,
179
179
  callback: this.wrapWorkflowFunction(workflowFunction, workflowTopic, config).bind(this),
180
180
  },
181
181
  ],
@@ -374,7 +374,7 @@ WorkerService.getHotMesh = async (workflowTopic, config, options) => {
374
374
  logLevel: options?.logLevel ?? enums_1.HMSH_LOGLEVEL,
375
375
  appId: targetNamespace,
376
376
  engine: {
377
- redis: { ...config?.connection },
377
+ connection: { ...config?.connection },
378
378
  },
379
379
  });
380
380
  WorkerService.instances.set(targetTopic, hotMeshClient);
@@ -12,16 +12,13 @@ declare abstract class MeshOS {
12
12
  static profiles: Types.Profiles;
13
13
  static classes: Record<string, typeof MeshOS>;
14
14
  static logger: Types.ILogger;
15
- constructor(namespace: string, namespaceType: string, config: Types.DBConfig);
15
+ constructor(providerClass: Types.ProviderClass, namespace: string, namespaceType: string, config: Types.ProviderConfig);
16
16
  protected abstract getEntity(): string;
17
17
  abstract getSearchOptions(): Types.WorkflowSearchOptions;
18
18
  protected abstract getTaskQueue(): string;
19
19
  private initializeMeshData;
20
20
  protected defaultTargetFn(): Promise<string>;
21
21
  getNamespace(): string;
22
- getRedisUrl: (config: Types.DBConfig) => {
23
- url: string;
24
- };
25
22
  connect(): Promise<void>;
26
23
  index(): Promise<void>;
27
24
  static shutdown(): Promise<void>;
@@ -1,48 +1,19 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
2
  Object.defineProperty(exports, "__esModule", { value: true });
26
3
  exports.MeshOS = void 0;
27
- const Redis = __importStar(require("redis"));
28
4
  const index_1 = require("../meshdata/index");
29
5
  const utils_1 = require("../../modules/utils");
30
6
  const logger_1 = require("../logger");
31
7
  class MeshOS {
32
- constructor(namespace, namespaceType, config) {
8
+ constructor(providerClass, namespace, namespaceType, config) {
33
9
  this.connected = false;
34
- this.getRedisUrl = (config) => {
35
- return {
36
- url: `redis${config.REDIS_USE_TLS ? 's' : ''}://${config.REDIS_USERNAME ?? ''}:${config.REDIS_PASSWORD}@${config.REDIS_HOST}:${config.REDIS_PORT}`,
37
- };
38
- };
39
10
  this.workflow = {};
40
11
  this.namespace = namespace;
41
12
  this.namespaceType = namespaceType;
42
- this.meshData = this.initializeMeshData(config);
13
+ this.meshData = this.initializeMeshData(providerClass, config);
43
14
  }
44
- initializeMeshData(dbConfig) {
45
- return new index_1.MeshData(Redis, this.getRedisUrl(dbConfig), this.getSearchOptions());
15
+ initializeMeshData(providerClass, providerConfig) {
16
+ return new index_1.MeshData(providerClass, providerConfig, this.getSearchOptions());
46
17
  }
47
18
  async defaultTargetFn() {
48
19
  return 'OK';
@@ -221,7 +192,7 @@ class MeshOS {
221
192
  static async init(p = MeshOS.profiles) {
222
193
  for (const key in p) {
223
194
  const profile = p[key];
224
- if (profile.db.config.REDIS_HOST) {
195
+ if (profile.db?.connection?.options) {
225
196
  this.logger.info(`meshos-initializing`, {
226
197
  db: profile.db.name,
227
198
  key,
@@ -243,7 +214,7 @@ class MeshOS {
243
214
  entity: entity.name,
244
215
  label: entity.label,
245
216
  });
246
- const instance = pinstances[entity.name] = new entity.class(ns, namespace.type, profile.db.config);
217
+ const instance = pinstances[entity.name] = new entity.class(profile.db.connection.class, ns, namespace.type, profile.db.connection.options);
247
218
  await instance.init(profile.db.search);
248
219
  }
249
220
  }
@@ -251,10 +222,8 @@ class MeshOS {
251
222
  }
252
223
  }
253
224
  static findEntity(database, namespace, entity) {
254
- if (!database ||
255
- !MeshOS.profiles[database] ||
256
- !MeshOS.profiles[database]?.db?.config?.REDIS_HOST) {
257
- const activeProfiles = Object.keys(MeshOS.profiles).filter((key) => MeshOS.profiles[key]?.db?.config?.REDIS_HOST);
225
+ if (!database || !MeshOS.profiles[database]) {
226
+ const activeProfiles = Object.keys(MeshOS.profiles).filter((key) => MeshOS.profiles[key]?.db?.connection);
258
227
  throw new Error(`The database query parameter [${database}] was not found. Use one of: ${activeProfiles.join(', ')}`);
259
228
  }
260
229
  if (!namespace || !MeshOS.profiles[database]?.instances?.[namespace]) {
@@ -281,10 +250,8 @@ class MeshOS {
281
250
  return target;
282
251
  }
283
252
  static findSchemas(database, ns) {
284
- if (!database ||
285
- !MeshOS.profiles[database] ||
286
- !MeshOS.profiles[database]?.db?.config?.REDIS_HOST) {
287
- const activeProfiles = Object.keys(MeshOS.profiles).filter((key) => MeshOS.profiles[key]?.db?.config?.REDIS_HOST);
253
+ if (!database || !MeshOS.profiles[database]) {
254
+ const activeProfiles = Object.keys(MeshOS.profiles).filter((key) => MeshOS.profiles[key]?.db?.connection);
288
255
  throw new Error(`The database query parameter [${database}] was not found. Use one of: ${activeProfiles.join(', ')}`);
289
256
  }
290
257
  const profile = MeshOS.profiles[database];
@@ -301,7 +268,7 @@ class MeshOS {
301
268
  const result = {};
302
269
  for (const key in p) {
303
270
  const profile = p[key];
304
- if (!profile.db.config.REDIS_HOST) {
271
+ if (!profile.db.connection) {
305
272
  continue;
306
273
  }
307
274
  else {
@@ -1 +1 @@
1
- 'use strict';function _0x211c(){var _0x487b54=['6483714sBvUoD','3375513gteJlT','4CvnzyM','2996145UPVkqi','8452052EtJdob','15523912sBvpyF','1194786QwamFE','101613RmImPp'];_0x211c=function(){return _0x487b54;};return _0x211c();}(function(_0x2644fd,_0xfafbe5){var _0x4ff631=_0x4e20,_0x23e85b=_0x2644fd();while(!![]){try{var _0x3b36c3=-parseInt(_0x4ff631(0x14d))/0x1+-parseInt(_0x4ff631(0x14c))/0x2+-parseInt(_0x4ff631(0x14f))/0x3*(parseInt(_0x4ff631(0x150))/0x4)+parseInt(_0x4ff631(0x149))/0x5+-parseInt(_0x4ff631(0x14e))/0x6+parseInt(_0x4ff631(0x14a))/0x7+parseInt(_0x4ff631(0x14b))/0x8;if(_0x3b36c3===_0xfafbe5)break;else _0x23e85b['push'](_0x23e85b['shift']());}catch(_0xbb74c0){_0x23e85b['push'](_0x23e85b['shift']());}}}(_0x211c,0xcda76));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ArrayHandler']=void 0x0;function _0x4e20(_0x26e986,_0x2a8f16){var _0x211c33=_0x211c();return _0x4e20=function(_0x4e20de,_0x2a59dc){_0x4e20de=_0x4e20de-0x149;var _0x4dce4a=_0x211c33[_0x4e20de];return _0x4dce4a;},_0x4e20(_0x26e986,_0x2a8f16);}class ArrayHandler{['get'](_0x421ad7,_0x12ffe4){return _0x421ad7?.[_0x12ffe4||0x0];}['length'](_0x505b88){return _0x505b88?.['length'];}['concat'](_0x1b596c,_0x34784b){return _0x1b596c['concat'](_0x34784b);}['indexOf'](_0x5f896e,_0x343942,_0x139ae2){return _0x5f896e['indexOf'](_0x343942,_0x139ae2);}['join'](_0x183b7b,_0x23fe3e){return _0x183b7b['join'](_0x23fe3e);}['lastIndexOf'](_0x10ad53,_0x2d670c,_0x687225){return _0x10ad53['lastIndexOf'](_0x2d670c,_0x687225);}['pop'](_0x41befb){return _0x41befb['pop']();}['push'](_0x2ec7da,..._0x33086a){return _0x2ec7da['push'](..._0x33086a),_0x2ec7da;}['reverse'](_0x23efb2){return _0x23efb2['reverse']();}['shift'](_0x5bc18e){return _0x5bc18e['shift']();}['slice'](_0x1f22df,_0x1f4ccc,_0x2ca398){return _0x1f22df['slice'](_0x1f4ccc,_0x2ca398);}['sort'](_0x574a77,_0x488d1f='ASCENDING'){return _0x574a77['sort']((_0x5709a6,_0x16dfd5)=>{if(_0x488d1f==='ASCENDING'){if(_0x5709a6===_0x16dfd5)return 0x0;if(_0x5709a6===null||_0x5709a6===undefined)return-0x1;if(_0x16dfd5===null||_0x16dfd5===undefined)return 0x1;if(typeof _0x5709a6==='string'&&typeof _0x16dfd5==='string')return _0x5709a6['localeCompare'](_0x16dfd5);return _0x5709a6<_0x16dfd5?-0x1:0x1;}else{if(_0x5709a6===_0x16dfd5)return 0x0;if(_0x5709a6===null||_0x5709a6===undefined)return 0x1;if(_0x16dfd5===null||_0x16dfd5===undefined)return-0x1;if(typeof _0x5709a6==='string'&&typeof _0x16dfd5==='string')return _0x16dfd5['localeCompare'](_0x5709a6);return _0x5709a6>_0x16dfd5?-0x1:0x1;}});}['splice'](_0x3888e9,_0x30143c,_0x58e2c7,..._0x881dd8){return _0x3888e9['splice'](_0x30143c,_0x58e2c7,..._0x881dd8);}['unshift'](_0x4a8217,..._0x3edcc){return _0x4a8217['unshift'](..._0x3edcc);}}exports['ArrayHandler']=ArrayHandler;
1
+ 'use strict';function _0x43ba(_0x5996d2,_0x1abdc0){var _0x4c547d=_0x4c54();return _0x43ba=function(_0x43babc,_0x1fda55){_0x43babc=_0x43babc-0x101;var _0x20ae2a=_0x4c547d[_0x43babc];return _0x20ae2a;},_0x43ba(_0x5996d2,_0x1abdc0);}(function(_0x48f91f,_0x26e418){var _0x3754a=_0x43ba,_0x27ef11=_0x48f91f();while(!![]){try{var _0x291368=-parseInt(_0x3754a(0x106))/0x1*(parseInt(_0x3754a(0x109))/0x2)+parseInt(_0x3754a(0x105))/0x3*(-parseInt(_0x3754a(0x104))/0x4)+-parseInt(_0x3754a(0x108))/0x5*(parseInt(_0x3754a(0x10a))/0x6)+-parseInt(_0x3754a(0x103))/0x7+parseInt(_0x3754a(0x101))/0x8+-parseInt(_0x3754a(0x107))/0x9+parseInt(_0x3754a(0x102))/0xa;if(_0x291368===_0x26e418)break;else _0x27ef11['push'](_0x27ef11['shift']());}catch(_0x57f6bc){_0x27ef11['push'](_0x27ef11['shift']());}}}(_0x4c54,0xc4a6a));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['ArrayHandler']=void 0x0;class ArrayHandler{['get'](_0x40b5ef,_0x21aaa4){return _0x40b5ef?.[_0x21aaa4||0x0];}['length'](_0x4cf0ea){return _0x4cf0ea?.['length'];}['concat'](_0x195b62,_0xd94456){return _0x195b62['concat'](_0xd94456);}['indexOf'](_0x2f63ee,_0x23a911,_0x481e33){return _0x2f63ee['indexOf'](_0x23a911,_0x481e33);}['join'](_0x5d5c52,_0x1d451e){return _0x5d5c52['join'](_0x1d451e);}['lastIndexOf'](_0x399a54,_0x53f1f4,_0x2f1575){return _0x399a54['lastIndexOf'](_0x53f1f4,_0x2f1575);}['pop'](_0x17b7e8){return _0x17b7e8['pop']();}['push'](_0x239da3,..._0x2a9d15){return _0x239da3['push'](..._0x2a9d15),_0x239da3;}['reverse'](_0x455d10){return _0x455d10['reverse']();}['shift'](_0x556bc2){return _0x556bc2['shift']();}['slice'](_0x56107e,_0x5f0499,_0x28641f){return _0x56107e['slice'](_0x5f0499,_0x28641f);}['sort'](_0x236ae1,_0x184682='ASCENDING'){return _0x236ae1['sort']((_0x37dc3f,_0x5703c7)=>{if(_0x184682==='ASCENDING'){if(_0x37dc3f===_0x5703c7)return 0x0;if(_0x37dc3f===null||_0x37dc3f===undefined)return-0x1;if(_0x5703c7===null||_0x5703c7===undefined)return 0x1;if(typeof _0x37dc3f==='string'&&typeof _0x5703c7==='string')return _0x37dc3f['localeCompare'](_0x5703c7);return _0x37dc3f<_0x5703c7?-0x1:0x1;}else{if(_0x37dc3f===_0x5703c7)return 0x0;if(_0x37dc3f===null||_0x37dc3f===undefined)return 0x1;if(_0x5703c7===null||_0x5703c7===undefined)return-0x1;if(typeof _0x37dc3f==='string'&&typeof _0x5703c7==='string')return _0x5703c7['localeCompare'](_0x37dc3f);return _0x37dc3f>_0x5703c7?-0x1:0x1;}});}['splice'](_0x40cf0f,_0x58fd81,_0x1ffe0b,..._0x143a09){return _0x40cf0f['splice'](_0x58fd81,_0x1ffe0b,..._0x143a09);}['unshift'](_0x5e1f9a,..._0xf38c7d){return _0x5e1f9a['unshift'](..._0xf38c7d);}}function _0x4c54(){var _0x1ad652=['2150GdOuVC','6551919XsmXYS','7601830ElCLUQ','522vBoJEE','6RCuRQW','2732232zewQPS','55560620yTgRts','6235145OSrtoh','129476MuEdHy','129VqwgYW'];_0x4c54=function(){return _0x1ad652;};return _0x4c54();}exports['ArrayHandler']=ArrayHandler;
@@ -1 +1 @@
1
- 'use strict';(function(_0x4ae324,_0x1130a7){var _0xf51ff1=_0x4d38,_0x4ba7ed=_0x4ae324();while(!![]){try{var _0x2dd3c0=-parseInt(_0xf51ff1(0x18c))/0x1+-parseInt(_0xf51ff1(0x18d))/0x2+-parseInt(_0xf51ff1(0x186))/0x3*(parseInt(_0xf51ff1(0x188))/0x4)+-parseInt(_0xf51ff1(0x187))/0x5+parseInt(_0xf51ff1(0x18b))/0x6+parseInt(_0xf51ff1(0x189))/0x7+parseInt(_0xf51ff1(0x18a))/0x8;if(_0x2dd3c0===_0x1130a7)break;else _0x4ba7ed['push'](_0x4ba7ed['shift']());}catch(_0x10448e){_0x4ba7ed['push'](_0x4ba7ed['shift']());}}}(_0x4921,0x6cd5b));function _0x4921(){var _0x33b629=['2589882eoHZJK','534852TxgmbF','1160742oyAiJI','70377bbOBkh','2184935UJqtQN','12QRJXGW','5683692ezlxGx','6598168xTdnXs'];_0x4921=function(){return _0x33b629;};return _0x4921();}function _0x4d38(_0x4d333b,_0x367ccc){var _0x492106=_0x4921();return _0x4d38=function(_0x4d383e,_0xb52ba8){_0x4d383e=_0x4d383e-0x186;var _0x285cfc=_0x492106[_0x4d383e];return _0x285cfc;},_0x4d38(_0x4d333b,_0x367ccc);}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['BitwiseHandler']=void 0x0;class BitwiseHandler{['and'](_0x515343,_0x5e9a80){return _0x515343&_0x5e9a80;}['or'](_0x1383a6,_0x39cbaf){return _0x1383a6|_0x39cbaf;}['xor'](_0x5650f1,_0x5a6cf4){return _0x5650f1^_0x5a6cf4;}['leftShift'](_0x289b25,_0x1746d3){return _0x289b25<<_0x1746d3;}['rightShift'](_0x310487,_0x5ebbd0){return _0x310487>>_0x5ebbd0;}['unsignedRightShift'](_0x207836,_0x54e7b5){return _0x207836>>>_0x54e7b5;}}exports['BitwiseHandler']=BitwiseHandler;
1
+ 'use strict';(function(_0x38e97e,_0x38766c){var _0x847ef2=_0x268d,_0x294640=_0x38e97e();while(!![]){try{var _0x4ceae2=-parseInt(_0x847ef2(0xa2))/0x1*(-parseInt(_0x847ef2(0xa5))/0x2)+-parseInt(_0x847ef2(0xab))/0x3+-parseInt(_0x847ef2(0xa3))/0x4*(-parseInt(_0x847ef2(0xaa))/0x5)+-parseInt(_0x847ef2(0xa8))/0x6+-parseInt(_0x847ef2(0xa6))/0x7+parseInt(_0x847ef2(0xa7))/0x8*(parseInt(_0x847ef2(0xac))/0x9)+parseInt(_0x847ef2(0xa4))/0xa*(parseInt(_0x847ef2(0xa9))/0xb);if(_0x4ceae2===_0x38766c)break;else _0x294640['push'](_0x294640['shift']());}catch(_0x1c93a5){_0x294640['push'](_0x294640['shift']());}}}(_0x52d0,0x9ffc4));function _0x268d(_0x27795d,_0x4cf75b){var _0x52d0ab=_0x52d0();return _0x268d=function(_0x268d2a,_0x12b4a2){_0x268d2a=_0x268d2a-0xa2;var _0x2b0423=_0x52d0ab[_0x268d2a];return _0x2b0423;},_0x268d(_0x27795d,_0x4cf75b);}function _0x52d0(){var _0x4dbbc8=['9kyedLF','2XjZLGk','371956dImJkC','340UnRxAD','773382hGQIZR','8772925NWBTkl','1946664abNKkz','1086480ESKPQj','376079GpZshd','65LzfRFd','3895029zJdmkS'];_0x52d0=function(){return _0x4dbbc8;};return _0x52d0();}Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports['BitwiseHandler']=void 0x0;class BitwiseHandler{['and'](_0x2cd269,_0x28469e){return _0x2cd269&_0x28469e;}['or'](_0x520413,_0x2b0696){return _0x520413|_0x2b0696;}['xor'](_0x4c6803,_0x385b28){return _0x4c6803^_0x385b28;}['leftShift'](_0x2cf3b7,_0x3ca81d){return _0x2cf3b7<<_0x3ca81d;}['rightShift'](_0x649102,_0xa8fd01){return _0x649102>>_0xa8fd01;}['unsignedRightShift'](_0xe039c7,_0x2dfb6e){return _0xe039c7>>>_0x2dfb6e;}}exports['BitwiseHandler']=BitwiseHandler;