@hotmeshio/hotmesh 0.3.14 → 0.3.16

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 (91) hide show
  1. package/README.md +64 -52
  2. package/build/modules/key.js +1 -1
  3. package/build/modules/utils.js +1 -1
  4. package/build/package.json +22 -21
  5. package/build/services/activities/activity.js +1 -1
  6. package/build/services/activities/await.js +1 -1
  7. package/build/services/activities/cycle.js +1 -1
  8. package/build/services/activities/hook.js +1 -1
  9. package/build/services/activities/index.js +1 -1
  10. package/build/services/activities/interrupt.js +1 -1
  11. package/build/services/activities/signal.js +1 -1
  12. package/build/services/activities/trigger.js +1 -1
  13. package/build/services/activities/worker.js +1 -1
  14. package/build/services/collator/index.js +1 -1
  15. package/build/services/compiler/deployer.js +1 -1
  16. package/build/services/compiler/index.js +1 -1
  17. package/build/services/compiler/validator.js +1 -1
  18. package/build/services/connector/factory.js +2 -2
  19. package/build/services/connector/providers/nats.js +3 -1
  20. package/build/services/engine/index.js +1 -1
  21. package/build/services/exporter/index.js +1 -1
  22. package/build/services/hotmesh/index.js +2 -0
  23. package/build/services/mapper/index.js +1 -1
  24. package/build/services/meshcall/index.d.ts +5 -4
  25. package/build/services/meshcall/index.js +23 -9
  26. package/build/services/meshdata/index.js +3 -2
  27. package/build/services/meshflow/client.js +1 -1
  28. package/build/services/meshflow/connection.js +6 -4
  29. package/build/services/meshflow/exporter.js +1 -1
  30. package/build/services/meshflow/worker.js +1 -1
  31. package/build/services/pipe/functions/array.js +1 -1
  32. package/build/services/pipe/functions/bitwise.js +1 -1
  33. package/build/services/pipe/functions/conditional.js +1 -1
  34. package/build/services/pipe/functions/cron.js +1 -1
  35. package/build/services/pipe/functions/date.js +1 -1
  36. package/build/services/pipe/functions/index.js +1 -1
  37. package/build/services/pipe/functions/json.js +1 -1
  38. package/build/services/pipe/functions/logical.js +1 -1
  39. package/build/services/pipe/functions/math.js +1 -1
  40. package/build/services/pipe/functions/number.js +1 -1
  41. package/build/services/pipe/functions/object.js +1 -1
  42. package/build/services/pipe/functions/string.js +1 -1
  43. package/build/services/pipe/functions/symbol.js +1 -1
  44. package/build/services/pipe/functions/unary.js +1 -1
  45. package/build/services/pipe/index.js +1 -1
  46. package/build/services/quorum/index.js +1 -1
  47. package/build/services/reporter/index.js +1 -1
  48. package/build/services/router/index.js +1 -1
  49. package/build/services/search/factory.d.ts +1 -1
  50. package/build/services/search/providers/postgres/postgres.d.ts +1 -1
  51. package/build/services/search/providers/postgres/postgres.js +1 -1
  52. package/build/services/search/providers/redis/ioredis.js +1 -1
  53. package/build/services/search/providers/redis/redis.js +1 -1
  54. package/build/services/serializer/index.js +1 -1
  55. package/build/services/store/providers/postgres/kvsql.d.ts +68 -63
  56. package/build/services/store/providers/postgres/kvsql.js +1 -1
  57. package/build/services/store/providers/postgres/kvtables.d.ts +15 -0
  58. package/build/services/store/providers/postgres/kvtables.js +1 -0
  59. package/build/services/store/providers/postgres/kvtransaction.d.ts +36 -0
  60. package/build/services/store/providers/postgres/kvtransaction.js +1 -0
  61. package/build/services/store/providers/postgres/kvtypes/hash.d.ts +55 -0
  62. package/build/services/store/providers/postgres/kvtypes/hash.js +1 -0
  63. package/build/services/store/providers/postgres/kvtypes/list.d.ts +33 -0
  64. package/build/services/store/providers/postgres/kvtypes/list.js +1 -0
  65. package/build/services/store/providers/postgres/kvtypes/string.d.ts +20 -0
  66. package/build/services/store/providers/postgres/kvtypes/string.js +1 -0
  67. package/build/services/store/providers/postgres/kvtypes/zset.d.ts +41 -0
  68. package/build/services/store/providers/postgres/kvtypes/zset.js +1 -0
  69. package/build/services/store/providers/postgres/postgres.d.ts +3 -12
  70. package/build/services/store/providers/postgres/postgres.js +1 -1
  71. package/build/services/store/providers/redis/_base.js +1 -1
  72. package/build/services/store/providers/redis/ioredis.js +1 -1
  73. package/build/services/store/providers/redis/redis.js +1 -1
  74. package/build/services/store/providers/store-initializable.js +1 -1
  75. package/build/services/stream/providers/nats/nats.js +1 -1
  76. package/build/services/stream/providers/postgres/postgres.js +1 -1
  77. package/build/services/stream/providers/redis/ioredis.js +1 -1
  78. package/build/services/stream/providers/redis/redis.js +1 -1
  79. package/build/services/stream/providers/stream-initializable.js +1 -1
  80. package/build/services/sub/providers/redis/ioredis.js +1 -1
  81. package/build/services/sub/providers/redis/redis.js +1 -1
  82. package/build/services/task/index.js +1 -1
  83. package/build/services/telemetry/index.js +1 -1
  84. package/build/services/worker/index.js +1 -1
  85. package/build/types/meshcall.d.ts +6 -6
  86. package/package.json +22 -21
  87. package/types/index.ts +3 -3
  88. package/types/manifest.ts +1 -1
  89. package/types/meshcall.ts +6 -6
  90. package/types/postgres.ts +8 -1
  91. package/types/provider.ts +7 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotmeshio/hotmesh",
