js-redis-server 0.0.2 → 0.0.3

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 (133) hide show
  1. package/README.md +1 -35
  2. package/dist/cluster.d.ts +7 -1
  3. package/dist/cluster.d.ts.map +1 -1
  4. package/dist/cluster.js +103 -7
  5. package/dist/cluster.js.map +1 -1
  6. package/dist/commands/cluster.d.ts +3 -0
  7. package/dist/commands/cluster.d.ts.map +1 -1
  8. package/dist/commands/cluster.js +63 -20
  9. package/dist/commands/cluster.js.map +1 -1
  10. package/dist/commands/command.js +27 -18
  11. package/dist/commands/command.js.map +1 -1
  12. package/dist/commands/config.d.ts +9 -0
  13. package/dist/commands/config.d.ts.map +1 -0
  14. package/dist/commands/config.js +142 -0
  15. package/dist/commands/config.js.map +1 -0
  16. package/dist/commands/connection.d.ts.map +1 -1
  17. package/dist/commands/connection.js +73 -9
  18. package/dist/commands/connection.js.map +1 -1
  19. package/dist/commands/hashes.d.ts.map +1 -1
  20. package/dist/commands/hashes.js +5 -7
  21. package/dist/commands/hashes.js.map +1 -1
  22. package/dist/commands/index.d.ts +5 -4
  23. package/dist/commands/index.d.ts.map +1 -1
  24. package/dist/commands/index.js +25 -4
  25. package/dist/commands/index.js.map +1 -1
  26. package/dist/commands/keys.d.ts +19 -0
  27. package/dist/commands/keys.d.ts.map +1 -1
  28. package/dist/commands/keys.js +112 -5
  29. package/dist/commands/keys.js.map +1 -1
  30. package/dist/commands/lists.d.ts +13 -0
  31. package/dist/commands/lists.d.ts.map +1 -1
  32. package/dist/commands/lists.js +140 -26
  33. package/dist/commands/lists.js.map +1 -1
  34. package/dist/commands/scripts.d.ts.map +1 -1
  35. package/dist/commands/scripts.js +9 -12
  36. package/dist/commands/scripts.js.map +1 -1
  37. package/dist/commands/sets.d.ts +1 -0
  38. package/dist/commands/sets.d.ts.map +1 -1
  39. package/dist/commands/sets.js +33 -8
  40. package/dist/commands/sets.js.map +1 -1
  41. package/dist/commands/streams.d.ts +63 -0
  42. package/dist/commands/streams.d.ts.map +1 -0
  43. package/dist/commands/streams.js +504 -0
  44. package/dist/commands/streams.js.map +1 -0
  45. package/dist/commands/strings.d.ts +5 -0
  46. package/dist/commands/strings.d.ts.map +1 -1
  47. package/dist/commands/strings.js +20 -2
  48. package/dist/commands/strings.js.map +1 -1
  49. package/dist/commands/zsets.d.ts +13 -3
  50. package/dist/commands/zsets.d.ts.map +1 -1
  51. package/dist/commands/zsets.js +174 -30
  52. package/dist/commands/zsets.js.map +1 -1
  53. package/dist/core/client-session.d.ts +114 -2
  54. package/dist/core/client-session.d.ts.map +1 -1
  55. package/dist/core/client-session.js +181 -12
  56. package/dist/core/client-session.js.map +1 -1
  57. package/dist/core/command-executor.d.ts +79 -0
  58. package/dist/core/command-executor.d.ts.map +1 -1
  59. package/dist/core/command-executor.js +130 -3
  60. package/dist/core/command-executor.js.map +1 -1
  61. package/dist/core/command-schema.d.ts +3 -0
  62. package/dist/core/command-schema.d.ts.map +1 -1
  63. package/dist/core/command-schema.js +2 -1
  64. package/dist/core/command-schema.js.map +1 -1
  65. package/dist/core/execution-policies/auth-policy.d.ts +10 -0
  66. package/dist/core/execution-policies/auth-policy.d.ts.map +1 -0
  67. package/dist/core/execution-policies/auth-policy.js +39 -0
  68. package/dist/core/execution-policies/auth-policy.js.map +1 -0
  69. package/dist/core/execution-policies/cluster-policy.d.ts.map +1 -1
  70. package/dist/core/execution-policies/cluster-policy.js +8 -2
  71. package/dist/core/execution-policies/cluster-policy.js.map +1 -1
  72. package/dist/core/execution-policies/index.d.ts +1 -0
  73. package/dist/core/execution-policies/index.d.ts.map +1 -1
  74. package/dist/core/execution-policies/index.js +3 -1
  75. package/dist/core/execution-policies/index.js.map +1 -1
  76. package/dist/core/execution-policies/transaction-policy.d.ts.map +1 -1
  77. package/dist/core/execution-policies/transaction-policy.js +0 -4
  78. package/dist/core/execution-policies/transaction-policy.js.map +1 -1
  79. package/dist/core/lua-runtime.d.ts +1 -1
  80. package/dist/core/lua-runtime.d.ts.map +1 -1
  81. package/dist/core/lua-runtime.js +26 -34
  82. package/dist/core/lua-runtime.js.map +1 -1
  83. package/dist/core/redis-context.d.ts +6 -1
  84. package/dist/core/redis-context.d.ts.map +1 -1
  85. package/dist/core/redis-context.js.map +1 -1
  86. package/dist/core/redis-error.d.ts +55 -1
  87. package/dist/core/redis-error.d.ts.map +1 -1
  88. package/dist/core/redis-error.js +105 -3
  89. package/dist/core/redis-error.js.map +1 -1
  90. package/dist/core/redis-value.d.ts +4 -0
  91. package/dist/core/redis-value.d.ts.map +1 -1
  92. package/dist/core/redis-value.js +4 -0
  93. package/dist/core/redis-value.js.map +1 -1
  94. package/dist/core/resp-encoder.js +5 -0
  95. package/dist/core/resp-encoder.js.map +1 -1
  96. package/dist/core/transports/resp2/decoder.d.ts +5 -1
  97. package/dist/core/transports/resp2/decoder.d.ts.map +1 -1
  98. package/dist/core/transports/resp2/decoder.js +20 -8
  99. package/dist/core/transports/resp2/decoder.js.map +1 -1
  100. package/dist/core/transports/resp2/server.d.ts +3 -1
  101. package/dist/core/transports/resp2/server.d.ts.map +1 -1
  102. package/dist/core/transports/resp2/server.js +3 -0
  103. package/dist/core/transports/resp2/server.js.map +1 -1
  104. package/dist/core/transports/resp2/session-adapter.d.ts.map +1 -1
  105. package/dist/core/transports/resp2/session-adapter.js +8 -1
  106. package/dist/core/transports/resp2/session-adapter.js.map +1 -1
  107. package/dist/index.d.ts +3 -3
  108. package/dist/index.d.ts.map +1 -1
  109. package/dist/index.js +19 -3
  110. package/dist/index.js.map +1 -1
  111. package/dist/state/cluster-topology.d.ts +6 -0
  112. package/dist/state/cluster-topology.d.ts.map +1 -1
  113. package/dist/state/cluster-topology.js +21 -0
  114. package/dist/state/cluster-topology.js.map +1 -1
  115. package/dist/state/data-types.d.ts +11 -0
  116. package/dist/state/data-types.d.ts.map +1 -1
  117. package/dist/state/data-types.js +12 -1
  118. package/dist/state/data-types.js.map +1 -1
  119. package/dist/state/database.d.ts +3 -1
  120. package/dist/state/database.d.ts.map +1 -1
  121. package/dist/state/database.js +6 -0
  122. package/dist/state/database.js.map +1 -1
  123. package/dist/state/keyspace.d.ts.map +1 -1
  124. package/dist/state/keyspace.js +1 -0
  125. package/dist/state/keyspace.js.map +1 -1
  126. package/dist/state/mutation-events.d.ts +1 -0
  127. package/dist/state/mutation-events.d.ts.map +1 -1
  128. package/dist/state/mutation-events.js.map +1 -1
  129. package/dist/state/server-state.d.ts +7 -0
  130. package/dist/state/server-state.d.ts.map +1 -1
  131. package/dist/state/server-state.js +2 -0
  132. package/dist/state/server-state.js.map +1 -1
  133. package/package.json +5 -5
