@upstash/redis 1.3.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 +73 -48
- 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} +7 -13
- 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/types/platforms/cloudflare.d.ts +38 -0
- package/types/platforms/fastly.d.ts +41 -0
- package/{nodejs.d.ts → types/platforms/nodejs.d.ts} +25 -12
- package/chunk-5LZNFEHI.mjs +0 -34
- package/chunk-7YUZYRJS.mjs +0 -29
- package/chunk-CTSQDNTV.mjs +0 -393
- package/chunk-K2UC7PHG.mjs +0 -1140
- package/chunk-WRHUFPCZ.mjs +0 -55
- package/cloudflare.d.ts +0 -43
- package/cloudflare.js +0 -1395
- package/cloudflare.mjs +0 -34
- package/commands.d.ts +0 -761
- package/commands.js +0 -1287
- package/commands.mjs +0 -233
- package/fastly.d.ts +0 -46
- package/fastly.js +0 -1384
- package/fastly.mjs +0 -23
- package/http.js +0 -81
- package/http.mjs +0 -7
- package/index.d.ts +0 -15
- package/index.js +0 -1424
- package/index.mjs +0 -13
- package/nodejs.js +0 -1422
- package/nodejs.mjs +0 -10
- package/redis-338577a3.d.ts +0 -1056
- package/zunionstore-633a2e7a.d.ts +0 -187
package/commands.js
DELETED
|
@@ -1,1287 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __reExport = (target, module2, copyDefault, desc) => {
|
|
11
|
-
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(module2))
|
|
13
|
-
if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
|
|
14
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return target;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
|
19
|
-
return (module2, temp) => {
|
|
20
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
|
21
|
-
};
|
|
22
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
|
23
|
-
|
|
24
|
-
// pkg/commands/index.ts
|
|
25
|
-
var commands_exports = {};
|
|
26
|
-
__export(commands_exports, {
|
|
27
|
-
AppendCommand: () => AppendCommand,
|
|
28
|
-
BitCountCommand: () => BitCountCommand,
|
|
29
|
-
BitOpCommand: () => BitOpCommand,
|
|
30
|
-
BitPosCommand: () => BitPosCommand,
|
|
31
|
-
Command: () => Command,
|
|
32
|
-
DBSizeCommand: () => DBSizeCommand,
|
|
33
|
-
DecrByCommand: () => DecrByCommand,
|
|
34
|
-
DecrCommand: () => DecrCommand,
|
|
35
|
-
DelCommand: () => DelCommand,
|
|
36
|
-
EchoCommand: () => EchoCommand,
|
|
37
|
-
EvalCommand: () => EvalCommand,
|
|
38
|
-
EvalshaCommand: () => EvalshaCommand,
|
|
39
|
-
ExistsCommand: () => ExistsCommand,
|
|
40
|
-
ExpireAtCommand: () => ExpireAtCommand,
|
|
41
|
-
ExpireCommand: () => ExpireCommand,
|
|
42
|
-
FlushAllCommand: () => FlushAllCommand,
|
|
43
|
-
FlushDBCommand: () => FlushDBCommand,
|
|
44
|
-
GetBitCommand: () => GetBitCommand,
|
|
45
|
-
GetCommand: () => GetCommand,
|
|
46
|
-
GetRangeCommand: () => GetRangeCommand,
|
|
47
|
-
GetSetCommand: () => GetSetCommand,
|
|
48
|
-
HDelCommand: () => HDelCommand,
|
|
49
|
-
HExistsCommand: () => HExistsCommand,
|
|
50
|
-
HGetAllCommand: () => HGetAllCommand,
|
|
51
|
-
HGetCommand: () => HGetCommand,
|
|
52
|
-
HIncrByCommand: () => HIncrByCommand,
|
|
53
|
-
HIncrByFloatCommand: () => HIncrByFloatCommand,
|
|
54
|
-
HKeysCommand: () => HKeysCommand,
|
|
55
|
-
HLenCommand: () => HLenCommand,
|
|
56
|
-
HMGetCommand: () => HMGetCommand,
|
|
57
|
-
HMSetCommand: () => HMSetCommand,
|
|
58
|
-
HScanCommand: () => HScanCommand,
|
|
59
|
-
HSetCommand: () => HSetCommand,
|
|
60
|
-
HSetNXCommand: () => HSetNXCommand,
|
|
61
|
-
HStrLenCommand: () => HStrLenCommand,
|
|
62
|
-
HValsCommand: () => HValsCommand,
|
|
63
|
-
IncrByCommand: () => IncrByCommand,
|
|
64
|
-
IncrByFloatCommand: () => IncrByFloatCommand,
|
|
65
|
-
IncrCommand: () => IncrCommand,
|
|
66
|
-
KeysCommand: () => KeysCommand,
|
|
67
|
-
LIndexCommand: () => LIndexCommand,
|
|
68
|
-
LInsertCommand: () => LInsertCommand,
|
|
69
|
-
LLenCommand: () => LLenCommand,
|
|
70
|
-
LPopCommand: () => LPopCommand,
|
|
71
|
-
LPushCommand: () => LPushCommand,
|
|
72
|
-
LPushXCommand: () => LPushXCommand,
|
|
73
|
-
LRangeCommand: () => LRangeCommand,
|
|
74
|
-
LRemCommand: () => LRemCommand,
|
|
75
|
-
LSetCommand: () => LSetCommand,
|
|
76
|
-
LTrimCommand: () => LTrimCommand,
|
|
77
|
-
MGetCommand: () => MGetCommand,
|
|
78
|
-
MSetCommand: () => MSetCommand,
|
|
79
|
-
MSetNXCommand: () => MSetNXCommand,
|
|
80
|
-
PExpireAtCommand: () => PExpireAtCommand,
|
|
81
|
-
PExpireCommand: () => PExpireCommand,
|
|
82
|
-
PSetEXCommand: () => PSetEXCommand,
|
|
83
|
-
PTtlCommand: () => PTtlCommand,
|
|
84
|
-
PersistCommand: () => PersistCommand,
|
|
85
|
-
PingCommand: () => PingCommand,
|
|
86
|
-
PublishCommand: () => PublishCommand,
|
|
87
|
-
RPopCommand: () => RPopCommand,
|
|
88
|
-
RPushCommand: () => RPushCommand,
|
|
89
|
-
RPushXCommand: () => RPushXCommand,
|
|
90
|
-
RandomKeyCommand: () => RandomKeyCommand,
|
|
91
|
-
RenameCommand: () => RenameCommand,
|
|
92
|
-
RenameNXCommand: () => RenameNXCommand,
|
|
93
|
-
SAddCommand: () => SAddCommand,
|
|
94
|
-
SCardCommand: () => SCardCommand,
|
|
95
|
-
SDiffCommand: () => SDiffCommand,
|
|
96
|
-
SDiffStoreCommand: () => SDiffStoreCommand,
|
|
97
|
-
SInterCommand: () => SInterCommand,
|
|
98
|
-
SInterStoreCommand: () => SInterStoreCommand,
|
|
99
|
-
SIsMemberCommand: () => SIsMemberCommand,
|
|
100
|
-
SMembersCommand: () => SMembersCommand,
|
|
101
|
-
SMoveCommand: () => SMoveCommand,
|
|
102
|
-
SPopCommand: () => SPopCommand,
|
|
103
|
-
SRandMemberCommand: () => SRandMemberCommand,
|
|
104
|
-
SRemCommand: () => SRemCommand,
|
|
105
|
-
SScanCommand: () => SScanCommand,
|
|
106
|
-
SUnionCommand: () => SUnionCommand,
|
|
107
|
-
SUnionStoreCommand: () => SUnionStoreCommand,
|
|
108
|
-
ScanCommand: () => ScanCommand,
|
|
109
|
-
ScriptExistsCommand: () => ScriptExistsCommand,
|
|
110
|
-
ScriptFlushCommand: () => ScriptFlushCommand,
|
|
111
|
-
ScriptLoadCommand: () => ScriptLoadCommand,
|
|
112
|
-
SetBitCommand: () => SetBitCommand,
|
|
113
|
-
SetCommand: () => SetCommand,
|
|
114
|
-
SetExCommand: () => SetExCommand,
|
|
115
|
-
SetNxCommand: () => SetNxCommand,
|
|
116
|
-
SetRangeCommand: () => SetRangeCommand,
|
|
117
|
-
StrLenCommand: () => StrLenCommand,
|
|
118
|
-
TimeCommand: () => TimeCommand,
|
|
119
|
-
TouchCommand: () => TouchCommand,
|
|
120
|
-
TtlCommand: () => TtlCommand,
|
|
121
|
-
TypeCommand: () => TypeCommand,
|
|
122
|
-
UnlinkCommand: () => UnlinkCommand,
|
|
123
|
-
ZAddCommand: () => ZAddCommand,
|
|
124
|
-
ZCardCommand: () => ZCardCommand,
|
|
125
|
-
ZCountCommand: () => ZCountCommand,
|
|
126
|
-
ZIncrByComand: () => ZIncrByComand,
|
|
127
|
-
ZInterStoreCommand: () => ZInterStoreCommand,
|
|
128
|
-
ZLexCountCommand: () => ZLexCountCommand,
|
|
129
|
-
ZPopMaxCommand: () => ZPopMaxCommand,
|
|
130
|
-
ZPopMinCommand: () => ZPopMinCommand,
|
|
131
|
-
ZRangeCommand: () => ZRangeCommand,
|
|
132
|
-
ZRankCommand: () => ZRankCommand,
|
|
133
|
-
ZRemCommand: () => ZRemCommand,
|
|
134
|
-
ZRemRangeByLexCommand: () => ZRemRangeByLexCommand,
|
|
135
|
-
ZRemRangeByRankCommand: () => ZRemRangeByRankCommand,
|
|
136
|
-
ZRemRangeByScoreCommand: () => ZRemRangeByScoreCommand,
|
|
137
|
-
ZRevRankCommand: () => ZRevRankCommand,
|
|
138
|
-
ZScanCommand: () => ZScanCommand,
|
|
139
|
-
ZScoreCommand: () => ZScoreCommand,
|
|
140
|
-
ZUnionStoreCommand: () => ZUnionStoreCommand
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
// pkg/error.ts
|
|
144
|
-
var UpstashError = class extends Error {
|
|
145
|
-
constructor(message) {
|
|
146
|
-
super(message);
|
|
147
|
-
this.name = "UpstashError";
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
// pkg/util.ts
|
|
152
|
-
function parseRecursive(obj) {
|
|
153
|
-
const parsed = Array.isArray(obj) ? obj.map((o) => {
|
|
154
|
-
try {
|
|
155
|
-
return parseRecursive(o);
|
|
156
|
-
} catch {
|
|
157
|
-
return o;
|
|
158
|
-
}
|
|
159
|
-
}) : JSON.parse(obj);
|
|
160
|
-
if (typeof parsed === "number" && parsed.toString() != obj) {
|
|
161
|
-
return obj;
|
|
162
|
-
}
|
|
163
|
-
return parsed;
|
|
164
|
-
}
|
|
165
|
-
function parseResponse(result) {
|
|
166
|
-
try {
|
|
167
|
-
return parseRecursive(result);
|
|
168
|
-
} catch {
|
|
169
|
-
return result;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// pkg/commands/command.ts
|
|
174
|
-
var Command = class {
|
|
175
|
-
constructor(command, opts) {
|
|
176
|
-
var _a;
|
|
177
|
-
this.command = command.map((c) => typeof c === "string" ? c : JSON.stringify(c));
|
|
178
|
-
this.deserialize = (_a = opts == null ? void 0 : opts.deserialize) != null ? _a : parseResponse;
|
|
179
|
-
}
|
|
180
|
-
async exec(client) {
|
|
181
|
-
const { result, error } = await client.request({
|
|
182
|
-
body: this.command
|
|
183
|
-
});
|
|
184
|
-
if (error) {
|
|
185
|
-
throw new UpstashError(error);
|
|
186
|
-
}
|
|
187
|
-
if (typeof result === "undefined") {
|
|
188
|
-
throw new Error(`Request did not return a result`);
|
|
189
|
-
}
|
|
190
|
-
return this.deserialize(result);
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
// pkg/commands/append.ts
|
|
195
|
-
var AppendCommand = class extends Command {
|
|
196
|
-
constructor(key, value) {
|
|
197
|
-
super(["append", key, value]);
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
// pkg/commands/bitcount.ts
|
|
202
|
-
var BitCountCommand = class extends Command {
|
|
203
|
-
constructor(key, start, end) {
|
|
204
|
-
const command = ["bitcount", key];
|
|
205
|
-
if (typeof start === "number") {
|
|
206
|
-
command.push(start);
|
|
207
|
-
}
|
|
208
|
-
if (typeof end === "number") {
|
|
209
|
-
command.push(end);
|
|
210
|
-
}
|
|
211
|
-
super(command);
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
|
|
215
|
-
// pkg/commands/bitop.ts
|
|
216
|
-
var BitOpCommand = class extends Command {
|
|
217
|
-
constructor(op, destinationKey, sourceKey, ...sourceKeys) {
|
|
218
|
-
super(["bitop", op, destinationKey, sourceKey, ...sourceKeys]);
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
// pkg/commands/bitpos.ts
|
|
223
|
-
var BitPosCommand = class extends Command {
|
|
224
|
-
constructor(key, start, end) {
|
|
225
|
-
super(["bitpos", key, start, end]);
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
// pkg/commands/dbsize.ts
|
|
230
|
-
var DBSizeCommand = class extends Command {
|
|
231
|
-
constructor() {
|
|
232
|
-
super(["dbsize"]);
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
// pkg/commands/decr.ts
|
|
237
|
-
var DecrCommand = class extends Command {
|
|
238
|
-
constructor(key) {
|
|
239
|
-
super(["decr", key]);
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
// pkg/commands/decrby.ts
|
|
244
|
-
var DecrByCommand = class extends Command {
|
|
245
|
-
constructor(key, decrement) {
|
|
246
|
-
super(["decrby", key, decrement]);
|
|
247
|
-
}
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
// pkg/commands/del.ts
|
|
251
|
-
var DelCommand = class extends Command {
|
|
252
|
-
constructor(...keys) {
|
|
253
|
-
super(["del", ...keys]);
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
|
|
257
|
-
// pkg/commands/echo.ts
|
|
258
|
-
var EchoCommand = class extends Command {
|
|
259
|
-
constructor(message) {
|
|
260
|
-
super(["echo", message]);
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
// pkg/commands/eval.ts
|
|
265
|
-
var EvalCommand = class extends Command {
|
|
266
|
-
constructor(script, keys, args) {
|
|
267
|
-
super(["eval", script, keys.length, ...keys, ...args != null ? args : []]);
|
|
268
|
-
}
|
|
269
|
-
};
|
|
270
|
-
|
|
271
|
-
// pkg/commands/evalsha.ts
|
|
272
|
-
var EvalshaCommand = class extends Command {
|
|
273
|
-
constructor(sha, keys, args) {
|
|
274
|
-
super(["evalsha", sha, keys.length, ...keys, ...args != null ? args : []]);
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
// pkg/commands/exists.ts
|
|
279
|
-
var ExistsCommand = class extends Command {
|
|
280
|
-
constructor(...keys) {
|
|
281
|
-
super(["exists", ...keys]);
|
|
282
|
-
}
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
// pkg/commands/expire.ts
|
|
286
|
-
var ExpireCommand = class extends Command {
|
|
287
|
-
constructor(key, seconds) {
|
|
288
|
-
super(["expire", key, seconds]);
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
// pkg/commands/expireat.ts
|
|
293
|
-
var ExpireAtCommand = class extends Command {
|
|
294
|
-
constructor(key, unix) {
|
|
295
|
-
super(["expireat", key, unix]);
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
|
|
299
|
-
// pkg/commands/flushall.ts
|
|
300
|
-
var FlushAllCommand = class extends Command {
|
|
301
|
-
constructor(opts) {
|
|
302
|
-
const command = ["flushall"];
|
|
303
|
-
if (opts == null ? void 0 : opts.async) {
|
|
304
|
-
command.push("async");
|
|
305
|
-
}
|
|
306
|
-
super(command);
|
|
307
|
-
}
|
|
308
|
-
};
|
|
309
|
-
|
|
310
|
-
// pkg/commands/flushdb.ts
|
|
311
|
-
var FlushDBCommand = class extends Command {
|
|
312
|
-
constructor(opts) {
|
|
313
|
-
const command = ["flushdb"];
|
|
314
|
-
if (opts == null ? void 0 : opts.async) {
|
|
315
|
-
command.push("async");
|
|
316
|
-
}
|
|
317
|
-
super(command);
|
|
318
|
-
}
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
// pkg/commands/get.ts
|
|
322
|
-
var GetCommand = class extends Command {
|
|
323
|
-
constructor(key) {
|
|
324
|
-
super(["get", key]);
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
|
|
328
|
-
// pkg/commands/getbit.ts
|
|
329
|
-
var GetBitCommand = class extends Command {
|
|
330
|
-
constructor(key, offset) {
|
|
331
|
-
super(["getbit", key, offset]);
|
|
332
|
-
}
|
|
333
|
-
};
|
|
334
|
-
|
|
335
|
-
// pkg/commands/getrange.ts
|
|
336
|
-
var GetRangeCommand = class extends Command {
|
|
337
|
-
constructor(key, start, end) {
|
|
338
|
-
super(["getrange", key, start, end]);
|
|
339
|
-
}
|
|
340
|
-
};
|
|
341
|
-
|
|
342
|
-
// pkg/commands/getset.ts
|
|
343
|
-
var GetSetCommand = class extends Command {
|
|
344
|
-
constructor(key, value) {
|
|
345
|
-
super(["getset", key, value]);
|
|
346
|
-
}
|
|
347
|
-
};
|
|
348
|
-
|
|
349
|
-
// pkg/commands/hdel.ts
|
|
350
|
-
var HDelCommand = class extends Command {
|
|
351
|
-
constructor(key, field) {
|
|
352
|
-
super(["hdel", key, field]);
|
|
353
|
-
}
|
|
354
|
-
};
|
|
355
|
-
|
|
356
|
-
// pkg/commands/hexists.ts
|
|
357
|
-
var HExistsCommand = class extends Command {
|
|
358
|
-
constructor(key, field) {
|
|
359
|
-
super(["hexists", key, field]);
|
|
360
|
-
}
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
// pkg/commands/hget.ts
|
|
364
|
-
var HGetCommand = class extends Command {
|
|
365
|
-
constructor(key, field) {
|
|
366
|
-
super(["hget", key, field]);
|
|
367
|
-
}
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
// pkg/commands/hgetall.ts
|
|
371
|
-
function deserialize(result) {
|
|
372
|
-
if (result.length === 0) {
|
|
373
|
-
return null;
|
|
374
|
-
}
|
|
375
|
-
const obj = {};
|
|
376
|
-
while (result.length >= 2) {
|
|
377
|
-
const key = result.shift();
|
|
378
|
-
const value = result.shift();
|
|
379
|
-
try {
|
|
380
|
-
obj[key] = JSON.parse(value);
|
|
381
|
-
} catch {
|
|
382
|
-
obj[key] = value;
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
return obj;
|
|
386
|
-
}
|
|
387
|
-
var HGetAllCommand = class extends Command {
|
|
388
|
-
constructor(key) {
|
|
389
|
-
super(["hgetall", key], { deserialize: (result) => deserialize(result) });
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
|
|
393
|
-
// pkg/commands/hincrby.ts
|
|
394
|
-
var HIncrByCommand = class extends Command {
|
|
395
|
-
constructor(key, field, increment) {
|
|
396
|
-
super(["hincrby", key, field, increment]);
|
|
397
|
-
}
|
|
398
|
-
};
|
|
399
|
-
|
|
400
|
-
// pkg/commands/hincrbyfloat.ts
|
|
401
|
-
var HIncrByFloatCommand = class extends Command {
|
|
402
|
-
constructor(key, field, increment) {
|
|
403
|
-
super(["hincrbyfloat", key, field, increment]);
|
|
404
|
-
}
|
|
405
|
-
};
|
|
406
|
-
|
|
407
|
-
// pkg/commands/hkeys.ts
|
|
408
|
-
var HKeysCommand = class extends Command {
|
|
409
|
-
constructor(key) {
|
|
410
|
-
super(["hkeys", key]);
|
|
411
|
-
}
|
|
412
|
-
};
|
|
413
|
-
|
|
414
|
-
// pkg/commands/hlen.ts
|
|
415
|
-
var HLenCommand = class extends Command {
|
|
416
|
-
constructor(key) {
|
|
417
|
-
super(["hlen", key]);
|
|
418
|
-
}
|
|
419
|
-
};
|
|
420
|
-
|
|
421
|
-
// pkg/commands/hmget.ts
|
|
422
|
-
function deserialize2(fields, result) {
|
|
423
|
-
if (result.length === 0 || result.every((field) => field === null)) {
|
|
424
|
-
return null;
|
|
425
|
-
}
|
|
426
|
-
const obj = {};
|
|
427
|
-
for (let i = 0; i < fields.length; i++) {
|
|
428
|
-
try {
|
|
429
|
-
obj[fields[i]] = JSON.parse(result[i]);
|
|
430
|
-
} catch {
|
|
431
|
-
obj[fields[i]] = result[i];
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
return obj;
|
|
435
|
-
}
|
|
436
|
-
var HMGetCommand = class extends Command {
|
|
437
|
-
constructor(key, ...fields) {
|
|
438
|
-
super(["hmget", key, ...fields], { deserialize: (result) => deserialize2(fields, result) });
|
|
439
|
-
}
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
// pkg/commands/hmset.ts
|
|
443
|
-
var HMSetCommand = class extends Command {
|
|
444
|
-
constructor(key, kv) {
|
|
445
|
-
super([
|
|
446
|
-
"hmset",
|
|
447
|
-
key,
|
|
448
|
-
...Object.entries(kv).flatMap(([field, value]) => [field, value])
|
|
449
|
-
]);
|
|
450
|
-
}
|
|
451
|
-
};
|
|
452
|
-
|
|
453
|
-
// pkg/commands/hscan.ts
|
|
454
|
-
var HScanCommand = class extends Command {
|
|
455
|
-
constructor(key, cursor, opts) {
|
|
456
|
-
const command = ["hscan", key, cursor];
|
|
457
|
-
if (opts == null ? void 0 : opts.match) {
|
|
458
|
-
command.push("match", opts.match);
|
|
459
|
-
}
|
|
460
|
-
if (typeof (opts == null ? void 0 : opts.count) === "number") {
|
|
461
|
-
command.push("count", opts.count);
|
|
462
|
-
}
|
|
463
|
-
super(command);
|
|
464
|
-
}
|
|
465
|
-
};
|
|
466
|
-
|
|
467
|
-
// pkg/commands/hset.ts
|
|
468
|
-
var HSetCommand = class extends Command {
|
|
469
|
-
constructor(key, kv) {
|
|
470
|
-
super([
|
|
471
|
-
"hset",
|
|
472
|
-
key,
|
|
473
|
-
...Object.entries(kv).flatMap(([field, value]) => [field, value])
|
|
474
|
-
]);
|
|
475
|
-
}
|
|
476
|
-
};
|
|
477
|
-
|
|
478
|
-
// pkg/commands/hsetnx.ts
|
|
479
|
-
var HSetNXCommand = class extends Command {
|
|
480
|
-
constructor(key, field, value) {
|
|
481
|
-
super(["hsetnx", key, field, value]);
|
|
482
|
-
}
|
|
483
|
-
};
|
|
484
|
-
|
|
485
|
-
// pkg/commands/hstrlen.ts
|
|
486
|
-
var HStrLenCommand = class extends Command {
|
|
487
|
-
constructor(key, field) {
|
|
488
|
-
super(["hstrlen", key, field]);
|
|
489
|
-
}
|
|
490
|
-
};
|
|
491
|
-
|
|
492
|
-
// pkg/commands/hvals.ts
|
|
493
|
-
var HValsCommand = class extends Command {
|
|
494
|
-
constructor(key) {
|
|
495
|
-
super(["hvals", key]);
|
|
496
|
-
}
|
|
497
|
-
};
|
|
498
|
-
|
|
499
|
-
// pkg/commands/incr.ts
|
|
500
|
-
var IncrCommand = class extends Command {
|
|
501
|
-
constructor(key) {
|
|
502
|
-
super(["incr", key]);
|
|
503
|
-
}
|
|
504
|
-
};
|
|
505
|
-
|
|
506
|
-
// pkg/commands/incrby.ts
|
|
507
|
-
var IncrByCommand = class extends Command {
|
|
508
|
-
constructor(key, value) {
|
|
509
|
-
super(["incrby", key, value]);
|
|
510
|
-
}
|
|
511
|
-
};
|
|
512
|
-
|
|
513
|
-
// pkg/commands/incrbyfloat.ts
|
|
514
|
-
var IncrByFloatCommand = class extends Command {
|
|
515
|
-
constructor(key, value) {
|
|
516
|
-
super(["incrbyfloat", key, value]);
|
|
517
|
-
}
|
|
518
|
-
};
|
|
519
|
-
|
|
520
|
-
// pkg/commands/keys.ts
|
|
521
|
-
var KeysCommand = class extends Command {
|
|
522
|
-
constructor(pattern) {
|
|
523
|
-
super(["keys", pattern]);
|
|
524
|
-
}
|
|
525
|
-
};
|
|
526
|
-
|
|
527
|
-
// pkg/commands/lindex.ts
|
|
528
|
-
var LIndexCommand = class extends Command {
|
|
529
|
-
constructor(key, index) {
|
|
530
|
-
super(["lindex", key, index]);
|
|
531
|
-
}
|
|
532
|
-
};
|
|
533
|
-
|
|
534
|
-
// pkg/commands/linsert.ts
|
|
535
|
-
var LInsertCommand = class extends Command {
|
|
536
|
-
constructor(key, direction, pivot, value) {
|
|
537
|
-
super(["linsert", key, direction, pivot, value]);
|
|
538
|
-
}
|
|
539
|
-
};
|
|
540
|
-
|
|
541
|
-
// pkg/commands/llen.ts
|
|
542
|
-
var LLenCommand = class extends Command {
|
|
543
|
-
constructor(key) {
|
|
544
|
-
super(["llen", key]);
|
|
545
|
-
}
|
|
546
|
-
};
|
|
547
|
-
|
|
548
|
-
// pkg/commands/lpop.ts
|
|
549
|
-
var LPopCommand = class extends Command {
|
|
550
|
-
constructor(key) {
|
|
551
|
-
super(["lpop", key]);
|
|
552
|
-
}
|
|
553
|
-
};
|
|
554
|
-
|
|
555
|
-
// pkg/commands/lpush.ts
|
|
556
|
-
var LPushCommand = class extends Command {
|
|
557
|
-
constructor(key, ...elements) {
|
|
558
|
-
super(["lpush", key, ...elements]);
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
|
|
562
|
-
// pkg/commands/lpushx.ts
|
|
563
|
-
var LPushXCommand = class extends Command {
|
|
564
|
-
constructor(key, ...elements) {
|
|
565
|
-
super(["lpushx", key, ...elements]);
|
|
566
|
-
}
|
|
567
|
-
};
|
|
568
|
-
|
|
569
|
-
// pkg/commands/lrange.ts
|
|
570
|
-
var LRangeCommand = class extends Command {
|
|
571
|
-
constructor(key, start, end) {
|
|
572
|
-
super(["lrange", key, start, end]);
|
|
573
|
-
}
|
|
574
|
-
};
|
|
575
|
-
|
|
576
|
-
// pkg/commands/lrem.ts
|
|
577
|
-
var LRemCommand = class extends Command {
|
|
578
|
-
constructor(key, count, value) {
|
|
579
|
-
super(["lrem", key, count, value]);
|
|
580
|
-
}
|
|
581
|
-
};
|
|
582
|
-
|
|
583
|
-
// pkg/commands/lset.ts
|
|
584
|
-
var LSetCommand = class extends Command {
|
|
585
|
-
constructor(key, value, index) {
|
|
586
|
-
super(["lset", key, index, value]);
|
|
587
|
-
}
|
|
588
|
-
};
|
|
589
|
-
|
|
590
|
-
// pkg/commands/ltrim.ts
|
|
591
|
-
var LTrimCommand = class extends Command {
|
|
592
|
-
constructor(key, start, end) {
|
|
593
|
-
super(["ltrim", key, start, end]);
|
|
594
|
-
}
|
|
595
|
-
};
|
|
596
|
-
|
|
597
|
-
// pkg/commands/mget.ts
|
|
598
|
-
var MGetCommand = class extends Command {
|
|
599
|
-
constructor(...keys) {
|
|
600
|
-
super(["mget", ...keys]);
|
|
601
|
-
}
|
|
602
|
-
};
|
|
603
|
-
|
|
604
|
-
// pkg/commands/mset.ts
|
|
605
|
-
var MSetCommand = class extends Command {
|
|
606
|
-
constructor(kv) {
|
|
607
|
-
super([
|
|
608
|
-
"mset",
|
|
609
|
-
...Object.entries(kv).flatMap(([key, value]) => [key, value])
|
|
610
|
-
]);
|
|
611
|
-
}
|
|
612
|
-
};
|
|
613
|
-
|
|
614
|
-
// pkg/commands/msetnx.ts
|
|
615
|
-
var MSetNXCommand = class extends Command {
|
|
616
|
-
constructor(kv) {
|
|
617
|
-
super(["msetnx", ...Object.entries(kv).flatMap((_) => _)]);
|
|
618
|
-
}
|
|
619
|
-
};
|
|
620
|
-
|
|
621
|
-
// pkg/commands/persist.ts
|
|
622
|
-
var PersistCommand = class extends Command {
|
|
623
|
-
constructor(key) {
|
|
624
|
-
super(["persist", key]);
|
|
625
|
-
}
|
|
626
|
-
};
|
|
627
|
-
|
|
628
|
-
// pkg/commands/pexpire.ts
|
|
629
|
-
var PExpireCommand = class extends Command {
|
|
630
|
-
constructor(key, milliseconds) {
|
|
631
|
-
super(["pexpire", key, milliseconds]);
|
|
632
|
-
}
|
|
633
|
-
};
|
|
634
|
-
|
|
635
|
-
// pkg/commands/pexpireat.ts
|
|
636
|
-
var PExpireAtCommand = class extends Command {
|
|
637
|
-
constructor(key, unix) {
|
|
638
|
-
super(["pexpireat", key, unix]);
|
|
639
|
-
}
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
// pkg/commands/ping.ts
|
|
643
|
-
var PingCommand = class extends Command {
|
|
644
|
-
constructor(message) {
|
|
645
|
-
const command = ["ping"];
|
|
646
|
-
if (typeof message !== "undefined") {
|
|
647
|
-
command.push(message);
|
|
648
|
-
}
|
|
649
|
-
super(command);
|
|
650
|
-
}
|
|
651
|
-
};
|
|
652
|
-
|
|
653
|
-
// pkg/commands/psetex.ts
|
|
654
|
-
var PSetEXCommand = class extends Command {
|
|
655
|
-
constructor(key, ttl, value) {
|
|
656
|
-
super(["psetex", key, ttl, value]);
|
|
657
|
-
}
|
|
658
|
-
};
|
|
659
|
-
|
|
660
|
-
// pkg/commands/pttl.ts
|
|
661
|
-
var PTtlCommand = class extends Command {
|
|
662
|
-
constructor(key) {
|
|
663
|
-
super(["pttl", key]);
|
|
664
|
-
}
|
|
665
|
-
};
|
|
666
|
-
|
|
667
|
-
// pkg/commands/publish.ts
|
|
668
|
-
var PublishCommand = class extends Command {
|
|
669
|
-
constructor(channel, message) {
|
|
670
|
-
super(["publish", channel, message]);
|
|
671
|
-
}
|
|
672
|
-
};
|
|
673
|
-
|
|
674
|
-
// pkg/commands/randomkey.ts
|
|
675
|
-
var RandomKeyCommand = class extends Command {
|
|
676
|
-
constructor() {
|
|
677
|
-
super(["randomkey"]);
|
|
678
|
-
}
|
|
679
|
-
};
|
|
680
|
-
|
|
681
|
-
// pkg/commands/rename.ts
|
|
682
|
-
var RenameCommand = class extends Command {
|
|
683
|
-
constructor(source, destination) {
|
|
684
|
-
super(["rename", source, destination]);
|
|
685
|
-
}
|
|
686
|
-
};
|
|
687
|
-
|
|
688
|
-
// pkg/commands/renamenx.ts
|
|
689
|
-
var RenameNXCommand = class extends Command {
|
|
690
|
-
constructor(source, destination) {
|
|
691
|
-
super(["renamenx", source, destination]);
|
|
692
|
-
}
|
|
693
|
-
};
|
|
694
|
-
|
|
695
|
-
// pkg/commands/rpop.ts
|
|
696
|
-
var RPopCommand = class extends Command {
|
|
697
|
-
constructor(key) {
|
|
698
|
-
super(["rpop", key]);
|
|
699
|
-
}
|
|
700
|
-
};
|
|
701
|
-
|
|
702
|
-
// pkg/commands/rpush.ts
|
|
703
|
-
var RPushCommand = class extends Command {
|
|
704
|
-
constructor(key, ...elements) {
|
|
705
|
-
super(["rpush", key, ...elements]);
|
|
706
|
-
}
|
|
707
|
-
};
|
|
708
|
-
|
|
709
|
-
// pkg/commands/rpushx.ts
|
|
710
|
-
var RPushXCommand = class extends Command {
|
|
711
|
-
constructor(key, ...elements) {
|
|
712
|
-
super(["rpushx", key, ...elements]);
|
|
713
|
-
}
|
|
714
|
-
};
|
|
715
|
-
|
|
716
|
-
// pkg/commands/sadd.ts
|
|
717
|
-
var SAddCommand = class extends Command {
|
|
718
|
-
constructor(key, ...members) {
|
|
719
|
-
super(["sadd", key, ...members]);
|
|
720
|
-
}
|
|
721
|
-
};
|
|
722
|
-
|
|
723
|
-
// pkg/commands/scan.ts
|
|
724
|
-
var ScanCommand = class extends Command {
|
|
725
|
-
constructor(cursor, opts) {
|
|
726
|
-
const command = ["scan", cursor];
|
|
727
|
-
if (opts == null ? void 0 : opts.match) {
|
|
728
|
-
command.push("match", opts.match);
|
|
729
|
-
}
|
|
730
|
-
if (typeof (opts == null ? void 0 : opts.count) === "number") {
|
|
731
|
-
command.push("count", opts.count);
|
|
732
|
-
}
|
|
733
|
-
super(command);
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
|
-
|
|
737
|
-
// pkg/commands/scard.ts
|
|
738
|
-
var SCardCommand = class extends Command {
|
|
739
|
-
constructor(key) {
|
|
740
|
-
super(["scard", key]);
|
|
741
|
-
}
|
|
742
|
-
};
|
|
743
|
-
|
|
744
|
-
// pkg/commands/script_exists.ts
|
|
745
|
-
var ScriptExistsCommand = class extends Command {
|
|
746
|
-
constructor(...hash) {
|
|
747
|
-
super(["script", "exists", ...hash], {
|
|
748
|
-
deserialize: (result) => {
|
|
749
|
-
const parsed = result;
|
|
750
|
-
return parsed.length === 1 ? parsed[0] : parsed;
|
|
751
|
-
}
|
|
752
|
-
});
|
|
753
|
-
}
|
|
754
|
-
};
|
|
755
|
-
|
|
756
|
-
// pkg/commands/script_flush.ts
|
|
757
|
-
var ScriptFlushCommand = class extends Command {
|
|
758
|
-
constructor(opts) {
|
|
759
|
-
const cmd = ["script", "flush"];
|
|
760
|
-
if (opts == null ? void 0 : opts.sync) {
|
|
761
|
-
cmd.push("sync");
|
|
762
|
-
} else if (opts == null ? void 0 : opts.async) {
|
|
763
|
-
cmd.push("async");
|
|
764
|
-
}
|
|
765
|
-
super(cmd);
|
|
766
|
-
}
|
|
767
|
-
};
|
|
768
|
-
|
|
769
|
-
// pkg/commands/script_load.ts
|
|
770
|
-
var ScriptLoadCommand = class extends Command {
|
|
771
|
-
constructor(script) {
|
|
772
|
-
super(["script", "load", script]);
|
|
773
|
-
}
|
|
774
|
-
};
|
|
775
|
-
|
|
776
|
-
// pkg/commands/sdiff.ts
|
|
777
|
-
var SDiffCommand = class extends Command {
|
|
778
|
-
constructor(key, ...keys) {
|
|
779
|
-
super(["sdiff", key, ...keys]);
|
|
780
|
-
}
|
|
781
|
-
};
|
|
782
|
-
|
|
783
|
-
// pkg/commands/sdiffstore.ts
|
|
784
|
-
var SDiffStoreCommand = class extends Command {
|
|
785
|
-
constructor(destination, ...keys) {
|
|
786
|
-
super(["sdiffstore", destination, ...keys]);
|
|
787
|
-
}
|
|
788
|
-
};
|
|
789
|
-
|
|
790
|
-
// pkg/commands/set.ts
|
|
791
|
-
var SetCommand = class extends Command {
|
|
792
|
-
constructor(key, value, opts) {
|
|
793
|
-
const command = ["set", key, value];
|
|
794
|
-
if (opts) {
|
|
795
|
-
if ("ex" in opts && typeof opts.ex === "number") {
|
|
796
|
-
command.push("ex", opts.ex);
|
|
797
|
-
} else if ("px" in opts && typeof opts.px === "number") {
|
|
798
|
-
command.push("px", opts.px);
|
|
799
|
-
}
|
|
800
|
-
if ("nx" in opts && opts.nx) {
|
|
801
|
-
command.push("nx");
|
|
802
|
-
} else if ("xx" in opts && opts.xx) {
|
|
803
|
-
command.push("xx");
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
super(command);
|
|
807
|
-
}
|
|
808
|
-
};
|
|
809
|
-
|
|
810
|
-
// pkg/commands/setbit.ts
|
|
811
|
-
var SetBitCommand = class extends Command {
|
|
812
|
-
constructor(key, offset, value) {
|
|
813
|
-
super(["setbit", key, offset, value]);
|
|
814
|
-
}
|
|
815
|
-
};
|
|
816
|
-
|
|
817
|
-
// pkg/commands/setex.ts
|
|
818
|
-
var SetExCommand = class extends Command {
|
|
819
|
-
constructor(key, ttl, value) {
|
|
820
|
-
super(["setex", key, ttl, value]);
|
|
821
|
-
}
|
|
822
|
-
};
|
|
823
|
-
|
|
824
|
-
// pkg/commands/setnx.ts
|
|
825
|
-
var SetNxCommand = class extends Command {
|
|
826
|
-
constructor(key, value) {
|
|
827
|
-
super(["setnx", key, value]);
|
|
828
|
-
}
|
|
829
|
-
};
|
|
830
|
-
|
|
831
|
-
// pkg/commands/setrange.ts
|
|
832
|
-
var SetRangeCommand = class extends Command {
|
|
833
|
-
constructor(key, offset, value) {
|
|
834
|
-
super(["setrange", key, offset, value]);
|
|
835
|
-
}
|
|
836
|
-
};
|
|
837
|
-
|
|
838
|
-
// pkg/commands/sinter.ts
|
|
839
|
-
var SInterCommand = class extends Command {
|
|
840
|
-
constructor(key, ...keys) {
|
|
841
|
-
super(["sinter", key, ...keys]);
|
|
842
|
-
}
|
|
843
|
-
};
|
|
844
|
-
|
|
845
|
-
// pkg/commands/sinterstore.ts
|
|
846
|
-
var SInterStoreCommand = class extends Command {
|
|
847
|
-
constructor(destination, key, ...keys) {
|
|
848
|
-
super(["sinterstore", destination, key, ...keys]);
|
|
849
|
-
}
|
|
850
|
-
};
|
|
851
|
-
|
|
852
|
-
// pkg/commands/sismember.ts
|
|
853
|
-
var SIsMemberCommand = class extends Command {
|
|
854
|
-
constructor(key, member) {
|
|
855
|
-
super(["sismember", key, member]);
|
|
856
|
-
}
|
|
857
|
-
};
|
|
858
|
-
|
|
859
|
-
// pkg/commands/smembers.ts
|
|
860
|
-
var SMembersCommand = class extends Command {
|
|
861
|
-
constructor(key) {
|
|
862
|
-
super(["smembers", key]);
|
|
863
|
-
}
|
|
864
|
-
};
|
|
865
|
-
|
|
866
|
-
// pkg/commands/smove.ts
|
|
867
|
-
var SMoveCommand = class extends Command {
|
|
868
|
-
constructor(source, destination, member) {
|
|
869
|
-
super(["smove", source, destination, member]);
|
|
870
|
-
}
|
|
871
|
-
};
|
|
872
|
-
|
|
873
|
-
// pkg/commands/spop.ts
|
|
874
|
-
var SPopCommand = class extends Command {
|
|
875
|
-
constructor(key, count) {
|
|
876
|
-
const command = ["spop", key];
|
|
877
|
-
if (typeof count === "number") {
|
|
878
|
-
command.push(count);
|
|
879
|
-
}
|
|
880
|
-
super(command);
|
|
881
|
-
}
|
|
882
|
-
};
|
|
883
|
-
|
|
884
|
-
// pkg/commands/srandmember.ts
|
|
885
|
-
var SRandMemberCommand = class extends Command {
|
|
886
|
-
constructor(key, count) {
|
|
887
|
-
const command = ["srandmember", key];
|
|
888
|
-
if (typeof count === "number") {
|
|
889
|
-
command.push(count);
|
|
890
|
-
}
|
|
891
|
-
super(command);
|
|
892
|
-
}
|
|
893
|
-
};
|
|
894
|
-
|
|
895
|
-
// pkg/commands/srem.ts
|
|
896
|
-
var SRemCommand = class extends Command {
|
|
897
|
-
constructor(key, ...members) {
|
|
898
|
-
super(["srem", key, ...members]);
|
|
899
|
-
}
|
|
900
|
-
};
|
|
901
|
-
|
|
902
|
-
// pkg/commands/sscan.ts
|
|
903
|
-
var SScanCommand = class extends Command {
|
|
904
|
-
constructor(key, cursor, opts) {
|
|
905
|
-
const command = ["sscan", key, cursor];
|
|
906
|
-
if (opts == null ? void 0 : opts.match) {
|
|
907
|
-
command.push("match", opts.match);
|
|
908
|
-
}
|
|
909
|
-
if (typeof (opts == null ? void 0 : opts.count) === "number") {
|
|
910
|
-
command.push("count", opts.count);
|
|
911
|
-
}
|
|
912
|
-
super(command);
|
|
913
|
-
}
|
|
914
|
-
};
|
|
915
|
-
|
|
916
|
-
// pkg/commands/strlen.ts
|
|
917
|
-
var StrLenCommand = class extends Command {
|
|
918
|
-
constructor(key) {
|
|
919
|
-
super(["strlen", key]);
|
|
920
|
-
}
|
|
921
|
-
};
|
|
922
|
-
|
|
923
|
-
// pkg/commands/sunion.ts
|
|
924
|
-
var SUnionCommand = class extends Command {
|
|
925
|
-
constructor(key, ...keys) {
|
|
926
|
-
super(["sunion", key, ...keys]);
|
|
927
|
-
}
|
|
928
|
-
};
|
|
929
|
-
|
|
930
|
-
// pkg/commands/sunionstore.ts
|
|
931
|
-
var SUnionStoreCommand = class extends Command {
|
|
932
|
-
constructor(destination, key, ...keys) {
|
|
933
|
-
super(["sunionstore", destination, key, ...keys]);
|
|
934
|
-
}
|
|
935
|
-
};
|
|
936
|
-
|
|
937
|
-
// pkg/commands/time.ts
|
|
938
|
-
var TimeCommand = class extends Command {
|
|
939
|
-
constructor() {
|
|
940
|
-
super(["time"]);
|
|
941
|
-
}
|
|
942
|
-
};
|
|
943
|
-
|
|
944
|
-
// pkg/commands/touch.ts
|
|
945
|
-
var TouchCommand = class extends Command {
|
|
946
|
-
constructor(...keys) {
|
|
947
|
-
super(["touch", ...keys]);
|
|
948
|
-
}
|
|
949
|
-
};
|
|
950
|
-
|
|
951
|
-
// pkg/commands/ttl.ts
|
|
952
|
-
var TtlCommand = class extends Command {
|
|
953
|
-
constructor(key) {
|
|
954
|
-
super(["ttl", key]);
|
|
955
|
-
}
|
|
956
|
-
};
|
|
957
|
-
|
|
958
|
-
// pkg/commands/type.ts
|
|
959
|
-
var TypeCommand = class extends Command {
|
|
960
|
-
constructor(key) {
|
|
961
|
-
super(["type", key]);
|
|
962
|
-
}
|
|
963
|
-
};
|
|
964
|
-
|
|
965
|
-
// pkg/commands/unlink.ts
|
|
966
|
-
var UnlinkCommand = class extends Command {
|
|
967
|
-
constructor(...keys) {
|
|
968
|
-
super(["unlink", ...keys]);
|
|
969
|
-
}
|
|
970
|
-
};
|
|
971
|
-
|
|
972
|
-
// pkg/commands/zadd.ts
|
|
973
|
-
var ZAddCommand = class extends Command {
|
|
974
|
-
constructor(key, arg1, ...arg2) {
|
|
975
|
-
const command = ["zadd", key];
|
|
976
|
-
if ("nx" in arg1 && arg1.nx) {
|
|
977
|
-
command.push("nx");
|
|
978
|
-
} else if ("xx" in arg1 && arg1.xx) {
|
|
979
|
-
command.push("xx");
|
|
980
|
-
}
|
|
981
|
-
if ("ch" in arg1 && arg1.ch) {
|
|
982
|
-
command.push("ch");
|
|
983
|
-
}
|
|
984
|
-
if ("incr" in arg1 && arg1.incr) {
|
|
985
|
-
command.push("incr");
|
|
986
|
-
}
|
|
987
|
-
if ("score" in arg1 && "member" in arg1) {
|
|
988
|
-
command.push(arg1.score, arg1.member);
|
|
989
|
-
}
|
|
990
|
-
command.push(...arg2.flatMap(({ score, member }) => [score, member]));
|
|
991
|
-
super(command);
|
|
992
|
-
}
|
|
993
|
-
};
|
|
994
|
-
|
|
995
|
-
// pkg/commands/zcard.ts
|
|
996
|
-
var ZCardCommand = class extends Command {
|
|
997
|
-
constructor(key) {
|
|
998
|
-
super(["zcard", key]);
|
|
999
|
-
}
|
|
1000
|
-
};
|
|
1001
|
-
|
|
1002
|
-
// pkg/commands/zcount.ts
|
|
1003
|
-
var ZCountCommand = class extends Command {
|
|
1004
|
-
constructor(key, min, max) {
|
|
1005
|
-
super(["zcount", key, min, max]);
|
|
1006
|
-
}
|
|
1007
|
-
};
|
|
1008
|
-
|
|
1009
|
-
// pkg/commands/zincrby.ts
|
|
1010
|
-
var ZIncrByComand = class extends Command {
|
|
1011
|
-
constructor(key, increment, member) {
|
|
1012
|
-
super(["zincrby", key, increment, member]);
|
|
1013
|
-
}
|
|
1014
|
-
};
|
|
1015
|
-
|
|
1016
|
-
// pkg/commands/zinterstore.ts
|
|
1017
|
-
var ZInterStoreCommand = class extends Command {
|
|
1018
|
-
constructor(destination, numKeys, keyOrKeys, opts) {
|
|
1019
|
-
const command = ["zinterstore", destination, numKeys];
|
|
1020
|
-
if (Array.isArray(keyOrKeys)) {
|
|
1021
|
-
command.push(...keyOrKeys);
|
|
1022
|
-
} else {
|
|
1023
|
-
command.push(keyOrKeys);
|
|
1024
|
-
}
|
|
1025
|
-
if (opts) {
|
|
1026
|
-
if ("weights" in opts && opts.weights) {
|
|
1027
|
-
command.push("weights", ...opts.weights);
|
|
1028
|
-
} else if ("weight" in opts && typeof opts.weight === "number") {
|
|
1029
|
-
command.push("weights", opts.weight);
|
|
1030
|
-
}
|
|
1031
|
-
if ("aggregate" in opts) {
|
|
1032
|
-
command.push("aggregate", opts.aggregate);
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
super(command);
|
|
1036
|
-
}
|
|
1037
|
-
};
|
|
1038
|
-
|
|
1039
|
-
// pkg/commands/zlexcount.ts
|
|
1040
|
-
var ZLexCountCommand = class extends Command {
|
|
1041
|
-
constructor(key, min, max) {
|
|
1042
|
-
super(["zlexcount", key, min, max]);
|
|
1043
|
-
}
|
|
1044
|
-
};
|
|
1045
|
-
|
|
1046
|
-
// pkg/commands/zpopmax.ts
|
|
1047
|
-
var ZPopMaxCommand = class extends Command {
|
|
1048
|
-
constructor(key, count) {
|
|
1049
|
-
const command = ["zpopmax", key];
|
|
1050
|
-
if (typeof count === "number") {
|
|
1051
|
-
command.push(count);
|
|
1052
|
-
}
|
|
1053
|
-
super(command);
|
|
1054
|
-
}
|
|
1055
|
-
};
|
|
1056
|
-
|
|
1057
|
-
// pkg/commands/zpopmin.ts
|
|
1058
|
-
var ZPopMinCommand = class extends Command {
|
|
1059
|
-
constructor(key, count) {
|
|
1060
|
-
const command = ["zpopmin", key];
|
|
1061
|
-
if (typeof count === "number") {
|
|
1062
|
-
command.push(count);
|
|
1063
|
-
}
|
|
1064
|
-
super(command);
|
|
1065
|
-
}
|
|
1066
|
-
};
|
|
1067
|
-
|
|
1068
|
-
// pkg/commands/zrange.ts
|
|
1069
|
-
var ZRangeCommand = class extends Command {
|
|
1070
|
-
constructor(key, min, max, opts) {
|
|
1071
|
-
const command = ["zrange", key, min, max];
|
|
1072
|
-
if (opts == null ? void 0 : opts.byScore) {
|
|
1073
|
-
command.push("byscore");
|
|
1074
|
-
}
|
|
1075
|
-
if (opts == null ? void 0 : opts.byLex) {
|
|
1076
|
-
command.push("bylex");
|
|
1077
|
-
}
|
|
1078
|
-
if (opts == null ? void 0 : opts.withScores) {
|
|
1079
|
-
command.push("withscores");
|
|
1080
|
-
}
|
|
1081
|
-
super(command);
|
|
1082
|
-
}
|
|
1083
|
-
};
|
|
1084
|
-
|
|
1085
|
-
// pkg/commands/zrank.ts
|
|
1086
|
-
var ZRankCommand = class extends Command {
|
|
1087
|
-
constructor(key, member) {
|
|
1088
|
-
super(["zrank", key, member]);
|
|
1089
|
-
}
|
|
1090
|
-
};
|
|
1091
|
-
|
|
1092
|
-
// pkg/commands/zrem.ts
|
|
1093
|
-
var ZRemCommand = class extends Command {
|
|
1094
|
-
constructor(key, ...members) {
|
|
1095
|
-
super(["zrem", key, ...members]);
|
|
1096
|
-
}
|
|
1097
|
-
};
|
|
1098
|
-
|
|
1099
|
-
// pkg/commands/zremrangebylex.ts
|
|
1100
|
-
var ZRemRangeByLexCommand = class extends Command {
|
|
1101
|
-
constructor(key, min, max) {
|
|
1102
|
-
super(["zremrangebylex", key, min, max]);
|
|
1103
|
-
}
|
|
1104
|
-
};
|
|
1105
|
-
|
|
1106
|
-
// pkg/commands/zremrangebyrank.ts
|
|
1107
|
-
var ZRemRangeByRankCommand = class extends Command {
|
|
1108
|
-
constructor(key, start, stop) {
|
|
1109
|
-
super(["zremrangebyrank", key, start, stop]);
|
|
1110
|
-
}
|
|
1111
|
-
};
|
|
1112
|
-
|
|
1113
|
-
// pkg/commands/zremrangebyscore.ts
|
|
1114
|
-
var ZRemRangeByScoreCommand = class extends Command {
|
|
1115
|
-
constructor(key, min, max) {
|
|
1116
|
-
super(["zremrangebyscore", key, min, max]);
|
|
1117
|
-
}
|
|
1118
|
-
};
|
|
1119
|
-
|
|
1120
|
-
// pkg/commands/zrevrank.ts
|
|
1121
|
-
var ZRevRankCommand = class extends Command {
|
|
1122
|
-
constructor(key, member) {
|
|
1123
|
-
super(["zrevrank", key, member]);
|
|
1124
|
-
}
|
|
1125
|
-
};
|
|
1126
|
-
|
|
1127
|
-
// pkg/commands/zscan.ts
|
|
1128
|
-
var ZScanCommand = class extends Command {
|
|
1129
|
-
constructor(key, cursor, opts) {
|
|
1130
|
-
const command = ["zscan", key, cursor];
|
|
1131
|
-
if (opts == null ? void 0 : opts.match) {
|
|
1132
|
-
command.push("match", opts.match);
|
|
1133
|
-
}
|
|
1134
|
-
if (typeof (opts == null ? void 0 : opts.count) === "number") {
|
|
1135
|
-
command.push("count", opts.count);
|
|
1136
|
-
}
|
|
1137
|
-
super(command);
|
|
1138
|
-
}
|
|
1139
|
-
};
|
|
1140
|
-
|
|
1141
|
-
// pkg/commands/zscore.ts
|
|
1142
|
-
var ZScoreCommand = class extends Command {
|
|
1143
|
-
constructor(key, member) {
|
|
1144
|
-
super(["zscore", key, member]);
|
|
1145
|
-
}
|
|
1146
|
-
};
|
|
1147
|
-
|
|
1148
|
-
// pkg/commands/zunionstore.ts
|
|
1149
|
-
var ZUnionStoreCommand = class extends Command {
|
|
1150
|
-
constructor(destination, numKeys, keyOrKeys, opts) {
|
|
1151
|
-
const command = ["zunionstore", destination, numKeys];
|
|
1152
|
-
if (Array.isArray(keyOrKeys)) {
|
|
1153
|
-
command.push(...keyOrKeys);
|
|
1154
|
-
} else {
|
|
1155
|
-
command.push(keyOrKeys);
|
|
1156
|
-
}
|
|
1157
|
-
if (opts) {
|
|
1158
|
-
if ("weights" in opts && opts.weights) {
|
|
1159
|
-
command.push("weights", ...opts.weights);
|
|
1160
|
-
} else if ("weight" in opts && typeof opts.weight === "number") {
|
|
1161
|
-
command.push("weights", opts.weight);
|
|
1162
|
-
}
|
|
1163
|
-
if ("aggregate" in opts) {
|
|
1164
|
-
command.push("aggregate", opts.aggregate);
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
super(command);
|
|
1168
|
-
}
|
|
1169
|
-
};
|
|
1170
|
-
module.exports = __toCommonJS(commands_exports);
|
|
1171
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
1172
|
-
0 && (module.exports = {
|
|
1173
|
-
AppendCommand,
|
|
1174
|
-
BitCountCommand,
|
|
1175
|
-
BitOpCommand,
|
|
1176
|
-
BitPosCommand,
|
|
1177
|
-
Command,
|
|
1178
|
-
DBSizeCommand,
|
|
1179
|
-
DecrByCommand,
|
|
1180
|
-
DecrCommand,
|
|
1181
|
-
DelCommand,
|
|
1182
|
-
EchoCommand,
|
|
1183
|
-
EvalCommand,
|
|
1184
|
-
EvalshaCommand,
|
|
1185
|
-
ExistsCommand,
|
|
1186
|
-
ExpireAtCommand,
|
|
1187
|
-
ExpireCommand,
|
|
1188
|
-
FlushAllCommand,
|
|
1189
|
-
FlushDBCommand,
|
|
1190
|
-
GetBitCommand,
|
|
1191
|
-
GetCommand,
|
|
1192
|
-
GetRangeCommand,
|
|
1193
|
-
GetSetCommand,
|
|
1194
|
-
HDelCommand,
|
|
1195
|
-
HExistsCommand,
|
|
1196
|
-
HGetAllCommand,
|
|
1197
|
-
HGetCommand,
|
|
1198
|
-
HIncrByCommand,
|
|
1199
|
-
HIncrByFloatCommand,
|
|
1200
|
-
HKeysCommand,
|
|
1201
|
-
HLenCommand,
|
|
1202
|
-
HMGetCommand,
|
|
1203
|
-
HMSetCommand,
|
|
1204
|
-
HScanCommand,
|
|
1205
|
-
HSetCommand,
|
|
1206
|
-
HSetNXCommand,
|
|
1207
|
-
HStrLenCommand,
|
|
1208
|
-
HValsCommand,
|
|
1209
|
-
IncrByCommand,
|
|
1210
|
-
IncrByFloatCommand,
|
|
1211
|
-
IncrCommand,
|
|
1212
|
-
KeysCommand,
|
|
1213
|
-
LIndexCommand,
|
|
1214
|
-
LInsertCommand,
|
|
1215
|
-
LLenCommand,
|
|
1216
|
-
LPopCommand,
|
|
1217
|
-
LPushCommand,
|
|
1218
|
-
LPushXCommand,
|
|
1219
|
-
LRangeCommand,
|
|
1220
|
-
LRemCommand,
|
|
1221
|
-
LSetCommand,
|
|
1222
|
-
LTrimCommand,
|
|
1223
|
-
MGetCommand,
|
|
1224
|
-
MSetCommand,
|
|
1225
|
-
MSetNXCommand,
|
|
1226
|
-
PExpireAtCommand,
|
|
1227
|
-
PExpireCommand,
|
|
1228
|
-
PSetEXCommand,
|
|
1229
|
-
PTtlCommand,
|
|
1230
|
-
PersistCommand,
|
|
1231
|
-
PingCommand,
|
|
1232
|
-
PublishCommand,
|
|
1233
|
-
RPopCommand,
|
|
1234
|
-
RPushCommand,
|
|
1235
|
-
RPushXCommand,
|
|
1236
|
-
RandomKeyCommand,
|
|
1237
|
-
RenameCommand,
|
|
1238
|
-
RenameNXCommand,
|
|
1239
|
-
SAddCommand,
|
|
1240
|
-
SCardCommand,
|
|
1241
|
-
SDiffCommand,
|
|
1242
|
-
SDiffStoreCommand,
|
|
1243
|
-
SInterCommand,
|
|
1244
|
-
SInterStoreCommand,
|
|
1245
|
-
SIsMemberCommand,
|
|
1246
|
-
SMembersCommand,
|
|
1247
|
-
SMoveCommand,
|
|
1248
|
-
SPopCommand,
|
|
1249
|
-
SRandMemberCommand,
|
|
1250
|
-
SRemCommand,
|
|
1251
|
-
SScanCommand,
|
|
1252
|
-
SUnionCommand,
|
|
1253
|
-
SUnionStoreCommand,
|
|
1254
|
-
ScanCommand,
|
|
1255
|
-
ScriptExistsCommand,
|
|
1256
|
-
ScriptFlushCommand,
|
|
1257
|
-
ScriptLoadCommand,
|
|
1258
|
-
SetBitCommand,
|
|
1259
|
-
SetCommand,
|
|
1260
|
-
SetExCommand,
|
|
1261
|
-
SetNxCommand,
|
|
1262
|
-
SetRangeCommand,
|
|
1263
|
-
StrLenCommand,
|
|
1264
|
-
TimeCommand,
|
|
1265
|
-
TouchCommand,
|
|
1266
|
-
TtlCommand,
|
|
1267
|
-
TypeCommand,
|
|
1268
|
-
UnlinkCommand,
|
|
1269
|
-
ZAddCommand,
|
|
1270
|
-
ZCardCommand,
|
|
1271
|
-
ZCountCommand,
|
|
1272
|
-
ZIncrByComand,
|
|
1273
|
-
ZInterStoreCommand,
|
|
1274
|
-
ZLexCountCommand,
|
|
1275
|
-
ZPopMaxCommand,
|
|
1276
|
-
ZPopMinCommand,
|
|
1277
|
-
ZRangeCommand,
|
|
1278
|
-
ZRankCommand,
|
|
1279
|
-
ZRemCommand,
|
|
1280
|
-
ZRemRangeByLexCommand,
|
|
1281
|
-
ZRemRangeByRankCommand,
|
|
1282
|
-
ZRemRangeByScoreCommand,
|
|
1283
|
-
ZRevRankCommand,
|
|
1284
|
-
ZScanCommand,
|
|
1285
|
-
ZScoreCommand,
|
|
1286
|
-
ZUnionStoreCommand
|
|
1287
|
-
});
|