@upstash/redis 0.0.0-ci.fb6b986f-20221006 → 0.0.0-ci.fc1b22d0-20231019

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 (421) hide show
  1. package/.npmrc +1 -0
  2. package/README.md +21 -19
  3. package/cloudflare.d.mts +45 -0
  4. package/{types/platforms/cloudflare.d.ts → cloudflare.d.ts} +14 -11
  5. package/cloudflare.js +3062 -0
  6. package/cloudflare.js.map +1 -0
  7. package/cloudflare.mjs +3025 -0
  8. package/cloudflare.mjs.map +1 -0
  9. package/fastly.d.mts +43 -0
  10. package/{types/platforms/fastly.d.ts → fastly.d.ts} +8 -10
  11. package/fastly.js +3037 -0
  12. package/fastly.js.map +1 -0
  13. package/fastly.mjs +3000 -0
  14. package/fastly.mjs.map +1 -0
  15. package/{types/platforms/node_with_fetch.d.ts → nodejs.d.mts} +9 -11
  16. package/{types/platforms/nodejs.d.ts → nodejs.d.ts} +9 -10
  17. package/nodejs.js +3063 -0
  18. package/nodejs.js.map +1 -0
  19. package/nodejs.mjs +3026 -0
  20. package/nodejs.mjs.map +1 -0
  21. package/package.json +29 -38
  22. package/redis-e3e8473f.d.ts +1795 -0
  23. package/.releaserc +0 -14
  24. package/LICENSE +0 -21
  25. package/esm/deps/deno.land/x/base64@v0.2.1/base.js +0 -100
  26. package/esm/deps/deno.land/x/base64@v0.2.1/base64url.js +0 -9
  27. package/esm/deps/deno.land/x/sha1@v1.0.3/deps.js +0 -1
  28. package/esm/deps/deno.land/x/sha1@v1.0.3/mod.js +0 -191
  29. package/esm/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +0 -50
  30. package/esm/package.json +0 -3
  31. package/esm/pkg/commands/append.js +0 -9
  32. package/esm/pkg/commands/bitcount.js +0 -16
  33. package/esm/pkg/commands/bitop.js +0 -9
  34. package/esm/pkg/commands/bitpos.js +0 -9
  35. package/esm/pkg/commands/command.js +0 -57
  36. package/esm/pkg/commands/dbsize.js +0 -9
  37. package/esm/pkg/commands/decr.js +0 -9
  38. package/esm/pkg/commands/decrby.js +0 -9
  39. package/esm/pkg/commands/del.js +0 -9
  40. package/esm/pkg/commands/echo.js +0 -9
  41. package/esm/pkg/commands/eval.js +0 -9
  42. package/esm/pkg/commands/evalsha.js +0 -9
  43. package/esm/pkg/commands/exists.js +0 -9
  44. package/esm/pkg/commands/expire.js +0 -9
  45. package/esm/pkg/commands/expireat.js +0 -9
  46. package/esm/pkg/commands/flushall.js +0 -13
  47. package/esm/pkg/commands/flushdb.js +0 -13
  48. package/esm/pkg/commands/get.js +0 -9
  49. package/esm/pkg/commands/getbit.js +0 -9
  50. package/esm/pkg/commands/getrange.js +0 -9
  51. package/esm/pkg/commands/getset.js +0 -9
  52. package/esm/pkg/commands/hdel.js +0 -9
  53. package/esm/pkg/commands/hexists.js +0 -9
  54. package/esm/pkg/commands/hget.js +0 -9
  55. package/esm/pkg/commands/hgetall.js +0 -33
  56. package/esm/pkg/commands/hincrby.js +0 -9
  57. package/esm/pkg/commands/hincrbyfloat.js +0 -9
  58. package/esm/pkg/commands/hkeys.js +0 -9
  59. package/esm/pkg/commands/hlen.js +0 -9
  60. package/esm/pkg/commands/hmget.js +0 -35
  61. package/esm/pkg/commands/hmset.js +0 -13
  62. package/esm/pkg/commands/hscan.js +0 -16
  63. package/esm/pkg/commands/hset.js +0 -13
  64. package/esm/pkg/commands/hsetnx.js +0 -9
  65. package/esm/pkg/commands/hstrlen.js +0 -9
  66. package/esm/pkg/commands/hvals.js +0 -9
  67. package/esm/pkg/commands/incr.js +0 -9
  68. package/esm/pkg/commands/incrby.js +0 -9
  69. package/esm/pkg/commands/incrbyfloat.js +0 -9
  70. package/esm/pkg/commands/keys.js +0 -9
  71. package/esm/pkg/commands/lindex.js +0 -6
  72. package/esm/pkg/commands/linsert.js +0 -6
  73. package/esm/pkg/commands/llen.js +0 -9
  74. package/esm/pkg/commands/lpop.js +0 -9
  75. package/esm/pkg/commands/lpos.js +0 -19
  76. package/esm/pkg/commands/lpush.js +0 -9
  77. package/esm/pkg/commands/lpushx.js +0 -9
  78. package/esm/pkg/commands/lrange.js +0 -6
  79. package/esm/pkg/commands/lrem.js +0 -6
  80. package/esm/pkg/commands/lset.js +0 -6
  81. package/esm/pkg/commands/ltrim.js +0 -6
  82. package/esm/pkg/commands/mget.js +0 -9
  83. package/esm/pkg/commands/mod.js +0 -115
  84. package/esm/pkg/commands/mset.js +0 -12
  85. package/esm/pkg/commands/msetnx.js +0 -9
  86. package/esm/pkg/commands/persist.js +0 -9
  87. package/esm/pkg/commands/pexpire.js +0 -9
  88. package/esm/pkg/commands/pexpireat.js +0 -9
  89. package/esm/pkg/commands/ping.js +0 -13
  90. package/esm/pkg/commands/psetex.js +0 -9
  91. package/esm/pkg/commands/pttl.js +0 -9
  92. package/esm/pkg/commands/publish.js +0 -9
  93. package/esm/pkg/commands/randomkey.js +0 -9
  94. package/esm/pkg/commands/rename.js +0 -9
  95. package/esm/pkg/commands/renamenx.js +0 -9
  96. package/esm/pkg/commands/rpop.js +0 -9
  97. package/esm/pkg/commands/rpush.js +0 -9
  98. package/esm/pkg/commands/rpushx.js +0 -9
  99. package/esm/pkg/commands/sadd.js +0 -9
  100. package/esm/pkg/commands/scan.js +0 -19
  101. package/esm/pkg/commands/scard.js +0 -9
  102. package/esm/pkg/commands/script_exists.js +0 -12
  103. package/esm/pkg/commands/script_flush.js +0 -16
  104. package/esm/pkg/commands/script_load.js +0 -9
  105. package/esm/pkg/commands/sdiff.js +0 -9
  106. package/esm/pkg/commands/sdiffstore.js +0 -9
  107. package/esm/pkg/commands/set.js +0 -36
  108. package/esm/pkg/commands/setbit.js +0 -9
  109. package/esm/pkg/commands/setex.js +0 -9
  110. package/esm/pkg/commands/setnx.js +0 -9
  111. package/esm/pkg/commands/setrange.js +0 -9
  112. package/esm/pkg/commands/sinter.js +0 -9
  113. package/esm/pkg/commands/sinterstore.js +0 -9
  114. package/esm/pkg/commands/sismember.js +0 -9
  115. package/esm/pkg/commands/smembers.js +0 -9
  116. package/esm/pkg/commands/smove.js +0 -9
  117. package/esm/pkg/commands/spop.js +0 -13
  118. package/esm/pkg/commands/srandmember.js +0 -13
  119. package/esm/pkg/commands/srem.js +0 -9
  120. package/esm/pkg/commands/sscan.js +0 -16
  121. package/esm/pkg/commands/strlen.js +0 -9
  122. package/esm/pkg/commands/sunion.js +0 -9
  123. package/esm/pkg/commands/sunionstore.js +0 -9
  124. package/esm/pkg/commands/time.js +0 -9
  125. package/esm/pkg/commands/touch.js +0 -9
  126. package/esm/pkg/commands/ttl.js +0 -9
  127. package/esm/pkg/commands/type.js +0 -9
  128. package/esm/pkg/commands/unlink.js +0 -9
  129. package/esm/pkg/commands/zadd.js +0 -26
  130. package/esm/pkg/commands/zcard.js +0 -9
  131. package/esm/pkg/commands/zcount.js +0 -9
  132. package/esm/pkg/commands/zincrby.js +0 -9
  133. package/esm/pkg/commands/zinterstore.js +0 -27
  134. package/esm/pkg/commands/zlexcount.js +0 -9
  135. package/esm/pkg/commands/zmscore.js +0 -10
  136. package/esm/pkg/commands/zpopmax.js +0 -13
  137. package/esm/pkg/commands/zpopmin.js +0 -13
  138. package/esm/pkg/commands/zrange.js +0 -26
  139. package/esm/pkg/commands/zrank.js +0 -9
  140. package/esm/pkg/commands/zrem.js +0 -9
  141. package/esm/pkg/commands/zremrangebylex.js +0 -9
  142. package/esm/pkg/commands/zremrangebyrank.js +0 -9
  143. package/esm/pkg/commands/zremrangebyscore.js +0 -9
  144. package/esm/pkg/commands/zrevrank.js +0 -9
  145. package/esm/pkg/commands/zscan.js +0 -16
  146. package/esm/pkg/commands/zscore.js +0 -9
  147. package/esm/pkg/commands/zunionstore.js +0 -27
  148. package/esm/pkg/error.js +0 -9
  149. package/esm/pkg/http.js +0 -128
  150. package/esm/pkg/pipeline.js +0 -1144
  151. package/esm/pkg/redis.js +0 -1102
  152. package/esm/pkg/script.js +0 -77
  153. package/esm/pkg/types.js +0 -1
  154. package/esm/pkg/util.js +0 -31
  155. package/esm/platforms/cloudflare.js +0 -62
  156. package/esm/platforms/fastly.js +0 -40
  157. package/esm/platforms/node_with_fetch.js +0 -60
  158. package/esm/platforms/nodejs.js +0 -59
  159. package/script/deps/deno.land/x/base64@v0.2.1/base.js +0 -104
  160. package/script/deps/deno.land/x/base64@v0.2.1/base64url.js +0 -13
  161. package/script/deps/deno.land/x/sha1@v1.0.3/deps.js +0 -6
  162. package/script/deps/deno.land/x/sha1@v1.0.3/mod.js +0 -196
  163. package/script/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +0 -55
  164. package/script/package.json +0 -3
  165. package/script/pkg/commands/append.js +0 -13
  166. package/script/pkg/commands/bitcount.js +0 -20
  167. package/script/pkg/commands/bitop.js +0 -13
  168. package/script/pkg/commands/bitpos.js +0 -13
  169. package/script/pkg/commands/command.js +0 -61
  170. package/script/pkg/commands/dbsize.js +0 -13
  171. package/script/pkg/commands/decr.js +0 -13
  172. package/script/pkg/commands/decrby.js +0 -13
  173. package/script/pkg/commands/del.js +0 -13
  174. package/script/pkg/commands/echo.js +0 -13
  175. package/script/pkg/commands/eval.js +0 -13
  176. package/script/pkg/commands/evalsha.js +0 -13
  177. package/script/pkg/commands/exists.js +0 -13
  178. package/script/pkg/commands/expire.js +0 -13
  179. package/script/pkg/commands/expireat.js +0 -13
  180. package/script/pkg/commands/flushall.js +0 -17
  181. package/script/pkg/commands/flushdb.js +0 -17
  182. package/script/pkg/commands/get.js +0 -13
  183. package/script/pkg/commands/getbit.js +0 -13
  184. package/script/pkg/commands/getrange.js +0 -13
  185. package/script/pkg/commands/getset.js +0 -13
  186. package/script/pkg/commands/hdel.js +0 -13
  187. package/script/pkg/commands/hexists.js +0 -13
  188. package/script/pkg/commands/hget.js +0 -13
  189. package/script/pkg/commands/hgetall.js +0 -37
  190. package/script/pkg/commands/hincrby.js +0 -13
  191. package/script/pkg/commands/hincrbyfloat.js +0 -13
  192. package/script/pkg/commands/hkeys.js +0 -13
  193. package/script/pkg/commands/hlen.js +0 -13
  194. package/script/pkg/commands/hmget.js +0 -39
  195. package/script/pkg/commands/hmset.js +0 -17
  196. package/script/pkg/commands/hscan.js +0 -20
  197. package/script/pkg/commands/hset.js +0 -17
  198. package/script/pkg/commands/hsetnx.js +0 -13
  199. package/script/pkg/commands/hstrlen.js +0 -13
  200. package/script/pkg/commands/hvals.js +0 -13
  201. package/script/pkg/commands/incr.js +0 -13
  202. package/script/pkg/commands/incrby.js +0 -13
  203. package/script/pkg/commands/incrbyfloat.js +0 -13
  204. package/script/pkg/commands/keys.js +0 -13
  205. package/script/pkg/commands/lindex.js +0 -10
  206. package/script/pkg/commands/linsert.js +0 -10
  207. package/script/pkg/commands/llen.js +0 -13
  208. package/script/pkg/commands/lpop.js +0 -13
  209. package/script/pkg/commands/lpos.js +0 -23
  210. package/script/pkg/commands/lpush.js +0 -13
  211. package/script/pkg/commands/lpushx.js +0 -13
  212. package/script/pkg/commands/lrange.js +0 -10
  213. package/script/pkg/commands/lrem.js +0 -10
  214. package/script/pkg/commands/lset.js +0 -10
  215. package/script/pkg/commands/ltrim.js +0 -10
  216. package/script/pkg/commands/mget.js +0 -13
  217. package/script/pkg/commands/mod.js +0 -131
  218. package/script/pkg/commands/mset.js +0 -16
  219. package/script/pkg/commands/msetnx.js +0 -13
  220. package/script/pkg/commands/persist.js +0 -13
  221. package/script/pkg/commands/pexpire.js +0 -13
  222. package/script/pkg/commands/pexpireat.js +0 -13
  223. package/script/pkg/commands/ping.js +0 -17
  224. package/script/pkg/commands/psetex.js +0 -13
  225. package/script/pkg/commands/pttl.js +0 -13
  226. package/script/pkg/commands/publish.js +0 -13
  227. package/script/pkg/commands/randomkey.js +0 -13
  228. package/script/pkg/commands/rename.js +0 -13
  229. package/script/pkg/commands/renamenx.js +0 -13
  230. package/script/pkg/commands/rpop.js +0 -13
  231. package/script/pkg/commands/rpush.js +0 -13
  232. package/script/pkg/commands/rpushx.js +0 -13
  233. package/script/pkg/commands/sadd.js +0 -13
  234. package/script/pkg/commands/scan.js +0 -23
  235. package/script/pkg/commands/scard.js +0 -13
  236. package/script/pkg/commands/script_exists.js +0 -16
  237. package/script/pkg/commands/script_flush.js +0 -20
  238. package/script/pkg/commands/script_load.js +0 -13
  239. package/script/pkg/commands/sdiff.js +0 -13
  240. package/script/pkg/commands/sdiffstore.js +0 -13
  241. package/script/pkg/commands/set.js +0 -40
  242. package/script/pkg/commands/setbit.js +0 -13
  243. package/script/pkg/commands/setex.js +0 -13
  244. package/script/pkg/commands/setnx.js +0 -13
  245. package/script/pkg/commands/setrange.js +0 -13
  246. package/script/pkg/commands/sinter.js +0 -13
  247. package/script/pkg/commands/sinterstore.js +0 -13
  248. package/script/pkg/commands/sismember.js +0 -13
  249. package/script/pkg/commands/smembers.js +0 -13
  250. package/script/pkg/commands/smove.js +0 -13
  251. package/script/pkg/commands/spop.js +0 -17
  252. package/script/pkg/commands/srandmember.js +0 -17
  253. package/script/pkg/commands/srem.js +0 -13
  254. package/script/pkg/commands/sscan.js +0 -20
  255. package/script/pkg/commands/strlen.js +0 -13
  256. package/script/pkg/commands/sunion.js +0 -13
  257. package/script/pkg/commands/sunionstore.js +0 -13
  258. package/script/pkg/commands/time.js +0 -13
  259. package/script/pkg/commands/touch.js +0 -13
  260. package/script/pkg/commands/ttl.js +0 -13
  261. package/script/pkg/commands/type.js +0 -13
  262. package/script/pkg/commands/unlink.js +0 -13
  263. package/script/pkg/commands/zadd.js +0 -30
  264. package/script/pkg/commands/zcard.js +0 -13
  265. package/script/pkg/commands/zcount.js +0 -13
  266. package/script/pkg/commands/zincrby.js +0 -13
  267. package/script/pkg/commands/zinterstore.js +0 -31
  268. package/script/pkg/commands/zlexcount.js +0 -13
  269. package/script/pkg/commands/zmscore.js +0 -14
  270. package/script/pkg/commands/zpopmax.js +0 -17
  271. package/script/pkg/commands/zpopmin.js +0 -17
  272. package/script/pkg/commands/zrange.js +0 -30
  273. package/script/pkg/commands/zrank.js +0 -13
  274. package/script/pkg/commands/zrem.js +0 -13
  275. package/script/pkg/commands/zremrangebylex.js +0 -13
  276. package/script/pkg/commands/zremrangebyrank.js +0 -13
  277. package/script/pkg/commands/zremrangebyscore.js +0 -13
  278. package/script/pkg/commands/zrevrank.js +0 -13
  279. package/script/pkg/commands/zscan.js +0 -20
  280. package/script/pkg/commands/zscore.js +0 -13
  281. package/script/pkg/commands/zunionstore.js +0 -31
  282. package/script/pkg/error.js +0 -13
  283. package/script/pkg/http.js +0 -132
  284. package/script/pkg/pipeline.js +0 -1148
  285. package/script/pkg/redis.js +0 -1106
  286. package/script/pkg/script.js +0 -81
  287. package/script/pkg/types.js +0 -2
  288. package/script/pkg/util.js +0 -35
  289. package/script/platforms/cloudflare.js +0 -89
  290. package/script/platforms/fastly.js +0 -67
  291. package/script/platforms/node_with_fetch.js +0 -87
  292. package/script/platforms/nodejs.js +0 -86
  293. package/types/deps/deno.land/x/base64@v0.2.1/base.d.ts +0 -5
  294. package/types/deps/deno.land/x/base64@v0.2.1/base64url.d.ts +0 -1
  295. package/types/deps/deno.land/x/sha1@v1.0.3/deps.d.ts +0 -1
  296. package/types/deps/deno.land/x/sha1@v1.0.3/mod.d.ts +0 -26
  297. package/types/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.d.ts +0 -3
  298. package/types/pkg/commands/append.d.ts +0 -7
  299. package/types/pkg/commands/bitcount.d.ts +0 -8
  300. package/types/pkg/commands/bitop.d.ts +0 -12
  301. package/types/pkg/commands/bitpos.d.ts +0 -7
  302. package/types/pkg/commands/command.d.ts +0 -37
  303. package/types/pkg/commands/dbsize.d.ts +0 -7
  304. package/types/pkg/commands/decr.d.ts +0 -7
  305. package/types/pkg/commands/decrby.d.ts +0 -7
  306. package/types/pkg/commands/del.d.ts +0 -7
  307. package/types/pkg/commands/echo.d.ts +0 -7
  308. package/types/pkg/commands/eval.d.ts +0 -7
  309. package/types/pkg/commands/evalsha.d.ts +0 -7
  310. package/types/pkg/commands/exists.d.ts +0 -7
  311. package/types/pkg/commands/expire.d.ts +0 -7
  312. package/types/pkg/commands/expireat.d.ts +0 -7
  313. package/types/pkg/commands/flushall.d.ts +0 -9
  314. package/types/pkg/commands/flushdb.d.ts +0 -9
  315. package/types/pkg/commands/get.d.ts +0 -7
  316. package/types/pkg/commands/getbit.d.ts +0 -7
  317. package/types/pkg/commands/getrange.d.ts +0 -7
  318. package/types/pkg/commands/getset.d.ts +0 -7
  319. package/types/pkg/commands/hdel.d.ts +0 -7
  320. package/types/pkg/commands/hexists.d.ts +0 -7
  321. package/types/pkg/commands/hget.d.ts +0 -7
  322. package/types/pkg/commands/hgetall.d.ts +0 -7
  323. package/types/pkg/commands/hincrby.d.ts +0 -7
  324. package/types/pkg/commands/hincrbyfloat.d.ts +0 -7
  325. package/types/pkg/commands/hkeys.d.ts +0 -7
  326. package/types/pkg/commands/hlen.d.ts +0 -7
  327. package/types/pkg/commands/hmget.d.ts +0 -15
  328. package/types/pkg/commands/hmset.d.ts +0 -9
  329. package/types/pkg/commands/hscan.d.ts +0 -24
  330. package/types/pkg/commands/hset.d.ts +0 -9
  331. package/types/pkg/commands/hsetnx.d.ts +0 -7
  332. package/types/pkg/commands/hstrlen.d.ts +0 -7
  333. package/types/pkg/commands/hvals.d.ts +0 -7
  334. package/types/pkg/commands/incr.d.ts +0 -7
  335. package/types/pkg/commands/incrby.d.ts +0 -7
  336. package/types/pkg/commands/incrbyfloat.d.ts +0 -7
  337. package/types/pkg/commands/keys.d.ts +0 -7
  338. package/types/pkg/commands/lindex.d.ts +0 -4
  339. package/types/pkg/commands/linsert.d.ts +0 -9
  340. package/types/pkg/commands/llen.d.ts +0 -7
  341. package/types/pkg/commands/lpop.d.ts +0 -7
  342. package/types/pkg/commands/lpos.d.ts +0 -15
  343. package/types/pkg/commands/lpush.d.ts +0 -7
  344. package/types/pkg/commands/lpushx.d.ts +0 -7
  345. package/types/pkg/commands/lrange.d.ts +0 -4
  346. package/types/pkg/commands/lrem.d.ts +0 -4
  347. package/types/pkg/commands/lset.d.ts +0 -4
  348. package/types/pkg/commands/ltrim.d.ts +0 -4
  349. package/types/pkg/commands/mget.d.ts +0 -7
  350. package/types/pkg/commands/mod.d.ts +0 -115
  351. package/types/pkg/commands/mset.d.ts +0 -9
  352. package/types/pkg/commands/msetnx.d.ts +0 -9
  353. package/types/pkg/commands/persist.d.ts +0 -7
  354. package/types/pkg/commands/pexpire.d.ts +0 -7
  355. package/types/pkg/commands/pexpireat.d.ts +0 -7
  356. package/types/pkg/commands/ping.d.ts +0 -7
  357. package/types/pkg/commands/psetex.d.ts +0 -7
  358. package/types/pkg/commands/pttl.d.ts +0 -7
  359. package/types/pkg/commands/publish.d.ts +0 -7
  360. package/types/pkg/commands/randomkey.d.ts +0 -7
  361. package/types/pkg/commands/rename.d.ts +0 -7
  362. package/types/pkg/commands/renamenx.d.ts +0 -7
  363. package/types/pkg/commands/rpop.d.ts +0 -7
  364. package/types/pkg/commands/rpush.d.ts +0 -7
  365. package/types/pkg/commands/rpushx.d.ts +0 -7
  366. package/types/pkg/commands/sadd.d.ts +0 -7
  367. package/types/pkg/commands/scan.d.ts +0 -18
  368. package/types/pkg/commands/scard.d.ts +0 -7
  369. package/types/pkg/commands/script_exists.d.ts +0 -7
  370. package/types/pkg/commands/script_flush.d.ts +0 -14
  371. package/types/pkg/commands/script_load.d.ts +0 -7
  372. package/types/pkg/commands/sdiff.d.ts +0 -7
  373. package/types/pkg/commands/sdiffstore.d.ts +0 -7
  374. package/types/pkg/commands/set.d.ts +0 -55
  375. package/types/pkg/commands/setbit.d.ts +0 -7
  376. package/types/pkg/commands/setex.d.ts +0 -7
  377. package/types/pkg/commands/setnx.d.ts +0 -7
  378. package/types/pkg/commands/setrange.d.ts +0 -7
  379. package/types/pkg/commands/sinter.d.ts +0 -7
  380. package/types/pkg/commands/sinterstore.d.ts +0 -7
  381. package/types/pkg/commands/sismember.d.ts +0 -7
  382. package/types/pkg/commands/smembers.d.ts +0 -7
  383. package/types/pkg/commands/smove.d.ts +0 -7
  384. package/types/pkg/commands/spop.d.ts +0 -7
  385. package/types/pkg/commands/srandmember.d.ts +0 -7
  386. package/types/pkg/commands/srem.d.ts +0 -7
  387. package/types/pkg/commands/sscan.d.ts +0 -24
  388. package/types/pkg/commands/strlen.d.ts +0 -7
  389. package/types/pkg/commands/sunion.d.ts +0 -7
  390. package/types/pkg/commands/sunionstore.d.ts +0 -7
  391. package/types/pkg/commands/time.d.ts +0 -7
  392. package/types/pkg/commands/touch.d.ts +0 -7
  393. package/types/pkg/commands/ttl.d.ts +0 -7
  394. package/types/pkg/commands/type.d.ts +0 -8
  395. package/types/pkg/commands/unlink.d.ts +0 -7
  396. package/types/pkg/commands/zadd.d.ts +0 -35
  397. package/types/pkg/commands/zcard.d.ts +0 -7
  398. package/types/pkg/commands/zcount.d.ts +0 -7
  399. package/types/pkg/commands/zincrby.d.ts +0 -7
  400. package/types/pkg/commands/zinterstore.d.ts +0 -30
  401. package/types/pkg/commands/zlexcount.d.ts +0 -7
  402. package/types/pkg/commands/zmscore.d.ts +0 -7
  403. package/types/pkg/commands/zpopmax.d.ts +0 -7
  404. package/types/pkg/commands/zpopmin.d.ts +0 -7
  405. package/types/pkg/commands/zrange.d.ts +0 -42
  406. package/types/pkg/commands/zrank.d.ts +0 -7
  407. package/types/pkg/commands/zrem.d.ts +0 -7
  408. package/types/pkg/commands/zremrangebylex.d.ts +0 -7
  409. package/types/pkg/commands/zremrangebyrank.d.ts +0 -7
  410. package/types/pkg/commands/zremrangebyscore.d.ts +0 -7
  411. package/types/pkg/commands/zrevrank.d.ts +0 -7
  412. package/types/pkg/commands/zscan.d.ts +0 -24
  413. package/types/pkg/commands/zscore.d.ts +0 -7
  414. package/types/pkg/commands/zunionstore.d.ts +0 -30
  415. package/types/pkg/error.d.ts +0 -6
  416. package/types/pkg/http.d.ts +0 -54
  417. package/types/pkg/pipeline.d.ts +0 -552
  418. package/types/pkg/redis.d.ts +0 -534
  419. package/types/pkg/script.d.ts +0 -42
  420. package/types/pkg/types.d.ts +0 -1
  421. package/types/pkg/util.d.ts +0 -1