@@ -1,14 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.typeCommand = exports.ttlCommand = exports.renamenxCommand = exports.renameCommand = exports.pttlCommand = exports.pexpireatCommand = exports.pexpireCommand = exports.persistCommand = exports.keysCommands = exports.flushdbCommand = exports.flushallCommand = exports.expireatCommand = exports.expireCommand = exports.existsCommand = exports.delCommand = exports.dbsizeCommand = exports.watchCommand = exports.unwatchCommand = exports.transactionCommands = exports.multiCommand = exports.execCommand = exports.discardCommand = exports.stringsCommands = exports.getexCommand = exports.setrangeCommand = exports.getrangeCommand = exports.msetnxCommand = exports.msetCommand = exports.psetexCommand = exports.setexCommand = exports.setnxCommand = exports.getdelCommand = exports.getsetCommand = exports.incrbyfloatCommand = exports.decrbyCommand = exports.incrbyCommand = exports.decrCommand = exports.incrCommand = exports.strlenCommand = exports.appendCommand = exports.mgetCommand = exports.setCommand = exports.getCommand = exports.commandCommand = exports.createClusterCommand = exports.connectionCommands = exports.selectCommand = exports.quitCommand = exports.pingCommand = exports.redisCommandDefinitions = void 0;
4
- exports.sunionstoreCommand = exports.sunionCommand = exports.sremCommand = exports.srandmemberCommand = exports.spopCommand = exports.smoveCommand = exports.smembersCommand = exports.sismemberCommand = exports.sinterstoreCommand = exports.sinterCommand = exports.sdiffstoreCommand = exports.sdiffCommand = exports.scardCommand = exports.saddCommand = exports.setsCommands = exports.hvalsCommand = exports.hstrlenCommand = exports.hsetCommand = exports.hsetnxCommand = exports.hmsetCommand = exports.hmgetCommand = exports.hlenCommand = exports.hkeysCommand = exports.hincrbyCommand = exports.hincrbyfloatCommand = exports.hdelCommand = exports.hgetCommand = exports.hgetallCommand = exports.hexistsCommand = exports.hashesCommands = exports.rpushxCommand = exports.rpushCommand = exports.rpoplpushCommand = exports.rpopCommand = exports.ltrimCommand = exports.lsetCommand = exports.lremCommand = exports.lrangeCommand = exports.lpushxCommand = exports.lpushCommand = exports.lpopCommand = exports.llenCommand = exports.lindexCommand = exports.listsCommands = exports.zscanCommand = exports.sscanCommand = exports.scanCommands = exports.scanCommand = exports.keysCommand = exports.hscanCommand = void 0;
5
- exports.zpopmaxCommand = exports.zpopminCommand = exports.zcountCommand = exports.zremrangebyscoreCommand = exports.zrangebyscoreCommand = exports.zrevrangeCommand = exports.zrangeCommand = exports.zincrbyCommand = exports.zscoreCommand = exports.zrevrankCommand = exports.zrankCommand = exports.zcardCommand = exports.zremCommand = exports.zaddCommand = exports.zsetsCommands = exports.scriptsCommands = exports.scriptCommand = exports.evalshaCommand = exports.evalCommand = void 0;
3
+ exports.flushdbCommand = exports.flushallCommand = exports.pexpiretimeCommand = exports.expiretimeCommand = exports.expireatCommand = exports.expireCommand = exports.existsCommand = exports.delCommand = exports.dbsizeCommand = exports.copyCommand = exports.watchCommand = exports.unwatchCommand = exports.transactionCommands = exports.multiCommand = exports.execCommand = exports.discardCommand = exports.stringsCommands = exports.getexCommand = exports.setrangeCommand = exports.substrCommand = exports.getrangeCommand = exports.msetnxCommand = exports.msetCommand = exports.psetexCommand = exports.setexCommand = exports.setnxCommand = exports.getdelCommand = exports.getsetCommand = exports.incrbyfloatCommand = exports.decrbyCommand = exports.incrbyCommand = exports.decrCommand = exports.incrCommand = exports.strlenCommand = exports.appendCommand = exports.mgetCommand = exports.setCommand = exports.getCommand = exports.configCommands = exports.configCommand = exports.commandCommand = exports.readwriteCommand = exports.readonlyCommand = exports.createClusterCommands = exports.createClusterCommand = exports.connectionCommands = exports.selectCommand = exports.quitCommand = exports.pingCommand = exports.redisCommandDefinitions = void 0;
4
+ exports.scardCommand = exports.saddCommand = exports.setsCommands = exports.hvalsCommand = exports.hstrlenCommand = exports.hsetCommand = exports.hsetnxCommand = exports.hmsetCommand = exports.hmgetCommand = exports.hlenCommand = exports.hkeysCommand = exports.hincrbyCommand = exports.hincrbyfloatCommand = exports.hdelCommand = exports.hgetCommand = exports.hgetallCommand = exports.hexistsCommand = exports.hashesCommands = exports.rpushxCommand = exports.rpushCommand = exports.rpoplpushCommand = exports.rpopCommand = exports.ltrimCommand = exports.lsetCommand = exports.lremCommand = exports.lrangeCommand = exports.lpushxCommand = exports.lpushCommand = exports.lpopCommand = exports.llenCommand = exports.lindexCommand = exports.brpopCommand = exports.blpopCommand = exports.listsCommands = exports.zscanCommand = exports.sscanCommand = exports.scanCommands = exports.scanCommand = exports.keysCommand = exports.hscanCommand = exports.unlinkCommand = exports.typeCommand = exports.ttlCommand = exports.renamenxCommand = exports.renameCommand = exports.pttlCommand = exports.pexpireatCommand = exports.pexpireCommand = exports.persistCommand = exports.keysCommands = void 0;
5
+ exports.zpopmaxCommand = exports.zpopminCommand = exports.zcountCommand = exports.zremrangebyscoreCommand = exports.zrangebyscoreCommand = exports.zrevrangeCommand = exports.zrangeCommand = exports.zincrbyCommand = exports.zscoreCommand = exports.zrevrankCommand = exports.zrankCommand = exports.zcardCommand = exports.zremCommand = exports.zaddCommand = exports.zsetsCommands = exports.scriptsCommands = exports.scriptCommand = exports.evalshaCommand = exports.evalCommand = exports.sunionstoreCommand = exports.sunionCommand = exports.sremCommand = exports.srandmemberCommand = exports.spopCommand = exports.smoveCommand = exports.smembersCommand = exports.sismemberCommand = exports.sinterstoreCommand = exports.sinterCommand = exports.sdiffstoreCommand = exports.sdiffCommand = void 0;
6
6
  exports.createRedisCommandRegistry = createRedisCommandRegistry;