3
- "version": "0.3.14",
3
+ "version": "0.3.16",
4
4
  "description": "Unbreakable Workflows",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -8,7 +8,7 @@
8
8
  "type": "git",
9
9
  "url": "https://github.com/hotmeshio/sdk-typescript.git"
10
10
  },
11
- "homepage": "https://hotmeshio.github.io/sdk-typescript/",
11
+ "homepage": "https://hotmesh.io/",
12
12
  "publishConfig": {
13
13
  "access": "public"
14
14
  },
@@ -31,25 +31,25 @@
31
31
  "test:connect:nats": "NODE_ENV=test jest ./tests/unit/services/connector/providers/nats.test.ts --detectOpenHandles --forceExit --verbose",
32
32
  "test:cycle": "NODE_ENV=test jest ./tests/functional/cycle/*.test.ts --detectOpenHandles --forceExit --verbose",
33
33
  "test:meshflow": "NODE_ENV=test jest ./tests/meshflow/*/*.test.ts --detectOpenHandles --forceExit --verbose",
34
- "test:meshflow:basic": "NODE_ENV=test jest ./tests/meshflow/basic/index.test.ts --detectOpenHandles --forceExit --verbose",
35
- "test:meshflow:collision": "NODE_ENV=test HMSH_LOGLEVEL=debug jest ./tests/meshflow/collision/index.test.ts --detectOpenHandles --forceExit --verbose",
36
- "test:meshflow:fatal": "NODE_ENV=test jest ./tests/meshflow/fatal/index.test.ts --detectOpenHandles --forceExit --verbose",
34
+ "test:meshflow:basic": "NODE_ENV=test jest ./tests/meshflow/basic/*.test.ts --detectOpenHandles --forceExit --verbose",
35
+ "test:meshflow:collision": "NODE_ENV=test jest ./tests/meshflow/collision/*.test.ts --detectOpenHandles --forceExit --verbose",
36
+ "test:meshflow:fatal": "NODE_ENV=test jest ./tests/meshflow/fatal/*.test.ts --detectOpenHandles --forceExit --verbose",
37
37
  "test:meshflow:goodbye": "NODE_ENV=test jest ./tests/meshflow/goodbye/*.test.ts --detectOpenHandles --forceExit --verbose",
38
38
  "test:meshflow:hello": "HMSH_LOGLEVEL=debug HMSH_IS_CLUSTER=true NODE_ENV=test jest ./tests/meshflow/helloworld/*.test.ts --detectOpenHandles --forceExit --verbose",
