@upstash/redis 0.0.0-ci.dcb5bd7e → 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 (399) hide show
  1. package/README.md +36 -23
  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 -101
  17. package/zmscore-B5GggKAi.d.mts +3486 -0
  18. package/zmscore-B5GggKAi.d.ts +3486 -0
  19. package/.releaserc +0 -14
  20. package/esm/package.json +0 -3
  21. package/esm/pkg/commands/append.js +0 -9
  22. package/esm/pkg/commands/bitcount.js +0 -16
  23. package/esm/pkg/commands/bitop.js +0 -9
  24. package/esm/pkg/commands/bitpos.js +0 -9
  25. package/esm/pkg/commands/command.js +0 -57
  26. package/esm/pkg/commands/dbsize.js +0 -9
  27. package/esm/pkg/commands/decr.js +0 -9
  28. package/esm/pkg/commands/decrby.js +0 -9
  29. package/esm/pkg/commands/del.js +0 -9
  30. package/esm/pkg/commands/echo.js +0 -9
  31. package/esm/pkg/commands/eval.js +0 -9
  32. package/esm/pkg/commands/evalsha.js +0 -9
  33. package/esm/pkg/commands/exists.js +0 -9
  34. package/esm/pkg/commands/expire.js +0 -9
  35. package/esm/pkg/commands/expireat.js +0 -9
  36. package/esm/pkg/commands/flushall.js +0 -13
  37. package/esm/pkg/commands/flushdb.js +0 -13
  38. package/esm/pkg/commands/get.js +0 -9
  39. package/esm/pkg/commands/getbit.js +0 -9
  40. package/esm/pkg/commands/getrange.js +0 -9
  41. package/esm/pkg/commands/getset.js +0 -9
  42. package/esm/pkg/commands/hdel.js +0 -9
  43. package/esm/pkg/commands/hexists.js +0 -9
  44. package/esm/pkg/commands/hget.js +0 -9
  45. package/esm/pkg/commands/hgetall.js +0 -33
  46. package/esm/pkg/commands/hincrby.js +0 -9
  47. package/esm/pkg/commands/hincrbyfloat.js +0 -9
  48. package/esm/pkg/commands/hkeys.js +0 -9
  49. package/esm/pkg/commands/hlen.js +0 -9
  50. package/esm/pkg/commands/hmget.js +0 -35
  51. package/esm/pkg/commands/hmset.js +0 -13
  52. package/esm/pkg/commands/hscan.js +0 -16
  53. package/esm/pkg/commands/hset.js +0 -13
  54. package/esm/pkg/commands/hsetnx.js +0 -9
  55. package/esm/pkg/commands/hstrlen.js +0 -9
  56. package/esm/pkg/commands/hvals.js +0 -9
  57. package/esm/pkg/commands/incr.js +0 -9
  58. package/esm/pkg/commands/incrby.js +0 -9
  59. package/esm/pkg/commands/incrbyfloat.js +0 -9
  60. package/esm/pkg/commands/keys.js +0 -9
  61. package/esm/pkg/commands/lindex.js +0 -6
  62. package/esm/pkg/commands/linsert.js +0 -6
  63. package/esm/pkg/commands/llen.js +0 -9
  64. package/esm/pkg/commands/lpop.js +0 -9
  65. package/esm/pkg/commands/lpos.js +0 -19
  66. package/esm/pkg/commands/lpush.js +0 -9
  67. package/esm/pkg/commands/lpushx.js +0 -9
  68. package/esm/pkg/commands/lrange.js +0 -6
  69. package/esm/pkg/commands/lrem.js +0 -6
  70. package/esm/pkg/commands/lset.js +0 -6
  71. package/esm/pkg/commands/ltrim.js +0 -6
  72. package/esm/pkg/commands/mget.js +0 -9
  73. package/esm/pkg/commands/mod.js +0 -115
  74. package/esm/pkg/commands/mset.js +0 -12
  75. package/esm/pkg/commands/msetnx.js +0 -9
  76. package/esm/pkg/commands/persist.js +0 -9
  77. package/esm/pkg/commands/pexpire.js +0 -9
  78. package/esm/pkg/commands/pexpireat.js +0 -9
  79. package/esm/pkg/commands/ping.js +0 -13
  80. package/esm/pkg/commands/psetex.js +0 -9
  81. package/esm/pkg/commands/pttl.js +0 -9
  82. package/esm/pkg/commands/publish.js +0 -9
  83. package/esm/pkg/commands/randomkey.js +0 -9
  84. package/esm/pkg/commands/rename.js +0 -9
  85. package/esm/pkg/commands/renamenx.js +0 -9
  86. package/esm/pkg/commands/rpop.js +0 -9
  87. package/esm/pkg/commands/rpush.js +0 -9
  88. package/esm/pkg/commands/rpushx.js +0 -9
  89. package/esm/pkg/commands/sadd.js +0 -9
  90. package/esm/pkg/commands/scan.js +0 -16
  91. package/esm/pkg/commands/scard.js +0 -9
  92. package/esm/pkg/commands/script_exists.js +0 -12
  93. package/esm/pkg/commands/script_flush.js +0 -16
  94. package/esm/pkg/commands/script_load.js +0 -9
  95. package/esm/pkg/commands/sdiff.js +0 -9
  96. package/esm/pkg/commands/sdiffstore.js +0 -9
  97. package/esm/pkg/commands/set.js +0 -24
  98. package/esm/pkg/commands/setbit.js +0 -9
  99. package/esm/pkg/commands/setex.js +0 -9
  100. package/esm/pkg/commands/setnx.js +0 -9
  101. package/esm/pkg/commands/setrange.js +0 -9
  102. package/esm/pkg/commands/sinter.js +0 -9
  103. package/esm/pkg/commands/sinterstore.js +0 -9
  104. package/esm/pkg/commands/sismember.js +0 -9
  105. package/esm/pkg/commands/smembers.js +0 -9
  106. package/esm/pkg/commands/smove.js +0 -9
  107. package/esm/pkg/commands/spop.js +0 -13
  108. package/esm/pkg/commands/srandmember.js +0 -13
  109. package/esm/pkg/commands/srem.js +0 -9
  110. package/esm/pkg/commands/sscan.js +0 -16
  111. package/esm/pkg/commands/strlen.js +0 -9
  112. package/esm/pkg/commands/sunion.js +0 -9
  113. package/esm/pkg/commands/sunionstore.js +0 -9
  114. package/esm/pkg/commands/time.js +0 -9
  115. package/esm/pkg/commands/touch.js +0 -9
  116. package/esm/pkg/commands/ttl.js +0 -9
  117. package/esm/pkg/commands/type.js +0 -9
  118. package/esm/pkg/commands/unlink.js +0 -9
  119. package/esm/pkg/commands/zadd.js +0 -26
  120. package/esm/pkg/commands/zcard.js +0 -9
  121. package/esm/pkg/commands/zcount.js +0 -9
  122. package/esm/pkg/commands/zincrby.js +0 -9
  123. package/esm/pkg/commands/zinterstore.js +0 -27
  124. package/esm/pkg/commands/zlexcount.js +0 -9
  125. package/esm/pkg/commands/zpopmax.js +0 -13
  126. package/esm/pkg/commands/zpopmin.js +0 -13
  127. package/esm/pkg/commands/zrange.js +0 -26
  128. package/esm/pkg/commands/zrank.js +0 -9
  129. package/esm/pkg/commands/zrem.js +0 -9
  130. package/esm/pkg/commands/zremrangebylex.js +0 -9
  131. package/esm/pkg/commands/zremrangebyrank.js +0 -9
  132. package/esm/pkg/commands/zremrangebyscore.js +0 -9
  133. package/esm/pkg/commands/zrevrank.js +0 -9
  134. package/esm/pkg/commands/zscan.js +0 -16
  135. package/esm/pkg/commands/zscore.js +0 -9
  136. package/esm/pkg/commands/zunionstore.js +0 -27
  137. package/esm/pkg/error.js +0 -9
  138. package/esm/pkg/http.js +0 -77
  139. package/esm/pkg/pipeline.js +0 -1134
  140. package/esm/pkg/redis.js +0 -1088
  141. package/esm/pkg/types.js +0 -1
  142. package/esm/pkg/util.js +0 -31
  143. package/esm/platforms/cloudflare.js +0 -62
  144. package/esm/platforms/fastly.js +0 -40
  145. package/esm/platforms/node_with_fetch.js +0 -60
  146. package/esm/platforms/nodejs.js +0 -59
  147. package/script/package.json +0 -3
  148. package/script/pkg/commands/append.js +0 -13
  149. package/script/pkg/commands/bitcount.js +0 -20
  150. package/script/pkg/commands/bitop.js +0 -13
  151. package/script/pkg/commands/bitpos.js +0 -13
  152. package/script/pkg/commands/command.js +0 -61
  153. package/script/pkg/commands/dbsize.js +0 -13
  154. package/script/pkg/commands/decr.js +0 -13
  155. package/script/pkg/commands/decrby.js +0 -13
  156. package/script/pkg/commands/del.js +0 -13
  157. package/script/pkg/commands/echo.js +0 -13
  158. package/script/pkg/commands/eval.js +0 -13
  159. package/script/pkg/commands/evalsha.js +0 -13
  160. package/script/pkg/commands/exists.js +0 -13
  161. package/script/pkg/commands/expire.js +0 -13
  162. package/script/pkg/commands/expireat.js +0 -13
  163. package/script/pkg/commands/flushall.js +0 -17
  164. package/script/pkg/commands/flushdb.js +0 -17
  165. package/script/pkg/commands/get.js +0 -13
  166. package/script/pkg/commands/getbit.js +0 -13
  167. package/script/pkg/commands/getrange.js +0 -13
  168. package/script/pkg/commands/getset.js +0 -13
  169. package/script/pkg/commands/hdel.js +0 -13
  170. package/script/pkg/commands/hexists.js +0 -13
  171. package/script/pkg/commands/hget.js +0 -13
  172. package/script/pkg/commands/hgetall.js +0 -37
  173. package/script/pkg/commands/hincrby.js +0 -13
  174. package/script/pkg/commands/hincrbyfloat.js +0 -13
  175. package/script/pkg/commands/hkeys.js +0 -13
  176. package/script/pkg/commands/hlen.js +0 -13
  177. package/script/pkg/commands/hmget.js +0 -39
  178. package/script/pkg/commands/hmset.js +0 -17
  179. package/script/pkg/commands/hscan.js +0 -20
  180. package/script/pkg/commands/hset.js +0 -17
  181. package/script/pkg/commands/hsetnx.js +0 -13
  182. package/script/pkg/commands/hstrlen.js +0 -13
  183. package/script/pkg/commands/hvals.js +0 -13
  184. package/script/pkg/commands/incr.js +0 -13
  185. package/script/pkg/commands/incrby.js +0 -13
  186. package/script/pkg/commands/incrbyfloat.js +0 -13
  187. package/script/pkg/commands/keys.js +0 -13
  188. package/script/pkg/commands/lindex.js +0 -10
  189. package/script/pkg/commands/linsert.js +0 -10
  190. package/script/pkg/commands/llen.js +0 -13
  191. package/script/pkg/commands/lpop.js +0 -13
  192. package/script/pkg/commands/lpos.js +0 -23
  193. package/script/pkg/commands/lpush.js +0 -13
  194. package/script/pkg/commands/lpushx.js +0 -13
  195. package/script/pkg/commands/lrange.js +0 -10
  196. package/script/pkg/commands/lrem.js +0 -10
  197. package/script/pkg/commands/lset.js +0 -10
  198. package/script/pkg/commands/ltrim.js +0 -10
  199. package/script/pkg/commands/mget.js +0 -13
  200. package/script/pkg/commands/mod.js +0 -131
  201. package/script/pkg/commands/mset.js +0 -16
  202. package/script/pkg/commands/msetnx.js +0 -13
  203. package/script/pkg/commands/persist.js +0 -13
  204. package/script/pkg/commands/pexpire.js +0 -13
  205. package/script/pkg/commands/pexpireat.js +0 -13
  206. package/script/pkg/commands/ping.js +0 -17
  207. package/script/pkg/commands/psetex.js +0 -13
  208. package/script/pkg/commands/pttl.js +0 -13
  209. package/script/pkg/commands/publish.js +0 -13
  210. package/script/pkg/commands/randomkey.js +0 -13
  211. package/script/pkg/commands/rename.js +0 -13
  212. package/script/pkg/commands/renamenx.js +0 -13
  213. package/script/pkg/commands/rpop.js +0 -13
  214. package/script/pkg/commands/rpush.js +0 -13
  215. package/script/pkg/commands/rpushx.js +0 -13
  216. package/script/pkg/commands/sadd.js +0 -13
  217. package/script/pkg/commands/scan.js +0 -20
  218. package/script/pkg/commands/scard.js +0 -13
  219. package/script/pkg/commands/script_exists.js +0 -16
  220. package/script/pkg/commands/script_flush.js +0 -20
  221. package/script/pkg/commands/script_load.js +0 -13
  222. package/script/pkg/commands/sdiff.js +0 -13
  223. package/script/pkg/commands/sdiffstore.js +0 -13
  224. package/script/pkg/commands/set.js +0 -28
  225. package/script/pkg/commands/setbit.js +0 -13
  226. package/script/pkg/commands/setex.js +0 -13
  227. package/script/pkg/commands/setnx.js +0 -13
  228. package/script/pkg/commands/setrange.js +0 -13
  229. package/script/pkg/commands/sinter.js +0 -13
  230. package/script/pkg/commands/sinterstore.js +0 -13
  231. package/script/pkg/commands/sismember.js +0 -13
  232. package/script/pkg/commands/smembers.js +0 -13
  233. package/script/pkg/commands/smove.js +0 -13
  234. package/script/pkg/commands/spop.js +0 -17
  235. package/script/pkg/commands/srandmember.js +0 -17
  236. package/script/pkg/commands/srem.js +0 -13
  237. package/script/pkg/commands/sscan.js +0 -20
  238. package/script/pkg/commands/strlen.js +0 -13
  239. package/script/pkg/commands/sunion.js +0 -13
  240. package/script/pkg/commands/sunionstore.js +0 -13
  241. package/script/pkg/commands/time.js +0 -13
  242. package/script/pkg/commands/touch.js +0 -13
  243. package/script/pkg/commands/ttl.js +0 -13
  244. package/script/pkg/commands/type.js +0 -13
  245. package/script/pkg/commands/unlink.js +0 -13
  246. package/script/pkg/commands/zadd.js +0 -30
  247. package/script/pkg/commands/zcard.js +0 -13
  248. package/script/pkg/commands/zcount.js +0 -13
  249. package/script/pkg/commands/zincrby.js +0 -13
  250. package/script/pkg/commands/zinterstore.js +0 -31
  251. package/script/pkg/commands/zlexcount.js +0 -13
  252. package/script/pkg/commands/zpopmax.js +0 -17
  253. package/script/pkg/commands/zpopmin.js +0 -17
  254. package/script/pkg/commands/zrange.js +0 -30
  255. package/script/pkg/commands/zrank.js +0 -13
  256. package/script/pkg/commands/zrem.js +0 -13
  257. package/script/pkg/commands/zremrangebylex.js +0 -13
  258. package/script/pkg/commands/zremrangebyrank.js +0 -13
  259. package/script/pkg/commands/zremrangebyscore.js +0 -13
  260. package/script/pkg/commands/zrevrank.js +0 -13
  261. package/script/pkg/commands/zscan.js +0 -20
  262. package/script/pkg/commands/zscore.js +0 -13
  263. package/script/pkg/commands/zunionstore.js +0 -31
  264. package/script/pkg/error.js +0 -13
  265. package/script/pkg/http.js +0 -81
  266. package/script/pkg/pipeline.js +0 -1138
  267. package/script/pkg/redis.js +0 -1092
  268. package/script/pkg/types.js +0 -2
  269. package/script/pkg/util.js +0 -35
  270. package/script/platforms/cloudflare.js +0 -89
  271. package/script/platforms/fastly.js +0 -67
  272. package/script/platforms/node_with_fetch.js +0 -87
  273. package/script/platforms/nodejs.js +0 -86
  274. package/types/pkg/commands/append.d.ts +0 -7
  275. package/types/pkg/commands/bitcount.d.ts +0 -8
  276. package/types/pkg/commands/bitop.d.ts +0 -12
  277. package/types/pkg/commands/bitpos.d.ts +0 -7
  278. package/types/pkg/commands/command.d.ts +0 -37
  279. package/types/pkg/commands/dbsize.d.ts +0 -7
  280. package/types/pkg/commands/decr.d.ts +0 -7
  281. package/types/pkg/commands/decrby.d.ts +0 -7
  282. package/types/pkg/commands/del.d.ts +0 -7
  283. package/types/pkg/commands/echo.d.ts +0 -7
  284. package/types/pkg/commands/eval.d.ts +0 -7
  285. package/types/pkg/commands/evalsha.d.ts +0 -7
  286. package/types/pkg/commands/exists.d.ts +0 -7
  287. package/types/pkg/commands/expire.d.ts +0 -7
  288. package/types/pkg/commands/expireat.d.ts +0 -7
  289. package/types/pkg/commands/flushall.d.ts +0 -9
  290. package/types/pkg/commands/flushdb.d.ts +0 -9
  291. package/types/pkg/commands/get.d.ts +0 -7
  292. package/types/pkg/commands/getbit.d.ts +0 -7
  293. package/types/pkg/commands/getrange.d.ts +0 -7
  294. package/types/pkg/commands/getset.d.ts +0 -7
  295. package/types/pkg/commands/hdel.d.ts +0 -7
  296. package/types/pkg/commands/hexists.d.ts +0 -7
  297. package/types/pkg/commands/hget.d.ts +0 -7
  298. package/types/pkg/commands/hgetall.d.ts +0 -7
  299. package/types/pkg/commands/hincrby.d.ts +0 -7
  300. package/types/pkg/commands/hincrbyfloat.d.ts +0 -7
  301. package/types/pkg/commands/hkeys.d.ts +0 -7
  302. package/types/pkg/commands/hlen.d.ts +0 -7
  303. package/types/pkg/commands/hmget.d.ts +0 -15
  304. package/types/pkg/commands/hmset.d.ts +0 -9
  305. package/types/pkg/commands/hscan.d.ts +0 -24
  306. package/types/pkg/commands/hset.d.ts +0 -9
  307. package/types/pkg/commands/hsetnx.d.ts +0 -7
  308. package/types/pkg/commands/hstrlen.d.ts +0 -7
  309. package/types/pkg/commands/hvals.d.ts +0 -7
  310. package/types/pkg/commands/incr.d.ts +0 -7
  311. package/types/pkg/commands/incrby.d.ts +0 -7
  312. package/types/pkg/commands/incrbyfloat.d.ts +0 -7
  313. package/types/pkg/commands/keys.d.ts +0 -7
  314. package/types/pkg/commands/lindex.d.ts +0 -4
  315. package/types/pkg/commands/linsert.d.ts +0 -9
  316. package/types/pkg/commands/llen.d.ts +0 -7
  317. package/types/pkg/commands/lpop.d.ts +0 -7
  318. package/types/pkg/commands/lpos.d.ts +0 -15
  319. package/types/pkg/commands/lpush.d.ts +0 -7
  320. package/types/pkg/commands/lpushx.d.ts +0 -7
  321. package/types/pkg/commands/lrange.d.ts +0 -4
  322. package/types/pkg/commands/lrem.d.ts +0 -4
  323. package/types/pkg/commands/lset.d.ts +0 -4
  324. package/types/pkg/commands/ltrim.d.ts +0 -4
  325. package/types/pkg/commands/mget.d.ts +0 -7
  326. package/types/pkg/commands/mod.d.ts +0 -115
  327. package/types/pkg/commands/mset.d.ts +0 -9
  328. package/types/pkg/commands/msetnx.d.ts +0 -9
  329. package/types/pkg/commands/persist.d.ts +0 -7
  330. package/types/pkg/commands/pexpire.d.ts +0 -7
  331. package/types/pkg/commands/pexpireat.d.ts +0 -7
  332. package/types/pkg/commands/ping.d.ts +0 -7
  333. package/types/pkg/commands/psetex.d.ts +0 -7
  334. package/types/pkg/commands/pttl.d.ts +0 -7
  335. package/types/pkg/commands/publish.d.ts +0 -7
  336. package/types/pkg/commands/randomkey.d.ts +0 -7
  337. package/types/pkg/commands/rename.d.ts +0 -7
  338. package/types/pkg/commands/renamenx.d.ts +0 -7
  339. package/types/pkg/commands/rpop.d.ts +0 -7
  340. package/types/pkg/commands/rpush.d.ts +0 -7
  341. package/types/pkg/commands/rpushx.d.ts +0 -7
  342. package/types/pkg/commands/sadd.d.ts +0 -7
  343. package/types/pkg/commands/scan.d.ts +0 -17
  344. package/types/pkg/commands/scard.d.ts +0 -7
  345. package/types/pkg/commands/script_exists.d.ts +0 -7
  346. package/types/pkg/commands/script_flush.d.ts +0 -14
  347. package/types/pkg/commands/script_load.d.ts +0 -7
  348. package/types/pkg/commands/sdiff.d.ts +0 -7
  349. package/types/pkg/commands/sdiffstore.d.ts +0 -7
  350. package/types/pkg/commands/set.d.ts +0 -26
  351. package/types/pkg/commands/setbit.d.ts +0 -7
  352. package/types/pkg/commands/setex.d.ts +0 -7
  353. package/types/pkg/commands/setnx.d.ts +0 -7
  354. package/types/pkg/commands/setrange.d.ts +0 -7
  355. package/types/pkg/commands/sinter.d.ts +0 -7
  356. package/types/pkg/commands/sinterstore.d.ts +0 -7
  357. package/types/pkg/commands/sismember.d.ts +0 -7
  358. package/types/pkg/commands/smembers.d.ts +0 -7
  359. package/types/pkg/commands/smove.d.ts +0 -7
  360. package/types/pkg/commands/spop.d.ts +0 -7
  361. package/types/pkg/commands/srandmember.d.ts +0 -7
  362. package/types/pkg/commands/srem.d.ts +0 -7
  363. package/types/pkg/commands/sscan.d.ts +0 -24
  364. package/types/pkg/commands/strlen.d.ts +0 -7
  365. package/types/pkg/commands/sunion.d.ts +0 -7
  366. package/types/pkg/commands/sunionstore.d.ts +0 -7
  367. package/types/pkg/commands/time.d.ts +0 -7
  368. package/types/pkg/commands/touch.d.ts +0 -7
  369. package/types/pkg/commands/ttl.d.ts +0 -7
  370. package/types/pkg/commands/type.d.ts +0 -8
  371. package/types/pkg/commands/unlink.d.ts +0 -7
  372. package/types/pkg/commands/zadd.d.ts +0 -35
  373. package/types/pkg/commands/zcard.d.ts +0 -7
  374. package/types/pkg/commands/zcount.d.ts +0 -7
  375. package/types/pkg/commands/zincrby.d.ts +0 -7
  376. package/types/pkg/commands/zinterstore.d.ts +0 -30
  377. package/types/pkg/commands/zlexcount.d.ts +0 -7
  378. package/types/pkg/commands/zpopmax.d.ts +0 -7
  379. package/types/pkg/commands/zpopmin.d.ts +0 -7
  380. package/types/pkg/commands/zrange.d.ts +0 -42
  381. package/types/pkg/commands/zrank.d.ts +0 -7
  382. package/types/pkg/commands/zrem.d.ts +0 -7
  383. package/types/pkg/commands/zremrangebylex.d.ts +0 -7
  384. package/types/pkg/commands/zremrangebyrank.d.ts +0 -7
  385. package/types/pkg/commands/zremrangebyscore.d.ts +0 -7
  386. package/types/pkg/commands/zrevrank.d.ts +0 -7
  387. package/types/pkg/commands/zscan.d.ts +0 -24
  388. package/types/pkg/commands/zscore.d.ts +0 -7
  389. package/types/pkg/commands/zunionstore.d.ts +0 -30
  390. package/types/pkg/error.d.ts +0 -6
  391. package/types/pkg/http.d.ts +0 -54
  392. package/types/pkg/pipeline.d.ts +0 -548
  393. package/types/pkg/redis.d.ts +0 -528
  394. package/types/pkg/types.d.ts +0 -1
  395. package/types/pkg/util.d.ts +0 -1
  396. package/types/platforms/cloudflare.d.ts +0 -42
  397. package/types/platforms/fastly.d.ts +0 -45
  398. package/types/platforms/node_with_fetch.d.ts +0 -82
  399. package/types/platforms/nodejs.d.ts +0 -81
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 };
package/fastly.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkQ6EDGL5Wjs = require('./chunk-Q6EDGL5W.js');var i=class extends _chunkQ6EDGL5Wjs.c{constructor(e){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 o=new (0, _chunkQ6EDGL5Wjs.b)({baseUrl:e.url,retry:e.retry,headers:{authorization:`Bearer ${e.token}`},options:{backend:e.backend},responseEncoding:e.responseEncoding,keepAlive:e.keepAlive,readYourWrites:e.readYourWrites});if(super(o,{automaticDeserialization:e.automaticDeserialization,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({sdk:`@upstash/redis@${_chunkQ6EDGL5Wjs.d}`,platform:"fastly"}),this.enableAutoPipelining)return this.autoPipeline()}};exports.Redis = i; exports.errors = _chunkQ6EDGL5Wjs.a;
package/fastly.mjs ADDED
@@ -0,0 +1 @@
1
+ import{a as n,b as r,c as t,d as s}from"./chunk-VUMOES52.mjs";var i=class extends t{constructor(e){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 o=new r({baseUrl:e.url,retry:e.retry,headers:{authorization:`Bearer ${e.token}`},options:{backend:e.backend},responseEncoding:e.responseEncoding,keepAlive:e.keepAlive,readYourWrites:e.readYourWrites});if(super(o,{automaticDeserialization:e.automaticDeserialization,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({sdk:`@upstash/redis@${s}`,platform:"fastly"}),this.enableAutoPipelining)return this.autoPipeline()}};export{i as Redis,n as errors};
package/nodejs.d.mts ADDED
@@ -0,0 +1,73 @@
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 RedisConfigNodejs = {
9
+ /**
10
+ * UPSTASH_REDIS_REST_URL
11
+ */
12
+ url: string | undefined;
13
+ /**
14
+ * UPSTASH_REDIS_REST_TOKEN
15
+ */
16
+ token: string | undefined;
17
+ /**
18
+ * An agent allows you to reuse connections to reduce latency for multiple sequential requests.
19
+ *
20
+ * This is a node specific implementation and is not supported in various runtimes like Vercel
21
+ * edge functions.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * import https from "https"
26
+ *
27
+ * const options: RedisConfigNodejs = {
28
+ * agent: new https.Agent({ keepAlive: true })
29
+ * }
30
+ * ```
31
+ */
32
+ /**
33
+ * The signal will allow aborting requests on the fly.
34
+ * For more check: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
35
+ */
36
+ signal?: AbortSignal;
37
+ latencyLogging?: boolean;
38
+ agent?: unknown;
39
+ keepAlive?: boolean;
40
+ /**
41
+ * 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.
42
+ */
43
+ readYourWrites?: boolean;
44
+ } & RedisOptions & RequesterConfig;
45
+ /**
46
+ * Serverless redis client for upstash.
47
+ */
48
+ declare class Redis extends Redis$1 {
49
+ /**
50
+ * Create a new redis client by providing the url and token
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * const redis = new Redis({
55
+ * url: "<UPSTASH_REDIS_REST_URL>",
56
+ * token: "<UPSTASH_REDIS_REST_TOKEN>",
57
+ * });
58
+ * ```
59
+ */
60
+ constructor(config: RedisConfigNodejs);
61
+ /**
62
+ * Create a new Upstash Redis instance from environment variables.
63
+ *
64
+ * Use this to automatically load connection secrets from your environment
65
+ * variables. For instance when using the Vercel integration.
66
+ *
67
+ * This tries to load `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN` from
68
+ * your environment using `process.env`.
69
+ */
70
+ static fromEnv(config?: Omit<RedisConfigNodejs, "url" | "token">): Redis;
71
+ }
72
+
73
+ export { Redis, type RedisConfigNodejs };
package/nodejs.d.ts ADDED
@@ -0,0 +1,73 @@
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 RedisConfigNodejs = {
9
+ /**
10
+ * UPSTASH_REDIS_REST_URL
11
+ */
12
+ url: string | undefined;
13
+ /**
14
+ * UPSTASH_REDIS_REST_TOKEN
15
+ */
16
+ token: string | undefined;
17
+ /**
18
+ * An agent allows you to reuse connections to reduce latency for multiple sequential requests.
19
+ *
20
+ * This is a node specific implementation and is not supported in various runtimes like Vercel
21
+ * edge functions.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * import https from "https"
26
+ *
27
+ * const options: RedisConfigNodejs = {
28
+ * agent: new https.Agent({ keepAlive: true })
29
+ * }
30
+ * ```
31
+ */
32
+ /**
33
+ * The signal will allow aborting requests on the fly.
34
+ * For more check: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
35
+ */
36
+ signal?: AbortSignal;
37
+ latencyLogging?: boolean;
38
+ agent?: unknown;
39
+ keepAlive?: boolean;
40
+ /**
41
+ * 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.
42
+ */
43
+ readYourWrites?: boolean;
44
+ } & RedisOptions & RequesterConfig;
45
+ /**
46
+ * Serverless redis client for upstash.
47
+ */
48
+ declare class Redis extends Redis$1 {
49
+ /**
50
+ * Create a new redis client by providing the url and token
51
+ *
52
+ * @example
53
+ * ```typescript
54
+ * const redis = new Redis({
55
+ * url: "<UPSTASH_REDIS_REST_URL>",
56
+ * token: "<UPSTASH_REDIS_REST_TOKEN>",
57
+ * });
58
+ * ```
59
+ */
60
+ constructor(config: RedisConfigNodejs);
61
+ /**
62
+ * Create a new Upstash Redis instance from environment variables.
63
+ *
64
+ * Use this to automatically load connection secrets from your environment
65
+ * variables. For instance when using the Vercel integration.
66
+ *
67
+ * This tries to load `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN` from
68
+ * your environment using `process.env`.
69
+ */
70
+ static fromEnv(config?: Omit<RedisConfigNodejs, "url" | "token">): Redis;
71
+ }
72
+
73
+ export { Redis, type RedisConfigNodejs };
package/nodejs.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(); } }var _chunkQ6EDGL5Wjs = require('./chunk-Q6EDGL5W.js');typeof atob>"u"&&(global.atob=o=>Buffer.from(o,"base64").toString("utf8"));var a=class o extends _chunkQ6EDGL5Wjs.c{constructor(e){if("request"in e){super(e);return}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 n=new (0, _chunkQ6EDGL5Wjs.b)({baseUrl:e.url,retry:e.retry,headers:{authorization:`Bearer ${e.token}`},agent:e.agent,responseEncoding:e.responseEncoding,cache:_nullishCoalesce(e.cache, () => ("no-store")),signal:e.signal,keepAlive:e.keepAlive,readYourWrites:e.readYourWrites});if(super(n,{automaticDeserialization:e.automaticDeserialization,enableTelemetry:!process.env.UPSTASH_DISABLE_TELEMETRY,latencyLogging:e.latencyLogging,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({runtime:typeof EdgeRuntime=="string"?"edge-light":`node@${process.version}`,platform:process.env.VERCEL?"vercel":process.env.AWS_REGION?"aws":"unknown",sdk:`@upstash/redis@${_chunkQ6EDGL5Wjs.d}`}),this.enableAutoPipelining)return this.autoPipeline()}static fromEnv(e){if(process.env===void 0)throw new TypeError('Unable to get environment variables, `process.env` is undefined. If you are deploying to cloudflare, please import from "@upstash/redis/cloudflare" instead');let n=process.env.UPSTASH_REDIS_REST_URL;if(!n)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_URL`");let t=process.env.UPSTASH_REDIS_REST_TOKEN;if(!t)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`");return new o({...e,url:n,token:t})}};exports.Redis = a; exports.errors = _chunkQ6EDGL5Wjs.a;
package/nodejs.mjs ADDED
@@ -0,0 +1 @@
1
+ import{a as p,b as r,c as i,d as s}from"./chunk-VUMOES52.mjs";typeof atob>"u"&&(global.atob=o=>Buffer.from(o,"base64").toString("utf8"));var a=class o extends i{constructor(e){if("request"in e){super(e);return}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 n=new r({baseUrl:e.url,retry:e.retry,headers:{authorization:`Bearer ${e.token}`},agent:e.agent,responseEncoding:e.responseEncoding,cache:e.cache??"no-store",signal:e.signal,keepAlive:e.keepAlive,readYourWrites:e.readYourWrites});if(super(n,{automaticDeserialization:e.automaticDeserialization,enableTelemetry:!process.env.UPSTASH_DISABLE_TELEMETRY,latencyLogging:e.latencyLogging,enableAutoPipelining:e.enableAutoPipelining}),this.addTelemetry({runtime:typeof EdgeRuntime=="string"?"edge-light":`node@${process.version}`,platform:process.env.VERCEL?"vercel":process.env.AWS_REGION?"aws":"unknown",sdk:`@upstash/redis@${s}`}),this.enableAutoPipelining)return this.autoPipeline()}static fromEnv(e){if(process.env===void 0)throw new TypeError('Unable to get environment variables, `process.env` is undefined. If you are deploying to cloudflare, please import from "@upstash/redis/cloudflare" instead');let n=process.env.UPSTASH_REDIS_REST_URL;if(!n)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_URL`");let t=process.env.UPSTASH_REDIS_REST_TOKEN;if(!t)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`");return new o({...e,url:n,token:t})}};export{a as Redis,p as errors};
package/package.json CHANGED
@@ -1,101 +1 @@
1
- {
2
- "module": "./esm/platforms/nodejs.js",
3
- "main": "./script/platforms/nodejs.js",
4
- "types": "./types/platforms/nodejs.d.ts",
5
- "name": "@upstash/redis",
6
- "version": "v0.0.0-ci.dcb5bd7e",
7
- "description": "An HTTP/REST based Redis client built on top of Upstash REST API.",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/upstash/upstash-redis.git"
11
- },
12
- "keywords": [
13
- "redis",
14
- "database",
15
- "serverless",
16
- "edge",
17
- "upstash"
18
- ],
19
- "author": "Andreas Thomas <dev@chronark.com>",
20
- "license": "MIT",
21
- "bugs": {
22
- "url": "https://github.com/upstash/upstash-redis/issues"
23
- },
24
- "homepage": "https://github.com/upstash/upstash-redis#readme",
25
- "devDependencies": {
26
- "@size-limit/preset-small-lib": "latest",
27
- "size-limit": "latest"
28
- },
29
- "dependencies": {
30
- "isomorphic-fetch": "^3.0.0"
31
- },
32
- "typesVersions": {
33
- "*": {
34
- "nodejs": "./types/platforms/nodejs.d.ts",
35
- "cloudflare": "./types/platforms/cloudflare.d.ts",
36
- "fastly": "./types/platforms/fastly.d.ts",
37
- "with-fetch": "./types/platforms/node_with_fetch.d.ts"
38
- }
39
- },
40
- "size-limit": [
41
- {
42
- "path": "esm/platforms/nodejs.js",
43
- "limit": "6 KB"
44
- },
45
- {
46
- "path": "esm/platforms/fastly.js",
47
- "limit": "6 KB"
48
- },
49
- {
50
- "path": "esm/platforms/cloudflare.js",
51
- "limit": "6 KB"
52
- },
53
- {
54
- "path": "esm/platforms/node_with_fetch.js",
55
- "limit": "15 KB"
56
- },
57
- {
58
- "path": "script/platforms/nodejs.js",
59
- "limit": "10 KB"
60
- },
61
- {
62
- "path": "script/platforms/fastly.js",
63
- "limit": "10 KB"
64
- },
65
- {
66
- "path": "script/platforms/cloudflare.js",
67
- "limit": "10 KB"
68
- },
69
- {
70
- "path": "script/platforms/node_with_fetch.js",
71
- "limit": "15 KB"
72
- }
73
- ],
74
- "exports": {
75
- ".": {
76
- "import": "./esm/platforms/nodejs.js",
77
- "require": "./script/platforms/nodejs.js",
78
- "types": "./types/platforms/nodejs.d.ts"
79
- },
80
- "./nodejs": {
81
- "import": "./esm/platforms/nodejs.js",
82
- "require": "./script/platforms/nodejs.js",
83
- "types": "./types/platforms/nodejs.d.ts"
84
- },
85
- "./cloudflare": {
86
- "import": "./esm/platforms/cloudflare.js",
87
- "require": "./script/platforms/cloudflare.js",
88
- "types": "./types/platforms/cloudflare.d.ts"
89
- },
90
- "./fastly": {
91
- "import": "./esm/platforms/fastly.js",
92
- "require": "./script/platforms/fastly.js",
93
- "types": "./types/platforms/fastly.d.ts"
94
- },
95
- "./with-fetch": {
96
- "import": "./esm/platforms/node_with_fetch.js",
97
- "require": "./script/platforms/node_with_fetch.js",
98
- "types": "./types/platforms/node_with_fetch.d.ts"
99
- }
100
- }
101
- }
1
+ {"name":"@upstash/redis","version":"v0.0.0-ci.dd02f14981f2550d21bc49959450d2588b9c4f1a-20240917073031","main":"./nodejs.js","module":"./nodejs.mjs","exports":{".":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./node":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./node.js":"./node.js","./node.mjs":"./node.mjs","./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.js":"./cloudflare.js","./cloudflare.mjs":"./cloudflare.mjs","./fastly":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.js":"./fastly.js","./fastly.mjs":"./fastly.mjs"},"types":"./nodejs.d.ts","description":"An HTTP/REST based Redis client built on top of Upstash REST API.","repository":{"type":"git","url":"git+https://github.com/upstash/upstash-redis.git"},"keywords":["redis","database","serverless","edge","upstash"],"files":["./**"],"scripts":{"build":"tsup && cp README.md ./dist/ && cp package.json ./dist/ && cp LICENSE ./dist/","test":"bun test pkg","fmt":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","lint":"eslint \"**/*.{js,ts,tsx}\" --quiet --fix","format":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","format:check":"prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"","lint:fix":"eslint . -c .ts,.tsx,.js,.jsx --fix","commit":"cz","lint:format":"bun run lint:fix && bun run format"},"author":"Andreas Thomas <dev@chronark.com>","license":"MIT","bugs":{"url":"https://github.com/upstash/upstash-redis/issues"},"homepage":"https://github.com/upstash/upstash-redis#readme","typesVersions":{"*":{"nodejs":["./nodejs.d.ts"],"cloudflare":["./cloudflare.d.ts"],"fastly":["./fastly.d.ts"]}},"devDependencies":{"@biomejs/biome":"latest","@commitlint/cli":"^19.3.0","@commitlint/config-conventional":"^19.2.2","@types/crypto-js":"^4.1.3","@typescript-eslint/eslint-plugin":"8.4.0","@typescript-eslint/parser":"8.4.0","bun-types":"1.0.33","eslint":"9.10.0","eslint-plugin-unicorn":"55.0.0","husky":"^9.1.1","prettier":"^3.3.3","tsup":"^8.2.3","typescript":"latest"},"dependencies":{"crypto-js":"^4.2.0"}}