7
7
  exports.createRedisCommandExecutor = createRedisCommandExecutor;
8
8
  const command_executor_1 = require("../core/command-executor");
9
9
  const command_registry_1 = require("../core/command-registry");
10
10
  const execution_policies_1 = require("../core/execution-policies");
11
11
  const command_1 = require("./command");
12
+ const config_1 = require("./config");
12
13
  const connection_1 = require("./connection");
13
14
  const hashes_1 = require("./hashes");
14
15
  const keys_1 = require("./keys");
@@ -16,12 +17,14 @@ const lists_1 = require("./lists");
16
17
  const scan_1 = require("./scan");
17
18
  const scripts_1 = require("./scripts");
18
19
  const sets_1 = require("./sets");
20
+ const streams_1 = require("./streams");
19
21
  const strings_1 = require("./strings");
20
22
  const transactions_1 = require("./transactions");
21
23
  const zsets_1 = require("./zsets");
22
24
  exports.redisCommandDefinitions = [
23
25
  ...connection_1.connectionCommands,
24
26
  command_1.commandCommand,
27
+ ...config_1.configCommands,
25
28
  ...transactions_1.transactionCommands,
26
29
  ...strings_1.stringsCommands,
27
30
  ...keys_1.keysCommands,
@@ -30,6 +33,7 @@ exports.redisCommandDefinitions = [
30
33
  ...lists_1.listsCommands,
31
34
  ...sets_1.setsCommands,
32
35
  ...zsets_1.zsetsCommands,
36
+ ...streams_1.streamsCommands,
33
37
  ...scripts_1.scriptsCommands,
34
38
  ];
35
39
  function createRedisCommandRegistry(extraCommands = []) {
@@ -41,7 +45,11 @@ function createRedisCommandRegistry(extraCommands = []) {
41
45
  function createRedisCommandExecutor(options) {
42
46
  return new command_executor_1.CommandExecutor({
43
47
  registry: createRedisCommandRegistry(options?.extraCommands),
44
- policies: [...(options?.policies ?? []), (0, execution_policies_1.createTransactionPolicy)()],
48
+ policies: [
49
+ (0, execution_policies_1.createAuthPolicy)(),
50
+ ...(options?.policies ?? []),
51
+ (0, execution_policies_1.createTransactionPolicy)(),
52
+ ],
45
53
  });
46
54
  }
47
55
  var connection_2 = require("./connection");
@@ -51,8 +59,14 @@ Object.defineProperty(exports, "selectCommand", { enumerable: true, get: functio
51
59
  Object.defineProperty(exports, "connectionCommands", { enumerable: true, get: function () { return connection_2.connectionCommands; } });
52
60
  var cluster_1 = require("./cluster");
53
61
  Object.defineProperty(exports, "createClusterCommand", { enumerable: true, get: function () { return cluster_1.createClusterCommand; } });
62
+ Object.defineProperty(exports, "createClusterCommands", { enumerable: true, get: function () { return cluster_1.createClusterCommands; } });
63
+ Object.defineProperty(exports, "readonlyCommand", { enumerable: true, get: function () { return cluster_1.readonlyCommand; } });
64
+ Object.defineProperty(exports, "readwriteCommand", { enumerable: true, get: function () { return cluster_1.readwriteCommand; } });
54
65
  var command_2 = require("./command");
55
66
  Object.defineProperty(exports, "commandCommand", { enumerable: true, get: function () { return command_2.commandCommand; } });
67
+ var config_2 = require("./config");
68
+ Object.defineProperty(exports, "configCommand", { enumerable: true, get: function () { return config_2.configCommand; } });
69
+ Object.defineProperty(exports, "configCommands", { enumerable: true, get: function () { return config_2.configCommands; } });
56
70
  var strings_2 = require("./strings");
57
71
  Object.defineProperty(exports, "getCommand", { enumerable: true, get: function () { return strings_2.getCommand; } });
58
72
  Object.defineProperty(exports, "setCommand", { enumerable: true, get: function () { return strings_2.setCommand; } });
@@ -72,6 +86,7 @@ Object.defineProperty(exports, "psetexCommand", { enumerable: true, get: functio
72
86
  Object.defineProperty(exports, "msetCommand", { enumerable: true, get: function () { return strings_2.msetCommand; } });
73
87
  Object.defineProperty(exports, "msetnxCommand", { enumerable: true, get: function () { return strings_2.msetnxCommand; } });
74
88
  Object.defineProperty(exports, "getrangeCommand", { enumerable: true, get: function () { return strings_2.getrangeCommand; } });
89
+ Object.defineProperty(exports, "substrCommand", { enumerable: true, get: function () { return strings_2.substrCommand; } });
75
90
  Object.defineProperty(exports, "setrangeCommand", { enumerable: true, get: function () { return strings_2.setrangeCommand; } });
76
91
  Object.defineProperty(exports, "getexCommand", { enumerable: true, get: function () { return strings_2.getexCommand; } });
77
92
  Object.defineProperty(exports, "stringsCommands", { enumerable: true, get: function () { return strings_2.stringsCommands; } });
@@ -83,11 +98,14 @@ Object.defineProperty(exports, "transactionCommands", { enumerable: true, get: f
83
98
  Object.defineProperty(exports, "unwatchCommand", { enumerable: true, get: function () { return transactions_2.unwatchCommand; } });
84
99
  Object.defineProperty(exports, "watchCommand", { enumerable: true, get: function () { return transactions_2.watchCommand; } });
85
100
  var keys_2 = require("./keys");
101
+ Object.defineProperty(exports, "copyCommand", { enumerable: true, get: function () { return keys_2.copyCommand; } });
86
102
  Object.defineProperty(exports, "dbsizeCommand", { enumerable: true, get: function () { return keys_2.dbsizeCommand; } });
87
103
  Object.defineProperty(exports, "delCommand", { enumerable: true, get: function () { return keys_2.delCommand; } });
88
104
  Object.defineProperty(exports, "existsCommand", { enumerable: true, get: function () { return keys_2.existsCommand; } });
89
105
  Object.defineProperty(exports, "expireCommand", { enumerable: true, get: function () { return keys_2.expireCommand; } });
90
106
  Object.defineProperty(exports, "expireatCommand", { enumerable: true, get: function () { return keys_2.expireatCommand; } });
107
+ Object.defineProperty(exports, "expiretimeCommand", { enumerable: true, get: function () { return keys_2.expiretimeCommand; } });
108
+ Object.defineProperty(exports, "pexpiretimeCommand", { enumerable: true, get: function () { return keys_2.pexpiretimeCommand; } });
91
109
  Object.defineProperty(exports, "flushallCommand", { enumerable: true, get: function () { return keys_2.flushallCommand; } });
92
110
  Object.defineProperty(exports, "flushdbCommand", { enumerable: true, get: function () { return keys_2.flushdbCommand; } });
93
111
  Object.defineProperty(exports, "keysCommands", { enumerable: true, get: function () { return keys_2.keysCommands; } });
@@ -99,6 +117,7 @@ Object.defineProperty(exports, "renameCommand", { enumerable: true, get: functio
99
117
  Object.defineProperty(exports, "renamenxCommand", { enumerable: true, get: function () { return keys_2.renamenxCommand; } });
100
118
  Object.defineProperty(exports, "ttlCommand", { enumerable: true, get: function () { return keys_2.ttlCommand; } });
101
119
  Object.defineProperty(exports, "typeCommand", { enumerable: true, get: function () { return keys_2.typeCommand; } });
120
+ Object.defineProperty(exports, "unlinkCommand", { enumerable: true, get: function () { return keys_2.unlinkCommand; } });
102
121
  var scan_2 = require("./scan");
103
122
  Object.defineProperty(exports, "hscanCommand", { enumerable: true, get: function () { return scan_2.hscanCommand; } });
104
123
  Object.defineProperty(exports, "keysCommand", { enumerable: true, get: function () { return scan_2.keysCommand; } });
@@ -108,6 +127,8 @@ Object.defineProperty(exports, "sscanCommand", { enumerable: true, get: function
108
127
  Object.defineProperty(exports, "zscanCommand", { enumerable: true, get: function () { return scan_2.zscanCommand; } });
109
128
  var lists_2 = require("./lists");
110
129
  Object.defineProperty(exports, "listsCommands", { enumerable: true, get: function () { return lists_2.listsCommands; } });
130
+ Object.defineProperty(exports, "blpopCommand", { enumerable: true, get: function () { return lists_2.blpopCommand; } });
131
+ Object.defineProperty(exports, "brpopCommand", { enumerable: true, get: function () { return lists_2.brpopCommand; } });
111
132
  Object.defineProperty(exports, "lindexCommand", { enumerable: true, get: function () { return lists_2.lindexCommand; } });
112
133
  Object.defineProperty(exports, "llenCommand", { enumerable: true, get: function () { return lists_2.llenCommand; } });
113
134
  Object.defineProperty(exports, "lpopCommand", { enumerable: true, get: function () { return lists_2.lpopCommand; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";;;;;AA+BA,gEAOC;AAED,gEAQC;AA/CD,+DAA0D;AAC1D,+DAA0D;AAE1D,mEAAoE;AACpE,uCAA0C;AAC1C,6CAAiD;AACjD,qCAAyC;AACzC,iCAAqC;AACrC,mCAAuC;AACvC,iCAAqC;AACrC,uCAA2C;AAC3C,iCAAqC;AACrC,uCAA2C;AAC3C,iDAAoD;AACpD,mCAAuC;AAE1B,QAAA,uBAAuB,GAAiC;IACnE,GAAG,+BAAkB;IACrB,wBAAc;IACd,GAAG,kCAAmB;IACtB,GAAG,yBAAe;IAClB,GAAG,mBAAY;IACf,GAAG,mBAAY;IACf,GAAG,uBAAc;IACjB,GAAG,qBAAa;IAChB,GAAG,mBAAY;IACf,GAAG,qBAAa;IAChB,GAAG,yBAAe;CACnB,C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OAAA;AACZ,yGAAA,iBAAiB,OAAA;AACjB,qGAAA,aAAa,OAAA;AACb,0GAAA,kBAAkB,OAAA;AAClB,wGAAA,gBAAgB,OAAA;AAChB,uGAAA,eAAe,OAAA;AACf,oGAAA,YAAY,OAAA;AACZ,mGAAA,WAAW,OAAA;AACX,0GAAA,kBAAkB,OAAA;AAClB,mGAAA,WAAW,OAAA;AACX,qGAAA,aAAa,OAAA;AACb,0GAAA,kBAAkB,OAAA;AAEpB,qCAKkB;AAJhB,sGAAA,WAAW,OAAA;AACX,yGAAA,cAAc,OAAA;AACd,wGAAA,aAAa,OAAA;AACb,0GAAA,eAAe,OAAA;AAEjB,iCAgBgB;AAfd,sGAAA,aAAa,OAAA;AACb,oGAAA,WAAW,OAAA;AACX,oGAAA,WAAW,OAAA;AACX,qGAAA,YAAY,OAAA;AACZ,qGAAA,YAAY,OAAA;AACZ,wGAAA,eAAe,OAAA;AACf,sGAAA,aAAa,OAAA;AACb,uGAAA,cAAc,OAAA;AACd,sGAAA,aAAa,OAAA;AACb,yGAAA,gBAAgB,OAAA;AAChB,6GAAA,oBAAoB,OAAA;AACpB,gHAAA,uBAAuB,OAAA;AACvB,sGAAA,aAAa,OAAA;AACb,uGAAA,cAAc,OAAA;AACd,uGAAA,cAAc,OAAA"}
@@ -1,6 +1,9 @@
1
1
  export declare const delCommand: import("../core/command-definition").CommandDefinition<{
2
2
  keys: Buffer<ArrayBufferLike>[];
3
3
  }>;
4
+ export declare const unlinkCommand: import("../core/command-definition").CommandDefinition<{
5
+ keys: Buffer<ArrayBufferLike>[];
6
+ }>;
4
7
  export declare const existsCommand: import("../core/command-definition").CommandDefinition<{
5
8
  keys: Buffer<ArrayBufferLike>[];
6
9
  }>;
@@ -14,6 +17,12 @@ export declare const ttlCommand: import("../core/command-definition").CommandDef
14
17
  export declare const pttlCommand: import("../core/command-definition").CommandDefinition<{
15
18
  key: Buffer<ArrayBufferLike>;
16
19
  }>;
20
+ export declare const expiretimeCommand: import("../core/command-definition").CommandDefinition<{
21
+ key: Buffer<ArrayBufferLike>;
22
+ }>;
23
+ export declare const pexpiretimeCommand: import("../core/command-definition").CommandDefinition<{
24
+ key: Buffer<ArrayBufferLike>;
25
+ }>;
17
26
  export declare const expireCommand: import("../core/command-definition").CommandDefinition<{
18
27
  key: Buffer<ArrayBufferLike>;
19
28
  seconds: number;
@@ -43,5 +52,15 @@ export declare const renamenxCommand: import("../core/command-definition").Comma
43
52
  key: Buffer<ArrayBufferLike>;
44
53
  newKey: Buffer<ArrayBufferLike>;
45
54
  }>;
55
+ type CopyOptions = {
56
+ db?: number;
57
+ replace: boolean;
58
+ };
59
+ export declare const copyCommand: import("../core/command-definition").CommandDefinition<{
60
+ source: Buffer<ArrayBufferLike>;
61
+ destination: Buffer<ArrayBufferLike>;
62
+ options: CopyOptions;
63
+ }>;
46
64
  export declare const keysCommands: import("../core/command-definition").CommandDefinition<{}>[];
65
+ export {};
47
66
  //# sourceMappingURL=keys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/commands/keys.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,UAAU;;EAiBrB,CAAA;AAEF,eAAO,MAAM,aAAa;;EAiBxB,CAAA;AAEF,eAAO,MAAM,WAAW;;EAQtB,CAAA;AAEF,eAAO,MAAM,aAAa,4DAMxB,CAAA;AAEF,eAAO,MAAM,UAAU;;EAmBrB,CAAA;AAEF,eAAO,MAAM,WAAW;;EAmBtB,CAAA;AAEF,eAAO,MAAM,aAAa;;;EASxB,CAAA;AAEF,eAAO,MAAM,cAAc;;;EASzB,CAAA;AAEF,eAAO,MAAM,cAAc;;EAQzB,CAAA;AAEF,eAAO,MAAM,cAAc,4DASzB,CAAA;AAEF,eAAO,MAAM,eAAe,4DAS1B,CAAA;AAEF,eAAO,MAAM,eAAe;;;EAe1B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;EAc3B,CAAA;AAEF,eAAO,MAAM,aAAa;;;EAsBxB,CAAA;AAEF,eAAO,MAAM,eAAe;;;EAwB1B,CAAA;AAEF,eAAO,MAAM,YAAY,8DAgBxB,CAAA"}
1
+ {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../../src/commands/keys.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,UAAU;;EAiBrB,CAAA;AAEF,eAAO,MAAM,aAAa;;EAGxB,CAAA;AAEF,eAAO,MAAM,aAAa;;EAiBxB,CAAA;AAEF,eAAO,MAAM,WAAW;;EAQtB,CAAA;AAEF,eAAO,MAAM,aAAa,4DAMxB,CAAA;AAEF,eAAO,MAAM,UAAU;;EAmBrB,CAAA;AAEF,eAAO,MAAM,WAAW;;EAmBtB,CAAA;AAEF,eAAO,MAAM,iBAAiB;;EAoB5B,CAAA;AAEF,eAAO,MAAM,kBAAkB;;EAmB7B,CAAA;AAEF,eAAO,MAAM,aAAa;;;EASxB,CAAA;AAEF,eAAO,MAAM,cAAc;;;EASzB,CAAA;AAEF,eAAO,MAAM,cAAc;;EAQzB,CAAA;AAEF,eAAO,MAAM,cAAc,4DASzB,CAAA;AAEF,eAAO,MAAM,eAAe,4DAS1B,CAAA;AAEF,eAAO,MAAM,eAAe;;;EAc1B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;EAa3B,CAAA;AAEF,eAAO,MAAM,aAAa;;;EAsBxB,CAAA;AAEF,eAAO,MAAM,eAAe;;;EAwB1B,CAAA;AAEF,KAAK,WAAW,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAA;AAyCpD,eAAO,MAAM,WAAW;;;;EA2CtB,CAAA;AAEF,eAAO,MAAM,YAAY,8DAoBxB,CAAA"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.keysCommands = exports.renamenxCommand = exports.renameCommand = exports.pexpireatCommand = exports.expireatCommand = exports.flushallCommand = exports.flushdbCommand = exports.persistCommand = exports.pexpireCommand = exports.expireCommand = exports.pttlCommand = exports.ttlCommand = exports.dbsizeCommand = exports.typeCommand = exports.existsCommand = exports.delCommand = void 0;
3
+ exports.keysCommands = exports.copyCommand = exports.renamenxCommand = exports.renameCommand = exports.pexpireatCommand = exports.expireatCommand = exports.flushallCommand = exports.flushdbCommand = exports.persistCommand = exports.pexpireCommand = exports.expireCommand = exports.pexpiretimeCommand = exports.expiretimeCommand = exports.pttlCommand = exports.ttlCommand = exports.dbsizeCommand = exports.typeCommand = exports.existsCommand = exports.unlinkCommand = exports.delCommand = void 0;
4
4
  const command_definition_1 = require("../core/command-definition");
5
5
  const command_schema_1 = require("../core/command-schema");
6
6
  const redis_error_1 = require("../core/redis-error");
@@ -22,6 +22,10 @@ exports.delCommand = (0, command_definition_1.defineCommand)({
22
22
  return (0, helpers_1.integer)(count);
23
23
  },
24
24
  });
25
+ exports.unlinkCommand = (0, command_definition_1.defineCommand)({
26
+ ...exports.delCommand,
27
+ name: 'unlink',
28
+ });
25
29
  exports.existsCommand = (0, command_definition_1.defineCommand)({
26
30
  name: 'exists',
27
31
  schema: command_schema_1.t.object({
@@ -91,6 +95,43 @@ exports.pttlCommand = (0, command_definition_1.defineCommand)({
91
95
  return (0, helpers_1.integer)((0, helpers_1.ttlMilliseconds)(expiration.expiresAt));
92
96
  },
93
97
  });
98
+ exports.expiretimeCommand = (0, command_definition_1.defineCommand)({
99
+ name: 'expiretime',
100
+ schema: command_schema_1.t.object({
101
+ key: command_schema_1.t.key(),
102
+ }),
103
+ flags: ['readonly', 'fast'],
104
+ keys: args => [args.key],
105
+ execute: (args, ctx) => {
106
+ const expiration = ctx.db.getExpiration(args.key);
107
+ if (expiration.kind === 'missing') {
108
+ return (0, helpers_1.integer)(-2);
109
+ }
110
+ if (expiration.kind === 'persistent') {
111
+ return (0, helpers_1.integer)(-1);
112
+ }
113
+ // Redis rounds to the nearest second ((ms+500)/1000), not floor.
114
+ return (0, helpers_1.integer)(Math.round(expiration.expiresAt / 1000));
115
+ },
116
+ });
117
+ exports.pexpiretimeCommand = (0, command_definition_1.defineCommand)({
118
+ name: 'pexpiretime',
119
+ schema: command_schema_1.t.object({
120
+ key: command_schema_1.t.key(),
121
+ }),
122
+ flags: ['readonly', 'fast'],
123
+ keys: args => [args.key],
124
+ execute: (args, ctx) => {
125
+ const expiration = ctx.db.getExpiration(args.key);
126
+ if (expiration.kind === 'missing') {
127
+ return (0, helpers_1.integer)(-2);
128
+ }
129
+ if (expiration.kind === 'persistent') {
130
+ return (0, helpers_1.integer)(-1);
131
+ }
132
+ return (0, helpers_1.integer)(expiration.expiresAt);
133
+ },
134
+ });
94
135
  exports.expireCommand = (0, command_definition_1.defineCommand)({
95
136
  name: 'expire',
96
137
  schema: command_schema_1.t.object({
@@ -146,8 +187,6 @@ exports.expireatCommand = (0, command_definition_1.defineCommand)({
146
187
  flags: ['write', 'fast'],
147
188
  keys: args => [args.key],
148
189
  execute: (args, ctx) => {
149
- if (args.timestamp < 0)
150
- throw new redis_error_1.InvalidExpireTimeError('expireat');
151
190
  if (ctx.db.getType(args.key) === null)
152
191
  return (0, helpers_1.integer)(0);
153
192
  const expiresAt = args.timestamp * 1000;
@@ -164,8 +203,6 @@ exports.pexpireatCommand = (0, command_definition_1.defineCommand)({
164
203
  flags: ['write', 'fast'],
165
204
  keys: args => [args.key],
166
205
  execute: (args, ctx) => {
167
- if (args.timestamp < 0)
168
- throw new redis_error_1.InvalidExpireTimeError('pexpireat');
169
206
  if (ctx.db.getType(args.key) === null)
170
207
  return (0, helpers_1.integer)(0);
171
208
  if (args.timestamp <= Date.now()) {
@@ -209,13 +246,82 @@ exports.renamenxCommand = (0, command_definition_1.defineCommand)({
209
246
  return (0, helpers_1.integer)(1);
210
247
  },
211
248
  });
249
+ /**
250
+ * Parses the trailing `[DB destination-db] [REPLACE]` options of COPY. Like
251
+ * real Redis the options may appear in any order and repeat (last DB wins).
252
+ */
253
+ const copyOptionsSchema = command_schema_1.t.custom((input, index) => {
254
+ let cursor = index;
255
+ let db;
256
+ let replace = false;
257
+ while (cursor < input.length) {
258
+ const token = input[cursor].toString().toUpperCase();
259
+ if (token === 'REPLACE') {
260
+ replace = true;
261
+ cursor += 1;
262
+ continue;
263
+ }
264
+ if (token === 'DB') {
265
+ const raw = input[cursor + 1];
266
+ if (!raw)
267
+ throw new redis_error_1.RedisSyntaxError();
268
+ const text = raw.toString();
269
+ if (!/^-?\d+$/.test(text))
270
+ throw new redis_error_1.ExpectedIntegerError();
271
+ const value = Number(text);
272
+ if (!Number.isSafeInteger(value))
273
+ throw new redis_error_1.ExpectedIntegerError();
274
+ db = value;
275
+ cursor += 2;
276
+ continue;
277
+ }
278
+ throw new redis_error_1.RedisSyntaxError();
279
+ }
280
+ return { value: { db, replace }, nextIndex: cursor };
281
+ });
282
+ exports.copyCommand = (0, command_definition_1.defineCommand)({
283
+ name: 'copy',
284
+ schema: command_schema_1.t.object({
285
+ source: command_schema_1.t.key(),
286
+ destination: command_schema_1.t.key(),
287
+ options: copyOptionsSchema,
288
+ }),
289
+ flags: ['write'],
290
+ keys: args => [args.source, args.destination],
291
+ execute: (args, ctx) => {
292
+ const { source, destination, options } = args;
293
+ let targetDb = ctx.db;
294
+ if (options.db !== undefined) {
295
+ if (options.db < 0 || options.db >= ctx.server.databases.length) {
296
+ throw new redis_error_1.DbIndexOutOfRangeError();
297
+ }
298
+ targetDb = ctx.server.getDatabase(options.db);
299
+ }
300
+ if (targetDb.id === ctx.db.id && source.equals(destination)) {
301
+ throw new redis_error_1.SameObjectError();
302
+ }
303
+ const value = ctx.db.get(source);
304
+ if (!value)
305
+ return (0, helpers_1.integer)(0);
306
+ if (!options.replace && targetDb.getType(destination) !== null) {
307
+ return (0, helpers_1.integer)(0);
308
+ }
309
+ const expiration = ctx.db.getExpiration(source);
310
+ const expiresAt = expiration.kind === 'expires' ? expiration.expiresAt : undefined;
311
+ targetDb.set(destination, value, expiresAt !== undefined ? { expiresAt } : undefined);
312
+ return (0, helpers_1.integer)(1);
313
+ },
314
+ });
212
315
  exports.keysCommands = [
213
316
  exports.delCommand,
317
+ exports.unlinkCommand,
214
318
  exports.existsCommand,
215
319
  exports.typeCommand,
216
320
  exports.dbsizeCommand,
217
321
  exports.ttlCommand,
218
322
  exports.pttlCommand,
323
+ exports.expiretimeCommand,
324
+ exports.pexpiretimeCommand,
219
325
  exports.expireCommand,
220
326
  exports.pexpireCommand,
221
327
  exports.persistCommand,
@@ -225,6 +331,7 @@ exports.keysCommands = [
225
331
  exports.pexpireatCommand,
226
332
  exports.renameCommand,
227
333
  exports.renamenxCommand,
334
+ exports.copyCommand,
228
335
  ];
229
336
  function expireKey(db, key, duration, multiplier) {
230
337
  if (db.getType(key) === null) {
@@ -1 +1 @@
1
- {"version":3,"file":"keys.js","sourceRoot":"","sources":["../../src/commands/keys.ts"],"names":[],"mappings":";;;AAAA,mEAA0D;AAC1D,2DAA0C;AAC1C,qDAA4E;AAE5E,uCAOkB;AAEL,QAAA,UAAU,GAAG,IAAA,kCAAa,EAAC;IACtC,IAAI,EAAE,KAAK;IACX,MAAM,EAAE,kBAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,kBAAC,CAAC,QAAQ,CAAC,kBAAC,CAAC,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;KACtC,CAAC;IACF,KAAK,EAAE,CAAC,OAAO,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI;IACvB,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QACrB,IAAI,KAAK,GAAG,CAAC,CAAA;QACb,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YAC5B,IAAI,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;gBACvB,KAAK,IAAI,CAAC,CAAA;YACZ,CAAC;QACH,CAAC;QAED,OAAO,IAAA,iBAAO,EAAC,KAAK,CAA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IAElB,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;QAC7B,OAAO,IAAA,iBAAO,EAAC,CAAC,CAAC,CAAA;IACnB,CAAC;IAED,IAAI,QAAQ,IAAI,CAAC,EAAE,CAAC;QAClB,OAAO,IAAA,iBAAO,EAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IACxC,CAAC;IAED,OAAO,IAAA,iBAAO,EAAC,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC5E,CAAC"}
@@ -8,9 +8,11 @@ export declare const rpushCommand: import("../core/command-definition").CommandD
8
8
  }>;
9
9
  export declare const lpopCommand: import("../core/command-definition").CommandDefinition<{
10
10
  key: Buffer<ArrayBufferLike>;
11
+ count: number | undefined;
11
12
  }>;
12
13
  export declare const rpopCommand: import("../core/command-definition").CommandDefinition<{
13
14
  key: Buffer<ArrayBufferLike>;
15
+ count: number | undefined;
14
16
  }>;
15
17
  export declare const llenCommand: import("../core/command-definition").CommandDefinition<{
16
18
  key: Buffer<ArrayBufferLike>;
@@ -51,10 +53,21 @@ export declare const rpoplpushCommand: import("../core/command-definition").Comm
51
53
  source: Buffer<ArrayBufferLike>;
52
54
  destination: Buffer<ArrayBufferLike>;
53
55
  }>;
56
+ export declare const blpopCommand: import("../core/command-definition").CommandDefinition<{
57
+ keys: Buffer[];
58
+ timeout: number;
59
+ }>;
60
+ export declare const brpopCommand: import("../core/command-definition").CommandDefinition<{
61
+ keys: Buffer[];
62
+ timeout: number;
63
+ }>;
54
64
  export declare const listsCommands: (import("../core/command-definition").CommandDefinition<{
55
65
  key: Buffer<ArrayBufferLike>;
56
66
  }> | import("../core/command-definition").CommandDefinition<{
57
67
  source: Buffer<ArrayBufferLike>;
58
68
  destination: Buffer<ArrayBufferLike>;
69
+ }> | import("../core/command-definition").CommandDefinition<{
70
+ keys: Buffer[];
71
+ timeout: number;
59
72
  }>)[];
60
73
  //# sourceMappingURL=lists.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../src/commands/lists.ts"],"names":[],"mappings":"AAyCA,eAAO,MAAM,YAAY;;;EAiBvB,CAAA;AAEF,eAAO,MAAM,YAAY;;;EAiBvB,CAAA;AAEF,eAAO,MAAM,WAAW;;EAkBtB,CAAA;AAEF,eAAO,MAAM,WAAW;;EAkBtB,CAAA;AAEF,eAAO,MAAM,WAAW;;EAWtB,CAAA;AAEF,eAAO,MAAM,aAAa;;;;EAsBxB,CAAA;AAEF,eAAO,MAAM,aAAa;;;EAgBxB,CAAA;AAEF,eAAO,MAAM,WAAW;;;;EAqBtB,CAAA;AAEF,eAAO,MAAM,WAAW;;;;EAoBtB,CAAA;AAEF,eAAO,MAAM,YAAY;;;;EA6BvB,CAAA;AAEF,eAAO,MAAM,aAAa;;;EAoBxB,CAAA;AAEF,eAAO,MAAM,aAAa;;;EAoBxB,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;EA4B3B,CAAA;AAEF,eAAO,MAAM,aAAa;;;;;KAczB,CAAA"}
1
+ {"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../src/commands/lists.ts"],"names":[],"mappings":"AA4FA,eAAO,MAAM,YAAY;;;EAiBvB,CAAA;AAEF,eAAO,MAAM,YAAY;;;EAiBvB,CAAA;AAEF,eAAO,MAAM,WAAW;;;EAStB,CAAA;AAEF,eAAO,MAAM,WAAW;;;EAStB,CAAA;AAEF,eAAO,MAAM,WAAW;;EAWtB,CAAA;AAEF,eAAO,MAAM,aAAa;;;;EAsBxB,CAAA;AAEF,eAAO,MAAM,aAAa;;;EAgBxB,CAAA;AAEF,eAAO,MAAM,WAAW;;;;EAqBtB,CAAA;AA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