redis-smq-common 1.0.0-rc.4 → 1.0.0-rc.5
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 +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/src/redis-client/clients/ioredis-client-multi.d.ts +2 -2
- package/dist/src/redis-client/clients/ioredis-client-multi.js +2 -2
- package/dist/src/redis-client/clients/node-redis-v3-client-multi.d.ts +2 -2
- package/dist/src/redis-client/clients/node-redis-v4-client-multi.d.ts +2 -2
- package/dist/src/redis-client/create-client-instance.d.ts +3 -0
- package/dist/src/redis-client/{create-instance.js → create-client-instance.js} +4 -4
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
- package/dist/src/redis-client/create-instance.d.ts +0 -3
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { errors } from './src/errors';
|
|
|
3
3
|
export { LockManager } from './src/lock-manager/lock-manager';
|
|
4
4
|
export { logger } from './src/logger/logger';
|
|
5
5
|
export { PowerManager } from './src/power-manager/power-manager';
|
|
6
|
-
export {
|
|
6
|
+
export { createClientInstance } from './src/redis-client/create-client-instance';
|
|
7
7
|
export { Ticker } from './src/ticker/ticker';
|
|
8
8
|
export { Worker } from './src/worker/worker';
|
|
9
9
|
export { WorkerRunner } from './src/worker/worker-runner/worker-runner';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.events = exports.WorkerPool = exports.WorkerRunner = exports.Worker = exports.Ticker = exports.
|
|
3
|
+
exports.events = exports.WorkerPool = exports.WorkerRunner = exports.Worker = exports.Ticker = exports.createClientInstance = exports.PowerManager = exports.logger = exports.LockManager = exports.errors = exports.async = void 0;
|
|
4
4
|
var async_1 = require("./src/async/async");
|
|
5
5
|
Object.defineProperty(exports, "async", { enumerable: true, get: function () { return async_1.async; } });
|
|
6
6
|
var errors_1 = require("./src/errors");
|
|
@@ -11,8 +11,8 @@ var logger_1 = require("./src/logger/logger");
|
|
|
11
11
|
Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return logger_1.logger; } });
|
|
12
12
|
var power_manager_1 = require("./src/power-manager/power-manager");
|
|
13
13
|
Object.defineProperty(exports, "PowerManager", { enumerable: true, get: function () { return power_manager_1.PowerManager; } });
|
|
14
|
-
var
|
|
15
|
-
Object.defineProperty(exports, "
|
|
14
|
+
var create_client_instance_1 = require("./src/redis-client/create-client-instance");
|
|
15
|
+
Object.defineProperty(exports, "createClientInstance", { enumerable: true, get: function () { return create_client_instance_1.createClientInstance; } });
|
|
16
16
|
var ticker_1 = require("./src/ticker/ticker");
|
|
17
17
|
Object.defineProperty(exports, "Ticker", { enumerable: true, get: function () { return ticker_1.Ticker; } });
|
|
18
18
|
var worker_1 = require("./src/worker/worker");
|
|
@@ -12,11 +12,11 @@ export declare class IoredisClientMulti implements IRedisClientMulti {
|
|
|
12
12
|
zadd(key: string, score: number, element: string): this;
|
|
13
13
|
zrem(key: string, element: string): this;
|
|
14
14
|
sadd(key: string, element: string): this;
|
|
15
|
-
srem(key: string, element: string): this;
|
|
15
|
+
srem(key: string, element: string | string[]): this;
|
|
16
16
|
hset(key: string, field: string, value: string): this;
|
|
17
17
|
hdel(key: string, field: string): this;
|
|
18
18
|
pexpire(key: string, millis: number): this;
|
|
19
19
|
rpoplpush(source: string, destination: string): this;
|
|
20
|
-
del(key: string): this;
|
|
20
|
+
del(key: string | string[]): this;
|
|
21
21
|
exec(cb: ICallback<unknown[]>): void;
|
|
22
22
|
}
|
|
@@ -43,7 +43,7 @@ class IoredisClientMulti {
|
|
|
43
43
|
return this;
|
|
44
44
|
}
|
|
45
45
|
srem(key, element) {
|
|
46
|
-
this.multi.srem(key, element);
|
|
46
|
+
this.multi.srem(key, ...element);
|
|
47
47
|
return this;
|
|
48
48
|
}
|
|
49
49
|
hset(key, field, value) {
|
|
@@ -63,7 +63,7 @@ class IoredisClientMulti {
|
|
|
63
63
|
return this;
|
|
64
64
|
}
|
|
65
65
|
del(key) {
|
|
66
|
-
this.multi.del(key);
|
|
66
|
+
this.multi.del(...key);
|
|
67
67
|
return this;
|
|
68
68
|
}
|
|
69
69
|
exec(cb) {
|
|
@@ -12,11 +12,11 @@ export declare class NodeRedisV3ClientMulti implements IRedisClientMulti {
|
|
|
12
12
|
zadd(key: string, score: number, element: string): this;
|
|
13
13
|
zrem(key: string, element: string): this;
|
|
14
14
|
sadd(key: string, element: string): this;
|
|
15
|
-
srem(key: string, element: string): this;
|
|
15
|
+
srem(key: string, element: string | string[]): this;
|
|
16
16
|
hset(key: string, field: string, value: string): this;
|
|
17
17
|
hdel(key: string, field: string): this;
|
|
18
18
|
pexpire(key: string, millis: number): this;
|
|
19
19
|
rpoplpush(source: string, destination: string): this;
|
|
20
|
-
del(key: string): this;
|
|
20
|
+
del(key: string | string[]): this;
|
|
21
21
|
exec(cb: ICallback<unknown[]>): void;
|
|
22
22
|
}
|
|
@@ -11,11 +11,11 @@ export declare class NodeRedisV4ClientMulti implements IRedisClientMulti {
|
|
|
11
11
|
zadd(key: string, score: number, element: string): this;
|
|
12
12
|
zrem(key: string, element: string): this;
|
|
13
13
|
sadd(key: string, element: string): this;
|
|
14
|
-
srem(key: string, element: string): this;
|
|
14
|
+
srem(key: string, element: string | string[]): this;
|
|
15
15
|
hset(key: string, field: string, value: string): this;
|
|
16
16
|
hdel(key: string, field: string): this;
|
|
17
17
|
pexpire(key: string, millis: number): this;
|
|
18
18
|
rpoplpush(source: string, destination: string): this;
|
|
19
|
-
del(key: string): this;
|
|
19
|
+
del(key: string | string[]): this;
|
|
20
20
|
exec(cb: ICallback<unknown[]>): void;
|
|
21
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.createClientInstance = void 0;
|
|
4
4
|
const types_1 = require("../../types");
|
|
5
5
|
const async_1 = require("../async/async");
|
|
6
6
|
const node_redis_v3_client_1 = require("./clients/node-redis-v3-client");
|
|
@@ -15,7 +15,7 @@ function getClient(config) {
|
|
|
15
15
|
}
|
|
16
16
|
return new ioredis_client_1.IoredisClient(config.options);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function createClientInstance(config, cb) {
|
|
19
19
|
const client = getClient(config);
|
|
20
20
|
client.once('ready', () => {
|
|
21
21
|
async_1.async.waterfall([
|
|
@@ -29,5 +29,5 @@ function createInstance(config, cb) {
|
|
|
29
29
|
});
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
exports.
|
|
33
|
-
//# sourceMappingURL=create-instance.js.map
|
|
32
|
+
exports.createClientInstance = createClientInstance;
|
|
33
|
+
//# sourceMappingURL=create-client-instance.js.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -30,8 +30,8 @@ export interface IRedisClientMulti {
|
|
|
30
30
|
rpop(key: string): this;
|
|
31
31
|
lpush(key: string, element: string): this;
|
|
32
32
|
hdel(key: string, field: string): this;
|
|
33
|
-
del(key: string): this;
|
|
34
|
-
srem(key: string, element: string): this;
|
|
33
|
+
del(key: string | string[]): this;
|
|
34
|
+
srem(key: string, element: string | string[]): this;
|
|
35
35
|
sadd(key: string, element: string): this;
|
|
36
36
|
zrem(key: string, element: string): this;
|
|
37
37
|
zadd(key: string, score: number, element: string): this;
|
package/package.json
CHANGED