39
- "test:meshflow:hook": "NODE_ENV=test jest ./tests/meshflow/hook/index.test.ts --detectOpenHandles --forceExit --verbose",
40
- "test:meshflow:interrupt": "NODE_ENV=test jest ./tests/meshflow/interrupt/index.test.ts --detectOpenHandles --forceExit --verbose",
41
- "test:meshflow:loopactivity": "NODE_ENV=test jest ./tests/meshflow/loopactivity/index.test.ts --detectOpenHandles --forceExit --verbose",
42
- "test:meshflow:nested": "NODE_ENV=test jest ./tests/meshflow/nested/index.test.ts --detectOpenHandles --forceExit --verbose",
43
- "test:meshflow:retry": "NODE_ENV=test jest ./tests/meshflow/retry/index.test.ts --detectOpenHandles --forceExit --verbose",
44
- "test:meshflow:sleep": "NODE_ENV=test jest ./tests/meshflow/sleep/index.test.ts --detectOpenHandles --forceExit --verbose",
45
- "test:meshflow:signal": "NODE_ENV=test jest ./tests/meshflow/signal/index.test.ts --detectOpenHandles --forceExit --verbose",
46
- "test:meshflow:unknown": "NODE_ENV=test jest ./tests/meshflow/unknown/index.test.ts --detectOpenHandles --forceExit --verbose",
39
+ "test:meshflow:hook": "NODE_ENV=test jest ./tests/meshflow/hook/*.test.ts --detectOpenHandles --forceExit --verbose",
40
+ "test:meshflow:interrupt": "NODE_ENV=test jest ./tests/meshflow/interrupt/*.test.ts --detectOpenHandles --forceExit --verbose",
41
+ "test:meshflow:loopactivity": "NODE_ENV=test jest ./tests/meshflow/loopactivity/*.test.ts --detectOpenHandles --forceExit --verbose",
42
+ "test:meshflow:nested": "NODE_ENV=test jest ./tests/meshflow/nested/*.test.ts --detectOpenHandles --forceExit --verbose",
43
+ "test:meshflow:retry": "NODE_ENV=test jest ./tests/meshflow/retry/*.test.ts --detectOpenHandles --forceExit --verbose",
44
+ "test:meshflow:sleep": "NODE_ENV=test jest ./tests/meshflow/sleep/*.test.ts --detectOpenHandles --forceExit --verbose",
45
+ "test:meshflow:signal": "NODE_ENV=test jest ./tests/meshflow/signal/*.test.ts --detectOpenHandles --forceExit --verbose",
46
+ "test:meshflow:unknown": "NODE_ENV=test jest ./tests/meshflow/unknown/*.test.ts --detectOpenHandles --forceExit --verbose",
47
47
  "test:emit": "NODE_ENV=test jest ./tests/functional/emit/index.test.ts --detectOpenHandles --forceExit --verbose",
48
48
  "test:pending": "NODE_ENV=test jest ./tests/functional/pending/index.test.ts --detectOpenHandles --forceExit --verbose",
49
49
  "test:functional": "NODE_ENV=test jest ./tests/functional/* --detectOpenHandles --forceExit --verbose",
50
50
  "test:hmsh": "NODE_ENV=test jest ./tests/functional/*.test.ts --detectOpenHandles --verbose --forceExit",
51
51
  "test:hook": "NODE_ENV=test jest ./tests/functional/hook/index.test.ts --detectOpenHandles --forceExit --verbose",
52
- "test:interrupt": "NODE_ENV=test jest ./tests/functional/interrupt/index.test.ts --detectOpenHandles --forceExit --verbose",
52
+ "test:interrupt": "NODE_ENV=test jest ./tests/functional/interrupt/*.test.ts --detectOpenHandles --forceExit --verbose",
53
53
  "test:parallel": "NODE_ENV=test jest ./tests/functional/parallel/index.test.ts --detectOpenHandles --forceExit --verbose",
54
54
  "test:pipe": "NODE_ENV=test jest ./tests/unit/services/pipe/index.test.ts --detectOpenHandles --forceExit --verbose",
55
55
  "test:quorum": "HMSH_IS_CLUSTER=true NODE_ENV=test jest ./tests/functional/quorum/*.test.ts --detectOpenHandles --forceExit --verbose",
@@ -57,7 +57,7 @@
57
57
  "test:redeploy": "NODE_ENV=test jest ./tests/functional/redeploy/*.test.ts --detectOpenHandles --forceExit --verbose",
58
58
  "test:reporter": "NODE_ENV=test jest ./tests/unit/services/reporter/index.test.ts --detectOpenHandles --forceExit --verbose",
59
59
  "test:reentrant": "NODE_ENV=test jest ./tests/functional/reentrant/index.test.ts --detectOpenHandles --forceExit --verbose",
60
- "test:retry": "NODE_ENV=test jest ./tests/functional/retry/index.test.ts --detectOpenHandles --forceExit --verbose",
60
+ "test:retry": "NODE_ENV=test jest ./tests/functional/retry/*.test.ts --detectOpenHandles --forceExit --verbose",
61
61
  "test:sequence": "NODE_ENV=test HMSH_LOGLEVEL=debug jest ./tests/functional/sequence/*.test.ts --detectOpenHandles --forceExit --verbose",
