@hotmeshio/hotmesh 0.0.8 → 0.0.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 (355) hide show
  1. package/LICENSE +4 -7
  2. package/README.md +37 -46
  3. package/build/{esm/package.json → package.json} +4 -11
  4. package/build/{cjs/services → services}/durable/native.js +2 -2
  5. package/build/{esm/services → services}/durable/worker.d.ts +1 -3
  6. package/build/{cjs/services → services}/durable/worker.js +9 -32
  7. package/build/{cjs/services → services}/durable/workflow.js +6 -1
  8. package/build/{cjs/types → types}/durable.d.ts +4 -6
  9. package/package.json +4 -11
  10. package/services/durable/native.ts +2 -2
  11. package/services/durable/worker.ts +9 -9
  12. package/services/durable/workflow.ts +7 -1
  13. package/types/durable.ts +4 -4
  14. package/build/cjs/package.json +0 -82
  15. package/build/cjs/services/durable/worker.d.ts +0 -38
  16. package/build/esm/index.d.ts +0 -4
  17. package/build/esm/index.js +0 -3
  18. package/build/esm/modules/errors.d.ts +0 -28
  19. package/build/esm/modules/errors.js +0 -41
  20. package/build/esm/modules/key.d.ts +0 -75
  21. package/build/esm/modules/key.js +0 -111
  22. package/build/esm/modules/utils.d.ts +0 -34
  23. package/build/esm/modules/utils.js +0 -154
  24. package/build/esm/services/activities/activity.d.ts +0 -67
  25. package/build/esm/services/activities/activity.js +0 -486
  26. package/build/esm/services/activities/await.d.ts +0 -16
  27. package/build/esm/services/activities/await.js +0 -140
  28. package/build/esm/services/activities/cycle.d.ts +0 -19
  29. package/build/esm/services/activities/cycle.js +0 -74
  30. package/build/esm/services/activities/emit.d.ts +0 -9
  31. package/build/esm/services/activities/emit.js +0 -10
  32. package/build/esm/services/activities/index.d.ts +0 -17
  33. package/build/esm/services/activities/index.js +0 -16
  34. package/build/esm/services/activities/iterate.d.ts +0 -9
  35. package/build/esm/services/activities/iterate.js +0 -10
  36. package/build/esm/services/activities/trigger.d.ts +0 -22
  37. package/build/esm/services/activities/trigger.js +0 -158
  38. package/build/esm/services/activities/worker.d.ts +0 -11
  39. package/build/esm/services/activities/worker.js +0 -70
  40. package/build/esm/services/collator/index.d.ts +0 -73
  41. package/build/esm/services/collator/index.js +0 -221
  42. package/build/esm/services/compiler/deployer.d.ts +0 -36
  43. package/build/esm/services/compiler/deployer.js +0 -423
  44. package/build/esm/services/compiler/index.d.ts +0 -30
  45. package/build/esm/services/compiler/index.js +0 -82
  46. package/build/esm/services/compiler/validator.d.ts +0 -32
  47. package/build/esm/services/compiler/validator.js +0 -131
  48. package/build/esm/services/connector/clients/ioredis.d.ts +0 -13
  49. package/build/esm/services/connector/clients/ioredis.js +0 -47
  50. package/build/esm/services/connector/clients/redis.d.ts +0 -13
  51. package/build/esm/services/connector/clients/redis.js +0 -59
  52. package/build/esm/services/connector/index.d.ts +0 -5
  53. package/build/esm/services/connector/index.js +0 -27
  54. package/build/esm/services/dimension/index.d.ts +0 -29
  55. package/build/esm/services/dimension/index.js +0 -32
  56. package/build/esm/services/durable/asyncLocalStorage.d.ts +0 -3
  57. package/build/esm/services/durable/asyncLocalStorage.js +0 -2
  58. package/build/esm/services/durable/client.d.ts +0 -15
  59. package/build/esm/services/durable/client.js +0 -114
  60. package/build/esm/services/durable/connection.d.ts +0 -4
  61. package/build/esm/services/durable/connection.js +0 -47
  62. package/build/esm/services/durable/factory.d.ts +0 -3
  63. package/build/esm/services/durable/factory.js +0 -135
  64. package/build/esm/services/durable/handle.d.ts +0 -8
  65. package/build/esm/services/durable/handle.js +0 -34
  66. package/build/esm/services/durable/index.d.ts +0 -57
  67. package/build/esm/services/durable/index.js +0 -55
  68. package/build/esm/services/durable/native.d.ts +0 -4
  69. package/build/esm/services/durable/native.js +0 -43
  70. package/build/esm/services/durable/worker.js +0 -267
  71. package/build/esm/services/durable/workflow.d.ts +0 -6
  72. package/build/esm/services/durable/workflow.js +0 -132
  73. package/build/esm/services/engine/index.d.ts +0 -82
  74. package/build/esm/services/engine/index.js +0 -522
  75. package/build/esm/services/hotmesh/index.d.ts +0 -45
  76. package/build/esm/services/hotmesh/index.js +0 -131
  77. package/build/esm/services/logger/index.d.ts +0 -17
  78. package/build/esm/services/logger/index.js +0 -70
  79. package/build/esm/services/mapper/index.d.ts +0 -24
  80. package/build/esm/services/mapper/index.js +0 -72
  81. package/build/esm/services/pipe/functions/array.d.ts +0 -24
  82. package/build/esm/services/pipe/functions/array.js +0 -66
  83. package/build/esm/services/pipe/functions/bitwise.d.ts +0 -9
  84. package/build/esm/services/pipe/functions/bitwise.js +0 -21
  85. package/build/esm/services/pipe/functions/conditional.d.ts +0 -10
  86. package/build/esm/services/pipe/functions/conditional.js +0 -24
  87. package/build/esm/services/pipe/functions/date.d.ts +0 -57
  88. package/build/esm/services/pipe/functions/date.js +0 -164
  89. package/build/esm/services/pipe/functions/index.d.ts +0 -25
  90. package/build/esm/services/pipe/functions/index.js +0 -24
  91. package/build/esm/services/pipe/functions/json.d.ts +0 -5
  92. package/build/esm/services/pipe/functions/json.js +0 -9
  93. package/build/esm/services/pipe/functions/math.d.ts +0 -38
  94. package/build/esm/services/pipe/functions/math.js +0 -108
  95. package/build/esm/services/pipe/functions/number.d.ts +0 -25
  96. package/build/esm/services/pipe/functions/number.js +0 -130
  97. package/build/esm/services/pipe/functions/object.d.ts +0 -22
  98. package/build/esm/services/pipe/functions/object.js +0 -60
  99. package/build/esm/services/pipe/functions/string.d.ts +0 -23
  100. package/build/esm/services/pipe/functions/string.js +0 -66
  101. package/build/esm/services/pipe/functions/symbol.d.ts +0 -12
  102. package/build/esm/services/pipe/functions/symbol.js +0 -30
  103. package/build/esm/services/pipe/functions/unary.d.ts +0 -7
  104. package/build/esm/services/pipe/functions/unary.js +0 -15
  105. package/build/esm/services/pipe/index.d.ts +0 -30
  106. package/build/esm/services/pipe/index.js +0 -122
  107. package/build/esm/services/quorum/index.d.ts +0 -34
  108. package/build/esm/services/quorum/index.js +0 -144
  109. package/build/esm/services/reporter/index.d.ts +0 -47
  110. package/build/esm/services/reporter/index.js +0 -327
  111. package/build/esm/services/serializer/index.d.ts +0 -41
  112. package/build/esm/services/serializer/index.js +0 -251
  113. package/build/esm/services/signaler/store.d.ts +0 -15
  114. package/build/esm/services/signaler/store.js +0 -50
  115. package/build/esm/services/signaler/stream.d.ts +0 -43
  116. package/build/esm/services/signaler/stream.js +0 -314
  117. package/build/esm/services/store/cache.d.ts +0 -66
  118. package/build/esm/services/store/cache.js +0 -124
  119. package/build/esm/services/store/clients/ioredis.d.ts +0 -27
  120. package/build/esm/services/store/clients/ioredis.js +0 -93
  121. package/build/esm/services/store/clients/redis.d.ts +0 -29
  122. package/build/esm/services/store/clients/redis.js +0 -140
  123. package/build/esm/services/store/index.d.ts +0 -88
  124. package/build/esm/services/store/index.js +0 -623
  125. package/build/esm/services/stream/clients/ioredis.d.ts +0 -23
  126. package/build/esm/services/stream/clients/ioredis.js +0 -112
  127. package/build/esm/services/stream/clients/redis.d.ts +0 -23
  128. package/build/esm/services/stream/clients/redis.js +0 -116
  129. package/build/esm/services/stream/index.d.ts +0 -21
  130. package/build/esm/services/stream/index.js +0 -6
  131. package/build/esm/services/sub/clients/ioredis.d.ts +0 -20
  132. package/build/esm/services/sub/clients/ioredis.js +0 -69
  133. package/build/esm/services/sub/clients/redis.d.ts +0 -20
  134. package/build/esm/services/sub/clients/redis.js +0 -60
  135. package/build/esm/services/sub/index.d.ts +0 -18
  136. package/build/esm/services/sub/index.js +0 -6
  137. package/build/esm/services/task/index.d.ts +0 -18
  138. package/build/esm/services/task/index.js +0 -70
  139. package/build/esm/services/telemetry/index.d.ts +0 -49
  140. package/build/esm/services/telemetry/index.js +0 -217
  141. package/build/esm/services/worker/index.d.ts +0 -30
  142. package/build/esm/services/worker/index.js +0 -102
  143. package/build/esm/types/activity.d.ts +0 -92
  144. package/build/esm/types/activity.js +0 -1
  145. package/build/esm/types/app.d.ts +0 -16
  146. package/build/esm/types/app.js +0 -1
  147. package/build/esm/types/async.d.ts +0 -5
  148. package/build/esm/types/async.js +0 -1
  149. package/build/esm/types/cache.d.ts +0 -1
  150. package/build/esm/types/cache.js +0 -1
  151. package/build/esm/types/collator.d.ts +0 -8
  152. package/build/esm/types/collator.js +0 -8
  153. package/build/esm/types/durable.d.ts +0 -59
  154. package/build/esm/types/durable.js +0 -1
  155. package/build/esm/types/hook.d.ts +0 -31
  156. package/build/esm/types/hook.js +0 -6
  157. package/build/esm/types/hotmesh.d.ts +0 -82
  158. package/build/esm/types/hotmesh.js +0 -1
  159. package/build/esm/types/index.d.ts +0 -20
  160. package/build/esm/types/index.js +0 -5
  161. package/build/esm/types/ioredisclient.d.ts +0 -5
  162. package/build/esm/types/ioredisclient.js +0 -2
  163. package/build/esm/types/job.d.ts +0 -50
  164. package/build/esm/types/job.js +0 -1
  165. package/build/esm/types/logger.d.ts +0 -6
  166. package/build/esm/types/logger.js +0 -1
  167. package/build/esm/types/map.d.ts +0 -4
  168. package/build/esm/types/map.js +0 -1
  169. package/build/esm/types/pipe.d.ts +0 -4
  170. package/build/esm/types/pipe.js +0 -1
  171. package/build/esm/types/quorum.d.ts +0 -46
  172. package/build/esm/types/quorum.js +0 -1
  173. package/build/esm/types/redis.d.ts +0 -8
  174. package/build/esm/types/redis.js +0 -1
  175. package/build/esm/types/redisclient.d.ts +0 -25
  176. package/build/esm/types/redisclient.js +0 -1
  177. package/build/esm/types/serializer.d.ts +0 -33
  178. package/build/esm/types/serializer.js +0 -1
  179. package/build/esm/types/stats.d.ts +0 -83
  180. package/build/esm/types/stats.js +0 -1
  181. package/build/esm/types/stream.d.ts +0 -67
  182. package/build/esm/types/stream.js +0 -22
  183. package/build/esm/types/telemetry.d.ts +0 -1
  184. package/build/esm/types/telemetry.js +0 -1
  185. package/build/esm/types/transition.d.ts +0 -17
  186. package/build/esm/types/transition.js +0 -1
  187. package/tsconfig.cjs.json +0 -8
  188. package/tsconfig.esm.json +0 -9
  189. /package/build/{cjs/index.d.ts → index.d.ts} +0 -0
  190. /package/build/{cjs/index.js → index.js} +0 -0
  191. /package/build/{cjs/modules → modules}/errors.d.ts +0 -0
  192. /package/build/{cjs/modules → modules}/errors.js +0 -0
  193. /package/build/{cjs/modules → modules}/key.d.ts +0 -0
  194. /package/build/{cjs/modules → modules}/key.js +0 -0
  195. /package/build/{cjs/modules → modules}/utils.d.ts +0 -0
  196. /package/build/{cjs/modules → modules}/utils.js +0 -0
  197. /package/build/{cjs/services → services}/activities/activity.d.ts +0 -0
  198. /package/build/{cjs/services → services}/activities/activity.js +0 -0
  199. /package/build/{cjs/services → services}/activities/await.d.ts +0 -0
  200. /package/build/{cjs/services → services}/activities/await.js +0 -0
  201. /package/build/{cjs/services → services}/activities/cycle.d.ts +0 -0
  202. /package/build/{cjs/services → services}/activities/cycle.js +0 -0
  203. /package/build/{cjs/services → services}/activities/emit.d.ts +0 -0
  204. /package/build/{cjs/services → services}/activities/emit.js +0 -0
  205. /package/build/{cjs/services → services}/activities/index.d.ts +0 -0
  206. /package/build/{cjs/services → services}/activities/index.js +0 -0
  207. /package/build/{cjs/services → services}/activities/iterate.d.ts +0 -0
  208. /package/build/{cjs/services → services}/activities/iterate.js +0 -0
  209. /package/build/{cjs/services → services}/activities/trigger.d.ts +0 -0
  210. /package/build/{cjs/services → services}/activities/trigger.js +0 -0
  211. /package/build/{cjs/services → services}/activities/worker.d.ts +0 -0
  212. /package/build/{cjs/services → services}/activities/worker.js +0 -0
  213. /package/build/{cjs/services → services}/collator/index.d.ts +0 -0
  214. /package/build/{cjs/services → services}/collator/index.js +0 -0
  215. /package/build/{cjs/services → services}/compiler/deployer.d.ts +0 -0
  216. /package/build/{cjs/services → services}/compiler/deployer.js +0 -0
  217. /package/build/{cjs/services → services}/compiler/index.d.ts +0 -0
  218. /package/build/{cjs/services → services}/compiler/index.js +0 -0
  219. /package/build/{cjs/services → services}/compiler/validator.d.ts +0 -0
  220. /package/build/{cjs/services → services}/compiler/validator.js +0 -0
  221. /package/build/{cjs/services → services}/connector/clients/ioredis.d.ts +0 -0
  222. /package/build/{cjs/services → services}/connector/clients/ioredis.js +0 -0
  223. /package/build/{cjs/services → services}/connector/clients/redis.d.ts +0 -0
  224. /package/build/{cjs/services → services}/connector/clients/redis.js +0 -0
  225. /package/build/{cjs/services → services}/connector/index.d.ts +0 -0
  226. /package/build/{cjs/services → services}/connector/index.js +0 -0
  227. /package/build/{cjs/services → services}/dimension/index.d.ts +0 -0
  228. /package/build/{cjs/services → services}/dimension/index.js +0 -0
  229. /package/build/{cjs/services → services}/durable/asyncLocalStorage.d.ts +0 -0
  230. /package/build/{cjs/services → services}/durable/asyncLocalStorage.js +0 -0
  231. /package/build/{cjs/services → services}/durable/client.d.ts +0 -0
  232. /package/build/{cjs/services → services}/durable/client.js +0 -0
  233. /package/build/{cjs/services → services}/durable/connection.d.ts +0 -0
  234. /package/build/{cjs/services → services}/durable/connection.js +0 -0
  235. /package/build/{cjs/services → services}/durable/factory.d.ts +0 -0
  236. /package/build/{cjs/services → services}/durable/factory.js +0 -0
  237. /package/build/{cjs/services → services}/durable/handle.d.ts +0 -0
  238. /package/build/{cjs/services → services}/durable/handle.js +0 -0
  239. /package/build/{cjs/services → services}/durable/index.d.ts +0 -0
  240. /package/build/{cjs/services → services}/durable/index.js +0 -0
  241. /package/build/{cjs/services → services}/durable/native.d.ts +0 -0
  242. /package/build/{cjs/services → services}/durable/workflow.d.ts +0 -0
  243. /package/build/{cjs/services → services}/engine/index.d.ts +0 -0
  244. /package/build/{cjs/services → services}/engine/index.js +0 -0
  245. /package/build/{cjs/services → services}/hotmesh/index.d.ts +0 -0
  246. /package/build/{cjs/services → services}/hotmesh/index.js +0 -0
  247. /package/build/{cjs/services → services}/logger/index.d.ts +0 -0
  248. /package/build/{cjs/services → services}/logger/index.js +0 -0
  249. /package/build/{cjs/services → services}/mapper/index.d.ts +0 -0
  250. /package/build/{cjs/services → services}/mapper/index.js +0 -0
  251. /package/build/{cjs/services → services}/pipe/functions/array.d.ts +0 -0
  252. /package/build/{cjs/services → services}/pipe/functions/array.js +0 -0
  253. /package/build/{cjs/services → services}/pipe/functions/bitwise.d.ts +0 -0
  254. /package/build/{cjs/services → services}/pipe/functions/bitwise.js +0 -0
  255. /package/build/{cjs/services → services}/pipe/functions/conditional.d.ts +0 -0
  256. /package/build/{cjs/services → services}/pipe/functions/conditional.js +0 -0
  257. /package/build/{cjs/services → services}/pipe/functions/date.d.ts +0 -0
  258. /package/build/{cjs/services → services}/pipe/functions/date.js +0 -0
  259. /package/build/{cjs/services → services}/pipe/functions/index.d.ts +0 -0
  260. /package/build/{cjs/services → services}/pipe/functions/index.js +0 -0
  261. /package/build/{cjs/services → services}/pipe/functions/json.d.ts +0 -0
  262. /package/build/{cjs/services → services}/pipe/functions/json.js +0 -0
  263. /package/build/{cjs/services → services}/pipe/functions/math.d.ts +0 -0
  264. /package/build/{cjs/services → services}/pipe/functions/math.js +0 -0
  265. /package/build/{cjs/services → services}/pipe/functions/number.d.ts +0 -0
  266. /package/build/{cjs/services → services}/pipe/functions/number.js +0 -0
  267. /package/build/{cjs/services → services}/pipe/functions/object.d.ts +0 -0
  268. /package/build/{cjs/services → services}/pipe/functions/object.js +0 -0
  269. /package/build/{cjs/services → services}/pipe/functions/string.d.ts +0 -0
  270. /package/build/{cjs/services → services}/pipe/functions/string.js +0 -0
  271. /package/build/{cjs/services → services}/pipe/functions/symbol.d.ts +0 -0
  272. /package/build/{cjs/services → services}/pipe/functions/symbol.js +0 -0
  273. /package/build/{cjs/services → services}/pipe/functions/unary.d.ts +0 -0
  274. /package/build/{cjs/services → services}/pipe/functions/unary.js +0 -0
  275. /package/build/{cjs/services → services}/pipe/index.d.ts +0 -0
  276. /package/build/{cjs/services → services}/pipe/index.js +0 -0
  277. /package/build/{cjs/services → services}/quorum/index.d.ts +0 -0
  278. /package/build/{cjs/services → services}/quorum/index.js +0 -0
  279. /package/build/{cjs/services → services}/reporter/index.d.ts +0 -0
  280. /package/build/{cjs/services → services}/reporter/index.js +0 -0
  281. /package/build/{cjs/services → services}/serializer/index.d.ts +0 -0
  282. /package/build/{cjs/services → services}/serializer/index.js +0 -0
  283. /package/build/{cjs/services → services}/signaler/store.d.ts +0 -0
  284. /package/build/{cjs/services → services}/signaler/store.js +0 -0
  285. /package/build/{cjs/services → services}/signaler/stream.d.ts +0 -0
  286. /package/build/{cjs/services → services}/signaler/stream.js +0 -0
  287. /package/build/{cjs/services → services}/store/cache.d.ts +0 -0
  288. /package/build/{cjs/services → services}/store/cache.js +0 -0
  289. /package/build/{cjs/services → services}/store/clients/ioredis.d.ts +0 -0
  290. /package/build/{cjs/services → services}/store/clients/ioredis.js +0 -0
  291. /package/build/{cjs/services → services}/store/clients/redis.d.ts +0 -0
  292. /package/build/{cjs/services → services}/store/clients/redis.js +0 -0
  293. /package/build/{cjs/services → services}/store/index.d.ts +0 -0
  294. /package/build/{cjs/services → services}/store/index.js +0 -0
  295. /package/build/{cjs/services → services}/stream/clients/ioredis.d.ts +0 -0
  296. /package/build/{cjs/services → services}/stream/clients/ioredis.js +0 -0
  297. /package/build/{cjs/services → services}/stream/clients/redis.d.ts +0 -0
  298. /package/build/{cjs/services → services}/stream/clients/redis.js +0 -0
  299. /package/build/{cjs/services → services}/stream/index.d.ts +0 -0
  300. /package/build/{cjs/services → services}/stream/index.js +0 -0
  301. /package/build/{cjs/services → services}/sub/clients/ioredis.d.ts +0 -0
  302. /package/build/{cjs/services → services}/sub/clients/ioredis.js +0 -0
  303. /package/build/{cjs/services → services}/sub/clients/redis.d.ts +0 -0
  304. /package/build/{cjs/services → services}/sub/clients/redis.js +0 -0
  305. /package/build/{cjs/services → services}/sub/index.d.ts +0 -0
  306. /package/build/{cjs/services → services}/sub/index.js +0 -0
  307. /package/build/{cjs/services → services}/task/index.d.ts +0 -0
  308. /package/build/{cjs/services → services}/task/index.js +0 -0
  309. /package/build/{cjs/services → services}/telemetry/index.d.ts +0 -0
  310. /package/build/{cjs/services → services}/telemetry/index.js +0 -0
  311. /package/build/{cjs/services → services}/worker/index.d.ts +0 -0
  312. /package/build/{cjs/services → services}/worker/index.js +0 -0
  313. /package/build/{cjs/types → types}/activity.d.ts +0 -0
  314. /package/build/{cjs/types → types}/activity.js +0 -0
  315. /package/build/{cjs/types → types}/app.d.ts +0 -0
  316. /package/build/{cjs/types → types}/app.js +0 -0
  317. /package/build/{cjs/types → types}/async.d.ts +0 -0
  318. /package/build/{cjs/types → types}/async.js +0 -0
  319. /package/build/{cjs/types → types}/cache.d.ts +0 -0
  320. /package/build/{cjs/types → types}/cache.js +0 -0
  321. /package/build/{cjs/types → types}/collator.d.ts +0 -0
  322. /package/build/{cjs/types → types}/collator.js +0 -0
  323. /package/build/{cjs/types → types}/durable.js +0 -0
  324. /package/build/{cjs/types → types}/hook.d.ts +0 -0
  325. /package/build/{cjs/types → types}/hook.js +0 -0
  326. /package/build/{cjs/types → types}/hotmesh.d.ts +0 -0
  327. /package/build/{cjs/types → types}/hotmesh.js +0 -0
  328. /package/build/{cjs/types → types}/index.d.ts +0 -0
  329. /package/build/{cjs/types → types}/index.js +0 -0
  330. /package/build/{cjs/types → types}/ioredisclient.d.ts +0 -0
  331. /package/build/{cjs/types → types}/ioredisclient.js +0 -0
  332. /package/build/{cjs/types → types}/job.d.ts +0 -0
  333. /package/build/{cjs/types → types}/job.js +0 -0
  334. /package/build/{cjs/types → types}/logger.d.ts +0 -0
  335. /package/build/{cjs/types → types}/logger.js +0 -0
  336. /package/build/{cjs/types → types}/map.d.ts +0 -0
  337. /package/build/{cjs/types → types}/map.js +0 -0
  338. /package/build/{cjs/types → types}/pipe.d.ts +0 -0
  339. /package/build/{cjs/types → types}/pipe.js +0 -0
  340. /package/build/{cjs/types → types}/quorum.d.ts +0 -0
  341. /package/build/{cjs/types → types}/quorum.js +0 -0
  342. /package/build/{cjs/types → types}/redis.d.ts +0 -0
  343. /package/build/{cjs/types → types}/redis.js +0 -0
  344. /package/build/{cjs/types → types}/redisclient.d.ts +0 -0
  345. /package/build/{cjs/types → types}/redisclient.js +0 -0
  346. /package/build/{cjs/types → types}/serializer.d.ts +0 -0
  347. /package/build/{cjs/types → types}/serializer.js +0 -0
  348. /package/build/{cjs/types → types}/stats.d.ts +0 -0
  349. /package/build/{cjs/types → types}/stats.js +0 -0
  350. /package/build/{cjs/types → types}/stream.d.ts +0 -0
  351. /package/build/{cjs/types → types}/stream.js +0 -0
  352. /package/build/{cjs/types → types}/telemetry.d.ts +0 -0
  353. /package/build/{cjs/types → types}/telemetry.js +0 -0
  354. /package/build/{cjs/types → types}/transition.d.ts +0 -0
  355. /package/build/{cjs/types → types}/transition.js +0 -0
