redis 4.0.2 → 4.0.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/README.md +13 -11
- package/dist/index.d.ts +27 -4
- package/dist/index.js +16 -3
- package/package.json +10 -13
package/README.md
CHANGED
|
@@ -8,6 +8,19 @@
|
|
|
8
8
|
|
|
9
9
|
node-redis is a modern, high performance [Redis](https://redis.io) client for Node.js with built-in support for Redis 6.2 commands and modules including [RediSearch](https://redisearch.io) and [RedisJSON](https://redisjson.io).
|
|
10
10
|
|
|
11
|
+
|
|
12
|
+
## Packages
|
|
13
|
+
|
|
14
|
+
| Name | Description |
|
|
15
|
+
|---------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
16
|
+
| [redis](./) | [](https://www.npmjs.com/package/redis) [](https://www.npmjs.com/package/redis) |
|
|
17
|
+
| [@node-redis/client](./packages/client) | [](https://www.npmjs.com/package/@node-redis/client) [](https://www.npmjs.com/package/@node-redis/client) [](https://redis.js.org/documentation/client/) |
|
|
18
|
+
| [@node-redis/bloom](./packages/bloom) | [](https://www.npmjs.com/package/@node-redis/bloom) [](https://www.npmjs.com/package/@node-redis/bloom) [](https://redis.js.org/documentation/bloom/) [Redis Bloom](https://oss.redis.com/redisbloom/) commands |
|
|
19
|
+
| [@node-redis/graph](./packages/graph) | [](https://www.npmjs.com/package/@node-redis/graph) [](https://www.npmjs.com/package/@node-redis/graph) [](https://redis.js.org/documentation/graph/) [Redis Graph](https://oss.redis.com/redisgraph/) commands |
|
|
20
|
+
| [@node-redis/json](./packages/json) | [](https://www.npmjs.com/package/@node-redis/json) [](https://www.npmjs.com/package/@node-redis/json) [](https://redis.js.org/documentation/json/) [Redis JSON](https://oss.redis.com/redisjson/) commands |
|
|
21
|
+
| [@node-redis/search](./packages/search) | [](https://www.npmjs.com/package/@node-redis/search) [](https://www.npmjs.com/package/@node-redis/search) [](https://redis.js.org/documentation/search/) [Redis Search](https://oss.redis.com/redisearch/) commands |
|
|
22
|
+
| [@node-redis/time-series](./packages/time-series) | [](https://www.npmjs.com/package/@node-redis/time-series) [](https://www.npmjs.com/package/@node-redis/time-series) [](https://redis.js.org/documentation/time-series/) [Redis Time-Series](https://oss.redis.com/redistimeseries/) commands |
|
|
23
|
+
|
|
11
24
|
## Installation
|
|
12
25
|
|
|
13
26
|
```bash
|
|
@@ -319,17 +332,6 @@ Node Redis is supported with the following versions of Redis:
|
|
|
319
332
|
|
|
320
333
|
> Node Redis should work with older versions of Redis, but it is not fully tested and we cannot offer support.
|
|
321
334
|
|
|
322
|
-
## Packages
|
|
323
|
-
|
|
324
|
-
| Name | Description |
|
|
325
|
-
|---------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
326
|
-
| [redis](./) | [](https://www.npmjs.com/package/redis) [](https://www.npmjs.com/package/redis) |
|
|
327
|
-
| [@node-redis/client](./packages/client) | [](https://www.npmjs.com/package/@node-redis/client) [](https://www.npmjs.com/package/@node-redis/client) [](https://redis.js.org/documentation/client/) |
|
|
328
|
-
| [@node-redis/bloom](./packages/bloom) | [](https://www.npmjs.com/package/@node-redis/bloom) [](https://www.npmjs.com/package/@node-redis/bloom) [](https://redis.js.org/documentation/bloom/) [Redis Bloom](https://oss.redis.com/redisbloom/) commands |
|
|
329
|
-
| [@node-redis/json](./packages/json) | [](https://www.npmjs.com/package/@node-redis/json) [](https://www.npmjs.com/package/@node-redis/json) [](https://redis.js.org/documentation/json/) [Redis JSON](https://oss.redis.com/redisjson/) commands |
|
|
330
|
-
| [@node-redis/search](./packages/search) | [](https://www.npmjs.com/package/@node-redis/search) [](https://www.npmjs.com/package/@node-redis/search) [](https://redis.js.org/documentation/search/) [Redis Search](https://oss.redis.com/redisearch/) commands |
|
|
331
|
-
| [@node-redis/time-series](./packages/time-series) | [](https://www.npmjs.com/package/@node-redis/time-series) [](https://www.npmjs.com/package/@node-redis/time-series) [](https://redis.js.org/documentation/time-series/) [Redis Time-Series](https://oss.redis.com/redistimeseries/) commands |
|
|
332
|
-
|
|
333
335
|
## Contributing
|
|
334
336
|
|
|
335
337
|
If you'd like to contribute, check out the [contributing guide](CONTRIBUTING.md).
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,31 @@
|
|
|
1
|
-
import { RedisClientOptions, RedisClientType, RedisClusterOptions, RedisClusterType } from '@node-redis/client';
|
|
2
|
-
import { RedisScripts } from '@node-redis/client/dist/lib/commands';
|
|
1
|
+
import { RedisModules, RedisScripts, RedisClientOptions, RedisClientType as _RedisClientType, RedisClusterOptions, RedisClusterType as _RedisClusterType } from '@node-redis/client';
|
|
3
2
|
export * from '@node-redis/client';
|
|
4
3
|
export * from '@node-redis/bloom';
|
|
4
|
+
export * from '@node-redis/graph';
|
|
5
5
|
export * from '@node-redis/json';
|
|
6
6
|
export * from '@node-redis/search';
|
|
7
7
|
export * from '@node-redis/time-series';
|
|
8
8
|
declare const modules: {
|
|
9
|
+
graph: {
|
|
10
|
+
CONFIG_GET: typeof import("@node-redis/graph/dist/commands/CONFIG_GET");
|
|
11
|
+
configGet: typeof import("@node-redis/graph/dist/commands/CONFIG_GET");
|
|
12
|
+
CONFIG_SET: typeof import("@node-redis/graph/dist/commands/CONFIG_SET");
|
|
13
|
+
configSet: typeof import("@node-redis/graph/dist/commands/CONFIG_SET");
|
|
14
|
+
DELETE: typeof import("@node-redis/graph/dist/commands/DELETE");
|
|
15
|
+
delete: typeof import("@node-redis/graph/dist/commands/DELETE");
|
|
16
|
+
EXPLAIN: typeof import("@node-redis/graph/dist/commands/EXPLAIN");
|
|
17
|
+
explain: typeof import("@node-redis/graph/dist/commands/EXPLAIN");
|
|
18
|
+
LIST: typeof import("@node-redis/graph/dist/commands/LIST");
|
|
19
|
+
list: typeof import("@node-redis/graph/dist/commands/LIST");
|
|
20
|
+
PROFILE: typeof import("@node-redis/graph/dist/commands/PROFILE");
|
|
21
|
+
profile: typeof import("@node-redis/graph/dist/commands/PROFILE");
|
|
22
|
+
QUERY_RO: typeof import("@node-redis/graph/dist/commands/QUERY_RO");
|
|
23
|
+
queryRo: typeof import("@node-redis/graph/dist/commands/QUERY_RO");
|
|
24
|
+
QUERY: typeof import("@node-redis/graph/dist/commands/QUERY");
|
|
25
|
+
query: typeof import("@node-redis/graph/dist/commands/QUERY");
|
|
26
|
+
SLOWLOG: typeof import("@node-redis/graph/dist/commands/SLOWLOG");
|
|
27
|
+
slowLog: typeof import("@node-redis/graph/dist/commands/SLOWLOG");
|
|
28
|
+
};
|
|
9
29
|
json: {
|
|
10
30
|
ARRAPPEND: typeof import("@node-redis/json/dist/commands/ARRAPPEND");
|
|
11
31
|
arrAppend: typeof import("@node-redis/json/dist/commands/ARRAPPEND");
|
|
@@ -229,5 +249,8 @@ declare const modules: {
|
|
|
229
249
|
reserve: typeof import("@node-redis/bloom/dist/commands/top-k/RESERVE");
|
|
230
250
|
};
|
|
231
251
|
};
|
|
232
|
-
export declare
|
|
233
|
-
export declare
|
|
252
|
+
export declare type RedisDefaultModules = typeof modules;
|
|
253
|
+
export declare type RedisClientType<M extends RedisModules = RedisDefaultModules, S extends RedisScripts = Record<string, never>> = _RedisClientType<M, S>;
|
|
254
|
+
export declare function createClient<M extends RedisModules, S extends RedisScripts>(options?: RedisClientOptions<M, S>): _RedisClientType<RedisDefaultModules & M, S>;
|
|
255
|
+
export declare type RedisClusterType<M extends RedisModules = RedisDefaultModules, S extends RedisScripts = Record<string, never>> = _RedisClusterType<M, S>;
|
|
256
|
+
export declare function createCluster<M extends RedisModules, S extends RedisScripts>(options: RedisClusterOptions<M, S>): RedisClusterType<RedisDefaultModules & M, S>;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -13,16 +17,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
13
17
|
exports.createCluster = exports.createClient = void 0;
|
|
14
18
|
const client_1 = require("@node-redis/client");
|
|
15
19
|
const bloom_1 = require("@node-redis/bloom");
|
|
20
|
+
const graph_1 = require("@node-redis/graph");
|
|
16
21
|
const json_1 = require("@node-redis/json");
|
|
17
22
|
const search_1 = require("@node-redis/search");
|
|
18
23
|
const time_series_1 = require("@node-redis/time-series");
|
|
19
24
|
__exportStar(require("@node-redis/client"), exports);
|
|
20
25
|
__exportStar(require("@node-redis/bloom"), exports);
|
|
26
|
+
__exportStar(require("@node-redis/graph"), exports);
|
|
21
27
|
__exportStar(require("@node-redis/json"), exports);
|
|
22
28
|
__exportStar(require("@node-redis/search"), exports);
|
|
23
29
|
__exportStar(require("@node-redis/time-series"), exports);
|
|
24
30
|
const modules = {
|
|
25
31
|
...bloom_1.default,
|
|
32
|
+
graph: graph_1.default,
|
|
26
33
|
json: json_1.default,
|
|
27
34
|
ft: search_1.default,
|
|
28
35
|
ts: time_series_1.default
|
|
@@ -30,14 +37,20 @@ const modules = {
|
|
|
30
37
|
function createClient(options) {
|
|
31
38
|
return (0, client_1.createClient)({
|
|
32
39
|
...options,
|
|
33
|
-
modules
|
|
40
|
+
modules: {
|
|
41
|
+
...modules,
|
|
42
|
+
...options === null || options === void 0 ? void 0 : options.modules
|
|
43
|
+
}
|
|
34
44
|
});
|
|
35
45
|
}
|
|
36
46
|
exports.createClient = createClient;
|
|
37
47
|
function createCluster(options) {
|
|
38
48
|
return (0, client_1.createCluster)({
|
|
39
49
|
...options,
|
|
40
|
-
modules
|
|
50
|
+
modules: {
|
|
51
|
+
...modules,
|
|
52
|
+
...options === null || options === void 0 ? void 0 : options.modules
|
|
53
|
+
}
|
|
41
54
|
});
|
|
42
55
|
}
|
|
43
56
|
exports.createCluster = createCluster;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redis",
|
|
3
3
|
"description": "A modern, high performance Redis client",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.5",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -23,17 +23,18 @@
|
|
|
23
23
|
"gh-pages": "gh-pages -d ./documentation -e ./documentation -u 'documentation-bot <documentation@bot>'"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@node-redis/bloom": "
|
|
27
|
-
"@node-redis/client": "
|
|
28
|
-
"@node-redis/
|
|
29
|
-
"@node-redis/
|
|
30
|
-
"@node-redis/
|
|
26
|
+
"@node-redis/bloom": "1.0.1",
|
|
27
|
+
"@node-redis/client": "1.0.5",
|
|
28
|
+
"@node-redis/graph": "1.0.0",
|
|
29
|
+
"@node-redis/json": "1.0.2",
|
|
30
|
+
"@node-redis/search": "1.0.4",
|
|
31
|
+
"@node-redis/time-series": "1.0.2"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@tsconfig/node12": "^1.0.9",
|
|
34
35
|
"gh-pages": "^3.2.3",
|
|
35
|
-
"release-it": "^14.
|
|
36
|
-
"typescript": "^4.
|
|
36
|
+
"release-it": "^14.13.1",
|
|
37
|
+
"typescript": "^4.6.3"
|
|
37
38
|
},
|
|
38
39
|
"repository": {
|
|
39
40
|
"type": "git",
|
|
@@ -42,9 +43,5 @@
|
|
|
42
43
|
"bugs": {
|
|
43
44
|
"url": "https://github.com/redis/node-redis/issues"
|
|
44
45
|
},
|
|
45
|
-
"homepage": "https://github.com/redis/node-redis"
|
|
46
|
-
"engines": {
|
|
47
|
-
"npm": ">=7",
|
|
48
|
-
"typescript": ">=4"
|
|
49
|
-
}
|
|
46
|
+
"homepage": "https://github.com/redis/node-redis"
|
|
50
47
|
}
|