js-redis-server 0.0.1 → 0.0.2
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/README.md +235 -30
- package/dist/cli.d.ts +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +191 -0
- package/dist/cli.js.map +1 -0
- package/dist/cluster.d.ts +30 -0
- package/dist/cluster.d.ts.map +1 -0
- package/dist/cluster.js +131 -0
- package/dist/cluster.js.map +1 -0
- package/dist/commands/cluster.d.ts +8 -0
- package/dist/commands/cluster.d.ts.map +1 -0
- package/dist/commands/cluster.js +190 -0
- package/dist/commands/cluster.js.map +1 -0
- package/dist/commands/command.d.ts +6 -0
- package/dist/commands/command.d.ts.map +1 -0
- package/dist/commands/command.js +381 -0
- package/dist/commands/command.js.map +1 -0
- package/dist/commands/connection.d.ts +24 -0
- package/dist/commands/connection.d.ts.map +1 -0
- package/dist/commands/connection.js +406 -0
- package/dist/commands/connection.js.map +1 -0
- package/dist/commands/hashes.d.ts +64 -0
- package/dist/commands/hashes.d.ts.map +1 -0
- package/dist/commands/hashes.js +276 -0
- package/dist/commands/hashes.js.map +1 -0
- package/dist/commands/helpers.d.ts +16 -0
- package/dist/commands/helpers.d.ts.map +1 -0
- package/dist/commands/helpers.js +77 -0
- package/dist/commands/helpers.js.map +1 -0
- package/dist/commands/index.d.ts +23 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +177 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/introspection.d.ts +17 -0
- package/dist/commands/introspection.d.ts.map +1 -0
- package/dist/commands/introspection.js +54 -0
- package/dist/commands/introspection.js.map +1 -0
- package/dist/commands/keys.d.ts +47 -0
- package/dist/commands/keys.d.ts.map +1 -0
- package/dist/commands/keys.js +238 -0
- package/dist/commands/keys.js.map +1 -0
- package/dist/commands/lists.d.ts +60 -0
- package/dist/commands/lists.d.ts.map +1 -0
- package/dist/commands/lists.js +333 -0
- package/dist/commands/lists.js.map +1 -0
- package/dist/commands/scan.d.ts +24 -0
- package/dist/commands/scan.d.ts.map +1 -0
- package/dist/commands/scan.js +316 -0
- package/dist/commands/scan.js.map +1 -0
- package/dist/commands/scripts.d.ts +22 -0
- package/dist/commands/scripts.d.ts.map +1 -0
- package/dist/commands/scripts.js +195 -0
- package/dist/commands/scripts.js.map +1 -0
- package/dist/commands/sets.d.ts +61 -0
- package/dist/commands/sets.d.ts.map +1 -0
- package/dist/commands/sets.js +411 -0
- package/dist/commands/sets.js.map +1 -0
- package/dist/commands/strings.d.ts +91 -0
- package/dist/commands/strings.d.ts.map +1 -0
- package/dist/commands/strings.js +537 -0
- package/dist/commands/strings.js.map +1 -0
- package/dist/commands/transactions.d.ts +9 -0
- package/dist/commands/transactions.d.ts.map +1 -0
- package/dist/commands/transactions.js +89 -0
- package/dist/commands/transactions.js.map +1 -0
- package/dist/commands/zsets.d.ts +72 -0
- package/dist/commands/zsets.d.ts.map +1 -0
- package/dist/commands/zsets.js +360 -0
- package/dist/commands/zsets.js.map +1 -0
- package/dist/core/client-session.d.ts +60 -0
- package/dist/core/client-session.d.ts.map +1 -0
- package/dist/core/client-session.js +210 -0
- package/dist/core/client-session.js.map +1 -0
- package/dist/core/command-definition.d.ts +64 -0
- package/dist/core/command-definition.d.ts.map +1 -0
- package/dist/core/command-definition.js +10 -0
- package/dist/core/command-definition.js.map +1 -0
- package/dist/core/command-executor.d.ts +24 -0
- package/dist/core/command-executor.d.ts.map +1 -0
- package/dist/core/command-executor.js +168 -0
- package/dist/core/command-executor.js.map +1 -0
- package/dist/core/command-registry.d.ts +16 -0
- package/dist/core/command-registry.d.ts.map +1 -0
- package/dist/core/command-registry.js +35 -0
- package/dist/core/command-registry.js.map +1 -0
- package/dist/core/command-schema.d.ts +40 -0
- package/dist/core/command-schema.d.ts.map +1 -0
- package/dist/core/command-schema.js +188 -0
- package/dist/core/command-schema.js.map +1 -0
- package/dist/core/execution-policies/cluster-policy.d.ts +8 -0
- package/dist/core/execution-policies/cluster-policy.d.ts.map +1 -0
- package/dist/core/execution-policies/cluster-policy.js +61 -0
- package/dist/core/execution-policies/cluster-policy.js.map +1 -0
- package/dist/core/execution-policies/index.d.ts +16 -0
- package/dist/core/execution-policies/index.d.ts.map +1 -0
- package/dist/core/execution-policies/index.js +8 -0
- package/dist/core/execution-policies/index.js.map +1 -0
- package/dist/core/execution-policies/transaction-policy.d.ts +3 -0
- package/dist/core/execution-policies/transaction-policy.d.ts.map +1 -0
- package/dist/core/execution-policies/transaction-policy.js +25 -0
- package/dist/core/execution-policies/transaction-policy.js.map +1 -0
- package/dist/core/lua-runtime.d.ts +15 -0
- package/dist/core/lua-runtime.d.ts.map +1 -0
- package/dist/core/lua-runtime.js +173 -0
- package/dist/core/lua-runtime.js.map +1 -0
- package/dist/core/redis-context.d.ts +41 -0
- package/dist/core/redis-context.d.ts.map +1 -0
- package/dist/core/redis-context.js +46 -0
- package/dist/core/redis-context.js.map +1 -0
- package/dist/core/redis-error.d.ts +83 -0
- package/dist/core/redis-error.d.ts.map +1 -0
- package/dist/core/redis-error.js +186 -0
- package/dist/core/redis-error.js.map +1 -0
- package/dist/core/redis-result.d.ts +15 -0
- package/dist/core/redis-result.d.ts.map +1 -0
- package/dist/core/redis-result.js +26 -0
- package/dist/core/redis-result.js.map +1 -0
- package/dist/core/redis-value.d.ts +61 -0
- package/dist/core/redis-value.d.ts.map +1 -0
- package/dist/core/redis-value.js +41 -0
- package/dist/core/redis-value.js.map +1 -0
- package/dist/core/resp-encoder.d.ts +9 -0
- package/dist/core/resp-encoder.d.ts.map +1 -0
- package/dist/core/resp-encoder.js +159 -0
- package/dist/core/resp-encoder.js.map +1 -0
- package/dist/core/response-stream.d.ts +17 -0
- package/dist/core/response-stream.d.ts.map +1 -0
- package/dist/core/response-stream.js +10 -0
- package/dist/core/response-stream.js.map +1 -0
- package/dist/core/transports/connection-transport.d.ts +12 -0
- package/dist/core/transports/connection-transport.d.ts.map +1 -0
- package/dist/core/transports/connection-transport.js +3 -0
- package/dist/core/transports/connection-transport.js.map +1 -0
- package/dist/core/transports/in-memory-connection-transport.d.ts +28 -0
- package/dist/core/transports/in-memory-connection-transport.d.ts.map +1 -0
- package/dist/core/transports/in-memory-connection-transport.js +111 -0
- package/dist/core/transports/in-memory-connection-transport.js.map +1 -0
- package/dist/core/transports/resp2/decoder.d.ts +15 -0
- package/dist/core/transports/resp2/decoder.d.ts.map +1 -0
- package/dist/core/transports/resp2/decoder.js +209 -0
- package/dist/core/transports/resp2/decoder.js.map +1 -0
- package/dist/core/transports/resp2/index.d.ts +2 -12
- package/dist/core/transports/resp2/index.d.ts.map +1 -1
- package/dist/core/transports/resp2/index.js +9 -0
- package/dist/core/transports/resp2/index.js.map +1 -0
- package/dist/core/transports/resp2/server.d.ts +26 -0
- package/dist/core/transports/resp2/server.d.ts.map +1 -0
- package/dist/core/transports/resp2/server.js +83 -0
- package/dist/core/transports/resp2/server.js.map +1 -0
- package/dist/core/transports/resp2/session-adapter.d.ts +24 -0
- package/dist/core/transports/resp2/session-adapter.d.ts.map +1 -0
- package/dist/core/transports/resp2/session-adapter.js +86 -0
- package/dist/core/transports/resp2/session-adapter.js.map +1 -0
- package/dist/core/transports/socket-connection-transport.d.ts +20 -0
- package/dist/core/transports/socket-connection-transport.d.ts.map +1 -0
- package/dist/core/transports/socket-connection-transport.js +64 -0
- package/dist/core/transports/socket-connection-transport.js.map +1 -0
- package/dist/core/turn-queue.d.ts +15 -0
- package/dist/core/turn-queue.d.ts.map +1 -0
- package/dist/core/turn-queue.js +51 -0
- package/dist/core/turn-queue.js.map +1 -0
- package/dist/index.d.ts +35 -347
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +141 -0
- package/dist/index.js.map +1 -0
- package/dist/logger.d.ts +6 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +3 -0
- package/dist/logger.js.map +1 -0
- package/dist/state/cluster-topology.d.ts +30 -0
- package/dist/state/cluster-topology.d.ts.map +1 -0
- package/dist/state/cluster-topology.js +88 -0
- package/dist/state/cluster-topology.js.map +1 -0
- package/dist/state/data-types.d.ts +40 -0
- package/dist/state/data-types.d.ts.map +1 -0
- package/dist/state/data-types.js +67 -0
- package/dist/state/data-types.js.map +1 -0
- package/dist/state/database.d.ts +44 -0
- package/dist/state/database.d.ts.map +1 -0
- package/dist/state/database.js +116 -0
- package/dist/state/database.js.map +1 -0
- package/dist/state/index.d.ts +14 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +27 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/keyspace.d.ts +45 -0
- package/dist/state/keyspace.d.ts.map +1 -0
- package/dist/state/keyspace.js +180 -0
- package/dist/state/keyspace.js.map +1 -0
- package/dist/state/mutation-events.d.ts +37 -0
- package/dist/state/mutation-events.d.ts.map +1 -0
- package/dist/state/mutation-events.js +74 -0
- package/dist/state/mutation-events.js.map +1 -0
- package/dist/state/pubsub-broker.d.ts +4 -0
- package/dist/state/pubsub-broker.d.ts.map +1 -0
- package/dist/state/pubsub-broker.js +10 -0
- package/dist/state/pubsub-broker.js.map +1 -0
- package/dist/state/script-cache.d.ts +10 -0
- package/dist/state/script-cache.d.ts.map +1 -0
- package/dist/state/script-cache.js +33 -0
- package/dist/state/script-cache.js.map +1 -0
- package/dist/state/server-state.d.ts +24 -0
- package/dist/state/server-state.d.ts.map +1 -0
- package/dist/state/server-state.js +42 -0
- package/dist/state/server-state.js.map +1 -0
- package/package.json +18 -22
- package/dist/cli.mjs +0 -5923
- package/dist/cli.mjs.map +0 -1
- package/dist/commanders/custom/base-commander.d.ts +0 -19
- package/dist/commanders/custom/base-commander.d.ts.map +0 -1
- package/dist/commanders/custom/cluster-router.d.ts +0 -57
- package/dist/commanders/custom/cluster-router.d.ts.map +0 -1
- package/dist/commanders/custom/clusterCommander.d.ts +0 -39
- package/dist/commanders/custom/clusterCommander.d.ts.map +0 -1
- package/dist/commanders/custom/commander.d.ts +0 -12
- package/dist/commanders/custom/commander.d.ts.map +0 -1
- package/dist/commanders/custom/commands/metadata.d.ts +0 -101
- package/dist/commanders/custom/commands/metadata.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/client/clientSetName.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/client/clientSetName.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/client/index.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/client/index.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/cluster/clusterInfo.d.ts +0 -7
- package/dist/commanders/custom/commands/redis/cluster/clusterInfo.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/cluster/clusterNodes.d.ts +0 -7
- package/dist/commanders/custom/commands/redis/cluster/clusterNodes.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/cluster/clusterShards.d.ts +0 -7
- package/dist/commanders/custom/commands/redis/cluster/clusterShards.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/cluster/clusterSlots.d.ts +0 -7
- package/dist/commanders/custom/commands/redis/cluster/clusterSlots.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/cluster/index.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/cluster/index.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/command/index.d.ts +0 -6
- package/dist/commanders/custom/commands/redis/command/index.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/hashes/hdel.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/hashes/hdel.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/hashes/hexists.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/hashes/hexists.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/hashes/hget.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/hashes/hget.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/hashes/hgetall.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/hashes/hgetall.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/hashes/hincrby.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/hashes/hincrby.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/hashes/hincrbyfloat.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/hashes/hincrbyfloat.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/hashes/hkeys.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/hashes/hkeys.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/hashes/hlen.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/hashes/hlen.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/hashes/hmget.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/hashes/hmget.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/hashes/hmset.d.ts +0 -10
- package/dist/commanders/custom/commands/redis/data/hashes/hmset.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/hashes/hset.d.ts +0 -10
- package/dist/commanders/custom/commands/redis/data/hashes/hset.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/hashes/hvals.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/hashes/hvals.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/hashes/index.d.ts +0 -13
- package/dist/commanders/custom/commands/redis/data/hashes/index.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/index.d.ts +0 -7
- package/dist/commanders/custom/commands/redis/data/index.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/keys/dbsize.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/keys/dbsize.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/keys/del.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/keys/del.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/keys/exists.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/keys/exists.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/keys/expire.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/keys/expire.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/keys/expireat.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/keys/expireat.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/keys/flushall.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/keys/flushall.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/keys/flushdb.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/keys/flushdb.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/keys/index.d.ts +0 -11
- package/dist/commanders/custom/commands/redis/data/keys/index.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/keys/pttl.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/keys/pttl.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/keys/ttl.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/keys/ttl.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/keys/type.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/keys/type.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/lists/index.d.ts +0 -11
- package/dist/commanders/custom/commands/redis/data/lists/index.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/lists/lindex.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/lists/lindex.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/lists/llen.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/lists/llen.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/lists/lpop.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/lists/lpop.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/lists/lpush.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/lists/lpush.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/lists/lrange.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/lists/lrange.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/lists/lrem.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/lists/lrem.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/lists/lset.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/lists/lset.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/lists/ltrim.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/lists/ltrim.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/lists/rpop.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/lists/rpop.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/lists/rpush.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/lists/rpush.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/sets/index.d.ts +0 -12
- package/dist/commanders/custom/commands/redis/data/sets/index.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/sets/sadd.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/sets/sadd.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/sets/scard.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/sets/scard.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/sets/sdiff.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/sets/sdiff.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/sets/sinter.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/sets/sinter.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/sets/sismember.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/sets/sismember.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/sets/smembers.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/sets/smembers.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/sets/smove.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/sets/smove.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/sets/spop.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/sets/spop.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/sets/srandmember.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/sets/srandmember.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/sets/srem.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/sets/srem.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/sets/sunion.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/sets/sunion.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/strings/append.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/strings/append.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/strings/decr.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/strings/decr.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/strings/decrby.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/strings/decrby.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/strings/get.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/strings/get.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/strings/getset.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/strings/getset.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/strings/incr.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/strings/incr.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/strings/incrby.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/strings/incrby.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/strings/incrbyfloat.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/strings/incrbyfloat.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/strings/index.d.ts +0 -14
- package/dist/commanders/custom/commands/redis/data/strings/index.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/strings/mget.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/strings/mget.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/strings/mset.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/strings/mset.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/strings/msetnx.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/strings/msetnx.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/strings/set.d.ts +0 -29
- package/dist/commanders/custom/commands/redis/data/strings/set.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/strings/strlen.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/strings/strlen.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/zsets/index.d.ts +0 -12
- package/dist/commanders/custom/commands/redis/data/zsets/index.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/zsets/zadd.d.ts +0 -10
- package/dist/commanders/custom/commands/redis/data/zsets/zadd.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/zsets/zcard.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/data/zsets/zcard.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/zsets/zincrby.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/zsets/zincrby.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/zsets/zrange.d.ts +0 -10
- package/dist/commanders/custom/commands/redis/data/zsets/zrange.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/zsets/zrangebyscore.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/zsets/zrangebyscore.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/zsets/zrank.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/zsets/zrank.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/zsets/zrem.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/zsets/zrem.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/zsets/zremrangebyscore.d.ts +0 -9
- package/dist/commanders/custom/commands/redis/data/zsets/zremrangebyscore.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/zsets/zrevrange.d.ts +0 -10
- package/dist/commanders/custom/commands/redis/data/zsets/zrevrange.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/zsets/zrevrank.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/zsets/zrevrank.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/data/zsets/zscore.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/data/zsets/zscore.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/index.d.ts +0 -39
- package/dist/commanders/custom/commands/redis/index.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/info.d.ts +0 -7
- package/dist/commanders/custom/commands/redis/info.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/monitor.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/monitor.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/ping.d.ts +0 -7
- package/dist/commanders/custom/commands/redis/ping.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/quit.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/quit.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/script/debug.d.ts +0 -7
- package/dist/commanders/custom/commands/redis/script/debug.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/script/eval.d.ts +0 -7
- package/dist/commanders/custom/commands/redis/script/eval.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/script/evalsha.d.ts +0 -7
- package/dist/commanders/custom/commands/redis/script/evalsha.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/script/exists.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/script/exists.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/script/flush.d.ts +0 -7
- package/dist/commanders/custom/commands/redis/script/flush.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/script/help.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/script/help.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/script/index.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/script/index.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/script/kill.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/script/kill.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/script/load.d.ts +0 -5
- package/dist/commanders/custom/commands/redis/script/load.d.ts.map +0 -1
- package/dist/commanders/custom/commands/redis/script/lua-reply.d.ts +0 -8
- package/dist/commanders/custom/commands/redis/script/lua-reply.d.ts.map +0 -1
- package/dist/commanders/custom/commands/registry.d.ts +0 -84
- package/dist/commanders/custom/commands/registry.d.ts.map +0 -1
- package/dist/commanders/custom/data-structures/hash.d.ts +0 -16
- package/dist/commanders/custom/data-structures/hash.d.ts.map +0 -1
- package/dist/commanders/custom/data-structures/list.d.ts +0 -15
- package/dist/commanders/custom/data-structures/list.d.ts.map +0 -1
- package/dist/commanders/custom/data-structures/set.d.ts +0 -16
- package/dist/commanders/custom/data-structures/set.d.ts.map +0 -1
- package/dist/commanders/custom/data-structures/stream.d.ts +0 -3
- package/dist/commanders/custom/data-structures/stream.d.ts.map +0 -1
- package/dist/commanders/custom/data-structures/string.d.ts +0 -5
- package/dist/commanders/custom/data-structures/string.d.ts.map +0 -1
- package/dist/commanders/custom/data-structures/zset.d.ts +0 -17
- package/dist/commanders/custom/data-structures/zset.d.ts.map +0 -1
- package/dist/commanders/custom/db.d.ts +0 -67
- package/dist/commanders/custom/db.d.ts.map +0 -1
- package/dist/commanders/custom/execution-context.d.ts +0 -12
- package/dist/commanders/custom/execution-context.d.ts.map +0 -1
- package/dist/commanders/custom/lua-runtime.d.ts +0 -16
- package/dist/commanders/custom/lua-runtime.d.ts.map +0 -1
- package/dist/commanders/custom/redis-kernel.d.ts +0 -46
- package/dist/commanders/custom/redis-kernel.d.ts.map +0 -1
- package/dist/commanders/custom/schema/builder.d.ts +0 -24
- package/dist/commanders/custom/schema/builder.d.ts.map +0 -1
- package/dist/commanders/custom/schema/command-adapter.d.ts +0 -25
- package/dist/commanders/custom/schema/command-adapter.d.ts.map +0 -1
- package/dist/commanders/custom/schema/index.d.ts +0 -7
- package/dist/commanders/custom/schema/index.d.ts.map +0 -1
- package/dist/commanders/custom/schema/input-mapper.d.ts +0 -28
- package/dist/commanders/custom/schema/input-mapper.d.ts.map +0 -1
- package/dist/commanders/custom/schema/registry.d.ts +0 -13
- package/dist/commanders/custom/schema/registry.d.ts.map +0 -1
- package/dist/commanders/custom/schema/resp-input-mapper.d.ts +0 -20
- package/dist/commanders/custom/schema/resp-input-mapper.d.ts.map +0 -1
- package/dist/commanders/custom/schema/types.d.ts +0 -43
- package/dist/commanders/custom/schema/types.d.ts.map +0 -1
- package/dist/core/cluster/network.d.ts +0 -24
- package/dist/core/cluster/network.d.ts.map +0 -1
- package/dist/core/errors.d.ts +0 -87
- package/dist/core/errors.d.ts.map +0 -1
- package/dist/core/transports/buffered-transport.d.ts +0 -14
- package/dist/core/transports/buffered-transport.d.ts.map +0 -1
- package/dist/core/transports/capturing-transport.d.ts +0 -19
- package/dist/core/transports/capturing-transport.d.ts.map +0 -1
- package/dist/core/transports/command-validator.d.ts +0 -12
- package/dist/core/transports/command-validator.d.ts.map +0 -1
- package/dist/core/transports/resp2/adapter.d.ts +0 -32
- package/dist/core/transports/resp2/adapter.d.ts.map +0 -1
- package/dist/core/transports/session-state.d.ts +0 -76
- package/dist/core/transports/session-state.d.ts.map +0 -1
- package/dist/core/transports/session.d.ts +0 -36
- package/dist/core/transports/session.d.ts.map +0 -1
- package/dist/index.cjs +0 -5759
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs +0 -5749
- package/dist/index.mjs.map +0 -1
- package/dist/types.d.ts +0 -54
- package/dist/types.d.ts.map +0 -1
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hashesCommands = exports.hstrlenCommand = exports.hincrbyfloatCommand = exports.hincrbyCommand = exports.hexistsCommand = exports.hlenCommand = exports.hvalsCommand = exports.hkeysCommand = exports.hgetallCommand = exports.hmgetCommand = exports.hmsetCommand = exports.hdelCommand = exports.hgetCommand = exports.hsetnxCommand = exports.hsetCommand = void 0;
|
|
4
|
+
const command_definition_1 = require("../core/command-definition");
|
|
5
|
+
const command_schema_1 = require("../core/command-schema");
|
|
6
|
+
const redis_error_1 = require("../core/redis-error");
|
|
7
|
+
const redis_value_1 = require("../core/redis-value");
|
|
8
|
+
const helpers_1 = require("./helpers");
|
|
9
|
+
function createFieldValuePairsSchema() {
|
|
10
|
+
return command_schema_1.t.custom((input, index, ctx) => {
|
|
11
|
+
const pairs = [];
|
|
12
|
+
let cursor = index;
|
|
13
|
+
if (cursor >= input.length) {
|
|
14
|
+
throw new redis_error_1.WrongNumberOfArgumentsError(ctx.commandName);
|
|
15
|
+
}
|
|
16
|
+
while (cursor < input.length) {
|
|
17
|
+
const field = input[cursor];
|
|
18
|
+
const value = input[cursor + 1];
|
|
19
|
+
if (!field || !value) {
|
|
20
|
+
throw new redis_error_1.WrongNumberOfArgumentsError(ctx.commandName);
|
|
21
|
+
}
|
|
22
|
+
pairs.push({ field, value });
|
|
23
|
+
cursor += 2;
|
|
24
|
+
}
|
|
25
|
+
if (pairs.length === 0) {
|
|
26
|
+
throw new redis_error_1.WrongNumberOfArgumentsError(ctx.commandName);
|
|
27
|
+
}
|
|
28
|
+
return { value: pairs, nextIndex: cursor };
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
exports.hsetCommand = (0, command_definition_1.defineCommand)({
|
|
32
|
+
name: 'hset',
|
|
33
|
+
schema: command_schema_1.t.object({ key: command_schema_1.t.key(), pairs: createFieldValuePairsSchema() }),
|
|
34
|
+
flags: ['write', 'denyoom', 'fast'],
|
|
35
|
+
keys: args => [args.key],
|
|
36
|
+
execute: (args, ctx) => {
|
|
37
|
+
const added = ctx.db.updateHash(args.key, hash => {
|
|
38
|
+
let count = 0;
|
|
39
|
+
for (const { field, value } of args.pairs) {
|
|
40
|
+
const hex = field.toString('hex');
|
|
41
|
+
if (!hash.fields.has(hex))
|
|
42
|
+
count++;
|
|
43
|
+
hash.fields.set(hex, { field, value });
|
|
44
|
+
}
|
|
45
|
+
return count;
|
|
46
|
+
});
|
|
47
|
+
return (0, helpers_1.integer)(added);
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
exports.hsetnxCommand = (0, command_definition_1.defineCommand)({
|
|
51
|
+
name: 'hsetnx',
|
|
52
|
+
schema: command_schema_1.t.object({ key: command_schema_1.t.key(), field: command_schema_1.t.key(), value: command_schema_1.t.key() }),
|
|
53
|
+
flags: ['write', 'denyoom', 'fast'],
|
|
54
|
+
keys: args => [args.key],
|
|
55
|
+
execute: (args, ctx) => {
|
|
56
|
+
const set = ctx.db.updateHash(args.key, hash => {
|
|
57
|
+
const hex = args.field.toString('hex');
|
|
58
|
+
if (hash.fields.has(hex))
|
|
59
|
+
return false;
|
|
60
|
+
hash.fields.set(hex, { field: args.field, value: args.value });
|
|
61
|
+
return true;
|
|
62
|
+
});
|
|
63
|
+
return (0, helpers_1.integer)(set ? 1 : 0);
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
exports.hgetCommand = (0, command_definition_1.defineCommand)({
|
|
67
|
+
name: 'hget',
|
|
68
|
+
schema: command_schema_1.t.object({ key: command_schema_1.t.key(), field: command_schema_1.t.key() }),
|
|
69
|
+
flags: ['readonly', 'fast'],
|
|
70
|
+
keys: args => [args.key],
|
|
71
|
+
execute: (args, ctx) => {
|
|
72
|
+
const hash = ctx.db.getHash(args.key);
|
|
73
|
+
if (!hash)
|
|
74
|
+
return (0, helpers_1.bulk)(null);
|
|
75
|
+
const entry = hash.fields.get(args.field.toString('hex'));
|
|
76
|
+
return (0, helpers_1.bulk)(entry?.value ?? null);
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
exports.hdelCommand = (0, command_definition_1.defineCommand)({
|
|
80
|
+
name: 'hdel',
|
|
81
|
+
schema: command_schema_1.t.object({ key: command_schema_1.t.key(), fields: command_schema_1.t.variadic(command_schema_1.t.key(), { min: 1 }) }),
|
|
82
|
+
flags: ['write', 'fast'],
|
|
83
|
+
keys: args => [args.key],
|
|
84
|
+
execute: (args, ctx) => {
|
|
85
|
+
let deleted = 0;
|
|
86
|
+
ctx.db.updateHash(args.key, hash => {
|
|
87
|
+
for (const field of args.fields) {
|
|
88
|
+
if (hash.fields.delete(field.toString('hex')))
|
|
89
|
+
deleted++;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
if (deleted > 0 && (ctx.db.getHash(args.key)?.fields.size ?? 0) === 0) {
|
|
93
|
+
ctx.db.delete(args.key);
|
|
94
|
+
}
|
|
95
|
+
return (0, helpers_1.integer)(deleted);
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
exports.hmsetCommand = (0, command_definition_1.defineCommand)({
|
|
99
|
+
name: 'hmset',
|
|
100
|
+
schema: command_schema_1.t.object({ key: command_schema_1.t.key(), pairs: createFieldValuePairsSchema() }),
|
|
101
|
+
flags: ['write', 'denyoom', 'fast'],
|
|
102
|
+
keys: args => [args.key],
|
|
103
|
+
execute: (args, ctx) => {
|
|
104
|
+
ctx.db.updateHash(args.key, hash => {
|
|
105
|
+
for (const { field, value } of args.pairs) {
|
|
106
|
+
hash.fields.set(field.toString('hex'), { field, value });
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
return (0, helpers_1.ok)();
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
exports.hmgetCommand = (0, command_definition_1.defineCommand)({
|
|
113
|
+
name: 'hmget',
|
|
114
|
+
schema: command_schema_1.t.object({ key: command_schema_1.t.key(), fields: command_schema_1.t.variadic(command_schema_1.t.key(), { min: 1 }) }),
|
|
115
|
+
flags: ['readonly', 'fast'],
|
|
116
|
+
keys: args => [args.key],
|
|
117
|
+
execute: (args, ctx) => {
|
|
118
|
+
const hash = ctx.db.getHash(args.key);
|
|
119
|
+
return (0, helpers_1.array)(args.fields.map(field => {
|
|
120
|
+
const entry = hash?.fields.get(field.toString('hex'));
|
|
121
|
+
return redis_value_1.RedisValue.bulkString(entry?.value ?? null);
|
|
122
|
+
}));
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
exports.hgetallCommand = (0, command_definition_1.defineCommand)({
|
|
126
|
+
name: 'hgetall',
|
|
127
|
+
schema: command_schema_1.t.object({ key: command_schema_1.t.key() }),
|
|
128
|
+
flags: ['readonly', 'fast'],
|
|
129
|
+
keys: args => [args.key],
|
|
130
|
+
execute: (args, ctx) => {
|
|
131
|
+
const hash = ctx.db.getHash(args.key);
|
|
132
|
+
if (!hash)
|
|
133
|
+
return (0, helpers_1.array)([]);
|
|
134
|
+
const items = [];
|
|
135
|
+
for (const { field, value } of hash.fields.values()) {
|
|
136
|
+
items.push(redis_value_1.RedisValue.bulkString(field));
|
|
137
|
+
items.push(redis_value_1.RedisValue.bulkString(value));
|
|
138
|
+
}
|
|
139
|
+
return (0, helpers_1.array)(items);
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
exports.hkeysCommand = (0, command_definition_1.defineCommand)({
|
|
143
|
+
name: 'hkeys',
|
|
144
|
+
schema: command_schema_1.t.object({ key: command_schema_1.t.key() }),
|
|
145
|
+
flags: ['readonly', 'fast'],
|
|
146
|
+
keys: args => [args.key],
|
|
147
|
+
execute: (args, ctx) => {
|
|
148
|
+
const hash = ctx.db.getHash(args.key);
|
|
149
|
+
if (!hash)
|
|
150
|
+
return (0, helpers_1.array)([]);
|
|
151
|
+
return (0, helpers_1.array)(Array.from(hash.fields.values()).map(({ field }) => redis_value_1.RedisValue.bulkString(field)));
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
exports.hvalsCommand = (0, command_definition_1.defineCommand)({
|
|
155
|
+
name: 'hvals',
|
|
156
|
+
schema: command_schema_1.t.object({ key: command_schema_1.t.key() }),
|
|
157
|
+
flags: ['readonly', 'fast'],
|
|
158
|
+
keys: args => [args.key],
|
|
159
|
+
execute: (args, ctx) => {
|
|
160
|
+
const hash = ctx.db.getHash(args.key);
|
|
161
|
+
if (!hash)
|
|
162
|
+
return (0, helpers_1.array)([]);
|
|
163
|
+
return (0, helpers_1.array)(Array.from(hash.fields.values()).map(({ value }) => redis_value_1.RedisValue.bulkString(value)));
|
|
164
|
+
},
|
|
165
|
+
});
|
|
166
|
+
exports.hlenCommand = (0, command_definition_1.defineCommand)({
|
|
167
|
+
name: 'hlen',
|
|
168
|
+
schema: command_schema_1.t.object({ key: command_schema_1.t.key() }),
|
|
169
|
+
flags: ['readonly', 'fast'],
|
|
170
|
+
keys: args => [args.key],
|
|
171
|
+
execute: (args, ctx) => {
|
|
172
|
+
const hash = ctx.db.getHash(args.key);
|
|
173
|
+
return (0, helpers_1.integer)(hash?.fields.size ?? 0);
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
exports.hexistsCommand = (0, command_definition_1.defineCommand)({
|
|
177
|
+
name: 'hexists',
|
|
178
|
+
schema: command_schema_1.t.object({ key: command_schema_1.t.key(), field: command_schema_1.t.key() }),
|
|
179
|
+
flags: ['readonly', 'fast'],
|
|
180
|
+
keys: args => [args.key],
|
|
181
|
+
execute: (args, ctx) => {
|
|
182
|
+
const hash = ctx.db.getHash(args.key);
|
|
183
|
+
if (!hash)
|
|
184
|
+
return (0, helpers_1.integer)(0);
|
|
185
|
+
return (0, helpers_1.integer)(hash.fields.has(args.field.toString('hex')) ? 1 : 0);
|
|
186
|
+
},
|
|
187
|
+
});
|
|
188
|
+
exports.hincrbyCommand = (0, command_definition_1.defineCommand)({
|
|
189
|
+
name: 'hincrby',
|
|
190
|
+
schema: command_schema_1.t.object({ key: command_schema_1.t.key(), field: command_schema_1.t.key(), increment: command_schema_1.t.integer() }),
|
|
191
|
+
flags: ['write', 'fast'],
|
|
192
|
+
keys: args => [args.key],
|
|
193
|
+
execute: (args, ctx) => {
|
|
194
|
+
const result = ctx.db.updateHash(args.key, hash => {
|
|
195
|
+
const hex = args.field.toString('hex');
|
|
196
|
+
const entry = hash.fields.get(hex);
|
|
197
|
+
let current = 0;
|
|
198
|
+
if (entry) {
|
|
199
|
+
const raw = entry.value.toString();
|
|
200
|
+
if (!/^-?\d+$/.test(raw) || !Number.isSafeInteger(Number(raw))) {
|
|
201
|
+
throw new redis_error_1.HashValueNotIntegerError();
|
|
202
|
+
}
|
|
203
|
+
current = Number(raw);
|
|
204
|
+
}
|
|
205
|
+
const next = current + args.increment;
|
|
206
|
+
const valueBuf = Buffer.from(String(next));
|
|
207
|
+
hash.fields.set(hex, { field: args.field, value: valueBuf });
|
|
208
|
+
return next;
|
|
209
|
+
});
|
|
210
|
+
return (0, helpers_1.integer)(result);
|
|
211
|
+
},
|
|
212
|
+
});
|
|
213
|
+
exports.hincrbyfloatCommand = (0, command_definition_1.defineCommand)({
|
|
214
|
+
name: 'hincrbyfloat',
|
|
215
|
+
schema: command_schema_1.t.object({ key: command_schema_1.t.key(), field: command_schema_1.t.key(), increment: command_schema_1.t.float() }),
|
|
216
|
+
flags: ['write', 'fast'],
|
|
217
|
+
keys: args => [args.key],
|
|
218
|
+
execute: (args, ctx) => {
|
|
219
|
+
const result = ctx.db.updateHash(args.key, hash => {
|
|
220
|
+
const hex = args.field.toString('hex');
|
|
221
|
+
const entry = hash.fields.get(hex);
|
|
222
|
+
let current = 0;
|
|
223
|
+
if (entry) {
|
|
224
|
+
const raw = entry.value.toString();
|
|
225
|
+
const parsed = parseFloat(raw);
|
|
226
|
+
if (isNaN(parsed)) {
|
|
227
|
+
throw new redis_error_1.HashValueNotFloatError();
|
|
228
|
+
}
|
|
229
|
+
current = parsed;
|
|
230
|
+
}
|
|
231
|
+
const next = current + args.increment;
|
|
232
|
+
if (isNaN(next) || !isFinite(next)) {
|
|
233
|
+
throw new redis_error_1.HashValueNotFloatError();
|
|
234
|
+
}
|
|
235
|
+
// Format like Redis: strip trailing zeros, use fixed notation for small values
|
|
236
|
+
let formatted = String(next);
|
|
237
|
+
if (formatted.includes('e') || formatted.includes('E')) {
|
|
238
|
+
formatted = next.toFixed(17).replace(/\.?0+$/, '');
|
|
239
|
+
}
|
|
240
|
+
const valueBuf = Buffer.from(formatted);
|
|
241
|
+
hash.fields.set(hex, { field: args.field, value: valueBuf });
|
|
242
|
+
return valueBuf;
|
|
243
|
+
});
|
|
244
|
+
return (0, helpers_1.bulk)(result);
|
|
245
|
+
},
|
|
246
|
+
});
|
|
247
|
+
exports.hstrlenCommand = (0, command_definition_1.defineCommand)({
|
|
248
|
+
name: 'hstrlen',
|
|
249
|
+
schema: command_schema_1.t.object({ key: command_schema_1.t.key(), field: command_schema_1.t.key() }),
|
|
250
|
+
flags: ['readonly', 'fast'],
|
|
251
|
+
keys: args => [args.key],
|
|
252
|
+
execute: (args, ctx) => {
|
|
253
|
+
const hash = ctx.db.getHash(args.key);
|
|
254
|
+
if (!hash)
|
|
255
|
+
return (0, helpers_1.integer)(0);
|
|
256
|
+
const entry = hash.fields.get(args.field.toString('hex'));
|
|
257
|
+
return (0, helpers_1.integer)(entry?.value.byteLength ?? 0);
|
|
258
|
+
},
|
|
259
|
+
});
|
|
260
|
+
exports.hashesCommands = [
|
|
261
|
+
exports.hsetCommand,
|
|
262
|
+
exports.hsetnxCommand,
|
|
263
|
+
exports.hgetCommand,
|
|
264
|
+
exports.hdelCommand,
|
|
265
|
+
exports.hmsetCommand,
|
|
266
|
+
exports.hmgetCommand,
|
|
267
|
+
exports.hgetallCommand,
|
|
268
|
+
exports.hkeysCommand,
|
|
269
|
+
exports.hvalsCommand,
|
|
270
|
+
exports.hlenCommand,
|
|
271
|
+
exports.hexistsCommand,
|
|
272
|
+
exports.hincrbyCommand,
|
|
273
|
+
exports.hincrbyfloatCommand,
|
|
274
|
+
exports.hstrlenCommand,
|
|
275
|
+
];
|
|
276
|
+
//# sourceMappingURL=hashes.js.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|
+
import { RedisResult } from '../core/redis-result';
|
|
3
|
+
import type { RedisDataTypeName, RedisDatabase } from '../state';
|
|
4
|
+
export declare function ok(): RedisResult;
|
|
5
|
+
export declare function bulk(value: Buffer | null): RedisResult;
|
|
6
|
+
export declare function integer(value: number | bigint): RedisResult;
|
|
7
|
+
export declare function simpleString(value: string): RedisResult;
|
|
8
|
+
export declare function array(items: RedisValue[]): RedisResult;
|
|
9
|
+
export declare function ensureStringOrMissing(db: RedisDatabase, key: Buffer): Buffer | null;
|
|
10
|
+
export declare function typeName(type: RedisDataTypeName | null): string;
|
|
11
|
+
export declare function ttlSeconds(expiresAt: number): number;
|
|
12
|
+
export declare function ttlMilliseconds(expiresAt: number): number;
|
|
13
|
+
export declare function parseIntegerToken(token: Buffer): number;
|
|
14
|
+
export declare function parsePositiveExpireToken(token: Buffer, commandName: string): number;
|
|
15
|
+
export declare function requireNextOptionValue(args: readonly Buffer[], index: number): Buffer;
|
|
16
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/commands/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAOlD,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAEhE,wBAAgB,EAAE,IAAI,WAAW,CAEhC;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,WAAW,CAEtD;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,CAE3D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAEvD;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,WAAW,CAEtD;AAED,wBAAgB,qBAAqB,CACnC,EAAE,EAAE,aAAa,EACjB,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,IAAI,CAWf;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,GAAG,MAAM,CAE/D;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAYvD;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,WAAW,EAAE,MAAM,GAClB,MAAM,CAOR;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,KAAK,EAAE,MAAM,GACZ,MAAM,CAOR"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ok = ok;
|
|
4
|
+
exports.bulk = bulk;
|
|
5
|
+
exports.integer = integer;
|
|
6
|
+
exports.simpleString = simpleString;
|
|
7
|
+
exports.array = array;
|
|
8
|
+
exports.ensureStringOrMissing = ensureStringOrMissing;
|
|
9
|
+
exports.typeName = typeName;
|
|
10
|
+
exports.ttlSeconds = ttlSeconds;
|
|
11
|
+
exports.ttlMilliseconds = ttlMilliseconds;
|
|
12
|
+
exports.parseIntegerToken = parseIntegerToken;
|
|
13
|
+
exports.parsePositiveExpireToken = parsePositiveExpireToken;
|
|
14
|
+
exports.requireNextOptionValue = requireNextOptionValue;
|
|
15
|
+
const redis_value_1 = require("../core/redis-value");
|
|
16
|
+
const redis_result_1 = require("../core/redis-result");
|
|
17
|
+
const redis_error_1 = require("../core/redis-error");
|
|
18
|
+
function ok() {
|
|
19
|
+
return redis_result_1.RedisResult.ok();
|
|
20
|
+
}
|
|
21
|
+
function bulk(value) {
|
|
22
|
+
return redis_result_1.RedisResult.create(redis_value_1.RedisValue.bulkString(value));
|
|
23
|
+
}
|
|
24
|
+
function integer(value) {
|
|
25
|
+
return redis_result_1.RedisResult.create(redis_value_1.RedisValue.integer(value));
|
|
26
|
+
}
|
|
27
|
+
function simpleString(value) {
|
|
28
|
+
return redis_result_1.RedisResult.create(redis_value_1.RedisValue.simpleString(value));
|
|
29
|
+
}
|
|
30
|
+
function array(items) {
|
|
31
|
+
return redis_result_1.RedisResult.create(redis_value_1.RedisValue.array(items));
|
|
32
|
+
}
|
|
33
|
+
function ensureStringOrMissing(db, key) {
|
|
34
|
+
const type = db.getType(key);
|
|
35
|
+
if (type === null) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
if (type !== 'string') {
|
|
39
|
+
throw new redis_error_1.WrongTypeRedisError();
|
|
40
|
+
}
|
|
41
|
+
return db.getString(key);
|
|
42
|
+
}
|
|
43
|
+
function typeName(type) {
|
|
44
|
+
return type ?? 'none';
|
|
45
|
+
}
|
|
46
|
+
function ttlSeconds(expiresAt) {
|
|
47
|
+
return Math.max(0, Math.ceil((expiresAt - Date.now()) / 1000));
|
|
48
|
+
}
|
|
49
|
+
function ttlMilliseconds(expiresAt) {
|
|
50
|
+
return Math.max(0, expiresAt - Date.now());
|
|
51
|
+
}
|
|
52
|
+
function parseIntegerToken(token) {
|
|
53
|
+
const raw = token.toString();
|
|
54
|
+
if (!/^-?\d+$/.test(raw)) {
|
|
55
|
+
throw new redis_error_1.ExpectedIntegerError();
|
|
56
|
+
}
|
|
57
|
+
const value = Number(raw);
|
|
58
|
+
if (!Number.isSafeInteger(value)) {
|
|
59
|
+
throw new redis_error_1.ExpectedIntegerError();
|
|
60
|
+
}
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
function parsePositiveExpireToken(token, commandName) {
|
|
64
|
+
const value = parseIntegerToken(token);
|
|
65
|
+
if (value <= 0) {
|
|
66
|
+
throw new redis_error_1.InvalidExpireTimeError(commandName);
|
|
67
|
+
}
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
function requireNextOptionValue(args, index) {
|
|
71
|
+
const value = args[index];
|
|
72
|
+
if (!value) {
|
|
73
|
+
throw new redis_error_1.RedisSyntaxError();
|
|
74
|
+
}
|
|
75
|
+
return value;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/commands/helpers.ts"],"names":[],"mappings":";;AAUA,gBAEC;AAED,oBAEC;AAED,0BAEC;AAED,oCAEC;AAED,sBAEC;AAED,sDAcC;AAED,4BAEC;AAED,gCAEC;AAED,0CAEC;AAED,8CAYC;AAED,4DAUC;AAED,wDAUC;AA9FD,qDAAgD;AAChD,uDAAkD;AAClD,qDAK4B;AAG5B,SAAgB,EAAE;IAChB,OAAO,0BAAW,CAAC,EAAE,EAAE,CAAA;AACzB,CAAC;AAED,SAAgB,IAAI,CAAC,KAAoB;IACvC,OAAO,0BAAW,CAAC,MAAM,CAAC,wBAAU,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAA;AACzD,CAAC;AAED,SAAgB,OAAO,CAAC,KAAsB;IAC5C,OAAO,0BAAW,CAAC,MAAM,CAAC,wBAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA;AACtD,CAAC;AAED,SAAgB,YAAY,CAAC,KAAa;IACxC,OAAO,0BAAW,CAAC,MAAM,CAAC,wBAAU,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAA;AAC3D,CAAC;AAED,SAAgB,KAAK,CAAC,KAAmB;IACvC,OAAO,0BAAW,CAAC,MAAM,CAAC,wBAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;AACpD,CAAC;AAED,SAAgB,qBAAqB,CACnC,EAAiB,EACjB,GAAW;IAEX,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,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IAAI,oCAAsB,CAAC,WAAW,CAAC,CAAA;IAC/C,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC;AAED,SAAgB,sBAAsB,CACpC,IAAuB,EACvB,KAAa;IAEb,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;IACzB,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,8BAAgB,EAAE,CAAA;IAC9B,CAAC;IAED,OAAO,KAAK,CAAA;AACd,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { CommandDefinition } from '../core/command-definition';
|
|
2
|
+
import { CommandExecutor } from '../core/command-executor';
|
|
3
|
+
import { CommandRegistry } from '../core/command-registry';
|
|
4
|
+
import type { ExecutionPolicy } from '../core/execution-policies';
|
|
5
|
+
export declare const redisCommandDefinitions: readonly CommandDefinition[];
|
|
6
|
+
export declare function createRedisCommandRegistry(extraCommands?: readonly CommandDefinition[]): CommandRegistry;
|
|
7
|
+
export declare function createRedisCommandExecutor(options?: {
|
|
8
|
+
extraCommands?: readonly CommandDefinition[];
|
|
9
|
+
policies?: readonly ExecutionPolicy[];
|
|
10
|
+
}): CommandExecutor;
|
|
11
|
+
export { pingCommand, quitCommand, selectCommand, connectionCommands, } from './connection';
|
|
12
|
+
export { createClusterCommand } from './cluster';
|
|
13
|
+
export { commandCommand } from './command';
|
|
14
|
+
export { getCommand, setCommand, mgetCommand, appendCommand, strlenCommand, incrCommand, decrCommand, incrbyCommand, decrbyCommand, incrbyfloatCommand, getsetCommand, getdelCommand, setnxCommand, setexCommand, psetexCommand, msetCommand, msetnxCommand, getrangeCommand, setrangeCommand, getexCommand, stringsCommands, } from './strings';
|
|
15
|
+
export { discardCommand, execCommand, multiCommand, transactionCommands, unwatchCommand, watchCommand, } from './transactions';
|
|
16
|
+
export { dbsizeCommand, delCommand, existsCommand, expireCommand, expireatCommand, flushallCommand, flushdbCommand, keysCommands, persistCommand, pexpireCommand, pexpireatCommand, pttlCommand, renameCommand, renamenxCommand, ttlCommand, typeCommand, } from './keys';
|
|
17
|
+
export { hscanCommand, keysCommand, scanCommand, scanCommands, sscanCommand, zscanCommand, } from './scan';
|
|
18
|
+
export { listsCommands, lindexCommand, llenCommand, lpopCommand, lpushCommand, lpushxCommand, lrangeCommand, lremCommand, lsetCommand, ltrimCommand, rpopCommand, rpoplpushCommand, rpushCommand, rpushxCommand, } from './lists';
|
|
19
|
+
export { hashesCommands, hexistsCommand, hgetallCommand, hgetCommand, hdelCommand, hincrbyfloatCommand, hincrbyCommand, hkeysCommand, hlenCommand, hmgetCommand, hmsetCommand, hsetnxCommand, hsetCommand, hstrlenCommand, hvalsCommand, } from './hashes';
|
|
20
|
+
export { setsCommands, saddCommand, scardCommand, sdiffCommand, sdiffstoreCommand, sinterCommand, sinterstoreCommand, sismemberCommand, smembersCommand, smoveCommand, spopCommand, srandmemberCommand, sremCommand, sunionCommand, sunionstoreCommand, } from './sets';
|
|
21
|
+
export { evalCommand, evalshaCommand, scriptCommand, scriptsCommands, } from './scripts';
|
|
22
|
+
export { zsetsCommands, zaddCommand, zremCommand, zcardCommand, zrankCommand, zrevrankCommand, zscoreCommand, zincrbyCommand, zrangeCommand, zrevrangeCommand, zrangebyscoreCommand, zremrangebyscoreCommand, zcountCommand, zpopminCommand, zpopmaxCommand, } from './zsets';
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAcjE,eAAO,MAAM,uBAAuB,EAAE,SAAS,iBAAiB,EA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,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,aAAa,GACd,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,cAAc,EACd,cAAc,EACd,cAAc,EACd,WAAW,EACX,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,WAAW,EACX,cAAc,EACd,YAAY,GACb,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,kBAAkB,GACnB,MAAM,QAAQ,CAAA;AACf,OAAO,EACL,WAAW,EACX,cAAc,EACd,aAAa,EACb,eAAe,GAChB,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,aAAa,EACb,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,aAAa,EACb,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EACvB,aAAa,EACb,cAAc,EACd,cAAc,GACf,MAAM,SAAS,CAAA"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.typeCommand = exports.ttlCommand = exports.renamenxCommand = exports.renameCommand = exports.pttlCommand = exports.pexpireatCommand = exports.pexpireCommand = exports.persistCommand = exports.keysCommands = exports.flushdbCommand = exports.flushallCommand = exports.expireatCommand = exports.expireCommand = exports.existsCommand = exports.delCommand = exports.dbsizeCommand = exports.watchCommand = exports.unwatchCommand = exports.transactionCommands = exports.multiCommand = exports.execCommand = exports.discardCommand = exports.stringsCommands = exports.getexCommand = exports.setrangeCommand = exports.getrangeCommand = exports.msetnxCommand = exports.msetCommand = exports.psetexCommand = exports.setexCommand = exports.setnxCommand = exports.getdelCommand = exports.getsetCommand = exports.incrbyfloatCommand = exports.decrbyCommand = exports.incrbyCommand = exports.decrCommand = exports.incrCommand = exports.strlenCommand = exports.appendCommand = exports.mgetCommand = exports.setCommand = exports.getCommand = exports.commandCommand = exports.createClusterCommand = exports.connectionCommands = exports.selectCommand = exports.quitCommand = exports.pingCommand = exports.redisCommandDefinitions = void 0;
|
|
4
|
+
exports.sunionstoreCommand = exports.sunionCommand = exports.sremCommand = exports.srandmemberCommand = exports.spopCommand = exports.smoveCommand = exports.smembersCommand = exports.sismemberCommand = exports.sinterstoreCommand = exports.sinterCommand = exports.sdiffstoreCommand = exports.sdiffCommand = exports.scardCommand = exports.saddCommand = exports.setsCommands = exports.hvalsCommand = exports.hstrlenCommand = exports.hsetCommand = exports.hsetnxCommand = exports.hmsetCommand = exports.hmgetCommand = exports.hlenCommand = exports.hkeysCommand = exports.hincrbyCommand = exports.hincrbyfloatCommand = exports.hdelCommand = exports.hgetCommand = exports.hgetallCommand = exports.hexistsCommand = exports.hashesCommands = exports.rpushxCommand = exports.rpushCommand = exports.rpoplpushCommand = exports.rpopCommand = exports.ltrimCommand = exports.lsetCommand = exports.lremCommand = exports.lrangeCommand = exports.lpushxCommand = exports.lpushCommand = exports.lpopCommand = exports.llenCommand = exports.lindexCommand = exports.listsCommands = exports.zscanCommand = exports.sscanCommand = exports.scanCommands = exports.scanCommand = exports.keysCommand = exports.hscanCommand = void 0;
|
|
5
|
+
exports.zpopmaxCommand = exports.zpopminCommand = exports.zcountCommand = exports.zremrangebyscoreCommand = exports.zrangebyscoreCommand = exports.zrevrangeCommand = exports.zrangeCommand = exports.zincrbyCommand = exports.zscoreCommand = exports.zrevrankCommand = exports.zrankCommand = exports.zcardCommand = exports.zremCommand = exports.zaddCommand = exports.zsetsCommands = exports.scriptsCommands = exports.scriptCommand = exports.evalshaCommand = exports.evalCommand = void 0;
|
|
6
|
+
exports.createRedisCommandRegistry = createRedisCommandRegistry;
|
|
7
|
+
exports.createRedisCommandExecutor = createRedisCommandExecutor;
|
|
8
|
+
const command_executor_1 = require("../core/command-executor");
|
|
9
|
+
const command_registry_1 = require("../core/command-registry");
|
|
10
|
+
const execution_policies_1 = require("../core/execution-policies");
|
|
11
|
+
const command_1 = require("./command");
|
|
12
|
+
const connection_1 = require("./connection");
|
|
13
|
+
const hashes_1 = require("./hashes");
|
|
14
|
+
const keys_1 = require("./keys");
|
|
15
|
+
const lists_1 = require("./lists");
|
|
16
|
+
const scan_1 = require("./scan");
|
|
17
|
+
const scripts_1 = require("./scripts");
|
|
18
|
+
const sets_1 = require("./sets");
|
|
19
|
+
const strings_1 = require("./strings");
|
|
20
|
+
const transactions_1 = require("./transactions");
|
|
21
|
+
const zsets_1 = require("./zsets");
|
|
22
|
+
exports.redisCommandDefinitions = [
|
|
23
|
+
...connection_1.connectionCommands,
|
|
24
|
+
command_1.commandCommand,
|
|
25
|
+
...transactions_1.transactionCommands,
|
|
26
|
+
...strings_1.stringsCommands,
|
|
27
|
+
...keys_1.keysCommands,
|
|
28
|
+
...scan_1.scanCommands,
|
|
29
|
+
...hashes_1.hashesCommands,
|
|
30
|
+
...lists_1.listsCommands,
|
|
31
|
+
...sets_1.setsCommands,
|
|
32
|
+
...zsets_1.zsetsCommands,
|
|
33
|
+
...scripts_1.scriptsCommands,
|
|
34
|
+
];
|
|
35
|
+
function createRedisCommandRegistry(extraCommands = []) {
|
|
36
|
+
const registry = new command_registry_1.CommandRegistry();
|
|
37
|
+
registry.registerAll(exports.redisCommandDefinitions);
|
|
38
|
+
registry.registerAll(extraCommands);
|
|
39
|
+
return registry;
|
|
40
|
+
}
|
|
41
|
+
function createRedisCommandExecutor(options) {
|
|
42
|
+
return new command_executor_1.CommandExecutor({
|
|
43
|
+
registry: createRedisCommandRegistry(options?.extraCommands),
|
|
44
|
+
policies: [...(options?.policies ?? []), (0, execution_policies_1.createTransactionPolicy)()],
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
var connection_2 = require("./connection");
|
|
48
|
+
Object.defineProperty(exports, "pingCommand", { enumerable: true, get: function () { return connection_2.pingCommand; } });
|
|
49
|
+
Object.defineProperty(exports, "quitCommand", { enumerable: true, get: function () { return connection_2.quitCommand; } });
|
|
50
|
+
Object.defineProperty(exports, "selectCommand", { enumerable: true, get: function () { return connection_2.selectCommand; } });
|
|
51
|
+
Object.defineProperty(exports, "connectionCommands", { enumerable: true, get: function () { return connection_2.connectionCommands; } });
|
|
52
|
+
var cluster_1 = require("./cluster");
|
|
53
|
+
Object.defineProperty(exports, "createClusterCommand", { enumerable: true, get: function () { return cluster_1.createClusterCommand; } });
|
|
54
|
+
var command_2 = require("./command");
|
|
55
|
+
Object.defineProperty(exports, "commandCommand", { enumerable: true, get: function () { return command_2.commandCommand; } });
|
|
56
|
+
var strings_2 = require("./strings");
|
|
57
|
+
Object.defineProperty(exports, "getCommand", { enumerable: true, get: function () { return strings_2.getCommand; } });
|
|
58
|
+
Object.defineProperty(exports, "setCommand", { enumerable: true, get: function () { return strings_2.setCommand; } });
|
|
59
|
+
Object.defineProperty(exports, "mgetCommand", { enumerable: true, get: function () { return strings_2.mgetCommand; } });
|
|
60
|
+
Object.defineProperty(exports, "appendCommand", { enumerable: true, get: function () { return strings_2.appendCommand; } });
|
|
61
|
+
Object.defineProperty(exports, "strlenCommand", { enumerable: true, get: function () { return strings_2.strlenCommand; } });
|
|
62
|
+
Object.defineProperty(exports, "incrCommand", { enumerable: true, get: function () { return strings_2.incrCommand; } });
|
|
63
|
+
Object.defineProperty(exports, "decrCommand", { enumerable: true, get: function () { return strings_2.decrCommand; } });
|
|
64
|
+
Object.defineProperty(exports, "incrbyCommand", { enumerable: true, get: function () { return strings_2.incrbyCommand; } });
|
|
65
|
+
Object.defineProperty(exports, "decrbyCommand", { enumerable: true, get: function () { return strings_2.decrbyCommand; } });
|
|
66
|
+
Object.defineProperty(exports, "incrbyfloatCommand", { enumerable: true, get: function () { return strings_2.incrbyfloatCommand; } });
|
|
67
|
+
Object.defineProperty(exports, "getsetCommand", { enumerable: true, get: function () { return strings_2.getsetCommand; } });
|
|
68
|
+
Object.defineProperty(exports, "getdelCommand", { enumerable: true, get: function () { return strings_2.getdelCommand; } });
|
|
69
|
+
Object.defineProperty(exports, "setnxCommand", { enumerable: true, get: function () { return strings_2.setnxCommand; } });
|
|
70
|
+
Object.defineProperty(exports, "setexCommand", { enumerable: true, get: function () { return strings_2.setexCommand; } });
|
|
71
|
+
Object.defineProperty(exports, "psetexCommand", { enumerable: true, get: function () { return strings_2.psetexCommand; } });
|
|
72
|
+
Object.defineProperty(exports, "msetCommand", { enumerable: true, get: function () { return strings_2.msetCommand; } });
|
|
73
|
+
Object.defineProperty(exports, "msetnxCommand", { enumerable: true, get: function () { return strings_2.msetnxCommand; } });
|
|
74
|
+
Object.defineProperty(exports, "getrangeCommand", { enumerable: true, get: function () { return strings_2.getrangeCommand; } });
|
|
75
|
+
Object.defineProperty(exports, "setrangeCommand", { enumerable: true, get: function () { return strings_2.setrangeCommand; } });
|
|
76
|
+
Object.defineProperty(exports, "getexCommand", { enumerable: true, get: function () { return strings_2.getexCommand; } });
|
|
77
|
+
Object.defineProperty(exports, "stringsCommands", { enumerable: true, get: function () { return strings_2.stringsCommands; } });
|
|
78
|
+
var transactions_2 = require("./transactions");
|
|
79
|
+
Object.defineProperty(exports, "discardCommand", { enumerable: true, get: function () { return transactions_2.discardCommand; } });
|
|
80
|
+
Object.defineProperty(exports, "execCommand", { enumerable: true, get: function () { return transactions_2.execCommand; } });
|
|
81
|
+
Object.defineProperty(exports, "multiCommand", { enumerable: true, get: function () { return transactions_2.multiCommand; } });
|
|
82
|
+
Object.defineProperty(exports, "transactionCommands", { enumerable: true, get: function () { return transactions_2.transactionCommands; } });
|
|
83
|
+
Object.defineProperty(exports, "unwatchCommand", { enumerable: true, get: function () { return transactions_2.unwatchCommand; } });
|
|
84
|
+
Object.defineProperty(exports, "watchCommand", { enumerable: true, get: function () { return transactions_2.watchCommand; } });
|
|
85
|
+
var keys_2 = require("./keys");
|
|
86
|
+
Object.defineProperty(exports, "dbsizeCommand", { enumerable: true, get: function () { return keys_2.dbsizeCommand; } });
|
|
87
|
+
Object.defineProperty(exports, "delCommand", { enumerable: true, get: function () { return keys_2.delCommand; } });
|
|
88
|
+
Object.defineProperty(exports, "existsCommand", { enumerable: true, get: function () { return keys_2.existsCommand; } });
|
|
89
|
+
Object.defineProperty(exports, "expireCommand", { enumerable: true, get: function () { return keys_2.expireCommand; } });
|
|
90
|
+
Object.defineProperty(exports, "expireatCommand", { enumerable: true, get: function () { return keys_2.expireatCommand; } });
|
|
91
|
+
Object.defineProperty(exports, "flushallCommand", { enumerable: true, get: function () { return keys_2.flushallCommand; } });
|
|
92
|
+
Object.defineProperty(exports, "flushdbCommand", { enumerable: true, get: function () { return keys_2.flushdbCommand; } });
|
|
93
|
+
Object.defineProperty(exports, "keysCommands", { enumerable: true, get: function () { return keys_2.keysCommands; } });
|
|
94
|
+
Object.defineProperty(exports, "persistCommand", { enumerable: true, get: function () { return keys_2.persistCommand; } });
|
|
95
|
+
Object.defineProperty(exports, "pexpireCommand", { enumerable: true, get: function () { return keys_2.pexpireCommand; } });
|
|
96
|
+
Object.defineProperty(exports, "pexpireatCommand", { enumerable: true, get: function () { return keys_2.pexpireatCommand; } });
|
|
97
|
+
Object.defineProperty(exports, "pttlCommand", { enumerable: true, get: function () { return keys_2.pttlCommand; } });
|
|
98
|
+
Object.defineProperty(exports, "renameCommand", { enumerable: true, get: function () { return keys_2.renameCommand; } });
|
|
99
|
+
Object.defineProperty(exports, "renamenxCommand", { enumerable: true, get: function () { return keys_2.renamenxCommand; } });
|
|
100
|
+
Object.defineProperty(exports, "ttlCommand", { enumerable: true, get: function () { return keys_2.ttlCommand; } });
|
|
101
|
+
Object.defineProperty(exports, "typeCommand", { enumerable: true, get: function () { return keys_2.typeCommand; } });
|
|
102
|
+
var scan_2 = require("./scan");
|
|
103
|
+
Object.defineProperty(exports, "hscanCommand", { enumerable: true, get: function () { return scan_2.hscanCommand; } });
|
|
104
|
+
Object.defineProperty(exports, "keysCommand", { enumerable: true, get: function () { return scan_2.keysCommand; } });
|
|
105
|
+
Object.defineProperty(exports, "scanCommand", { enumerable: true, get: function () { return scan_2.scanCommand; } });
|
|
106
|
+
Object.defineProperty(exports, "scanCommands", { enumerable: true, get: function () { return scan_2.scanCommands; } });
|
|
107
|
+
Object.defineProperty(exports, "sscanCommand", { enumerable: true, get: function () { return scan_2.sscanCommand; } });
|
|
108
|
+
Object.defineProperty(exports, "zscanCommand", { enumerable: true, get: function () { return scan_2.zscanCommand; } });
|
|
109
|
+
var lists_2 = require("./lists");
|
|
110
|
+
Object.defineProperty(exports, "listsCommands", { enumerable: true, get: function () { return lists_2.listsCommands; } });
|
|
111
|
+
Object.defineProperty(exports, "lindexCommand", { enumerable: true, get: function () { return lists_2.lindexCommand; } });
|
|
112
|
+
Object.defineProperty(exports, "llenCommand", { enumerable: true, get: function () { return lists_2.llenCommand; } });
|
|
113
|
+
Object.defineProperty(exports, "lpopCommand", { enumerable: true, get: function () { return lists_2.lpopCommand; } });
|
|
114
|
+
Object.defineProperty(exports, "lpushCommand", { enumerable: true, get: function () { return lists_2.lpushCommand; } });
|
|
115
|
+
Object.defineProperty(exports, "lpushxCommand", { enumerable: true, get: function () { return lists_2.lpushxCommand; } });
|
|
116
|
+
Object.defineProperty(exports, "lrangeCommand", { enumerable: true, get: function () { return lists_2.lrangeCommand; } });
|
|
117
|
+
Object.defineProperty(exports, "lremCommand", { enumerable: true, get: function () { return lists_2.lremCommand; } });
|
|
118
|
+
Object.defineProperty(exports, "lsetCommand", { enumerable: true, get: function () { return lists_2.lsetCommand; } });
|
|
119
|
+
Object.defineProperty(exports, "ltrimCommand", { enumerable: true, get: function () { return lists_2.ltrimCommand; } });
|
|
120
|
+
Object.defineProperty(exports, "rpopCommand", { enumerable: true, get: function () { return lists_2.rpopCommand; } });
|
|
121
|
+
Object.defineProperty(exports, "rpoplpushCommand", { enumerable: true, get: function () { return lists_2.rpoplpushCommand; } });
|
|
122
|
+
Object.defineProperty(exports, "rpushCommand", { enumerable: true, get: function () { return lists_2.rpushCommand; } });
|
|
123
|
+
Object.defineProperty(exports, "rpushxCommand", { enumerable: true, get: function () { return lists_2.rpushxCommand; } });
|
|
124
|
+
var hashes_2 = require("./hashes");
|
|
125
|
+
Object.defineProperty(exports, "hashesCommands", { enumerable: true, get: function () { return hashes_2.hashesCommands; } });
|
|
126
|
+
Object.defineProperty(exports, "hexistsCommand", { enumerable: true, get: function () { return hashes_2.hexistsCommand; } });
|
|
127
|
+
Object.defineProperty(exports, "hgetallCommand", { enumerable: true, get: function () { return hashes_2.hgetallCommand; } });
|
|
128
|
+
Object.defineProperty(exports, "hgetCommand", { enumerable: true, get: function () { return hashes_2.hgetCommand; } });
|
|
129
|
+
Object.defineProperty(exports, "hdelCommand", { enumerable: true, get: function () { return hashes_2.hdelCommand; } });
|
|
130
|
+
Object.defineProperty(exports, "hincrbyfloatCommand", { enumerable: true, get: function () { return hashes_2.hincrbyfloatCommand; } });
|
|
131
|
+
Object.defineProperty(exports, "hincrbyCommand", { enumerable: true, get: function () { return hashes_2.hincrbyCommand; } });
|
|
132
|
+
Object.defineProperty(exports, "hkeysCommand", { enumerable: true, get: function () { return hashes_2.hkeysCommand; } });
|
|
133
|
+
Object.defineProperty(exports, "hlenCommand", { enumerable: true, get: function () { return hashes_2.hlenCommand; } });
|
|
134
|
+
Object.defineProperty(exports, "hmgetCommand", { enumerable: true, get: function () { return hashes_2.hmgetCommand; } });
|
|
135
|
+
Object.defineProperty(exports, "hmsetCommand", { enumerable: true, get: function () { return hashes_2.hmsetCommand; } });
|
|
136
|
+
Object.defineProperty(exports, "hsetnxCommand", { enumerable: true, get: function () { return hashes_2.hsetnxCommand; } });
|
|
137
|
+
Object.defineProperty(exports, "hsetCommand", { enumerable: true, get: function () { return hashes_2.hsetCommand; } });
|
|
138
|
+
Object.defineProperty(exports, "hstrlenCommand", { enumerable: true, get: function () { return hashes_2.hstrlenCommand; } });
|
|
139
|
+
Object.defineProperty(exports, "hvalsCommand", { enumerable: true, get: function () { return hashes_2.hvalsCommand; } });
|
|
140
|
+
var sets_2 = require("./sets");
|
|
141
|
+
Object.defineProperty(exports, "setsCommands", { enumerable: true, get: function () { return sets_2.setsCommands; } });
|
|
142
|
+
Object.defineProperty(exports, "saddCommand", { enumerable: true, get: function () { return sets_2.saddCommand; } });
|
|
143
|
+
Object.defineProperty(exports, "scardCommand", { enumerable: true, get: function () { return sets_2.scardCommand; } });
|
|
144
|
+
Object.defineProperty(exports, "sdiffCommand", { enumerable: true, get: function () { return sets_2.sdiffCommand; } });
|
|
145
|
+
Object.defineProperty(exports, "sdiffstoreCommand", { enumerable: true, get: function () { return sets_2.sdiffstoreCommand; } });
|
|
146
|
+
Object.defineProperty(exports, "sinterCommand", { enumerable: true, get: function () { return sets_2.sinterCommand; } });
|
|
147
|
+
Object.defineProperty(exports, "sinterstoreCommand", { enumerable: true, get: function () { return sets_2.sinterstoreCommand; } });
|
|
148
|
+
Object.defineProperty(exports, "sismemberCommand", { enumerable: true, get: function () { return sets_2.sismemberCommand; } });
|
|
149
|
+
Object.defineProperty(exports, "smembersCommand", { enumerable: true, get: function () { return sets_2.smembersCommand; } });
|
|
150
|
+
Object.defineProperty(exports, "smoveCommand", { enumerable: true, get: function () { return sets_2.smoveCommand; } });
|
|
151
|
+
Object.defineProperty(exports, "spopCommand", { enumerable: true, get: function () { return sets_2.spopCommand; } });
|
|
152
|
+
Object.defineProperty(exports, "srandmemberCommand", { enumerable: true, get: function () { return sets_2.srandmemberCommand; } });
|
|
153
|
+
Object.defineProperty(exports, "sremCommand", { enumerable: true, get: function () { return sets_2.sremCommand; } });
|
|
154
|
+
Object.defineProperty(exports, "sunionCommand", { enumerable: true, get: function () { return sets_2.sunionCommand; } });
|
|
155
|
+
Object.defineProperty(exports, "sunionstoreCommand", { enumerable: true, get: function () { return sets_2.sunionstoreCommand; } });
|
|
156
|
+
var scripts_2 = require("./scripts");
|
|
157
|
+
Object.defineProperty(exports, "evalCommand", { enumerable: true, get: function () { return scripts_2.evalCommand; } });
|
|
158
|
+
Object.defineProperty(exports, "evalshaCommand", { enumerable: true, get: function () { return scripts_2.evalshaCommand; } });
|
|
159
|
+
Object.defineProperty(exports, "scriptCommand", { enumerable: true, get: function () { return scripts_2.scriptCommand; } });
|
|
160
|
+
Object.defineProperty(exports, "scriptsCommands", { enumerable: true, get: function () { return scripts_2.scriptsCommands; } });
|
|
161
|
+
var zsets_2 = require("./zsets");
|
|
162
|
+
Object.defineProperty(exports, "zsetsCommands", { enumerable: true, get: function () { return zsets_2.zsetsCommands; } });
|
|
163
|
+
Object.defineProperty(exports, "zaddCommand", { enumerable: true, get: function () { return zsets_2.zaddCommand; } });
|
|
164
|
+
Object.defineProperty(exports, "zremCommand", { enumerable: true, get: function () { return zsets_2.zremCommand; } });
|
|
165
|
+
Object.defineProperty(exports, "zcardCommand", { enumerable: true, get: function () { return zsets_2.zcardCommand; } });
|
|
166
|
+
Object.defineProperty(exports, "zrankCommand", { enumerable: true, get: function () { return zsets_2.zrankCommand; } });
|
|
167
|
+
Object.defineProperty(exports, "zrevrankCommand", { enumerable: true, get: function () { return zsets_2.zrevrankCommand; } });
|
|
168
|
+
Object.defineProperty(exports, "zscoreCommand", { enumerable: true, get: function () { return zsets_2.zscoreCommand; } });
|
|
169
|
+
Object.defineProperty(exports, "zincrbyCommand", { enumerable: true, get: function () { return zsets_2.zincrbyCommand; } });
|
|
170
|
+
Object.defineProperty(exports, "zrangeCommand", { enumerable: true, get: function () { return zsets_2.zrangeCommand; } });
|
|
171
|
+
Object.defineProperty(exports, "zrevrangeCommand", { enumerable: true, get: function () { return zsets_2.zrevrangeCommand; } });
|
|
172
|
+
Object.defineProperty(exports, "zrangebyscoreCommand", { enumerable: true, get: function () { return zsets_2.zrangebyscoreCommand; } });
|
|
173
|
+
Object.defineProperty(exports, "zremrangebyscoreCommand", { enumerable: true, get: function () { return zsets_2.zremrangebyscoreCommand; } });
|
|
174
|
+
Object.defineProperty(exports, "zcountCommand", { enumerable: true, get: function () { return zsets_2.zcountCommand; } });
|
|
175
|
+
Object.defineProperty(exports, "zpopminCommand", { enumerable: true, get: function () { return zsets_2.zpopminCommand; } });
|
|
176
|
+
Object.defineProperty(exports, "zpopmaxCommand", { enumerable: true, get: function () { return zsets_2.zpopmaxCommand; } });
|
|
177
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";;;;;AA+BA,gEAOC;AAED,gEAQC;AA/CD,+DAA0D;AAC1D,+DAA0D;AAE1D,mEAAoE;AACpE,uCAA0C;AAC1C,6CAAiD;AACjD,qCAAyC;AACzC,iCAAqC;AACrC,mCAAuC;AACvC,iCAAqC;AACrC,uCAA2C;AAC3C,iCAAqC;AACrC,uCAA2C;AAC3C,iDAAoD;AACpD,mCAAuC;AAE1B,QAAA,uBAAuB,GAAiC;IACnE,GAAG,+BAAkB;IACrB,wBAAc;IACd,GAAG,kCAAmB;IACtB,GAAG,yBAAe;IAClB,GAAG,mBAAY;IACf,GAAG,mBAAY;IACf,GAAG,uBAAc;IACjB,GAAG,qBAAa;IAChB,GAAG,mBAAY;IACf,GAAG,qBAAa;IAChB,GAAG,yBAAe;CACnB,CAAA;AAED,SAAgB,0BAA0B,CACxC,gBAA8C,EAAE;IAEhD,MAAM,QAAQ,GAAG,IAAI,kCAAe,EAAE,CAAA;IACtC,QAAQ,CAAC,WAAW,CAAC,+BAAuB,CAAC,CAAA;IAC7C,QAAQ,CAAC,WAAW,CAAC,aAAa,CAAC,CAAA;IACnC,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,SAAgB,0BAA0B,CAAC,OAG1C;IACC,OAAO,IAAI,kCAAe,CAAC;QACzB,QAAQ,EAAE,0BAA0B,CAAC,OAAO,EAAE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