@hotmeshio/hotmesh 0.3.10 → 0.3.11
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.
- package/README.md +6 -6
- package/build/modules/key.d.ts +4 -0
- package/build/modules/key.js +1 -1
- package/build/modules/utils.js +1 -1
- package/build/package.json +19 -15
- package/build/services/activities/activity.js +1 -1
- package/build/services/activities/await.js +1 -1
- package/build/services/activities/cycle.js +1 -1
- package/build/services/activities/hook.js +1 -1
- package/build/services/activities/index.js +1 -1
- package/build/services/activities/interrupt.js +1 -1
- package/build/services/activities/signal.js +1 -1
- package/build/services/activities/trigger.js +1 -1
- package/build/services/activities/worker.js +1 -1
- package/build/services/collator/index.js +1 -1
- package/build/services/compiler/deployer.js +1 -1
- package/build/services/compiler/index.js +1 -1
- package/build/services/compiler/validator.js +1 -1
- package/build/services/connector/factory.js +29 -17
- package/build/services/connector/index.d.ts +2 -0
- package/build/services/connector/index.js +2 -0
- package/build/services/connector/providers/nats.js +8 -2
- package/build/services/connector/providers/postgres.js +7 -3
- package/build/services/engine/index.js +1 -1
- package/build/services/exporter/index.js +1 -1
- package/build/services/mapper/index.js +1 -1
- package/build/services/meshflow/client.js +1 -1
- package/build/services/meshflow/exporter.js +1 -1
- package/build/services/pipe/functions/array.js +1 -1
- package/build/services/pipe/functions/bitwise.js +1 -1
- package/build/services/pipe/functions/conditional.js +1 -1
- package/build/services/pipe/functions/cron.js +1 -1
- package/build/services/pipe/functions/date.js +1 -1
- package/build/services/pipe/functions/index.js +1 -1
- package/build/services/pipe/functions/json.js +1 -1
- package/build/services/pipe/functions/logical.js +1 -1
- package/build/services/pipe/functions/math.js +1 -1
- package/build/services/pipe/functions/number.js +1 -1
- package/build/services/pipe/functions/object.js +1 -1
- package/build/services/pipe/functions/string.js +1 -1
- package/build/services/pipe/functions/symbol.js +1 -1
- package/build/services/pipe/functions/unary.js +1 -1
- package/build/services/pipe/index.js +1 -1
- package/build/services/quorum/index.js +1 -1
- package/build/services/reporter/index.d.ts +3 -0
- package/build/services/reporter/index.js +1 -1
- package/build/services/router/index.js +1 -1
- package/build/services/search/providers/redis/ioredis.js +1 -1
- package/build/services/search/providers/redis/redis.js +1 -1
- package/build/services/serializer/index.js +1 -1
- package/build/services/store/factory.d.ts +1 -1
- package/build/services/store/factory.js +9 -5
- package/build/services/store/index.d.ts +2 -1
- package/build/services/store/providers/postgres/kvsql.d.ts +155 -0
- package/build/services/store/providers/postgres/kvsql.js +1 -0
- package/build/services/store/providers/postgres/postgres.d.ts +107 -0
- package/build/services/store/providers/postgres/postgres.js +1 -0
- package/build/services/store/providers/redis/_base.d.ts +0 -1
- package/build/services/store/providers/redis/_base.js +1 -1
- package/build/services/store/providers/redis/ioredis.js +1 -1
- package/build/services/store/providers/redis/redis.d.ts +0 -1
- package/build/services/store/providers/redis/redis.js +1 -1
- package/build/services/store/providers/store-initializable.js +1 -1
- package/build/services/stream/factory.js +5 -1
- package/build/services/stream/providers/nats/nats.js +1 -1
- package/build/services/stream/providers/postgres/postgres.d.ts +4 -0
- package/build/services/stream/providers/postgres/postgres.js +1 -1
- package/build/services/stream/providers/redis/ioredis.js +1 -1
- package/build/services/stream/providers/redis/redis.js +1 -1
- package/build/services/stream/providers/stream-initializable.js +1 -1
- package/build/services/sub/providers/redis/ioredis.js +1 -1
- package/build/services/sub/providers/redis/redis.js +1 -1
- package/build/services/task/index.js +1 -1
- package/build/services/telemetry/index.js +1 -1
- package/build/services/worker/index.js +1 -1
- package/build/types/hotmesh.d.ts +4 -0
- package/build/types/provider.d.ts +44 -1
- package/package.json +19 -15
- package/types/hotmesh.ts +15 -0
- package/types/provider.ts +74 -3
- package/build/services/store/providers/postgres/types/hash.d.ts +0 -0
- package/build/services/store/providers/postgres/types/hash.js +0 -0
- package/build/services/store/providers/postgres/types/list.d.ts +0 -0
- package/build/services/store/providers/postgres/types/list.js +0 -0
- package/build/services/store/providers/postgres/types/string.d.ts +0 -0
- package/build/services/store/providers/postgres/types/string.js +0 -0
- package/build/services/store/providers/postgres/types/zset.d.ts +0 -0
- package/build/services/store/providers/postgres/types/zset.js +0 -0
package/types/provider.ts
CHANGED
|
@@ -27,11 +27,10 @@ export type Providers = 'redis' | 'nats' | 'postgres' | 'ioredis';
|
|
|
27
27
|
* execute as a single transaction.
|
|
28
28
|
*/
|
|
29
29
|
export interface ProviderTransaction {
|
|
30
|
-
//outside callers can execute the transaction, regardless of provider by calling this method
|
|
31
30
|
exec(): Promise<any>;
|
|
32
31
|
|
|
33
|
-
//
|
|
34
|
-
[key: string]: any;
|
|
32
|
+
// Allows callable properties while avoiding conflicts with ProviderTransaction instances
|
|
33
|
+
[key: string]: ((...args: any[]) => Promise<any>) | undefined | any;
|
|
35
34
|
}
|
|
36
35
|
|
|
37
36
|
/**
|
|
@@ -69,3 +68,75 @@ export type ProviderConfig = {
|
|
|
69
68
|
class: any;
|
|
70
69
|
options: StringAnyType;
|
|
71
70
|
};
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
export interface SetOptions {
|
|
74
|
+
nx?: boolean;
|
|
75
|
+
ex?: number; // Expiry time in seconds
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface HSetOptions {
|
|
79
|
+
nx?: boolean;
|
|
80
|
+
ex?: number; // Expiry time in seconds
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface ZAddOptions {
|
|
84
|
+
nx?: boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface HScanResult {
|
|
88
|
+
cursor: string;
|
|
89
|
+
items: Record<string, string>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface KVSQLProviderTransaction extends ProviderTransaction {
|
|
93
|
+
[key: string]: any;
|
|
94
|
+
exec(): Promise<any[]>;
|
|
95
|
+
set(key: string, value: string, options?: SetOptions): ProviderTransaction;
|
|
96
|
+
get(key: string): ProviderTransaction;
|
|
97
|
+
del(key: string): ProviderTransaction;
|
|
98
|
+
expire(key: string, seconds: number): ProviderTransaction;
|
|
99
|
+
hset(
|
|
100
|
+
key: string,
|
|
101
|
+
fields: Record<string, string>,
|
|
102
|
+
options?: HSetOptions
|
|
103
|
+
): ProviderTransaction;
|
|
104
|
+
hget(key: string, field: string): ProviderTransaction;
|
|
105
|
+
hdel(key: string, fields: string[]): ProviderTransaction;
|
|
106
|
+
hmget(key: string, fields: string[]): ProviderTransaction;
|
|
107
|
+
hgetall(key: string): ProviderTransaction;
|
|
108
|
+
hincrbyfloat(
|
|
109
|
+
key: string,
|
|
110
|
+
field: string,
|
|
111
|
+
value: number
|
|
112
|
+
): ProviderTransaction;
|
|
113
|
+
hscan(key: string, cursor: string, count?: number): ProviderTransaction;
|
|
114
|
+
lrange(key: string, start: number, end: number): ProviderTransaction;
|
|
115
|
+
rpush(key: string, value: string): ProviderTransaction;
|
|
116
|
+
lpush(key: string, value: string): ProviderTransaction;
|
|
117
|
+
lpop(key: string): ProviderTransaction;
|
|
118
|
+
lmove(
|
|
119
|
+
source: string,
|
|
120
|
+
destination: string,
|
|
121
|
+
srcPosition: 'LEFT' | 'RIGHT',
|
|
122
|
+
destPosition: 'LEFT' | 'RIGHT'
|
|
123
|
+
): ProviderTransaction;
|
|
124
|
+
zadd(
|
|
125
|
+
key: string,
|
|
126
|
+
score: number,
|
|
127
|
+
member: string,
|
|
128
|
+
options?: ZAddOptions
|
|
129
|
+
): ProviderTransaction;
|
|
130
|
+
zrange(key: string, start: number, stop: number): ProviderTransaction;
|
|
131
|
+
zrangebyscore(key: string, min: number, max: number): ProviderTransaction;
|
|
132
|
+
zrangebyscore_withscores(
|
|
133
|
+
key: string,
|
|
134
|
+
min: number,
|
|
135
|
+
max: number
|
|
136
|
+
): ProviderTransaction;
|
|
137
|
+
zrem(key: string, member: string): ProviderTransaction;
|
|
138
|
+
zrank(key: string, member: string): ProviderTransaction;
|
|
139
|
+
scan(cursor: number, count?: number): ProviderTransaction;
|
|
140
|
+
rename(oldKey: string, newKey: string): ProviderTransaction;
|
|
141
|
+
// Add other methods as needed
|
|
142
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|