1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-16 08:41:57 +03:00

add support for List commands, fix some Sorted Set commands, add some cluster commands, spawn cluster for testing, add support for command options in cluster, and more

This commit is contained in:
leibale
2021-06-23 18:12:12 -04:00
parent ff6125c423
commit faab94fab2
52 changed files with 1096 additions and 54 deletions

View File

@@ -193,14 +193,14 @@ export default class RedisClient<M extends RedisModules = RedisModules, S extend
}
}
async executeScript<S extends RedisLuaScript>(script: S, args: Array<string>): Promise<ReturnType<S['transformReply']>> {
async executeScript<S extends RedisLuaScript>(script: S, args: Array<string>, options?: ClientCommandOptions): Promise<ReturnType<S['transformReply']>> {
try {
return await this.sendCommand([
'EVALSHA',
script.SHA,
script.NUMBER_OF_KEYS.toString(),
...args
]);
], options);
} catch (err: any) {
if (!err?.message?.startsWith?.('NOSCRIPT')) {
throw err;
@@ -211,7 +211,7 @@ export default class RedisClient<M extends RedisModules = RedisModules, S extend
script.SCRIPT,
script.NUMBER_OF_KEYS.toString(),
...args
]);
], options);
}
}