62
62
  "test:signal": "NODE_ENV=test jest ./tests/functional/signal/index.test.ts --detectOpenHandles --forceExit --verbose",
63
63
  "test:status": "NODE_ENV=test jest ./tests/functional/status/index.test.ts --detectOpenHandles --forceExit --verbose",
@@ -71,17 +71,18 @@
71
71
  "test:sub:ioredis": "NODE_ENV=test jest ./tests/functional/sub/providers/redis/ioredis.test.ts --detectOpenHandles --forceExit --verbose",
72
72
  "test:sub:redis": "NODE_ENV=test jest ./tests/functional/sub/providers/redis/redis.test.ts --detectOpenHandles --forceExit --verbose",
73
73
  "test:trigger": "NODE_ENV=test jest ./tests/unit/services/activities/trigger.test.ts --detectOpenHandles --forceExit --verbose",
74
- "test:meshdata": "NODE_ENV=test HMSH_IS_CLUSTER=true jest ./tests/meshdata/index.test.ts --forceExit --verbose",
74
+ "test:meshdata": "NODE_ENV=test jest ./tests/meshdata/postgres.test.ts --forceExit --verbose --detectOpenHandles",
75
75
  "test:meshos": "NODE_ENV=test HMSH_IS_CLUSTER=true jest ./tests/meshos/*.test.ts --forceExit --verbose --detectOpenHandles",
76
- "test:meshcall": "NODE_ENV=test jest ./tests/meshcall/index.test.ts --forceExit --verbose --detectOpenHandles",
76
+ "test:meshcall": "NODE_ENV=test jest ./tests/meshcall/*.test.ts --forceExit --verbose --detectOpenHandles",
77
77
  "test:unit": "NODE_ENV=test jest ./tests/unit/*/*/index.test.ts --detectOpenHandles --forceExit --verbose"
78
78
  },
