@upstash/redis 1.3.0-alpha.1 → 1.3.2-alpha.0
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.
- package/LICENSE +21 -0
- package/README.md +87 -41
- package/esm/package.json +3 -0
- package/esm/pkg/commands/append.js +9 -0
- package/esm/pkg/commands/bitcount.js +16 -0
- package/esm/pkg/commands/bitop.js +9 -0
- package/esm/pkg/commands/bitpos.js +9 -0
- package/esm/pkg/commands/command.js +46 -0
- package/esm/pkg/commands/dbsize.js +9 -0
- package/esm/pkg/commands/decr.js +9 -0
- package/esm/pkg/commands/decrby.js +9 -0
- package/esm/pkg/commands/del.js +9 -0
- package/esm/pkg/commands/echo.js +9 -0
- package/esm/pkg/commands/eval.js +9 -0
- package/esm/pkg/commands/evalsha.js +9 -0
- package/esm/pkg/commands/exists.js +9 -0
- package/esm/pkg/commands/expire.js +9 -0
- package/esm/pkg/commands/expireat.js +9 -0
- package/esm/pkg/commands/flushall.js +13 -0
- package/esm/pkg/commands/flushdb.js +13 -0
- package/esm/pkg/commands/get.js +9 -0
- package/esm/pkg/commands/getbit.js +9 -0
- package/esm/pkg/commands/getrange.js +9 -0
- package/esm/pkg/commands/getset.js +9 -0
- package/esm/pkg/commands/hdel.js +9 -0
- package/esm/pkg/commands/hexists.js +9 -0
- package/esm/pkg/commands/hget.js +9 -0
- package/esm/pkg/commands/hgetall.js +30 -0
- package/esm/pkg/commands/hincrby.js +9 -0
- package/esm/pkg/commands/hincrbyfloat.js +9 -0
- package/esm/pkg/commands/hkeys.js +9 -0
- package/esm/pkg/commands/hlen.js +9 -0
- package/esm/pkg/commands/hmget.js +32 -0
- package/esm/pkg/commands/hmset.js +13 -0
- package/esm/pkg/commands/hscan.js +16 -0
- package/esm/pkg/commands/hset.js +13 -0
- package/esm/pkg/commands/hsetnx.js +9 -0
- package/esm/pkg/commands/hstrlen.js +9 -0
- package/esm/pkg/commands/hvals.js +9 -0
- package/esm/pkg/commands/incr.js +9 -0
- package/esm/pkg/commands/incrby.js +9 -0
- package/esm/pkg/commands/incrbyfloat.js +9 -0
- package/esm/pkg/commands/keys.js +9 -0
- package/esm/pkg/commands/lindex.js +6 -0
- package/esm/pkg/commands/linsert.js +6 -0
- package/esm/pkg/commands/llen.js +9 -0
- package/esm/pkg/commands/lpop.js +9 -0
- package/esm/pkg/commands/lpush.js +9 -0
- package/esm/pkg/commands/lpushx.js +9 -0
- package/esm/pkg/commands/lrange.js +6 -0
- package/esm/pkg/commands/lrem.js +6 -0
- package/esm/pkg/commands/lset.js +6 -0
- package/esm/pkg/commands/ltrim.js +6 -0
- package/esm/pkg/commands/mget.js +9 -0
- package/esm/pkg/commands/mod.js +114 -0
- package/esm/pkg/commands/mset.js +12 -0
- package/esm/pkg/commands/msetnx.js +9 -0
- package/esm/pkg/commands/persist.js +9 -0
- package/esm/pkg/commands/pexpire.js +9 -0
- package/esm/pkg/commands/pexpireat.js +9 -0
- package/esm/pkg/commands/ping.js +13 -0
- package/esm/pkg/commands/psetex.js +9 -0
- package/esm/pkg/commands/pttl.js +9 -0
- package/esm/pkg/commands/publish.js +9 -0
- package/esm/pkg/commands/randomkey.js +9 -0
- package/esm/pkg/commands/rename.js +9 -0
- package/esm/pkg/commands/renamenx.js +9 -0
- package/esm/pkg/commands/rpop.js +9 -0
- package/esm/pkg/commands/rpush.js +9 -0
- package/esm/pkg/commands/rpushx.js +9 -0
- package/esm/pkg/commands/sadd.js +9 -0
- package/esm/pkg/commands/scan.js +16 -0
- package/esm/pkg/commands/scard.js +9 -0
- package/esm/pkg/commands/script_exists.js +20 -0
- package/esm/pkg/commands/script_flush.js +16 -0
- package/esm/pkg/commands/script_load.js +9 -0
- package/esm/pkg/commands/sdiff.js +9 -0
- package/esm/pkg/commands/sdiffstore.js +9 -0
- package/esm/pkg/commands/set.js +24 -0
- package/esm/pkg/commands/setbit.js +9 -0
- package/esm/pkg/commands/setex.js +9 -0
- package/esm/pkg/commands/setnx.js +9 -0
- package/esm/pkg/commands/setrange.js +9 -0
- package/esm/pkg/commands/sinter.js +9 -0
- package/esm/pkg/commands/sinterstore.js +9 -0
- package/esm/pkg/commands/sismember.js +9 -0
- package/esm/pkg/commands/smembers.js +9 -0
- package/esm/pkg/commands/smove.js +9 -0
- package/esm/pkg/commands/spop.js +13 -0
- package/esm/pkg/commands/srandmember.js +13 -0
- package/esm/pkg/commands/srem.js +9 -0
- package/esm/pkg/commands/sscan.js +16 -0
- package/esm/pkg/commands/strlen.js +9 -0
- package/esm/pkg/commands/sunion.js +9 -0
- package/esm/pkg/commands/sunionstore.js +9 -0
- package/esm/pkg/commands/time.js +9 -0
- package/esm/pkg/commands/touch.js +9 -0
- package/esm/pkg/commands/ttl.js +9 -0
- package/esm/pkg/commands/type.js +9 -0
- package/esm/pkg/commands/unlink.js +9 -0
- package/esm/pkg/commands/zadd.js +26 -0
- package/esm/pkg/commands/zcard.js +9 -0
- package/esm/pkg/commands/zcount.js +9 -0
- package/esm/pkg/commands/zincrby.js +9 -0
- package/esm/pkg/commands/zinterstore.js +27 -0
- package/esm/pkg/commands/zlexcount.js +9 -0
- package/esm/pkg/commands/zpopmax.js +13 -0
- package/esm/pkg/commands/zpopmin.js +13 -0
- package/esm/pkg/commands/zrange.js +20 -0
- package/esm/pkg/commands/zrank.js +9 -0
- package/esm/pkg/commands/zrem.js +9 -0
- package/esm/pkg/commands/zremrangebylex.js +9 -0
- package/esm/pkg/commands/zremrangebyrank.js +9 -0
- package/esm/pkg/commands/zremrangebyscore.js +9 -0
- package/esm/pkg/commands/zrevrank.js +9 -0
- package/esm/pkg/commands/zscan.js +16 -0
- package/esm/pkg/commands/zscore.js +9 -0
- package/esm/pkg/commands/zunionstore.js +27 -0
- package/esm/pkg/error.js +9 -0
- package/esm/pkg/http.js +49 -0
- package/esm/pkg/pipeline.js +1118 -0
- package/esm/pkg/redis.js +1061 -0
- package/esm/pkg/types.js +1 -0
- package/esm/pkg/util.js +31 -0
- package/esm/platforms/cloudflare.js +70 -0
- package/esm/platforms/fastly.js +49 -0
- package/esm/platforms/nodejs.js +71 -0
- package/package.json +85 -1
- package/script/package.json +3 -0
- package/script/pkg/commands/append.js +13 -0
- package/script/pkg/commands/bitcount.js +20 -0
- package/script/pkg/commands/bitop.js +13 -0
- package/script/pkg/commands/bitpos.js +13 -0
- package/script/pkg/commands/command.js +50 -0
- package/script/pkg/commands/dbsize.js +13 -0
- package/script/pkg/commands/decr.js +13 -0
- package/script/pkg/commands/decrby.js +13 -0
- package/script/pkg/commands/del.js +13 -0
- package/script/pkg/commands/echo.js +13 -0
- package/script/pkg/commands/eval.js +13 -0
- package/script/pkg/commands/evalsha.js +13 -0
- package/script/pkg/commands/exists.js +13 -0
- package/script/pkg/commands/expire.js +13 -0
- package/script/pkg/commands/expireat.js +13 -0
- package/script/pkg/commands/flushall.js +17 -0
- package/script/pkg/commands/flushdb.js +17 -0
- package/script/pkg/commands/get.js +13 -0
- package/script/pkg/commands/getbit.js +13 -0
- package/script/pkg/commands/getrange.js +13 -0
- package/script/pkg/commands/getset.js +13 -0
- package/script/pkg/commands/hdel.js +13 -0
- package/script/pkg/commands/hexists.js +13 -0
- package/script/pkg/commands/hget.js +13 -0
- package/script/pkg/commands/hgetall.js +34 -0
- package/script/pkg/commands/hincrby.js +13 -0
- package/script/pkg/commands/hincrbyfloat.js +13 -0
- package/script/pkg/commands/hkeys.js +13 -0
- package/script/pkg/commands/hlen.js +13 -0
- package/script/pkg/commands/hmget.js +36 -0
- package/script/pkg/commands/hmset.js +17 -0
- package/script/pkg/commands/hscan.js +20 -0
- package/script/pkg/commands/hset.js +17 -0
- package/script/pkg/commands/hsetnx.js +13 -0
- package/script/pkg/commands/hstrlen.js +13 -0
- package/script/pkg/commands/hvals.js +13 -0
- package/script/pkg/commands/incr.js +13 -0
- package/script/pkg/commands/incrby.js +13 -0
- package/script/pkg/commands/incrbyfloat.js +13 -0
- package/script/pkg/commands/keys.js +13 -0
- package/script/pkg/commands/lindex.js +10 -0
- package/script/pkg/commands/linsert.js +10 -0
- package/script/pkg/commands/llen.js +13 -0
- package/script/pkg/commands/lpop.js +13 -0
- package/script/pkg/commands/lpush.js +13 -0
- package/script/pkg/commands/lpushx.js +13 -0
- package/script/pkg/commands/lrange.js +10 -0
- package/script/pkg/commands/lrem.js +10 -0
- package/script/pkg/commands/lset.js +10 -0
- package/script/pkg/commands/ltrim.js +10 -0
- package/script/pkg/commands/mget.js +13 -0
- package/script/pkg/commands/mod.js +130 -0
- package/script/pkg/commands/mset.js +16 -0
- package/script/pkg/commands/msetnx.js +13 -0
- package/script/pkg/commands/persist.js +13 -0
- package/script/pkg/commands/pexpire.js +13 -0
- package/script/pkg/commands/pexpireat.js +13 -0
- package/script/pkg/commands/ping.js +17 -0
- package/script/pkg/commands/psetex.js +13 -0
- package/script/pkg/commands/pttl.js +13 -0
- package/script/pkg/commands/publish.js +13 -0
- package/script/pkg/commands/randomkey.js +13 -0
- package/script/pkg/commands/rename.js +13 -0
- package/script/pkg/commands/renamenx.js +13 -0
- package/script/pkg/commands/rpop.js +13 -0
- package/script/pkg/commands/rpush.js +13 -0
- package/script/pkg/commands/rpushx.js +13 -0
- package/script/pkg/commands/sadd.js +13 -0
- package/script/pkg/commands/scan.js +20 -0
- package/script/pkg/commands/scard.js +13 -0
- package/script/pkg/commands/script_exists.js +24 -0
- package/script/pkg/commands/script_flush.js +20 -0
- package/script/pkg/commands/script_load.js +13 -0
- package/script/pkg/commands/sdiff.js +13 -0
- package/script/pkg/commands/sdiffstore.js +13 -0
- package/script/pkg/commands/set.js +28 -0
- package/script/pkg/commands/setbit.js +13 -0
- package/script/pkg/commands/setex.js +13 -0
- package/script/pkg/commands/setnx.js +13 -0
- package/script/pkg/commands/setrange.js +13 -0
- package/script/pkg/commands/sinter.js +13 -0
- package/script/pkg/commands/sinterstore.js +13 -0
- package/script/pkg/commands/sismember.js +13 -0
- package/script/pkg/commands/smembers.js +13 -0
- package/script/pkg/commands/smove.js +13 -0
- package/script/pkg/commands/spop.js +17 -0
- package/script/pkg/commands/srandmember.js +17 -0
- package/script/pkg/commands/srem.js +13 -0
- package/script/pkg/commands/sscan.js +20 -0
- package/script/pkg/commands/strlen.js +13 -0
- package/script/pkg/commands/sunion.js +13 -0
- package/script/pkg/commands/sunionstore.js +13 -0
- package/script/pkg/commands/time.js +13 -0
- package/script/pkg/commands/touch.js +13 -0
- package/script/pkg/commands/ttl.js +13 -0
- package/script/pkg/commands/type.js +13 -0
- package/script/pkg/commands/unlink.js +13 -0
- package/script/pkg/commands/zadd.js +30 -0
- package/script/pkg/commands/zcard.js +13 -0
- package/script/pkg/commands/zcount.js +13 -0
- package/script/pkg/commands/zincrby.js +13 -0
- package/script/pkg/commands/zinterstore.js +31 -0
- package/script/pkg/commands/zlexcount.js +13 -0
- package/script/pkg/commands/zpopmax.js +17 -0
- package/script/pkg/commands/zpopmin.js +17 -0
- package/script/pkg/commands/zrange.js +24 -0
- package/script/pkg/commands/zrank.js +13 -0
- package/script/pkg/commands/zrem.js +13 -0
- package/script/pkg/commands/zremrangebylex.js +13 -0
- package/script/pkg/commands/zremrangebyrank.js +13 -0
- package/script/pkg/commands/zremrangebyscore.js +13 -0
- package/script/pkg/commands/zrevrank.js +13 -0
- package/script/pkg/commands/zscan.js +20 -0
- package/script/pkg/commands/zscore.js +13 -0
- package/script/pkg/commands/zunionstore.js +31 -0
- package/script/pkg/error.js +13 -0
- package/script/pkg/http.js +53 -0
- package/script/pkg/pipeline.js +1122 -0
- package/script/pkg/redis.js +1065 -0
- package/script/pkg/types.js +2 -0
- package/script/pkg/util.js +35 -0
- package/script/platforms/cloudflare.js +97 -0
- package/script/platforms/fastly.js +76 -0
- package/script/platforms/nodejs.js +98 -0
- package/types/pkg/commands/append.d.ts +7 -0
- package/types/pkg/commands/bitcount.d.ts +8 -0
- package/types/pkg/commands/bitop.d.ts +8 -0
- package/types/pkg/commands/bitpos.d.ts +7 -0
- package/types/pkg/commands/command.d.ts +23 -0
- package/types/pkg/commands/dbsize.d.ts +7 -0
- package/types/pkg/commands/decr.d.ts +7 -0
- package/types/pkg/commands/decrby.d.ts +7 -0
- package/types/pkg/commands/del.d.ts +8 -0
- package/types/pkg/commands/echo.d.ts +7 -0
- package/types/pkg/commands/eval.d.ts +7 -0
- package/types/pkg/commands/evalsha.d.ts +7 -0
- package/types/pkg/commands/exists.d.ts +8 -0
- package/types/pkg/commands/expire.d.ts +7 -0
- package/types/pkg/commands/expireat.d.ts +7 -0
- package/types/pkg/commands/flushall.d.ts +9 -0
- package/types/pkg/commands/flushdb.d.ts +9 -0
- package/types/pkg/commands/get.d.ts +7 -0
- package/types/pkg/commands/getbit.d.ts +7 -0
- package/types/pkg/commands/getrange.d.ts +7 -0
- package/types/pkg/commands/getset.d.ts +7 -0
- package/types/pkg/commands/hdel.d.ts +7 -0
- package/types/pkg/commands/hexists.d.ts +7 -0
- package/types/pkg/commands/hget.d.ts +7 -0
- package/types/pkg/commands/hgetall.d.ts +7 -0
- package/types/pkg/commands/hincrby.d.ts +7 -0
- package/types/pkg/commands/hincrbyfloat.d.ts +7 -0
- package/types/pkg/commands/hkeys.d.ts +7 -0
- package/types/pkg/commands/hlen.d.ts +7 -0
- package/types/pkg/commands/hmget.d.ts +15 -0
- package/types/pkg/commands/hmset.d.ts +9 -0
- package/types/pkg/commands/hscan.d.ts +14 -0
- package/types/pkg/commands/hset.d.ts +9 -0
- package/types/pkg/commands/hsetnx.d.ts +7 -0
- package/types/pkg/commands/hstrlen.d.ts +7 -0
- package/types/pkg/commands/hvals.d.ts +7 -0
- package/types/pkg/commands/incr.d.ts +7 -0
- package/types/pkg/commands/incrby.d.ts +7 -0
- package/types/pkg/commands/incrbyfloat.d.ts +7 -0
- package/types/pkg/commands/keys.d.ts +7 -0
- package/types/pkg/commands/lindex.d.ts +4 -0
- package/types/pkg/commands/linsert.d.ts +4 -0
- package/types/pkg/commands/llen.d.ts +7 -0
- package/types/pkg/commands/lpop.d.ts +7 -0
- package/types/pkg/commands/lpush.d.ts +8 -0
- package/types/pkg/commands/lpushx.d.ts +8 -0
- package/types/pkg/commands/lrange.d.ts +4 -0
- package/types/pkg/commands/lrem.d.ts +4 -0
- package/types/pkg/commands/lset.d.ts +4 -0
- package/types/pkg/commands/ltrim.d.ts +4 -0
- package/types/pkg/commands/mget.d.ts +7 -0
- package/types/pkg/commands/mod.d.ts +114 -0
- package/types/pkg/commands/mset.d.ts +9 -0
- package/types/pkg/commands/msetnx.d.ts +9 -0
- package/types/pkg/commands/persist.d.ts +7 -0
- package/types/pkg/commands/pexpire.d.ts +7 -0
- package/types/pkg/commands/pexpireat.d.ts +7 -0
- package/types/pkg/commands/ping.d.ts +7 -0
- package/types/pkg/commands/psetex.d.ts +7 -0
- package/types/pkg/commands/pttl.d.ts +7 -0
- package/types/pkg/commands/publish.d.ts +7 -0
- package/types/pkg/commands/randomkey.d.ts +7 -0
- package/types/pkg/commands/rename.d.ts +7 -0
- package/types/pkg/commands/renamenx.d.ts +7 -0
- package/types/pkg/commands/rpop.d.ts +7 -0
- package/types/pkg/commands/rpush.d.ts +8 -0
- package/types/pkg/commands/rpushx.d.ts +8 -0
- package/types/pkg/commands/sadd.d.ts +8 -0
- package/types/pkg/commands/scan.d.ts +11 -0
- package/types/pkg/commands/scard.d.ts +7 -0
- package/types/pkg/commands/script_exists.d.ts +12 -0
- package/types/pkg/commands/script_flush.d.ts +14 -0
- package/types/pkg/commands/script_load.d.ts +7 -0
- package/types/pkg/commands/sdiff.d.ts +7 -0
- package/types/pkg/commands/sdiffstore.d.ts +8 -0
- package/types/pkg/commands/set.d.ts +26 -0
- package/types/pkg/commands/setbit.d.ts +7 -0
- package/types/pkg/commands/setex.d.ts +7 -0
- package/types/pkg/commands/setnx.d.ts +7 -0
- package/types/pkg/commands/setrange.d.ts +7 -0
- package/types/pkg/commands/sinter.d.ts +7 -0
- package/types/pkg/commands/sinterstore.d.ts +7 -0
- package/types/pkg/commands/sismember.d.ts +7 -0
- package/types/pkg/commands/smembers.d.ts +7 -0
- package/types/pkg/commands/smove.d.ts +7 -0
- package/types/pkg/commands/spop.d.ts +7 -0
- package/types/pkg/commands/srandmember.d.ts +7 -0
- package/types/pkg/commands/srem.d.ts +8 -0
- package/types/pkg/commands/sscan.d.ts +14 -0
- package/types/pkg/commands/strlen.d.ts +7 -0
- package/types/pkg/commands/sunion.d.ts +7 -0
- package/types/pkg/commands/sunionstore.d.ts +7 -0
- package/types/pkg/commands/time.d.ts +7 -0
- package/types/pkg/commands/touch.d.ts +8 -0
- package/types/pkg/commands/ttl.d.ts +7 -0
- package/types/pkg/commands/type.d.ts +8 -0
- package/types/pkg/commands/unlink.d.ts +7 -0
- package/types/pkg/commands/zadd.d.ts +27 -0
- package/types/pkg/commands/zcard.d.ts +7 -0
- package/types/pkg/commands/zcount.d.ts +7 -0
- package/types/pkg/commands/zincrby.d.ts +7 -0
- package/types/pkg/commands/zinterstore.d.ts +20 -0
- package/types/pkg/commands/zlexcount.d.ts +7 -0
- package/types/pkg/commands/zpopmax.d.ts +7 -0
- package/types/pkg/commands/zpopmin.d.ts +7 -0
- package/types/pkg/commands/zrange.d.ts +25 -0
- package/types/pkg/commands/zrank.d.ts +7 -0
- package/types/pkg/commands/zrem.d.ts +8 -0
- package/types/pkg/commands/zremrangebylex.d.ts +7 -0
- package/types/pkg/commands/zremrangebyrank.d.ts +7 -0
- package/types/pkg/commands/zremrangebyscore.d.ts +7 -0
- package/types/pkg/commands/zrevrank.d.ts +7 -0
- package/types/pkg/commands/zscan.d.ts +14 -0
- package/types/pkg/commands/zscore.d.ts +7 -0
- package/types/pkg/commands/zunionstore.d.ts +20 -0
- package/types/pkg/error.d.ts +6 -0
- package/{http.d.ts → types/pkg/http.d.ts} +8 -7
- package/types/pkg/pipeline.d.ts +543 -0
- package/types/pkg/redis.d.ts +509 -0
- package/types/pkg/types.d.ts +2 -0
- package/types/pkg/util.d.ts +1 -0
- package/{cloudflare.d.ts → types/platforms/cloudflare.d.ts} +5 -8
- package/{fastly.d.ts → types/platforms/fastly.d.ts} +5 -8
- package/types/platforms/nodejs.d.ts +81 -0
- package/chunk-5567SQFQ.mjs +0 -1088
- package/chunk-7YUZYRJS.mjs +0 -29
- package/chunk-HIDCSH5S.mjs +0 -36
- package/chunk-KI7YOGWS.mjs +0 -429
- package/chunk-T3BIHZ2F.mjs +0 -38
- package/cloudflare.js +0 -1390
- package/cloudflare.mjs +0 -36
- package/commands.d.ts +0 -734
- package/commands.js +0 -1231
- package/commands.mjs +0 -225
- package/fastly.js +0 -1379
- package/fastly.mjs +0 -25
- package/http.js +0 -83
- package/http.mjs +0 -7
- package/index.d.ts +0 -13
- package/index.js +0 -1395
- package/index.mjs +0 -13
- package/nodejs.d.ts +0 -47
- package/nodejs.js +0 -1393
- package/nodejs.mjs +0 -10
- package/redis-364a4445.d.ts +0 -1064
- package/zunionstore-342168a6.d.ts +0 -173
package/chunk-7YUZYRJS.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
-
var __spreadValues = (a, b) => {
|
|
7
|
-
for (var prop in b || (b = {}))
|
|
8
|
-
if (__hasOwnProp.call(b, prop))
|
|
9
|
-
__defNormalProp(a, prop, b[prop]);
|
|
10
|
-
if (__getOwnPropSymbols)
|
|
11
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
-
if (__propIsEnum.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
}
|
|
15
|
-
return a;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
// pkg/error.ts
|
|
19
|
-
var UpstashError = class extends Error {
|
|
20
|
-
constructor(message) {
|
|
21
|
-
super(message);
|
|
22
|
-
this.name = "UpstashError";
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export {
|
|
27
|
-
__spreadValues,
|
|
28
|
-
UpstashError
|
|
29
|
-
};
|
package/chunk-HIDCSH5S.mjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
UpstashError,
|
|
3
|
-
__spreadValues
|
|
4
|
-
} from "./chunk-7YUZYRJS.mjs";
|
|
5
|
-
|
|
6
|
-
// pkg/http.ts
|
|
7
|
-
var HttpClient = class {
|
|
8
|
-
constructor(config) {
|
|
9
|
-
this.baseUrl = config.baseUrl.replace(/\/$/, "");
|
|
10
|
-
this.headers = __spreadValues({
|
|
11
|
-
"Content-Type": "application/json"
|
|
12
|
-
}, config.headers);
|
|
13
|
-
this.options = config.options;
|
|
14
|
-
}
|
|
15
|
-
async request(req) {
|
|
16
|
-
var _a;
|
|
17
|
-
if (!req.path) {
|
|
18
|
-
req.path = [];
|
|
19
|
-
}
|
|
20
|
-
const res = await fetch([this.baseUrl, ...req.path].join("/"), {
|
|
21
|
-
method: "POST",
|
|
22
|
-
headers: this.headers,
|
|
23
|
-
body: JSON.stringify(req.body),
|
|
24
|
-
backend: (_a = this.options) == null ? void 0 : _a.backend
|
|
25
|
-
});
|
|
26
|
-
const body = await res.json();
|
|
27
|
-
if (!res.ok) {
|
|
28
|
-
throw new UpstashError(body.error);
|
|
29
|
-
}
|
|
30
|
-
return body;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export {
|
|
35
|
-
HttpClient
|
|
36
|
-
};
|
package/chunk-KI7YOGWS.mjs
DELETED
|
@@ -1,429 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AppendCommand,
|
|
3
|
-
BitCountCommand,
|
|
4
|
-
BitOpCommand,
|
|
5
|
-
BitPosCommand,
|
|
6
|
-
Command,
|
|
7
|
-
DBSizeCommand,
|
|
8
|
-
DecrByCommand,
|
|
9
|
-
DecrCommand,
|
|
10
|
-
DelCommand,
|
|
11
|
-
EchoCommand,
|
|
12
|
-
EvalCommand,
|
|
13
|
-
ExistsCommand,
|
|
14
|
-
ExpireAtCommand,
|
|
15
|
-
ExpireCommand,
|
|
16
|
-
FlushAllCommand,
|
|
17
|
-
FlushDBCommand,
|
|
18
|
-
GetBitCommand,
|
|
19
|
-
GetCommand,
|
|
20
|
-
GetRangeCommand,
|
|
21
|
-
GetSetCommand,
|
|
22
|
-
HDelCommand,
|
|
23
|
-
HExistsCommand,
|
|
24
|
-
HGetAllCommand,
|
|
25
|
-
HGetCommand,
|
|
26
|
-
HIncrByCommand,
|
|
27
|
-
HIncrByFloatCommand,
|
|
28
|
-
HKeysCommand,
|
|
29
|
-
HLenCommand,
|
|
30
|
-
HMGetCommand,
|
|
31
|
-
HMSetCommand,
|
|
32
|
-
HScanCommand,
|
|
33
|
-
HSetCommand,
|
|
34
|
-
HSetNXCommand,
|
|
35
|
-
HStrLenCommand,
|
|
36
|
-
HValsCommand,
|
|
37
|
-
IncrByCommand,
|
|
38
|
-
IncrByFloatCommand,
|
|
39
|
-
IncrCommand,
|
|
40
|
-
KeysCommand,
|
|
41
|
-
LIndexCommand,
|
|
42
|
-
LInsertCommand,
|
|
43
|
-
LLenCommand,
|
|
44
|
-
LPopCommand,
|
|
45
|
-
LPushCommand,
|
|
46
|
-
LPushXCommand,
|
|
47
|
-
LRangeCommand,
|
|
48
|
-
LRemCommand,
|
|
49
|
-
LSetCommand,
|
|
50
|
-
LTrimCommand,
|
|
51
|
-
MGetCommand,
|
|
52
|
-
MSetCommand,
|
|
53
|
-
MSetNXCommand,
|
|
54
|
-
PExpireAtCommand,
|
|
55
|
-
PExpireCommand,
|
|
56
|
-
PSetEXCommand,
|
|
57
|
-
PTtlCommand,
|
|
58
|
-
PersistCommand,
|
|
59
|
-
PingCommand,
|
|
60
|
-
PublishCommand,
|
|
61
|
-
RPopCommand,
|
|
62
|
-
RPushCommand,
|
|
63
|
-
RPushXCommand,
|
|
64
|
-
RandomKeyCommand,
|
|
65
|
-
RenameCommand,
|
|
66
|
-
RenameNXCommand,
|
|
67
|
-
SAddCommand,
|
|
68
|
-
SCardCommand,
|
|
69
|
-
SDiffCommand,
|
|
70
|
-
SDiffStoreCommand,
|
|
71
|
-
SInterCommand,
|
|
72
|
-
SInterStoreCommand,
|
|
73
|
-
SIsMemberCommand,
|
|
74
|
-
SMembersCommand,
|
|
75
|
-
SMoveCommand,
|
|
76
|
-
SPopCommand,
|
|
77
|
-
SRandMemberCommand,
|
|
78
|
-
SRemCommand,
|
|
79
|
-
SScanCommand,
|
|
80
|
-
SUnionCommand,
|
|
81
|
-
SUnionStoreCommand,
|
|
82
|
-
ScanCommand,
|
|
83
|
-
SetBitCommand,
|
|
84
|
-
SetCommand,
|
|
85
|
-
SetExCommand,
|
|
86
|
-
SetNxCommand,
|
|
87
|
-
SetRangeCommand,
|
|
88
|
-
StrLenCommand,
|
|
89
|
-
TimeCommand,
|
|
90
|
-
TouchCommand,
|
|
91
|
-
TtlCommand,
|
|
92
|
-
TypeCommand,
|
|
93
|
-
UnlinkCommand,
|
|
94
|
-
ZAddCommand,
|
|
95
|
-
ZCardCommand,
|
|
96
|
-
ZCountCommand,
|
|
97
|
-
ZIncrByComand,
|
|
98
|
-
ZInterStoreCommand,
|
|
99
|
-
ZLexCountCommand,
|
|
100
|
-
ZPopMaxCommand,
|
|
101
|
-
ZPopMinCommand,
|
|
102
|
-
ZRangeCommand,
|
|
103
|
-
ZRankCommand,
|
|
104
|
-
ZRemCommand,
|
|
105
|
-
ZRemRangeByLexCommand,
|
|
106
|
-
ZRemRangeByRankCommand,
|
|
107
|
-
ZRemRangeByScoreCommand,
|
|
108
|
-
ZRevRankCommand,
|
|
109
|
-
ZScanCommand,
|
|
110
|
-
ZScoreCommand,
|
|
111
|
-
ZUnionStoreCommand
|
|
112
|
-
} from "./chunk-5567SQFQ.mjs";
|
|
113
|
-
import {
|
|
114
|
-
UpstashError
|
|
115
|
-
} from "./chunk-7YUZYRJS.mjs";
|
|
116
|
-
|
|
117
|
-
// pkg/commands/evalsha.ts
|
|
118
|
-
var EvalshaCommand = class extends Command {
|
|
119
|
-
constructor(sha, keys, args) {
|
|
120
|
-
super(["evalsha", sha, keys.length, ...keys, ...args != null ? args : []]);
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
// pkg/commands/script_exists.ts
|
|
125
|
-
var ScriptExistsCommand = class extends Command {
|
|
126
|
-
constructor(...hash) {
|
|
127
|
-
super(["script", "exists", ...hash], {
|
|
128
|
-
deserialize: (result) => {
|
|
129
|
-
const parsed = result;
|
|
130
|
-
return parsed.length === 1 ? parsed[0] : parsed;
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
// pkg/commands/script_flush.ts
|
|
137
|
-
var ScriptFlushCommand = class extends Command {
|
|
138
|
-
constructor(opts) {
|
|
139
|
-
const cmd = ["script", "flush"];
|
|
140
|
-
if (opts == null ? void 0 : opts.sync) {
|
|
141
|
-
cmd.push("sync");
|
|
142
|
-
} else if (opts == null ? void 0 : opts.async) {
|
|
143
|
-
cmd.push("async");
|
|
144
|
-
}
|
|
145
|
-
super(cmd);
|
|
146
|
-
}
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
// pkg/commands/script_load.ts
|
|
150
|
-
var ScriptLoadCommand = class extends Command {
|
|
151
|
-
constructor(script) {
|
|
152
|
-
super(["script", "load", script]);
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
// pkg/pipeline.ts
|
|
157
|
-
var Pipeline = class {
|
|
158
|
-
constructor(client) {
|
|
159
|
-
this.exec = async () => {
|
|
160
|
-
if (this.commands.length === 0) {
|
|
161
|
-
throw new Error("Pipeline is empty");
|
|
162
|
-
}
|
|
163
|
-
const res = await this.client.request({
|
|
164
|
-
path: ["pipeline"],
|
|
165
|
-
body: Object.values(this.commands).map((c) => c.command)
|
|
166
|
-
});
|
|
167
|
-
return res.map(({ error, result }, i) => {
|
|
168
|
-
if (error) {
|
|
169
|
-
throw new UpstashError(`Command ${i + 1} [ ${this.commands[i].command[0]} ] failed: ${error}`);
|
|
170
|
-
}
|
|
171
|
-
return this.commands[i].deserialize(result);
|
|
172
|
-
});
|
|
173
|
-
};
|
|
174
|
-
this.append = (...args) => this.chain(new AppendCommand(...args));
|
|
175
|
-
this.bitcount = (...args) => this.chain(new BitCountCommand(...args));
|
|
176
|
-
this.bitop = (op, destinationKey, sourceKey, ...sourceKeys) => this.chain(new BitOpCommand(op, destinationKey, sourceKey, ...sourceKeys));
|
|
177
|
-
this.bitpos = (...args) => this.chain(new BitPosCommand(...args));
|
|
178
|
-
this.dbsize = () => this.chain(new DBSizeCommand());
|
|
179
|
-
this.decr = (...args) => this.chain(new DecrCommand(...args));
|
|
180
|
-
this.decrby = (...args) => this.chain(new DecrByCommand(...args));
|
|
181
|
-
this.del = (...args) => this.chain(new DelCommand(...args));
|
|
182
|
-
this.echo = (...args) => this.chain(new EchoCommand(...args));
|
|
183
|
-
this.eval = (...args) => this.chain(new EvalCommand(...args));
|
|
184
|
-
this.evalsha = (...args) => this.chain(new EvalshaCommand(...args));
|
|
185
|
-
this.exists = (...args) => this.chain(new ExistsCommand(...args));
|
|
186
|
-
this.expire = (...args) => this.chain(new ExpireCommand(...args));
|
|
187
|
-
this.expireat = (...args) => this.chain(new ExpireAtCommand(...args));
|
|
188
|
-
this.flushall = (...args) => this.chain(new FlushAllCommand(...args));
|
|
189
|
-
this.flushdb = (...args) => this.chain(new FlushDBCommand(...args));
|
|
190
|
-
this.get = (...args) => this.chain(new GetCommand(...args));
|
|
191
|
-
this.getbit = (...args) => this.chain(new GetBitCommand(...args));
|
|
192
|
-
this.getrange = (...args) => this.chain(new GetRangeCommand(...args));
|
|
193
|
-
this.getset = (key, value) => this.chain(new GetSetCommand(key, value));
|
|
194
|
-
this.hdel = (...args) => this.chain(new HDelCommand(...args));
|
|
195
|
-
this.hexists = (...args) => this.chain(new HExistsCommand(...args));
|
|
196
|
-
this.hget = (...args) => this.chain(new HGetCommand(...args));
|
|
197
|
-
this.hgetall = (...args) => this.chain(new HGetAllCommand(...args));
|
|
198
|
-
this.hincrby = (...args) => this.chain(new HIncrByCommand(...args));
|
|
199
|
-
this.hincrbyfloat = (...args) => this.chain(new HIncrByFloatCommand(...args));
|
|
200
|
-
this.hkeys = (...args) => this.chain(new HKeysCommand(...args));
|
|
201
|
-
this.hlen = (...args) => this.chain(new HLenCommand(...args));
|
|
202
|
-
this.hmget = (...args) => this.chain(new HMGetCommand(...args));
|
|
203
|
-
this.hmset = (key, kv) => this.chain(new HMSetCommand(key, kv));
|
|
204
|
-
this.hscan = (...args) => this.chain(new HScanCommand(...args));
|
|
205
|
-
this.hset = (key, kv) => this.chain(new HSetCommand(key, kv));
|
|
206
|
-
this.hsetnx = (key, field, value) => this.chain(new HSetNXCommand(key, field, value));
|
|
207
|
-
this.hstrlen = (...args) => this.chain(new HStrLenCommand(...args));
|
|
208
|
-
this.hvals = (...args) => this.chain(new HValsCommand(...args));
|
|
209
|
-
this.incr = (...args) => this.chain(new IncrCommand(...args));
|
|
210
|
-
this.incrby = (...args) => this.chain(new IncrByCommand(...args));
|
|
211
|
-
this.incrbyfloat = (...args) => this.chain(new IncrByFloatCommand(...args));
|
|
212
|
-
this.keys = (...args) => this.chain(new KeysCommand(...args));
|
|
213
|
-
this.lindex = (...args) => this.chain(new LIndexCommand(...args));
|
|
214
|
-
this.linsert = (key, direction, pivot, value) => this.chain(new LInsertCommand(key, direction, pivot, value));
|
|
215
|
-
this.llen = (...args) => this.chain(new LLenCommand(...args));
|
|
216
|
-
this.lpop = (...args) => this.chain(new LPopCommand(...args));
|
|
217
|
-
this.lpush = (key, ...elements) => this.chain(new LPushCommand(key, ...elements));
|
|
218
|
-
this.lpushx = (key, ...elements) => this.chain(new LPushXCommand(key, ...elements));
|
|
219
|
-
this.lrange = (...args) => this.chain(new LRangeCommand(...args));
|
|
220
|
-
this.lrem = (key, count, value) => this.chain(new LRemCommand(key, count, value));
|
|
221
|
-
this.lset = (key, value, index) => this.chain(new LSetCommand(key, value, index));
|
|
222
|
-
this.ltrim = (...args) => this.chain(new LTrimCommand(...args));
|
|
223
|
-
this.mget = (...args) => this.chain(new MGetCommand(...args));
|
|
224
|
-
this.mset = (kv) => this.chain(new MSetCommand(kv));
|
|
225
|
-
this.msetnx = (kv) => this.chain(new MSetNXCommand(kv));
|
|
226
|
-
this.persist = (...args) => this.chain(new PersistCommand(...args));
|
|
227
|
-
this.pexpire = (...args) => this.chain(new PExpireCommand(...args));
|
|
228
|
-
this.pexpireat = (...args) => this.chain(new PExpireAtCommand(...args));
|
|
229
|
-
this.ping = (...args) => this.chain(new PingCommand(...args));
|
|
230
|
-
this.psetex = (key, ttl, value) => this.chain(new PSetEXCommand(key, ttl, value));
|
|
231
|
-
this.pttl = (...args) => this.chain(new PTtlCommand(...args));
|
|
232
|
-
this.publish = (...args) => this.chain(new PublishCommand(...args));
|
|
233
|
-
this.randomkey = () => this.chain(new RandomKeyCommand());
|
|
234
|
-
this.rename = (...args) => this.chain(new RenameCommand(...args));
|
|
235
|
-
this.renamenx = (...args) => this.chain(new RenameNXCommand(...args));
|
|
236
|
-
this.rpop = (...args) => this.chain(new RPopCommand(...args));
|
|
237
|
-
this.rpush = (key, ...elements) => this.chain(new RPushCommand(key, ...elements));
|
|
238
|
-
this.rpushx = (key, ...elements) => this.chain(new RPushXCommand(key, ...elements));
|
|
239
|
-
this.sadd = (key, ...members) => this.chain(new SAddCommand(key, ...members));
|
|
240
|
-
this.scan = (...args) => this.chain(new ScanCommand(...args));
|
|
241
|
-
this.scard = (...args) => this.chain(new SCardCommand(...args));
|
|
242
|
-
this.scriptExists = (...args) => this.chain(new ScriptExistsCommand(...args));
|
|
243
|
-
this.scriptFlush = (...args) => this.chain(new ScriptFlushCommand(...args));
|
|
244
|
-
this.scriptLoad = (...args) => this.chain(new ScriptLoadCommand(...args));
|
|
245
|
-
this.sdiff = (...args) => this.chain(new SDiffCommand(...args));
|
|
246
|
-
this.sdiffstore = (...args) => this.chain(new SDiffStoreCommand(...args));
|
|
247
|
-
this.set = (key, value, opts) => this.chain(new SetCommand(key, value, opts));
|
|
248
|
-
this.setbit = (...args) => this.chain(new SetBitCommand(...args));
|
|
249
|
-
this.setex = (key, ttl, value) => this.chain(new SetExCommand(key, ttl, value));
|
|
250
|
-
this.setnx = (key, value) => this.chain(new SetNxCommand(key, value));
|
|
251
|
-
this.setrange = (...args) => this.chain(new SetRangeCommand(...args));
|
|
252
|
-
this.sinter = (...args) => this.chain(new SInterCommand(...args));
|
|
253
|
-
this.sinterstore = (...args) => this.chain(new SInterStoreCommand(...args));
|
|
254
|
-
this.sismember = (key, member) => this.chain(new SIsMemberCommand(key, member));
|
|
255
|
-
this.smembers = (...args) => this.chain(new SMembersCommand(...args));
|
|
256
|
-
this.smove = (source, destination, member) => this.chain(new SMoveCommand(source, destination, member));
|
|
257
|
-
this.spop = (...args) => this.chain(new SPopCommand(...args));
|
|
258
|
-
this.srandmember = (...args) => this.chain(new SRandMemberCommand(...args));
|
|
259
|
-
this.srem = (key, ...members) => this.chain(new SRemCommand(key, ...members));
|
|
260
|
-
this.sscan = (...args) => this.chain(new SScanCommand(...args));
|
|
261
|
-
this.strlen = (...args) => this.chain(new StrLenCommand(...args));
|
|
262
|
-
this.sunion = (...args) => this.chain(new SUnionCommand(...args));
|
|
263
|
-
this.sunionstore = (...args) => this.chain(new SUnionStoreCommand(...args));
|
|
264
|
-
this.time = () => this.chain(new TimeCommand());
|
|
265
|
-
this.touch = (...args) => this.chain(new TouchCommand(...args));
|
|
266
|
-
this.ttl = (...args) => this.chain(new TtlCommand(...args));
|
|
267
|
-
this.type = (...args) => this.chain(new TypeCommand(...args));
|
|
268
|
-
this.unlink = (...args) => this.chain(new UnlinkCommand(...args));
|
|
269
|
-
this.zadd = (...args) => {
|
|
270
|
-
if ("score" in args[1]) {
|
|
271
|
-
return this.chain(new ZAddCommand(args[0], args[1], ...args.slice(2)));
|
|
272
|
-
}
|
|
273
|
-
return this.chain(new ZAddCommand(args[0], args[1], ...args.slice(2)));
|
|
274
|
-
};
|
|
275
|
-
this.zcard = (...args) => this.chain(new ZCardCommand(...args));
|
|
276
|
-
this.zcount = (...args) => this.chain(new ZCountCommand(...args));
|
|
277
|
-
this.zincrby = (key, increment, member) => this.chain(new ZIncrByComand(key, increment, member));
|
|
278
|
-
this.zinterstore = (...args) => this.chain(new ZInterStoreCommand(...args));
|
|
279
|
-
this.zlexcount = (...args) => this.chain(new ZLexCountCommand(...args));
|
|
280
|
-
this.zpopmax = (...args) => this.chain(new ZPopMaxCommand(...args));
|
|
281
|
-
this.zpopmin = (...args) => this.chain(new ZPopMinCommand(...args));
|
|
282
|
-
this.zrange = (...args) => this.chain(new ZRangeCommand(args[0], args[1], args[2], args[3]));
|
|
283
|
-
this.zrank = (key, member) => this.chain(new ZRankCommand(key, member));
|
|
284
|
-
this.zrem = (key, ...members) => this.chain(new ZRemCommand(key, ...members));
|
|
285
|
-
this.zremrangebylex = (...args) => this.chain(new ZRemRangeByLexCommand(...args));
|
|
286
|
-
this.zremrangebyrank = (...args) => this.chain(new ZRemRangeByRankCommand(...args));
|
|
287
|
-
this.zremrangebyscore = (...args) => this.chain(new ZRemRangeByScoreCommand(...args));
|
|
288
|
-
this.zrevrank = (key, member) => this.chain(new ZRevRankCommand(key, member));
|
|
289
|
-
this.zscan = (...args) => this.chain(new ZScanCommand(...args));
|
|
290
|
-
this.zscore = (key, member) => this.chain(new ZScoreCommand(key, member));
|
|
291
|
-
this.zunionstore = (...args) => this.chain(new ZUnionStoreCommand(...args));
|
|
292
|
-
this.client = client;
|
|
293
|
-
this.commands = [];
|
|
294
|
-
}
|
|
295
|
-
chain(command) {
|
|
296
|
-
this.commands.push(command);
|
|
297
|
-
return this;
|
|
298
|
-
}
|
|
299
|
-
};
|
|
300
|
-
|
|
301
|
-
// pkg/redis.ts
|
|
302
|
-
var Redis = class {
|
|
303
|
-
constructor(client) {
|
|
304
|
-
this.pipeline = () => new Pipeline(this.client);
|
|
305
|
-
this.append = (...args) => new AppendCommand(...args).exec(this.client);
|
|
306
|
-
this.bitcount = (...args) => new BitCountCommand(...args).exec(this.client);
|
|
307
|
-
this.bitop = (op, destinationKey, sourceKey, ...sourceKeys) => new BitOpCommand(op, destinationKey, sourceKey, ...sourceKeys).exec(this.client);
|
|
308
|
-
this.bitpos = (...args) => new BitPosCommand(...args).exec(this.client);
|
|
309
|
-
this.dbsize = () => new DBSizeCommand().exec(this.client);
|
|
310
|
-
this.decr = (...args) => new DecrCommand(...args).exec(this.client);
|
|
311
|
-
this.decrby = (...args) => new DecrByCommand(...args).exec(this.client);
|
|
312
|
-
this.del = (...args) => new DelCommand(...args).exec(this.client);
|
|
313
|
-
this.echo = (...args) => new EchoCommand(...args).exec(this.client);
|
|
314
|
-
this.eval = (...args) => new EvalCommand(...args).exec(this.client);
|
|
315
|
-
this.evalsha = (...args) => new EvalshaCommand(...args).exec(this.client);
|
|
316
|
-
this.exists = (...args) => new ExistsCommand(...args).exec(this.client);
|
|
317
|
-
this.expire = (...args) => new ExpireCommand(...args).exec(this.client);
|
|
318
|
-
this.expireat = (...args) => new ExpireAtCommand(...args).exec(this.client);
|
|
319
|
-
this.flushall = (...args) => new FlushAllCommand(...args).exec(this.client);
|
|
320
|
-
this.flushdb = (...args) => new FlushDBCommand(...args).exec(this.client);
|
|
321
|
-
this.get = (...args) => new GetCommand(...args).exec(this.client);
|
|
322
|
-
this.getbit = (...args) => new GetBitCommand(...args).exec(this.client);
|
|
323
|
-
this.getrange = (...args) => new GetRangeCommand(...args).exec(this.client);
|
|
324
|
-
this.getset = (key, value) => new GetSetCommand(key, value).exec(this.client);
|
|
325
|
-
this.hdel = (...args) => new HDelCommand(...args).exec(this.client);
|
|
326
|
-
this.hexists = (...args) => new HExistsCommand(...args).exec(this.client);
|
|
327
|
-
this.hget = (...args) => new HGetCommand(...args).exec(this.client);
|
|
328
|
-
this.hgetall = (...args) => new HGetAllCommand(...args).exec(this.client);
|
|
329
|
-
this.hincrby = (...args) => new HIncrByCommand(...args).exec(this.client);
|
|
330
|
-
this.hincrbyfloat = (...args) => new HIncrByFloatCommand(...args).exec(this.client);
|
|
331
|
-
this.hkeys = (...args) => new HKeysCommand(...args).exec(this.client);
|
|
332
|
-
this.hlen = (...args) => new HLenCommand(...args).exec(this.client);
|
|
333
|
-
this.hmget = (...args) => new HMGetCommand(...args).exec(this.client);
|
|
334
|
-
this.hmset = (key, kv) => new HMSetCommand(key, kv).exec(this.client);
|
|
335
|
-
this.hscan = (...args) => new HScanCommand(...args).exec(this.client);
|
|
336
|
-
this.hset = (key, kv) => new HSetCommand(key, kv).exec(this.client);
|
|
337
|
-
this.hsetnx = (key, field, value) => new HSetNXCommand(key, field, value).exec(this.client);
|
|
338
|
-
this.hstrlen = (...args) => new HStrLenCommand(...args).exec(this.client);
|
|
339
|
-
this.hvals = (...args) => new HValsCommand(...args).exec(this.client);
|
|
340
|
-
this.incr = (...args) => new IncrCommand(...args).exec(this.client);
|
|
341
|
-
this.incrby = (...args) => new IncrByCommand(...args).exec(this.client);
|
|
342
|
-
this.incrbyfloat = (...args) => new IncrByFloatCommand(...args).exec(this.client);
|
|
343
|
-
this.keys = (...args) => new KeysCommand(...args).exec(this.client);
|
|
344
|
-
this.lindex = (...args) => new LIndexCommand(...args).exec(this.client);
|
|
345
|
-
this.linsert = (key, direction, pivot, value) => new LInsertCommand(key, direction, pivot, value).exec(this.client);
|
|
346
|
-
this.llen = (...args) => new LLenCommand(...args).exec(this.client);
|
|
347
|
-
this.lpop = (...args) => new LPopCommand(...args).exec(this.client);
|
|
348
|
-
this.lpush = (key, ...elements) => new LPushCommand(key, ...elements).exec(this.client);
|
|
349
|
-
this.lpushx = (key, ...elements) => new LPushXCommand(key, ...elements).exec(this.client);
|
|
350
|
-
this.lrange = (...args) => new LRangeCommand(...args).exec(this.client);
|
|
351
|
-
this.lrem = (key, count, value) => new LRemCommand(key, count, value).exec(this.client);
|
|
352
|
-
this.lset = (key, value, index) => new LSetCommand(key, value, index).exec(this.client);
|
|
353
|
-
this.ltrim = (...args) => new LTrimCommand(...args).exec(this.client);
|
|
354
|
-
this.mget = (...args) => new MGetCommand(...args).exec(this.client);
|
|
355
|
-
this.mset = (kv) => new MSetCommand(kv).exec(this.client);
|
|
356
|
-
this.msetnx = (kv) => new MSetNXCommand(kv).exec(this.client);
|
|
357
|
-
this.persist = (...args) => new PersistCommand(...args).exec(this.client);
|
|
358
|
-
this.pexpire = (...args) => new PExpireCommand(...args).exec(this.client);
|
|
359
|
-
this.pexpireat = (...args) => new PExpireAtCommand(...args).exec(this.client);
|
|
360
|
-
this.ping = (...args) => new PingCommand(...args).exec(this.client);
|
|
361
|
-
this.psetex = (key, ttl, value) => new PSetEXCommand(key, ttl, value).exec(this.client);
|
|
362
|
-
this.pttl = (...args) => new PTtlCommand(...args).exec(this.client);
|
|
363
|
-
this.publish = (...args) => new PublishCommand(...args).exec(this.client);
|
|
364
|
-
this.randomkey = () => new RandomKeyCommand().exec(this.client);
|
|
365
|
-
this.rename = (...args) => new RenameCommand(...args).exec(this.client);
|
|
366
|
-
this.renamenx = (...args) => new RenameNXCommand(...args).exec(this.client);
|
|
367
|
-
this.rpop = (...args) => new RPopCommand(...args).exec(this.client);
|
|
368
|
-
this.rpush = (key, ...elements) => new RPushCommand(key, ...elements).exec(this.client);
|
|
369
|
-
this.rpushx = (key, ...elements) => new RPushXCommand(key, ...elements).exec(this.client);
|
|
370
|
-
this.sadd = (key, ...members) => new SAddCommand(key, ...members).exec(this.client);
|
|
371
|
-
this.scan = (...args) => new ScanCommand(...args).exec(this.client);
|
|
372
|
-
this.scard = (...args) => new SCardCommand(...args).exec(this.client);
|
|
373
|
-
this.scriptExists = (...args) => new ScriptExistsCommand(...args).exec(this.client);
|
|
374
|
-
this.scriptFlush = (...args) => new ScriptFlushCommand(...args).exec(this.client);
|
|
375
|
-
this.scriptLoad = (...args) => new ScriptLoadCommand(...args).exec(this.client);
|
|
376
|
-
this.sdiff = (...args) => new SDiffCommand(...args).exec(this.client);
|
|
377
|
-
this.sdiffstore = (...args) => new SDiffStoreCommand(...args).exec(this.client);
|
|
378
|
-
this.set = (key, value, opts) => new SetCommand(key, value, opts).exec(this.client);
|
|
379
|
-
this.setbit = (...args) => new SetBitCommand(...args).exec(this.client);
|
|
380
|
-
this.setex = (key, ttl, value) => new SetExCommand(key, ttl, value).exec(this.client);
|
|
381
|
-
this.setnx = (key, value) => new SetNxCommand(key, value).exec(this.client);
|
|
382
|
-
this.setrange = (...args) => new SetRangeCommand(...args).exec(this.client);
|
|
383
|
-
this.sinter = (...args) => new SInterCommand(...args).exec(this.client);
|
|
384
|
-
this.sinterstore = (...args) => new SInterStoreCommand(...args).exec(this.client);
|
|
385
|
-
this.sismember = (key, member) => new SIsMemberCommand(key, member).exec(this.client);
|
|
386
|
-
this.smembers = (...args) => new SMembersCommand(...args).exec(this.client);
|
|
387
|
-
this.smove = (source, destination, member) => new SMoveCommand(source, destination, member).exec(this.client);
|
|
388
|
-
this.spop = (...args) => new SPopCommand(...args).exec(this.client);
|
|
389
|
-
this.srandmember = (...args) => new SRandMemberCommand(...args).exec(this.client);
|
|
390
|
-
this.srem = (key, ...members) => new SRemCommand(key, ...members).exec(this.client);
|
|
391
|
-
this.sscan = (...args) => new SScanCommand(...args).exec(this.client);
|
|
392
|
-
this.strlen = (...args) => new StrLenCommand(...args).exec(this.client);
|
|
393
|
-
this.sunion = (...args) => new SUnionCommand(...args).exec(this.client);
|
|
394
|
-
this.sunionstore = (...args) => new SUnionStoreCommand(...args).exec(this.client);
|
|
395
|
-
this.time = () => new TimeCommand().exec(this.client);
|
|
396
|
-
this.touch = (...args) => new TouchCommand(...args).exec(this.client);
|
|
397
|
-
this.ttl = (...args) => new TtlCommand(...args).exec(this.client);
|
|
398
|
-
this.type = (...args) => new TypeCommand(...args).exec(this.client);
|
|
399
|
-
this.unlink = (...args) => new UnlinkCommand(...args).exec(this.client);
|
|
400
|
-
this.zadd = (...args) => {
|
|
401
|
-
if ("score" in args[1]) {
|
|
402
|
-
return new ZAddCommand(args[0], args[1], ...args.slice(2)).exec(this.client);
|
|
403
|
-
}
|
|
404
|
-
return new ZAddCommand(args[0], args[1], ...args.slice(2)).exec(this.client);
|
|
405
|
-
};
|
|
406
|
-
this.zcard = (...args) => new ZCardCommand(...args).exec(this.client);
|
|
407
|
-
this.zcount = (...args) => new ZCountCommand(...args).exec(this.client);
|
|
408
|
-
this.zincrby = (key, increment, member) => new ZIncrByComand(key, increment, member).exec(this.client);
|
|
409
|
-
this.zinterstore = (...args) => new ZInterStoreCommand(...args).exec(this.client);
|
|
410
|
-
this.zlexcount = (...args) => new ZLexCountCommand(...args).exec(this.client);
|
|
411
|
-
this.zpopmax = (...args) => new ZPopMaxCommand(...args).exec(this.client);
|
|
412
|
-
this.zpopmin = (...args) => new ZPopMinCommand(...args).exec(this.client);
|
|
413
|
-
this.zrange = (...args) => new ZRangeCommand(args[0], args[1], args[2], args[3]).exec(this.client);
|
|
414
|
-
this.zrank = (key, member) => new ZRankCommand(key, member).exec(this.client);
|
|
415
|
-
this.zrem = (key, ...members) => new ZRemCommand(key, ...members).exec(this.client);
|
|
416
|
-
this.zremrangebylex = (...args) => new ZRemRangeByLexCommand(...args).exec(this.client);
|
|
417
|
-
this.zremrangebyrank = (...args) => new ZRemRangeByRankCommand(...args).exec(this.client);
|
|
418
|
-
this.zremrangebyscore = (...args) => new ZRemRangeByScoreCommand(...args).exec(this.client);
|
|
419
|
-
this.zrevrank = (key, member) => new ZRevRankCommand(key, member).exec(this.client);
|
|
420
|
-
this.zscan = (...args) => new ZScanCommand(...args).exec(this.client);
|
|
421
|
-
this.zscore = (key, member) => new ZScoreCommand(key, member).exec(this.client);
|
|
422
|
-
this.zunionstore = (...args) => new ZUnionStoreCommand(...args).exec(this.client);
|
|
423
|
-
this.client = client;
|
|
424
|
-
}
|
|
425
|
-
};
|
|
426
|
-
|
|
427
|
-
export {
|
|
428
|
-
Redis
|
|
429
|
-
};
|
package/chunk-T3BIHZ2F.mjs
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Redis
|
|
3
|
-
} from "./chunk-KI7YOGWS.mjs";
|
|
4
|
-
import {
|
|
5
|
-
HttpClient
|
|
6
|
-
} from "./chunk-HIDCSH5S.mjs";
|
|
7
|
-
|
|
8
|
-
// pkg/nodejs.ts
|
|
9
|
-
import "isomorphic-fetch";
|
|
10
|
-
var Redis2 = class extends Redis {
|
|
11
|
-
constructor(config) {
|
|
12
|
-
const client = new HttpClient({
|
|
13
|
-
baseUrl: config.url,
|
|
14
|
-
headers: {
|
|
15
|
-
authorization: `Bearer ${config.token}`
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
super(client);
|
|
19
|
-
}
|
|
20
|
-
static fromEnv() {
|
|
21
|
-
if (typeof (process == null ? void 0 : process.env) === "undefined") {
|
|
22
|
-
throw new Error("Unable to get environment variables, `process.env` is undefined. If you are deploying to cloudflare, please use `Redis.onCloudflare()` instead");
|
|
23
|
-
}
|
|
24
|
-
const url = process.env["UPSTASH_REDIS_REST_URL"];
|
|
25
|
-
if (!url) {
|
|
26
|
-
throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_URL`");
|
|
27
|
-
}
|
|
28
|
-
const token = process.env["UPSTASH_REDIS_REST_TOKEN"];
|
|
29
|
-
if (!token) {
|
|
30
|
-
throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`");
|
|
31
|
-
}
|
|
32
|
-
return new Redis2({ url, token });
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
export {
|
|
37
|
-
Redis2 as Redis
|
|
38
|
-
};
|