package/LICENSE CHANGED
@@ -178,13 +178,10 @@ Terms and Conditions for Use, Reproduction, and Distribution
178
178
  product that includes the Work or any part of it, as a commercial
179
179
  service to third parties, or in any other commercial context where
180
180
  you derive direct or indirect financial benefit from the use of the
181
- Work. This includes, but is not limited to, providing
182
- routing-as-a-service, bpm-as-a-service, workflow-as-a-service,
183
- integration-as-a-service, operational-data-as-a-service
184
- or any other similar service that would compete with
185
- HotMesh's commercial offering of workflow and routing services.
186
- Any such use requires explicit written permission from the
187
- Licensor.
181
+ Work in a manner that would compete with the Licensor's commercial
182
+ service-mesh-as-a-service, bpm-as-a-service, workflow-as-a-service,
183
+ integration-as-a-service or similar orchestration-type service.
184
+ Any such use requires explicit written permission from the Licensor.
188
185
 
189
186
  END OF TERMS AND CONDITIONS
190
187
 
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # HotMesh
2
2
  ![alpha release](https://img.shields.io/badge/release-alpha-yellow)
3
3
 
4
- Build sophisticated, durable workflows without the overhead of a dedicated server cluster. With HotMesh, your code remains front and center using [infrastructure](https://github.com/hotmeshio/sdk-typescript/blob/main/docs/faq.md#what-is-hotmesh) you already own.
4
+ Elevate Redis from an in-memory data store to a game-changing **service mesh**, delivering *durable* workflows without the overhead of a dedicated control plane. With HotMesh, you can keep your code at the forefront, utilizing [Redis infrastructure](https://github.com/hotmeshio/sdk-typescript/blob/main/docs/faq.md#what-is-hotmesh) you already trust and own.
5
5
 
6
6
  ## Install
7
7
  [![npm version](https://badge.fury.io/js/%40hotmeshio%2Fhotmesh.svg)](https://badge.fury.io/js/%40hotmeshio%2Fhotmesh)
@@ -11,7 +11,9 @@ npm install @hotmeshio/hotmesh
11
11
  ```
12
12
 
13
13
  ## Design
14
- HotMesh's TypeScript SDK is modeled after [Temporal IO's](https://github.com/temporalio) developer-friendly approach. Design and deploy durable workflows using familiar paradigms that keep your code delightful to maintain. Deploying Temporal's [hello-world tutorial](https://github.com/temporalio/samples-typescript/tree/main/hello-world/src), for example, requires few changes beyond using the HotMesh SDK and saving to Redis.
14
+ HotMesh's TypeScript SDK is modeled after Temporal IO's developer-friendly approach. Design and deploy durable workflows using your preferred coding style. Write your functions as you normally would, then use the HotMesh to make them durable. Temporal's [hello-world tutorial](https://github.com/temporalio/samples-typescript/tree/main/hello-world/src), for example, requires few changes beyond importing the HotMesh SDK.
15
+
16
+ >Start by defining activities. These are the functions that will be invoked by your workflow. They can be written in any style, using any framework, and can even be legacy functions you've already written. The only requirement is that they return a Promise.
15
17
 
16
18
  **./activities.ts**
17
19
  ```javascript
@@ -20,85 +22,74 @@ export async function greet(name: string): Promise<string> {
20
22
  }
21
23
  ```
22
24
 
25
+ >Next, define your workflow. Include conditional logic, loops, etc. It's vanilla code written in your own coding style--just make sure to call `proxyActivities` to run your activities durably.
26
+
23
27
  **./workflows.ts**
24
28
  ```javascript
25
29
  import { Durable } from '@hotmeshio/hotmesh';
26
- import type * as activities from './activities';
30
+ import * as activities from './activities';
27
31
 
28
- const { greet } = Durable.workflow.proxyActivities<typeof activities>();
32
+ const { greet } = Durable.workflow
33
+ .proxyActivities<typeof activities>({
34
+ activities
35
+ });
29
36
 
30
37
  export async function example(name: string): Promise<string> {
31
38
  return await greet(name);
32
39
  }
33
40
  ```
34
41
 
35
- **./worker.ts**
36
- ```javascript
37
- import { Durable } from '@hotmeshio/hotmesh';
38
- import Redis from 'ioredis'; //OR `import * as Redis from 'redis';`
39
- import * as activities from './activities';
40
-
41
- async function run() {
42
- const connection = await Durable.NativeConnection.connect({
43
- class: Redis,
44
- options: {
45
- host: 'localhost',
46
- port: 6379,
47
- },
48
- });
49
- const worker = await Durable.Worker.create({
50
- connection,
51
- namespace: 'default',
52
- taskQueue: 'hello-world',
53
- workflowsPath: require.resolve('./workflows'),
54
- activities,
55
- });
56
- await worker.run();
57
- }
58
-
59
- run().catch((err) => {
60
- console.error(err);
61
- process.exit(1);
62
- });
63
- ```
42
+ >Finally, create a worker and client. The *client* triggers workflows, while the *worker* runs them, retrying as necessary until the workflow succeeds--all without the need for complicated retry logic.
64
43
 
65
44
  **./client.ts**
66
45
  ```javascript
67
46
  import { Durable } from '@hotmeshio/hotmesh';
68
- import Redis from 'ioredis';
47
+ import Redis from 'ioredis'; //OR `import * as Redis from 'redis';`
69
48
  import { v4 as uuidv4 } from 'uuid';
70
49
 
71
50
  async function run() {
72
51
  const connection = await Durable.Connection.connect({
73
52
  class: Redis,
74
- options: {
75
- host: 'localhost',
76
- port: 6379,
77
- },
53
+ options: { host: 'localhost', port: 6379 }
78
54
  });
79
55
 
80
56
  const client = new Durable.Client({
81
- connection,
57
+ connection
82
58
  });
83
59
 
84
60
  const handle = await client.workflow.start({
85
61
  args: ['HotMesh'],
86
62
  taskQueue: 'hello-world',
87
63
  workflowName: 'example',
88
- workflowId: 'workflow-' + uuidv4(),
64
+ workflowId: 'workflow-' + uuidv4()
89
65
  });
90
66
 
91
- console.log(`Started workflow ${handle.workflowId}`);
92
67
  console.log(await handle.result());
93
68
  }
69
+ ```
94
70
 
95
- run().catch((err) => {
96
- console.error(err);
97
- process.exit(1);
98
- });
71
+ **./worker.ts**
72
+ ```javascript
73
+ import { Durable } from '@hotmeshio/hotmesh';
74
+ import Redis from 'ioredis';
75
+ import * as workflows from './workflows';
76
+
77
+ async function run() {
78
+ const connection = await Durable.NativeConnection.connect({
79
+ class: Redis,
80
+ options: { host: 'localhost', port: 6379 },
81
+ });
82
+ const worker = await Durable.Worker.create({
83
+ connection,
84
+ namespace: 'default',
85
+ taskQueue: 'hello-world',
86
+ workflow: workflows.example,
87
+ });
88
+ await worker.run();
89
+ }
99
90
  ```
100
91
 
101
- >HotMesh delivers durable function execution using a [distributed service mesh](https://github.com/hotmeshio/sdk-typescript/blob/main/docs/distributed_orchestration.md). The design consumes leftover CPU on your microservices to execute workflows without the cost and complexity of a central server/control plane.
92
+ >HotMesh delivers durable function execution using a [distributed service mesh](https://github.com/hotmeshio/sdk-typescript/blob/main/docs/distributed_orchestration.md). The design delivers durable workflows without the cost and complexity of a centralized service mesh/control plane. Refer to the [hotmeshio/samples-typescript](https://github.com/hotmeshio/samples-typescript) Git Repo for a range of examples, including nested workflows.
102
93
 
103
94
  ## Advanced Design
104
95
  HotMesh's TypeScript SDK is the easiest way to make your functions durable. But if you need full control over your function lifecycles (including high-volume, high-speed use cases), you can use HotMesh's underlying YAML models to optimize your durable workflows. The following model depicts a sequence of activities orchestrated by HotMesh. Any function you associate with a `topic` in your YAML definition is guaranteed to be durable.
@@ -1,14 +1,9 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Durable Workflows",
5
- "main": "build/cjs/index.js",
6
- "module": "build/esm/index.js",
7
- "types": "build/cjs/index.d.ts",
8
- "exports": {
9
- "import": "./build/esm/index.js",
10
- "require": "./build/cjs/index.js"
11
- },
5
+ "main": "build/index.js",
6
+ "types": "build/index.d.ts",
12
7
  "repository": {
13
8
  "type": "git",
14
9
  "url": "https://github.com/hotmeshio/sdk-typescript.git"
@@ -19,9 +14,7 @@
19
14
  },
20
15
  "scripts": {
21
16
  "clean": "rimraf ./build",
22
- "build:cjs": "tsc --build tsconfig.cjs.json",
23
- "build:esm": "tsc --build tsconfig.esm.json",
24
- "build": "npm run build:cjs && npm run build:esm",
17
+ "build": "tsc --build tsconfig.json",
25
18
  "clean-build": "npm run clean && npm run build",
26
19
  "lint": "eslint . --ext .ts",
27
20
  "lint:fix": "eslint . --fix --ext .ts",
@@ -10,7 +10,7 @@ Here is an example of how the methods in this file are used:
10
10
  import { Durable: { NativeConnection, Worker } } from '@hotmeshio/hotmesh';
11
11
  import Redis from 'ioredis'; //OR `import * as Redis from 'redis';`
12
12
 
13
- import * as activities from './activities';
13
+ import * as workflows from './workflows';
14
14
 
15
15
  async function run() {
16
16
  const connection = await NativeConnection.connect({
@@ -24,7 +24,7 @@ async function run() {
24
24
  connection,
25
25
  namespace: 'default',
26
26
  taskQueue: 'hello-world',
27
- workflowsPath: require.resolve('./workflows'),
27
+ workflow: workflows.example,
28
28
  activities,
29
29
  });
30
30
  await worker.run();
@@ -13,9 +13,7 @@ export declare class WorkerService {
13
13
  * dynamically importing the user's workflow module. That file
14
14
  * contains a call, `proxyActivities`, which needs this info.
15
15
  *
16
- * NOTE: The `worker` and `client` both call `proxyActivities`,
17
- * as a natural result of importing worflows.ts. However,
18
- * because the worker imports the workflows dynamically AFTER
16
+ * NOTE: Because the worker imports the workflows dynamically AFTER
19
17
  * the activities are loaded, there will be items in the registry,
20
18
  * allowing proxyActivities to succeed.
21
19
  */
@@ -1,27 +1,4 @@
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
  var _a;
26
3
  Object.defineProperty(exports, "__esModule", { value: true });
27
4
  exports.WorkerService = void 0;
@@ -37,7 +14,7 @@ Here is an example of how the methods in this file are used:
37
14
  import { Durable: { NativeConnection, Worker } } from '@hotmeshio/hotmesh';
38
15
  import Redis from 'ioredis'; //OR `import * as Redis from 'redis';`
39
16
 
40
- import * as activities from './activities';
17
+ import * as workflows from './workflows';
41
18
 
42
19
  async function run() {
43
20
  const connection = await NativeConnection.connect({
@@ -51,7 +28,7 @@ async function run() {
51
28
  connection,
52
29
  namespace: 'default',
53
30
  taskQueue: 'hello-world',
54
- workflowsPath: require.resolve('./workflows'),
31
+ workflow: workflows.example,
55
32
  activities,
56
33
  });
57
34
  await worker.run();
@@ -92,19 +69,19 @@ class WorkerService {
92
69
  * dynamically importing the user's workflow module. That file
93
70
  * contains a call, `proxyActivities`, which needs this info.
94
71
  *
95
- * NOTE: The `worker` and `client` both call `proxyActivities`,
96
- * as a natural result of importing worflows.ts. However,
97
- * because the worker imports the workflows dynamically AFTER
72
+ * NOTE: Because the worker imports the workflows dynamically AFTER
98
73
  * the activities are loaded, there will be items in the registry,
99
74
  * allowing proxyActivities to succeed.
100
75
  */
101
76
  static registerActivities(activities) {
102
- if (typeof activities === 'function') {
77
+ if (typeof activities === 'function' && typeof WorkerService.activityRegistry[activities.name] !== 'function') {
103
78
  WorkerService.activityRegistry[activities.name] = activities;
104
79
  }
105
80
  else {
106
81
  Object.keys(activities).forEach(key => {
107
- WorkerService.activityRegistry[activities[key].name] = activities[key];
82
+ if (activities[key].name && typeof WorkerService.activityRegistry[activities[key].name] !== 'function') {
83
+ WorkerService.activityRegistry[activities[key].name] = activities[key];
84
+ }
108
85
  });
109
86
  }
110
87
  return WorkerService.activityRegistry;
@@ -112,8 +89,8 @@ class WorkerService {
112
89
  static async create(config) {
113
90
  //always call `registerActivities` before `import`
114
91
  WorkerService.connection = config.connection;
115
- WorkerService.registerActivities(config.activities);
116
- const workflow = await Promise.resolve(`${config.workflowsPath}`).then(s => __importStar(require(s)));
92
+ //user can provide the workflow file directly
93
+ const workflow = config.workflow;
117
94
  const [workflowFunctionName, workflowFunction] = WorkerService.resolveWorkflowTarget(workflow);
118
95
  const baseTopic = `${config.taskQueue}-${workflowFunctionName}`;
119
96
  const activityTopic = `${baseTopic}-activity`;
@@ -33,8 +33,10 @@ Here is an example of how the methods in this file are used:
33
33
  ./workflows.ts
34
34
 
35
35
  import { Durable } from '@hotmeshio/hotmesh';
36
- import type * as activities from './activities';
36
+ import * as activities from './activities';
37
+
37
38
  const { greet } = Durable.workflow.proxyActivities<typeof activities>({
39
+ activities: activities,
38
40
  startToCloseTimeout: '1 minute',
39
41
  retryPolicy: {
40
42
  initialInterval: '5 seconds', // Initial delay between retries
@@ -71,6 +73,9 @@ class WorkflowService {
71
73
  return result;
72
74
  }
73
75
  static proxyActivities(options) {
76
+ if (options.activities) {
77
+ worker_1.WorkerService.registerActivities(options.activities);
78
+ }
74
79
  const proxy = {};
75
80
  const keys = Object.keys(worker_1.WorkerService.activityRegistry);
76
81
  if (keys.length) {
@@ -34,10 +34,7 @@ type WorkerConfig = {
34
34
  connection: Connection;
35
35
  namespace: string;
36
36
  taskQueue: string;
37
- workflowsPath: string;
38
- activities: {
39
- [key: string]: Function;
40
- };
37
+ workflow: Function;
41
38
  };
42
39
  type ContextType = {
43
40
  workflowId: string;
@@ -48,8 +45,9 @@ type ProxyType<ACT> = {
48
45
  [K in keyof ACT]: FunctionSignature<ACT[K]>;
49
46
  };
50
47
  type ActivityConfig = {
51
- startToCloseTimeout: string;
52
- retryPolicy: {
48
+ startToCloseTimeout?: string;
49
+ activities?: any;
50
+ retryPolicy?: {
53
51
  initialInterval: string;
54
52
  maximumAttempts: number;
55
53
  backoffCoefficient: number;
package/package.json CHANGED
@@ -1,14 +1,9 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Durable Workflows",
5
- "main": "build/cjs/index.js",
6
- "module": "build/esm/index.js",
7
- "types": "build/cjs/index.d.ts",
8
- "exports": {
9
- "import": "./build/esm/index.js",
10
- "require": "./build/cjs/index.js"
11
- },
5
+ "main": "build/index.js",
6
+ "types": "build/index.d.ts",
12
7
  "repository": {
13
8
  "type": "git",
14
9
  "url": "https://github.com/hotmeshio/sdk-typescript.git"
@@ -19,9 +14,7 @@
19
14
  },
20
15
  "scripts": {
21
16
  "clean": "rimraf ./build",
22
- "build:cjs": "tsc --build tsconfig.cjs.json",
23
- "build:esm": "tsc --build tsconfig.esm.json",
24
- "build": "npm run build:cjs && npm run build:esm",
17
+ "build": "tsc --build tsconfig.json",
25
18
  "clean-build": "npm run clean && npm run build",
26
19
  "lint": "eslint . --ext .ts",
27
20
  "lint:fix": "eslint . --fix --ext .ts",
@@ -9,7 +9,7 @@ Here is an example of how the methods in this file are used:
9
9
  import { Durable: { NativeConnection, Worker } } from '@hotmeshio/hotmesh';
10
10
  import Redis from 'ioredis'; //OR `import * as Redis from 'redis';`
11
11
 
12
- import * as activities from './activities';
12
+ import * as workflows from './workflows';
13
13
 
14
14
  async function run() {
15
15
  const connection = await NativeConnection.connect({
@@ -23,7 +23,7 @@ async function run() {
23
23
  connection,
24
24
  namespace: 'default',
25
25
  taskQueue: 'hello-world',
26
- workflowsPath: require.resolve('./workflows'),
26
+ workflow: workflows.example,
27
27
  activities,
28
28
  });
29
29
  await worker.run();
@@ -13,7 +13,7 @@ Here is an example of how the methods in this file are used:
13
13
  import { Durable: { NativeConnection, Worker } } from '@hotmeshio/hotmesh';
14
14
  import Redis from 'ioredis'; //OR `import * as Redis from 'redis';`
15
15
 
16
- import * as activities from './activities';
16
+ import * as workflows from './workflows';
17
17
 
18
18
  async function run() {
19
19
  const connection = await NativeConnection.connect({
@@ -27,7 +27,7 @@ async function run() {
27
27
  connection,
28
28
  namespace: 'default',
29
29
  taskQueue: 'hello-world',
30
- workflowsPath: require.resolve('./workflows'),
30
+ workflow: workflows.example,
31
31
  activities,
32
32
  });
33
33
  await worker.run();
@@ -86,18 +86,18 @@ export class WorkerService {
86
86
  * dynamically importing the user's workflow module. That file
87
87
  * contains a call, `proxyActivities`, which needs this info.
88
88
  *
89
- * NOTE: The `worker` and `client` both call `proxyActivities`,
90
- * as a natural result of importing worflows.ts. However,
91
- * because the worker imports the workflows dynamically AFTER
89
+ * NOTE: Because the worker imports the workflows dynamically AFTER
92
90
  * the activities are loaded, there will be items in the registry,
93
91
  * allowing proxyActivities to succeed.
94
92
  */
95
93
  static registerActivities<ACT>(activities: ACT): Registry {
96
- if (typeof activities === 'function') {
94
+ if (typeof activities === 'function' && typeof WorkerService.activityRegistry[activities.name] !== 'function') {
97
95
  WorkerService.activityRegistry[activities.name] = activities as Function;
98
96
  } else {
99
97
  Object.keys(activities).forEach(key => {
100
- WorkerService.activityRegistry[activities[key].name] = (activities as any)[key] as Function;
98
+ if (activities[key].name && typeof WorkerService.activityRegistry[activities[key].name] !== 'function') {
99
+ WorkerService.activityRegistry[activities[key].name] = (activities as any)[key] as Function;
100
+ }
101
101
  });
102
102
  }
103
103
  return WorkerService.activityRegistry;
@@ -106,8 +106,8 @@ export class WorkerService {
106
106
  static async create(config: WorkerConfig) {
107
107
  //always call `registerActivities` before `import`
108
108
  WorkerService.connection = config.connection;
109
- WorkerService.registerActivities<typeof config.activities>(config.activities);
110
- const workflow = await import(config.workflowsPath);
109
+ //user can provide the workflow file directly
110
+ const workflow = config.workflow;
111
111
  const [workflowFunctionName, workflowFunction] = WorkerService.resolveWorkflowTarget(workflow);
112
112
  const baseTopic = `${config.taskQueue}-${workflowFunctionName}`;
113
113
  const activityTopic = `${baseTopic}-activity`;
@@ -31,8 +31,10 @@ Here is an example of how the methods in this file are used:
31
31
  ./workflows.ts
32
32
 
33
33
  import { Durable } from '@hotmeshio/hotmesh';
34
- import type * as activities from './activities';
34
+ import * as activities from './activities';
35
+
35
36
  const { greet } = Durable.workflow.proxyActivities<typeof activities>({
37
+ activities: activities,
36
38
  startToCloseTimeout: '1 minute',
37
39
  retryPolicy: {
38
40
  initialInterval: '5 seconds', // Initial delay between retries
@@ -72,6 +74,10 @@ export class WorkflowService {
72
74
  }
73
75
 
74
76
  static proxyActivities<ACT>(options?: ActivityConfig): ProxyType<ACT> {
77
+ if (options.activities) {
78
+ WorkerService.registerActivities(options.activities)
79
+ }
80
+
75
81
  const proxy: any = {};
76
82
  const keys = Object.keys(WorkerService.activityRegistry);
77
83
  if (keys.length) {
package/types/durable.ts CHANGED
@@ -41,8 +41,7 @@ type WorkerConfig = {
41
41
  connection: Connection;
42
42
  namespace: string; //`appid` in the YAML (e.g, 'default')
43
43
  taskQueue: string; //`subscribes` in the YAML (e.g, 'hello-world')
44
- workflowsPath: string; //resolved abs path to dyn import()
45
- activities: { [key: string]: Function }; //vanilla activity exports
44
+ workflow: Function //target function to run
46
45
  }
47
46
 
48
47
  type ContextType = {
@@ -56,8 +55,9 @@ type ProxyType<ACT> = {
56
55
  };
57
56
 
58
57
  type ActivityConfig = {
59
- startToCloseTimeout: string;
60
- retryPolicy: {
58
+ startToCloseTimeout?: string;
59
+ activities?: any;
60
+ retryPolicy?: {
61
61
  initialInterval: string;
62
62
  maximumAttempts: number;
63
63
  backoffCoefficient: number;
@@ -1,82 +0,0 @@
1
- {
2
- "name": "@hotmeshio/hotmesh",
3
- "version": "0.0.8",
4
- "description": "Durable Workflows",
5
- "main": "build/cjs/index.js",
6
- "module": "build/esm/index.js",
7
- "types": "build/cjs/index.d.ts",
8
- "exports": {
9
- "import": "./build/esm/index.js",
10
- "require": "./build/cjs/index.js"
11
- },
12
- "repository": {
13
- "type": "git",
14
- "url": "https://github.com/hotmeshio/sdk-typescript.git"
15
- },
16
- "homepage": "https://github.com/hotmeshio/sdk-typescript#readme",
17
- "publishConfig": {
18
- "access": "public"
19
- },
20
- "scripts": {
21
- "clean": "rimraf ./build",
22
- "build:cjs": "tsc --build tsconfig.cjs.json",
23
- "build:esm": "tsc --build tsconfig.esm.json",
24
- "build": "npm run build:cjs && npm run build:esm",
25
- "clean-build": "npm run clean && npm run build",
26
- "lint": "eslint . --ext .ts",
27
- "lint:fix": "eslint . --fix --ext .ts",
28
- "start": "ts-node src/index.ts",
29
- "test": "NODE_ENV=test jest --detectOpenHandles --forceExit --verbose",
30
- "test:hmsh": "NODE_ENV=test jest ./tests/functional/index.test.ts --detectOpenHandles --verbose",
31
- "test:compile": "NODE_ENV=test jest ./tests/functional/compile/index.test.ts --detectOpenHandles --forceExit --verbose",
32
- "test:cycle": "NODE_ENV=test jest ./tests/functional/cycle/index.test.ts --detectOpenHandles --forceExit --verbose",
33
- "test:connect": "NODE_ENV=test jest ./tests/unit/services/connector/index.test.ts --detectOpenHandles --forceExit --verbose",
34
- "test:connect:redis": "NODE_ENV=test jest ./tests/unit/services/connector/clients/redis.test.ts --detectOpenHandles --forceExit --verbose",
35
- "test:connect:ioredis": "NODE_ENV=test jest ./tests/unit/services/connector/clients/ioredis.test.ts --detectOpenHandles --forceExit --verbose",
36
- "test:parallel": "NODE_ENV=test jest ./tests/functional/parallel/index.test.ts --detectOpenHandles --forceExit --verbose",
37
- "test:sequence": "NODE_ENV=test jest ./tests/functional/sequence/index.test.ts --detectOpenHandles --forceExit --verbose",
38
- "test:quorum": "NODE_ENV=test jest ./tests/functional/quorum/index.test.ts --detectOpenHandles --forceExit --verbose",
39
- "test:reclaim": "NODE_ENV=test jest ./tests/functional/reclaim/index.test.ts --detectOpenHandles --forceExit --verbose",
40
- "test:redeploy": "NODE_ENV=test jest ./tests/functional/redeploy/index.test.ts --detectOpenHandles --forceExit --verbose",
41
- "test:retry": "NODE_ENV=test jest ./tests/functional/retry/index.test.ts --detectOpenHandles --forceExit --verbose",
42
- "test:status": "NODE_ENV=test jest ./tests/functional/status/index.test.ts --detectOpenHandles --forceExit --verbose",
43
- "test:store:redis": "NODE_ENV=test jest ./tests/functional/store/clients/redis.test.ts --detectOpenHandles --forceExit --verbose",
44
- "test:store:ioredis": "NODE_ENV=test jest ./tests/functional/store/clients/ioredis.test.ts --detectOpenHandles --forceExit --verbose",
45
- "test:stream:redis": "NODE_ENV=test jest ./tests/functional/stream/clients/redis.test.ts --detectOpenHandles --forceExit --verbose",
46
- "test:stream:ioredis": "NODE_ENV=test jest ./tests/functional/stream/clients/ioredis.test.ts --detectOpenHandles --forceExit --verbose",
47
- "test:sub:redis": "NODE_ENV=test jest ./tests/functional/sub/clients/redis.test.ts --detectOpenHandles --forceExit --verbose",
48
- "test:sub:ioredis": "NODE_ENV=test jest ./tests/functional/sub/clients/ioredis.test.ts --detectOpenHandles --forceExit --verbose",
49
- "test:durable": "NODE_ENV=test jest ./tests/durable/*/index.test.ts --detectOpenHandles --forceExit --verbose",
50
- "test:durable:hello": "NODE_ENV=test jest ./tests/durable/helloworld/index.test.ts --detectOpenHandles --forceExit --verbose",
51
- "test:durable:goodbye": "NODE_ENV=test jest ./tests/durable/goodbye/index.test.ts --detectOpenHandles --forceExit --verbose",
52
- "test:durable:retry": "NODE_ENV=test jest ./tests/durable/retry/index.test.ts --detectOpenHandles --forceExit --verbose",
53
- "test:durable:loopactivity": "NODE_ENV=test jest ./tests/durable/loopactivity/index.test.ts --detectOpenHandles --forceExit --verbose",
54
- "test:durable:nested": "NODE_ENV=test jest ./tests/durable/nested/index.test.ts --detectOpenHandles --forceExit --verbose"
55
- },
56
- "keywords": [],
57
- "author": "luke.birdeau@gmail.com",
58
- "license": "SEE LICENSE IN LICENSE",
59
- "dependencies": {
60
- "@apidevtools/json-schema-ref-parser": "^10.1.0",
61
- "@opentelemetry/api": "^1.4.1",
62
- "js-yaml": "^4.1.0",
63
- "ms": "^2.1.3",
64
- "uuid": "^9.0.1",
65
- "winston": "^3.8.2"
66
- },
67
- "devDependencies": {
68
- "@types/jest": "^29.5.0",
69
- "@types/node": "^18.15.11",
70
- "@typescript-eslint/eslint-plugin": "^5.56.0",
71
- "@typescript-eslint/parser": "^5.56.0",
72
- "eslint": "^8.36.0",
73
- "ioredis": "^5.3.2",
74
- "jest": "^29.5.0",
75
- "redis": "^4.6.6",
76
- "rimraf": "^4.4.1",
77
- "ts-jest": "^29.0.5",
78
- "ts-node": "^10.9.1",
79
- "ts-node-dev": "^2.0.0",
80
- "typescript": "^5.0.4"
81
- }
82
- }
@@ -1,38 +0,0 @@
1
- import { HotMeshService as HotMesh } from '../hotmesh';
2
- import { Connection, Registry, WorkerConfig } from "../../types/durable";
3
- export declare class WorkerService {
4
- static activityRegistry: Registry;
5
- static connection: Connection;
6
- static instances: Map<string, HotMesh | Promise<HotMesh>>;
7
- workflowRunner: HotMesh;
8
- activityRunner: HotMesh;
9
- static getHotMesh: (worflowTopic: string) => Promise<HotMesh>;
10
- static activateWorkflow(hotMesh: HotMesh, topic: string, factory: Function): Promise<void>;
11
- /**
12
- * The `worker` calls `registerActivities` immediately BEFORE
13
- * dynamically importing the user's workflow module. That file
14
- * contains a call, `proxyActivities`, which needs this info.
15
- *
16
- * NOTE: The `worker` and `client` both call `proxyActivities`,
17
- * as a natural result of importing worflows.ts. However,
18
- * because the worker imports the workflows dynamically AFTER
19
- * the activities are loaded, there will be items in the registry,
20
- * allowing proxyActivities to succeed.
21
- */
22
- static registerActivities<ACT>(activities: ACT): Registry;
23
- static create(config: WorkerConfig): Promise<WorkerService>;
24
- static resolveWorkflowTarget(workflow: object | Function): [string, Function];
25
- run(): Promise<void>;
26
- initActivityWorkflow(config: WorkerConfig, activityTopic: string): Promise<HotMesh>;
27
- wrapActivityFunctions(): Function;
28
- activateActivityWorkflow(hotMesh: HotMesh, activityTopic: string): Promise<void>;
29
- initWorkerWorkflow(config: WorkerConfig, workflowTopic: string, workflowFunction: Function): Promise<HotMesh>;
30
- static Context: {
31
- info: () => {
32
- workflowId: string;
33
- workflowTopic: string;
34
- };
35
- };
36
- wrapWorkflowFunction(workflowFunction: Function, workflowTopic: string): Function;
37
- static shutdown(): Promise<void>;
38
- }
@@ -1,4 +0,0 @@
1
- import { Durable } from './services/durable';
2
- import { HotMeshService as HotMesh } from './services/hotmesh';
3
- import { HotMeshConfig } from './types/hotmesh';
4
- export { Durable, HotMesh, HotMeshConfig };
@@ -1,3 +0,0 @@
1
- import { Durable } from './services/durable';
2
- import { HotMeshService as HotMesh } from './services/hotmesh';
3
- export { Durable, HotMesh };