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