79
79
  "keywords": [
80
- "workflow",
81
- "durable workflow",
82
- "operational data",
83
- "service mesh",
80
+ "Serverless Orchestration",
81
+ "Durable Workflow",
82
+ "Operational Data",
83
+ "Service Mesh",
84
84
  "HotMesh",
85
+ "Postgres",
85
86
  "Redis",
86
87
  "OLAP",
87
88
  "OLTP",
package/types/index.ts CHANGED
@@ -153,7 +153,7 @@ export {
153
153
  ConnectionInput,
154
154
  ExecInput,
155
155
  } from './meshdata';
156
- export {
156
+ export {
157
157
  PostgresClassType,
158
158
  PostgresClientOptions,
159
159
  PostgresClientType,
@@ -165,7 +165,7 @@ export {
165
165
  PostgresStreamMessage,
166
166
  PostgresStreamOptions,
167
167
  PostgresTransaction,
168
- } from './postgres'
168
+ } from './postgres';
169
169
  export {
170
170
  ActivateMessage,
171
171
  CronMessage,
@@ -223,7 +223,7 @@ export {
223
223
  NatsStreamOptions,
224
224
  NatsStreamState,
225
225
  NatsTransaction,
226
- } from './nats'
226
+ } from './nats';
227
227
  export {
228
228
  RedisClass,
229
229
  RedisRedisClientType,
package/types/manifest.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { MeshOS } from '../services/meshos';
2
- import { WorkflowSearchSchema } from './meshflow';
3
2
 
3
+ import { WorkflowSearchSchema } from './meshflow';
4
4
  import * as Types from './provider';
5
5
  import { ProviderConfig } from './provider';
6
6
 
package/types/meshcall.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ProviderConfig } from './provider';
1
+ import { ProviderConfig, ProvidersConfig } from './provider';
2
2
  import { LogLevel } from './logger';
3
3
 
4
4
  interface MeshCallExecOptions {
@@ -40,7 +40,7 @@ interface MeshCallConnectParams {
40
40
  /**
41
41
  * Provider configuration
42
42
  */
43
- connection?: ProviderConfig;
43
+ connection?: ProviderConfig | ProvidersConfig;
44
44
  /**
45
45
  * The linked worker function that will be called; optional if read only
46
46
  */
@@ -68,7 +68,7 @@ interface MeshCallExecParams {
68
68
  /**
69
69
  * Provider configuration
70
70
  */
71
- connection?: ProviderConfig;
71
+ connection?: ProviderConfig | ProvidersConfig;
72
72
  /**
73
73
  * Execution options like caching ttl
74
74
  */
@@ -103,7 +103,7 @@ interface MeshCallFlushParams {
103
103
  /**
104
104
  * Provider configuration
105
105
  */
106
- connection?: ProviderConfig;
106
+ connection?: ProviderConfig | ProvidersConfig;
107
107
  /**
108
108
  * Options for the flush
109
109
  */
@@ -166,7 +166,7 @@ interface MeshCallCronParams {
166
166
  /**
167
167
  * Provider configuration
168
168
  */
169
- connection?: ProviderConfig;
169
+ connection?: ProviderConfig | ProvidersConfig;
170
170
  /**
171
171
  * Arguments to pass to the cron job; arguments will be passed to the callback
172
172
  * each time it runs
@@ -215,7 +215,7 @@ interface MeshCallInterruptParams {
215
215
  /**
216
216
  * Provider configuration
217
217
  */
218
- connection?: ProviderConfig;
218
+ connection?: ProviderConfig | ProvidersConfig;
219
219
  /**
220
220
  * Options for interrupting the cron
221
221
  */
package/types/postgres.ts CHANGED
@@ -10,7 +10,14 @@ export interface PostgresClientOptions {
10
10
  // Add any other options you might need
11
11
  }
12
12
 
13
- export type PostgresJobEnumType = 'status' | 'jdata' | 'adata' | 'udata' | 'jmark' | 'hmark' | 'other';
13
+ export type PostgresJobEnumType =
14
+ | 'status'
15
+ | 'jdata'
16
+ | 'adata'
17
+ | 'udata'
18
+ | 'jmark'
19
+ | 'hmark'
20
+ | 'other';
14
21
 
15
22
  export type PostgresClassType = {
16
23
  new (options: PostgresClientOptions): PostgresClientType;
package/types/provider.ts CHANGED
@@ -69,13 +69,13 @@ export type ProviderConfig = {
69
69
  options: StringAnyType;
70
70
  };
71
71
 
72
- export type ProvidersConfig = {
72
+ export type ProvidersConfig = {
73
73
  sub: ProviderConfig;
74
74
  store: ProviderConfig;
75
75
  stream: ProviderConfig;
76
76
  pub?: ProviderConfig;
77
77
  search?: ProviderConfig;
78
- }
78
+ };
79
79
 
80
80
  export interface SetOptions {
81
81
  nx?: boolean;
@@ -106,17 +106,13 @@ export interface KVSQLProviderTransaction extends ProviderTransaction {
106
106
  hset(
107
107
  key: string,
108
108
  fields: Record<string, string>,
109
- options?: HSetOptions
109
+ options?: HSetOptions,
110
110
  ): ProviderTransaction;
111
111
  hget(key: string, field: string): ProviderTransaction;
112
112
  hdel(key: string, fields: string[]): ProviderTransaction;
113
113
  hmget(key: string, fields: string[]): ProviderTransaction;
114
114
  hgetall(key: string): ProviderTransaction;
115
- hincrbyfloat(
116
- key: string,
117
- field: string,
118
- value: number
119
- ): ProviderTransaction;
115
+ hincrbyfloat(key: string, field: string, value: number): ProviderTransaction;
120
116
  hscan(key: string, cursor: string, count?: number): ProviderTransaction;
121
117
  lrange(key: string, start: number, end: number): ProviderTransaction;
122
118
  rpush(key: string, value: string): ProviderTransaction;
@@ -126,20 +122,20 @@ export interface KVSQLProviderTransaction extends ProviderTransaction {
126
122
  source: string,
127
123
  destination: string,
128
124
  srcPosition: 'LEFT' | 'RIGHT',
129
- destPosition: 'LEFT' | 'RIGHT'
125
+ destPosition: 'LEFT' | 'RIGHT',
130
126
  ): ProviderTransaction;
131
127
  zadd(
132
128
  key: string,
133
129
  score: number,
134
130
  member: string,
135
- options?: ZAddOptions
131
+ options?: ZAddOptions,
136
132
  ): ProviderTransaction;
137
133
  zrange(key: string, start: number, stop: number): ProviderTransaction;
138
134
  zrangebyscore(key: string, min: number, max: number): ProviderTransaction;
139
135
  zrangebyscore_withscores(
140
136
  key: string,
141
137
  min: number,
142
- max: number
138
+ max: number,
143
139
  ): ProviderTransaction;
144
140
  zrem(key: string, member: string): ProviderTransaction;
145
141
  zrank(key: string, member: string): ProviderTransaction;