@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
package/dist/commands/ARRPOP.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
const _1 = require(".");
|
|
5
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
6
|
-
function transformArguments(key, path, index) {
|
|
7
|
-
const args = ['JSON.ARRPOP', key];
|
|
8
|
-
if (path) {
|
|
9
|
-
args.push(path);
|
|
10
|
-
if (index !== undefined && index !== null) {
|
|
11
|
-
args.push(index.toString());
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return args;
|
|
15
|
-
}
|
|
16
|
-
exports.transformArguments = transformArguments;
|
|
17
|
-
function transformReply(reply) {
|
|
18
|
-
if (reply === null)
|
|
19
|
-
return null;
|
|
20
|
-
if (Array.isArray(reply)) {
|
|
21
|
-
return reply.map(_1.transformRedisJsonNullReply);
|
|
22
|
-
}
|
|
23
|
-
return (0, _1.transformRedisJsonNullReply)(reply);
|
|
24
|
-
}
|
|
25
|
-
exports.transformReply = transformReply;
|
package/dist/commands/ARRTRIM.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
5
|
-
function transformArguments(key, path, start, stop) {
|
|
6
|
-
return ['JSON.ARRTRIM', key, path, start.toString(), stop.toString()];
|
|
7
|
-
}
|
|
8
|
-
exports.transformArguments = transformArguments;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
exports.FIRST_KEY_INDEX = 2;
|
|
5
|
-
function transformArguments(key, path) {
|
|
6
|
-
const args = ['JSON.DEBUG', 'MEMORY', key];
|
|
7
|
-
if (path) {
|
|
8
|
-
args.push(path);
|
|
9
|
-
}
|
|
10
|
-
return args;
|
|
11
|
-
}
|
|
12
|
-
exports.transformArguments = transformArguments;
|
package/dist/commands/DEL.d.ts
DELETED
package/dist/commands/DEL.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
5
|
-
function transformArguments(key, path) {
|
|
6
|
-
const args = ['JSON.DEL', key];
|
|
7
|
-
if (path) {
|
|
8
|
-
args.push(path);
|
|
9
|
-
}
|
|
10
|
-
return args;
|
|
11
|
-
}
|
|
12
|
-
exports.transformArguments = transformArguments;
|
package/dist/commands/FORGET.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
5
|
-
function transformArguments(key, path) {
|
|
6
|
-
const args = ['JSON.FORGET', key];
|
|
7
|
-
if (path) {
|
|
8
|
-
args.push(path);
|
|
9
|
-
}
|
|
10
|
-
return args;
|
|
11
|
-
}
|
|
12
|
-
exports.transformArguments = transformArguments;
|
package/dist/commands/GET.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { RedisCommandArguments } from '@redis/client/dist/lib/commands';
|
|
2
|
-
export declare const FIRST_KEY_INDEX = 1;
|
|
3
|
-
export declare const IS_READ_ONLY = true;
|
|
4
|
-
interface GetOptions {
|
|
5
|
-
path?: string | Array<string>;
|
|
6
|
-
INDENT?: string;
|
|
7
|
-
NEWLINE?: string;
|
|
8
|
-
SPACE?: string;
|
|
9
|
-
NOESCAPE?: true;
|
|
10
|
-
}
|
|
11
|
-
export declare function transformArguments(key: string, options?: GetOptions): RedisCommandArguments;
|
|
12
|
-
export { transformRedisJsonNullReply as transformReply } from '.';
|
package/dist/commands/GET.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
|
|
5
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
6
|
-
exports.IS_READ_ONLY = true;
|
|
7
|
-
function transformArguments(key, options) {
|
|
8
|
-
let args = ['JSON.GET', key];
|
|
9
|
-
if (options?.path) {
|
|
10
|
-
args = (0, generic_transformers_1.pushVerdictArguments)(args, options.path);
|
|
11
|
-
}
|
|
12
|
-
if (options?.INDENT) {
|
|
13
|
-
args.push('INDENT', options.INDENT);
|
|
14
|
-
}
|
|
15
|
-
if (options?.NEWLINE) {
|
|
16
|
-
args.push('NEWLINE', options.NEWLINE);
|
|
17
|
-
}
|
|
18
|
-
if (options?.SPACE) {
|
|
19
|
-
args.push('SPACE', options.SPACE);
|
|
20
|
-
}
|
|
21
|
-
if (options?.NOESCAPE) {
|
|
22
|
-
args.push('NOESCAPE');
|
|
23
|
-
}
|
|
24
|
-
return args;
|
|
25
|
-
}
|
|
26
|
-
exports.transformArguments = transformArguments;
|
|
27
|
-
var _1 = require(".");
|
|
28
|
-
Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _1.transformRedisJsonNullReply; } });
|
package/dist/commands/MERGE.d.ts
DELETED
package/dist/commands/MERGE.js
DELETED
|
@@ -1,9 +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, json) {
|
|
7
|
-
return ['JSON.MERGE', key, path, (0, _1.transformRedisJsonArgument)(json)];
|
|
8
|
-
}
|
|
9
|
-
exports.transformArguments = transformArguments;
|
package/dist/commands/MGET.d.ts
DELETED
package/dist/commands/MGET.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
const _1 = require(".");
|
|
5
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
6
|
-
function transformArguments(keys, path) {
|
|
7
|
-
return [
|
|
8
|
-
'JSON.MGET',
|
|
9
|
-
...keys,
|
|
10
|
-
path
|
|
11
|
-
];
|
|
12
|
-
}
|
|
13
|
-
exports.transformArguments = transformArguments;
|
|
14
|
-
function transformReply(reply) {
|
|
15
|
-
return reply.map(_1.transformRedisJsonNullReply);
|
|
16
|
-
}
|
|
17
|
-
exports.transformReply = transformReply;
|
package/dist/commands/MSET.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { RedisJSON } from '.';
|
|
2
|
-
import { RedisCommandArgument } from '@redis/client/dist/lib/commands';
|
|
3
|
-
export declare const FIRST_KEY_INDEX = 1;
|
|
4
|
-
interface JsonMSetItem {
|
|
5
|
-
key: RedisCommandArgument;
|
|
6
|
-
path: RedisCommandArgument;
|
|
7
|
-
value: RedisJSON;
|
|
8
|
-
}
|
|
9
|
-
export declare function transformArguments(items: Array<JsonMSetItem>): Array<string>;
|
|
10
|
-
export declare function transformReply(): 'OK';
|
|
11
|
-
export {};
|
package/dist/commands/MSET.js
DELETED
|
@@ -1,18 +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(items) {
|
|
7
|
-
const args = new Array(1 + items.length * 3);
|
|
8
|
-
args[0] = 'JSON.MSET';
|
|
9
|
-
let argsIndex = 1;
|
|
10
|
-
for (let i = 0; i < items.length; i++) {
|
|
11
|
-
const item = items[i];
|
|
12
|
-
args[argsIndex++] = item.key;
|
|
13
|
-
args[argsIndex++] = item.path;
|
|
14
|
-
args[argsIndex++] = (0, _1.transformRedisJsonArgument)(item.value);
|
|
15
|
-
}
|
|
16
|
-
return args;
|
|
17
|
-
}
|
|
18
|
-
exports.transformArguments = transformArguments;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
5
|
-
function transformArguments(key, path, by) {
|
|
6
|
-
return ['JSON.NUMINCRBY', key, path, by.toString()];
|
|
7
|
-
}
|
|
8
|
-
exports.transformArguments = transformArguments;
|
|
9
|
-
var _1 = require(".");
|
|
10
|
-
Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _1.transformNumbersReply; } });
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
5
|
-
function transformArguments(key, path, by) {
|
|
6
|
-
return ['JSON.NUMMULTBY', key, path, by.toString()];
|
|
7
|
-
}
|
|
8
|
-
exports.transformArguments = transformArguments;
|
|
9
|
-
var _1 = require(".");
|
|
10
|
-
Object.defineProperty(exports, "transformReply", { enumerable: true, get: function () { return _1.transformNumbersReply; } });
|
package/dist/commands/OBJKEYS.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
5
|
-
function transformArguments(key, path) {
|
|
6
|
-
const args = ['JSON.OBJKEYS', key];
|
|
7
|
-
if (path) {
|
|
8
|
-
args.push(path);
|
|
9
|
-
}
|
|
10
|
-
return args;
|
|
11
|
-
}
|
|
12
|
-
exports.transformArguments = transformArguments;
|
package/dist/commands/OBJLEN.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
5
|
-
function transformArguments(key, path) {
|
|
6
|
-
const args = ['JSON.OBJLEN', key];
|
|
7
|
-
if (path) {
|
|
8
|
-
args.push(path);
|
|
9
|
-
}
|
|
10
|
-
return args;
|
|
11
|
-
}
|
|
12
|
-
exports.transformArguments = transformArguments;
|
package/dist/commands/SET.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { RedisJSON } from '.';
|
|
2
|
-
export declare const FIRST_KEY_INDEX = 1;
|
|
3
|
-
interface NX {
|
|
4
|
-
NX: true;
|
|
5
|
-
}
|
|
6
|
-
interface XX {
|
|
7
|
-
XX: true;
|
|
8
|
-
}
|
|
9
|
-
export declare function transformArguments(key: string, path: string, json: RedisJSON, options?: NX | XX): Array<string>;
|
|
10
|
-
export declare function transformReply(): 'OK' | null;
|
|
11
|
-
export {};
|
package/dist/commands/SET.js
DELETED
|
@@ -1,16 +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, json, options) {
|
|
7
|
-
const args = ['JSON.SET', key, path, (0, _1.transformRedisJsonArgument)(json)];
|
|
8
|
-
if (options?.NX) {
|
|
9
|
-
args.push('NX');
|
|
10
|
-
}
|
|
11
|
-
else if (options?.XX) {
|
|
12
|
-
args.push('XX');
|
|
13
|
-
}
|
|
14
|
-
return args;
|
|
15
|
-
}
|
|
16
|
-
exports.transformArguments = transformArguments;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare const FIRST_KEY_INDEX = 1;
|
|
2
|
-
type AppendArguments = [key: string, append: string];
|
|
3
|
-
type AppendWithPathArguments = [key: string, path: string, append: string];
|
|
4
|
-
export declare function transformArguments(...[key, pathOrAppend, append]: AppendArguments | AppendWithPathArguments): Array<string>;
|
|
5
|
-
export declare function transformReply(): number | Array<number>;
|
|
6
|
-
export {};
|
|
@@ -1,16 +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, pathOrAppend, append]) {
|
|
7
|
-
const args = ['JSON.STRAPPEND', key];
|
|
8
|
-
if (append !== undefined && append !== null) {
|
|
9
|
-
args.push(pathOrAppend, (0, _1.transformRedisJsonArgument)(append));
|
|
10
|
-
}
|
|
11
|
-
else {
|
|
12
|
-
args.push((0, _1.transformRedisJsonArgument)(pathOrAppend));
|
|
13
|
-
}
|
|
14
|
-
return args;
|
|
15
|
-
}
|
|
16
|
-
exports.transformArguments = transformArguments;
|
package/dist/commands/STRLEN.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.STRLEN', key];
|
|
8
|
-
if (path) {
|
|
9
|
-
args.push(path);
|
|
10
|
-
}
|
|
11
|
-
return args;
|
|
12
|
-
}
|
|
13
|
-
exports.transformArguments = transformArguments;
|
package/dist/commands/TYPE.d.ts
DELETED
package/dist/commands/TYPE.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0;
|
|
4
|
-
exports.FIRST_KEY_INDEX = 1;
|
|
5
|
-
function transformArguments(key, path) {
|
|
6
|
-
const args = ['JSON.TYPE', key];
|
|
7
|
-
if (path) {
|
|
8
|
-
args.push(path);
|
|
9
|
-
}
|
|
10
|
-
return args;
|
|
11
|
-
}
|
|
12
|
-
exports.transformArguments = transformArguments;
|
package/dist/commands/index.d.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import * as ARRAPPEND from './ARRAPPEND';
|
|
2
|
-
import * as ARRINDEX from './ARRINDEX';
|
|
3
|
-
import * as ARRINSERT from './ARRINSERT';
|
|
4
|
-
import * as ARRLEN from './ARRLEN';
|
|
5
|
-
import * as ARRPOP from './ARRPOP';
|
|
6
|
-
import * as ARRTRIM from './ARRTRIM';
|
|
7
|
-
import * as DEBUG_MEMORY from './DEBUG_MEMORY';
|
|
8
|
-
import * as DEL from './DEL';
|
|
9
|
-
import * as FORGET from './FORGET';
|
|
10
|
-
import * as GET from './GET';
|
|
11
|
-
import * as MERGE from './MERGE';
|
|
12
|
-
import * as MGET from './MGET';
|
|
13
|
-
import * as MSET from './MSET';
|
|
14
|
-
import * as NUMINCRBY from './NUMINCRBY';
|
|
15
|
-
import * as NUMMULTBY from './NUMMULTBY';
|
|
16
|
-
import * as OBJKEYS from './OBJKEYS';
|
|
17
|
-
import * as OBJLEN from './OBJLEN';
|
|
18
|
-
import * as RESP from './RESP';
|
|
19
|
-
import * as SET from './SET';
|
|
20
|
-
import * as STRAPPEND from './STRAPPEND';
|
|
21
|
-
import * as STRLEN from './STRLEN';
|
|
22
|
-
import * as TYPE from './TYPE';
|
|
23
|
-
declare const _default: {
|
|
24
|
-
ARRAPPEND: typeof ARRAPPEND;
|
|
25
|
-
arrAppend: typeof ARRAPPEND;
|
|
26
|
-
ARRINDEX: typeof ARRINDEX;
|
|
27
|
-
arrIndex: typeof ARRINDEX;
|
|
28
|
-
ARRINSERT: typeof ARRINSERT;
|
|
29
|
-
arrInsert: typeof ARRINSERT;
|
|
30
|
-
ARRLEN: typeof ARRLEN;
|
|
31
|
-
arrLen: typeof ARRLEN;
|
|
32
|
-
ARRPOP: typeof ARRPOP;
|
|
33
|
-
arrPop: typeof ARRPOP;
|
|
34
|
-
ARRTRIM: typeof ARRTRIM;
|
|
35
|
-
arrTrim: typeof ARRTRIM;
|
|
36
|
-
DEBUG_MEMORY: typeof DEBUG_MEMORY;
|
|
37
|
-
debugMemory: typeof DEBUG_MEMORY;
|
|
38
|
-
DEL: typeof DEL;
|
|
39
|
-
del: typeof DEL;
|
|
40
|
-
FORGET: typeof FORGET;
|
|
41
|
-
forget: typeof FORGET;
|
|
42
|
-
GET: typeof GET;
|
|
43
|
-
get: typeof GET;
|
|
44
|
-
MERGE: typeof MERGE;
|
|
45
|
-
merge: typeof MERGE;
|
|
46
|
-
MGET: typeof MGET;
|
|
47
|
-
mGet: typeof MGET;
|
|
48
|
-
MSET: typeof MSET;
|
|
49
|
-
mSet: typeof MSET;
|
|
50
|
-
NUMINCRBY: typeof NUMINCRBY;
|
|
51
|
-
numIncrBy: typeof NUMINCRBY;
|
|
52
|
-
NUMMULTBY: typeof NUMMULTBY;
|
|
53
|
-
numMultBy: typeof NUMMULTBY;
|
|
54
|
-
OBJKEYS: typeof OBJKEYS;
|
|
55
|
-
objKeys: typeof OBJKEYS;
|
|
56
|
-
OBJLEN: typeof OBJLEN;
|
|
57
|
-
objLen: typeof OBJLEN;
|
|
58
|
-
RESP: typeof RESP;
|
|
59
|
-
resp: typeof RESP;
|
|
60
|
-
SET: typeof SET;
|
|
61
|
-
set: typeof SET;
|
|
62
|
-
STRAPPEND: typeof STRAPPEND;
|
|
63
|
-
strAppend: typeof STRAPPEND;
|
|
64
|
-
STRLEN: typeof STRLEN;
|
|
65
|
-
strLen: typeof STRLEN;
|
|
66
|
-
TYPE: typeof TYPE;
|
|
67
|
-
type: typeof TYPE;
|
|
68
|
-
};
|
|
69
|
-
export default _default;
|
|
70
|
-
interface RedisJSONArray extends Array<RedisJSON> {
|
|
71
|
-
}
|
|
72
|
-
interface RedisJSONObject {
|
|
73
|
-
[key: string]: RedisJSON;
|
|
74
|
-
[key: number]: RedisJSON;
|
|
75
|
-
}
|
|
76
|
-
export type RedisJSON = null | boolean | number | string | Date | RedisJSONArray | RedisJSONObject;
|
|
77
|
-
export declare function transformRedisJsonArgument(json: RedisJSON): string;
|
|
78
|
-
export declare function transformRedisJsonReply(json: string): RedisJSON;
|
|
79
|
-
export declare function transformRedisJsonNullReply(json: string | null): RedisJSON | null;
|
|
80
|
-
export declare function transformNumbersReply(reply: string): number | Array<number>;
|
package/dist/commands/index.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transformNumbersReply = exports.transformRedisJsonNullReply = exports.transformRedisJsonReply = exports.transformRedisJsonArgument = void 0;
|
|
4
|
-
const ARRAPPEND = require("./ARRAPPEND");
|
|
5
|
-
const ARRINDEX = require("./ARRINDEX");
|
|
6
|
-
const ARRINSERT = require("./ARRINSERT");
|
|
7
|
-
const ARRLEN = require("./ARRLEN");
|
|
8
|
-
const ARRPOP = require("./ARRPOP");
|
|
9
|
-
const ARRTRIM = require("./ARRTRIM");
|
|
10
|
-
const DEBUG_MEMORY = require("./DEBUG_MEMORY");
|
|
11
|
-
const DEL = require("./DEL");
|
|
12
|
-
const FORGET = require("./FORGET");
|
|
13
|
-
const GET = require("./GET");
|
|
14
|
-
const MERGE = require("./MERGE");
|
|
15
|
-
const MGET = require("./MGET");
|
|
16
|
-
const MSET = require("./MSET");
|
|
17
|
-
const NUMINCRBY = require("./NUMINCRBY");
|
|
18
|
-
const NUMMULTBY = require("./NUMMULTBY");
|
|
19
|
-
const OBJKEYS = require("./OBJKEYS");
|
|
20
|
-
const OBJLEN = require("./OBJLEN");
|
|
21
|
-
const RESP = require("./RESP");
|
|
22
|
-
const SET = require("./SET");
|
|
23
|
-
const STRAPPEND = require("./STRAPPEND");
|
|
24
|
-
const STRLEN = require("./STRLEN");
|
|
25
|
-
const TYPE = require("./TYPE");
|
|
26
|
-
exports.default = {
|
|
27
|
-
ARRAPPEND,
|
|
28
|
-
arrAppend: ARRAPPEND,
|
|
29
|
-
ARRINDEX,
|
|
30
|
-
arrIndex: ARRINDEX,
|
|
31
|
-
ARRINSERT,
|
|
32
|
-
arrInsert: ARRINSERT,
|
|
33
|
-
ARRLEN,
|
|
34
|
-
arrLen: ARRLEN,
|
|
35
|
-
ARRPOP,
|
|
36
|
-
arrPop: ARRPOP,
|
|
37
|
-
ARRTRIM,
|
|
38
|
-
arrTrim: ARRTRIM,
|
|
39
|
-
DEBUG_MEMORY,
|
|
40
|
-
debugMemory: DEBUG_MEMORY,
|
|
41
|
-
DEL,
|
|
42
|
-
del: DEL,
|
|
43
|
-
FORGET,
|
|
44
|
-
forget: FORGET,
|
|
45
|
-
GET,
|
|
46
|
-
get: GET,
|
|
47
|
-
MERGE,
|
|
48
|
-
merge: MERGE,
|
|
49
|
-
MGET,
|
|
50
|
-
mGet: MGET,
|
|
51
|
-
MSET,
|
|
52
|
-
mSet: MSET,
|
|
53
|
-
NUMINCRBY,
|
|
54
|
-
numIncrBy: NUMINCRBY,
|
|
55
|
-
NUMMULTBY,
|
|
56
|
-
numMultBy: NUMMULTBY,
|
|
57
|
-
OBJKEYS,
|
|
58
|
-
objKeys: OBJKEYS,
|
|
59
|
-
OBJLEN,
|
|
60
|
-
objLen: OBJLEN,
|
|
61
|
-
RESP,
|
|
62
|
-
resp: RESP,
|
|
63
|
-
SET,
|
|
64
|
-
set: SET,
|
|
65
|
-
STRAPPEND,
|
|
66
|
-
strAppend: STRAPPEND,
|
|
67
|
-
STRLEN,
|
|
68
|
-
strLen: STRLEN,
|
|
69
|
-
TYPE,
|
|
70
|
-
type: TYPE
|
|
71
|
-
};
|
|
72
|
-
function transformRedisJsonArgument(json) {
|
|
73
|
-
return JSON.stringify(json);
|
|
74
|
-
}
|
|
75
|
-
exports.transformRedisJsonArgument = transformRedisJsonArgument;
|
|
76
|
-
function transformRedisJsonReply(json) {
|
|
77
|
-
return JSON.parse(json);
|
|
78
|
-
}
|
|
79
|
-
exports.transformRedisJsonReply = transformRedisJsonReply;
|
|
80
|
-
function transformRedisJsonNullReply(json) {
|
|
81
|
-
if (json === null)
|
|
82
|
-
return null;
|
|
83
|
-
return transformRedisJsonReply(json);
|
|
84
|
-
}
|
|
85
|
-
exports.transformRedisJsonNullReply = transformRedisJsonNullReply;
|
|
86
|
-
function transformNumbersReply(reply) {
|
|
87
|
-
return JSON.parse(reply);
|
|
88
|
-
}
|
|
89
|
-
exports.transformNumbersReply = transformNumbersReply;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|