redis-smq-common 1.0.3 → 1.0.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.0.4 (2022-08-24)
4
+
5
+ * test(redis-client): cover srem command (caf3837)
6
+ * feat(redis-client): add support for srem command (7ddaf24)
7
+
8
+
3
9
  ## 1.0.3 (2022-08-16)
4
10
 
5
11
  * [RedisClient] Update tests (6f1fd51)
@@ -30,6 +30,7 @@ export declare class IoredisClient extends RedisClient {
30
30
  zrangebyscore(key: string, min: number | string, max: number | string, cb: ICallback<string[]>): void;
31
31
  smembers(key: string, cb: ICallback<string[]>): void;
32
32
  sadd(key: string, member: string, cb: ICallback<number>): void;
33
+ srem(key: string, member: string, cb: ICallback<number>): void;
33
34
  hgetall(key: string, cb: ICallback<Record<string, string>>): void;
34
35
  hget(key: string, field: string, cb: ICallback<string | null>): void;
35
36
  hset(key: string, field: string, value: string, cb: ICallback<number>): void;
@@ -96,6 +96,9 @@ class IoredisClient extends redis_client_1.RedisClient {
96
96
  sadd(key, member, cb) {
97
97
  this.client.sadd(key, member, cb);
98
98
  }
99
+ srem(key, member, cb) {
100
+ this.client.srem(key, member, cb);
101
+ }
99
102
  hgetall(key, cb) {
100
103
  this.client.hgetall(key, cb);
101
104
  }
@@ -30,6 +30,7 @@ export declare class NodeRedisV3Client extends RedisClient {
30
30
  zrangebyscore(key: string, min: number | string, max: number | string, cb: ICallback<string[]>): void;
31
31
  smembers(key: string, cb: ICallback<string[]>): void;
32
32
  sadd(key: string, member: string, cb: ICallback<number>): void;
33
+ srem(key: string, member: string, cb: ICallback<number>): void;
33
34
  hgetall(key: string, cb: ICallback<Record<string, string>>): void;
34
35
  hget(key: string, field: string, cb: ICallback<string | null>): void;
35
36
  hset(key: string, field: string, value: string, cb: ICallback<number>): void;
@@ -123,6 +123,9 @@ class NodeRedisV3Client extends redis_client_1.RedisClient {
123
123
  sadd(key, member, cb) {
124
124
  this.client.sadd(key, member, cb);
125
125
  }
126
+ srem(key, member, cb) {
127
+ this.client.srem(key, member, cb);
128
+ }
126
129
  hgetall(key, cb) {
127
130
  this.client.hgetall(key, (err, reply) => {
128
131
  if (err)
@@ -30,6 +30,7 @@ export declare class NodeRedisV4Client extends RedisClient {
30
30
  COUNT?: number;
31
31
  }, cb: ICallback<string[]>): void;
32
32
  sadd(key: string, member: string, cb: ICallback<number>): void;
33
+ srem(key: string, member: string, cb: ICallback<number>): void;
33
34
  hgetall(key: string, cb: ICallback<Record<string, string>>): void;
34
35
  hget(key: string, field: string, cb: ICallback<string | null>): void;
35
36
  hset(key: string, field: string, value: string, cb: ICallback<number>): void;
@@ -121,6 +121,12 @@ class NodeRedisV4Client extends redis_client_1.RedisClient {
121
121
  .then((reply) => cb(null, reply))
122
122
  .catch(cb);
123
123
  }
124
+ srem(key, member, cb) {
125
+ this.client
126
+ .sRem(key, member)
127
+ .then((reply) => cb(null, reply))
128
+ .catch(cb);
129
+ }
124
130
  hgetall(key, cb) {
125
131
  this.client
126
132
  .hGetAll(key)
@@ -39,6 +39,7 @@ export declare abstract class RedisClient extends EventEmitter {
39
39
  }, cb: ICallback<string[]>): void;
40
40
  sscanFallback(key: string, cb: ICallback<string[]>): void;
41
41
  abstract sadd(key: string, member: string, cb: ICallback<number>): void;
42
+ abstract srem(key: string, member: string, cb: ICallback<number>): void;
42
43
  abstract hgetall(key: string, cb: ICallback<Record<string, string>>): void;
43
44
  abstract hget(key: string, field: string, cb: ICallback<string | null>): void;
44
45
  abstract hset(key: string, field: string, value: string, cb: ICallback<number>): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redis-smq-common",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "RedisSMQ shared components that may be used by integrated applications and extensions.",
5
5
  "author": "Weyoss <weyoss@protonmail.com>",
6
6
  "license": "MIT",