@upstash/redis 0.0.0-ci.dc584c15-20231010 → 0.0.0-ci.dd02f14981f2550d21bc49959450d2588b9c4f1a-20240917073031

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 (507) hide show
  1. package/README.md +17 -6
  2. package/chunk-Q6EDGL5W.js +1 -0
  3. package/chunk-VUMOES52.mjs +1 -0
  4. package/cloudflare.d.mts +55 -0
  5. package/cloudflare.d.ts +55 -0
  6. package/cloudflare.js +1 -0
  7. package/cloudflare.mjs +1 -0
  8. package/fastly.d.mts +48 -0
  9. package/fastly.d.ts +48 -0
  10. package/fastly.js +1 -0
  11. package/fastly.mjs +1 -0
  12. package/nodejs.d.mts +73 -0
  13. package/nodejs.d.ts +73 -0
  14. package/nodejs.js +1 -0
  15. package/nodejs.mjs +1 -0
  16. package/package.json +1 -96
  17. package/zmscore-B5GggKAi.d.mts +3486 -0
  18. package/zmscore-B5GggKAi.d.ts +3486 -0
  19. package/.releaserc +0 -14
  20. package/esm/deps/deno.land/x/base64@v0.2.1/base.js +0 -100
  21. package/esm/deps/deno.land/x/base64@v0.2.1/base64url.js +0 -9
  22. package/esm/deps/deno.land/x/sha1@v1.0.3/deps.js +0 -1
  23. package/esm/deps/deno.land/x/sha1@v1.0.3/mod.js +0 -191
  24. package/esm/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +0 -50
  25. package/esm/package.json +0 -3
  26. package/esm/pkg/commands/append.js +0 -9
  27. package/esm/pkg/commands/bitcount.js +0 -16
  28. package/esm/pkg/commands/bitop.js +0 -9
  29. package/esm/pkg/commands/bitpos.js +0 -9
  30. package/esm/pkg/commands/command.js +0 -66
  31. package/esm/pkg/commands/dbsize.js +0 -9
  32. package/esm/pkg/commands/decr.js +0 -9
  33. package/esm/pkg/commands/decrby.js +0 -9
  34. package/esm/pkg/commands/del.js +0 -9
  35. package/esm/pkg/commands/echo.js +0 -9
  36. package/esm/pkg/commands/eval.js +0 -9
  37. package/esm/pkg/commands/evalsha.js +0 -9
  38. package/esm/pkg/commands/exists.js +0 -9
  39. package/esm/pkg/commands/expire.js +0 -9
  40. package/esm/pkg/commands/expireat.js +0 -9
  41. package/esm/pkg/commands/flushall.js +0 -13
  42. package/esm/pkg/commands/flushdb.js +0 -13
  43. package/esm/pkg/commands/get.js +0 -9
  44. package/esm/pkg/commands/getbit.js +0 -9
  45. package/esm/pkg/commands/getdel.js +0 -9
  46. package/esm/pkg/commands/getrange.js +0 -9
  47. package/esm/pkg/commands/getset.js +0 -9
  48. package/esm/pkg/commands/hdel.js +0 -9
  49. package/esm/pkg/commands/hexists.js +0 -9
  50. package/esm/pkg/commands/hget.js +0 -9
  51. package/esm/pkg/commands/hgetall.js +0 -29
  52. package/esm/pkg/commands/hincrby.js +0 -9
  53. package/esm/pkg/commands/hincrbyfloat.js +0 -9
  54. package/esm/pkg/commands/hkeys.js +0 -9
  55. package/esm/pkg/commands/hlen.js +0 -9
  56. package/esm/pkg/commands/hmget.js +0 -35
  57. package/esm/pkg/commands/hmset.js +0 -13
  58. package/esm/pkg/commands/hrandfield.js +0 -39
  59. package/esm/pkg/commands/hscan.js +0 -16
  60. package/esm/pkg/commands/hset.js +0 -13
  61. package/esm/pkg/commands/hsetnx.js +0 -9
  62. package/esm/pkg/commands/hstrlen.js +0 -9
  63. package/esm/pkg/commands/hvals.js +0 -9
  64. package/esm/pkg/commands/incr.js +0 -9
  65. package/esm/pkg/commands/incrby.js +0 -9
  66. package/esm/pkg/commands/incrbyfloat.js +0 -9
  67. package/esm/pkg/commands/json_arrappend.js +0 -9
  68. package/esm/pkg/commands/json_arrindex.js +0 -9
  69. package/esm/pkg/commands/json_arrinsert.js +0 -9
  70. package/esm/pkg/commands/json_arrlen.js +0 -9
  71. package/esm/pkg/commands/json_arrpop.js +0 -9
  72. package/esm/pkg/commands/json_arrtrim.js +0 -12
  73. package/esm/pkg/commands/json_clear.js +0 -9
  74. package/esm/pkg/commands/json_del.js +0 -9
  75. package/esm/pkg/commands/json_forget.js +0 -9
  76. package/esm/pkg/commands/json_get.js +0 -30
  77. package/esm/pkg/commands/json_mget.js +0 -9
  78. package/esm/pkg/commands/json_numincrby.js +0 -9
  79. package/esm/pkg/commands/json_nummultby.js +0 -9
  80. package/esm/pkg/commands/json_objkeys.js +0 -9
  81. package/esm/pkg/commands/json_objlen.js +0 -9
  82. package/esm/pkg/commands/json_resp.js +0 -9
  83. package/esm/pkg/commands/json_set.js +0 -18
  84. package/esm/pkg/commands/json_strappend.js +0 -9
  85. package/esm/pkg/commands/json_strlen.js +0 -9
  86. package/esm/pkg/commands/json_toggle.js +0 -9
  87. package/esm/pkg/commands/json_type.js +0 -9
  88. package/esm/pkg/commands/keys.js +0 -9
  89. package/esm/pkg/commands/lindex.js +0 -6
  90. package/esm/pkg/commands/linsert.js +0 -6
  91. package/esm/pkg/commands/llen.js +0 -9
  92. package/esm/pkg/commands/lmove.js +0 -9
  93. package/esm/pkg/commands/lpop.js +0 -9
  94. package/esm/pkg/commands/lpos.js +0 -19
  95. package/esm/pkg/commands/lpush.js +0 -9
  96. package/esm/pkg/commands/lpushx.js +0 -9
  97. package/esm/pkg/commands/lrange.js +0 -6
  98. package/esm/pkg/commands/lrem.js +0 -6
  99. package/esm/pkg/commands/lset.js +0 -6
  100. package/esm/pkg/commands/ltrim.js +0 -6
  101. package/esm/pkg/commands/mget.js +0 -9
  102. package/esm/pkg/commands/mod.js +0 -142
  103. package/esm/pkg/commands/mset.js +0 -12
  104. package/esm/pkg/commands/msetnx.js +0 -9
  105. package/esm/pkg/commands/persist.js +0 -9
  106. package/esm/pkg/commands/pexpire.js +0 -9
  107. package/esm/pkg/commands/pexpireat.js +0 -9
  108. package/esm/pkg/commands/ping.js +0 -13
  109. package/esm/pkg/commands/psetex.js +0 -9
  110. package/esm/pkg/commands/pttl.js +0 -9
  111. package/esm/pkg/commands/publish.js +0 -9
  112. package/esm/pkg/commands/randomkey.js +0 -9
  113. package/esm/pkg/commands/rename.js +0 -9
  114. package/esm/pkg/commands/renamenx.js +0 -9
  115. package/esm/pkg/commands/rpop.js +0 -9
  116. package/esm/pkg/commands/rpush.js +0 -9
  117. package/esm/pkg/commands/rpushx.js +0 -9
  118. package/esm/pkg/commands/sadd.js +0 -9
  119. package/esm/pkg/commands/scan.js +0 -19
  120. package/esm/pkg/commands/scard.js +0 -9
  121. package/esm/pkg/commands/script_exists.js +0 -12
  122. package/esm/pkg/commands/script_flush.js +0 -16
  123. package/esm/pkg/commands/script_load.js +0 -9
  124. package/esm/pkg/commands/sdiff.js +0 -9
  125. package/esm/pkg/commands/sdiffstore.js +0 -9
  126. package/esm/pkg/commands/set.js +0 -36
  127. package/esm/pkg/commands/setbit.js +0 -9
  128. package/esm/pkg/commands/setex.js +0 -9
  129. package/esm/pkg/commands/setnx.js +0 -9
  130. package/esm/pkg/commands/setrange.js +0 -9
  131. package/esm/pkg/commands/sinter.js +0 -9
  132. package/esm/pkg/commands/sinterstore.js +0 -9
  133. package/esm/pkg/commands/sismember.js +0 -9
  134. package/esm/pkg/commands/smembers.js +0 -9
  135. package/esm/pkg/commands/smismember.js +0 -9
  136. package/esm/pkg/commands/smove.js +0 -9
  137. package/esm/pkg/commands/spop.js +0 -13
  138. package/esm/pkg/commands/srandmember.js +0 -13
  139. package/esm/pkg/commands/srem.js +0 -9
  140. package/esm/pkg/commands/sscan.js +0 -16
  141. package/esm/pkg/commands/strlen.js +0 -9
  142. package/esm/pkg/commands/sunion.js +0 -9
  143. package/esm/pkg/commands/sunionstore.js +0 -9
  144. package/esm/pkg/commands/time.js +0 -9
  145. package/esm/pkg/commands/touch.js +0 -9
  146. package/esm/pkg/commands/ttl.js +0 -9
  147. package/esm/pkg/commands/type.js +0 -9
  148. package/esm/pkg/commands/unlink.js +0 -9
  149. package/esm/pkg/commands/xadd.js +0 -26
  150. package/esm/pkg/commands/xrange.js +0 -37
  151. package/esm/pkg/commands/zadd.js +0 -26
  152. package/esm/pkg/commands/zcard.js +0 -9
  153. package/esm/pkg/commands/zcount.js +0 -9
  154. package/esm/pkg/commands/zdiffstore.js +0 -9
  155. package/esm/pkg/commands/zincrby.js +0 -9
  156. package/esm/pkg/commands/zinterstore.js +0 -27
  157. package/esm/pkg/commands/zlexcount.js +0 -9
  158. package/esm/pkg/commands/zmscore.js +0 -10
  159. package/esm/pkg/commands/zpopmax.js +0 -13
  160. package/esm/pkg/commands/zpopmin.js +0 -13
  161. package/esm/pkg/commands/zrange.js +0 -26
  162. package/esm/pkg/commands/zrank.js +0 -9
  163. package/esm/pkg/commands/zrem.js +0 -9
  164. package/esm/pkg/commands/zremrangebylex.js +0 -9
  165. package/esm/pkg/commands/zremrangebyrank.js +0 -9
  166. package/esm/pkg/commands/zremrangebyscore.js +0 -9
  167. package/esm/pkg/commands/zrevrank.js +0 -9
  168. package/esm/pkg/commands/zscan.js +0 -16
  169. package/esm/pkg/commands/zscore.js +0 -9
  170. package/esm/pkg/commands/zunionstore.js +0 -27
  171. package/esm/pkg/error.js +0 -9
  172. package/esm/pkg/http.js +0 -174
  173. package/esm/pkg/pipeline.js +0 -1293
  174. package/esm/pkg/redis.js +0 -1305
  175. package/esm/pkg/script.js +0 -77
  176. package/esm/pkg/types.js +0 -1
  177. package/esm/pkg/util.js +0 -31
  178. package/esm/platforms/cloudflare.js +0 -70
  179. package/esm/platforms/fastly.js +0 -46
  180. package/esm/platforms/node_with_fetch.js +0 -85
  181. package/esm/platforms/nodejs.js +0 -82
  182. package/esm/version.js +0 -1
  183. package/script/deps/deno.land/x/base64@v0.2.1/base.js +0 -104
  184. package/script/deps/deno.land/x/base64@v0.2.1/base64url.js +0 -13
  185. package/script/deps/deno.land/x/sha1@v1.0.3/deps.js +0 -6
  186. package/script/deps/deno.land/x/sha1@v1.0.3/mod.js +0 -196
  187. package/script/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +0 -55
  188. package/script/package.json +0 -3
  189. package/script/pkg/commands/append.js +0 -13
  190. package/script/pkg/commands/bitcount.js +0 -20
  191. package/script/pkg/commands/bitop.js +0 -13
  192. package/script/pkg/commands/bitpos.js +0 -13
  193. package/script/pkg/commands/command.js +0 -70
  194. package/script/pkg/commands/dbsize.js +0 -13
  195. package/script/pkg/commands/decr.js +0 -13
  196. package/script/pkg/commands/decrby.js +0 -13
  197. package/script/pkg/commands/del.js +0 -13
  198. package/script/pkg/commands/echo.js +0 -13
  199. package/script/pkg/commands/eval.js +0 -13
  200. package/script/pkg/commands/evalsha.js +0 -13
  201. package/script/pkg/commands/exists.js +0 -13
  202. package/script/pkg/commands/expire.js +0 -13
  203. package/script/pkg/commands/expireat.js +0 -13
  204. package/script/pkg/commands/flushall.js +0 -17
  205. package/script/pkg/commands/flushdb.js +0 -17
  206. package/script/pkg/commands/get.js +0 -13
  207. package/script/pkg/commands/getbit.js +0 -13
  208. package/script/pkg/commands/getdel.js +0 -13
  209. package/script/pkg/commands/getrange.js +0 -13
  210. package/script/pkg/commands/getset.js +0 -13
  211. package/script/pkg/commands/hdel.js +0 -13
  212. package/script/pkg/commands/hexists.js +0 -13
  213. package/script/pkg/commands/hget.js +0 -13
  214. package/script/pkg/commands/hgetall.js +0 -33
  215. package/script/pkg/commands/hincrby.js +0 -13
  216. package/script/pkg/commands/hincrbyfloat.js +0 -13
  217. package/script/pkg/commands/hkeys.js +0 -13
  218. package/script/pkg/commands/hlen.js +0 -13
  219. package/script/pkg/commands/hmget.js +0 -39
  220. package/script/pkg/commands/hmset.js +0 -17
  221. package/script/pkg/commands/hrandfield.js +0 -43
  222. package/script/pkg/commands/hscan.js +0 -20
  223. package/script/pkg/commands/hset.js +0 -17
  224. package/script/pkg/commands/hsetnx.js +0 -13
  225. package/script/pkg/commands/hstrlen.js +0 -13
  226. package/script/pkg/commands/hvals.js +0 -13
  227. package/script/pkg/commands/incr.js +0 -13
  228. package/script/pkg/commands/incrby.js +0 -13
  229. package/script/pkg/commands/incrbyfloat.js +0 -13
  230. package/script/pkg/commands/json_arrappend.js +0 -13
  231. package/script/pkg/commands/json_arrindex.js +0 -13
  232. package/script/pkg/commands/json_arrinsert.js +0 -13
  233. package/script/pkg/commands/json_arrlen.js +0 -13
  234. package/script/pkg/commands/json_arrpop.js +0 -13
  235. package/script/pkg/commands/json_arrtrim.js +0 -16
  236. package/script/pkg/commands/json_clear.js +0 -13
  237. package/script/pkg/commands/json_del.js +0 -13
  238. package/script/pkg/commands/json_forget.js +0 -13
  239. package/script/pkg/commands/json_get.js +0 -34
  240. package/script/pkg/commands/json_mget.js +0 -13
  241. package/script/pkg/commands/json_numincrby.js +0 -13
  242. package/script/pkg/commands/json_nummultby.js +0 -13
  243. package/script/pkg/commands/json_objkeys.js +0 -13
  244. package/script/pkg/commands/json_objlen.js +0 -13
  245. package/script/pkg/commands/json_resp.js +0 -13
  246. package/script/pkg/commands/json_set.js +0 -22
  247. package/script/pkg/commands/json_strappend.js +0 -13
  248. package/script/pkg/commands/json_strlen.js +0 -13
  249. package/script/pkg/commands/json_toggle.js +0 -13
  250. package/script/pkg/commands/json_type.js +0 -13
  251. package/script/pkg/commands/keys.js +0 -13
  252. package/script/pkg/commands/lindex.js +0 -10
  253. package/script/pkg/commands/linsert.js +0 -10
  254. package/script/pkg/commands/llen.js +0 -13
  255. package/script/pkg/commands/lmove.js +0 -13
  256. package/script/pkg/commands/lpop.js +0 -13
  257. package/script/pkg/commands/lpos.js +0 -23
  258. package/script/pkg/commands/lpush.js +0 -13
  259. package/script/pkg/commands/lpushx.js +0 -13
  260. package/script/pkg/commands/lrange.js +0 -10
  261. package/script/pkg/commands/lrem.js +0 -10
  262. package/script/pkg/commands/lset.js +0 -10
  263. package/script/pkg/commands/ltrim.js +0 -10
  264. package/script/pkg/commands/mget.js +0 -13
  265. package/script/pkg/commands/mod.js +0 -158
  266. package/script/pkg/commands/mset.js +0 -16
  267. package/script/pkg/commands/msetnx.js +0 -13
  268. package/script/pkg/commands/persist.js +0 -13
  269. package/script/pkg/commands/pexpire.js +0 -13
  270. package/script/pkg/commands/pexpireat.js +0 -13
  271. package/script/pkg/commands/ping.js +0 -17
  272. package/script/pkg/commands/psetex.js +0 -13
  273. package/script/pkg/commands/pttl.js +0 -13
  274. package/script/pkg/commands/publish.js +0 -13
  275. package/script/pkg/commands/randomkey.js +0 -13
  276. package/script/pkg/commands/rename.js +0 -13
  277. package/script/pkg/commands/renamenx.js +0 -13
  278. package/script/pkg/commands/rpop.js +0 -13
  279. package/script/pkg/commands/rpush.js +0 -13
  280. package/script/pkg/commands/rpushx.js +0 -13
  281. package/script/pkg/commands/sadd.js +0 -13
  282. package/script/pkg/commands/scan.js +0 -23
  283. package/script/pkg/commands/scard.js +0 -13
  284. package/script/pkg/commands/script_exists.js +0 -16
  285. package/script/pkg/commands/script_flush.js +0 -20
  286. package/script/pkg/commands/script_load.js +0 -13
  287. package/script/pkg/commands/sdiff.js +0 -13
  288. package/script/pkg/commands/sdiffstore.js +0 -13
  289. package/script/pkg/commands/set.js +0 -40
  290. package/script/pkg/commands/setbit.js +0 -13
  291. package/script/pkg/commands/setex.js +0 -13
  292. package/script/pkg/commands/setnx.js +0 -13
  293. package/script/pkg/commands/setrange.js +0 -13
  294. package/script/pkg/commands/sinter.js +0 -13
  295. package/script/pkg/commands/sinterstore.js +0 -13
  296. package/script/pkg/commands/sismember.js +0 -13
  297. package/script/pkg/commands/smembers.js +0 -13
  298. package/script/pkg/commands/smismember.js +0 -13
  299. package/script/pkg/commands/smove.js +0 -13
  300. package/script/pkg/commands/spop.js +0 -17
  301. package/script/pkg/commands/srandmember.js +0 -17
  302. package/script/pkg/commands/srem.js +0 -13
  303. package/script/pkg/commands/sscan.js +0 -20
  304. package/script/pkg/commands/strlen.js +0 -13
  305. package/script/pkg/commands/sunion.js +0 -13
  306. package/script/pkg/commands/sunionstore.js +0 -13
  307. package/script/pkg/commands/time.js +0 -13
  308. package/script/pkg/commands/touch.js +0 -13
  309. package/script/pkg/commands/ttl.js +0 -13
  310. package/script/pkg/commands/type.js +0 -13
  311. package/script/pkg/commands/unlink.js +0 -13
  312. package/script/pkg/commands/xadd.js +0 -30
  313. package/script/pkg/commands/xrange.js +0 -41
  314. package/script/pkg/commands/zadd.js +0 -30
  315. package/script/pkg/commands/zcard.js +0 -13
  316. package/script/pkg/commands/zcount.js +0 -13
  317. package/script/pkg/commands/zdiffstore.js +0 -13
  318. package/script/pkg/commands/zincrby.js +0 -13
  319. package/script/pkg/commands/zinterstore.js +0 -31
  320. package/script/pkg/commands/zlexcount.js +0 -13
  321. package/script/pkg/commands/zmscore.js +0 -14
  322. package/script/pkg/commands/zpopmax.js +0 -17
  323. package/script/pkg/commands/zpopmin.js +0 -17
  324. package/script/pkg/commands/zrange.js +0 -30
  325. package/script/pkg/commands/zrank.js +0 -13
  326. package/script/pkg/commands/zrem.js +0 -13
  327. package/script/pkg/commands/zremrangebylex.js +0 -13
  328. package/script/pkg/commands/zremrangebyrank.js +0 -13
  329. package/script/pkg/commands/zremrangebyscore.js +0 -13
  330. package/script/pkg/commands/zrevrank.js +0 -13
  331. package/script/pkg/commands/zscan.js +0 -20
  332. package/script/pkg/commands/zscore.js +0 -13
  333. package/script/pkg/commands/zunionstore.js +0 -31
  334. package/script/pkg/error.js +0 -13
  335. package/script/pkg/http.js +0 -178
  336. package/script/pkg/pipeline.js +0 -1297
  337. package/script/pkg/redis.js +0 -1309
  338. package/script/pkg/script.js +0 -81
  339. package/script/pkg/types.js +0 -2
  340. package/script/pkg/util.js +0 -35
  341. package/script/platforms/cloudflare.js +0 -97
  342. package/script/platforms/fastly.js +0 -73
  343. package/script/platforms/node_with_fetch.js +0 -112
  344. package/script/platforms/nodejs.js +0 -109
  345. package/script/version.js +0 -4
  346. package/types/deps/deno.land/x/base64@v0.2.1/base.d.ts +0 -5
  347. package/types/deps/deno.land/x/base64@v0.2.1/base64url.d.ts +0 -1
  348. package/types/deps/deno.land/x/sha1@v1.0.3/deps.d.ts +0 -1
  349. package/types/deps/deno.land/x/sha1@v1.0.3/mod.d.ts +0 -26
  350. package/types/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.d.ts +0 -3
  351. package/types/pkg/commands/append.d.ts +0 -7
  352. package/types/pkg/commands/bitcount.d.ts +0 -8
  353. package/types/pkg/commands/bitop.d.ts +0 -12
  354. package/types/pkg/commands/bitpos.d.ts +0 -7
  355. package/types/pkg/commands/command.d.ts +0 -37
  356. package/types/pkg/commands/dbsize.d.ts +0 -7
  357. package/types/pkg/commands/decr.d.ts +0 -7
  358. package/types/pkg/commands/decrby.d.ts +0 -7
  359. package/types/pkg/commands/del.d.ts +0 -7
  360. package/types/pkg/commands/echo.d.ts +0 -7
  361. package/types/pkg/commands/eval.d.ts +0 -7
  362. package/types/pkg/commands/evalsha.d.ts +0 -7
  363. package/types/pkg/commands/exists.d.ts +0 -7
  364. package/types/pkg/commands/expire.d.ts +0 -7
  365. package/types/pkg/commands/expireat.d.ts +0 -7
  366. package/types/pkg/commands/flushall.d.ts +0 -9
  367. package/types/pkg/commands/flushdb.d.ts +0 -9
  368. package/types/pkg/commands/get.d.ts +0 -7
  369. package/types/pkg/commands/getbit.d.ts +0 -7
  370. package/types/pkg/commands/getdel.d.ts +0 -7
  371. package/types/pkg/commands/getrange.d.ts +0 -7
  372. package/types/pkg/commands/getset.d.ts +0 -7
  373. package/types/pkg/commands/hdel.d.ts +0 -7
  374. package/types/pkg/commands/hexists.d.ts +0 -7
  375. package/types/pkg/commands/hget.d.ts +0 -7
  376. package/types/pkg/commands/hgetall.d.ts +0 -7
  377. package/types/pkg/commands/hincrby.d.ts +0 -7
  378. package/types/pkg/commands/hincrbyfloat.d.ts +0 -7
  379. package/types/pkg/commands/hkeys.d.ts +0 -7
  380. package/types/pkg/commands/hlen.d.ts +0 -7
  381. package/types/pkg/commands/hmget.d.ts +0 -15
  382. package/types/pkg/commands/hmset.d.ts +0 -9
  383. package/types/pkg/commands/hrandfield.d.ts +0 -9
  384. package/types/pkg/commands/hscan.d.ts +0 -24
  385. package/types/pkg/commands/hset.d.ts +0 -9
  386. package/types/pkg/commands/hsetnx.d.ts +0 -7
  387. package/types/pkg/commands/hstrlen.d.ts +0 -7
  388. package/types/pkg/commands/hvals.d.ts +0 -7
  389. package/types/pkg/commands/incr.d.ts +0 -7
  390. package/types/pkg/commands/incrby.d.ts +0 -7
  391. package/types/pkg/commands/incrbyfloat.d.ts +0 -7
  392. package/types/pkg/commands/json_arrappend.d.ts +0 -7
  393. package/types/pkg/commands/json_arrindex.d.ts +0 -13
  394. package/types/pkg/commands/json_arrinsert.d.ts +0 -7
  395. package/types/pkg/commands/json_arrlen.d.ts +0 -7
  396. package/types/pkg/commands/json_arrpop.d.ts +0 -7
  397. package/types/pkg/commands/json_arrtrim.d.ts +0 -7
  398. package/types/pkg/commands/json_clear.d.ts +0 -7
  399. package/types/pkg/commands/json_del.d.ts +0 -7
  400. package/types/pkg/commands/json_forget.d.ts +0 -7
  401. package/types/pkg/commands/json_get.d.ts +0 -15
  402. package/types/pkg/commands/json_mget.d.ts +0 -7
  403. package/types/pkg/commands/json_numincrby.d.ts +0 -7
  404. package/types/pkg/commands/json_nummultby.d.ts +0 -7
  405. package/types/pkg/commands/json_objkeys.d.ts +0 -7
  406. package/types/pkg/commands/json_objlen.d.ts +0 -7
  407. package/types/pkg/commands/json_resp.d.ts +0 -7
  408. package/types/pkg/commands/json_set.d.ts +0 -18
  409. package/types/pkg/commands/json_strappend.d.ts +0 -7
  410. package/types/pkg/commands/json_strlen.d.ts +0 -7
  411. package/types/pkg/commands/json_toggle.d.ts +0 -7
  412. package/types/pkg/commands/json_type.d.ts +0 -7
  413. package/types/pkg/commands/keys.d.ts +0 -7
  414. package/types/pkg/commands/lindex.d.ts +0 -4
  415. package/types/pkg/commands/linsert.d.ts +0 -9
  416. package/types/pkg/commands/llen.d.ts +0 -7
  417. package/types/pkg/commands/lmove.d.ts +0 -12
  418. package/types/pkg/commands/lpop.d.ts +0 -7
  419. package/types/pkg/commands/lpos.d.ts +0 -15
  420. package/types/pkg/commands/lpush.d.ts +0 -7
  421. package/types/pkg/commands/lpushx.d.ts +0 -7
  422. package/types/pkg/commands/lrange.d.ts +0 -4
  423. package/types/pkg/commands/lrem.d.ts +0 -4
  424. package/types/pkg/commands/lset.d.ts +0 -4
  425. package/types/pkg/commands/ltrim.d.ts +0 -4
  426. package/types/pkg/commands/mget.d.ts +0 -7
  427. package/types/pkg/commands/mod.d.ts +0 -142
  428. package/types/pkg/commands/mset.d.ts +0 -9
  429. package/types/pkg/commands/msetnx.d.ts +0 -9
  430. package/types/pkg/commands/persist.d.ts +0 -7
  431. package/types/pkg/commands/pexpire.d.ts +0 -7
  432. package/types/pkg/commands/pexpireat.d.ts +0 -7
  433. package/types/pkg/commands/ping.d.ts +0 -7
  434. package/types/pkg/commands/psetex.d.ts +0 -7
  435. package/types/pkg/commands/pttl.d.ts +0 -7
  436. package/types/pkg/commands/publish.d.ts +0 -7
  437. package/types/pkg/commands/randomkey.d.ts +0 -7
  438. package/types/pkg/commands/rename.d.ts +0 -7
  439. package/types/pkg/commands/renamenx.d.ts +0 -7
  440. package/types/pkg/commands/rpop.d.ts +0 -7
  441. package/types/pkg/commands/rpush.d.ts +0 -7
  442. package/types/pkg/commands/rpushx.d.ts +0 -7
  443. package/types/pkg/commands/sadd.d.ts +0 -7
  444. package/types/pkg/commands/scan.d.ts +0 -18
  445. package/types/pkg/commands/scard.d.ts +0 -7
  446. package/types/pkg/commands/script_exists.d.ts +0 -7
  447. package/types/pkg/commands/script_flush.d.ts +0 -14
  448. package/types/pkg/commands/script_load.d.ts +0 -7
  449. package/types/pkg/commands/sdiff.d.ts +0 -7
  450. package/types/pkg/commands/sdiffstore.d.ts +0 -7
  451. package/types/pkg/commands/set.d.ts +0 -55
  452. package/types/pkg/commands/setbit.d.ts +0 -7
  453. package/types/pkg/commands/setex.d.ts +0 -7
  454. package/types/pkg/commands/setnx.d.ts +0 -7
  455. package/types/pkg/commands/setrange.d.ts +0 -7
  456. package/types/pkg/commands/sinter.d.ts +0 -7
  457. package/types/pkg/commands/sinterstore.d.ts +0 -7
  458. package/types/pkg/commands/sismember.d.ts +0 -7
  459. package/types/pkg/commands/smembers.d.ts +0 -7
  460. package/types/pkg/commands/smismember.d.ts +0 -7
  461. package/types/pkg/commands/smove.d.ts +0 -7
  462. package/types/pkg/commands/spop.d.ts +0 -7
  463. package/types/pkg/commands/srandmember.d.ts +0 -7
  464. package/types/pkg/commands/srem.d.ts +0 -7
  465. package/types/pkg/commands/sscan.d.ts +0 -24
  466. package/types/pkg/commands/strlen.d.ts +0 -7
  467. package/types/pkg/commands/sunion.d.ts +0 -7
  468. package/types/pkg/commands/sunionstore.d.ts +0 -7
  469. package/types/pkg/commands/time.d.ts +0 -7
  470. package/types/pkg/commands/touch.d.ts +0 -7
  471. package/types/pkg/commands/ttl.d.ts +0 -7
  472. package/types/pkg/commands/type.d.ts +0 -8
  473. package/types/pkg/commands/unlink.d.ts +0 -7
  474. package/types/pkg/commands/xadd.d.ts +0 -31
  475. package/types/pkg/commands/xrange.d.ts +0 -9
  476. package/types/pkg/commands/zadd.d.ts +0 -35
  477. package/types/pkg/commands/zcard.d.ts +0 -7
  478. package/types/pkg/commands/zcount.d.ts +0 -7
  479. package/types/pkg/commands/zdiffstore.d.ts +0 -7
  480. package/types/pkg/commands/zincrby.d.ts +0 -7
  481. package/types/pkg/commands/zinterstore.d.ts +0 -30
  482. package/types/pkg/commands/zlexcount.d.ts +0 -7
  483. package/types/pkg/commands/zmscore.d.ts +0 -7
  484. package/types/pkg/commands/zpopmax.d.ts +0 -7
  485. package/types/pkg/commands/zpopmin.d.ts +0 -7
  486. package/types/pkg/commands/zrange.d.ts +0 -42
  487. package/types/pkg/commands/zrank.d.ts +0 -7
  488. package/types/pkg/commands/zrem.d.ts +0 -7
  489. package/types/pkg/commands/zremrangebylex.d.ts +0 -7
  490. package/types/pkg/commands/zremrangebyrank.d.ts +0 -7
  491. package/types/pkg/commands/zremrangebyscore.d.ts +0 -7
  492. package/types/pkg/commands/zrevrank.d.ts +0 -7
  493. package/types/pkg/commands/zscan.d.ts +0 -24
  494. package/types/pkg/commands/zscore.d.ts +0 -7
  495. package/types/pkg/commands/zunionstore.d.ts +0 -30
  496. package/types/pkg/error.d.ts +0 -6
  497. package/types/pkg/http.d.ts +0 -95
  498. package/types/pkg/pipeline.d.ts +0 -678
  499. package/types/pkg/redis.d.ts +0 -684
  500. package/types/pkg/script.d.ts +0 -42
  501. package/types/pkg/types.d.ts +0 -27
  502. package/types/pkg/util.d.ts +0 -1
  503. package/types/platforms/cloudflare.d.ts +0 -43
  504. package/types/platforms/fastly.d.ts +0 -41
  505. package/types/platforms/node_with_fetch.d.ts +0 -63
  506. package/types/platforms/nodejs.d.ts +0 -78
  507. package/types/version.d.ts +0 -1
