@redis/json 2.0.0-next.2 → 5.0.0-next.6

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.
Files changed (106) hide show
  1. package/README.md +10 -14
  2. package/dist/lib/commands/ARRAPPEND.d.ts +3 -2
  3. package/dist/lib/commands/ARRAPPEND.d.ts.map +1 -0
  4. package/dist/lib/commands/ARRAPPEND.js +6 -10
  5. package/dist/lib/commands/ARRAPPEND.js.map +1 -0
  6. package/dist/lib/commands/ARRINDEX.d.ts +3 -2
  7. package/dist/lib/commands/ARRINDEX.d.ts.map +1 -0
  8. package/dist/lib/commands/ARRINDEX.js +7 -6
  9. package/dist/lib/commands/ARRINDEX.js.map +1 -0
  10. package/dist/lib/commands/ARRINSERT.d.ts +3 -2
  11. package/dist/lib/commands/ARRINSERT.d.ts.map +1 -0
  12. package/dist/lib/commands/ARRINSERT.js +6 -11
  13. package/dist/lib/commands/ARRINSERT.js.map +1 -0
  14. package/dist/lib/commands/ARRLEN.d.ts +3 -2
  15. package/dist/lib/commands/ARRLEN.d.ts.map +1 -0
  16. package/dist/lib/commands/ARRLEN.js +5 -5
  17. package/dist/lib/commands/ARRLEN.js.map +1 -0
  18. package/dist/lib/commands/ARRPOP.d.ts +3 -2
  19. package/dist/lib/commands/ARRPOP.d.ts.map +1 -0
  20. package/dist/lib/commands/ARRPOP.js +6 -6
  21. package/dist/lib/commands/ARRPOP.js.map +1 -0
  22. package/dist/lib/commands/ARRTRIM.d.ts +3 -2
  23. package/dist/lib/commands/ARRTRIM.d.ts.map +1 -0
  24. package/dist/lib/commands/ARRTRIM.js +5 -3
  25. package/dist/lib/commands/ARRTRIM.js.map +1 -0
  26. package/dist/lib/commands/CLEAR.d.ts +3 -2
  27. package/dist/lib/commands/CLEAR.d.ts.map +1 -0
  28. package/dist/lib/commands/CLEAR.js +5 -5
  29. package/dist/lib/commands/CLEAR.js.map +1 -0
  30. package/dist/lib/commands/DEBUG_MEMORY.d.ts +3 -2
  31. package/dist/lib/commands/DEBUG_MEMORY.d.ts.map +1 -0
  32. package/dist/lib/commands/DEBUG_MEMORY.js +5 -5
  33. package/dist/lib/commands/DEBUG_MEMORY.js.map +1 -0
  34. package/dist/lib/commands/DEL.d.ts +3 -2
  35. package/dist/lib/commands/DEL.d.ts.map +1 -0
  36. package/dist/lib/commands/DEL.js +5 -5
  37. package/dist/lib/commands/DEL.js.map +1 -0
  38. package/dist/lib/commands/FORGET.d.ts +3 -2
  39. package/dist/lib/commands/FORGET.d.ts.map +1 -0
  40. package/dist/lib/commands/FORGET.js +5 -5
  41. package/dist/lib/commands/FORGET.js.map +1 -0
  42. package/dist/lib/commands/GET.d.ts +3 -2
  43. package/dist/lib/commands/GET.d.ts.map +1 -0
  44. package/dist/lib/commands/GET.js +5 -6
  45. package/dist/lib/commands/GET.js.map +1 -0
  46. package/dist/lib/commands/MERGE.d.ts +3 -2
  47. package/dist/lib/commands/MERGE.d.ts.map +1 -0
  48. package/dist/lib/commands/MERGE.js +5 -8
  49. package/dist/lib/commands/MERGE.js.map +1 -0
  50. package/dist/lib/commands/MGET.d.ts +3 -2
  51. package/dist/lib/commands/MGET.d.ts.map +1 -0
  52. package/dist/lib/commands/MGET.js +5 -7
  53. package/dist/lib/commands/MGET.js.map +1 -0
  54. package/dist/lib/commands/MSET.d.ts +3 -2
  55. package/dist/lib/commands/MSET.d.ts.map +1 -0
  56. package/dist/lib/commands/MSET.js +5 -10
  57. package/dist/lib/commands/MSET.js.map +1 -0
  58. package/dist/lib/commands/NUMINCRBY.d.ts +3 -2
  59. package/dist/lib/commands/NUMINCRBY.d.ts.map +1 -0
  60. package/dist/lib/commands/NUMINCRBY.js +5 -3
  61. package/dist/lib/commands/NUMINCRBY.js.map +1 -0
  62. package/dist/lib/commands/NUMMULTBY.d.ts +3 -2
  63. package/dist/lib/commands/NUMMULTBY.d.ts.map +1 -0
  64. package/dist/lib/commands/NUMMULTBY.js +5 -3
  65. package/dist/lib/commands/NUMMULTBY.js.map +1 -0
  66. package/dist/lib/commands/OBJKEYS.d.ts +3 -2
  67. package/dist/lib/commands/OBJKEYS.d.ts.map +1 -0
  68. package/dist/lib/commands/OBJKEYS.js +5 -5
  69. package/dist/lib/commands/OBJKEYS.js.map +1 -0
  70. package/dist/lib/commands/OBJLEN.d.ts +3 -2
  71. package/dist/lib/commands/OBJLEN.d.ts.map +1 -0
  72. package/dist/lib/commands/OBJLEN.js +5 -5
  73. package/dist/lib/commands/OBJLEN.js.map +1 -0
  74. package/dist/lib/commands/RESP.d.ts +9 -4
  75. package/dist/lib/commands/RESP.d.ts.map +1 -0
  76. package/dist/lib/commands/RESP.js +12 -10
  77. package/dist/lib/commands/RESP.js.map +1 -0
  78. package/dist/lib/commands/SET.d.ts +3 -2
  79. package/dist/lib/commands/SET.d.ts.map +1 -0
  80. package/dist/lib/commands/SET.js +8 -7
  81. package/dist/lib/commands/SET.js.map +1 -0
  82. package/dist/lib/commands/STRAPPEND.d.ts +3 -2
  83. package/dist/lib/commands/STRAPPEND.d.ts.map +1 -0
  84. package/dist/lib/commands/STRAPPEND.js +6 -6
  85. package/dist/lib/commands/STRAPPEND.js.map +1 -0
  86. package/dist/lib/commands/STRLEN.d.ts +3 -2
  87. package/dist/lib/commands/STRLEN.d.ts.map +1 -0
  88. package/dist/lib/commands/STRLEN.js +5 -5
  89. package/dist/lib/commands/STRLEN.js.map +1 -0
  90. package/dist/lib/commands/TOGGLE.d.ts +3 -2
  91. package/dist/lib/commands/TOGGLE.d.ts.map +1 -0
  92. package/dist/lib/commands/TOGGLE.js +5 -3
  93. package/dist/lib/commands/TOGGLE.js.map +1 -0
  94. package/dist/lib/commands/TYPE.d.ts +6 -5
  95. package/dist/lib/commands/TYPE.d.ts.map +1 -0
  96. package/dist/lib/commands/TYPE.js +10 -8
  97. package/dist/lib/commands/TYPE.js.map +1 -0
  98. package/dist/lib/commands/index.d.ts +51 -96
  99. package/dist/lib/commands/index.d.ts.map +1 -0
  100. package/dist/lib/commands/index.js +1 -0
  101. package/dist/lib/commands/index.js.map +1 -0
  102. package/dist/lib/index.d.ts +1 -0
  103. package/dist/lib/index.d.ts.map +1 -0
  104. package/dist/lib/index.js +1 -0
  105. package/dist/lib/index.js.map +1 -0
  106. package/package.json +5 -2
