@redis/json 1.0.6 → 2.0.0-next.2
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/dist/lib/commands/ARRAPPEND.d.ts +9 -0
- package/dist/lib/commands/ARRAPPEND.js +20 -0
- package/dist/lib/commands/ARRINDEX.d.ts +15 -0
- package/dist/lib/commands/ARRINDEX.js +18 -0
- package/dist/lib/commands/ARRINSERT.d.ts +9 -0
- package/dist/lib/commands/ARRINSERT.js +21 -0
- package/dist/lib/commands/ARRLEN.d.ts +11 -0
- package/dist/lib/commands/ARRLEN.js +14 -0
- package/dist/lib/commands/ARRPOP.d.ts +15 -0
- package/dist/lib/commands/ARRPOP.js +23 -0
- package/dist/lib/commands/ARRTRIM.d.ts +8 -0
- package/dist/lib/commands/ARRTRIM.js +10 -0
- package/dist/lib/commands/CLEAR.d.ts +11 -0
- package/dist/lib/commands/CLEAR.js +14 -0
- package/dist/lib/commands/DEBUG_MEMORY.d.ts +11 -0
- package/dist/lib/commands/DEBUG_MEMORY.js +14 -0
- package/dist/lib/commands/DEL.d.ts +11 -0
- package/dist/lib/commands/DEL.js +14 -0
- package/dist/lib/commands/FORGET.d.ts +11 -0
- package/dist/lib/commands/FORGET.js +14 -0
- package/dist/lib/commands/GET.d.ts +13 -0
- package/dist/lib/commands/GET.js +16 -0
- package/dist/lib/commands/MERGE.d.ts +9 -0
- package/dist/lib/commands/MERGE.js +16 -0
- package/dist/lib/commands/MGET.d.ts +8 -0
- package/dist/lib/commands/MGET.js +17 -0
- package/dist/lib/commands/MSET.d.ts +14 -0
- package/dist/lib/commands/MSET.js +20 -0
- package/dist/lib/commands/NUMINCRBY.d.ts +11 -0
- package/dist/lib/commands/NUMINCRBY.js +15 -0
- package/dist/lib/commands/NUMMULTBY.d.ts +11 -0
- package/dist/lib/commands/NUMMULTBY.js +14 -0
- package/dist/lib/commands/OBJKEYS.d.ts +11 -0
- package/dist/lib/commands/OBJKEYS.js +14 -0
- package/dist/lib/commands/OBJLEN.d.ts +11 -0
- package/dist/lib/commands/OBJLEN.js +14 -0
- package/dist/lib/commands/SET.d.ts +20 -0
- package/dist/lib/commands/SET.js +21 -0
- package/dist/lib/commands/STRAPPEND.d.ts +11 -0
- package/dist/lib/commands/STRAPPEND.js +16 -0
- package/dist/lib/commands/STRLEN.d.ts +11 -0
- package/dist/lib/commands/STRLEN.js +14 -0
- package/dist/lib/commands/TOGGLE.d.ts +8 -0
- package/dist/lib/commands/TOGGLE.js +10 -0
- package/dist/lib/commands/TYPE.d.ts +14 -0
- package/dist/lib/commands/TYPE.js +18 -0
- package/dist/lib/commands/index.d.ts +317 -0
- package/dist/lib/commands/index.js +99 -0
- package/dist/{index.js → lib/index.js} +4 -1
- package/package.json +8 -17
- package/dist/commands/ARRAPPEND.d.ts +0 -4
- package/dist/commands/ARRAPPEND.js +0 -13
- package/dist/commands/ARRINDEX.d.ts +0 -5
- package/dist/commands/ARRINDEX.js +0 -17
- package/dist/commands/ARRINSERT.d.ts +0 -4
- package/dist/commands/ARRINSERT.js +0 -13
- package/dist/commands/ARRLEN.d.ts +0 -4
- package/dist/commands/ARRLEN.js +0 -13
- package/dist/commands/ARRPOP.d.ts +0 -4
- package/dist/commands/ARRPOP.js +0 -25
- package/dist/commands/ARRTRIM.d.ts +0 -3
- package/dist/commands/ARRTRIM.js +0 -8
- package/dist/commands/DEBUG_MEMORY.d.ts +0 -3
- package/dist/commands/DEBUG_MEMORY.js +0 -12
- package/dist/commands/DEL.d.ts +0 -3
- package/dist/commands/DEL.js +0 -12
- package/dist/commands/FORGET.d.ts +0 -3
- package/dist/commands/FORGET.js +0 -12
- package/dist/commands/GET.d.ts +0 -12
- package/dist/commands/GET.js +0 -28
- package/dist/commands/MERGE.d.ts +0 -4
- package/dist/commands/MERGE.js +0 -9
- package/dist/commands/MGET.d.ts +0 -4
- package/dist/commands/MGET.js +0 -17
- package/dist/commands/MSET.d.ts +0 -11
- package/dist/commands/MSET.js +0 -18
- package/dist/commands/NUMINCRBY.d.ts +0 -3
- package/dist/commands/NUMINCRBY.js +0 -10
- package/dist/commands/NUMMULTBY.d.ts +0 -3
- package/dist/commands/NUMMULTBY.js +0 -10
- package/dist/commands/OBJKEYS.d.ts +0 -3
- package/dist/commands/OBJKEYS.js +0 -12
- package/dist/commands/OBJLEN.d.ts +0 -3
- package/dist/commands/OBJLEN.js +0 -12
- package/dist/commands/SET.d.ts +0 -11
- package/dist/commands/SET.js +0 -16
- package/dist/commands/STRAPPEND.d.ts +0 -6
- package/dist/commands/STRAPPEND.js +0 -16
- package/dist/commands/STRLEN.d.ts +0 -4
- package/dist/commands/STRLEN.js +0 -13
- package/dist/commands/TYPE.d.ts +0 -3
- package/dist/commands/TYPE.js +0 -12
- package/dist/commands/index.d.ts +0 -80
- package/dist/commands/index.js +0 -89
- /package/dist/{commands → lib/commands}/RESP.d.ts +0 -0
- /package/dist/{commands → lib/commands}/RESP.js +0 -0
- /package/dist/{index.d.ts → lib/index.d.ts} +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RedisArgument, ArrayReply, NumberReply, NullReply } from '@redis/client/dist/lib/RESP/types';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
4
|
+
readonly IS_READ_ONLY: false;
|
|
5
|
+
readonly transformArguments: (this: void, key: RedisArgument, path: RedisArgument) => RedisArgument[];
|
|
6
|
+
readonly transformReply: () => NumberReply | NullReply | ArrayReply<NumberReply | NullReply>;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NullReply, BlobStringReply, ArrayReply, RedisArgument } from '@redis/client/dist/lib/RESP/types';
|
|
2
|
+
export interface JsonTypeOptions {
|
|
3
|
+
path?: RedisArgument;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: {
|
|
6
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
7
|
+
readonly IS_READ_ONLY: true;
|
|
8
|
+
readonly transformArguments: (this: void, key: RedisArgument, options?: JsonTypeOptions) => RedisArgument[];
|
|
9
|
+
readonly transformReply: {
|
|
10
|
+
readonly 2: () => NullReply | BlobStringReply | ArrayReply<BlobStringReply>;
|
|
11
|
+
readonly 3: () => any;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = {
|
|
4
|
+
FIRST_KEY_INDEX: 1,
|
|
5
|
+
IS_READ_ONLY: true,
|
|
6
|
+
transformArguments(key, options) {
|
|
7
|
+
const args = ['JSON.TYPE', key];
|
|
8
|
+
if (options?.path) {
|
|
9
|
+
args.push(options.path);
|
|
10
|
+
}
|
|
11
|
+
return args;
|
|
12
|
+
},
|
|
13
|
+
transformReply: {
|
|
14
|
+
2: undefined,
|
|
15
|
+
// TODO: ?!??!
|
|
16
|
+
3: undefined
|
|
17
|
+
}
|
|
18
|
+
};
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { BlobStringReply, NullReply, UnwrapReply } from '@redis/client/dist/lib/RESP/types';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
ARRAPPEND: {
|
|
4
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
5
|
+
readonly IS_READ_ONLY: false;
|
|
6
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, json: RedisJSON, ...jsons: RedisJSON[]) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
7
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
8
|
+
};
|
|
9
|
+
arrAppend: {
|
|
10
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
11
|
+
readonly IS_READ_ONLY: false;
|
|
12
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, json: RedisJSON, ...jsons: RedisJSON[]) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
13
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
14
|
+
};
|
|
15
|
+
ARRINDEX: {
|
|
16
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
17
|
+
readonly IS_READ_ONLY: true;
|
|
18
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, json: RedisJSON, options?: import("./ARRINDEX").JsonArrIndexOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
19
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
20
|
+
};
|
|
21
|
+
arrIndex: {
|
|
22
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
23
|
+
readonly IS_READ_ONLY: true;
|
|
24
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, json: RedisJSON, options?: import("./ARRINDEX").JsonArrIndexOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
25
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
26
|
+
};
|
|
27
|
+
ARRINSERT: {
|
|
28
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
29
|
+
readonly IS_READ_ONLY: false;
|
|
30
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, index: number, json: RedisJSON, ...jsons: RedisJSON[]) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
31
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
32
|
+
};
|
|
33
|
+
arrInsert: {
|
|
34
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
35
|
+
readonly IS_READ_ONLY: false;
|
|
36
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, index: number, json: RedisJSON, ...jsons: RedisJSON[]) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
37
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
38
|
+
};
|
|
39
|
+
ARRLEN: {
|
|
40
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
41
|
+
readonly IS_READ_ONLY: true;
|
|
42
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./ARRLEN").JsonArrLenOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
43
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
44
|
+
};
|
|
45
|
+
arrLen: {
|
|
46
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
47
|
+
readonly IS_READ_ONLY: true;
|
|
48
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./ARRLEN").JsonArrLenOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
49
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
50
|
+
};
|
|
51
|
+
ARRPOP: {
|
|
52
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
53
|
+
readonly IS_READ_ONLY: false;
|
|
54
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./ARRPOP").RedisArrPopOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
55
|
+
readonly transformReply: (this: void, reply: NullReply | BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").ArrayReply<NullReply | BlobStringReply<string>>) => string | number | boolean | Date | {
|
|
56
|
+
[key: string]: RedisJSON;
|
|
57
|
+
[key: number]: RedisJSON;
|
|
58
|
+
} | NullReply | (RedisJSON | NullReply)[] | null;
|
|
59
|
+
};
|
|
60
|
+
arrPop: {
|
|
61
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
62
|
+
readonly IS_READ_ONLY: false;
|
|
63
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./ARRPOP").RedisArrPopOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
64
|
+
readonly transformReply: (this: void, reply: NullReply | BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").ArrayReply<NullReply | BlobStringReply<string>>) => string | number | boolean | Date | {
|
|
65
|
+
[key: string]: RedisJSON;
|
|
66
|
+
[key: number]: RedisJSON;
|
|
67
|
+
} | NullReply | (RedisJSON | NullReply)[] | null;
|
|
68
|
+
};
|
|
69
|
+
ARRTRIM: {
|
|
70
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
71
|
+
readonly IS_READ_ONLY: false;
|
|
72
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, start: number, stop: number) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
73
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
74
|
+
};
|
|
75
|
+
arrTrim: {
|
|
76
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
77
|
+
readonly IS_READ_ONLY: false;
|
|
78
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, start: number, stop: number) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
79
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
80
|
+
};
|
|
81
|
+
CLEAR: {
|
|
82
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
83
|
+
readonly IS_READ_ONLY: false;
|
|
84
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./CLEAR").JsonClearOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
85
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
|
|
86
|
+
};
|
|
87
|
+
clear: {
|
|
88
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
89
|
+
readonly IS_READ_ONLY: false;
|
|
90
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./CLEAR").JsonClearOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
91
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
|
|
92
|
+
};
|
|
93
|
+
DEBUG_MEMORY: {
|
|
94
|
+
readonly FIRST_KEY_INDEX: 2;
|
|
95
|
+
readonly IS_READ_ONLY: false;
|
|
96
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./DEBUG_MEMORY").JsonDebugMemoryOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
97
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
|
|
98
|
+
};
|
|
99
|
+
debugMemory: {
|
|
100
|
+
readonly FIRST_KEY_INDEX: 2;
|
|
101
|
+
readonly IS_READ_ONLY: false;
|
|
102
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./DEBUG_MEMORY").JsonDebugMemoryOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
103
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
|
|
104
|
+
};
|
|
105
|
+
DEL: {
|
|
106
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
107
|
+
readonly IS_READ_ONLY: false;
|
|
108
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./DEL").JsonDelOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
109
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
|
|
110
|
+
};
|
|
111
|
+
del: {
|
|
112
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
113
|
+
readonly IS_READ_ONLY: false;
|
|
114
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./DEL").JsonDelOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
115
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
|
|
116
|
+
};
|
|
117
|
+
FORGET: {
|
|
118
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
119
|
+
readonly IS_READ_ONLY: false;
|
|
120
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./FORGET").JsonForgetOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
121
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
|
|
122
|
+
};
|
|
123
|
+
forget: {
|
|
124
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
125
|
+
readonly IS_READ_ONLY: false;
|
|
126
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./FORGET").JsonForgetOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
127
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number>;
|
|
128
|
+
};
|
|
129
|
+
GET: {
|
|
130
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
131
|
+
readonly IS_READ_ONLY: false;
|
|
132
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./GET").JsonGetOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
133
|
+
readonly transformReply: typeof transformRedisJsonNullReply;
|
|
134
|
+
};
|
|
135
|
+
get: {
|
|
136
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
137
|
+
readonly IS_READ_ONLY: false;
|
|
138
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./GET").JsonGetOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
139
|
+
readonly transformReply: typeof transformRedisJsonNullReply;
|
|
140
|
+
};
|
|
141
|
+
MERGE: {
|
|
142
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
143
|
+
readonly IS_READ_ONLY: false;
|
|
144
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, value: RedisJSON) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
145
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
|
|
146
|
+
};
|
|
147
|
+
merge: {
|
|
148
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
149
|
+
readonly IS_READ_ONLY: false;
|
|
150
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, value: RedisJSON) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
151
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
|
|
152
|
+
};
|
|
153
|
+
MGET: {
|
|
154
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
155
|
+
readonly IS_READ_ONLY: true;
|
|
156
|
+
readonly transformArguments: (this: void, keys: import("@redis/client/dist/lib/RESP/types").RedisArgument[], path: import("@redis/client/dist/lib/RESP/types").RedisArgument) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
157
|
+
readonly transformReply: (this: void, reply: (NullReply | BlobStringReply<string>)[]) => (RedisJSON | NullReply)[];
|
|
158
|
+
};
|
|
159
|
+
mGet: {
|
|
160
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
161
|
+
readonly IS_READ_ONLY: true;
|
|
162
|
+
readonly transformArguments: (this: void, keys: import("@redis/client/dist/lib/RESP/types").RedisArgument[], path: import("@redis/client/dist/lib/RESP/types").RedisArgument) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
163
|
+
readonly transformReply: (this: void, reply: (NullReply | BlobStringReply<string>)[]) => (RedisJSON | NullReply)[];
|
|
164
|
+
};
|
|
165
|
+
MSET: {
|
|
166
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
167
|
+
readonly IS_READ_ONLY: false;
|
|
168
|
+
readonly transformArguments: (this: void, items: import("./MSET").JsonMSetItem[]) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
169
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
|
|
170
|
+
};
|
|
171
|
+
mSet: {
|
|
172
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
173
|
+
readonly IS_READ_ONLY: false;
|
|
174
|
+
readonly transformArguments: (this: void, items: import("./MSET").JsonMSetItem[]) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
175
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
|
|
176
|
+
};
|
|
177
|
+
NUMINCRBY: {
|
|
178
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
179
|
+
readonly IS_READ_ONLY: false;
|
|
180
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, by: number) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
181
|
+
readonly transformReply: {
|
|
182
|
+
readonly 2: (reply: UnwrapReply<BlobStringReply<string>>) => number | (number | null)[];
|
|
183
|
+
readonly 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply | import("@redis/client/dist/lib/RESP/types").DoubleReply<number>>;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
numIncrBy: {
|
|
187
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
188
|
+
readonly IS_READ_ONLY: false;
|
|
189
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, by: number) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
190
|
+
readonly transformReply: {
|
|
191
|
+
readonly 2: (reply: UnwrapReply<BlobStringReply<string>>) => number | (number | null)[];
|
|
192
|
+
readonly 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply | import("@redis/client/dist/lib/RESP/types").DoubleReply<number>>;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
/**
|
|
196
|
+
* @deprecated since JSON version 2.0
|
|
197
|
+
*/
|
|
198
|
+
NUMMULTBY: {
|
|
199
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
200
|
+
readonly IS_READ_ONLY: false;
|
|
201
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, by: number) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
202
|
+
readonly transformReply: {
|
|
203
|
+
readonly 2: (reply: UnwrapReply<BlobStringReply<string>>) => number | (number | null)[];
|
|
204
|
+
readonly 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply | import("@redis/client/dist/lib/RESP/types").DoubleReply<number>>;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* @deprecated since JSON version 2.0
|
|
209
|
+
*/
|
|
210
|
+
numMultBy: {
|
|
211
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
212
|
+
readonly IS_READ_ONLY: false;
|
|
213
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, by: number) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
214
|
+
readonly transformReply: {
|
|
215
|
+
readonly 2: (reply: UnwrapReply<BlobStringReply<string>>) => number | (number | null)[];
|
|
216
|
+
readonly 3: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply | import("@redis/client/dist/lib/RESP/types").DoubleReply<number>>;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
OBJKEYS: {
|
|
220
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
221
|
+
readonly IS_READ_ONLY: false;
|
|
222
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./OBJKEYS").JsonObjKeysOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
223
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<BlobStringReply<string>> | import("@redis/client/dist/lib/RESP/types").ArrayReply<NullReply | import("@redis/client/dist/lib/RESP/types").ArrayReply<BlobStringReply<string>>>;
|
|
224
|
+
};
|
|
225
|
+
objKeys: {
|
|
226
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
227
|
+
readonly IS_READ_ONLY: false;
|
|
228
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./OBJKEYS").JsonObjKeysOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
229
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").ArrayReply<BlobStringReply<string>> | import("@redis/client/dist/lib/RESP/types").ArrayReply<NullReply | import("@redis/client/dist/lib/RESP/types").ArrayReply<BlobStringReply<string>>>;
|
|
230
|
+
};
|
|
231
|
+
OBJLEN: {
|
|
232
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
233
|
+
readonly IS_READ_ONLY: true;
|
|
234
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./OBJLEN").JsonObjLenOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
235
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
236
|
+
};
|
|
237
|
+
objLen: {
|
|
238
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
239
|
+
readonly IS_READ_ONLY: true;
|
|
240
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./OBJLEN").JsonObjLenOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
241
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
242
|
+
};
|
|
243
|
+
SET: {
|
|
244
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
245
|
+
readonly IS_READ_ONLY: false;
|
|
246
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, json: RedisJSON, options?: import("./SET").JsonSetOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
247
|
+
readonly transformReply: () => NullReply | import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
|
|
248
|
+
};
|
|
249
|
+
set: {
|
|
250
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
251
|
+
readonly IS_READ_ONLY: false;
|
|
252
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument, json: RedisJSON, options?: import("./SET").JsonSetOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
253
|
+
readonly transformReply: () => NullReply | import("@redis/client/dist/lib/RESP/types").SimpleStringReply<"OK">;
|
|
254
|
+
};
|
|
255
|
+
STRAPPEND: {
|
|
256
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
257
|
+
readonly IS_READ_ONLY: false;
|
|
258
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, append: string, options?: import("./STRAPPEND").JsonStrAppendOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
259
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
260
|
+
};
|
|
261
|
+
strAppend: {
|
|
262
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
263
|
+
readonly IS_READ_ONLY: false;
|
|
264
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, append: string, options?: import("./STRAPPEND").JsonStrAppendOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
265
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
266
|
+
};
|
|
267
|
+
STRLEN: {
|
|
268
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
269
|
+
readonly IS_READ_ONLY: true;
|
|
270
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./STRLEN").JsonStrLenOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
271
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
272
|
+
};
|
|
273
|
+
strLen: {
|
|
274
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
275
|
+
readonly IS_READ_ONLY: true;
|
|
276
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./STRLEN").JsonStrLenOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
277
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
278
|
+
};
|
|
279
|
+
TOGGLE: {
|
|
280
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
281
|
+
readonly IS_READ_ONLY: false;
|
|
282
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
283
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
284
|
+
};
|
|
285
|
+
toggle: {
|
|
286
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
287
|
+
readonly IS_READ_ONLY: false;
|
|
288
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, path: import("@redis/client/dist/lib/RESP/types").RedisArgument) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
289
|
+
readonly transformReply: () => import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply | import("@redis/client/dist/lib/RESP/types").ArrayReply<import("@redis/client/dist/lib/RESP/types").NumberReply<number> | NullReply>;
|
|
290
|
+
};
|
|
291
|
+
TYPE: {
|
|
292
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
293
|
+
readonly IS_READ_ONLY: true;
|
|
294
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./TYPE").JsonTypeOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
295
|
+
readonly transformReply: {
|
|
296
|
+
readonly 2: () => NullReply | BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").ArrayReply<BlobStringReply<string>>;
|
|
297
|
+
readonly 3: () => any;
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
type: {
|
|
301
|
+
readonly FIRST_KEY_INDEX: 1;
|
|
302
|
+
readonly IS_READ_ONLY: true;
|
|
303
|
+
readonly transformArguments: (this: void, key: import("@redis/client/dist/lib/RESP/types").RedisArgument, options?: import("./TYPE").JsonTypeOptions | undefined) => import("@redis/client/dist/lib/RESP/types").RedisArgument[];
|
|
304
|
+
readonly transformReply: {
|
|
305
|
+
readonly 2: () => NullReply | BlobStringReply<string> | import("@redis/client/dist/lib/RESP/types").ArrayReply<BlobStringReply<string>>;
|
|
306
|
+
readonly 3: () => any;
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
export default _default;
|
|
311
|
+
export type RedisJSON = null | boolean | number | string | Date | Array<RedisJSON> | {
|
|
312
|
+
[key: string]: RedisJSON;
|
|
313
|
+
[key: number]: RedisJSON;
|
|
314
|
+
};
|
|
315
|
+
export declare function transformRedisJsonArgument(json: RedisJSON): string;
|
|
316
|
+
export declare function transformRedisJsonReply(json: BlobStringReply): RedisJSON;
|
|
317
|
+
export declare function transformRedisJsonNullReply(json: NullReply | BlobStringReply): NullReply | RedisJSON;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.transformRedisJsonNullReply = exports.transformRedisJsonReply = exports.transformRedisJsonArgument = void 0;
|
|
7
|
+
const ARRAPPEND_1 = __importDefault(require("./ARRAPPEND"));
|
|
8
|
+
const ARRINDEX_1 = __importDefault(require("./ARRINDEX"));
|
|
9
|
+
const ARRINSERT_1 = __importDefault(require("./ARRINSERT"));
|
|
10
|
+
const ARRLEN_1 = __importDefault(require("./ARRLEN"));
|
|
11
|
+
const ARRPOP_1 = __importDefault(require("./ARRPOP"));
|
|
12
|
+
const ARRTRIM_1 = __importDefault(require("./ARRTRIM"));
|
|
13
|
+
const CLEAR_1 = __importDefault(require("./CLEAR"));
|
|
14
|
+
const DEBUG_MEMORY_1 = __importDefault(require("./DEBUG_MEMORY"));
|
|
15
|
+
const DEL_1 = __importDefault(require("./DEL"));
|
|
16
|
+
const FORGET_1 = __importDefault(require("./FORGET"));
|
|
17
|
+
const GET_1 = __importDefault(require("./GET"));
|
|
18
|
+
const MERGE_1 = __importDefault(require("./MERGE"));
|
|
19
|
+
const MGET_1 = __importDefault(require("./MGET"));
|
|
20
|
+
const MSET_1 = __importDefault(require("./MSET"));
|
|
21
|
+
const NUMINCRBY_1 = __importDefault(require("./NUMINCRBY"));
|
|
22
|
+
const NUMMULTBY_1 = __importDefault(require("./NUMMULTBY"));
|
|
23
|
+
const OBJKEYS_1 = __importDefault(require("./OBJKEYS"));
|
|
24
|
+
const OBJLEN_1 = __importDefault(require("./OBJLEN"));
|
|
25
|
+
// import RESP from './RESP';
|
|
26
|
+
const SET_1 = __importDefault(require("./SET"));
|
|
27
|
+
const STRAPPEND_1 = __importDefault(require("./STRAPPEND"));
|
|
28
|
+
const STRLEN_1 = __importDefault(require("./STRLEN"));
|
|
29
|
+
const TOGGLE_1 = __importDefault(require("./TOGGLE"));
|
|
30
|
+
const TYPE_1 = __importDefault(require("./TYPE"));
|
|
31
|
+
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
|
|
32
|
+
exports.default = {
|
|
33
|
+
ARRAPPEND: ARRAPPEND_1.default,
|
|
34
|
+
arrAppend: ARRAPPEND_1.default,
|
|
35
|
+
ARRINDEX: ARRINDEX_1.default,
|
|
36
|
+
arrIndex: ARRINDEX_1.default,
|
|
37
|
+
ARRINSERT: ARRINSERT_1.default,
|
|
38
|
+
arrInsert: ARRINSERT_1.default,
|
|
39
|
+
ARRLEN: ARRLEN_1.default,
|
|
40
|
+
arrLen: ARRLEN_1.default,
|
|
41
|
+
ARRPOP: ARRPOP_1.default,
|
|
42
|
+
arrPop: ARRPOP_1.default,
|
|
43
|
+
ARRTRIM: ARRTRIM_1.default,
|
|
44
|
+
arrTrim: ARRTRIM_1.default,
|
|
45
|
+
CLEAR: CLEAR_1.default,
|
|
46
|
+
clear: CLEAR_1.default,
|
|
47
|
+
DEBUG_MEMORY: DEBUG_MEMORY_1.default,
|
|
48
|
+
debugMemory: DEBUG_MEMORY_1.default,
|
|
49
|
+
DEL: DEL_1.default,
|
|
50
|
+
del: DEL_1.default,
|
|
51
|
+
FORGET: FORGET_1.default,
|
|
52
|
+
forget: FORGET_1.default,
|
|
53
|
+
GET: GET_1.default,
|
|
54
|
+
get: GET_1.default,
|
|
55
|
+
MERGE: MERGE_1.default,
|
|
56
|
+
merge: MERGE_1.default,
|
|
57
|
+
MGET: MGET_1.default,
|
|
58
|
+
mGet: MGET_1.default,
|
|
59
|
+
MSET: MSET_1.default,
|
|
60
|
+
mSet: MSET_1.default,
|
|
61
|
+
NUMINCRBY: NUMINCRBY_1.default,
|
|
62
|
+
numIncrBy: NUMINCRBY_1.default,
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated since JSON version 2.0
|
|
65
|
+
*/
|
|
66
|
+
NUMMULTBY: NUMMULTBY_1.default,
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated since JSON version 2.0
|
|
69
|
+
*/
|
|
70
|
+
numMultBy: NUMMULTBY_1.default,
|
|
71
|
+
OBJKEYS: OBJKEYS_1.default,
|
|
72
|
+
objKeys: OBJKEYS_1.default,
|
|
73
|
+
OBJLEN: OBJLEN_1.default,
|
|
74
|
+
objLen: OBJLEN_1.default,
|
|
75
|
+
// RESP,
|
|
76
|
+
// resp: RESP,
|
|
77
|
+
SET: SET_1.default,
|
|
78
|
+
set: SET_1.default,
|
|
79
|
+
STRAPPEND: STRAPPEND_1.default,
|
|
80
|
+
strAppend: STRAPPEND_1.default,
|
|
81
|
+
STRLEN: STRLEN_1.default,
|
|
82
|
+
strLen: STRLEN_1.default,
|
|
83
|
+
TOGGLE: TOGGLE_1.default,
|
|
84
|
+
toggle: TOGGLE_1.default,
|
|
85
|
+
TYPE: TYPE_1.default,
|
|
86
|
+
type: TYPE_1.default
|
|
87
|
+
};
|
|
88
|
+
function transformRedisJsonArgument(json) {
|
|
89
|
+
return JSON.stringify(json);
|
|
90
|
+
}
|
|
91
|
+
exports.transformRedisJsonArgument = transformRedisJsonArgument;
|
|
92
|
+
function transformRedisJsonReply(json) {
|
|
93
|
+
return JSON.parse(json.toString());
|
|
94
|
+
}
|
|
95
|
+
exports.transformRedisJsonReply = transformRedisJsonReply;
|
|
96
|
+
function transformRedisJsonNullReply(json) {
|
|
97
|
+
return (0, generic_transformers_1.isNullReply)(json) ? json : transformRedisJsonReply(json);
|
|
98
|
+
}
|
|
99
|
+
exports.transformRedisJsonNullReply = transformRedisJsonNullReply;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.default = void 0;
|
|
4
7
|
var commands_1 = require("./commands");
|
|
5
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return commands_1.default; } });
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(commands_1).default; } });
|
package/package.json
CHANGED
|
@@ -1,30 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redis/json",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-next.2",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
|
-
"types": "./dist/index.d.ts",
|
|
5
|
+
"main": "./dist/lib/index.js",
|
|
6
|
+
"types": "./dist/lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
-
"dist/"
|
|
8
|
+
"dist/",
|
|
9
|
+
"!dist/tsconfig.tsbuildinfo"
|
|
9
10
|
],
|
|
10
11
|
"scripts": {
|
|
11
|
-
"test": "nyc -r text-summary -r lcov mocha -r
|
|
12
|
-
"build": "tsc",
|
|
13
|
-
"documentation": "typedoc"
|
|
12
|
+
"test": "nyc -r text-summary -r lcov mocha -r tsx './lib/**/*.spec.ts'"
|
|
14
13
|
},
|
|
15
14
|
"peerDependencies": {
|
|
16
|
-
"@redis/client": "^
|
|
15
|
+
"@redis/client": "^2.0.0-next.4"
|
|
17
16
|
},
|
|
18
17
|
"devDependencies": {
|
|
19
|
-
"@
|
|
20
|
-
"@redis/test-utils": "*",
|
|
21
|
-
"@types/node": "^20.6.2",
|
|
22
|
-
"nyc": "^15.1.0",
|
|
23
|
-
"release-it": "^16.1.5",
|
|
24
|
-
"source-map-support": "^0.5.21",
|
|
25
|
-
"ts-node": "^10.9.1",
|
|
26
|
-
"typedoc": "^0.25.1",
|
|
27
|
-
"typescript": "^5.2.2"
|
|
18
|
+
"@redis/test-utils": "*"
|
|
28
19
|
},
|
|
29
20
|
"repository": {
|
|
30
21
|
"type": "git",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
const _1 = require(".");
|
|
5
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
6
|
-
function transformArguments(key, path, ...jsons) {
|
|
7
|
-
const args = ['JSON.ARRAPPEND', key, path];
|
|
8
|
-
for (const json of jsons) {
|
|
9
|
-
args.push((0, _1.transformRedisJsonArgument)(json));
|
|
10
|
-
}
|
|
11
|
-
return args;
|
|
12
|
-
}
|
|
13
|
-
exports.transformArguments = transformArguments;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { RedisJSON } from '.';
|
|
2
|
-
export declare const FIRST_KEY_INDEX = 1;
|
|
3
|
-
export declare const IS_READ_ONLY = true;
|
|
4
|
-
export declare function transformArguments(key: string, path: string, json: RedisJSON, start?: number, stop?: number): Array<string>;
|
|
5
|
-
export declare function transformReply(): number | Array<number>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
const _1 = require(".");
|
|
5
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
6
|
-
exports.IS_READ_ONLY = true;
|
|
7
|
-
function transformArguments(key, path, json, start, stop) {
|
|
8
|
-
const args = ['JSON.ARRINDEX', key, path, (0, _1.transformRedisJsonArgument)(json)];
|
|
9
|
-
if (start !== undefined && start !== null) {
|
|
10
|
-
args.push(start.toString());
|
|
11
|
-
if (stop !== undefined && stop !== null) {
|
|
12
|
-
args.push(stop.toString());
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return args;
|
|
16
|
-
}
|
|
17
|
-
exports.transformArguments = transformArguments;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
const _1 = require(".");
|
|
5
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
6
|
-
function transformArguments(key, path, index, ...jsons) {
|
|
7
|
-
const args = ['JSON.ARRINSERT', key, path, index.toString()];
|
|
8
|
-
for (const json of jsons) {
|
|
9
|
-
args.push((0, _1.transformRedisJsonArgument)(json));
|
|
10
|
-
}
|
|
11
|
-
return args;
|
|
12
|
-
}
|
|
13
|
-
exports.transformArguments = transformArguments;
|
package/dist/commands/ARRLEN.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
5
|
-
exports.IS_READ_ONLY = true;
|
|
6
|
-
function transformArguments(key, path) {
|
|
7
|
-
const args = ['JSON.ARRLEN', key];
|
|
8
|
-
if (path) {
|
|
9
|
-
args.push(path);
|
|
10
|
-
}
|
|
11
|
-
return args;
|
|
12
|
-
}
|
|
13
|
-
exports.transformArguments = transformArguments;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { RedisJSON } from '.';
|
|
2
|
-
export declare const FIRST_KEY_INDEX = 1;
|
|
3
|
-
export declare function transformArguments(key: string, path?: string, index?: number): Array<string>;
|
|
4
|
-
export declare function transformReply(reply: null | string | Array<null | string>): null | RedisJSON | Array<RedisJSON>;
|