@@ -1,1144 +0,0 @@
1
- import { AppendCommand, BitCountCommand, BitOpCommand, BitPosCommand, DBSizeCommand, DecrByCommand, DecrCommand, DelCommand, EchoCommand, EvalCommand, EvalshaCommand, ExistsCommand, ExpireAtCommand, ExpireCommand, FlushAllCommand, FlushDBCommand, GetBitCommand, GetCommand, GetRangeCommand, GetSetCommand, HDelCommand, HExistsCommand, HGetAllCommand, HGetCommand, HIncrByCommand, HIncrByFloatCommand, HKeysCommand, HLenCommand, HMGetCommand, HMSetCommand, HScanCommand, HSetCommand, HSetNXCommand, HStrLenCommand, HValsCommand, IncrByCommand, IncrByFloatCommand, IncrCommand, KeysCommand, LIndexCommand, LInsertCommand, LLenCommand, LPopCommand, LPosCommand, LPushCommand, LPushXCommand, LRangeCommand, LRemCommand, LSetCommand, LTrimCommand, MGetCommand, MSetCommand, MSetNXCommand, PersistCommand, PExpireAtCommand, PExpireCommand, PingCommand, PSetEXCommand, PTtlCommand, PublishCommand, RandomKeyCommand, RenameCommand, RenameNXCommand, RPopCommand, RPushCommand, RPushXCommand, SAddCommand, ScanCommand, SCardCommand, ScriptExistsCommand, ScriptFlushCommand, ScriptLoadCommand, SDiffCommand, SDiffStoreCommand, SetBitCommand, SetCommand, SetExCommand, SetNxCommand, SetRangeCommand, SInterCommand, SInterStoreCommand, SIsMemberCommand, SMembersCommand, SMoveCommand, SPopCommand, SRandMemberCommand, SRemCommand, SScanCommand, StrLenCommand, SUnionCommand, SUnionStoreCommand, TimeCommand, TouchCommand, TtlCommand, TypeCommand, UnlinkCommand, ZAddCommand, ZCardCommand, ZCountCommand, ZIncrByCommand, ZInterStoreCommand, ZLexCountCommand, ZPopMaxCommand, ZPopMinCommand, ZRangeCommand, ZRankCommand, ZRemCommand, ZRemRangeByLexCommand, ZRemRangeByRankCommand, ZRemRangeByScoreCommand, ZRevRankCommand, ZScanCommand, ZScoreCommand, ZUnionStoreCommand, } from "./commands/mod.js";
2
- import { UpstashError } from "./error.js";
3
- import { ZMScoreCommand } from "./commands/zmscore.js";
4
- /**
5
- * Upstash REST API supports command pipelining to send multiple commands in
6
- * batch, instead of sending each command one by one and waiting for a response.
7
- * When using pipelines, several commands are sent using a single HTTP request,
8
- * and a single JSON array response is returned. Each item in the response array
9
- * corresponds to the command in the same order within the pipeline.
10
- *
11
- * **NOTE:**
12
- *
13
- * Execution of the pipeline is not atomic. Even though each command in
14
- * the pipeline will be executed in order, commands sent by other clients can
15
- * interleave with the pipeline.
16
- *
17
- * **Examples:**
18
- *
19
- * ```ts
20
- * const p = redis.pipeline()
21
- * p.set("key","value")
22
- * p.get("key")
23
- * const res = await p.exec()
24
- * ```
25
- *
26
- * You can also chain commands together
27
- * ```ts
28
- * const p = redis.pipeline()
29
- * const res = await p.set("key","value").get("key").exec()
30
- * ```
31
- *
32
- * It's not possible to infer correct types with a dynamic pipeline, so you can
33
- * override the response type manually:
34
- * ```ts
35
- * redis.pipeline()
36
- * .set("key", { greeting: "hello"})
37
- * .get("key")
38
- * .exec<["OK", { greeting: string } ]>()
39
- *
40
- * ```
41
- */
42
- export class Pipeline {
43
- constructor(client, commandOptions) {
44
- Object.defineProperty(this, "client", {
45
- enumerable: true,
46
- configurable: true,
47
- writable: true,
48
- value: void 0
49
- });
50
- Object.defineProperty(this, "commands", {
51
- enumerable: true,
52
- configurable: true,
53
- writable: true,
54
- value: void 0
55
- });
56
- Object.defineProperty(this, "commandOptions", {
57
- enumerable: true,
58
- configurable: true,
59
- writable: true,
60
- value: void 0
61
- });
62
- /**
63
- * Send the pipeline request to upstash.
64
- *
65
- * Returns an array with the results of all pipelined commands.
66
- *
67
- * You can define a return type manually to make working in typescript easier
68
- * ```ts
69
- * redis.pipeline().get("key").exec<[{ greeting: string }]>()
70
- * ```
71
- */
72
- Object.defineProperty(this, "exec", {
73
- enumerable: true,
74
- configurable: true,
75
- writable: true,
76
- value: async () => {
77
- if (this.commands.length === 0) {
78
- throw new Error("Pipeline is empty");
79
- }
80
- const res = (await this.client.request({
81
- path: ["pipeline"],
82
- body: Object.values(this.commands).map((c) => c.command),
83
- }));
84
- return res.map(({ error, result }, i) => {
85
- if (error) {
86
- throw new UpstashError(`Command ${i + 1} [ ${this.commands[i].command[0]} ] failed: ${error}`);
87
- }
88
- return this.commands[i].deserialize(result);
89
- });
90
- }
91
- });
92
- /**
93
- * @see https://redis.io/commands/append
94
- */
95
- Object.defineProperty(this, "append", {
96
- enumerable: true,
97
- configurable: true,
98
- writable: true,
99
- value: (...args) => this.chain(new AppendCommand(args, this.commandOptions))
100
- });
101
- /**
102
- * @see https://redis.io/commands/bitcount
103
- */
104
- Object.defineProperty(this, "bitcount", {
105
- enumerable: true,
106
- configurable: true,
107
- writable: true,
108
- value: (...args) => this.chain(new BitCountCommand(args, this.commandOptions))
109
- });
110
- /**
111
- * @see https://redis.io/commands/bitop
112
- */
113
- Object.defineProperty(this, "bitop", {
114
- enumerable: true,
115
- configurable: true,
116
- writable: true,
117
- value: (op, destinationKey, sourceKey, ...sourceKeys) => this.chain(new BitOpCommand([op, destinationKey, sourceKey, ...sourceKeys], this.commandOptions))
118
- });
119
- /**
120
- * @see https://redis.io/commands/bitpos
121
- */
122
- Object.defineProperty(this, "bitpos", {
123
- enumerable: true,
124
- configurable: true,
125
- writable: true,
126
- value: (...args) => this.chain(new BitPosCommand(args, this.commandOptions))
127
- });
128
- /**
129
- * @see https://redis.io/commands/dbsize
130
- */
131
- Object.defineProperty(this, "dbsize", {
132
- enumerable: true,
133
- configurable: true,
134
- writable: true,
135
- value: () => this.chain(new DBSizeCommand(this.commandOptions))
136
- });
137
- /**
138
- * @see https://redis.io/commands/decr
139
- */
140
- Object.defineProperty(this, "decr", {
141
- enumerable: true,
142
- configurable: true,
143
- writable: true,
144
- value: (...args) => this.chain(new DecrCommand(args, this.commandOptions))
145
- });
146
- /**
147
- * @see https://redis.io/commands/decrby
148
- */
149
- Object.defineProperty(this, "decrby", {
150
- enumerable: true,
151
- configurable: true,
152
- writable: true,
153
- value: (...args) => this.chain(new DecrByCommand(args, this.commandOptions))
154
- });
155
- /**
156
- * @see https://redis.io/commands/del
157
- */
158
- Object.defineProperty(this, "del", {
159
- enumerable: true,
160
- configurable: true,
161
- writable: true,
162
- value: (...args) => this.chain(new DelCommand(args, this.commandOptions))
163
- });
164
- /**
165
- * @see https://redis.io/commands/echo
166
- */
167
- Object.defineProperty(this, "echo", {
168
- enumerable: true,
169
- configurable: true,
170
- writable: true,
171
- value: (...args) => this.chain(new EchoCommand(args, this.commandOptions))
172
- });
173
- /**
174
- * @see https://redis.io/commands/eval
175
- */
176
- Object.defineProperty(this, "eval", {
177
- enumerable: true,
178
- configurable: true,
179
- writable: true,
180
- value: (...args) => this.chain(new EvalCommand(args, this.commandOptions))
181
- });
182
- /**
183
- * @see https://redis.io/commands/evalsha
184
- */
185
- Object.defineProperty(this, "evalsha", {
186
- enumerable: true,
187
- configurable: true,
188
- writable: true,
189
- value: (...args) => this.chain(new EvalshaCommand(args, this.commandOptions))
190
- });
191
- /**
192
- * @see https://redis.io/commands/exists
193
- */
194
- Object.defineProperty(this, "exists", {
195
- enumerable: true,
196
- configurable: true,
197
- writable: true,
198
- value: (...args) => this.chain(new ExistsCommand(args, this.commandOptions))
199
- });
200
- /**
201
- * @see https://redis.io/commands/expire
202
- */
203
- Object.defineProperty(this, "expire", {
204
- enumerable: true,
205
- configurable: true,
206
- writable: true,
207
- value: (...args) => this.chain(new ExpireCommand(args, this.commandOptions))
208
- });
209
- /**
210
- * @see https://redis.io/commands/expireat
211
- */
212
- Object.defineProperty(this, "expireat", {
213
- enumerable: true,
214
- configurable: true,
215
- writable: true,
216
- value: (...args) => this.chain(new ExpireAtCommand(args, this.commandOptions))
217
- });
218
- /**
219
- * @see https://redis.io/commands/flushall
220
- */
221
- Object.defineProperty(this, "flushall", {
222
- enumerable: true,
223
- configurable: true,
224
- writable: true,
225
- value: (args) => this.chain(new FlushAllCommand(args, this.commandOptions))
226
- });
227
- /**
228
- * @see https://redis.io/commands/flushdb
229
- */
230
- Object.defineProperty(this, "flushdb", {
231
- enumerable: true,
232
- configurable: true,
233
- writable: true,
234
- value: (...args) => this.chain(new FlushDBCommand(args, this.commandOptions))
235
- });
236
- /**
237
- * @see https://redis.io/commands/get
238
- */
239
- Object.defineProperty(this, "get", {
240
- enumerable: true,
241
- configurable: true,
242
- writable: true,
243
- value: (...args) => this.chain(new GetCommand(args, this.commandOptions))
244
- });
245
- /**
246
- * @see https://redis.io/commands/getbit
247
- */
248
- Object.defineProperty(this, "getbit", {
249
- enumerable: true,
250
- configurable: true,
251
- writable: true,
252
- value: (...args) => this.chain(new GetBitCommand(args, this.commandOptions))
253
- });
254
- /**
255
- * @see https://redis.io/commands/getrange
256
- */
257
- Object.defineProperty(this, "getrange", {
258
- enumerable: true,
259
- configurable: true,
260
- writable: true,
261
- value: (...args) => this.chain(new GetRangeCommand(args, this.commandOptions))
262
- });
263
- /**
264
- * @see https://redis.io/commands/getset
265
- */
266
- Object.defineProperty(this, "getset", {
267
- enumerable: true,
268
- configurable: true,
269
- writable: true,
270
- value: (key, value) => this.chain(new GetSetCommand([key, value], this.commandOptions))
271
- });
272
- /**
273
- * @see https://redis.io/commands/hdel
274
- */
275
- Object.defineProperty(this, "hdel", {
276
- enumerable: true,
277
- configurable: true,
278
- writable: true,
279
- value: (...args) => this.chain(new HDelCommand(args, this.commandOptions))
280
- });
281
- /**
282
- * @see https://redis.io/commands/hexists
283
- */
284
- Object.defineProperty(this, "hexists", {
285
- enumerable: true,
286
- configurable: true,
287
- writable: true,
288
- value: (...args) => this.chain(new HExistsCommand(args, this.commandOptions))
289
- });
290
- /**
291
- * @see https://redis.io/commands/hget
292
- */
293
- Object.defineProperty(this, "hget", {
294
- enumerable: true,
295
- configurable: true,
296
- writable: true,
297
- value: (...args) => this.chain(new HGetCommand(args, this.commandOptions))
298
- });
299
- /**
300
- * @see https://redis.io/commands/hgetall
301
- */
302
- Object.defineProperty(this, "hgetall", {
303
- enumerable: true,
304
- configurable: true,
305
- writable: true,
306
- value: (...args) => this.chain(new HGetAllCommand(args, this.commandOptions))
307
- });
308
- /**
309
- * @see https://redis.io/commands/hincrby
310
- */
311
- Object.defineProperty(this, "hincrby", {
312
- enumerable: true,
313
- configurable: true,
314
- writable: true,
315
- value: (...args) => this.chain(new HIncrByCommand(args, this.commandOptions))
316
- });
317
- /**
318
- * @see https://redis.io/commands/hincrbyfloat
319
- */
320
- Object.defineProperty(this, "hincrbyfloat", {
321
- enumerable: true,
322
- configurable: true,
323
- writable: true,
324
- value: (...args) => this.chain(new HIncrByFloatCommand(args, this.commandOptions))
325
- });
326
- /**
327
- * @see https://redis.io/commands/hkeys
328
- */
329
- Object.defineProperty(this, "hkeys", {
330
- enumerable: true,
331
- configurable: true,
332
- writable: true,
333
- value: (...args) => this.chain(new HKeysCommand(args, this.commandOptions))
334
- });
335
- /**
336
- * @see https://redis.io/commands/hlen
337
- */
338
- Object.defineProperty(this, "hlen", {
339
- enumerable: true,
340
- configurable: true,
341
- writable: true,
342
- value: (...args) => this.chain(new HLenCommand(args, this.commandOptions))
343
- });
344
- /**
345
- * @see https://redis.io/commands/hmget
346
- */
347
- Object.defineProperty(this, "hmget", {
348
- enumerable: true,
349
- configurable: true,
350
- writable: true,
351
- value: (...args) => this.chain(new HMGetCommand(args, this.commandOptions))
352
- });
353
- /**
354
- * @see https://redis.io/commands/hmset
355
- */
356
- Object.defineProperty(this, "hmset", {
357
- enumerable: true,
358
- configurable: true,
359
- writable: true,
360
- value: (key, kv) => this.chain(new HMSetCommand([key, kv], this.commandOptions))
361
- });
362
- /**
363
- * @see https://redis.io/commands/hscan
364
- */
365
- Object.defineProperty(this, "hscan", {
366
- enumerable: true,
367
- configurable: true,
368
- writable: true,
369
- value: (...args) => this.chain(new HScanCommand(args, this.commandOptions))
370
- });
371
- /**
372
- * @see https://redis.io/commands/hset
373
- */
374
- Object.defineProperty(this, "hset", {
375
- enumerable: true,
376
- configurable: true,
377
- writable: true,
378
- value: (key, kv) => this.chain(new HSetCommand([key, kv], this.commandOptions))
379
- });
380
- /**
381
- * @see https://redis.io/commands/hsetnx
382
- */
383
- Object.defineProperty(this, "hsetnx", {
384
- enumerable: true,
385
- configurable: true,
386
- writable: true,
387
- value: (key, field, value) => this.chain(new HSetNXCommand([key, field, value], this.commandOptions))
388
- });
389
- /**
390
- * @see https://redis.io/commands/hstrlen
391
- */
392
- Object.defineProperty(this, "hstrlen", {
393
- enumerable: true,
394
- configurable: true,
395
- writable: true,
396
- value: (...args) => this.chain(new HStrLenCommand(args, this.commandOptions))
397
- });
398
- /**
399
- * @see https://redis.io/commands/hvals
400
- */
401
- Object.defineProperty(this, "hvals", {
402
- enumerable: true,
403
- configurable: true,
404
- writable: true,
405
- value: (...args) => this.chain(new HValsCommand(args, this.commandOptions))
406
- });
407
- /**
408
- * @see https://redis.io/commands/incr
409
- */
410
- Object.defineProperty(this, "incr", {
411
- enumerable: true,
412
- configurable: true,
413
- writable: true,
414
- value: (...args) => this.chain(new IncrCommand(args, this.commandOptions))
415
- });
416
- /**
417
- * @see https://redis.io/commands/incrby
418
- */
419
- Object.defineProperty(this, "incrby", {
420
- enumerable: true,
421
- configurable: true,
422
- writable: true,
423
- value: (...args) => this.chain(new IncrByCommand(args, this.commandOptions))
424
- });
425
- /**
426
- * @see https://redis.io/commands/incrbyfloat
427
- */
428
- Object.defineProperty(this, "incrbyfloat", {
429
- enumerable: true,
430
- configurable: true,
431
- writable: true,
432
- value: (...args) => this.chain(new IncrByFloatCommand(args, this.commandOptions))
433
- });
434
- /**
435
- * @see https://redis.io/commands/keys
436
- */
437
- Object.defineProperty(this, "keys", {
438
- enumerable: true,
439
- configurable: true,
440
- writable: true,
441
- value: (...args) => this.chain(new KeysCommand(args, this.commandOptions))
442
- });
443
- /**
444
- * @see https://redis.io/commands/lindex
445
- */
446
- Object.defineProperty(this, "lindex", {
447
- enumerable: true,
448
- configurable: true,
449
- writable: true,
450
- value: (...args) => this.chain(new LIndexCommand(args, this.commandOptions))
451
- });
452
- /**
453
- * @see https://redis.io/commands/linsert
454
- */
455
- Object.defineProperty(this, "linsert", {
456
- enumerable: true,
457
- configurable: true,
458
- writable: true,
459
- value: (key, direction, pivot, value) => this.chain(new LInsertCommand([key, direction, pivot, value], this.commandOptions))
460
- });
461
- /**
462
- * @see https://redis.io/commands/llen
463
- */
464
- Object.defineProperty(this, "llen", {
465
- enumerable: true,
466
- configurable: true,
467
- writable: true,
468
- value: (...args) => this.chain(new LLenCommand(args, this.commandOptions))
469
- });
470
- /**
471
- * @see https://redis.io/commands/lpop
472
- */
473
- Object.defineProperty(this, "lpop", {
474
- enumerable: true,
475
- configurable: true,
476
- writable: true,
477
- value: (...args) => this.chain(new LPopCommand(args, this.commandOptions))
478
- });
479
- /**
480
- * @see https://redis.io/commands/lpos
481
- */
482
- Object.defineProperty(this, "lpos", {
483
- enumerable: true,
484
- configurable: true,
485
- writable: true,
486
- value: (...args) => this.chain(new LPosCommand(args, this.commandOptions))
487
- });
488
- /**
489
- * @see https://redis.io/commands/lpush
490
- */
491
- Object.defineProperty(this, "lpush", {
492
- enumerable: true,
493
- configurable: true,
494
- writable: true,
495
- value: (key, ...elements) => this.chain(new LPushCommand([key, ...elements], this.commandOptions))
496
- });
497
- /**
498
- * @see https://redis.io/commands/lpushx
499
- */
500
- Object.defineProperty(this, "lpushx", {
501
- enumerable: true,
502
- configurable: true,
503
- writable: true,
504
- value: (key, ...elements) => this.chain(new LPushXCommand([key, ...elements], this.commandOptions))
505
- });
506
- /**
507
- * @see https://redis.io/commands/lrange
508
- */
509
- Object.defineProperty(this, "lrange", {
510
- enumerable: true,
511
- configurable: true,
512
- writable: true,
513
- value: (...args) => this.chain(new LRangeCommand(args, this.commandOptions))
514
- });
515
- /**
516
- * @see https://redis.io/commands/lrem
517
- */
518
- Object.defineProperty(this, "lrem", {
519
- enumerable: true,
520
- configurable: true,
521
- writable: true,
522
- value: (key, count, value) => this.chain(new LRemCommand([key, count, value], this.commandOptions))
523
- });
524
- /**
525
- * @see https://redis.io/commands/lset
526
- */
527
- Object.defineProperty(this, "lset", {
528
- enumerable: true,
529
- configurable: true,
530
- writable: true,
531
- value: (key, index, value) => this.chain(new LSetCommand([key, index, value], this.commandOptions))
532
- });
533
- /**
534
- * @see https://redis.io/commands/ltrim
535
- */
536
- Object.defineProperty(this, "ltrim", {
537
- enumerable: true,
538
- configurable: true,
539
- writable: true,
540
- value: (...args) => this.chain(new LTrimCommand(args, this.commandOptions))
541
- });
542
- /**
543
- * @see https://redis.io/commands/mget
544
- */
545
- Object.defineProperty(this, "mget", {
546
- enumerable: true,
547
- configurable: true,
548
- writable: true,
549
- value: (...args) => this.chain(new MGetCommand(args, this.commandOptions))
550
- });
551
- /**
552
- * @see https://redis.io/commands/mset
553
- */
554
- Object.defineProperty(this, "mset", {
555
- enumerable: true,
556
- configurable: true,
557
- writable: true,
558
- value: (kv) => this.chain(new MSetCommand([kv], this.commandOptions))
559
- });
560
- /**
561
- * @see https://redis.io/commands/msetnx
562
- */
563
- Object.defineProperty(this, "msetnx", {
564
- enumerable: true,
565
- configurable: true,
566
- writable: true,
567
- value: (kv) => this.chain(new MSetNXCommand([kv], this.commandOptions))
568
- });
569
- /**
570
- * @see https://redis.io/commands/persist
571
- */
572
- Object.defineProperty(this, "persist", {
573
- enumerable: true,
574
- configurable: true,
575
- writable: true,
576
- value: (...args) => this.chain(new PersistCommand(args, this.commandOptions))
577
- });
578
- /**
579
- * @see https://redis.io/commands/pexpire
580
- */
581
- Object.defineProperty(this, "pexpire", {
582
- enumerable: true,
583
- configurable: true,
584
- writable: true,
585
- value: (...args) => this.chain(new PExpireCommand(args, this.commandOptions))
586
- });
587
- /**
588
- * @see https://redis.io/commands/pexpireat
589
- */
590
- Object.defineProperty(this, "pexpireat", {
591
- enumerable: true,
592
- configurable: true,
593
- writable: true,
594
- value: (...args) => this.chain(new PExpireAtCommand(args, this.commandOptions))
595
- });
596
- /**
597
- * @see https://redis.io/commands/ping
598
- */
599
- Object.defineProperty(this, "ping", {
600
- enumerable: true,
601
- configurable: true,
602
- writable: true,
603
- value: (args) => this.chain(new PingCommand(args, this.commandOptions))
604
- });
605
- /**
606
- * @see https://redis.io/commands/psetex
607
- */
608
- Object.defineProperty(this, "psetex", {
609
- enumerable: true,
610
- configurable: true,
611
- writable: true,
612
- value: (key, ttl, value) => this.chain(new PSetEXCommand([key, ttl, value], this.commandOptions))
613
- });
614
- /**
615
- * @see https://redis.io/commands/pttl
616
- */
617
- Object.defineProperty(this, "pttl", {
618
- enumerable: true,
619
- configurable: true,
620
- writable: true,
621
- value: (...args) => this.chain(new PTtlCommand(args, this.commandOptions))
622
- });
623
- /**
624
- * @see https://redis.io/commands/publish
625
- */
626
- Object.defineProperty(this, "publish", {
627
- enumerable: true,
628
- configurable: true,
629
- writable: true,
630
- value: (...args) => this.chain(new PublishCommand(args, this.commandOptions))
631
- });
632
- /**
633
- * @see https://redis.io/commands/randomkey
634
- */
635
- Object.defineProperty(this, "randomkey", {
636
- enumerable: true,
637
- configurable: true,
638
- writable: true,
639
- value: () => this.chain(new RandomKeyCommand(this.commandOptions))
640
- });
641
- /**
642
- * @see https://redis.io/commands/rename
643
- */
644
- Object.defineProperty(this, "rename", {
645
- enumerable: true,
646
- configurable: true,
647
- writable: true,
648
- value: (...args) => this.chain(new RenameCommand(args, this.commandOptions))
649
- });
650
- /**
651
- * @see https://redis.io/commands/renamenx
652
- */
653
- Object.defineProperty(this, "renamenx", {
654
- enumerable: true,
655
- configurable: true,
656
- writable: true,
657
- value: (...args) => this.chain(new RenameNXCommand(args, this.commandOptions))
658
- });
659
- /**
660
- * @see https://redis.io/commands/rpop
661
- */
662
- Object.defineProperty(this, "rpop", {
663
- enumerable: true,
664
- configurable: true,
665
- writable: true,
666
- value: (...args) => this.chain(new RPopCommand(args, this.commandOptions))
667
- });
668
- /**
669
- * @see https://redis.io/commands/rpush
670
- */
671
- Object.defineProperty(this, "rpush", {
672
- enumerable: true,
673
- configurable: true,
674
- writable: true,
675
- value: (key, ...elements) => this.chain(new RPushCommand([key, ...elements], this.commandOptions))
676
- });
677
- /**
678
- * @see https://redis.io/commands/rpushx
679
- */
680
- Object.defineProperty(this, "rpushx", {
681
- enumerable: true,
682
- configurable: true,
683
- writable: true,
684
- value: (key, ...elements) => this.chain(new RPushXCommand([key, ...elements], this.commandOptions))
685
- });
686
- /**
687
- * @see https://redis.io/commands/sadd
688
- */
689
- Object.defineProperty(this, "sadd", {
690
- enumerable: true,
691
- configurable: true,
692
- writable: true,
693
- value: (key, ...members) => this.chain(new SAddCommand([key, ...members], this.commandOptions))
694
- });
695
- /**
696
- * @see https://redis.io/commands/scan
697
- */
698
- Object.defineProperty(this, "scan", {
699
- enumerable: true,
700
- configurable: true,
701
- writable: true,
702
- value: (...args) => this.chain(new ScanCommand(args, this.commandOptions))
703
- });
704
- /**
705
- * @see https://redis.io/commands/scard
706
- */
707
- Object.defineProperty(this, "scard", {
708
- enumerable: true,
709
- configurable: true,
710
- writable: true,
711
- value: (...args) => this.chain(new SCardCommand(args, this.commandOptions))
712
- });
713
- /**
714
- * @see https://redis.io/commands/script-exists
715
- */
716
- Object.defineProperty(this, "scriptExists", {
717
- enumerable: true,
718
- configurable: true,
719
- writable: true,
720
- value: (...args) => this.chain(new ScriptExistsCommand(args, this.commandOptions))
721
- });
722
- /**
723
- * @see https://redis.io/commands/script-flush
724
- */
725
- Object.defineProperty(this, "scriptFlush", {
726
- enumerable: true,
727
- configurable: true,
728
- writable: true,
729
- value: (...args) => this.chain(new ScriptFlushCommand(args, this.commandOptions))
730
- });
731
- /**
732
- * @see https://redis.io/commands/script-load
733
- */
734
- Object.defineProperty(this, "scriptLoad", {
735
- enumerable: true,
736
- configurable: true,
737
- writable: true,
738
- value: (...args) => this.chain(new ScriptLoadCommand(args, this.commandOptions))
739
- });
740
- /*)*
741
- * @see https://redis.io/commands/sdiff
742
- */
743
- Object.defineProperty(this, "sdiff", {
744
- enumerable: true,
745
- configurable: true,
746
- writable: true,
747
- value: (...args) => this.chain(new SDiffCommand(args, this.commandOptions))
748
- });
749
- /**
750
- * @see https://redis.io/commands/sdiffstore
751
- */
752
- Object.defineProperty(this, "sdiffstore", {
753
- enumerable: true,
754
- configurable: true,
755
- writable: true,
756
- value: (...args) => this.chain(new SDiffStoreCommand(args, this.commandOptions))
757
- });
758
- /**
759
- * @see https://redis.io/commands/set
760
- */
761
- Object.defineProperty(this, "set", {
762
- enumerable: true,
763
- configurable: true,
764
- writable: true,
765
- value: (key, value, opts) => this.chain(new SetCommand([key, value, opts], this.commandOptions))
766
- });
767
- /**
768
- * @see https://redis.io/commands/setbit
769
- */
770
- Object.defineProperty(this, "setbit", {
771
- enumerable: true,
772
- configurable: true,
773
- writable: true,
774
- value: (...args) => this.chain(new SetBitCommand(args, this.commandOptions))
775
- });
776
- /**
777
- * @see https://redis.io/commands/setex
778
- */
779
- Object.defineProperty(this, "setex", {
780
- enumerable: true,
781
- configurable: true,
782
- writable: true,
783
- value: (key, ttl, value) => this.chain(new SetExCommand([key, ttl, value], this.commandOptions))
784
- });
785
- /**
786
- * @see https://redis.io/commands/setnx
787
- */
788
- Object.defineProperty(this, "setnx", {
789
- enumerable: true,
790
- configurable: true,
791
- writable: true,
792
- value: (key, value) => this.chain(new SetNxCommand([key, value], this.commandOptions))
793
- });
794
- /**
795
- * @see https://redis.io/commands/setrange
796
- */
797
- Object.defineProperty(this, "setrange", {
798
- enumerable: true,
799
- configurable: true,
800
- writable: true,
801
- value: (...args) => this.chain(new SetRangeCommand(args, this.commandOptions))
802
- });
803
- /**
804
- * @see https://redis.io/commands/sinter
805
- */
806
- Object.defineProperty(this, "sinter", {
807
- enumerable: true,
808
- configurable: true,
809
- writable: true,
810
- value: (...args) => this.chain(new SInterCommand(args, this.commandOptions))
811
- });
812
- /**
813
- * @see https://redis.io/commands/sinterstore
814
- */
815
- Object.defineProperty(this, "sinterstore", {
816
- enumerable: true,
817
- configurable: true,
818
- writable: true,
819
- value: (...args) => this.chain(new SInterStoreCommand(args, this.commandOptions))
820
- });
821
- /**
822
- * @see https://redis.io/commands/sismember
823
- */
824
- Object.defineProperty(this, "sismember", {
825
- enumerable: true,
826
- configurable: true,
827
- writable: true,
828
- value: (key, member) => this.chain(new SIsMemberCommand([key, member], this.commandOptions))
829
- });
830
- /**
831
- * @see https://redis.io/commands/smembers
832
- */
833
- Object.defineProperty(this, "smembers", {
834
- enumerable: true,
835
- configurable: true,
836
- writable: true,
837
- value: (...args) => this.chain(new SMembersCommand(args, this.commandOptions))
838
- });
839
- /**
840
- * @see https://redis.io/commands/smove
841
- */
842
- Object.defineProperty(this, "smove", {
843
- enumerable: true,
844
- configurable: true,
845
- writable: true,
846
- value: (source, destination, member) => this.chain(new SMoveCommand([source, destination, member], this.commandOptions))
847
- });
848
- /**
849
- * @see https://redis.io/commands/spop
850
- */
851
- Object.defineProperty(this, "spop", {
852
- enumerable: true,
853
- configurable: true,
854
- writable: true,
855
- value: (...args) => this.chain(new SPopCommand(args, this.commandOptions))
856
- });
857
- /**
858
- * @see https://redis.io/commands/srandmember
859
- */
860
- Object.defineProperty(this, "srandmember", {
861
- enumerable: true,
862
- configurable: true,
863
- writable: true,
864
- value: (...args) => this.chain(new SRandMemberCommand(args, this.commandOptions))
865
- });
866
- /**
867
- * @see https://redis.io/commands/srem
868
- */
869
- Object.defineProperty(this, "srem", {
870
- enumerable: true,
871
- configurable: true,
872
- writable: true,
873
- value: (key, ...members) => this.chain(new SRemCommand([key, ...members], this.commandOptions))
874
- });
875
- /**
876
- * @see https://redis.io/commands/sscan
877
- */
878
- Object.defineProperty(this, "sscan", {
879
- enumerable: true,
880
- configurable: true,
881
- writable: true,
882
- value: (...args) => this.chain(new SScanCommand(args, this.commandOptions))
883
- });
884
- /**
885
- * @see https://redis.io/commands/strlen
886
- */
887
- Object.defineProperty(this, "strlen", {
888
- enumerable: true,
889
- configurable: true,
890
- writable: true,
891
- value: (...args) => this.chain(new StrLenCommand(args, this.commandOptions))
892
- });
893
- /**
894
- * @see https://redis.io/commands/sunion
895
- */
896
- Object.defineProperty(this, "sunion", {
897
- enumerable: true,
898
- configurable: true,
899
- writable: true,
900
- value: (...args) => this.chain(new SUnionCommand(args, this.commandOptions))
901
- });
902
- /**
903
- * @see https://redis.io/commands/sunionstore
904
- */
905
- Object.defineProperty(this, "sunionstore", {
906
- enumerable: true,
907
- configurable: true,
908
- writable: true,
909
- value: (...args) => this.chain(new SUnionStoreCommand(args, this.commandOptions))
910
- });
911
- /**
912
- * @see https://redis.io/commands/time
913
- */
914
- Object.defineProperty(this, "time", {
915
- enumerable: true,
916
- configurable: true,
917
- writable: true,
918
- value: () => this.chain(new TimeCommand(this.commandOptions))
919
- });
920
- /**
921
- * @see https://redis.io/commands/touch
922
- */
923
- Object.defineProperty(this, "touch", {
924
- enumerable: true,
925
- configurable: true,
926
- writable: true,
927
- value: (...args) => this.chain(new TouchCommand(args, this.commandOptions))
928
- });
929
- /**
930
- * @see https://redis.io/commands/ttl
931
- */
932
- Object.defineProperty(this, "ttl", {
933
- enumerable: true,
934
- configurable: true,
935
- writable: true,
936
- value: (...args) => this.chain(new TtlCommand(args, this.commandOptions))
937
- });
938
- /**
939
- * @see https://redis.io/commands/type
940
- */
941
- Object.defineProperty(this, "type", {
942
- enumerable: true,
943
- configurable: true,
944
- writable: true,
945
- value: (...args) => this.chain(new TypeCommand(args, this.commandOptions))
946
- });
947
- /**
948
- * @see https://redis.io/commands/unlink
949
- */
950
- Object.defineProperty(this, "unlink", {
951
- enumerable: true,
952
- configurable: true,
953
- writable: true,
954
- value: (...args) => this.chain(new UnlinkCommand(args, this.commandOptions))
955
- });
956
- /**
957
- * @see https://redis.io/commands/zadd
958
- */
959
- Object.defineProperty(this, "zadd", {
960
- enumerable: true,
961
- configurable: true,
962
- writable: true,
963
- value: (...args) => {
964
- if ("score" in args[1]) {
965
- return this.chain(new ZAddCommand([args[0], args[1], ...args.slice(2)], this.commandOptions));
966
- }
967
- return this.chain(new ZAddCommand([args[0], args[1], ...args.slice(2)], this.commandOptions));
968
- }
969
- });
970
- /**
971
- * @see https://redis.io/commands/zcard
972
- */
973
- Object.defineProperty(this, "zcard", {
974
- enumerable: true,
975
- configurable: true,
976
- writable: true,
977
- value: (...args) => this.chain(new ZCardCommand(args, this.commandOptions))
978
- });
979
- /**
980
- * @see https://redis.io/commands/zcount
981
- */
982
- Object.defineProperty(this, "zcount", {
983
- enumerable: true,
984
- configurable: true,
985
- writable: true,
986
- value: (...args) => this.chain(new ZCountCommand(args, this.commandOptions))
987
- });
988
- /**
989
- * @see https://redis.io/commands/zincrby
990
- */
991
- Object.defineProperty(this, "zincrby", {
992
- enumerable: true,
993
- configurable: true,
994
- writable: true,
995
- value: (key, increment, member) => this.chain(new ZIncrByCommand([key, increment, member], this.commandOptions))
996
- });
997
- /**
998
- * @see https://redis.io/commands/zinterstore
999
- */
1000
- Object.defineProperty(this, "zinterstore", {
1001
- enumerable: true,
1002
- configurable: true,
1003
- writable: true,
1004
- value: (...args) => this.chain(new ZInterStoreCommand(args, this.commandOptions))
1005
- });
1006
- /**
1007
- * @see https://redis.io/commands/zlexcount
1008
- */
1009
- Object.defineProperty(this, "zlexcount", {
1010
- enumerable: true,
1011
- configurable: true,
1012
- writable: true,
1013
- value: (...args) => this.chain(new ZLexCountCommand(args, this.commandOptions))
1014
- });
1015
- /**
1016
- * @see https://redis.io/commands/zmscore
1017
- */
1018
- Object.defineProperty(this, "zmscore", {
1019
- enumerable: true,
1020
- configurable: true,
1021
- writable: true,
1022
- value: (...args) => this.chain(new ZMScoreCommand(args, this.commandOptions))
1023
- });
1024
- /**
1025
- * @see https://redis.io/commands/zpopmax
1026
- */
1027
- Object.defineProperty(this, "zpopmax", {
1028
- enumerable: true,
1029
- configurable: true,
1030
- writable: true,
1031
- value: (...args) => this.chain(new ZPopMaxCommand(args, this.commandOptions))
1032
- });
1033
- /**
1034
- * @see https://redis.io/commands/zpopmin
1035
- */
1036
- Object.defineProperty(this, "zpopmin", {
1037
- enumerable: true,
1038
- configurable: true,
1039
- writable: true,
1040
- value: (...args) => this.chain(new ZPopMinCommand(args, this.commandOptions))
1041
- });
1042
- /**
1043
- * @see https://redis.io/commands/zrange
1044
- */
1045
- Object.defineProperty(this, "zrange", {
1046
- enumerable: true,
1047
- configurable: true,
1048
- writable: true,
1049
- value: (...args) => this.chain(new ZRangeCommand(args, this.commandOptions))
1050
- });
1051
- /**
1052
- * @see https://redis.io/commands/zrank
1053
- */
1054
- Object.defineProperty(this, "zrank", {
1055
- enumerable: true,
1056
- configurable: true,
1057
- writable: true,
1058
- value: (key, member) => this.chain(new ZRankCommand([key, member], this.commandOptions))
1059
- });
1060
- /**
1061
- * @see https://redis.io/commands/zrem
1062
- */
1063
- Object.defineProperty(this, "zrem", {
1064
- enumerable: true,
1065
- configurable: true,
1066
- writable: true,
1067
- value: (key, ...members) => this.chain(new ZRemCommand([key, ...members], this.commandOptions))
1068
- });
1069
- /**
1070
- * @see https://redis.io/commands/zremrangebylex
1071
- */
1072
- Object.defineProperty(this, "zremrangebylex", {
1073
- enumerable: true,
1074
- configurable: true,
1075
- writable: true,
1076
- value: (...args) => this.chain(new ZRemRangeByLexCommand(args, this.commandOptions))
1077
- });
1078
- /**
1079
- * @see https://redis.io/commands/zremrangebyrank
1080
- */
1081
- Object.defineProperty(this, "zremrangebyrank", {
1082
- enumerable: true,
1083
- configurable: true,
1084
- writable: true,
1085
- value: (...args) => this.chain(new ZRemRangeByRankCommand(args, this.commandOptions))
1086
- });
1087
- /**
1088
- * @see https://redis.io/commands/zremrangebyscore
1089
- */
1090
- Object.defineProperty(this, "zremrangebyscore", {
1091
- enumerable: true,
1092
- configurable: true,
1093
- writable: true,
1094
- value: (...args) => this.chain(new ZRemRangeByScoreCommand(args, this.commandOptions))
1095
- });
1096
- /**
1097
- * @see https://redis.io/commands/zrevrank
1098
- */
1099
- Object.defineProperty(this, "zrevrank", {
1100
- enumerable: true,
1101
- configurable: true,
1102
- writable: true,
1103
- value: (key, member) => this.chain(new ZRevRankCommand([key, member], this.commandOptions))
1104
- });
1105
- /**
1106
- * @see https://redis.io/commands/zscan
1107
- */
1108
- Object.defineProperty(this, "zscan", {
1109
- enumerable: true,
1110
- configurable: true,
1111
- writable: true,
1112
- value: (...args) => this.chain(new ZScanCommand(args, this.commandOptions))
1113
- });
1114
- /**
1115
- * @see https://redis.io/commands/zscore
1116
- */
1117
- Object.defineProperty(this, "zscore", {
1118
- enumerable: true,
1119
- configurable: true,
1120
- writable: true,
1121
- value: (key, member) => this.chain(new ZScoreCommand([key, member], this.commandOptions))
1122
- });
1123
- /**
1124
- * @see https://redis.io/commands/zunionstore
1125
- */
1126
- Object.defineProperty(this, "zunionstore", {
1127
- enumerable: true,
1128
- configurable: true,
1129
- writable: true,
1130
- value: (...args) => this.chain(new ZUnionStoreCommand(args, this.commandOptions))
1131
- });
1132
- this.client = client;
1133
- this.commands = [];
1134
- this.commandOptions = commandOptions;
1135
- }
1136
- /**
1137
- * Pushes a command into the pipelien and returns a chainable instance of the
1138
- * pipeline
1139
- */
1140
- chain(command) {
1141
- this.commands.push(command);
1142
- return this;
1143
- }
1144
- }