package/README.md CHANGED
@@ -7,6 +7,11 @@ of [Upstash REST API](https://docs.upstash.com/features/restapi).
7
7
  ![npm (scoped)](https://img.shields.io/npm/v/@upstash/redis)
8
8
  ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@upstash/redis)
9
9
 
10
+ > [!NOTE]
11
+ > **This project is in GA Stage.**
12
+ >
13
+ > The Upstash Professional Support fully covers this project. It receives regular updates, and bug fixes. The Upstash team is committed to maintaining and improving its functionality.
14
+
10
15
  It is the only connectionless (HTTP based) Redis client and designed for:
11
16
 
12
17
  - Serverless functions (AWS Lambda ...)
@@ -20,7 +25,7 @@ It is the only connectionless (HTTP based) Redis client and designed for:
20
25
  - and other environments where HTTP is preferred over TCP.
21
26
 
22
27
  See
23
- [the list of APIs](https://docs.upstash.com/features/restapi#rest---redis-api-compatibility)
28
+ [the list of APIs](https://upstash.com/docs/redis/overall/rediscompatibility)
24
29
  supported.
25
30
 
26
31
  ## Quick Start
@@ -36,7 +41,7 @@ npm install @upstash/redis
36
41
  #### Deno
37
42
 
38
43
  ```ts
39
- import { Redis } from "https://deno.land/x/upstash_redis/mod.ts";
44
+ import { Redis } from "https://esm.sh/@upstash/redis";
40
45
  ```
41
46
 
42
47
  ### Create database
@@ -58,7 +63,7 @@ await redis.set('key', 'value');
58
63
  let data = await redis.get('key');
59
64
  console.log(data)
60
65
 
61
- await redis.set('key2', 'value2', {ex: 1});
66
+ await redis.set('key3', 'value3', {ex: 1});
62
67
 
63
68
  // sorted set
64
69
  await redis.zadd('scores', { score: 1, member: 'team1' })
@@ -90,12 +95,12 @@ for common problems. If you can't find a solution, please
90
95
 
91
96
  ## Docs
92
97
 
93
- See [the documentation](https://docs.upstash.com/features/javascriptsdk) for
98
+ See [the documentation](https://upstash.com/docs/redis/sdks/ts/overview) for
94
99
  details.
95
100
 
96
101
  ## Contributing
97
102
 
98
- ### [Install Deno](https://deno.land/#installation)
103
+ ### [Install Bun](https://bun.sh/docs/installation)
99
104
 
100
105
  ### Database
101
106
 
@@ -105,7 +110,13 @@ the url and token
105
110
  ### Running tests
106
111
 
107
112
  ```sh
108
- UPSTASH_REDIS_REST_URL=".." UPSTASH_REDIS_REST_TOKEN=".." deno test -A
113
+ bun run test
114
+ ```
115
+
116
+ ### Building
117
+
118
+ ```sh
119
+ bun run build
109
120
  ```
110
121
 
111
122
  ### Telemetry
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4;var Ke=Object.defineProperty;var ze=(m,n)=>{for(var t in n)Ke(m,t,{get:n[t],enumerable:!0})};var Ge={};ze(Ge,{UpstashError:()=>u,UrlError:()=>we});var u=class extends Error{constructor(n){super(n),this.name="UpstashError"}},we=class extends Error{constructor(n){super(`Upstash Redis client was passed an invalid URL. You should pass the URL together with https. Received: "${n}". `),this.name="UrlError"}};var Pe= (_class =class{__init() {this.upstashSyncToken=""}constructor(n){;_class.prototype.__init.call(this);if(this.options={backend:_optionalChain([n, 'access', _2 => _2.options, 'optionalAccess', _3 => _3.backend]),agent:n.agent,responseEncoding:_nullishCoalesce(n.responseEncoding, () => ("base64")),cache:n.cache,signal:n.signal,keepAlive:_nullishCoalesce(n.keepAlive, () => (!0))},this.upstashSyncToken="",this.readYourWrites=_nullishCoalesce(n.readYourWrites, () => (!0)),this.baseUrl=n.baseUrl.replace(/\/$/,""),!/^https?:\/\/[^\s#$./?].\S*$/.test(this.baseUrl))throw new we(this.baseUrl);this.headers={"Content-Type":"application/json",...n.headers},this.options.responseEncoding==="base64"&&(this.headers["Upstash-Encoding"]="base64"),this.retry=typeof n.retry=="boolean"&&!n.retry?{attempts:1,backoff:()=>0}:{attempts:_nullishCoalesce(_optionalChain([n, 'access', _4 => _4.retry, 'optionalAccess', _5 => _5.retries]), () => (5)),backoff:_nullishCoalesce(_optionalChain([n, 'access', _6 => _6.retry, 'optionalAccess', _7 => _7.backoff]), () => ((o=>Math.exp(o)*50)))}}mergeTelemetry(n){this.headers=Re(this.headers,"Upstash-Telemetry-Runtime",n.runtime),this.headers=Re(this.headers,"Upstash-Telemetry-Platform",n.platform),this.headers=Re(this.headers,"Upstash-Telemetry-Sdk",n.sdk)}async request(n){let t={cache:this.options.cache,method:"POST",headers:this.headers,body:JSON.stringify(n.body),keepalive:this.options.keepAlive,agent:this.options.agent,signal:this.options.signal,backend:this.options.backend};if(this.readYourWrites){let a=this.upstashSyncToken;this.headers["upstash-sync-token"]=a}let o=null,s=null;for(let a=0;a<=this.retry.attempts;a++)try{o=await fetch([this.baseUrl,..._nullishCoalesce(n.path, () => ([]))].join("/"),t);break}catch(i){if(_optionalChain([this, 'access', _8 => _8.options, 'access', _9 => _9.signal, 'optionalAccess', _10 => _10.aborted])){let p=new Blob([JSON.stringify({result:_nullishCoalesce(this.options.signal.reason, () => ("Aborted"))})]),d={status:200,statusText:_nullishCoalesce(this.options.signal.reason, () => ("Aborted"))};o=new Response(p,d);break}s=i,await new Promise(p=>setTimeout(p,this.retry.backoff(a)))}if(!o)throw _nullishCoalesce(s, () => (new Error("Exhausted all retries")));let r=await o.json();if(!o.ok)throw new u(`${r.error}, command was: ${JSON.stringify(n.body)}`);if(this.readYourWrites){let a=o.headers;this.upstashSyncToken=_nullishCoalesce(a.get("upstash-sync-token"), () => (""))}if(this.readYourWrites){let a=o.headers;this.upstashSyncToken=_nullishCoalesce(a.get("upstash-sync-token"), () => (""))}return this.options.responseEncoding==="base64"?Array.isArray(r)?r.map(({result:i,error:p})=>({result:Se(i),error:p})):{result:Se(r.result),error:r.error}:r}}, _class);function Ie(m){let n="";try{let t=atob(m),o=t.length,s=new Uint8Array(o);for(let r=0;r<o;r++)s[r]=t.charCodeAt(r);n=new TextDecoder().decode(s)}catch (e2){n=m}return n}function Se(m){let n;switch(typeof m){case"undefined":return m;case"number":{n=m;break}case"object":{Array.isArray(m)?n=m.map(t=>typeof t=="string"?Ie(t):Array.isArray(t)?t.map(o=>Se(o)):t):n=null;break}case"string":{n=m==="OK"?"OK":Ie(m);break}default:break}return n}function Re(m,n,t){return t&&(m[n]=m[n]?[m[n],t].join(","):t),m}function Ne(m){let n=Array.isArray(m)?m.map(t=>{try{return Ne(t)}catch (e3){return t}}):JSON.parse(m);return typeof n=="number"&&n.toString()!==m?m:n}function Ee(m){try{return Ne(m)}catch (e4){return m}}function h(m){return[m[0],...Ee(m.slice(1))]}var Xe=m=>{switch(typeof m){case"string":case"number":case"boolean":return m;default:return JSON.stringify(m)}},e=class{constructor(n,t){if(this.serialize=Xe,this.deserialize=_optionalChain([t, 'optionalAccess', _11 => _11.automaticDeserialization])===void 0||t.automaticDeserialization?_nullishCoalesce(_optionalChain([t, 'optionalAccess', _12 => _12.deserialize]), () => (Ee)):o=>o,this.command=n.map(o=>this.serialize(o)),_optionalChain([t, 'optionalAccess', _13 => _13.latencyLogging])){let o=this.exec.bind(this);this.exec=async s=>{let r=performance.now(),a=await o(s),p=(performance.now()-r).toFixed(2);return console.log(`Latency for \x1B[38;2;19;185;39m${this.command[0].toString().toUpperCase()}\x1B[0m: \x1B[38;2;0;255;255m${p} ms\x1B[0m`),a}}}async exec(n){let{result:t,error:o}=await n.request({body:this.command,upstashSyncToken:n.upstashSyncToken});if(o)throw new u(o);if(t===void 0)throw new TypeError("Request did not return a result");return this.deserialize(t)}};function Ue(m){if(m.length===0)return null;let n={};for(;m.length>=2;){let t=m.shift(),o=m.shift();try{n[t]=JSON.parse(o)}catch (e5){n[t]=o}}return n}var g=class extends e{constructor(n,t){let o=["hrandfield",n[0]];typeof n[1]=="number"&&o.push(n[1]),n[2]&&o.push("WITHVALUES"),super(o,{deserialize:n[2]?s=>Ue(s):_optionalChain([t, 'optionalAccess', _14 => _14.deserialize]),...t})}};var f=class extends e{constructor(n,t){super(["append",...n],t)}};var y=class extends e{constructor([n,t,o],s){let r=["bitcount",n];typeof t=="number"&&r.push(t),typeof o=="number"&&r.push(o),super(r,s)}};var x=class{constructor(n,t,o,s=r=>r.exec(this.client)){this.client=t;this.opts=o;this.execOperation=s;this.command=["bitfield",...n]}chain(...n){return this.command.push(...n),this}get(...n){return this.chain("get",...n)}set(...n){return this.chain("set",...n)}incrby(...n){return this.chain("incrby",...n)}overflow(n){return this.chain("overflow",n)}exec(){let n=new e(this.command,this.opts);return this.execOperation(n)}};var b=class extends e{constructor(n,t){super(["bitop",...n],t)}};var T=class extends e{constructor(n,t){super(["bitpos",...n],t)}};var O=class extends e{constructor([n,t,o],s){super(["COPY",n,t,..._optionalChain([o, 'optionalAccess', _15 => _15.replace])?["REPLACE"]:[]],{...s,deserialize(r){return r>0?"COPIED":"NOT_COPIED"}})}};var w=class extends e{constructor(n){super(["dbsize"],n)}};var D=class extends e{constructor(n,t){super(["decr",...n],t)}};var A=class extends e{constructor(n,t){super(["decrby",...n],t)}};var k=class extends e{constructor(n,t){super(["del",...n],t)}};var R=class extends e{constructor(n,t){super(["echo",...n],t)}};var S=class extends e{constructor([n,t,o],s){super(["eval",n,t.length,...t,..._nullishCoalesce(o, () => ([]))],s)}};var E=class extends e{constructor([n,t,o],s){super(["evalsha",n,t.length,...t,..._nullishCoalesce(o, () => ([]))],s)}};var M=class extends e{constructor(n,t){super(["exists",...n],t)}};var v=class extends e{constructor(n,t){super(["expire",...n.filter(Boolean)],t)}};var P=class extends e{constructor(n,t){super(["expireat",...n],t)}};var I=class extends e{constructor(n,t){let o=["flushall"];n&&n.length>0&&n[0].async&&o.push("async"),super(o,t)}};var N=class extends e{constructor([n],t){let o=["flushdb"];_optionalChain([n, 'optionalAccess', _16 => _16.async])&&o.push("async"),super(o,t)}};var L=class extends e{constructor([n,t,...o],s){let r=["geoadd",n];"nx"in t&&t.nx?r.push("nx"):"xx"in t&&t.xx&&r.push("xx"),"ch"in t&&t.ch&&r.push("ch"),"latitude"in t&&t.latitude&&r.push(t.longitude,t.latitude,t.member),r.push(...o.flatMap(({latitude:a,longitude:i,member:p})=>[i,a,p])),super(r,s)}};var K=class extends e{constructor([n,t,o,s="M"],r){super(["GEODIST",n,t,o,s],r)}};var z=class extends e{constructor(n,t){let[o]=n,s=Array.isArray(n[1])?n[1]:n.slice(1);super(["GEOHASH",o,...s],t)}};var G=class extends e{constructor(n,t){let[o]=n,s=Array.isArray(n[1])?n[1]:n.slice(1);super(["GEOPOS",o,...s],{deserialize:r=>Je(r),...t})}};function Je(m){let n=[];for(let t of m)!_optionalChain([t, 'optionalAccess', _17 => _17[0]])||!_optionalChain([t, 'optionalAccess', _18 => _18[1]])||n.push({lng:Number.parseFloat(t[0]),lat:Number.parseFloat(t[1])});return n}var X=class extends e{constructor([n,t,o,s,r],a){let i=["GEOSEARCH",n];(t.type==="FROMMEMBER"||t.type==="frommember")&&i.push(t.type,t.member),(t.type==="FROMLONLAT"||t.type==="fromlonlat")&&i.push(t.type,t.coordinate.lon,t.coordinate.lat),(o.type==="BYRADIUS"||o.type==="byradius")&&i.push(o.type,o.radius,o.radiusType),(o.type==="BYBOX"||o.type==="bybox")&&i.push(o.type,o.rect.width,o.rect.height,o.rectType),i.push(s),_optionalChain([r, 'optionalAccess', _19 => _19.count])&&i.push("COUNT",r.count.limit,...r.count.any?["ANY"]:[]);let p=d=>!_optionalChain([r, 'optionalAccess', _20 => _20.withCoord])&&!_optionalChain([r, 'optionalAccess', _21 => _21.withDist])&&!_optionalChain([r, 'optionalAccess', _22 => _22.withHash])?d.map(c=>{try{return{member:JSON.parse(c)}}catch (e6){return{member:c}}}):d.map(c=>{let Ae=1,C={};try{C.member=JSON.parse(c[0])}catch (e7){C.member=c[0]}return r.withDist&&(C.dist=Number.parseFloat(c[Ae++])),r.withHash&&(C.hash=c[Ae++].toString()),r.withCoord&&(C.coord={long:Number.parseFloat(c[Ae][0]),lat:Number.parseFloat(c[Ae][1])}),C});super([...i,..._optionalChain([r, 'optionalAccess', _23 => _23.withCoord])?["WITHCOORD"]:[],..._optionalChain([r, 'optionalAccess', _24 => _24.withDist])?["WITHDIST"]:[],..._optionalChain([r, 'optionalAccess', _25 => _25.withHash])?["WITHHASH"]:[]],{deserialize:p,...a})}};var U=class extends e{constructor([n,t,o,s,r,a],i){let p=["GEOSEARCHSTORE",n,t];(o.type==="FROMMEMBER"||o.type==="frommember")&&p.push(o.type,o.member),(o.type==="FROMLONLAT"||o.type==="fromlonlat")&&p.push(o.type,o.coordinate.lon,o.coordinate.lat),(s.type==="BYRADIUS"||s.type==="byradius")&&p.push(s.type,s.radius,s.radiusType),(s.type==="BYBOX"||s.type==="bybox")&&p.push(s.type,s.rect.width,s.rect.height,s.rectType),p.push(r),_optionalChain([a, 'optionalAccess', _26 => _26.count])&&p.push("COUNT",a.count.limit,...a.count.any?["ANY"]:[]),super([...p,..._optionalChain([a, 'optionalAccess', _27 => _27.storeDist])?["STOREDIST"]:[]],i)}};var J=class extends e{constructor(n,t){super(["get",...n],t)}};var B=class extends e{constructor(n,t){super(["getbit",...n],t)}};var Z=class extends e{constructor(n,t){super(["getdel",...n],t)}};var H=class extends e{constructor(n,t){super(["getrange",...n],t)}};var F=class extends e{constructor(n,t){super(["getset",...n],t)}};var $=class extends e{constructor(n,t){super(["hdel",...n],t)}};var q=class extends e{constructor(n,t){super(["hexists",...n],t)}};var Y=class extends e{constructor(n,t){super(["hget",...n],t)}};function Be(m){if(m.length===0)return null;let n={};for(;m.length>=2;){let t=m.shift(),o=m.shift();try{let s=!Number.isNaN(Number(o))&&!Number.isSafeInteger(Number(o));n[t]=s?o:JSON.parse(o)}catch (e8){n[t]=o}}return n}var j=class extends e{constructor(n,t){super(["hgetall",...n],{deserialize:o=>Be(o),...t})}};var W=class extends e{constructor(n,t){super(["hincrby",...n],t)}};var V=class extends e{constructor(n,t){super(["hincrbyfloat",...n],t)}};var _=class extends e{constructor([n],t){super(["hkeys",n],t)}};var Q=class extends e{constructor(n,t){super(["hlen",...n],t)}};function Ze(m,n){if(n.every(o=>o===null))return null;let t={};for(let[o,s]of m.entries())try{t[s]=JSON.parse(n[o])}catch (e9){t[s]=n[o]}return t}var nn=class extends e{constructor([n,...t],o){super(["hmget",n,...t],{deserialize:s=>Ze(t,s),...o})}};var tn=class extends e{constructor([n,t],o){super(["hmset",n,...Object.entries(t).flatMap(([s,r])=>[s,r])],o)}};var en=class extends e{constructor([n,t,o],s){let r=["hscan",n,t];_optionalChain([o, 'optionalAccess', _28 => _28.match])&&r.push("match",o.match),typeof _optionalChain([o, 'optionalAccess', _29 => _29.count])=="number"&&r.push("count",o.count),super(r,{deserialize:h,...s})}};var on=class extends e{constructor([n,t],o){super(["hset",n,...Object.entries(t).flatMap(([s,r])=>[s,r])],o)}};var mn=class extends e{constructor(n,t){super(["hsetnx",...n],t)}};var sn=class extends e{constructor(n,t){super(["hstrlen",...n],t)}};var rn=class extends e{constructor(n,t){super(["hvals",...n],t)}};var an=class extends e{constructor(n,t){super(["incr",...n],t)}};var pn=class extends e{constructor(n,t){super(["incrby",...n],t)}};var dn=class extends e{constructor(n,t){super(["incrbyfloat",...n],t)}};var cn=class extends e{constructor(n,t){super(["JSON.ARRAPPEND",...n],t)}};var un=class extends e{constructor(n,t){super(["JSON.ARRINDEX",...n],t)}};var hn=class extends e{constructor(n,t){super(["JSON.ARRINSERT",...n],t)}};var ln=class extends e{constructor(n,t){super(["JSON.ARRLEN",n[0],_nullishCoalesce(n[1], () => ("$"))],t)}};var Cn=class extends e{constructor(n,t){super(["JSON.ARRPOP",...n],t)}};var gn=class extends e{constructor(n,t){let o=_nullishCoalesce(n[1], () => ("$")),s=_nullishCoalesce(n[2], () => (0)),r=_nullishCoalesce(n[3], () => (0));super(["JSON.ARRTRIM",n[0],o,s,r],t)}};var fn=class extends e{constructor(n,t){super(["JSON.CLEAR",...n],t)}};var yn=class extends e{constructor(n,t){super(["JSON.DEL",...n],t)}};var xn=class extends e{constructor(n,t){super(["JSON.FORGET",...n],t)}};var bn=class extends e{constructor(n,t){let o=["JSON.GET"];typeof n[1]=="string"?o.push(...n):(o.push(n[0]),n[1]&&(n[1].indent&&o.push("INDENT",n[1].indent),n[1].newline&&o.push("NEWLINE",n[1].newline),n[1].space&&o.push("SPACE",n[1].space)),o.push(...n.slice(2))),super(o,t)}};var Tn=class extends e{constructor(n,t){super(["JSON.MGET",...n[0],n[1]],t)}};var On=class extends e{constructor(n,t){let o=["JSON.MSET"];for(let s of n)o.push(s.key,s.path,s.value);super(o,t)}};var wn=class extends e{constructor(n,t){super(["JSON.NUMINCRBY",...n],t)}};var Dn=class extends e{constructor(n,t){super(["JSON.NUMMULTBY",...n],t)}};var An=class extends e{constructor(n,t){super(["JSON.OBJKEYS",...n],t)}};var kn=class extends e{constructor(n,t){super(["JSON.OBJLEN",...n],t)}};var Rn=class extends e{constructor(n,t){super(["JSON.RESP",...n],t)}};var Sn=class extends e{constructor(n,t){let o=["JSON.SET",n[0],n[1],n[2]];n[3]&&(n[3].nx?o.push("NX"):n[3].xx&&o.push("XX")),super(o,t)}};var En=class extends e{constructor(n,t){super(["JSON.STRAPPEND",...n],t)}};var Mn=class extends e{constructor(n,t){super(["JSON.STRLEN",...n],t)}};var vn=class extends e{constructor(n,t){super(["JSON.TOGGLE",...n],t)}};var Pn=class extends e{constructor(n,t){super(["JSON.TYPE",...n],t)}};var In=class extends e{constructor(n,t){super(["keys",...n],t)}};var Nn=class extends e{constructor(n,t){super(["lindex",...n],t)}};var Ln=class extends e{constructor(n,t){super(["linsert",...n],t)}};var Kn=class extends e{constructor(n,t){super(["llen",...n],t)}};var zn=class extends e{constructor(n,t){super(["lmove",...n],t)}};var Gn=class extends e{constructor(n,t){let[o,s,r,a]=n;super(["LMPOP",o,...s,r,...a?["COUNT",a]:[]],t)}};var Xn=class extends e{constructor(n,t){super(["lpop",...n],t)}};var Un=class extends e{constructor(n,t){let o=["lpos",n[0],n[1]];typeof _optionalChain([n, 'access', _30 => _30[2], 'optionalAccess', _31 => _31.rank])=="number"&&o.push("rank",n[2].rank),typeof _optionalChain([n, 'access', _32 => _32[2], 'optionalAccess', _33 => _33.count])=="number"&&o.push("count",n[2].count),typeof _optionalChain([n, 'access', _34 => _34[2], 'optionalAccess', _35 => _35.maxLen])=="number"&&o.push("maxLen",n[2].maxLen),super(o,t)}};var Jn=class extends e{constructor(n,t){super(["lpush",...n],t)}};var Bn=class extends e{constructor(n,t){super(["lpushx",...n],t)}};var Zn=class extends e{constructor(n,t){super(["lrange",...n],t)}};var Hn=class extends e{constructor(n,t){super(["lrem",...n],t)}};var Fn=class extends e{constructor(n,t){super(["lset",...n],t)}};var $n=class extends e{constructor(n,t){super(["ltrim",...n],t)}};var qn=class extends e{constructor(n,t){let o=Array.isArray(n[0])?n[0]:n;super(["mget",...o],t)}};var Yn=class extends e{constructor([n],t){super(["mset",...Object.entries(n).flatMap(([o,s])=>[o,s])],t)}};var jn=class extends e{constructor([n],t){super(["msetnx",...Object.entries(n).flat()],t)}};var Wn=class extends e{constructor(n,t){super(["persist",...n],t)}};var Vn=class extends e{constructor(n,t){super(["pexpire",...n],t)}};var _n=class extends e{constructor(n,t){super(["pexpireat",...n],t)}};var Qn=class extends e{constructor(n,t){super(["pfadd",...n],t)}};var nt=class extends e{constructor(n,t){super(["pfcount",...n],t)}};var tt=class extends e{constructor(n,t){super(["pfmerge",...n],t)}};var et=class extends e{constructor(n,t){let o=["ping"];_optionalChain([n, 'optionalAccess', _36 => _36[0]])!==void 0&&o.push(n[0]),super(o,t)}};var ot=class extends e{constructor(n,t){super(["psetex",...n],t)}};var mt=class extends e{constructor(n,t){super(["pttl",...n],t)}};var st=class extends e{constructor(n,t){super(["publish",...n],t)}};var rt=class extends e{constructor(n){super(["randomkey"],n)}};var at=class extends e{constructor(n,t){super(["rename",...n],t)}};var it=class extends e{constructor(n,t){super(["renamenx",...n],t)}};var pt=class extends e{constructor(n,t){super(["rpop",...n],t)}};var dt=class extends e{constructor(n,t){super(["rpush",...n],t)}};var ct=class extends e{constructor(n,t){super(["rpushx",...n],t)}};var ut=class extends e{constructor(n,t){super(["sadd",...n],t)}};var ht=class extends e{constructor([n,t],o){let s=["scan",n];_optionalChain([t, 'optionalAccess', _37 => _37.match])&&s.push("match",t.match),typeof _optionalChain([t, 'optionalAccess', _38 => _38.count])=="number"&&s.push("count",t.count),_optionalChain([t, 'optionalAccess', _39 => _39.type])&&t.type.length>0&&s.push("type",t.type),super(s,{deserialize:h,...o})}};var lt=class extends e{constructor(n,t){super(["scard",...n],t)}};var Ct=class extends e{constructor(n,t){super(["script","exists",...n],{deserialize:o=>o,...t})}};var gt=class extends e{constructor([n],t){let o=["script","flush"];_optionalChain([n, 'optionalAccess', _40 => _40.sync])?o.push("sync"):_optionalChain([n, 'optionalAccess', _41 => _41.async])&&o.push("async"),super(o,t)}};var ft=class extends e{constructor(n,t){super(["script","load",...n],t)}};var yt=class extends e{constructor(n,t){super(["sdiff",...n],t)}};var xt=class extends e{constructor(n,t){super(["sdiffstore",...n],t)}};var bt=class extends e{constructor([n,t,o],s){let r=["set",n,t];o&&("nx"in o&&o.nx?r.push("nx"):"xx"in o&&o.xx&&r.push("xx"),"get"in o&&o.get&&r.push("get"),"ex"in o&&typeof o.ex=="number"?r.push("ex",o.ex):"px"in o&&typeof o.px=="number"?r.push("px",o.px):"exat"in o&&typeof o.exat=="number"?r.push("exat",o.exat):"pxat"in o&&typeof o.pxat=="number"?r.push("pxat",o.pxat):"keepTtl"in o&&o.keepTtl&&r.push("keepTtl")),super(r,s)}};var Tt=class extends e{constructor(n,t){super(["setbit",...n],t)}};var Ot=class extends e{constructor(n,t){super(["setex",...n],t)}};var wt=class extends e{constructor(n,t){super(["setnx",...n],t)}};var Dt=class extends e{constructor(n,t){super(["setrange",...n],t)}};var At=class extends e{constructor(n,t){super(["sinter",...n],t)}};var kt=class extends e{constructor(n,t){super(["sinterstore",...n],t)}};var Rt=class extends e{constructor(n,t){super(["sismember",...n],t)}};var St=class extends e{constructor(n,t){super(["smembers",...n],t)}};var Et=class extends e{constructor(n,t){super(["smismember",n[0],...n[1]],t)}};var Mt=class extends e{constructor(n,t){super(["smove",...n],t)}};var vt=class extends e{constructor([n,t],o){let s=["spop",n];typeof t=="number"&&s.push(t),super(s,o)}};var Pt=class extends e{constructor([n,t],o){let s=["srandmember",n];typeof t=="number"&&s.push(t),super(s,o)}};var It=class extends e{constructor(n,t){super(["srem",...n],t)}};var Nt=class extends e{constructor([n,t,o],s){let r=["sscan",n,t];_optionalChain([o, 'optionalAccess', _42 => _42.match])&&r.push("match",o.match),typeof _optionalChain([o, 'optionalAccess', _43 => _43.count])=="number"&&r.push("count",o.count),super(r,{deserialize:h,...s})}};var Lt=class extends e{constructor(n,t){super(["strlen",...n],t)}};var Kt=class extends e{constructor(n,t){super(["sunion",...n],t)}};var zt=class extends e{constructor(n,t){super(["sunionstore",...n],t)}};var Gt=class extends e{constructor(n){super(["time"],n)}};var Xt=class extends e{constructor(n,t){super(["touch",...n],t)}};var Ut=class extends e{constructor(n,t){super(["ttl",...n],t)}};var Jt=class extends e{constructor(n,t){super(["type",...n],t)}};var Bt=class extends e{constructor(n,t){super(["unlink",...n],t)}};var Zt=class extends e{constructor([n,t,o],s){let r=Array.isArray(o)?[...o]:[o];super(["XACK",n,t,...r],s)}};var Ht=class extends e{constructor([n,t,o,s],r){let a=["XADD",n];s&&(s.nomkStream&&a.push("NOMKSTREAM"),s.trim&&(a.push(s.trim.type,s.trim.comparison,s.trim.threshold),s.trim.limit!==void 0&&a.push("LIMIT",s.trim.limit))),a.push(t);for(let[i,p]of Object.entries(o))a.push(i,p);super(a,r)}};var Ft=class extends e{constructor([n,t,o,s,r,a],i){let p=[];_optionalChain([a, 'optionalAccess', _44 => _44.count])&&p.push("COUNT",a.count),_optionalChain([a, 'optionalAccess', _45 => _45.justId])&&p.push("JUSTID"),super(["XAUTOCLAIM",n,t,o,s,r,...p],i)}};var $t=class extends e{constructor([n,t,o,s,r,a],i){let p=Array.isArray(r)?[...r]:[r],d=[];_optionalChain([a, 'optionalAccess', _46 => _46.idleMS])&&d.push("IDLE",a.idleMS),_optionalChain([a, 'optionalAccess', _47 => _47.idleMS])&&d.push("TIME",a.timeMS),_optionalChain([a, 'optionalAccess', _48 => _48.retryCount])&&d.push("RETRYCOUNT",a.retryCount),_optionalChain([a, 'optionalAccess', _49 => _49.force])&&d.push("FORCE"),_optionalChain([a, 'optionalAccess', _50 => _50.justId])&&d.push("JUSTID"),_optionalChain([a, 'optionalAccess', _51 => _51.lastId])&&d.push("LASTID",a.lastId),super(["XCLAIM",n,t,o,s,...p,...d],i)}};var qt=class extends e{constructor([n,t],o){let s=Array.isArray(t)?[...t]:[t];super(["XDEL",n,...s],o)}};var Yt=class extends e{constructor([n,t],o){let s=["XGROUP"];switch(t.type){case"CREATE":{s.push("CREATE",n,t.group,t.id),t.options&&(t.options.MKSTREAM&&s.push("MKSTREAM"),t.options.ENTRIESREAD!==void 0&&s.push("ENTRIESREAD",t.options.ENTRIESREAD.toString()));break}case"CREATECONSUMER":{s.push("CREATECONSUMER",n,t.group,t.consumer);break}case"DELCONSUMER":{s.push("DELCONSUMER",n,t.group,t.consumer);break}case"DESTROY":{s.push("DESTROY",n,t.group);break}case"SETID":{s.push("SETID",n,t.group,t.id),_optionalChain([t, 'access', _52 => _52.options, 'optionalAccess', _53 => _53.ENTRIESREAD])!==void 0&&s.push("ENTRIESREAD",t.options.ENTRIESREAD.toString());break}default:throw new Error("Invalid XGROUP")}super(s,o)}};var jt=class extends e{constructor([n,t],o){let s=[];t.type==="CONSUMERS"?s.push("CONSUMERS",n,t.group):s.push("GROUPS",n),super(["XINFO",...s],o)}};var Wt=class extends e{constructor(n,t){super(["XLEN",...n],t)}};var Vt=class extends e{constructor([n,t,o,s,r,a],i){let p=_optionalChain([a, 'optionalAccess', _54 => _54.consumer])===void 0?[]:Array.isArray(a.consumer)?[...a.consumer]:[a.consumer];super(["XPENDING",n,t,..._optionalChain([a, 'optionalAccess', _55 => _55.idleTime])?["IDLE",a.idleTime]:[],o,s,r,...p],i)}};function He(m){let n={};for(let t of m)for(;t.length>=2;){let o=t.shift(),s=t.shift();for((o in n)||(n[o]={});s.length>=2;){let r=s.shift(),a=s.shift();try{n[o][r]=JSON.parse(a)}catch (e10){n[o][r]=a}}}return n}var _t=class extends e{constructor([n,t,o,s],r){let a=["XRANGE",n,t,o];typeof s=="number"&&a.push("COUNT",s),super(a,{deserialize:i=>He(i),...r})}};var Fe="ERR Unbalanced XREAD list of streams: for each stream key an ID or '$' must be specified",Qt=class extends e{constructor([n,t,o],s){if(Array.isArray(n)&&Array.isArray(t)&&n.length!==t.length)throw new Error(Fe);let r=[];typeof _optionalChain([o, 'optionalAccess', _56 => _56.count])=="number"&&r.push("COUNT",o.count),typeof _optionalChain([o, 'optionalAccess', _57 => _57.blockMS])=="number"&&r.push("BLOCK",o.blockMS),r.push("STREAMS",...Array.isArray(n)?[...n]:[n],...Array.isArray(t)?[...t]:[t]),super(["XREAD",...r],s)}};var $e="ERR Unbalanced XREADGROUP list of streams: for each stream key an ID or '$' must be specified",ne=class extends e{constructor([n,t,o,s,r],a){if(Array.isArray(o)&&Array.isArray(s)&&o.length!==s.length)throw new Error($e);let i=[];typeof _optionalChain([r, 'optionalAccess', _58 => _58.count])=="number"&&i.push("COUNT",r.count),typeof _optionalChain([r, 'optionalAccess', _59 => _59.blockMS])=="number"&&i.push("BLOCK",r.blockMS),typeof _optionalChain([r, 'optionalAccess', _60 => _60.NOACK])=="boolean"&&r.NOACK&&i.push("NOACK"),i.push("STREAMS",...Array.isArray(o)?[...o]:[o],...Array.isArray(s)?[...s]:[s]),super(["XREADGROUP","GROUP",n,t,...i],a)}};var te=class extends e{constructor([n,t,o,s],r){let a=["XREVRANGE",n,t,o];typeof s=="number"&&a.push("COUNT",s),super(a,{deserialize:i=>qe(i),...r})}};function qe(m){let n={};for(let t of m)for(;t.length>=2;){let o=t.shift(),s=t.shift();for((o in n)||(n[o]={});s.length>=2;){let r=s.shift(),a=s.shift();try{n[o][r]=JSON.parse(a)}catch (e11){n[o][r]=a}}}return n}var ee=class extends e{constructor([n,t],o){let{limit:s,strategy:r,threshold:a,exactness:i="~"}=t;super(["XTRIM",n,r,i,a,...s?["LIMIT",s]:[]],o)}};var l=class extends e{constructor([n,t,...o],s){let r=["zadd",n];"nx"in t&&t.nx?r.push("nx"):"xx"in t&&t.xx&&r.push("xx"),"ch"in t&&t.ch&&r.push("ch"),"incr"in t&&t.incr&&r.push("incr"),"lt"in t&&t.lt?r.push("lt"):"gt"in t&&t.gt&&r.push("gt"),"score"in t&&"member"in t&&r.push(t.score,t.member),r.push(...o.flatMap(({score:a,member:i})=>[a,i])),super(r,s)}};var oe=class extends e{constructor(n,t){super(["zcard",...n],t)}};var me=class extends e{constructor(n,t){super(["zcount",...n],t)}};var se=class extends e{constructor(n,t){super(["zincrby",...n],t)}};var re=class extends e{constructor([n,t,o,s],r){let a=["zinterstore",n,t];Array.isArray(o)?a.push(...o):a.push(o),s&&("weights"in s&&s.weights?a.push("weights",...s.weights):"weight"in s&&typeof s.weight=="number"&&a.push("weights",s.weight),"aggregate"in s&&a.push("aggregate",s.aggregate)),super(a,r)}};var ae=class extends e{constructor(n,t){super(["zlexcount",...n],t)}};var ie=class extends e{constructor([n,t],o){let s=["zpopmax",n];typeof t=="number"&&s.push(t),super(s,o)}};var pe=class extends e{constructor([n,t],o){let s=["zpopmin",n];typeof t=="number"&&s.push(t),super(s,o)}};var de=class extends e{constructor([n,t,o,s],r){let a=["zrange",n,t,o];_optionalChain([s, 'optionalAccess', _61 => _61.byScore])&&a.push("byscore"),_optionalChain([s, 'optionalAccess', _62 => _62.byLex])&&a.push("bylex"),_optionalChain([s, 'optionalAccess', _63 => _63.rev])&&a.push("rev"),_optionalChain([s, 'optionalAccess', _64 => _64.count])!==void 0&&s.offset!==void 0&&a.push("limit",s.offset,s.count),_optionalChain([s, 'optionalAccess', _65 => _65.withScores])&&a.push("withscores"),super(a,r)}};var ce=class extends e{constructor(n,t){super(["zrank",...n],t)}};var ue=class extends e{constructor(n,t){super(["zrem",...n],t)}};var he=class extends e{constructor(n,t){super(["zremrangebylex",...n],t)}};var le=class extends e{constructor(n,t){super(["zremrangebyrank",...n],t)}};var Ce=class extends e{constructor(n,t){super(["zremrangebyscore",...n],t)}};var ge=class extends e{constructor(n,t){super(["zrevrank",...n],t)}};var fe=class extends e{constructor([n,t,o],s){let r=["zscan",n,t];_optionalChain([o, 'optionalAccess', _66 => _66.match])&&r.push("match",o.match),typeof _optionalChain([o, 'optionalAccess', _67 => _67.count])=="number"&&r.push("count",o.count),super(r,{deserialize:h,...s})}};var ye=class extends e{constructor(n,t){super(["zscore",...n],t)}};var xe=class extends e{constructor([n,t,o],s){let r=["zunion",n];Array.isArray(t)?r.push(...t):r.push(t),o&&("weights"in o&&o.weights?r.push("weights",...o.weights):"weight"in o&&typeof o.weight=="number"&&r.push("weights",o.weight),"aggregate"in o&&r.push("aggregate",o.aggregate),o.withScores&&r.push("withscores")),super(r,s)}};var be=class extends e{constructor([n,t,o,s],r){let a=["zunionstore",n,t];Array.isArray(o)?a.push(...o):a.push(o),s&&("weights"in s&&s.weights?a.push("weights",...s.weights):"weight"in s&&typeof s.weight=="number"&&a.push("weights",s.weight),"aggregate"in s&&a.push("aggregate",s.aggregate)),super(a,r)}};var Te=class extends e{constructor(n,t){super(["zdiffstore",...n],t)}};var Oe=class extends e{constructor(n,t){let[o,s]=n;super(["zmscore",o,...s],t)}};var De= (_class2 =class{constructor(n){;_class2.prototype.__init2.call(this);_class2.prototype.__init3.call(this);_class2.prototype.__init4.call(this);_class2.prototype.__init5.call(this);_class2.prototype.__init6.call(this);_class2.prototype.__init7.call(this);_class2.prototype.__init8.call(this);_class2.prototype.__init9.call(this);_class2.prototype.__init10.call(this);_class2.prototype.__init11.call(this);_class2.prototype.__init12.call(this);_class2.prototype.__init13.call(this);_class2.prototype.__init14.call(this);_class2.prototype.__init15.call(this);_class2.prototype.__init16.call(this);_class2.prototype.__init17.call(this);_class2.prototype.__init18.call(this);_class2.prototype.__init19.call(this);_class2.prototype.__init20.call(this);_class2.prototype.__init21.call(this);_class2.prototype.__init22.call(this);_class2.prototype.__init23.call(this);_class2.prototype.__init24.call(this);_class2.prototype.__init25.call(this);_class2.prototype.__init26.call(this);_class2.prototype.__init27.call(this);_class2.prototype.__init28.call(this);_class2.prototype.__init29.call(this);_class2.prototype.__init30.call(this);_class2.prototype.__init31.call(this);_class2.prototype.__init32.call(this);_class2.prototype.__init33.call(this);_class2.prototype.__init34.call(this);_class2.prototype.__init35.call(this);_class2.prototype.__init36.call(this);_class2.prototype.__init37.call(this);_class2.prototype.__init38.call(this);_class2.prototype.__init39.call(this);_class2.prototype.__init40.call(this);_class2.prototype.__init41.call(this);_class2.prototype.__init42.call(this);_class2.prototype.__init43.call(this);_class2.prototype.__init44.call(this);_class2.prototype.__init45.call(this);_class2.prototype.__init46.call(this);_class2.prototype.__init47.call(this);_class2.prototype.__init48.call(this);_class2.prototype.__init49.call(this);_class2.prototype.__init50.call(this);_class2.prototype.__init51.call(this);_class2.prototype.__init52.call(this);_class2.prototype.__init53.call(this);_class2.prototype.__init54.call(this);_class2.prototype.__init55.call(this);_class2.prototype.__init56.call(this);_class2.prototype.__init57.call(this);_class2.prototype.__init58.call(this);_class2.prototype.__init59.call(this);_class2.prototype.__init60.call(this);_class2.prototype.__init61.call(this);_class2.prototype.__init62.call(this);_class2.prototype.__init63.call(this);_class2.prototype.__init64.call(this);_class2.prototype.__init65.call(this);_class2.prototype.__init66.call(this);_class2.prototype.__init67.call(this);_class2.prototype.__init68.call(this);_class2.prototype.__init69.call(this);_class2.prototype.__init70.call(this);_class2.prototype.__init71.call(this);_class2.prototype.__init72.call(this);_class2.prototype.__init73.call(this);_class2.prototype.__init74.call(this);_class2.prototype.__init75.call(this);_class2.prototype.__init76.call(this);_class2.prototype.__init77.call(this);_class2.prototype.__init78.call(this);_class2.prototype.__init79.call(this);_class2.prototype.__init80.call(this);_class2.prototype.__init81.call(this);_class2.prototype.__init82.call(this);_class2.prototype.__init83.call(this);_class2.prototype.__init84.call(this);_class2.prototype.__init85.call(this);_class2.prototype.__init86.call(this);_class2.prototype.__init87.call(this);_class2.prototype.__init88.call(this);_class2.prototype.__init89.call(this);_class2.prototype.__init90.call(this);_class2.prototype.__init91.call(this);_class2.prototype.__init92.call(this);_class2.prototype.__init93.call(this);_class2.prototype.__init94.call(this);_class2.prototype.__init95.call(this);_class2.prototype.__init96.call(this);_class2.prototype.__init97.call(this);_class2.prototype.__init98.call(this);_class2.prototype.__init99.call(this);_class2.prototype.__init100.call(this);_class2.prototype.__init101.call(this);_class2.prototype.__init102.call(this);_class2.prototype.__init103.call(this);_class2.prototype.__init104.call(this);_class2.prototype.__init105.call(this);_class2.prototype.__init106.call(this);_class2.prototype.__init107.call(this);_class2.prototype.__init108.call(this);_class2.prototype.__init109.call(this);_class2.prototype.__init110.call(this);_class2.prototype.__init111.call(this);_class2.prototype.__init112.call(this);_class2.prototype.__init113.call(this);_class2.prototype.__init114.call(this);_class2.prototype.__init115.call(this);_class2.prototype.__init116.call(this);_class2.prototype.__init117.call(this);_class2.prototype.__init118.call(this);_class2.prototype.__init119.call(this);_class2.prototype.__init120.call(this);_class2.prototype.__init121.call(this);_class2.prototype.__init122.call(this);_class2.prototype.__init123.call(this);_class2.prototype.__init124.call(this);_class2.prototype.__init125.call(this);_class2.prototype.__init126.call(this);_class2.prototype.__init127.call(this);_class2.prototype.__init128.call(this);_class2.prototype.__init129.call(this);_class2.prototype.__init130.call(this);_class2.prototype.__init131.call(this);_class2.prototype.__init132.call(this);_class2.prototype.__init133.call(this);_class2.prototype.__init134.call(this);_class2.prototype.__init135.call(this);_class2.prototype.__init136.call(this);_class2.prototype.__init137.call(this);_class2.prototype.__init138.call(this);_class2.prototype.__init139.call(this);_class2.prototype.__init140.call(this);_class2.prototype.__init141.call(this);_class2.prototype.__init142.call(this);_class2.prototype.__init143.call(this);_class2.prototype.__init144.call(this);_class2.prototype.__init145.call(this);_class2.prototype.__init146.call(this);_class2.prototype.__init147.call(this);_class2.prototype.__init148.call(this);_class2.prototype.__init149.call(this);if(this.client=n.client,this.commands=[],this.commandOptions=n.commandOptions,this.multiExec=_nullishCoalesce(n.multiExec, () => (!1)),_optionalChain([this, 'access', _68 => _68.commandOptions, 'optionalAccess', _69 => _69.latencyLogging])){let t=this.exec.bind(this);this.exec=async()=>{let o=performance.now(),s=await t(),a=(performance.now()-o).toFixed(2);return console.log(`Latency for \x1B[38;2;19;185;39m${this.multiExec?["MULTI-EXEC"]:["PIPELINE"].toString().toUpperCase()}\x1B[0m: \x1B[38;2;0;255;255m${a} ms\x1B[0m`),s}}}__init2() {this.exec=async()=>{if(this.commands.length===0)throw new Error("Pipeline is empty");let n=this.multiExec?["multi-exec"]:["pipeline"];return(await this.client.request({path:n,body:Object.values(this.commands).map(o=>o.command)})).map(({error:o,result:s},r)=>{if(o)throw new u(`Command ${r+1} [ ${this.commands[r].command[0]} ] failed: ${o}`);return this.commands[r].deserialize(s)})}}length(){return this.commands.length}chain(n){return this.commands.push(n),this}__init3() {this.append=(...n)=>this.chain(new f(n,this.commandOptions))}__init4() {this.bitcount=(...n)=>this.chain(new y(n,this.commandOptions))}__init5() {this.bitfield=(...n)=>new x(n,this.client,this.commandOptions,this.chain.bind(this))}__init6() {this.bitop=(n,t,o,...s)=>this.chain(new b([n,t,o,...s],this.commandOptions))}__init7() {this.bitpos=(...n)=>this.chain(new T(n,this.commandOptions))}__init8() {this.copy=(...n)=>this.chain(new O(n,this.commandOptions))}__init9() {this.zdiffstore=(...n)=>this.chain(new Te(n,this.commandOptions))}__init10() {this.dbsize=()=>this.chain(new w(this.commandOptions))}__init11() {this.decr=(...n)=>this.chain(new D(n,this.commandOptions))}__init12() {this.decrby=(...n)=>this.chain(new A(n,this.commandOptions))}__init13() {this.del=(...n)=>this.chain(new k(n,this.commandOptions))}__init14() {this.echo=(...n)=>this.chain(new R(n,this.commandOptions))}__init15() {this.eval=(...n)=>this.chain(new S(n,this.commandOptions))}__init16() {this.evalsha=(...n)=>this.chain(new E(n,this.commandOptions))}__init17() {this.exists=(...n)=>this.chain(new M(n,this.commandOptions))}__init18() {this.expire=(...n)=>this.chain(new v(n,this.commandOptions))}__init19() {this.expireat=(...n)=>this.chain(new P(n,this.commandOptions))}__init20() {this.flushall=n=>this.chain(new I(n,this.commandOptions))}__init21() {this.flushdb=(...n)=>this.chain(new N(n,this.commandOptions))}__init22() {this.geoadd=(...n)=>this.chain(new L(n,this.commandOptions))}__init23() {this.geodist=(...n)=>this.chain(new K(n,this.commandOptions))}__init24() {this.geopos=(...n)=>this.chain(new G(n,this.commandOptions))}__init25() {this.geohash=(...n)=>this.chain(new z(n,this.commandOptions))}__init26() {this.geosearch=(...n)=>this.chain(new X(n,this.commandOptions))}__init27() {this.geosearchstore=(...n)=>this.chain(new U(n,this.commandOptions))}__init28() {this.get=(...n)=>this.chain(new J(n,this.commandOptions))}__init29() {this.getbit=(...n)=>this.chain(new B(n,this.commandOptions))}__init30() {this.getdel=(...n)=>this.chain(new Z(n,this.commandOptions))}__init31() {this.getrange=(...n)=>this.chain(new H(n,this.commandOptions))}__init32() {this.getset=(n,t)=>this.chain(new F([n,t],this.commandOptions))}__init33() {this.hdel=(...n)=>this.chain(new $(n,this.commandOptions))}__init34() {this.hexists=(...n)=>this.chain(new q(n,this.commandOptions))}__init35() {this.hget=(...n)=>this.chain(new Y(n,this.commandOptions))}__init36() {this.hgetall=(...n)=>this.chain(new j(n,this.commandOptions))}__init37() {this.hincrby=(...n)=>this.chain(new W(n,this.commandOptions))}__init38() {this.hincrbyfloat=(...n)=>this.chain(new V(n,this.commandOptions))}__init39() {this.hkeys=(...n)=>this.chain(new _(n,this.commandOptions))}__init40() {this.hlen=(...n)=>this.chain(new Q(n,this.commandOptions))}__init41() {this.hmget=(...n)=>this.chain(new nn(n,this.commandOptions))}__init42() {this.hmset=(n,t)=>this.chain(new tn([n,t],this.commandOptions))}__init43() {this.hrandfield=(n,t,o)=>this.chain(new g([n,t,o],this.commandOptions))}__init44() {this.hscan=(...n)=>this.chain(new en(n,this.commandOptions))}__init45() {this.hset=(n,t)=>this.chain(new on([n,t],this.commandOptions))}__init46() {this.hsetnx=(n,t,o)=>this.chain(new mn([n,t,o],this.commandOptions))}__init47() {this.hstrlen=(...n)=>this.chain(new sn(n,this.commandOptions))}__init48() {this.hvals=(...n)=>this.chain(new rn(n,this.commandOptions))}__init49() {this.incr=(...n)=>this.chain(new an(n,this.commandOptions))}__init50() {this.incrby=(...n)=>this.chain(new pn(n,this.commandOptions))}__init51() {this.incrbyfloat=(...n)=>this.chain(new dn(n,this.commandOptions))}__init52() {this.keys=(...n)=>this.chain(new In(n,this.commandOptions))}__init53() {this.lindex=(...n)=>this.chain(new Nn(n,this.commandOptions))}__init54() {this.linsert=(n,t,o,s)=>this.chain(new Ln([n,t,o,s],this.commandOptions))}__init55() {this.llen=(...n)=>this.chain(new Kn(n,this.commandOptions))}__init56() {this.lmove=(...n)=>this.chain(new zn(n,this.commandOptions))}__init57() {this.lpop=(...n)=>this.chain(new Xn(n,this.commandOptions))}__init58() {this.lmpop=(...n)=>this.chain(new Gn(n,this.commandOptions))}__init59() {this.lpos=(...n)=>this.chain(new Un(n,this.commandOptions))}__init60() {this.lpush=(n,...t)=>this.chain(new Jn([n,...t],this.commandOptions))}__init61() {this.lpushx=(n,...t)=>this.chain(new Bn([n,...t],this.commandOptions))}__init62() {this.lrange=(...n)=>this.chain(new Zn(n,this.commandOptions))}__init63() {this.lrem=(n,t,o)=>this.chain(new Hn([n,t,o],this.commandOptions))}__init64() {this.lset=(n,t,o)=>this.chain(new Fn([n,t,o],this.commandOptions))}__init65() {this.ltrim=(...n)=>this.chain(new $n(n,this.commandOptions))}__init66() {this.mget=(...n)=>this.chain(new qn(n,this.commandOptions))}__init67() {this.mset=n=>this.chain(new Yn([n],this.commandOptions))}__init68() {this.msetnx=n=>this.chain(new jn([n],this.commandOptions))}__init69() {this.persist=(...n)=>this.chain(new Wn(n,this.commandOptions))}__init70() {this.pexpire=(...n)=>this.chain(new Vn(n,this.commandOptions))}__init71() {this.pexpireat=(...n)=>this.chain(new _n(n,this.commandOptions))}__init72() {this.pfadd=(...n)=>this.chain(new Qn(n,this.commandOptions))}__init73() {this.pfcount=(...n)=>this.chain(new nt(n,this.commandOptions))}__init74() {this.pfmerge=(...n)=>this.chain(new tt(n,this.commandOptions))}__init75() {this.ping=n=>this.chain(new et(n,this.commandOptions))}__init76() {this.psetex=(n,t,o)=>this.chain(new ot([n,t,o],this.commandOptions))}__init77() {this.pttl=(...n)=>this.chain(new mt(n,this.commandOptions))}__init78() {this.publish=(...n)=>this.chain(new st(n,this.commandOptions))}__init79() {this.randomkey=()=>this.chain(new rt(this.commandOptions))}__init80() {this.rename=(...n)=>this.chain(new at(n,this.commandOptions))}__init81() {this.renamenx=(...n)=>this.chain(new it(n,this.commandOptions))}__init82() {this.rpop=(...n)=>this.chain(new pt(n,this.commandOptions))}__init83() {this.rpush=(n,...t)=>this.chain(new dt([n,...t],this.commandOptions))}__init84() {this.rpushx=(n,...t)=>this.chain(new ct([n,...t],this.commandOptions))}__init85() {this.sadd=(n,t,...o)=>this.chain(new ut([n,t,...o],this.commandOptions))}__init86() {this.scan=(...n)=>this.chain(new ht(n,this.commandOptions))}__init87() {this.scard=(...n)=>this.chain(new lt(n,this.commandOptions))}__init88() {this.scriptExists=(...n)=>this.chain(new Ct(n,this.commandOptions))}__init89() {this.scriptFlush=(...n)=>this.chain(new gt(n,this.commandOptions))}__init90() {this.scriptLoad=(...n)=>this.chain(new ft(n,this.commandOptions))}__init91() {this.sdiff=(...n)=>this.chain(new yt(n,this.commandOptions))}__init92() {this.sdiffstore=(...n)=>this.chain(new xt(n,this.commandOptions))}__init93() {this.set=(n,t,o)=>this.chain(new bt([n,t,o],this.commandOptions))}__init94() {this.setbit=(...n)=>this.chain(new Tt(n,this.commandOptions))}__init95() {this.setex=(n,t,o)=>this.chain(new Ot([n,t,o],this.commandOptions))}__init96() {this.setnx=(n,t)=>this.chain(new wt([n,t],this.commandOptions))}__init97() {this.setrange=(...n)=>this.chain(new Dt(n,this.commandOptions))}__init98() {this.sinter=(...n)=>this.chain(new At(n,this.commandOptions))}__init99() {this.sinterstore=(...n)=>this.chain(new kt(n,this.commandOptions))}__init100() {this.sismember=(n,t)=>this.chain(new Rt([n,t],this.commandOptions))}__init101() {this.smembers=(...n)=>this.chain(new St(n,this.commandOptions))}__init102() {this.smismember=(n,t)=>this.chain(new Et([n,t],this.commandOptions))}__init103() {this.smove=(n,t,o)=>this.chain(new Mt([n,t,o],this.commandOptions))}__init104() {this.spop=(...n)=>this.chain(new vt(n,this.commandOptions))}__init105() {this.srandmember=(...n)=>this.chain(new Pt(n,this.commandOptions))}__init106() {this.srem=(n,...t)=>this.chain(new It([n,...t],this.commandOptions))}__init107() {this.sscan=(...n)=>this.chain(new Nt(n,this.commandOptions))}__init108() {this.strlen=(...n)=>this.chain(new Lt(n,this.commandOptions))}__init109() {this.sunion=(...n)=>this.chain(new Kt(n,this.commandOptions))}__init110() {this.sunionstore=(...n)=>this.chain(new zt(n,this.commandOptions))}__init111() {this.time=()=>this.chain(new Gt(this.commandOptions))}__init112() {this.touch=(...n)=>this.chain(new Xt(n,this.commandOptions))}__init113() {this.ttl=(...n)=>this.chain(new Ut(n,this.commandOptions))}__init114() {this.type=(...n)=>this.chain(new Jt(n,this.commandOptions))}__init115() {this.unlink=(...n)=>this.chain(new Bt(n,this.commandOptions))}__init116() {this.zadd=(...n)=>"score"in n[1]?this.chain(new l([n[0],n[1],...n.slice(2)],this.commandOptions)):this.chain(new l([n[0],n[1],...n.slice(2)],this.commandOptions))}__init117() {this.xadd=(...n)=>this.chain(new Ht(n,this.commandOptions))}__init118() {this.xack=(...n)=>this.chain(new Zt(n,this.commandOptions))}__init119() {this.xdel=(...n)=>this.chain(new qt(n,this.commandOptions))}__init120() {this.xgroup=(...n)=>this.chain(new Yt(n,this.commandOptions))}__init121() {this.xread=(...n)=>this.chain(new Qt(n,this.commandOptions))}__init122() {this.xreadgroup=(...n)=>this.chain(new ne(n,this.commandOptions))}__init123() {this.xinfo=(...n)=>this.chain(new jt(n,this.commandOptions))}__init124() {this.xlen=(...n)=>this.chain(new Wt(n,this.commandOptions))}__init125() {this.xpending=(...n)=>this.chain(new Vt(n,this.commandOptions))}__init126() {this.xclaim=(...n)=>this.chain(new $t(n,this.commandOptions))}__init127() {this.xautoclaim=(...n)=>this.chain(new Ft(n,this.commandOptions))}__init128() {this.xtrim=(...n)=>this.chain(new ee(n,this.commandOptions))}__init129() {this.xrange=(...n)=>this.chain(new _t(n,this.commandOptions))}__init130() {this.xrevrange=(...n)=>this.chain(new te(n,this.commandOptions))}__init131() {this.zcard=(...n)=>this.chain(new oe(n,this.commandOptions))}__init132() {this.zcount=(...n)=>this.chain(new me(n,this.commandOptions))}__init133() {this.zincrby=(n,t,o)=>this.chain(new se([n,t,o],this.commandOptions))}__init134() {this.zinterstore=(...n)=>this.chain(new re(n,this.commandOptions))}__init135() {this.zlexcount=(...n)=>this.chain(new ae(n,this.commandOptions))}__init136() {this.zmscore=(...n)=>this.chain(new Oe(n,this.commandOptions))}__init137() {this.zpopmax=(...n)=>this.chain(new ie(n,this.commandOptions))}__init138() {this.zpopmin=(...n)=>this.chain(new pe(n,this.commandOptions))}__init139() {this.zrange=(...n)=>this.chain(new de(n,this.commandOptions))}__init140() {this.zrank=(n,t)=>this.chain(new ce([n,t],this.commandOptions))}__init141() {this.zrem=(n,...t)=>this.chain(new ue([n,...t],this.commandOptions))}__init142() {this.zremrangebylex=(...n)=>this.chain(new he(n,this.commandOptions))}__init143() {this.zremrangebyrank=(...n)=>this.chain(new le(n,this.commandOptions))}__init144() {this.zremrangebyscore=(...n)=>this.chain(new Ce(n,this.commandOptions))}__init145() {this.zrevrank=(n,t)=>this.chain(new ge([n,t],this.commandOptions))}__init146() {this.zscan=(...n)=>this.chain(new fe(n,this.commandOptions))}__init147() {this.zscore=(n,t)=>this.chain(new ye([n,t],this.commandOptions))}__init148() {this.zunionstore=(...n)=>this.chain(new be(n,this.commandOptions))}__init149() {this.zunion=(...n)=>this.chain(new xe(n,this.commandOptions))}get json(){return{arrappend:(...n)=>this.chain(new cn(n,this.commandOptions)),arrindex:(...n)=>this.chain(new un(n,this.commandOptions)),arrinsert:(...n)=>this.chain(new hn(n,this.commandOptions)),arrlen:(...n)=>this.chain(new ln(n,this.commandOptions)),arrpop:(...n)=>this.chain(new Cn(n,this.commandOptions)),arrtrim:(...n)=>this.chain(new gn(n,this.commandOptions)),clear:(...n)=>this.chain(new fn(n,this.commandOptions)),del:(...n)=>this.chain(new yn(n,this.commandOptions)),forget:(...n)=>this.chain(new xn(n,this.commandOptions)),get:(...n)=>this.chain(new bn(n,this.commandOptions)),mget:(...n)=>this.chain(new Tn(n,this.commandOptions)),mset:(...n)=>this.chain(new On(n,this.commandOptions)),numincrby:(...n)=>this.chain(new wn(n,this.commandOptions)),nummultby:(...n)=>this.chain(new Dn(n,this.commandOptions)),objkeys:(...n)=>this.chain(new An(n,this.commandOptions)),objlen:(...n)=>this.chain(new kn(n,this.commandOptions)),resp:(...n)=>this.chain(new Rn(n,this.commandOptions)),set:(...n)=>this.chain(new Sn(n,this.commandOptions)),strappend:(...n)=>this.chain(new En(n,this.commandOptions)),strlen:(...n)=>this.chain(new Mn(n,this.commandOptions)),toggle:(...n)=>this.chain(new vn(n,this.commandOptions)),type:(...n)=>this.chain(new Pn(n,this.commandOptions))}}}, _class2);function ve(m,n){let t=m;return t.autoPipelineExecutor||(t.autoPipelineExecutor=new Me(t)),new Proxy(t,{get:(o,s)=>s==="pipelineCounter"?o.autoPipelineExecutor.pipelineCounter:s==="json"?ve(o,!0):s in o&&!(s in o.autoPipelineExecutor.pipeline)?o[s]:(n?typeof o.autoPipelineExecutor.pipeline.json[s]=="function":typeof o.autoPipelineExecutor.pipeline[s]=="function")?(...i)=>o.autoPipelineExecutor.withAutoPipeline(p=>{n?p.json[s](...i):p[s](...i)}):o.autoPipelineExecutor.pipeline[s]})}var Me= (_class3 =class{__init150() {this.pipelinePromises=new WeakMap}__init151() {this.activePipeline=null}__init152() {this.indexInCurrentPipeline=0}__init153() {this.pipelineCounter=0}constructor(n){;_class3.prototype.__init150.call(this);_class3.prototype.__init151.call(this);_class3.prototype.__init152.call(this);_class3.prototype.__init153.call(this);this.redis=n,this.pipeline=n.pipeline()}async withAutoPipeline(n){let t=_nullishCoalesce(this.activePipeline, () => (this.redis.pipeline()));this.activePipeline||(this.activePipeline=t,this.indexInCurrentPipeline=0);let o=this.indexInCurrentPipeline++;return n(t),(await this.deferExecution().then(()=>{if(!this.pipelinePromises.has(t)){let a=t.exec();this.pipelineCounter+=1,this.pipelinePromises.set(t,a),this.activePipeline=null}return this.pipelinePromises.get(t)}))[o]}async deferExecution(){await Promise.resolve(),await Promise.resolve()}}, _class3);var _enchexjs = require('crypto-js/enc-hex.js'); var _enchexjs2 = _interopRequireDefault(_enchexjs);var _sha1js = require('crypto-js/sha1.js'); var _sha1js2 = _interopRequireDefault(_sha1js);var ke=class{constructor(n,t){this.redis=n,this.sha1=this.digest(t),this.script=t}async eval(n,t){return await this.redis.eval(this.script,n,t)}async evalsha(n,t){return await this.redis.evalsha(this.sha1,n,t)}async exec(n,t){return await this.redis.evalsha(this.sha1,n,t).catch(async s=>{if(s instanceof Error&&s.message.toLowerCase().includes("noscript"))return await this.redis.eval(this.script,n,t);throw s})}digest(n){return _enchexjs2.default.stringify(_sha1js2.default.call(void 0, n))}};var Le= (_class4 =class{constructor(n,t){;_class4.prototype.__init154.call(this);_class4.prototype.__init155.call(this);_class4.prototype.__init156.call(this);_class4.prototype.__init157.call(this);_class4.prototype.__init158.call(this);_class4.prototype.__init159.call(this);_class4.prototype.__init160.call(this);_class4.prototype.__init161.call(this);_class4.prototype.__init162.call(this);_class4.prototype.__init163.call(this);_class4.prototype.__init164.call(this);_class4.prototype.__init165.call(this);_class4.prototype.__init166.call(this);_class4.prototype.__init167.call(this);_class4.prototype.__init168.call(this);_class4.prototype.__init169.call(this);_class4.prototype.__init170.call(this);_class4.prototype.__init171.call(this);_class4.prototype.__init172.call(this);_class4.prototype.__init173.call(this);_class4.prototype.__init174.call(this);_class4.prototype.__init175.call(this);_class4.prototype.__init176.call(this);_class4.prototype.__init177.call(this);_class4.prototype.__init178.call(this);_class4.prototype.__init179.call(this);_class4.prototype.__init180.call(this);_class4.prototype.__init181.call(this);_class4.prototype.__init182.call(this);_class4.prototype.__init183.call(this);_class4.prototype.__init184.call(this);_class4.prototype.__init185.call(this);_class4.prototype.__init186.call(this);_class4.prototype.__init187.call(this);_class4.prototype.__init188.call(this);_class4.prototype.__init189.call(this);_class4.prototype.__init190.call(this);_class4.prototype.__init191.call(this);_class4.prototype.__init192.call(this);_class4.prototype.__init193.call(this);_class4.prototype.__init194.call(this);_class4.prototype.__init195.call(this);_class4.prototype.__init196.call(this);_class4.prototype.__init197.call(this);_class4.prototype.__init198.call(this);_class4.prototype.__init199.call(this);_class4.prototype.__init200.call(this);_class4.prototype.__init201.call(this);_class4.prototype.__init202.call(this);_class4.prototype.__init203.call(this);_class4.prototype.__init204.call(this);_class4.prototype.__init205.call(this);_class4.prototype.__init206.call(this);_class4.prototype.__init207.call(this);_class4.prototype.__init208.call(this);_class4.prototype.__init209.call(this);_class4.prototype.__init210.call(this);_class4.prototype.__init211.call(this);_class4.prototype.__init212.call(this);_class4.prototype.__init213.call(this);_class4.prototype.__init214.call(this);_class4.prototype.__init215.call(this);_class4.prototype.__init216.call(this);_class4.prototype.__init217.call(this);_class4.prototype.__init218.call(this);_class4.prototype.__init219.call(this);_class4.prototype.__init220.call(this);_class4.prototype.__init221.call(this);_class4.prototype.__init222.call(this);_class4.prototype.__init223.call(this);_class4.prototype.__init224.call(this);_class4.prototype.__init225.call(this);_class4.prototype.__init226.call(this);_class4.prototype.__init227.call(this);_class4.prototype.__init228.call(this);_class4.prototype.__init229.call(this);_class4.prototype.__init230.call(this);_class4.prototype.__init231.call(this);_class4.prototype.__init232.call(this);_class4.prototype.__init233.call(this);_class4.prototype.__init234.call(this);_class4.prototype.__init235.call(this);_class4.prototype.__init236.call(this);_class4.prototype.__init237.call(this);_class4.prototype.__init238.call(this);_class4.prototype.__init239.call(this);_class4.prototype.__init240.call(this);_class4.prototype.__init241.call(this);_class4.prototype.__init242.call(this);_class4.prototype.__init243.call(this);_class4.prototype.__init244.call(this);_class4.prototype.__init245.call(this);_class4.prototype.__init246.call(this);_class4.prototype.__init247.call(this);_class4.prototype.__init248.call(this);_class4.prototype.__init249.call(this);_class4.prototype.__init250.call(this);_class4.prototype.__init251.call(this);_class4.prototype.__init252.call(this);_class4.prototype.__init253.call(this);_class4.prototype.__init254.call(this);_class4.prototype.__init255.call(this);_class4.prototype.__init256.call(this);_class4.prototype.__init257.call(this);_class4.prototype.__init258.call(this);_class4.prototype.__init259.call(this);_class4.prototype.__init260.call(this);_class4.prototype.__init261.call(this);_class4.prototype.__init262.call(this);_class4.prototype.__init263.call(this);_class4.prototype.__init264.call(this);_class4.prototype.__init265.call(this);_class4.prototype.__init266.call(this);_class4.prototype.__init267.call(this);_class4.prototype.__init268.call(this);_class4.prototype.__init269.call(this);_class4.prototype.__init270.call(this);_class4.prototype.__init271.call(this);_class4.prototype.__init272.call(this);_class4.prototype.__init273.call(this);_class4.prototype.__init274.call(this);_class4.prototype.__init275.call(this);_class4.prototype.__init276.call(this);_class4.prototype.__init277.call(this);_class4.prototype.__init278.call(this);_class4.prototype.__init279.call(this);_class4.prototype.__init280.call(this);_class4.prototype.__init281.call(this);_class4.prototype.__init282.call(this);_class4.prototype.__init283.call(this);_class4.prototype.__init284.call(this);_class4.prototype.__init285.call(this);_class4.prototype.__init286.call(this);_class4.prototype.__init287.call(this);_class4.prototype.__init288.call(this);_class4.prototype.__init289.call(this);_class4.prototype.__init290.call(this);_class4.prototype.__init291.call(this);_class4.prototype.__init292.call(this);_class4.prototype.__init293.call(this);_class4.prototype.__init294.call(this);_class4.prototype.__init295.call(this);_class4.prototype.__init296.call(this);_class4.prototype.__init297.call(this);_class4.prototype.__init298.call(this);_class4.prototype.__init299.call(this);_class4.prototype.__init300.call(this);_class4.prototype.__init301.call(this);_class4.prototype.__init302.call(this);_class4.prototype.__init303.call(this);_class4.prototype.__init304.call(this);_class4.prototype.__init305.call(this);this.client=n,this.opts=t,this.enableTelemetry=_nullishCoalesce(_optionalChain([t, 'optionalAccess', _70 => _70.enableTelemetry]), () => (!0)),_optionalChain([t, 'optionalAccess', _71 => _71.readYourWrites])===!1&&(this.client.readYourWrites=!1),this.enableAutoPipelining=_nullishCoalesce(_optionalChain([t, 'optionalAccess', _72 => _72.enableAutoPipelining]), () => (!0))}get json(){return{arrappend:(...n)=>new cn(n,this.opts).exec(this.client),arrindex:(...n)=>new un(n,this.opts).exec(this.client),arrinsert:(...n)=>new hn(n,this.opts).exec(this.client),arrlen:(...n)=>new ln(n,this.opts).exec(this.client),arrpop:(...n)=>new Cn(n,this.opts).exec(this.client),arrtrim:(...n)=>new gn(n,this.opts).exec(this.client),clear:(...n)=>new fn(n,this.opts).exec(this.client),del:(...n)=>new yn(n,this.opts).exec(this.client),forget:(...n)=>new xn(n,this.opts).exec(this.client),get:(...n)=>new bn(n,this.opts).exec(this.client),mget:(...n)=>new Tn(n,this.opts).exec(this.client),mset:(...n)=>new On(n,this.opts).exec(this.client),numincrby:(...n)=>new wn(n,this.opts).exec(this.client),nummultby:(...n)=>new Dn(n,this.opts).exec(this.client),objkeys:(...n)=>new An(n,this.opts).exec(this.client),objlen:(...n)=>new kn(n,this.opts).exec(this.client),resp:(...n)=>new Rn(n,this.opts).exec(this.client),set:(...n)=>new Sn(n,this.opts).exec(this.client),strappend:(...n)=>new En(n,this.opts).exec(this.client),strlen:(...n)=>new Mn(n,this.opts).exec(this.client),toggle:(...n)=>new vn(n,this.opts).exec(this.client),type:(...n)=>new Pn(n,this.opts).exec(this.client)}}__init154() {this.use=n=>{let t=this.client.request.bind(this.client);this.client.request=o=>n(o,t)}}__init155() {this.addTelemetry=n=>{if(this.enableTelemetry)try{this.client.mergeTelemetry(n)}catch (e13){}}}createScript(n){return new ke(this,n)}__init156() {this.pipeline=()=>new De({client:this.client,commandOptions:this.opts,multiExec:!1})}__init157() {this.autoPipeline=()=>ve(this)}__init158() {this.multi=()=>new De({client:this.client,commandOptions:this.opts,multiExec:!0})}__init159() {this.bitfield=(...n)=>new x(n,this.client,this.opts)}__init160() {this.append=(...n)=>new f(n,this.opts).exec(this.client)}__init161() {this.bitcount=(...n)=>new y(n,this.opts).exec(this.client)}__init162() {this.bitop=(n,t,o,...s)=>new b([n,t,o,...s],this.opts).exec(this.client)}__init163() {this.bitpos=(...n)=>new T(n,this.opts).exec(this.client)}__init164() {this.copy=(...n)=>new O(n,this.opts).exec(this.client)}__init165() {this.dbsize=()=>new w(this.opts).exec(this.client)}__init166() {this.decr=(...n)=>new D(n,this.opts).exec(this.client)}__init167() {this.decrby=(...n)=>new A(n,this.opts).exec(this.client)}__init168() {this.del=(...n)=>new k(n,this.opts).exec(this.client)}__init169() {this.echo=(...n)=>new R(n,this.opts).exec(this.client)}__init170() {this.eval=(...n)=>new S(n,this.opts).exec(this.client)}__init171() {this.evalsha=(...n)=>new E(n,this.opts).exec(this.client)}__init172() {this.exists=(...n)=>new M(n,this.opts).exec(this.client)}__init173() {this.expire=(...n)=>new v(n,this.opts).exec(this.client)}__init174() {this.expireat=(...n)=>new P(n,this.opts).exec(this.client)}__init175() {this.flushall=n=>new I(n,this.opts).exec(this.client)}__init176() {this.flushdb=(...n)=>new N(n,this.opts).exec(this.client)}__init177() {this.geoadd=(...n)=>new L(n,this.opts).exec(this.client)}__init178() {this.geopos=(...n)=>new G(n,this.opts).exec(this.client)}__init179() {this.geodist=(...n)=>new K(n,this.opts).exec(this.client)}__init180() {this.geohash=(...n)=>new z(n,this.opts).exec(this.client)}__init181() {this.geosearch=(...n)=>new X(n,this.opts).exec(this.client)}__init182() {this.geosearchstore=(...n)=>new U(n,this.opts).exec(this.client)}__init183() {this.get=(...n)=>new J(n,this.opts).exec(this.client)}__init184() {this.getbit=(...n)=>new B(n,this.opts).exec(this.client)}__init185() {this.getdel=(...n)=>new Z(n,this.opts).exec(this.client)}__init186() {this.getrange=(...n)=>new H(n,this.opts).exec(this.client)}__init187() {this.getset=(n,t)=>new F([n,t],this.opts).exec(this.client)}__init188() {this.hdel=(...n)=>new $(n,this.opts).exec(this.client)}__init189() {this.hexists=(...n)=>new q(n,this.opts).exec(this.client)}__init190() {this.hget=(...n)=>new Y(n,this.opts).exec(this.client)}__init191() {this.hgetall=(...n)=>new j(n,this.opts).exec(this.client)}__init192() {this.hincrby=(...n)=>new W(n,this.opts).exec(this.client)}__init193() {this.hincrbyfloat=(...n)=>new V(n,this.opts).exec(this.client)}__init194() {this.hkeys=(...n)=>new _(n,this.opts).exec(this.client)}__init195() {this.hlen=(...n)=>new Q(n,this.opts).exec(this.client)}__init196() {this.hmget=(...n)=>new nn(n,this.opts).exec(this.client)}__init197() {this.hmset=(n,t)=>new tn([n,t],this.opts).exec(this.client)}__init198() {this.hrandfield=(n,t,o)=>new g([n,t,o],this.opts).exec(this.client)}__init199() {this.hscan=(...n)=>new en(n,this.opts).exec(this.client)}__init200() {this.hset=(n,t)=>new on([n,t],this.opts).exec(this.client)}__init201() {this.hsetnx=(n,t,o)=>new mn([n,t,o],this.opts).exec(this.client)}__init202() {this.hstrlen=(...n)=>new sn(n,this.opts).exec(this.client)}__init203() {this.hvals=(...n)=>new rn(n,this.opts).exec(this.client)}__init204() {this.incr=(...n)=>new an(n,this.opts).exec(this.client)}__init205() {this.incrby=(...n)=>new pn(n,this.opts).exec(this.client)}__init206() {this.incrbyfloat=(...n)=>new dn(n,this.opts).exec(this.client)}__init207() {this.keys=(...n)=>new In(n,this.opts).exec(this.client)}__init208() {this.lindex=(...n)=>new Nn(n,this.opts).exec(this.client)}__init209() {this.linsert=(n,t,o,s)=>new Ln([n,t,o,s],this.opts).exec(this.client)}__init210() {this.llen=(...n)=>new Kn(n,this.opts).exec(this.client)}__init211() {this.lmove=(...n)=>new zn(n,this.opts).exec(this.client)}__init212() {this.lpop=(...n)=>new Xn(n,this.opts).exec(this.client)}__init213() {this.lmpop=(...n)=>new Gn(n,this.opts).exec(this.client)}__init214() {this.lpos=(...n)=>new Un(n,this.opts).exec(this.client)}__init215() {this.lpush=(n,...t)=>new Jn([n,...t],this.opts).exec(this.client)}__init216() {this.lpushx=(n,...t)=>new Bn([n,...t],this.opts).exec(this.client)}__init217() {this.lrange=(...n)=>new Zn(n,this.opts).exec(this.client)}__init218() {this.lrem=(n,t,o)=>new Hn([n,t,o],this.opts).exec(this.client)}__init219() {this.lset=(n,t,o)=>new Fn([n,t,o],this.opts).exec(this.client)}__init220() {this.ltrim=(...n)=>new $n(n,this.opts).exec(this.client)}__init221() {this.mget=(...n)=>new qn(n,this.opts).exec(this.client)}__init222() {this.mset=n=>new Yn([n],this.opts).exec(this.client)}__init223() {this.msetnx=n=>new jn([n],this.opts).exec(this.client)}__init224() {this.persist=(...n)=>new Wn(n,this.opts).exec(this.client)}__init225() {this.pexpire=(...n)=>new Vn(n,this.opts).exec(this.client)}__init226() {this.pexpireat=(...n)=>new _n(n,this.opts).exec(this.client)}__init227() {this.pfadd=(...n)=>new Qn(n,this.opts).exec(this.client)}__init228() {this.pfcount=(...n)=>new nt(n,this.opts).exec(this.client)}__init229() {this.pfmerge=(...n)=>new tt(n,this.opts).exec(this.client)}__init230() {this.ping=n=>new et(n,this.opts).exec(this.client)}__init231() {this.psetex=(n,t,o)=>new ot([n,t,o],this.opts).exec(this.client)}__init232() {this.pttl=(...n)=>new mt(n,this.opts).exec(this.client)}__init233() {this.publish=(...n)=>new st(n,this.opts).exec(this.client)}__init234() {this.randomkey=()=>new rt().exec(this.client)}__init235() {this.rename=(...n)=>new at(n,this.opts).exec(this.client)}__init236() {this.renamenx=(...n)=>new it(n,this.opts).exec(this.client)}__init237() {this.rpop=(...n)=>new pt(n,this.opts).exec(this.client)}__init238() {this.rpush=(n,...t)=>new dt([n,...t],this.opts).exec(this.client)}__init239() {this.rpushx=(n,...t)=>new ct([n,...t],this.opts).exec(this.client)}__init240() {this.sadd=(n,t,...o)=>new ut([n,t,...o],this.opts).exec(this.client)}__init241() {this.scan=(...n)=>new ht(n,this.opts).exec(this.client)}__init242() {this.scard=(...n)=>new lt(n,this.opts).exec(this.client)}__init243() {this.scriptExists=(...n)=>new Ct(n,this.opts).exec(this.client)}__init244() {this.scriptFlush=(...n)=>new gt(n,this.opts).exec(this.client)}__init245() {this.scriptLoad=(...n)=>new ft(n,this.opts).exec(this.client)}__init246() {this.sdiff=(...n)=>new yt(n,this.opts).exec(this.client)}__init247() {this.sdiffstore=(...n)=>new xt(n,this.opts).exec(this.client)}__init248() {this.set=(n,t,o)=>new bt([n,t,o],this.opts).exec(this.client)}__init249() {this.setbit=(...n)=>new Tt(n,this.opts).exec(this.client)}__init250() {this.setex=(n,t,o)=>new Ot([n,t,o],this.opts).exec(this.client)}__init251() {this.setnx=(n,t)=>new wt([n,t],this.opts).exec(this.client)}__init252() {this.setrange=(...n)=>new Dt(n,this.opts).exec(this.client)}__init253() {this.sinter=(...n)=>new At(n,this.opts).exec(this.client)}__init254() {this.sinterstore=(...n)=>new kt(n,this.opts).exec(this.client)}__init255() {this.sismember=(n,t)=>new Rt([n,t],this.opts).exec(this.client)}__init256() {this.smismember=(n,t)=>new Et([n,t],this.opts).exec(this.client)}__init257() {this.smembers=(...n)=>new St(n,this.opts).exec(this.client)}__init258() {this.smove=(n,t,o)=>new Mt([n,t,o],this.opts).exec(this.client)}__init259() {this.spop=(...n)=>new vt(n,this.opts).exec(this.client)}__init260() {this.srandmember=(...n)=>new Pt(n,this.opts).exec(this.client)}__init261() {this.srem=(n,...t)=>new It([n,...t],this.opts).exec(this.client)}__init262() {this.sscan=(...n)=>new Nt(n,this.opts).exec(this.client)}__init263() {this.strlen=(...n)=>new Lt(n,this.opts).exec(this.client)}__init264() {this.sunion=(...n)=>new Kt(n,this.opts).exec(this.client)}__init265() {this.sunionstore=(...n)=>new zt(n,this.opts).exec(this.client)}__init266() {this.time=()=>new Gt().exec(this.client)}__init267() {this.touch=(...n)=>new Xt(n,this.opts).exec(this.client)}__init268() {this.ttl=(...n)=>new Ut(n,this.opts).exec(this.client)}__init269() {this.type=(...n)=>new Jt(n,this.opts).exec(this.client)}__init270() {this.unlink=(...n)=>new Bt(n,this.opts).exec(this.client)}__init271() {this.xadd=(...n)=>new Ht(n,this.opts).exec(this.client)}__init272() {this.xack=(...n)=>new Zt(n,this.opts).exec(this.client)}__init273() {this.xdel=(...n)=>new qt(n,this.opts).exec(this.client)}__init274() {this.xgroup=(...n)=>new Yt(n,this.opts).exec(this.client)}__init275() {this.xread=(...n)=>new Qt(n,this.opts).exec(this.client)}__init276() {this.xreadgroup=(...n)=>new ne(n,this.opts).exec(this.client)}__init277() {this.xinfo=(...n)=>new jt(n,this.opts).exec(this.client)}__init278() {this.xlen=(...n)=>new Wt(n,this.opts).exec(this.client)}__init279() {this.xpending=(...n)=>new Vt(n,this.opts).exec(this.client)}__init280() {this.xclaim=(...n)=>new $t(n,this.opts).exec(this.client)}__init281() {this.xautoclaim=(...n)=>new Ft(n,this.opts).exec(this.client)}__init282() {this.xtrim=(...n)=>new ee(n,this.opts).exec(this.client)}__init283() {this.xrange=(...n)=>new _t(n,this.opts).exec(this.client)}__init284() {this.xrevrange=(...n)=>new te(n,this.opts).exec(this.client)}__init285() {this.zadd=(...n)=>"score"in n[1]?new l([n[0],n[1],...n.slice(2)],this.opts).exec(this.client):new l([n[0],n[1],...n.slice(2)],this.opts).exec(this.client)}__init286() {this.zcard=(...n)=>new oe(n,this.opts).exec(this.client)}__init287() {this.zcount=(...n)=>new me(n,this.opts).exec(this.client)}__init288() {this.zdiffstore=(...n)=>new Te(n,this.opts).exec(this.client)}__init289() {this.zincrby=(n,t,o)=>new se([n,t,o],this.opts).exec(this.client)}__init290() {this.zinterstore=(...n)=>new re(n,this.opts).exec(this.client)}__init291() {this.zlexcount=(...n)=>new ae(n,this.opts).exec(this.client)}__init292() {this.zmscore=(...n)=>new Oe(n,this.opts).exec(this.client)}__init293() {this.zpopmax=(...n)=>new ie(n,this.opts).exec(this.client)}__init294() {this.zpopmin=(...n)=>new pe(n,this.opts).exec(this.client)}__init295() {this.zrange=(...n)=>new de(n,this.opts).exec(this.client)}__init296() {this.zrank=(n,t)=>new ce([n,t],this.opts).exec(this.client)}__init297() {this.zrem=(n,...t)=>new ue([n,...t],this.opts).exec(this.client)}__init298() {this.zremrangebylex=(...n)=>new he(n,this.opts).exec(this.client)}__init299() {this.zremrangebyrank=(...n)=>new le(n,this.opts).exec(this.client)}__init300() {this.zremrangebyscore=(...n)=>new Ce(n,this.opts).exec(this.client)}__init301() {this.zrevrank=(n,t)=>new ge([n,t],this.opts).exec(this.client)}__init302() {this.zscan=(...n)=>new fe(n,this.opts).exec(this.client)}__init303() {this.zscore=(n,t)=>new ye([n,t],this.opts).exec(this.client)}__init304() {this.zunion=(...n)=>new xe(n,this.opts).exec(this.client)}__init305() {this.zunionstore=(...n)=>new be(n,this.opts).exec(this.client)}}, _class4);var $u="v1.30.2";exports.a = Ge; exports.b = Pe; exports.c = Le; exports.d = $u;
@@ -0,0 +1 @@
1
+ var Ke=Object.defineProperty;var ze=(m,n)=>{for(var t in n)Ke(m,t,{get:n[t],enumerable:!0})};var Ge={};ze(Ge,{UpstashError:()=>u,UrlError:()=>we});var u=class extends Error{constructor(n){super(n),this.name="UpstashError"}},we=class extends Error{constructor(n){super(`Upstash Redis client was passed an invalid URL. You should pass the URL together with https. Received: "${n}". `),this.name="UrlError"}};var Pe=class{baseUrl;headers;options;readYourWrites;upstashSyncToken="";retry;constructor(n){if(this.options={backend:n.options?.backend,agent:n.agent,responseEncoding:n.responseEncoding??"base64",cache:n.cache,signal:n.signal,keepAlive:n.keepAlive??!0},this.upstashSyncToken="",this.readYourWrites=n.readYourWrites??!0,this.baseUrl=n.baseUrl.replace(/\/$/,""),!/^https?:\/\/[^\s#$./?].\S*$/.test(this.baseUrl))throw new we(this.baseUrl);this.headers={"Content-Type":"application/json",...n.headers},this.options.responseEncoding==="base64"&&(this.headers["Upstash-Encoding"]="base64"),this.retry=typeof n.retry=="boolean"&&!n.retry?{attempts:1,backoff:()=>0}:{attempts:n.retry?.retries??5,backoff:n.retry?.backoff??(o=>Math.exp(o)*50)}}mergeTelemetry(n){this.headers=Re(this.headers,"Upstash-Telemetry-Runtime",n.runtime),this.headers=Re(this.headers,"Upstash-Telemetry-Platform",n.platform),this.headers=Re(this.headers,"Upstash-Telemetry-Sdk",n.sdk)}async request(n){let t={cache:this.options.cache,method:"POST",headers:this.headers,body:JSON.stringify(n.body),keepalive:this.options.keepAlive,agent:this.options.agent,signal:this.options.signal,backend:this.options.backend};if(this.readYourWrites){let a=this.upstashSyncToken;this.headers["upstash-sync-token"]=a}let o=null,s=null;for(let a=0;a<=this.retry.attempts;a++)try{o=await fetch([this.baseUrl,...n.path??[]].join("/"),t);break}catch(i){if(this.options.signal?.aborted){let p=new Blob([JSON.stringify({result:this.options.signal.reason??"Aborted"})]),d={status:200,statusText:this.options.signal.reason??"Aborted"};o=new Response(p,d);break}s=i,await new Promise(p=>setTimeout(p,this.retry.backoff(a)))}if(!o)throw s??new Error("Exhausted all retries");let r=await o.json();if(!o.ok)throw new u(`${r.error}, command was: ${JSON.stringify(n.body)}`);if(this.readYourWrites){let a=o.headers;this.upstashSyncToken=a.get("upstash-sync-token")??""}if(this.readYourWrites){let a=o.headers;this.upstashSyncToken=a.get("upstash-sync-token")??""}return this.options.responseEncoding==="base64"?Array.isArray(r)?r.map(({result:i,error:p})=>({result:Se(i),error:p})):{result:Se(r.result),error:r.error}:r}};function Ie(m){let n="";try{let t=atob(m),o=t.length,s=new Uint8Array(o);for(let r=0;r<o;r++)s[r]=t.charCodeAt(r);n=new TextDecoder().decode(s)}catch{n=m}return n}function Se(m){let n;switch(typeof m){case"undefined":return m;case"number":{n=m;break}case"object":{Array.isArray(m)?n=m.map(t=>typeof t=="string"?Ie(t):Array.isArray(t)?t.map(o=>Se(o)):t):n=null;break}case"string":{n=m==="OK"?"OK":Ie(m);break}default:break}return n}function Re(m,n,t){return t&&(m[n]=m[n]?[m[n],t].join(","):t),m}function Ne(m){let n=Array.isArray(m)?m.map(t=>{try{return Ne(t)}catch{return t}}):JSON.parse(m);return typeof n=="number"&&n.toString()!==m?m:n}function Ee(m){try{return Ne(m)}catch{return m}}function h(m){return[m[0],...Ee(m.slice(1))]}var Xe=m=>{switch(typeof m){case"string":case"number":case"boolean":return m;default:return JSON.stringify(m)}},e=class{command;serialize;deserialize;constructor(n,t){if(this.serialize=Xe,this.deserialize=t?.automaticDeserialization===void 0||t.automaticDeserialization?t?.deserialize??Ee:o=>o,this.command=n.map(o=>this.serialize(o)),t?.latencyLogging){let o=this.exec.bind(this);this.exec=async s=>{let r=performance.now(),a=await o(s),p=(performance.now()-r).toFixed(2);return console.log(`Latency for \x1B[38;2;19;185;39m${this.command[0].toString().toUpperCase()}\x1B[0m: \x1B[38;2;0;255;255m${p} ms\x1B[0m`),a}}}async exec(n){let{result:t,error:o}=await n.request({body:this.command,upstashSyncToken:n.upstashSyncToken});if(o)throw new u(o);if(t===void 0)throw new TypeError("Request did not return a result");return this.deserialize(t)}};function Ue(m){if(m.length===0)return null;let n={};for(;m.length>=2;){let t=m.shift(),o=m.shift();try{n[t]=JSON.parse(o)}catch{n[t]=o}}return n}var g=class extends e{constructor(n,t){let o=["hrandfield",n[0]];typeof n[1]=="number"&&o.push(n[1]),n[2]&&o.push("WITHVALUES"),super(o,{deserialize:n[2]?s=>Ue(s):t?.deserialize,...t})}};var f=class extends e{constructor(n,t){super(["append",...n],t)}};var y=class extends e{constructor([n,t,o],s){let r=["bitcount",n];typeof t=="number"&&r.push(t),typeof o=="number"&&r.push(o),super(r,s)}};var x=class{constructor(n,t,o,s=r=>r.exec(this.client)){this.client=t;this.opts=o;this.execOperation=s;this.command=["bitfield",...n]}command;chain(...n){return this.command.push(...n),this}get(...n){return this.chain("get",...n)}set(...n){return this.chain("set",...n)}incrby(...n){return this.chain("incrby",...n)}overflow(n){return this.chain("overflow",n)}exec(){let n=new e(this.command,this.opts);return this.execOperation(n)}};var b=class extends e{constructor(n,t){super(["bitop",...n],t)}};var T=class extends e{constructor(n,t){super(["bitpos",...n],t)}};var O=class extends e{constructor([n,t,o],s){super(["COPY",n,t,...o?.replace?["REPLACE"]:[]],{...s,deserialize(r){return r>0?"COPIED":"NOT_COPIED"}})}};var w=class extends e{constructor(n){super(["dbsize"],n)}};var D=class extends e{constructor(n,t){super(["decr",...n],t)}};var A=class extends e{constructor(n,t){super(["decrby",...n],t)}};var k=class extends e{constructor(n,t){super(["del",...n],t)}};var R=class extends e{constructor(n,t){super(["echo",...n],t)}};var S=class extends e{constructor([n,t,o],s){super(["eval",n,t.length,...t,...o??[]],s)}};var E=class extends e{constructor([n,t,o],s){super(["evalsha",n,t.length,...t,...o??[]],s)}};var M=class extends e{constructor(n,t){super(["exists",...n],t)}};var v=class extends e{constructor(n,t){super(["expire",...n.filter(Boolean)],t)}};var P=class extends e{constructor(n,t){super(["expireat",...n],t)}};var I=class extends e{constructor(n,t){let o=["flushall"];n&&n.length>0&&n[0].async&&o.push("async"),super(o,t)}};var N=class extends e{constructor([n],t){let o=["flushdb"];n?.async&&o.push("async"),super(o,t)}};var L=class extends e{constructor([n,t,...o],s){let r=["geoadd",n];"nx"in t&&t.nx?r.push("nx"):"xx"in t&&t.xx&&r.push("xx"),"ch"in t&&t.ch&&r.push("ch"),"latitude"in t&&t.latitude&&r.push(t.longitude,t.latitude,t.member),r.push(...o.flatMap(({latitude:a,longitude:i,member:p})=>[i,a,p])),super(r,s)}};var K=class extends e{constructor([n,t,o,s="M"],r){super(["GEODIST",n,t,o,s],r)}};var z=class extends e{constructor(n,t){let[o]=n,s=Array.isArray(n[1])?n[1]:n.slice(1);super(["GEOHASH",o,...s],t)}};var G=class extends e{constructor(n,t){let[o]=n,s=Array.isArray(n[1])?n[1]:n.slice(1);super(["GEOPOS",o,...s],{deserialize:r=>Je(r),...t})}};function Je(m){let n=[];for(let t of m)!t?.[0]||!t?.[1]||n.push({lng:Number.parseFloat(t[0]),lat:Number.parseFloat(t[1])});return n}var X=class extends e{constructor([n,t,o,s,r],a){let i=["GEOSEARCH",n];(t.type==="FROMMEMBER"||t.type==="frommember")&&i.push(t.type,t.member),(t.type==="FROMLONLAT"||t.type==="fromlonlat")&&i.push(t.type,t.coordinate.lon,t.coordinate.lat),(o.type==="BYRADIUS"||o.type==="byradius")&&i.push(o.type,o.radius,o.radiusType),(o.type==="BYBOX"||o.type==="bybox")&&i.push(o.type,o.rect.width,o.rect.height,o.rectType),i.push(s),r?.count&&i.push("COUNT",r.count.limit,...r.count.any?["ANY"]:[]);let p=d=>!r?.withCoord&&!r?.withDist&&!r?.withHash?d.map(c=>{try{return{member:JSON.parse(c)}}catch{return{member:c}}}):d.map(c=>{let Ae=1,C={};try{C.member=JSON.parse(c[0])}catch{C.member=c[0]}return r.withDist&&(C.dist=Number.parseFloat(c[Ae++])),r.withHash&&(C.hash=c[Ae++].toString()),r.withCoord&&(C.coord={long:Number.parseFloat(c[Ae][0]),lat:Number.parseFloat(c[Ae][1])}),C});super([...i,...r?.withCoord?["WITHCOORD"]:[],...r?.withDist?["WITHDIST"]:[],...r?.withHash?["WITHHASH"]:[]],{deserialize:p,...a})}};var U=class extends e{constructor([n,t,o,s,r,a],i){let p=["GEOSEARCHSTORE",n,t];(o.type==="FROMMEMBER"||o.type==="frommember")&&p.push(o.type,o.member),(o.type==="FROMLONLAT"||o.type==="fromlonlat")&&p.push(o.type,o.coordinate.lon,o.coordinate.lat),(s.type==="BYRADIUS"||s.type==="byradius")&&p.push(s.type,s.radius,s.radiusType),(s.type==="BYBOX"||s.type==="bybox")&&p.push(s.type,s.rect.width,s.rect.height,s.rectType),p.push(r),a?.count&&p.push("COUNT",a.count.limit,...a.count.any?["ANY"]:[]),super([...p,...a?.storeDist?["STOREDIST"]:[]],i)}};var J=class extends e{constructor(n,t){super(["get",...n],t)}};var B=class extends e{constructor(n,t){super(["getbit",...n],t)}};var Z=class extends e{constructor(n,t){super(["getdel",...n],t)}};var H=class extends e{constructor(n,t){super(["getrange",...n],t)}};var F=class extends e{constructor(n,t){super(["getset",...n],t)}};var $=class extends e{constructor(n,t){super(["hdel",...n],t)}};var q=class extends e{constructor(n,t){super(["hexists",...n],t)}};var Y=class extends e{constructor(n,t){super(["hget",...n],t)}};function Be(m){if(m.length===0)return null;let n={};for(;m.length>=2;){let t=m.shift(),o=m.shift();try{let s=!Number.isNaN(Number(o))&&!Number.isSafeInteger(Number(o));n[t]=s?o:JSON.parse(o)}catch{n[t]=o}}return n}var j=class extends e{constructor(n,t){super(["hgetall",...n],{deserialize:o=>Be(o),...t})}};var W=class extends e{constructor(n,t){super(["hincrby",...n],t)}};var V=class extends e{constructor(n,t){super(["hincrbyfloat",...n],t)}};var _=class extends e{constructor([n],t){super(["hkeys",n],t)}};var Q=class extends e{constructor(n,t){super(["hlen",...n],t)}};function Ze(m,n){if(n.every(o=>o===null))return null;let t={};for(let[o,s]of m.entries())try{t[s]=JSON.parse(n[o])}catch{t[s]=n[o]}return t}var nn=class extends e{constructor([n,...t],o){super(["hmget",n,...t],{deserialize:s=>Ze(t,s),...o})}};var tn=class extends e{constructor([n,t],o){super(["hmset",n,...Object.entries(t).flatMap(([s,r])=>[s,r])],o)}};var en=class extends e{constructor([n,t,o],s){let r=["hscan",n,t];o?.match&&r.push("match",o.match),typeof o?.count=="number"&&r.push("count",o.count),super(r,{deserialize:h,...s})}};var on=class extends e{constructor([n,t],o){super(["hset",n,...Object.entries(t).flatMap(([s,r])=>[s,r])],o)}};var mn=class extends e{constructor(n,t){super(["hsetnx",...n],t)}};var sn=class extends e{constructor(n,t){super(["hstrlen",...n],t)}};var rn=class extends e{constructor(n,t){super(["hvals",...n],t)}};var an=class extends e{constructor(n,t){super(["incr",...n],t)}};var pn=class extends e{constructor(n,t){super(["incrby",...n],t)}};var dn=class extends e{constructor(n,t){super(["incrbyfloat",...n],t)}};var cn=class extends e{constructor(n,t){super(["JSON.ARRAPPEND",...n],t)}};var un=class extends e{constructor(n,t){super(["JSON.ARRINDEX",...n],t)}};var hn=class extends e{constructor(n,t){super(["JSON.ARRINSERT",...n],t)}};var ln=class extends e{constructor(n,t){super(["JSON.ARRLEN",n[0],n[1]??"$"],t)}};var Cn=class extends e{constructor(n,t){super(["JSON.ARRPOP",...n],t)}};var gn=class extends e{constructor(n,t){let o=n[1]??"$",s=n[2]??0,r=n[3]??0;super(["JSON.ARRTRIM",n[0],o,s,r],t)}};var fn=class extends e{constructor(n,t){super(["JSON.CLEAR",...n],t)}};var yn=class extends e{constructor(n,t){super(["JSON.DEL",...n],t)}};var xn=class extends e{constructor(n,t){super(["JSON.FORGET",...n],t)}};var bn=class extends e{constructor(n,t){let o=["JSON.GET"];typeof n[1]=="string"?o.push(...n):(o.push(n[0]),n[1]&&(n[1].indent&&o.push("INDENT",n[1].indent),n[1].newline&&o.push("NEWLINE",n[1].newline),n[1].space&&o.push("SPACE",n[1].space)),o.push(...n.slice(2))),super(o,t)}};var Tn=class extends e{constructor(n,t){super(["JSON.MGET",...n[0],n[1]],t)}};var On=class extends e{constructor(n,t){let o=["JSON.MSET"];for(let s of n)o.push(s.key,s.path,s.value);super(o,t)}};var wn=class extends e{constructor(n,t){super(["JSON.NUMINCRBY",...n],t)}};var Dn=class extends e{constructor(n,t){super(["JSON.NUMMULTBY",...n],t)}};var An=class extends e{constructor(n,t){super(["JSON.OBJKEYS",...n],t)}};var kn=class extends e{constructor(n,t){super(["JSON.OBJLEN",...n],t)}};var Rn=class extends e{constructor(n,t){super(["JSON.RESP",...n],t)}};var Sn=class extends e{constructor(n,t){let o=["JSON.SET",n[0],n[1],n[2]];n[3]&&(n[3].nx?o.push("NX"):n[3].xx&&o.push("XX")),super(o,t)}};var En=class extends e{constructor(n,t){super(["JSON.STRAPPEND",...n],t)}};var Mn=class extends e{constructor(n,t){super(["JSON.STRLEN",...n],t)}};var vn=class extends e{constructor(n,t){super(["JSON.TOGGLE",...n],t)}};var Pn=class extends e{constructor(n,t){super(["JSON.TYPE",...n],t)}};var In=class extends e{constructor(n,t){super(["keys",...n],t)}};var Nn=class extends e{constructor(n,t){super(["lindex",...n],t)}};var Ln=class extends e{constructor(n,t){super(["linsert",...n],t)}};var Kn=class extends e{constructor(n,t){super(["llen",...n],t)}};var zn=class extends e{constructor(n,t){super(["lmove",...n],t)}};var Gn=class extends e{constructor(n,t){let[o,s,r,a]=n;super(["LMPOP",o,...s,r,...a?["COUNT",a]:[]],t)}};var Xn=class extends e{constructor(n,t){super(["lpop",...n],t)}};var Un=class extends e{constructor(n,t){let o=["lpos",n[0],n[1]];typeof n[2]?.rank=="number"&&o.push("rank",n[2].rank),typeof n[2]?.count=="number"&&o.push("count",n[2].count),typeof n[2]?.maxLen=="number"&&o.push("maxLen",n[2].maxLen),super(o,t)}};var Jn=class extends e{constructor(n,t){super(["lpush",...n],t)}};var Bn=class extends e{constructor(n,t){super(["lpushx",...n],t)}};var Zn=class extends e{constructor(n,t){super(["lrange",...n],t)}};var Hn=class extends e{constructor(n,t){super(["lrem",...n],t)}};var Fn=class extends e{constructor(n,t){super(["lset",...n],t)}};var $n=class extends e{constructor(n,t){super(["ltrim",...n],t)}};var qn=class extends e{constructor(n,t){let o=Array.isArray(n[0])?n[0]:n;super(["mget",...o],t)}};var Yn=class extends e{constructor([n],t){super(["mset",...Object.entries(n).flatMap(([o,s])=>[o,s])],t)}};var jn=class extends e{constructor([n],t){super(["msetnx",...Object.entries(n).flat()],t)}};var Wn=class extends e{constructor(n,t){super(["persist",...n],t)}};var Vn=class extends e{constructor(n,t){super(["pexpire",...n],t)}};var _n=class extends e{constructor(n,t){super(["pexpireat",...n],t)}};var Qn=class extends e{constructor(n,t){super(["pfadd",...n],t)}};var nt=class extends e{constructor(n,t){super(["pfcount",...n],t)}};var tt=class extends e{constructor(n,t){super(["pfmerge",...n],t)}};var et=class extends e{constructor(n,t){let o=["ping"];n?.[0]!==void 0&&o.push(n[0]),super(o,t)}};var ot=class extends e{constructor(n,t){super(["psetex",...n],t)}};var mt=class extends e{constructor(n,t){super(["pttl",...n],t)}};var st=class extends e{constructor(n,t){super(["publish",...n],t)}};var rt=class extends e{constructor(n){super(["randomkey"],n)}};var at=class extends e{constructor(n,t){super(["rename",...n],t)}};var it=class extends e{constructor(n,t){super(["renamenx",...n],t)}};var pt=class extends e{constructor(n,t){super(["rpop",...n],t)}};var dt=class extends e{constructor(n,t){super(["rpush",...n],t)}};var ct=class extends e{constructor(n,t){super(["rpushx",...n],t)}};var ut=class extends e{constructor(n,t){super(["sadd",...n],t)}};var ht=class extends e{constructor([n,t],o){let s=["scan",n];t?.match&&s.push("match",t.match),typeof t?.count=="number"&&s.push("count",t.count),t?.type&&t.type.length>0&&s.push("type",t.type),super(s,{deserialize:h,...o})}};var lt=class extends e{constructor(n,t){super(["scard",...n],t)}};var Ct=class extends e{constructor(n,t){super(["script","exists",...n],{deserialize:o=>o,...t})}};var gt=class extends e{constructor([n],t){let o=["script","flush"];n?.sync?o.push("sync"):n?.async&&o.push("async"),super(o,t)}};var ft=class extends e{constructor(n,t){super(["script","load",...n],t)}};var yt=class extends e{constructor(n,t){super(["sdiff",...n],t)}};var xt=class extends e{constructor(n,t){super(["sdiffstore",...n],t)}};var bt=class extends e{constructor([n,t,o],s){let r=["set",n,t];o&&("nx"in o&&o.nx?r.push("nx"):"xx"in o&&o.xx&&r.push("xx"),"get"in o&&o.get&&r.push("get"),"ex"in o&&typeof o.ex=="number"?r.push("ex",o.ex):"px"in o&&typeof o.px=="number"?r.push("px",o.px):"exat"in o&&typeof o.exat=="number"?r.push("exat",o.exat):"pxat"in o&&typeof o.pxat=="number"?r.push("pxat",o.pxat):"keepTtl"in o&&o.keepTtl&&r.push("keepTtl")),super(r,s)}};var Tt=class extends e{constructor(n,t){super(["setbit",...n],t)}};var Ot=class extends e{constructor(n,t){super(["setex",...n],t)}};var wt=class extends e{constructor(n,t){super(["setnx",...n],t)}};var Dt=class extends e{constructor(n,t){super(["setrange",...n],t)}};var At=class extends e{constructor(n,t){super(["sinter",...n],t)}};var kt=class extends e{constructor(n,t){super(["sinterstore",...n],t)}};var Rt=class extends e{constructor(n,t){super(["sismember",...n],t)}};var St=class extends e{constructor(n,t){super(["smembers",...n],t)}};var Et=class extends e{constructor(n,t){super(["smismember",n[0],...n[1]],t)}};var Mt=class extends e{constructor(n,t){super(["smove",...n],t)}};var vt=class extends e{constructor([n,t],o){let s=["spop",n];typeof t=="number"&&s.push(t),super(s,o)}};var Pt=class extends e{constructor([n,t],o){let s=["srandmember",n];typeof t=="number"&&s.push(t),super(s,o)}};var It=class extends e{constructor(n,t){super(["srem",...n],t)}};var Nt=class extends e{constructor([n,t,o],s){let r=["sscan",n,t];o?.match&&r.push("match",o.match),typeof o?.count=="number"&&r.push("count",o.count),super(r,{deserialize:h,...s})}};var Lt=class extends e{constructor(n,t){super(["strlen",...n],t)}};var Kt=class extends e{constructor(n,t){super(["sunion",...n],t)}};var zt=class extends e{constructor(n,t){super(["sunionstore",...n],t)}};var Gt=class extends e{constructor(n){super(["time"],n)}};var Xt=class extends e{constructor(n,t){super(["touch",...n],t)}};var Ut=class extends e{constructor(n,t){super(["ttl",...n],t)}};var Jt=class extends e{constructor(n,t){super(["type",...n],t)}};var Bt=class extends e{constructor(n,t){super(["unlink",...n],t)}};var Zt=class extends e{constructor([n,t,o],s){let r=Array.isArray(o)?[...o]:[o];super(["XACK",n,t,...r],s)}};var Ht=class extends e{constructor([n,t,o,s],r){let a=["XADD",n];s&&(s.nomkStream&&a.push("NOMKSTREAM"),s.trim&&(a.push(s.trim.type,s.trim.comparison,s.trim.threshold),s.trim.limit!==void 0&&a.push("LIMIT",s.trim.limit))),a.push(t);for(let[i,p]of Object.entries(o))a.push(i,p);super(a,r)}};var Ft=class extends e{constructor([n,t,o,s,r,a],i){let p=[];a?.count&&p.push("COUNT",a.count),a?.justId&&p.push("JUSTID"),super(["XAUTOCLAIM",n,t,o,s,r,...p],i)}};var $t=class extends e{constructor([n,t,o,s,r,a],i){let p=Array.isArray(r)?[...r]:[r],d=[];a?.idleMS&&d.push("IDLE",a.idleMS),a?.idleMS&&d.push("TIME",a.timeMS),a?.retryCount&&d.push("RETRYCOUNT",a.retryCount),a?.force&&d.push("FORCE"),a?.justId&&d.push("JUSTID"),a?.lastId&&d.push("LASTID",a.lastId),super(["XCLAIM",n,t,o,s,...p,...d],i)}};var qt=class extends e{constructor([n,t],o){let s=Array.isArray(t)?[...t]:[t];super(["XDEL",n,...s],o)}};var Yt=class extends e{constructor([n,t],o){let s=["XGROUP"];switch(t.type){case"CREATE":{s.push("CREATE",n,t.group,t.id),t.options&&(t.options.MKSTREAM&&s.push("MKSTREAM"),t.options.ENTRIESREAD!==void 0&&s.push("ENTRIESREAD",t.options.ENTRIESREAD.toString()));break}case"CREATECONSUMER":{s.push("CREATECONSUMER",n,t.group,t.consumer);break}case"DELCONSUMER":{s.push("DELCONSUMER",n,t.group,t.consumer);break}case"DESTROY":{s.push("DESTROY",n,t.group);break}case"SETID":{s.push("SETID",n,t.group,t.id),t.options?.ENTRIESREAD!==void 0&&s.push("ENTRIESREAD",t.options.ENTRIESREAD.toString());break}default:throw new Error("Invalid XGROUP")}super(s,o)}};var jt=class extends e{constructor([n,t],o){let s=[];t.type==="CONSUMERS"?s.push("CONSUMERS",n,t.group):s.push("GROUPS",n),super(["XINFO",...s],o)}};var Wt=class extends e{constructor(n,t){super(["XLEN",...n],t)}};var Vt=class extends e{constructor([n,t,o,s,r,a],i){let p=a?.consumer===void 0?[]:Array.isArray(a.consumer)?[...a.consumer]:[a.consumer];super(["XPENDING",n,t,...a?.idleTime?["IDLE",a.idleTime]:[],o,s,r,...p],i)}};function He(m){let n={};for(let t of m)for(;t.length>=2;){let o=t.shift(),s=t.shift();for((o in n)||(n[o]={});s.length>=2;){let r=s.shift(),a=s.shift();try{n[o][r]=JSON.parse(a)}catch{n[o][r]=a}}}return n}var _t=class extends e{constructor([n,t,o,s],r){let a=["XRANGE",n,t,o];typeof s=="number"&&a.push("COUNT",s),super(a,{deserialize:i=>He(i),...r})}};var Fe="ERR Unbalanced XREAD list of streams: for each stream key an ID or '$' must be specified",Qt=class extends e{constructor([n,t,o],s){if(Array.isArray(n)&&Array.isArray(t)&&n.length!==t.length)throw new Error(Fe);let r=[];typeof o?.count=="number"&&r.push("COUNT",o.count),typeof o?.blockMS=="number"&&r.push("BLOCK",o.blockMS),r.push("STREAMS",...Array.isArray(n)?[...n]:[n],...Array.isArray(t)?[...t]:[t]),super(["XREAD",...r],s)}};var $e="ERR Unbalanced XREADGROUP list of streams: for each stream key an ID or '$' must be specified",ne=class extends e{constructor([n,t,o,s,r],a){if(Array.isArray(o)&&Array.isArray(s)&&o.length!==s.length)throw new Error($e);let i=[];typeof r?.count=="number"&&i.push("COUNT",r.count),typeof r?.blockMS=="number"&&i.push("BLOCK",r.blockMS),typeof r?.NOACK=="boolean"&&r.NOACK&&i.push("NOACK"),i.push("STREAMS",...Array.isArray(o)?[...o]:[o],...Array.isArray(s)?[...s]:[s]),super(["XREADGROUP","GROUP",n,t,...i],a)}};var te=class extends e{constructor([n,t,o,s],r){let a=["XREVRANGE",n,t,o];typeof s=="number"&&a.push("COUNT",s),super(a,{deserialize:i=>qe(i),...r})}};function qe(m){let n={};for(let t of m)for(;t.length>=2;){let o=t.shift(),s=t.shift();for((o in n)||(n[o]={});s.length>=2;){let r=s.shift(),a=s.shift();try{n[o][r]=JSON.parse(a)}catch{n[o][r]=a}}}return n}var ee=class extends e{constructor([n,t],o){let{limit:s,strategy:r,threshold:a,exactness:i="~"}=t;super(["XTRIM",n,r,i,a,...s?["LIMIT",s]:[]],o)}};var l=class extends e{constructor([n,t,...o],s){let r=["zadd",n];"nx"in t&&t.nx?r.push("nx"):"xx"in t&&t.xx&&r.push("xx"),"ch"in t&&t.ch&&r.push("ch"),"incr"in t&&t.incr&&r.push("incr"),"lt"in t&&t.lt?r.push("lt"):"gt"in t&&t.gt&&r.push("gt"),"score"in t&&"member"in t&&r.push(t.score,t.member),r.push(...o.flatMap(({score:a,member:i})=>[a,i])),super(r,s)}};var oe=class extends e{constructor(n,t){super(["zcard",...n],t)}};var me=class extends e{constructor(n,t){super(["zcount",...n],t)}};var se=class extends e{constructor(n,t){super(["zincrby",...n],t)}};var re=class extends e{constructor([n,t,o,s],r){let a=["zinterstore",n,t];Array.isArray(o)?a.push(...o):a.push(o),s&&("weights"in s&&s.weights?a.push("weights",...s.weights):"weight"in s&&typeof s.weight=="number"&&a.push("weights",s.weight),"aggregate"in s&&a.push("aggregate",s.aggregate)),super(a,r)}};var ae=class extends e{constructor(n,t){super(["zlexcount",...n],t)}};var ie=class extends e{constructor([n,t],o){let s=["zpopmax",n];typeof t=="number"&&s.push(t),super(s,o)}};var pe=class extends e{constructor([n,t],o){let s=["zpopmin",n];typeof t=="number"&&s.push(t),super(s,o)}};var de=class extends e{constructor([n,t,o,s],r){let a=["zrange",n,t,o];s?.byScore&&a.push("byscore"),s?.byLex&&a.push("bylex"),s?.rev&&a.push("rev"),s?.count!==void 0&&s.offset!==void 0&&a.push("limit",s.offset,s.count),s?.withScores&&a.push("withscores"),super(a,r)}};var ce=class extends e{constructor(n,t){super(["zrank",...n],t)}};var ue=class extends e{constructor(n,t){super(["zrem",...n],t)}};var he=class extends e{constructor(n,t){super(["zremrangebylex",...n],t)}};var le=class extends e{constructor(n,t){super(["zremrangebyrank",...n],t)}};var Ce=class extends e{constructor(n,t){super(["zremrangebyscore",...n],t)}};var ge=class extends e{constructor(n,t){super(["zrevrank",...n],t)}};var fe=class extends e{constructor([n,t,o],s){let r=["zscan",n,t];o?.match&&r.push("match",o.match),typeof o?.count=="number"&&r.push("count",o.count),super(r,{deserialize:h,...s})}};var ye=class extends e{constructor(n,t){super(["zscore",...n],t)}};var xe=class extends e{constructor([n,t,o],s){let r=["zunion",n];Array.isArray(t)?r.push(...t):r.push(t),o&&("weights"in o&&o.weights?r.push("weights",...o.weights):"weight"in o&&typeof o.weight=="number"&&r.push("weights",o.weight),"aggregate"in o&&r.push("aggregate",o.aggregate),o.withScores&&r.push("withscores")),super(r,s)}};var be=class extends e{constructor([n,t,o,s],r){let a=["zunionstore",n,t];Array.isArray(o)?a.push(...o):a.push(o),s&&("weights"in s&&s.weights?a.push("weights",...s.weights):"weight"in s&&typeof s.weight=="number"&&a.push("weights",s.weight),"aggregate"in s&&a.push("aggregate",s.aggregate)),super(a,r)}};var Te=class extends e{constructor(n,t){super(["zdiffstore",...n],t)}};var Oe=class extends e{constructor(n,t){let[o,s]=n;super(["zmscore",o,...s],t)}};var De=class{client;commands;commandOptions;multiExec;constructor(n){if(this.client=n.client,this.commands=[],this.commandOptions=n.commandOptions,this.multiExec=n.multiExec??!1,this.commandOptions?.latencyLogging){let t=this.exec.bind(this);this.exec=async()=>{let o=performance.now(),s=await t(),a=(performance.now()-o).toFixed(2);return console.log(`Latency for \x1B[38;2;19;185;39m${this.multiExec?["MULTI-EXEC"]:["PIPELINE"].toString().toUpperCase()}\x1B[0m: \x1B[38;2;0;255;255m${a} ms\x1B[0m`),s}}}exec=async()=>{if(this.commands.length===0)throw new Error("Pipeline is empty");let n=this.multiExec?["multi-exec"]:["pipeline"];return(await this.client.request({path:n,body:Object.values(this.commands).map(o=>o.command)})).map(({error:o,result:s},r)=>{if(o)throw new u(`Command ${r+1} [ ${this.commands[r].command[0]} ] failed: ${o}`);return this.commands[r].deserialize(s)})};length(){return this.commands.length}chain(n){return this.commands.push(n),this}append=(...n)=>this.chain(new f(n,this.commandOptions));bitcount=(...n)=>this.chain(new y(n,this.commandOptions));bitfield=(...n)=>new x(n,this.client,this.commandOptions,this.chain.bind(this));bitop=(n,t,o,...s)=>this.chain(new b([n,t,o,...s],this.commandOptions));bitpos=(...n)=>this.chain(new T(n,this.commandOptions));copy=(...n)=>this.chain(new O(n,this.commandOptions));zdiffstore=(...n)=>this.chain(new Te(n,this.commandOptions));dbsize=()=>this.chain(new w(this.commandOptions));decr=(...n)=>this.chain(new D(n,this.commandOptions));decrby=(...n)=>this.chain(new A(n,this.commandOptions));del=(...n)=>this.chain(new k(n,this.commandOptions));echo=(...n)=>this.chain(new R(n,this.commandOptions));eval=(...n)=>this.chain(new S(n,this.commandOptions));evalsha=(...n)=>this.chain(new E(n,this.commandOptions));exists=(...n)=>this.chain(new M(n,this.commandOptions));expire=(...n)=>this.chain(new v(n,this.commandOptions));expireat=(...n)=>this.chain(new P(n,this.commandOptions));flushall=n=>this.chain(new I(n,this.commandOptions));flushdb=(...n)=>this.chain(new N(n,this.commandOptions));geoadd=(...n)=>this.chain(new L(n,this.commandOptions));geodist=(...n)=>this.chain(new K(n,this.commandOptions));geopos=(...n)=>this.chain(new G(n,this.commandOptions));geohash=(...n)=>this.chain(new z(n,this.commandOptions));geosearch=(...n)=>this.chain(new X(n,this.commandOptions));geosearchstore=(...n)=>this.chain(new U(n,this.commandOptions));get=(...n)=>this.chain(new J(n,this.commandOptions));getbit=(...n)=>this.chain(new B(n,this.commandOptions));getdel=(...n)=>this.chain(new Z(n,this.commandOptions));getrange=(...n)=>this.chain(new H(n,this.commandOptions));getset=(n,t)=>this.chain(new F([n,t],this.commandOptions));hdel=(...n)=>this.chain(new $(n,this.commandOptions));hexists=(...n)=>this.chain(new q(n,this.commandOptions));hget=(...n)=>this.chain(new Y(n,this.commandOptions));hgetall=(...n)=>this.chain(new j(n,this.commandOptions));hincrby=(...n)=>this.chain(new W(n,this.commandOptions));hincrbyfloat=(...n)=>this.chain(new V(n,this.commandOptions));hkeys=(...n)=>this.chain(new _(n,this.commandOptions));hlen=(...n)=>this.chain(new Q(n,this.commandOptions));hmget=(...n)=>this.chain(new nn(n,this.commandOptions));hmset=(n,t)=>this.chain(new tn([n,t],this.commandOptions));hrandfield=(n,t,o)=>this.chain(new g([n,t,o],this.commandOptions));hscan=(...n)=>this.chain(new en(n,this.commandOptions));hset=(n,t)=>this.chain(new on([n,t],this.commandOptions));hsetnx=(n,t,o)=>this.chain(new mn([n,t,o],this.commandOptions));hstrlen=(...n)=>this.chain(new sn(n,this.commandOptions));hvals=(...n)=>this.chain(new rn(n,this.commandOptions));incr=(...n)=>this.chain(new an(n,this.commandOptions));incrby=(...n)=>this.chain(new pn(n,this.commandOptions));incrbyfloat=(...n)=>this.chain(new dn(n,this.commandOptions));keys=(...n)=>this.chain(new In(n,this.commandOptions));lindex=(...n)=>this.chain(new Nn(n,this.commandOptions));linsert=(n,t,o,s)=>this.chain(new Ln([n,t,o,s],this.commandOptions));llen=(...n)=>this.chain(new Kn(n,this.commandOptions));lmove=(...n)=>this.chain(new zn(n,this.commandOptions));lpop=(...n)=>this.chain(new Xn(n,this.commandOptions));lmpop=(...n)=>this.chain(new Gn(n,this.commandOptions));lpos=(...n)=>this.chain(new Un(n,this.commandOptions));lpush=(n,...t)=>this.chain(new Jn([n,...t],this.commandOptions));lpushx=(n,...t)=>this.chain(new Bn([n,...t],this.commandOptions));lrange=(...n)=>this.chain(new Zn(n,this.commandOptions));lrem=(n,t,o)=>this.chain(new Hn([n,t,o],this.commandOptions));lset=(n,t,o)=>this.chain(new Fn([n,t,o],this.commandOptions));ltrim=(...n)=>this.chain(new $n(n,this.commandOptions));mget=(...n)=>this.chain(new qn(n,this.commandOptions));mset=n=>this.chain(new Yn([n],this.commandOptions));msetnx=n=>this.chain(new jn([n],this.commandOptions));persist=(...n)=>this.chain(new Wn(n,this.commandOptions));pexpire=(...n)=>this.chain(new Vn(n,this.commandOptions));pexpireat=(...n)=>this.chain(new _n(n,this.commandOptions));pfadd=(...n)=>this.chain(new Qn(n,this.commandOptions));pfcount=(...n)=>this.chain(new nt(n,this.commandOptions));pfmerge=(...n)=>this.chain(new tt(n,this.commandOptions));ping=n=>this.chain(new et(n,this.commandOptions));psetex=(n,t,o)=>this.chain(new ot([n,t,o],this.commandOptions));pttl=(...n)=>this.chain(new mt(n,this.commandOptions));publish=(...n)=>this.chain(new st(n,this.commandOptions));randomkey=()=>this.chain(new rt(this.commandOptions));rename=(...n)=>this.chain(new at(n,this.commandOptions));renamenx=(...n)=>this.chain(new it(n,this.commandOptions));rpop=(...n)=>this.chain(new pt(n,this.commandOptions));rpush=(n,...t)=>this.chain(new dt([n,...t],this.commandOptions));rpushx=(n,...t)=>this.chain(new ct([n,...t],this.commandOptions));sadd=(n,t,...o)=>this.chain(new ut([n,t,...o],this.commandOptions));scan=(...n)=>this.chain(new ht(n,this.commandOptions));scard=(...n)=>this.chain(new lt(n,this.commandOptions));scriptExists=(...n)=>this.chain(new Ct(n,this.commandOptions));scriptFlush=(...n)=>this.chain(new gt(n,this.commandOptions));scriptLoad=(...n)=>this.chain(new ft(n,this.commandOptions));sdiff=(...n)=>this.chain(new yt(n,this.commandOptions));sdiffstore=(...n)=>this.chain(new xt(n,this.commandOptions));set=(n,t,o)=>this.chain(new bt([n,t,o],this.commandOptions));setbit=(...n)=>this.chain(new Tt(n,this.commandOptions));setex=(n,t,o)=>this.chain(new Ot([n,t,o],this.commandOptions));setnx=(n,t)=>this.chain(new wt([n,t],this.commandOptions));setrange=(...n)=>this.chain(new Dt(n,this.commandOptions));sinter=(...n)=>this.chain(new At(n,this.commandOptions));sinterstore=(...n)=>this.chain(new kt(n,this.commandOptions));sismember=(n,t)=>this.chain(new Rt([n,t],this.commandOptions));smembers=(...n)=>this.chain(new St(n,this.commandOptions));smismember=(n,t)=>this.chain(new Et([n,t],this.commandOptions));smove=(n,t,o)=>this.chain(new Mt([n,t,o],this.commandOptions));spop=(...n)=>this.chain(new vt(n,this.commandOptions));srandmember=(...n)=>this.chain(new Pt(n,this.commandOptions));srem=(n,...t)=>this.chain(new It([n,...t],this.commandOptions));sscan=(...n)=>this.chain(new Nt(n,this.commandOptions));strlen=(...n)=>this.chain(new Lt(n,this.commandOptions));sunion=(...n)=>this.chain(new Kt(n,this.commandOptions));sunionstore=(...n)=>this.chain(new zt(n,this.commandOptions));time=()=>this.chain(new Gt(this.commandOptions));touch=(...n)=>this.chain(new Xt(n,this.commandOptions));ttl=(...n)=>this.chain(new Ut(n,this.commandOptions));type=(...n)=>this.chain(new Jt(n,this.commandOptions));unlink=(...n)=>this.chain(new Bt(n,this.commandOptions));zadd=(...n)=>"score"in n[1]?this.chain(new l([n[0],n[1],...n.slice(2)],this.commandOptions)):this.chain(new l([n[0],n[1],...n.slice(2)],this.commandOptions));xadd=(...n)=>this.chain(new Ht(n,this.commandOptions));xack=(...n)=>this.chain(new Zt(n,this.commandOptions));xdel=(...n)=>this.chain(new qt(n,this.commandOptions));xgroup=(...n)=>this.chain(new Yt(n,this.commandOptions));xread=(...n)=>this.chain(new Qt(n,this.commandOptions));xreadgroup=(...n)=>this.chain(new ne(n,this.commandOptions));xinfo=(...n)=>this.chain(new jt(n,this.commandOptions));xlen=(...n)=>this.chain(new Wt(n,this.commandOptions));xpending=(...n)=>this.chain(new Vt(n,this.commandOptions));xclaim=(...n)=>this.chain(new $t(n,this.commandOptions));xautoclaim=(...n)=>this.chain(new Ft(n,this.commandOptions));xtrim=(...n)=>this.chain(new ee(n,this.commandOptions));xrange=(...n)=>this.chain(new _t(n,this.commandOptions));xrevrange=(...n)=>this.chain(new te(n,this.commandOptions));zcard=(...n)=>this.chain(new oe(n,this.commandOptions));zcount=(...n)=>this.chain(new me(n,this.commandOptions));zincrby=(n,t,o)=>this.chain(new se([n,t,o],this.commandOptions));zinterstore=(...n)=>this.chain(new re(n,this.commandOptions));zlexcount=(...n)=>this.chain(new ae(n,this.commandOptions));zmscore=(...n)=>this.chain(new Oe(n,this.commandOptions));zpopmax=(...n)=>this.chain(new ie(n,this.commandOptions));zpopmin=(...n)=>this.chain(new pe(n,this.commandOptions));zrange=(...n)=>this.chain(new de(n,this.commandOptions));zrank=(n,t)=>this.chain(new ce([n,t],this.commandOptions));zrem=(n,...t)=>this.chain(new ue([n,...t],this.commandOptions));zremrangebylex=(...n)=>this.chain(new he(n,this.commandOptions));zremrangebyrank=(...n)=>this.chain(new le(n,this.commandOptions));zremrangebyscore=(...n)=>this.chain(new Ce(n,this.commandOptions));zrevrank=(n,t)=>this.chain(new ge([n,t],this.commandOptions));zscan=(...n)=>this.chain(new fe(n,this.commandOptions));zscore=(n,t)=>this.chain(new ye([n,t],this.commandOptions));zunionstore=(...n)=>this.chain(new be(n,this.commandOptions));zunion=(...n)=>this.chain(new xe(n,this.commandOptions));get json(){return{arrappend:(...n)=>this.chain(new cn(n,this.commandOptions)),arrindex:(...n)=>this.chain(new un(n,this.commandOptions)),arrinsert:(...n)=>this.chain(new hn(n,this.commandOptions)),arrlen:(...n)=>this.chain(new ln(n,this.commandOptions)),arrpop:(...n)=>this.chain(new Cn(n,this.commandOptions)),arrtrim:(...n)=>this.chain(new gn(n,this.commandOptions)),clear:(...n)=>this.chain(new fn(n,this.commandOptions)),del:(...n)=>this.chain(new yn(n,this.commandOptions)),forget:(...n)=>this.chain(new xn(n,this.commandOptions)),get:(...n)=>this.chain(new bn(n,this.commandOptions)),mget:(...n)=>this.chain(new Tn(n,this.commandOptions)),mset:(...n)=>this.chain(new On(n,this.commandOptions)),numincrby:(...n)=>this.chain(new wn(n,this.commandOptions)),nummultby:(...n)=>this.chain(new Dn(n,this.commandOptions)),objkeys:(...n)=>this.chain(new An(n,this.commandOptions)),objlen:(...n)=>this.chain(new kn(n,this.commandOptions)),resp:(...n)=>this.chain(new Rn(n,this.commandOptions)),set:(...n)=>this.chain(new Sn(n,this.commandOptions)),strappend:(...n)=>this.chain(new En(n,this.commandOptions)),strlen:(...n)=>this.chain(new Mn(n,this.commandOptions)),toggle:(...n)=>this.chain(new vn(n,this.commandOptions)),type:(...n)=>this.chain(new Pn(n,this.commandOptions))}}};function ve(m,n){let t=m;return t.autoPipelineExecutor||(t.autoPipelineExecutor=new Me(t)),new Proxy(t,{get:(o,s)=>s==="pipelineCounter"?o.autoPipelineExecutor.pipelineCounter:s==="json"?ve(o,!0):s in o&&!(s in o.autoPipelineExecutor.pipeline)?o[s]:(n?typeof o.autoPipelineExecutor.pipeline.json[s]=="function":typeof o.autoPipelineExecutor.pipeline[s]=="function")?(...i)=>o.autoPipelineExecutor.withAutoPipeline(p=>{n?p.json[s](...i):p[s](...i)}):o.autoPipelineExecutor.pipeline[s]})}var Me=class{pipelinePromises=new WeakMap;activePipeline=null;indexInCurrentPipeline=0;redis;pipeline;pipelineCounter=0;constructor(n){this.redis=n,this.pipeline=n.pipeline()}async withAutoPipeline(n){let t=this.activePipeline??this.redis.pipeline();this.activePipeline||(this.activePipeline=t,this.indexInCurrentPipeline=0);let o=this.indexInCurrentPipeline++;return n(t),(await this.deferExecution().then(()=>{if(!this.pipelinePromises.has(t)){let a=t.exec();this.pipelineCounter+=1,this.pipelinePromises.set(t,a),this.activePipeline=null}return this.pipelinePromises.get(t)}))[o]}async deferExecution(){await Promise.resolve(),await Promise.resolve()}};import Ye from"crypto-js/enc-hex.js";import je from"crypto-js/sha1.js";var ke=class{script;sha1;redis;constructor(n,t){this.redis=n,this.sha1=this.digest(t),this.script=t}async eval(n,t){return await this.redis.eval(this.script,n,t)}async evalsha(n,t){return await this.redis.evalsha(this.sha1,n,t)}async exec(n,t){return await this.redis.evalsha(this.sha1,n,t).catch(async s=>{if(s instanceof Error&&s.message.toLowerCase().includes("noscript"))return await this.redis.eval(this.script,n,t);throw s})}digest(n){return Ye.stringify(je(n))}};var Le=class{client;opts;enableTelemetry;enableAutoPipelining;constructor(n,t){this.client=n,this.opts=t,this.enableTelemetry=t?.enableTelemetry??!0,t?.readYourWrites===!1&&(this.client.readYourWrites=!1),this.enableAutoPipelining=t?.enableAutoPipelining??!0}get json(){return{arrappend:(...n)=>new cn(n,this.opts).exec(this.client),arrindex:(...n)=>new un(n,this.opts).exec(this.client),arrinsert:(...n)=>new hn(n,this.opts).exec(this.client),arrlen:(...n)=>new ln(n,this.opts).exec(this.client),arrpop:(...n)=>new Cn(n,this.opts).exec(this.client),arrtrim:(...n)=>new gn(n,this.opts).exec(this.client),clear:(...n)=>new fn(n,this.opts).exec(this.client),del:(...n)=>new yn(n,this.opts).exec(this.client),forget:(...n)=>new xn(n,this.opts).exec(this.client),get:(...n)=>new bn(n,this.opts).exec(this.client),mget:(...n)=>new Tn(n,this.opts).exec(this.client),mset:(...n)=>new On(n,this.opts).exec(this.client),numincrby:(...n)=>new wn(n,this.opts).exec(this.client),nummultby:(...n)=>new Dn(n,this.opts).exec(this.client),objkeys:(...n)=>new An(n,this.opts).exec(this.client),objlen:(...n)=>new kn(n,this.opts).exec(this.client),resp:(...n)=>new Rn(n,this.opts).exec(this.client),set:(...n)=>new Sn(n,this.opts).exec(this.client),strappend:(...n)=>new En(n,this.opts).exec(this.client),strlen:(...n)=>new Mn(n,this.opts).exec(this.client),toggle:(...n)=>new vn(n,this.opts).exec(this.client),type:(...n)=>new Pn(n,this.opts).exec(this.client)}}use=n=>{let t=this.client.request.bind(this.client);this.client.request=o=>n(o,t)};addTelemetry=n=>{if(this.enableTelemetry)try{this.client.mergeTelemetry(n)}catch{}};createScript(n){return new ke(this,n)}pipeline=()=>new De({client:this.client,commandOptions:this.opts,multiExec:!1});autoPipeline=()=>ve(this);multi=()=>new De({client:this.client,commandOptions:this.opts,multiExec:!0});bitfield=(...n)=>new x(n,this.client,this.opts);append=(...n)=>new f(n,this.opts).exec(this.client);bitcount=(...n)=>new y(n,this.opts).exec(this.client);bitop=(n,t,o,...s)=>new b([n,t,o,...s],this.opts).exec(this.client);bitpos=(...n)=>new T(n,this.opts).exec(this.client);copy=(...n)=>new O(n,this.opts).exec(this.client);dbsize=()=>new w(this.opts).exec(this.client);decr=(...n)=>new D(n,this.opts).exec(this.client);decrby=(...n)=>new A(n,this.opts).exec(this.client);del=(...n)=>new k(n,this.opts).exec(this.client);echo=(...n)=>new R(n,this.opts).exec(this.client);eval=(...n)=>new S(n,this.opts).exec(this.client);evalsha=(...n)=>new E(n,this.opts).exec(this.client);exists=(...n)=>new M(n,this.opts).exec(this.client);expire=(...n)=>new v(n,this.opts).exec(this.client);expireat=(...n)=>new P(n,this.opts).exec(this.client);flushall=n=>new I(n,this.opts).exec(this.client);flushdb=(...n)=>new N(n,this.opts).exec(this.client);geoadd=(...n)=>new L(n,this.opts).exec(this.client);geopos=(...n)=>new G(n,this.opts).exec(this.client);geodist=(...n)=>new K(n,this.opts).exec(this.client);geohash=(...n)=>new z(n,this.opts).exec(this.client);geosearch=(...n)=>new X(n,this.opts).exec(this.client);geosearchstore=(...n)=>new U(n,this.opts).exec(this.client);get=(...n)=>new J(n,this.opts).exec(this.client);getbit=(...n)=>new B(n,this.opts).exec(this.client);getdel=(...n)=>new Z(n,this.opts).exec(this.client);getrange=(...n)=>new H(n,this.opts).exec(this.client);getset=(n,t)=>new F([n,t],this.opts).exec(this.client);hdel=(...n)=>new $(n,this.opts).exec(this.client);hexists=(...n)=>new q(n,this.opts).exec(this.client);hget=(...n)=>new Y(n,this.opts).exec(this.client);hgetall=(...n)=>new j(n,this.opts).exec(this.client);hincrby=(...n)=>new W(n,this.opts).exec(this.client);hincrbyfloat=(...n)=>new V(n,this.opts).exec(this.client);hkeys=(...n)=>new _(n,this.opts).exec(this.client);hlen=(...n)=>new Q(n,this.opts).exec(this.client);hmget=(...n)=>new nn(n,this.opts).exec(this.client);hmset=(n,t)=>new tn([n,t],this.opts).exec(this.client);hrandfield=(n,t,o)=>new g([n,t,o],this.opts).exec(this.client);hscan=(...n)=>new en(n,this.opts).exec(this.client);hset=(n,t)=>new on([n,t],this.opts).exec(this.client);hsetnx=(n,t,o)=>new mn([n,t,o],this.opts).exec(this.client);hstrlen=(...n)=>new sn(n,this.opts).exec(this.client);hvals=(...n)=>new rn(n,this.opts).exec(this.client);incr=(...n)=>new an(n,this.opts).exec(this.client);incrby=(...n)=>new pn(n,this.opts).exec(this.client);incrbyfloat=(...n)=>new dn(n,this.opts).exec(this.client);keys=(...n)=>new In(n,this.opts).exec(this.client);lindex=(...n)=>new Nn(n,this.opts).exec(this.client);linsert=(n,t,o,s)=>new Ln([n,t,o,s],this.opts).exec(this.client);llen=(...n)=>new Kn(n,this.opts).exec(this.client);lmove=(...n)=>new zn(n,this.opts).exec(this.client);lpop=(...n)=>new Xn(n,this.opts).exec(this.client);lmpop=(...n)=>new Gn(n,this.opts).exec(this.client);lpos=(...n)=>new Un(n,this.opts).exec(this.client);lpush=(n,...t)=>new Jn([n,...t],this.opts).exec(this.client);lpushx=(n,...t)=>new Bn([n,...t],this.opts).exec(this.client);lrange=(...n)=>new Zn(n,this.opts).exec(this.client);lrem=(n,t,o)=>new Hn([n,t,o],this.opts).exec(this.client);lset=(n,t,o)=>new Fn([n,t,o],this.opts).exec(this.client);ltrim=(...n)=>new $n(n,this.opts).exec(this.client);mget=(...n)=>new qn(n,this.opts).exec(this.client);mset=n=>new Yn([n],this.opts).exec(this.client);msetnx=n=>new jn([n],this.opts).exec(this.client);persist=(...n)=>new Wn(n,this.opts).exec(this.client);pexpire=(...n)=>new Vn(n,this.opts).exec(this.client);pexpireat=(...n)=>new _n(n,this.opts).exec(this.client);pfadd=(...n)=>new Qn(n,this.opts).exec(this.client);pfcount=(...n)=>new nt(n,this.opts).exec(this.client);pfmerge=(...n)=>new tt(n,this.opts).exec(this.client);ping=n=>new et(n,this.opts).exec(this.client);psetex=(n,t,o)=>new ot([n,t,o],this.opts).exec(this.client);pttl=(...n)=>new mt(n,this.opts).exec(this.client);publish=(...n)=>new st(n,this.opts).exec(this.client);randomkey=()=>new rt().exec(this.client);rename=(...n)=>new at(n,this.opts).exec(this.client);renamenx=(...n)=>new it(n,this.opts).exec(this.client);rpop=(...n)=>new pt(n,this.opts).exec(this.client);rpush=(n,...t)=>new dt([n,...t],this.opts).exec(this.client);rpushx=(n,...t)=>new ct([n,...t],this.opts).exec(this.client);sadd=(n,t,...o)=>new ut([n,t,...o],this.opts).exec(this.client);scan=(...n)=>new ht(n,this.opts).exec(this.client);scard=(...n)=>new lt(n,this.opts).exec(this.client);scriptExists=(...n)=>new Ct(n,this.opts).exec(this.client);scriptFlush=(...n)=>new gt(n,this.opts).exec(this.client);scriptLoad=(...n)=>new ft(n,this.opts).exec(this.client);sdiff=(...n)=>new yt(n,this.opts).exec(this.client);sdiffstore=(...n)=>new xt(n,this.opts).exec(this.client);set=(n,t,o)=>new bt([n,t,o],this.opts).exec(this.client);setbit=(...n)=>new Tt(n,this.opts).exec(this.client);setex=(n,t,o)=>new Ot([n,t,o],this.opts).exec(this.client);setnx=(n,t)=>new wt([n,t],this.opts).exec(this.client);setrange=(...n)=>new Dt(n,this.opts).exec(this.client);sinter=(...n)=>new At(n,this.opts).exec(this.client);sinterstore=(...n)=>new kt(n,this.opts).exec(this.client);sismember=(n,t)=>new Rt([n,t],this.opts).exec(this.client);smismember=(n,t)=>new Et([n,t],this.opts).exec(this.client);smembers=(...n)=>new St(n,this.opts).exec(this.client);smove=(n,t,o)=>new Mt([n,t,o],this.opts).exec(this.client);spop=(...n)=>new vt(n,this.opts).exec(this.client);srandmember=(...n)=>new Pt(n,this.opts).exec(this.client);srem=(n,...t)=>new It([n,...t],this.opts).exec(this.client);sscan=(...n)=>new Nt(n,this.opts).exec(this.client);strlen=(...n)=>new Lt(n,this.opts).exec(this.client);sunion=(...n)=>new Kt(n,this.opts).exec(this.client);sunionstore=(...n)=>new zt(n,this.opts).exec(this.client);time=()=>new Gt().exec(this.client);touch=(...n)=>new Xt(n,this.opts).exec(this.client);ttl=(...n)=>new Ut(n,this.opts).exec(this.client);type=(...n)=>new Jt(n,this.opts).exec(this.client);unlink=(...n)=>new Bt(n,this.opts).exec(this.client);xadd=(...n)=>new Ht(n,this.opts).exec(this.client);xack=(...n)=>new Zt(n,this.opts).exec(this.client);xdel=(...n)=>new qt(n,this.opts).exec(this.client);xgroup=(...n)=>new Yt(n,this.opts).exec(this.client);xread=(...n)=>new Qt(n,this.opts).exec(this.client);xreadgroup=(...n)=>new ne(n,this.opts).exec(this.client);xinfo=(...n)=>new jt(n,this.opts).exec(this.client);xlen=(...n)=>new Wt(n,this.opts).exec(this.client);xpending=(...n)=>new Vt(n,this.opts).exec(this.client);xclaim=(...n)=>new $t(n,this.opts).exec(this.client);xautoclaim=(...n)=>new Ft(n,this.opts).exec(this.client);xtrim=(...n)=>new ee(n,this.opts).exec(this.client);xrange=(...n)=>new _t(n,this.opts).exec(this.client);xrevrange=(...n)=>new te(n,this.opts).exec(this.client);zadd=(...n)=>"score"in n[1]?new l([n[0],n[1],...n.slice(2)],this.opts).exec(this.client):new l([n[0],n[1],...n.slice(2)],this.opts).exec(this.client);zcard=(...n)=>new oe(n,this.opts).exec(this.client);zcount=(...n)=>new me(n,this.opts).exec(this.client);zdiffstore=(...n)=>new Te(n,this.opts).exec(this.client);zincrby=(n,t,o)=>new se([n,t,o],this.opts).exec(this.client);zinterstore=(...n)=>new re(n,this.opts).exec(this.client);zlexcount=(...n)=>new ae(n,this.opts).exec(this.client);zmscore=(...n)=>new Oe(n,this.opts).exec(this.client);zpopmax=(...n)=>new ie(n,this.opts).exec(this.client);zpopmin=(...n)=>new pe(n,this.opts).exec(this.client);zrange=(...n)=>new de(n,this.opts).exec(this.client);zrank=(n,t)=>new ce([n,t],this.opts).exec(this.client);zrem=(n,...t)=>new ue([n,...t],this.opts).exec(this.client);zremrangebylex=(...n)=>new he(n,this.opts).exec(this.client);zremrangebyrank=(...n)=>new le(n,this.opts).exec(this.client);zremrangebyscore=(...n)=>new Ce(n,this.opts).exec(this.client);zrevrank=(n,t)=>new ge([n,t],this.opts).exec(this.client);zscan=(...n)=>new fe(n,this.opts).exec(this.client);zscore=(n,t)=>new ye([n,t],this.opts).exec(this.client);zunion=(...n)=>new xe(n,this.opts).exec(this.client);zunionstore=(...n)=>new be(n,this.opts).exec(this.client)};var $u="v1.30.2";export{Ge as a,Pe as b,Le as c,$u as d};
@@ -0,0 +1,55 @@
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-B5GggKAi.mjs';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, d as Requester, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-B5GggKAi.mjs';
3
+
4
+ type Env = {
5
+ UPSTASH_DISABLE_TELEMETRY?: string;
6
+ };
7
+
8
+ /**
9
+ * Connection credentials for upstash redis.
10
+ * Get them from https://console.upstash.com/redis/<uuid>
11
+ */
12
+ type RedisConfigCloudflare = {
13
+ /**
14
+ * UPSTASH_REDIS_REST_URL
15
+ */
16
+ url: string | undefined;
17
+ /**
18
+ * UPSTASH_REDIS_REST_TOKEN
19
+ */
20
+ token: string | undefined;
21
+ /**
22
+ * The signal will allow aborting requests on the fly.
23
+ * For more check: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
24
+ */
25
+ signal?: AbortSignal;
26
+ keepAlive?: boolean;
27
+ /**
28
+ * When this flag is enabled, any subsequent commands issued by this client are guaranteed to observe the effects of all earlier writes submitted by the same client.
29
+ */
30
+ readYourWrites?: boolean;
31
+ } & RedisOptions & RequesterConfig & Env;
32
+ /**
33
+ * Serverless redis client for upstash.
34
+ */
35
+ declare class Redis extends Redis$1 {
36
+ /**
37
+ * Create a new redis client
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * const redis = new Redis({
42
+ * url: "<UPSTASH_REDIS_REST_URL>",
43
+ * token: "<UPSTASH_REDIS_REST_TOKEN>",
44
+ * });
45
+ * ```
46
+ */
47
+ constructor(config: RedisConfigCloudflare, env?: Env);
48
+ static fromEnv(env?: {
49
+ UPSTASH_REDIS_REST_URL: string;
50
+ UPSTASH_REDIS_REST_TOKEN: string;
51
+ UPSTASH_DISABLE_TELEMETRY?: string;
52
+ }, opts?: Omit<RedisConfigCloudflare, "url" | "token">): Redis;
53
+ }
54
+
55
+ export { Redis, type RedisConfigCloudflare };
@@ -0,0 +1,55 @@
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-B5GggKAi.js';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, d as Requester, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-B5GggKAi.js';
3
+
4
+ type Env = {
5
+ UPSTASH_DISABLE_TELEMETRY?: string;
6
+ };
7
+
8
+ /**
9
+ * Connection credentials for upstash redis.
10
+ * Get them from https://console.upstash.com/redis/<uuid>
11
+ */
12
+ type RedisConfigCloudflare = {
13
+ /**
14
+ * UPSTASH_REDIS_REST_URL
15
+ */
16
+ url: string | undefined;
17
+ /**
18
+ * UPSTASH_REDIS_REST_TOKEN
19
+ */
20
+ token: string | undefined;
21
+ /**
22
+ * The signal will allow aborting requests on the fly.
23
+ * For more check: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
24
+ */
25
+ signal?: AbortSignal;
26
+ keepAlive?: boolean;
27
+ /**
28
+ * When this flag is enabled, any subsequent commands issued by this client are guaranteed to observe the effects of all earlier writes submitted by the same client.
29
+ */
30
+ readYourWrites?: boolean;
31
+ } & RedisOptions & RequesterConfig & Env;
32
+ /**
33
+ * Serverless redis client for upstash.
34
+ */
35
+ declare class Redis extends Redis$1 {
36
+ /**
37
+ * Create a new redis client
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * const redis = new Redis({
42
+ * url: "<UPSTASH_REDIS_REST_URL>",
43
+ * token: "<UPSTASH_REDIS_REST_TOKEN>",
44
+ * });
45
+ * ```
46
+ */
47
+ constructor(config: RedisConfigCloudflare, env?: Env);
48
+ static fromEnv(env?: {
49
+ UPSTASH_REDIS_REST_URL: string;
50
+ UPSTASH_REDIS_REST_TOKEN: string;
51
+ UPSTASH_DISABLE_TELEMETRY?: string;
52
+ }, opts?: Omit<RedisConfigCloudflare, "url" | "token">): Redis;
53
+ }
54
+
55
+ export { Redis, type RedisConfigCloudflare };
package/cloudflare.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _chunkQ6EDGL5Wjs = require('./chunk-Q6EDGL5W.js');var a=class l extends _chunkQ6EDGL5Wjs.c{constructor(e,t){if(!e.url)throw new Error("[Upstash Redis] The 'url' property is missing or undefined in your Redis config.");if(!e.token)throw new Error("[Upstash Redis] The 'token' property is missing or undefined in your Redis config.");(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let r=new (0, _chunkQ6EDGL5Wjs.b)({retry:e.retry,baseUrl:e.url,headers:{authorization:`Bearer ${e.token}`},responseEncoding:e.responseEncoding,signal:e.signal,keepAlive:e.keepAlive,readYourWrites:e.readYourWrites});if(super(r,{enableTelemetry:!_optionalChain([t, 'optionalAccess', _ => _.UPSTASH_DISABLE_TELEMETRY]),automaticDeserialization:e.automaticDeserialization,latencyLogging:e.latencyLogging,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({platform:"cloudflare",sdk:`@upstash/redis@${_chunkQ6EDGL5Wjs.d}`}),this.enableAutoPipelining)return this.autoPipeline()}static fromEnv(e,t){let r=_nullishCoalesce(_optionalChain([e, 'optionalAccess', _2 => _2.UPSTASH_REDIS_REST_URL]), () => (UPSTASH_REDIS_REST_URL)),n=_nullishCoalesce(_optionalChain([e, 'optionalAccess', _3 => _3.UPSTASH_REDIS_REST_TOKEN]), () => (UPSTASH_REDIS_REST_TOKEN));if(!r)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_URL`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_URL`");if(!n)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_TOKEN`");return new l({...t,url:r,token:n},e)}};exports.Redis = a; exports.errors = _chunkQ6EDGL5Wjs.a;
package/cloudflare.mjs ADDED
@@ -0,0 +1 @@
1
+ import{a as S,b as i,c as s,d as o}from"./chunk-VUMOES52.mjs";var a=class l extends s{constructor(e,t){if(!e.url)throw new Error("[Upstash Redis] The 'url' property is missing or undefined in your Redis config.");if(!e.token)throw new Error("[Upstash Redis] The 'token' property is missing or undefined in your Redis config.");(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let r=new i({retry:e.retry,baseUrl:e.url,headers:{authorization:`Bearer ${e.token}`},responseEncoding:e.responseEncoding,signal:e.signal,keepAlive:e.keepAlive,readYourWrites:e.readYourWrites});if(super(r,{enableTelemetry:!t?.UPSTASH_DISABLE_TELEMETRY,automaticDeserialization:e.automaticDeserialization,latencyLogging:e.latencyLogging,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({platform:"cloudflare",sdk:`@upstash/redis@${o}`}),this.enableAutoPipelining)return this.autoPipeline()}static fromEnv(e,t){let r=e?.UPSTASH_REDIS_REST_URL??UPSTASH_REDIS_REST_URL,n=e?.UPSTASH_REDIS_REST_TOKEN??UPSTASH_REDIS_REST_TOKEN;if(!r)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_URL`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_URL`");if(!n)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_TOKEN`");return new l({...t,url:r,token:n},e)}};export{a as Redis,S as errors};
package/fastly.d.mts ADDED
@@ -0,0 +1,48 @@
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-B5GggKAi.mjs';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, d as Requester, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-B5GggKAi.mjs';
3
+
4
+ /**
5
+ * Connection credentials for upstash redis.
6
+ * Get them from https://console.upstash.com/redis/<uuid>
7
+ */
8
+ type RedisConfigFastly = {
9
+ /**
10
+ * UPSTASH_REDIS_REST_URL
11
+ */
12
+ url: string | undefined;
13
+ /**
14
+ * UPSTASH_REDIS_REST_TOKEN
15
+ */
16
+ token: string | undefined;
17
+ /**
18
+ * A Request can be forwarded to any backend defined on your service. Backends
19
+ * can be created via the Fastly CLI, API, or web interface, and are
20
+ * referenced by name.
21
+ */
22
+ backend: string;
23
+ keepAlive?: boolean;
24
+ /**
25
+ * When this flag is enabled, any subsequent commands issued by this client are guaranteed to observe the effects of all earlier writes submitted by the same client.
26
+ */
27
+ readYourWrites?: boolean;
28
+ } & RedisOptions & RequesterConfig;
29
+ /**
30
+ * Serverless redis client for upstash.
31
+ */
32
+ declare class Redis extends Redis$1 {
33
+ /**
34
+ * Create a new redis client
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * const redis = new Redis({
39
+ * url: "<UPSTASH_REDIS_REST_URL>",
40
+ * token: "<UPSTASH_REDIS_REST_TOKEN>",
41
+ * backend: "upstash-db",
42
+ * });
43
+ * ```
44
+ */
45
+ constructor(config: RedisConfigFastly);
46
+ }
47
+
48
+ export { Redis, type RedisConfigFastly };
package/fastly.d.ts ADDED
@@ -0,0 +1,48 @@
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-B5GggKAi.js';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, d as Requester, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-B5GggKAi.js';
3
+
4
+ /**
5
+ * Connection credentials for upstash redis.
6
+ * Get them from https://console.upstash.com/redis/<uuid>
7
+ */
8
+ type RedisConfigFastly = {
9
+ /**
10
+ * UPSTASH_REDIS_REST_URL
11
+ */
12
+ url: string | undefined;
13
+ /**
14
+ * UPSTASH_REDIS_REST_TOKEN
15
+ */
16
+ token: string | undefined;
17
+ /**
18
+ * A Request can be forwarded to any backend defined on your service. Backends
19
+ * can be created via the Fastly CLI, API, or web interface, and are
20
+ * referenced by name.
21
+ */
22
+ backend: string;
23
+ keepAlive?: boolean;
24
+ /**
25
+ * When this flag is enabled, any subsequent commands issued by this client are guaranteed to observe the effects of all earlier writes submitted by the same client.
26
+ */
27
+ readYourWrites?: boolean;
28
+ } & RedisOptions & RequesterConfig;
29
+ /**
30
+ * Serverless redis client for upstash.
31
+ */
32
+ declare class Redis extends Redis$1 {
33
+ /**
34
+ * Create a new redis client
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * const redis = new Redis({
39
+ * url: "<UPSTASH_REDIS_REST_URL>",
40
+ * token: "<UPSTASH_REDIS_REST_TOKEN>",
41
+ * backend: "upstash-db",
42
+ * });
43
+ * ```
44
+ */
45
+ constructor(config: RedisConfigFastly);
46
+ }
47
+
48
+ export { Redis, type RedisConfigFastly };