package/README.md CHANGED
@@ -1,12 +1,14 @@
1
1
  # @redis/json
2
2
 
3
- This package provides support for the [RedisJSON](https://redis.io/docs/stack/json/) module, which adds JSON as a native data type to Redis. It extends the [Node Redis client](https://github.com/redis/node-redis) to include functions for each of the RedisJSON commands.
3
+ This package provides support for the [RedisJSON](https://redis.io/docs/data-types/json/) module, which adds JSON as a native data type to Redis.
4
4
 
5
- To use these extra commands, your Redis server must have the RedisJSON module installed.
5
+ Should be used with [`redis`/`@redis/client`](https://github.com/redis/node-redis).
6
+
7
+ :warning: To use these extra commands, your Redis server must have the RedisJSON module installed.
6
8
 
7
9
  ## Usage
8
10
 
9
- For a complete example, see [`managing-json.js`](https://github.com/redis/node-redis/blob/master/examples/managing-json.js) in the Node Redis examples folder.
11
+ For a complete example, see [`managing-json.js`](https://github.com/redis/node-redis/blob/master/examples/managing-json.js) in the [examples folder](https://github.com/redis/node-redis/tree/master/examples).
10
12
 
11
13
  ### Storing JSON Documents in Redis
12
14
 
@@ -15,33 +17,27 @@ The [`JSON.SET`](https://redis.io/commands/json.set/) command stores a JSON valu
15
17
  Here, we'll store a JSON document in the root of the Redis key "`mydoc`":
16
18
 
17
19
  ```javascript
18
- import { createClient } from 'redis';
19
-
20
- ...
21
20
  await client.json.set('noderedis:jsondata', '$', {
22
21
  name: 'Roberta McDonald',
23
- pets: [
24
- {
22
+ pets: [{
25
23
  name: 'Rex',
26
24
  species: 'dog',
27
25
  age: 3,
28
26
  isMammal: true
29
- },
30
- {
27
+ }, {
31
28
  name: 'Goldie',
32
29
  species: 'fish',
33
30
  age: 2,
34
31
  isMammal: false
35
- }
36
- ]
32
+ }]
37
33
  });
38
34
  ```
39
35
 
40
- For more information about RedisJSON's path syntax, [check out the documentation](https://redis.io/docs/stack/json/path/).
36
+ For more information about RedisJSON's path syntax, [check out the documentation](https://redis.io/docs/data-types/json/path/).
41
37
 
42
38
  ### Retrieving JSON Documents from Redis
43
39
 
44
- With RedisJSON, we can retrieve all or part(s) of a JSON document using the [`JSON.GET`](https://redis.io/commands/json.get/) command and one or more JSON Paths. Let's get the name and age of one of the pets:
40
+ With RedisJSON, we can retrieve all or part(s) of a JSON document using the [`JSON.GET`](https://redis.io/commands/json.get/) command and one or more JSON Paths. Let's get the name and age of one of the pets:
45
41
 
46
42
  ```javascript
47
43
  const results = await client.json.get('noderedis:jsondata', {
@@ -1,9 +1,10 @@
1
+ import { CommandParser } from '@redis/client/dist/lib/client/parser';
1
2
  import { RedisJSON } from '.';
2
3
  import { RedisArgument, NumberReply, ArrayReply, NullReply } from '@redis/client/dist/lib/RESP/types';
3
4
  declare const _default: {
4
- readonly FIRST_KEY_INDEX: 1;
5
5
  readonly IS_READ_ONLY: false;
6
- readonly transformArguments: (this: void, key: RedisArgument, path: RedisArgument, json: RedisJSON, ...jsons: Array<RedisJSON>) => RedisArgument[];
6
+ readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, json: RedisJSON, ...jsons: Array<RedisJSON>) => void;
7
7
  readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;
8
8
  };
9
9
  export default _default;
10
+ //# sourceMappingURL=ARRAPPEND.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ARRAPPEND.d.ts","sourceRoot":"","sources":["../../../lib/commands/ARRAPPEND.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,SAAS,EAA8B,MAAM,GAAG,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAW,MAAM,mCAAmC,CAAC;;;gDAKnG,aAAa,OAChB,aAAa,QACZ,aAAa,QACb,SAAS,YACL,MAAM,SAAS,CAAC;mCAUkB,WAAW,GAAG,WAAW,WAAW,GAAG,SAAS,CAAC;;AAjBjG,wBAkB6B"}
@@ -2,19 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const _1 = require(".");
4
4
  exports.default = {
5
- FIRST_KEY_INDEX: 1,
6
5
  IS_READ_ONLY: false,
7
- transformArguments(key, path, json, ...jsons) {
8
- const args = new Array(4 + jsons.length);
9
- args[0] = 'JSON.ARRAPPEND';
10
- args[1] = key;
11
- args[2] = path;
12
- args[3] = (0, _1.transformRedisJsonArgument)(json);
13
- let argsIndex = 4;
6
+ parseCommand(parser, key, path, json, ...jsons) {
7
+ parser.push('JSON.ARRAPPEND');
8
+ parser.pushKey(key);
9
+ parser.push(path, (0, _1.transformRedisJsonArgument)(json));
14
10
  for (let i = 0; i < jsons.length; i++) {
15
- args[argsIndex++] = (0, _1.transformRedisJsonArgument)(jsons[i]);
11
+ parser.push((0, _1.transformRedisJsonArgument)(jsons[i]));
16
12
  }
17
- return args;
18
13
  },
19
14
  transformReply: undefined
20
15
  };
16
+ //# sourceMappingURL=ARRAPPEND.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ARRAPPEND.js","sourceRoot":"","sources":["../../../lib/commands/ARRAPPEND.ts"],"names":[],"mappings":";;AACA,wBAA0D;AAG1D,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CACV,MAAqB,EACrB,GAAkB,EAClB,IAAmB,EACnB,IAAe,EACf,GAAG,KAAuB;QAE1B,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAA,6BAA0B,EAAC,IAAI,CAAC,CAAC,CAAC;QAEpD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,MAAM,CAAC,IAAI,CAAC,IAAA,6BAA0B,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAA+E;CACrE,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { CommandParser } from '@redis/client/dist/lib/client/parser';
1
2
  import { RedisArgument, NumberReply, ArrayReply, NullReply } from '@redis/client/dist/lib/RESP/types';
2
3
  import { RedisJSON } from '.';
3
4
  export interface JsonArrIndexOptions {
@@ -7,9 +8,9 @@ export interface JsonArrIndexOptions {
7
8
  };
8
9
  }
9
10
  declare const _default: {
10
- readonly FIRST_KEY_INDEX: 1;
11
11
  readonly IS_READ_ONLY: true;
12
- readonly transformArguments: (this: void, key: RedisArgument, path: RedisArgument, json: RedisJSON, options?: JsonArrIndexOptions) => RedisArgument[];
12
+ readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, json: RedisJSON, options?: JsonArrIndexOptions) => void;
13
13
  readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;
14
14
  };
15
15
  export default _default;
16
+ //# sourceMappingURL=ARRINDEX.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ARRINDEX.d.ts","sourceRoot":"","sources":["../../../lib/commands/ARRINDEX.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAW,MAAM,mCAAmC,CAAC;AAC/G,OAAO,EAAE,SAAS,EAA8B,MAAM,GAAG,CAAC;AAE1D,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH;;;gDAKW,aAAa,OAChB,aAAa,QACZ,aAAa,QACb,SAAS,YACL,mBAAmB;mCAce,WAAW,GAAG,WAAW,WAAW,GAAG,SAAS,CAAC;;AArBjG,wBAsB6B"}
@@ -2,17 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const _1 = require(".");
4
4
  exports.default = {
5
- FIRST_KEY_INDEX: 1,
6
5
  IS_READ_ONLY: true,
7
- transformArguments(key, path, json, options) {
8
- const args = ['JSON.ARRINDEX', key, path, (0, _1.transformRedisJsonArgument)(json)];
6
+ parseCommand(parser, key, path, json, options) {
7
+ parser.push('JSON.ARRINDEX');
8
+ parser.pushKey(key);
9
+ parser.push(path, (0, _1.transformRedisJsonArgument)(json));
9
10
  if (options?.range) {
10
- args.push(options.range.start.toString());
11
+ parser.push(options.range.start.toString());
11
12
  if (options.range.stop !== undefined) {
12
- args.push(options.range.stop.toString());
13
+ parser.push(options.range.stop.toString());
13
14
  }
14
15
  }
15
- return args;
16
16
  },
17
17
  transformReply: undefined
18
18
  };
19
+ //# sourceMappingURL=ARRINDEX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ARRINDEX.js","sourceRoot":"","sources":["../../../lib/commands/ARRINDEX.ts"],"names":[],"mappings":";;AAEA,wBAA0D;AAS1D,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB,YAAY,CACV,MAAqB,EACrB,GAAkB,EAClB,IAAmB,EACnB,IAAe,EACf,OAA6B;QAE7B,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QAC7B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAA,6BAA0B,EAAC,IAAI,CAAC,CAAC,CAAC;QAEpD,IAAI,OAAO,EAAE,KAAK,EAAE,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YAE5C,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;gBACrC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC7C,CAAC;QACH,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAA+E;CACrE,CAAC"}
@@ -1,9 +1,10 @@
1
+ import { CommandParser } from '@redis/client/dist/lib/client/parser';
1
2
  import { RedisArgument, NumberReply, ArrayReply, NullReply } from '@redis/client/dist/lib/RESP/types';
2
3
  import { RedisJSON } from '.';
3
4
  declare const _default: {
4
- readonly FIRST_KEY_INDEX: 1;
5
5
  readonly IS_READ_ONLY: false;
6
- readonly transformArguments: (this: void, key: RedisArgument, path: RedisArgument, index: number, json: RedisJSON, ...jsons: Array<RedisJSON>) => RedisArgument[];
6
+ readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, index: number, json: RedisJSON, ...jsons: Array<RedisJSON>) => void;
7
7
  readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;
8
8
  };
9
9
  export default _default;
10
+ //# sourceMappingURL=ARRINSERT.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ARRINSERT.d.ts","sourceRoot":"","sources":["../../../lib/commands/ARRINSERT.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAW,MAAM,mCAAmC,CAAC;AAC/G,OAAO,EAAE,SAAS,EAA8B,MAAM,GAAG,CAAC;;;gDAK9C,aAAa,OAChB,aAAa,QACZ,aAAa,SACZ,MAAM,QACP,SAAS,YACL,MAAM,SAAS,CAAC;mCAUkB,WAAW,GAAG,WAAW,WAAW,GAAG,SAAS,CAAC;;AAlBjG,wBAmB6B"}
@@ -2,20 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const _1 = require(".");
4
4
  exports.default = {
5
- FIRST_KEY_INDEX: 1,
6
5
  IS_READ_ONLY: false,
7
- transformArguments(key, path, index, json, ...jsons) {
8
- const args = new Array(4 + jsons.length);
9
- args[0] = 'JSON.ARRINSERT';
10
- args[1] = key;
11
- args[2] = path;
12
- args[3] = index.toString();
13
- args[4] = (0, _1.transformRedisJsonArgument)(json);
14
- let argsIndex = 5;
6
+ parseCommand(parser, key, path, index, json, ...jsons) {
7
+ parser.push('JSON.ARRINSERT');
8
+ parser.pushKey(key);
9
+ parser.push(path, index.toString(), (0, _1.transformRedisJsonArgument)(json));
15
10
  for (let i = 0; i < jsons.length; i++) {
16
- args[argsIndex++] = (0, _1.transformRedisJsonArgument)(jsons[i]);
11
+ parser.push((0, _1.transformRedisJsonArgument)(jsons[i]));
17
12
  }
18
- return args;
19
13
  },
20
14
  transformReply: undefined
21
15
  };
16
+ //# sourceMappingURL=ARRINSERT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ARRINSERT.js","sourceRoot":"","sources":["../../../lib/commands/ARRINSERT.ts"],"names":[],"mappings":";;AAEA,wBAA0D;AAE1D,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CACV,MAAqB,EACrB,GAAkB,EAClB,IAAmB,EACnB,KAAa,EACb,IAAe,EACf,GAAG,KAAuB;QAE1B,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAA,6BAA0B,EAAC,IAAI,CAAC,CAAC,CAAC;QAEtE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,MAAM,CAAC,IAAI,CAAC,IAAA,6BAA0B,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAA+E;CACrE,CAAC"}
@@ -1,11 +1,12 @@
1
+ import { CommandParser } from '@redis/client/dist/lib/client/parser';
1
2
  import { RedisArgument, ArrayReply, NumberReply, NullReply } from '@redis/client/dist/lib/RESP/types';
2
3
  export interface JsonArrLenOptions {
3
4
  path?: RedisArgument;
4
5
  }
5
6
  declare const _default: {
6
- readonly FIRST_KEY_INDEX: 1;
7
7
  readonly IS_READ_ONLY: true;
8
- readonly transformArguments: (this: void, key: RedisArgument, options?: JsonArrLenOptions) => RedisArgument[];
8
+ readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonArrLenOptions) => void;
9
9
  readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;
10
10
  };
11
11
  export default _default;
12
+ //# sourceMappingURL=ARRLEN.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ARRLEN.d.ts","sourceRoot":"","sources":["../../../lib/commands/ARRLEN.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAW,MAAM,mCAAmC,CAAC;AAE/G,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,iBAAiB;mCAOrC,WAAW,GAAG,WAAW,WAAW,GAAG,SAAS,CAAC;;AATjG,wBAU6B"}
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
- FIRST_KEY_INDEX: 1,
5
4
  IS_READ_ONLY: true,
6
- transformArguments(key, options) {
7
- const args = ['JSON.ARRLEN', key];
5
+ parseCommand(parser, key, options) {
6
+ parser.push('JSON.ARRLEN');
7
+ parser.pushKey(key);
8
8
  if (options?.path !== undefined) {
9
- args.push(options.path);
9
+ parser.push(options.path);
10
10
  }
11
- return args;
12
11
  },
13
12
  transformReply: undefined
14
13
  };
14
+ //# sourceMappingURL=ARRLEN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ARRLEN.js","sourceRoot":"","sources":["../../../lib/commands/ARRLEN.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,YAAY,EAAE,IAAI;IAClB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAA2B;QACjF,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAA+E;CACrE,CAAC"}
@@ -1,15 +1,16 @@
1
+ import { CommandParser } from '@redis/client/dist/lib/client/parser';
1
2
  import { RedisArgument, ArrayReply, NullReply, BlobStringReply } from '@redis/client/dist/lib/RESP/types';
2
3
  export interface RedisArrPopOptions {
3
4
  path: RedisArgument;
4
5
  index?: number;
5
6
  }
6
7
  declare const _default: {
7
- readonly FIRST_KEY_INDEX: 1;
8
8
  readonly IS_READ_ONLY: false;
9
- readonly transformArguments: (this: void, key: RedisArgument, options?: RedisArrPopOptions) => RedisArgument[];
9
+ readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: RedisArrPopOptions) => void;
10
10
  readonly transformReply: (this: void, reply: NullReply | BlobStringReply | ArrayReply<NullReply | BlobStringReply>) => string | number | boolean | Date | {
11
11
  [key: string]: import(".").RedisJSON;
12
12
  [key: number]: import(".").RedisJSON;
13
13
  } | NullReply | (import(".").RedisJSON | NullReply)[] | null;
14
14
  };
15
15
  export default _default;
16
+ //# sourceMappingURL=ARRPOP.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ARRPOP.d.ts","sourceRoot":"","sources":["../../../lib/commands/ARRPOP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAwB,MAAM,mCAAmC,CAAC;AAIhI,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,kBAAkB;iDAY9D,SAAS,GAAG,eAAe,GAAG,WAAW,SAAS,GAAG,eAAe,CAAC;;;;;AAd7F,wBAmB6B"}
@@ -3,17 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
4
4
  const _1 = require(".");
5
5
  exports.default = {
6
- FIRST_KEY_INDEX: 1,
7
6
  IS_READ_ONLY: false,
8
- transformArguments(key, options) {
9
- const args = ['JSON.ARRPOP', key];
7
+ parseCommand(parser, key, options) {
8
+ parser.push('JSON.ARRPOP');
9
+ parser.pushKey(key);
10
10
  if (options) {
11
- args.push(options.path);
11
+ parser.push(options.path);
12
12
  if (options.index !== undefined) {
13
- args.push(options.index.toString());
13
+ parser.push(options.index.toString());
14
14
  }
15
15
  }
16
- return args;
17
16
  },
18
17
  transformReply(reply) {
19
18
  return (0, generic_transformers_1.isArrayReply)(reply) ?
@@ -21,3 +20,4 @@ exports.default = {
21
20
  (0, _1.transformRedisJsonNullReply)(reply);
22
21
  }
23
22
  };
23
+ //# sourceMappingURL=ARRPOP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ARRPOP.js","sourceRoot":"","sources":["../../../lib/commands/ARRPOP.ts"],"names":[],"mappings":";;AAEA,+FAAoF;AACpF,wBAAgD;AAOhD,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAA4B;QAClF,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAE1B,IAAI,OAAO,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;gBAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YACxC,CAAC;QACH,CAAC;IACH,CAAC;IACD,cAAc,CAAC,KAA4E;QACzF,OAAO,IAAA,mCAAY,EAAC,KAAK,CAAC,CAAC,CAAC;YACzB,KAA8C,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAA,8BAA2B,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChG,IAAA,8BAA2B,EAAC,KAAK,CAAC,CAAC;IACvC,CAAC;CACyB,CAAC"}
@@ -1,8 +1,9 @@
1
+ import { CommandParser } from '@redis/client/dist/lib/client/parser';
1
2
  import { RedisArgument, ArrayReply, NumberReply, NullReply } from '@redis/client/dist/lib/RESP/types';
2
3
  declare const _default: {
3
- readonly FIRST_KEY_INDEX: 1;
4
4
  readonly IS_READ_ONLY: false;
5
- readonly transformArguments: (this: void, key: RedisArgument, path: RedisArgument, start: number, stop: number) => RedisArgument[];
5
+ readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, start: number, stop: number) => void;
6
6
  readonly transformReply: () => NumberReply | ArrayReply<NumberReply | NullReply>;
7
7
  };
8
8
  export default _default;
9
+ //# sourceMappingURL=ARRTRIM.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ARRTRIM.d.ts","sourceRoot":"","sources":["../../../lib/commands/ARRTRIM.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAW,MAAM,mCAAmC,CAAC;;;gDAIxF,aAAa,OAAO,aAAa,QAAQ,aAAa,SAAS,MAAM,QAAQ,MAAM;mCAK1D,WAAW,GAAG,WAAW,WAAW,GAAG,SAAS,CAAC;;AAPjG,wBAQ6B"}
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
- FIRST_KEY_INDEX: 1,
5
4
  IS_READ_ONLY: false,
6
- transformArguments(key, path, start, stop) {
7
- return ['JSON.ARRTRIM', key, path, start.toString(), stop.toString()];
5
+ parseCommand(parser, key, path, start, stop) {
6
+ parser.push('JSON.ARRTRIM');
7
+ parser.pushKey(key);
8
+ parser.push(path, start.toString(), stop.toString());
8
9
  },
9
10
  transformReply: undefined
10
11
  };
12
+ //# sourceMappingURL=ARRTRIM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ARRTRIM.js","sourceRoot":"","sources":["../../../lib/commands/ARRTRIM.ts"],"names":[],"mappings":";;AAGA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,IAAmB,EAAE,KAAa,EAAE,IAAY;QACtG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC5B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IACvD,CAAC;IACD,cAAc,EAAE,SAA+E;CACrE,CAAC"}
@@ -1,11 +1,12 @@
1
+ import { CommandParser } from '@redis/client/dist/lib/client/parser';
1
2
  import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
2
3
  export interface JsonClearOptions {
3
4
  path?: RedisArgument;
4
5
  }
5
6
  declare const _default: {
6
- readonly FIRST_KEY_INDEX: 1;
7
7
  readonly IS_READ_ONLY: false;
8
- readonly transformArguments: (this: void, key: RedisArgument, options?: JsonClearOptions) => RedisArgument[];
8
+ readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonClearOptions) => void;
9
9
  readonly transformReply: () => NumberReply;
10
10
  };
11
11
  export default _default;
12
+ //# sourceMappingURL=CLEAR.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CLEAR.d.ts","sourceRoot":"","sources":["../../../lib/commands/CLEAR.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;AAExF,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,gBAAgB;mCAQpC,WAAW;;AAV3D,wBAW6B"}
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
- FIRST_KEY_INDEX: 1,
5
4
  IS_READ_ONLY: false,
6
- transformArguments(key, options) {
7
- const args = ['JSON.CLEAR', key];
5
+ parseCommand(parser, key, options) {
6
+ parser.push('JSON.CLEAR');
7
+ parser.pushKey(key);
8
8
  if (options?.path !== undefined) {
9
- args.push(options.path);
9
+ parser.push(options.path);
10
10
  }
11
- return args;
12
11
  },
13
12
  transformReply: undefined
14
13
  };
14
+ //# sourceMappingURL=CLEAR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CLEAR.js","sourceRoot":"","sources":["../../../lib/commands/CLEAR.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAA0B;QAChF,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAyC;CAC/B,CAAC"}
@@ -1,11 +1,12 @@
1
+ import { CommandParser } from '@redis/client/dist/lib/client/parser';
1
2
  import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
2
3
  export interface JsonDebugMemoryOptions {
3
4
  path?: RedisArgument;
4
5
  }
5
6
  declare const _default: {
6
- readonly FIRST_KEY_INDEX: 2;
7
7
  readonly IS_READ_ONLY: false;
8
- readonly transformArguments: (this: void, key: RedisArgument, options?: JsonDebugMemoryOptions) => RedisArgument[];
8
+ readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonDebugMemoryOptions) => void;
9
9
  readonly transformReply: () => NumberReply;
10
10
  };
11
11
  export default _default;
12
+ //# sourceMappingURL=DEBUG_MEMORY.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DEBUG_MEMORY.d.ts","sourceRoot":"","sources":["../../../lib/commands/DEBUG_MEMORY.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;AAExF,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,sBAAsB;mCAQ1C,WAAW;;AAV3D,wBAW6B"}
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
- FIRST_KEY_INDEX: 2,
5
4
  IS_READ_ONLY: false,
6
- transformArguments(key, options) {
7
- const args = ['JSON.DEBUG', 'MEMORY', key];
5
+ parseCommand(parser, key, options) {
6
+ parser.push('JSON.DEBUG', 'MEMORY');
7
+ parser.pushKey(key);
8
8
  if (options?.path !== undefined) {
9
- args.push(options.path);
9
+ parser.push(options.path);
10
10
  }
11
- return args;
12
11
  },
13
12
  transformReply: undefined
14
13
  };
14
+ //# sourceMappingURL=DEBUG_MEMORY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DEBUG_MEMORY.js","sourceRoot":"","sources":["../../../lib/commands/DEBUG_MEMORY.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAAgC;QACtF,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;QACpC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAyC;CAC/B,CAAC"}
@@ -1,11 +1,12 @@
1
+ import { CommandParser } from '@redis/client/dist/lib/client/parser';
1
2
  import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
2
3
  export interface JsonDelOptions {
3
4
  path?: RedisArgument;
4
5
  }
5
6
  declare const _default: {
6
- readonly FIRST_KEY_INDEX: 1;
7
7
  readonly IS_READ_ONLY: false;
8
- readonly transformArguments: (this: void, key: RedisArgument, options?: JsonDelOptions) => RedisArgument[];
8
+ readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonDelOptions) => void;
9
9
  readonly transformReply: () => NumberReply;
10
10
  };
11
11
  export default _default;
12
+ //# sourceMappingURL=DEL.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DEL.d.ts","sourceRoot":"","sources":["../../../lib/commands/DEL.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;AAExF,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,aAAa,CAAA;CACrB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,cAAc;mCAQlC,WAAW;;AAV3D,wBAW6B"}
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
- FIRST_KEY_INDEX: 1,
5
4
  IS_READ_ONLY: false,
6
- transformArguments(key, options) {
7
- const args = ['JSON.DEL', key];
5
+ parseCommand(parser, key, options) {
6
+ parser.push('JSON.DEL');
7
+ parser.pushKey(key);
8
8
  if (options?.path !== undefined) {
9
- args.push(options.path);
9
+ parser.push(options.path);
10
10
  }
11
- return args;
12
11
  },
13
12
  transformReply: undefined
14
13
  };
14
+ //# sourceMappingURL=DEL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DEL.js","sourceRoot":"","sources":["../../../lib/commands/DEL.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAAwB;QAC9E,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAyC;CAC/B,CAAC"}
@@ -1,11 +1,12 @@
1
+ import { CommandParser } from '@redis/client/dist/lib/client/parser';
1
2
  import { RedisArgument, NumberReply } from '@redis/client/dist/lib/RESP/types';
2
3
  export interface JsonForgetOptions {
3
4
  path?: RedisArgument;
4
5
  }
5
6
  declare const _default: {
6
- readonly FIRST_KEY_INDEX: 1;
7
7
  readonly IS_READ_ONLY: false;
8
- readonly transformArguments: (this: void, key: RedisArgument, options?: JsonForgetOptions) => RedisArgument[];
8
+ readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonForgetOptions) => void;
9
9
  readonly transformReply: () => NumberReply;
10
10
  };
11
11
  export default _default;
12
+ //# sourceMappingURL=FORGET.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FORGET.d.ts","sourceRoot":"","sources":["../../../lib/commands/FORGET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAW,MAAM,mCAAmC,CAAC;AAExF,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,iBAAiB;mCAQrC,WAAW;;AAV3D,wBAW6B"}
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
- FIRST_KEY_INDEX: 1,
5
4
  IS_READ_ONLY: false,
6
- transformArguments(key, options) {
7
- const args = ['JSON.FORGET', key];
5
+ parseCommand(parser, key, options) {
6
+ parser.push('JSON.FORGET');
7
+ parser.pushKey(key);
8
8
  if (options?.path !== undefined) {
9
- args.push(options.path);
9
+ parser.push(options.path);
10
10
  }
11
- return args;
12
11
  },
13
12
  transformReply: undefined
14
13
  };
14
+ //# sourceMappingURL=FORGET.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FORGET.js","sourceRoot":"","sources":["../../../lib/commands/FORGET.ts"],"names":[],"mappings":";;AAOA,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAA2B;QACjF,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAEpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,cAAc,EAAE,SAAyC;CAC/B,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { CommandParser } from '@redis/client/dist/lib/client/parser';
1
2
  import { RedisArgument } from '@redis/client/dist/lib/RESP/types';
2
3
  import { RedisVariadicArgument } from '@redis/client/dist/lib/commands/generic-transformers';
3
4
  import { transformRedisJsonNullReply } from '.';
@@ -5,9 +6,9 @@ export interface JsonGetOptions {
5
6
  path?: RedisVariadicArgument;
6
7
  }
7
8
  declare const _default: {
8
- readonly FIRST_KEY_INDEX: 1;
9
9
  readonly IS_READ_ONLY: false;
10
- readonly transformArguments: (this: void, key: RedisArgument, options?: JsonGetOptions) => RedisArgument[];
10
+ readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, options?: JsonGetOptions) => void;
11
11
  readonly transformReply: typeof transformRedisJsonNullReply;
12
12
  };
13
13
  export default _default;
14
+ //# sourceMappingURL=GET.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../lib/commands/GET.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAW,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAC7F,OAAO,EAAE,2BAA2B,EAAE,MAAM,GAAG,CAAC;AAEhD,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,qBAAqB,CAAC;CAC9B;;;gDAIsB,aAAa,OAAO,aAAa,YAAY,cAAc;;;AAFlF,wBAU6B"}
@@ -1,16 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const generic_transformers_1 = require("@redis/client/dist/lib/commands/generic-transformers");
4
3
  const _1 = require(".");
5
4
  exports.default = {
6
- FIRST_KEY_INDEX: 1,
7
5
  IS_READ_ONLY: false,
8
- transformArguments(key, options) {
9
- let args = ['JSON.GET', key];
6
+ parseCommand(parser, key, options) {
7
+ parser.push('JSON.GET');
8
+ parser.pushKey(key);
10
9
  if (options?.path !== undefined) {
11
- args = (0, generic_transformers_1.pushVariadicArguments)(args, options.path);
10
+ parser.pushVariadic(options.path);
12
11
  }
13
- return args;
14
12
  },
15
13
  transformReply: _1.transformRedisJsonNullReply
16
14
  };
15
+ //# sourceMappingURL=GET.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GET.js","sourceRoot":"","sources":["../../../lib/commands/GET.ts"],"names":[],"mappings":";;AAGA,wBAAgD;AAMhD,kBAAe;IACb,YAAY,EAAE,KAAK;IACnB,YAAY,CAAC,MAAqB,EAAE,GAAkB,EAAE,OAAwB;QAC9E,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACxB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACpB,IAAI,OAAO,EAAE,IAAI,KAAK,SAAS,EAAE,CAAC;YAChC,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QACnC,CAAC;IACH,CAAC;IACD,cAAc,EAAE,8BAA2B;CACjB,CAAC"}
@@ -1,9 +1,10 @@
1
+ import { CommandParser } from '@redis/client/dist/lib/client/parser';
1
2
  import { SimpleStringReply, RedisArgument } from '@redis/client/dist/lib/RESP/types';
2
3
  import { RedisJSON } from '.';
3
4
  declare const _default: {
4
- readonly FIRST_KEY_INDEX: 1;
5
5
  readonly IS_READ_ONLY: false;
6
- readonly transformArguments: (this: void, key: RedisArgument, path: RedisArgument, value: RedisJSON) => RedisArgument[];
6
+ readonly parseCommand: (this: void, parser: CommandParser, key: RedisArgument, path: RedisArgument, value: RedisJSON) => void;
7
7
  readonly transformReply: () => SimpleStringReply<'OK'>;
8
8
  };
9
9
  export default _default;
10
+ //# sourceMappingURL=MERGE.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MERGE.d.ts","sourceRoot":"","sources":["../../../lib/commands/MERGE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAW,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAC9F,OAAO,EAAE,SAAS,EAA8B,MAAM,GAAG,CAAC;;;gDAInC,aAAa,OAAO,aAAa,QAAQ,aAAa,SAAS,SAAS;mCAK/C,kBAAkB,IAAI,CAAC;;AAPvE,wBAQ6B"}
@@ -2,15 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const _1 = require(".");
4
4
  exports.default = {
5
- FIRST_KEY_INDEX: 1,
6
5
  IS_READ_ONLY: false,
7
- transformArguments(key, path, value) {
8
- return [
9
- 'JSON.MERGE',
10
- key,
11
- path,
12
- (0, _1.transformRedisJsonArgument)(value)
13
- ];
6
+ parseCommand(parser, key, path, value) {
7
+ parser.push('JSON.MERGE');
8
+ parser.pushKey(key);
9
+ parser.push(path, (0, _1.transformRedisJsonArgument)(value));
14
10
  },
15
11
  transformReply: undefined
16
12
  };
13
+ //# sourceMappingURL=MERGE.js.map