@node-redis/client
Advanced tools
Comparing version 1.0.4 to 1.0.5
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
@@ -280,5 +280,6 @@ "use strict"; | ||
}, _RedisCommandsQueue_setReturnBuffers = function _RedisCommandsQueue_setReturnBuffers() { | ||
var _b, _c; | ||
var _b, _c, _d; | ||
__classPrivateFieldGet(this, _RedisCommandsQueue_parser, "f").setReturnBuffers(!!((_b = __classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f").head) === null || _b === void 0 ? void 0 : _b.value.returnBuffers) || | ||
!!((_c = __classPrivateFieldGet(this, _RedisCommandsQueue_pubSubState, "f")) === null || _c === void 0 ? void 0 : _c.subscribed)); | ||
!!((_c = __classPrivateFieldGet(this, _RedisCommandsQueue_pubSubState, "f")) === null || _c === void 0 ? void 0 : _c.subscribed) || | ||
!!((_d = __classPrivateFieldGet(this, _RedisCommandsQueue_pubSubState, "f")) === null || _d === void 0 ? void 0 : _d.subscribing)); | ||
}, _RedisCommandsQueue_shiftWaitingForReply = function _RedisCommandsQueue_shiftWaitingForReply() { | ||
@@ -285,0 +286,0 @@ if (!__classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f").length) { |
@@ -25,7 +25,23 @@ import * as ACL_CAT from '../commands/ACL_CAT'; | ||
import * as CLUSTER_ADDSLOTS from '../commands/CLUSTER_ADDSLOTS'; | ||
import * as CLUSTER_ADDSLOTSRANGE from '../commands/CLUSTER_ADDSLOTSRANGE'; | ||
import * as CLUSTER_BUMPEPOCH from '../commands/CLUSTER_BUMPEPOCH'; | ||
import * as CLUSTER_COUNT_FAILURE_REPORTS from '../commands/CLUSTER_COUNT-FAILURE-REPORTS'; | ||
import * as CLUSTER_COUNTKEYSINSLOT from '../commands/CLUSTER_COUNTKEYSINSLOT'; | ||
import * as CLUSTER_DELSLOTS from '../commands/CLUSTER_DELSLOTS'; | ||
import * as CLUSTER_DELSLOTSRANGE from '../commands/CLUSTER_DELSLOTSRANGE'; | ||
import * as CLUSTER_FAILOVER from '../commands/CLUSTER_FAILOVER'; | ||
import * as CLUSTER_FLUSHSLOTS from '../commands/CLUSTER_FLUSHSLOTS'; | ||
import * as CLUSTER_FORGET from '../commands/CLUSTER_FORGET'; | ||
import * as CLUSTER_GETKEYSINSLOT from '../commands/CLUSTER_GETKEYSINSLOT'; | ||
import * as CLUSTER_INFO from '../commands/CLUSTER_INFO'; | ||
import * as CLUSTER_KEYSLOT from '../commands/CLUSTER_KEYSLOT'; | ||
import * as CLUSTER_LINKS from '../commands/CLUSTER_LINKS'; | ||
import * as CLUSTER_MEET from '../commands/CLUSTER_MEET'; | ||
import * as CLUSTER_MYID from '../commands/CLUSTER_MYID'; | ||
import * as CLUSTER_NODES from '../commands/CLUSTER_NODES'; | ||
import * as CLUSTER_MEET from '../commands/CLUSTER_MEET'; | ||
import * as CLUSTER_REPLICAS from '../commands/CLUSTER_REPLICAS'; | ||
import * as CLUSTER_REPLICATE from '../commands/CLUSTER_REPLICATE'; | ||
import * as CLUSTER_RESET from '../commands/CLUSTER_RESET'; | ||
import * as CLUSTER_SAVECONFIG from '../commands/CLUSTER_SAVECONFIG'; | ||
import * as CLUSTER_SET_CONFIG_EPOCH from '../commands/CLUSTER_SET-CONFIG-EPOCH'; | ||
import * as CLUSTER_SETSLOT from '../commands/CLUSTER_SETSLOT'; | ||
@@ -35,3 +51,5 @@ import * as CLUSTER_SLOTS from '../commands/CLUSTER_SLOTS'; | ||
import * as COMMAND_GETKEYS from '../commands/COMMAND_GETKEYS'; | ||
import * as COMMAND_GETKEYSANDFLAGS from '../commands/COMMAND_GETKEYSANDFLAGS'; | ||
import * as COMMAND_INFO from '../commands/COMMAND_INFO'; | ||
import * as COMMAND_LIST from '../commands/COMMAND_LIST'; | ||
import * as COMMAND from '../commands/COMMAND'; | ||
@@ -84,2 +102,3 @@ import * as CONFIG_GET from '../commands/CONFIG_GET'; | ||
import * as WAIT from '../commands/WAIT'; | ||
import * as LATENCY_DOCTOR from '../commands/LATENCY_DOCTOR'; | ||
declare const _default: { | ||
@@ -134,12 +153,44 @@ ACL_CAT: typeof ACL_CAT; | ||
clusterAddSlots: typeof CLUSTER_ADDSLOTS; | ||
CLUSTER_ADDSLOTSRANGE: typeof CLUSTER_ADDSLOTSRANGE; | ||
clusterAddSlotsRange: typeof CLUSTER_ADDSLOTSRANGE; | ||
CLUSTER_BUMPEPOCH: typeof CLUSTER_BUMPEPOCH; | ||
clusterBumpEpoch: typeof CLUSTER_BUMPEPOCH; | ||
CLUSTER_COUNT_FAILURE_REPORTS: typeof CLUSTER_COUNT_FAILURE_REPORTS; | ||
clusterCountFailureReports: typeof CLUSTER_COUNT_FAILURE_REPORTS; | ||
CLUSTER_COUNTKEYSINSLOT: typeof CLUSTER_COUNTKEYSINSLOT; | ||
clusterCountKeysInSlot: typeof CLUSTER_COUNTKEYSINSLOT; | ||
CLUSTER_DELSLOTS: typeof CLUSTER_DELSLOTS; | ||
clusterDelSlots: typeof CLUSTER_DELSLOTS; | ||
CLUSTER_DELSLOTSRANGE: typeof CLUSTER_DELSLOTSRANGE; | ||
clusterDelSlotsRange: typeof CLUSTER_DELSLOTSRANGE; | ||
CLUSTER_FAILOVER: typeof CLUSTER_FAILOVER; | ||
clusterFailover: typeof CLUSTER_FAILOVER; | ||
CLUSTER_FLUSHSLOTS: typeof CLUSTER_FLUSHSLOTS; | ||
clusterFlushSlots: typeof CLUSTER_FLUSHSLOTS; | ||
CLUSTER_FORGET: typeof CLUSTER_FORGET; | ||
clusterForget: typeof CLUSTER_FORGET; | ||
CLUSTER_GETKEYSINSLOT: typeof CLUSTER_GETKEYSINSLOT; | ||
clusterGetKeysInSlot: typeof CLUSTER_GETKEYSINSLOT; | ||
CLUSTER_INFO: typeof CLUSTER_INFO; | ||
clusterInfo: typeof CLUSTER_INFO; | ||
CLUSTER_KEYSLOT: typeof CLUSTER_KEYSLOT; | ||
clusterKeySlot: typeof CLUSTER_KEYSLOT; | ||
CLUSTER_LINKS: typeof CLUSTER_LINKS; | ||
clusterLinks: typeof CLUSTER_LINKS; | ||
CLUSTER_MEET: typeof CLUSTER_MEET; | ||
clusterMeet: typeof CLUSTER_MEET; | ||
CLUSTER_MYID: typeof CLUSTER_MYID; | ||
clusterMyId: typeof CLUSTER_MYID; | ||
CLUSTER_NODES: typeof CLUSTER_NODES; | ||
clusterNodes: typeof CLUSTER_NODES; | ||
CLUSTER_MEET: typeof CLUSTER_MEET; | ||
clusterMeet: typeof CLUSTER_MEET; | ||
CLUSTER_REPLICAS: typeof CLUSTER_REPLICAS; | ||
clusterReplicas: typeof CLUSTER_REPLICAS; | ||
CLUSTER_REPLICATE: typeof CLUSTER_REPLICATE; | ||
clusterReplicate: typeof CLUSTER_REPLICATE; | ||
CLUSTER_RESET: typeof CLUSTER_RESET; | ||
clusterReset: typeof CLUSTER_RESET; | ||
CLUSTER_SAVECONFIG: typeof CLUSTER_SAVECONFIG; | ||
clusterSaveConfig: typeof CLUSTER_SAVECONFIG; | ||
CLUSTER_SET_CONFIG_EPOCH: typeof CLUSTER_SET_CONFIG_EPOCH; | ||
clusterSetConfigEpoch: typeof CLUSTER_SET_CONFIG_EPOCH; | ||
CLUSTER_SETSLOT: typeof CLUSTER_SETSLOT; | ||
@@ -153,4 +204,8 @@ clusterSetSlot: typeof CLUSTER_SETSLOT; | ||
commandGetKeys: typeof COMMAND_GETKEYS; | ||
COMMAND_GETKEYSANDFLAGS: typeof COMMAND_GETKEYSANDFLAGS; | ||
commandGetKeysAndFlags: typeof COMMAND_GETKEYSANDFLAGS; | ||
COMMAND_INFO: typeof COMMAND_INFO; | ||
commandInfo: typeof COMMAND_INFO; | ||
COMMAND_LIST: typeof COMMAND_LIST; | ||
commandList: typeof COMMAND_LIST; | ||
COMMAND: typeof COMMAND; | ||
@@ -186,2 +241,4 @@ command: typeof COMMAND; | ||
lastSave: typeof LASTSAVE; | ||
LATENCY_DOCTOR: typeof LATENCY_DOCTOR; | ||
latencyDoctor: typeof LATENCY_DOCTOR; | ||
LOLWUT: typeof LOLWUT; | ||
@@ -255,2 +312,4 @@ lolwut: typeof LOLWUT; | ||
bitCount: typeof import("../commands/BITCOUNT"); | ||
BITFIELD_RO: typeof import("../commands/BITFIELD_RO"); | ||
bitFieldRo: typeof import("../commands/BITFIELD_RO"); | ||
BITFIELD: typeof import("../commands/BITFIELD"); | ||
@@ -294,2 +353,4 @@ bitField: typeof import("../commands/BITFIELD"); | ||
expireAt: typeof import("../commands/EXPIREAT"); | ||
EXPIRETIME: typeof import("../commands/EXPIRETIME"); | ||
expireTime: typeof import("../commands/EXPIRETIME"); | ||
GEOADD: typeof import("../commands/GEOADD"); | ||
@@ -397,2 +458,10 @@ geoAdd: typeof import("../commands/GEOADD"); | ||
mSetNX: typeof import("../commands/MSETNX"); | ||
OBJECT_ENCODING: typeof import("../commands/OBJECT_ENCODING"); | ||
objectEncoding: typeof import("../commands/OBJECT_ENCODING"); | ||
OBJECT_FREQ: typeof import("../commands/OBJECT_FREQ"); | ||
objectFreq: typeof import("../commands/OBJECT_FREQ"); | ||
OBJECT_IDLETIME: typeof import("../commands/OBJECT_IDLETIME"); | ||
objectIdleTime: typeof import("../commands/OBJECT_IDLETIME"); | ||
OBJECT_REFCOUNT: typeof import("../commands/OBJECT_REFCOUNT"); | ||
objectRefCount: typeof import("../commands/OBJECT_REFCOUNT"); | ||
PERSIST: typeof import("../commands/PERSIST"); | ||
@@ -404,2 +473,4 @@ persist: typeof import("../commands/PERSIST"); | ||
pExpireAt: typeof import("../commands/PEXPIREAT"); | ||
PEXPIRETIME: typeof import("../commands/PEXPIRETIME"); | ||
pExpireTime: typeof import("../commands/PEXPIRETIME"); | ||
PFADD: typeof import("../commands/PFADD"); | ||
@@ -441,2 +512,4 @@ pfAdd: typeof import("../commands/PFADD"); | ||
sInter: typeof import("../commands/SINTER"); | ||
SINTERCARD: typeof import("../commands/SINTERCARD"); | ||
sInterCard: typeof import("../commands/SINTERCARD"); | ||
SINTERSTORE: typeof import("../commands/SINTERSTORE"); | ||
@@ -462,2 +535,6 @@ sInterStore: typeof import("../commands/SINTERSTORE"); | ||
sMove: typeof import("../commands/SMOVE"); | ||
SORT_RO: typeof import("../commands/SORT_RO"); | ||
sortRo: typeof import("../commands/SORT_RO"); | ||
SORT_STORE: typeof import("../commands/SORT_STORE"); | ||
sortStore: typeof import("../commands/SORT_STORE"); | ||
SORT: typeof import("../commands/SORT"); | ||
@@ -555,2 +632,4 @@ sort: typeof import("../commands/SORT"); | ||
zInter: typeof import("../commands/ZINTER"); | ||
ZINTERCARD: typeof import("../commands/ZINTERCARD"); | ||
zInterCard: typeof import("../commands/ZINTERCARD"); | ||
ZINTERSTORE: typeof import("../commands/ZINTERSTORE"); | ||
@@ -557,0 +636,0 @@ zInterStore: typeof import("../commands/ZINTERSTORE"); |
@@ -28,7 +28,23 @@ "use strict"; | ||
const CLUSTER_ADDSLOTS = require("../commands/CLUSTER_ADDSLOTS"); | ||
const CLUSTER_ADDSLOTSRANGE = require("../commands/CLUSTER_ADDSLOTSRANGE"); | ||
const CLUSTER_BUMPEPOCH = require("../commands/CLUSTER_BUMPEPOCH"); | ||
const CLUSTER_COUNT_FAILURE_REPORTS = require("../commands/CLUSTER_COUNT-FAILURE-REPORTS"); | ||
const CLUSTER_COUNTKEYSINSLOT = require("../commands/CLUSTER_COUNTKEYSINSLOT"); | ||
const CLUSTER_DELSLOTS = require("../commands/CLUSTER_DELSLOTS"); | ||
const CLUSTER_DELSLOTSRANGE = require("../commands/CLUSTER_DELSLOTSRANGE"); | ||
const CLUSTER_FAILOVER = require("../commands/CLUSTER_FAILOVER"); | ||
const CLUSTER_FLUSHSLOTS = require("../commands/CLUSTER_FLUSHSLOTS"); | ||
const CLUSTER_FORGET = require("../commands/CLUSTER_FORGET"); | ||
const CLUSTER_GETKEYSINSLOT = require("../commands/CLUSTER_GETKEYSINSLOT"); | ||
const CLUSTER_INFO = require("../commands/CLUSTER_INFO"); | ||
const CLUSTER_KEYSLOT = require("../commands/CLUSTER_KEYSLOT"); | ||
const CLUSTER_LINKS = require("../commands/CLUSTER_LINKS"); | ||
const CLUSTER_MEET = require("../commands/CLUSTER_MEET"); | ||
const CLUSTER_MYID = require("../commands/CLUSTER_MYID"); | ||
const CLUSTER_NODES = require("../commands/CLUSTER_NODES"); | ||
const CLUSTER_MEET = require("../commands/CLUSTER_MEET"); | ||
const CLUSTER_REPLICAS = require("../commands/CLUSTER_REPLICAS"); | ||
const CLUSTER_REPLICATE = require("../commands/CLUSTER_REPLICATE"); | ||
const CLUSTER_RESET = require("../commands/CLUSTER_RESET"); | ||
const CLUSTER_SAVECONFIG = require("../commands/CLUSTER_SAVECONFIG"); | ||
const CLUSTER_SET_CONFIG_EPOCH = require("../commands/CLUSTER_SET-CONFIG-EPOCH"); | ||
const CLUSTER_SETSLOT = require("../commands/CLUSTER_SETSLOT"); | ||
@@ -38,3 +54,5 @@ const CLUSTER_SLOTS = require("../commands/CLUSTER_SLOTS"); | ||
const COMMAND_GETKEYS = require("../commands/COMMAND_GETKEYS"); | ||
const COMMAND_GETKEYSANDFLAGS = require("../commands/COMMAND_GETKEYSANDFLAGS"); | ||
const COMMAND_INFO = require("../commands/COMMAND_INFO"); | ||
const COMMAND_LIST = require("../commands/COMMAND_LIST"); | ||
const COMMAND = require("../commands/COMMAND"); | ||
@@ -87,2 +105,3 @@ const CONFIG_GET = require("../commands/CONFIG_GET"); | ||
const WAIT = require("../commands/WAIT"); | ||
const LATENCY_DOCTOR = require("../commands/LATENCY_DOCTOR"); | ||
exports.default = { | ||
@@ -138,12 +157,44 @@ ...commands_1.default, | ||
clusterAddSlots: CLUSTER_ADDSLOTS, | ||
CLUSTER_ADDSLOTSRANGE, | ||
clusterAddSlotsRange: CLUSTER_ADDSLOTSRANGE, | ||
CLUSTER_BUMPEPOCH, | ||
clusterBumpEpoch: CLUSTER_BUMPEPOCH, | ||
CLUSTER_COUNT_FAILURE_REPORTS, | ||
clusterCountFailureReports: CLUSTER_COUNT_FAILURE_REPORTS, | ||
CLUSTER_COUNTKEYSINSLOT, | ||
clusterCountKeysInSlot: CLUSTER_COUNTKEYSINSLOT, | ||
CLUSTER_DELSLOTS, | ||
clusterDelSlots: CLUSTER_DELSLOTS, | ||
CLUSTER_DELSLOTSRANGE, | ||
clusterDelSlotsRange: CLUSTER_DELSLOTSRANGE, | ||
CLUSTER_FAILOVER, | ||
clusterFailover: CLUSTER_FAILOVER, | ||
CLUSTER_FLUSHSLOTS, | ||
clusterFlushSlots: CLUSTER_FLUSHSLOTS, | ||
CLUSTER_FORGET, | ||
clusterForget: CLUSTER_FORGET, | ||
CLUSTER_GETKEYSINSLOT, | ||
clusterGetKeysInSlot: CLUSTER_GETKEYSINSLOT, | ||
CLUSTER_INFO, | ||
clusterInfo: CLUSTER_INFO, | ||
CLUSTER_KEYSLOT, | ||
clusterKeySlot: CLUSTER_KEYSLOT, | ||
CLUSTER_LINKS, | ||
clusterLinks: CLUSTER_LINKS, | ||
CLUSTER_MEET, | ||
clusterMeet: CLUSTER_MEET, | ||
CLUSTER_MYID, | ||
clusterMyId: CLUSTER_MYID, | ||
CLUSTER_NODES, | ||
clusterNodes: CLUSTER_NODES, | ||
CLUSTER_MEET, | ||
clusterMeet: CLUSTER_MEET, | ||
CLUSTER_REPLICAS, | ||
clusterReplicas: CLUSTER_REPLICAS, | ||
CLUSTER_REPLICATE, | ||
clusterReplicate: CLUSTER_REPLICATE, | ||
CLUSTER_RESET, | ||
clusterReset: CLUSTER_RESET, | ||
CLUSTER_SAVECONFIG, | ||
clusterSaveConfig: CLUSTER_SAVECONFIG, | ||
CLUSTER_SET_CONFIG_EPOCH, | ||
clusterSetConfigEpoch: CLUSTER_SET_CONFIG_EPOCH, | ||
CLUSTER_SETSLOT, | ||
@@ -157,4 +208,8 @@ clusterSetSlot: CLUSTER_SETSLOT, | ||
commandGetKeys: COMMAND_GETKEYS, | ||
COMMAND_GETKEYSANDFLAGS, | ||
commandGetKeysAndFlags: COMMAND_GETKEYSANDFLAGS, | ||
COMMAND_INFO, | ||
commandInfo: COMMAND_INFO, | ||
COMMAND_LIST, | ||
commandList: COMMAND_LIST, | ||
COMMAND, | ||
@@ -190,2 +245,4 @@ command: COMMAND, | ||
lastSave: LASTSAVE, | ||
LATENCY_DOCTOR, | ||
latencyDoctor: LATENCY_DOCTOR, | ||
LOLWUT, | ||
@@ -192,0 +249,0 @@ lolwut: LOLWUT, |
@@ -84,3 +84,3 @@ "use strict"; | ||
isolationPoolOptions: undefined | ||
}); | ||
}).on('error', err => this.emit('error', err)); | ||
await duplicate.connect(); | ||
@@ -87,0 +87,0 @@ return duplicate; |
import * as APPEND from '../commands/APPEND'; | ||
import * as BITCOUNT from '../commands/BITCOUNT'; | ||
import * as BITFIELD_RO from '../commands/BITFIELD_RO'; | ||
import * as BITFIELD from '../commands/BITFIELD'; | ||
@@ -22,2 +23,3 @@ import * as BITOP from '../commands/BITOP'; | ||
import * as EXPIREAT from '../commands/EXPIREAT'; | ||
import * as EXPIRETIME from '../commands/EXPIRETIME'; | ||
import * as GEOADD from '../commands/GEOADD'; | ||
@@ -74,5 +76,10 @@ import * as GEODIST from '../commands/GEODIST'; | ||
import * as MSETNX from '../commands/MSETNX'; | ||
import * as OBJECT_ENCODING from '../commands/OBJECT_ENCODING'; | ||
import * as OBJECT_FREQ from '../commands/OBJECT_FREQ'; | ||
import * as OBJECT_IDLETIME from '../commands/OBJECT_IDLETIME'; | ||
import * as OBJECT_REFCOUNT from '../commands/OBJECT_REFCOUNT'; | ||
import * as PERSIST from '../commands/PERSIST'; | ||
import * as PEXPIRE from '../commands/PEXPIRE'; | ||
import * as PEXPIREAT from '../commands/PEXPIREAT'; | ||
import * as PEXPIRETIME from '../commands/PEXPIRETIME'; | ||
import * as PFADD from '../commands/PFADD'; | ||
@@ -101,2 +108,3 @@ import * as PFCOUNT from '../commands/PFCOUNT'; | ||
import * as SINTER from '../commands/SINTER'; | ||
import * as SINTERCARD from '../commands/SINTERCARD'; | ||
import * as SINTERSTORE from '../commands/SINTERSTORE'; | ||
@@ -107,2 +115,4 @@ import * as SISMEMBER from '../commands/SISMEMBER'; | ||
import * as SMOVE from '../commands/SMOVE'; | ||
import * as SORT_RO from '../commands/SORT_RO'; | ||
import * as SORT_STORE from '../commands/SORT_STORE'; | ||
import * as SORT from '../commands/SORT'; | ||
@@ -154,2 +164,3 @@ import * as SPOP from '../commands/SPOP'; | ||
import * as ZINTER from '../commands/ZINTER'; | ||
import * as ZINTERCARD from '../commands/ZINTERCARD'; | ||
import * as ZINTERSTORE from '../commands/ZINTERSTORE'; | ||
@@ -187,2 +198,4 @@ import * as ZLEXCOUNT from '../commands/ZLEXCOUNT'; | ||
bitCount: typeof BITCOUNT; | ||
BITFIELD_RO: typeof BITFIELD_RO; | ||
bitFieldRo: typeof BITFIELD_RO; | ||
BITFIELD: typeof BITFIELD; | ||
@@ -226,2 +239,4 @@ bitField: typeof BITFIELD; | ||
expireAt: typeof EXPIREAT; | ||
EXPIRETIME: typeof EXPIRETIME; | ||
expireTime: typeof EXPIRETIME; | ||
GEOADD: typeof GEOADD; | ||
@@ -329,2 +344,10 @@ geoAdd: typeof GEOADD; | ||
mSetNX: typeof MSETNX; | ||
OBJECT_ENCODING: typeof OBJECT_ENCODING; | ||
objectEncoding: typeof OBJECT_ENCODING; | ||
OBJECT_FREQ: typeof OBJECT_FREQ; | ||
objectFreq: typeof OBJECT_FREQ; | ||
OBJECT_IDLETIME: typeof OBJECT_IDLETIME; | ||
objectIdleTime: typeof OBJECT_IDLETIME; | ||
OBJECT_REFCOUNT: typeof OBJECT_REFCOUNT; | ||
objectRefCount: typeof OBJECT_REFCOUNT; | ||
PERSIST: typeof PERSIST; | ||
@@ -336,2 +359,4 @@ persist: typeof PERSIST; | ||
pExpireAt: typeof PEXPIREAT; | ||
PEXPIRETIME: typeof PEXPIRETIME; | ||
pExpireTime: typeof PEXPIRETIME; | ||
PFADD: typeof PFADD; | ||
@@ -373,2 +398,4 @@ pfAdd: typeof PFADD; | ||
sInter: typeof SINTER; | ||
SINTERCARD: typeof SINTERCARD; | ||
sInterCard: typeof SINTERCARD; | ||
SINTERSTORE: typeof SINTERSTORE; | ||
@@ -394,2 +421,6 @@ sInterStore: typeof SINTERSTORE; | ||
sMove: typeof SMOVE; | ||
SORT_RO: typeof SORT_RO; | ||
sortRo: typeof SORT_RO; | ||
SORT_STORE: typeof SORT_STORE; | ||
sortStore: typeof SORT_STORE; | ||
SORT: typeof SORT; | ||
@@ -487,2 +518,4 @@ sort: typeof SORT; | ||
zInter: typeof ZINTER; | ||
ZINTERCARD: typeof ZINTERCARD; | ||
zInterCard: typeof ZINTERCARD; | ||
ZINTERSTORE: typeof ZINTERSTORE; | ||
@@ -489,0 +522,0 @@ zInterStore: typeof ZINTERSTORE; |
@@ -5,2 +5,3 @@ "use strict"; | ||
const BITCOUNT = require("../commands/BITCOUNT"); | ||
const BITFIELD_RO = require("../commands/BITFIELD_RO"); | ||
const BITFIELD = require("../commands/BITFIELD"); | ||
@@ -25,2 +26,3 @@ const BITOP = require("../commands/BITOP"); | ||
const EXPIREAT = require("../commands/EXPIREAT"); | ||
const EXPIRETIME = require("../commands/EXPIRETIME"); | ||
const GEOADD = require("../commands/GEOADD"); | ||
@@ -77,5 +79,10 @@ const GEODIST = require("../commands/GEODIST"); | ||
const MSETNX = require("../commands/MSETNX"); | ||
const OBJECT_ENCODING = require("../commands/OBJECT_ENCODING"); | ||
const OBJECT_FREQ = require("../commands/OBJECT_FREQ"); | ||
const OBJECT_IDLETIME = require("../commands/OBJECT_IDLETIME"); | ||
const OBJECT_REFCOUNT = require("../commands/OBJECT_REFCOUNT"); | ||
const PERSIST = require("../commands/PERSIST"); | ||
const PEXPIRE = require("../commands/PEXPIRE"); | ||
const PEXPIREAT = require("../commands/PEXPIREAT"); | ||
const PEXPIRETIME = require("../commands/PEXPIRETIME"); | ||
const PFADD = require("../commands/PFADD"); | ||
@@ -104,2 +111,3 @@ const PFCOUNT = require("../commands/PFCOUNT"); | ||
const SINTER = require("../commands/SINTER"); | ||
const SINTERCARD = require("../commands/SINTERCARD"); | ||
const SINTERSTORE = require("../commands/SINTERSTORE"); | ||
@@ -110,2 +118,4 @@ const SISMEMBER = require("../commands/SISMEMBER"); | ||
const SMOVE = require("../commands/SMOVE"); | ||
const SORT_RO = require("../commands/SORT_RO"); | ||
const SORT_STORE = require("../commands/SORT_STORE"); | ||
const SORT = require("../commands/SORT"); | ||
@@ -157,2 +167,3 @@ const SPOP = require("../commands/SPOP"); | ||
const ZINTER = require("../commands/ZINTER"); | ||
const ZINTERCARD = require("../commands/ZINTERCARD"); | ||
const ZINTERSTORE = require("../commands/ZINTERSTORE"); | ||
@@ -190,2 +201,4 @@ const ZLEXCOUNT = require("../commands/ZLEXCOUNT"); | ||
bitCount: BITCOUNT, | ||
BITFIELD_RO, | ||
bitFieldRo: BITFIELD_RO, | ||
BITFIELD, | ||
@@ -229,2 +242,4 @@ bitField: BITFIELD, | ||
expireAt: EXPIREAT, | ||
EXPIRETIME, | ||
expireTime: EXPIRETIME, | ||
GEOADD, | ||
@@ -332,2 +347,10 @@ geoAdd: GEOADD, | ||
mSetNX: MSETNX, | ||
OBJECT_ENCODING, | ||
objectEncoding: OBJECT_ENCODING, | ||
OBJECT_FREQ, | ||
objectFreq: OBJECT_FREQ, | ||
OBJECT_IDLETIME, | ||
objectIdleTime: OBJECT_IDLETIME, | ||
OBJECT_REFCOUNT, | ||
objectRefCount: OBJECT_REFCOUNT, | ||
PERSIST, | ||
@@ -339,2 +362,4 @@ persist: PERSIST, | ||
pExpireAt: PEXPIREAT, | ||
PEXPIRETIME, | ||
pExpireTime: PEXPIRETIME, | ||
PFADD, | ||
@@ -376,2 +401,4 @@ pfAdd: PFADD, | ||
sInter: SINTER, | ||
SINTERCARD, | ||
sInterCard: SINTERCARD, | ||
SINTERSTORE, | ||
@@ -397,2 +424,6 @@ sInterStore: SINTERSTORE, | ||
sMove: SMOVE, | ||
SORT_RO, | ||
sortRo: SORT_RO, | ||
SORT_STORE, | ||
sortStore: SORT_STORE, | ||
SORT, | ||
@@ -490,2 +521,4 @@ sort: SORT, | ||
zInter: ZINTER, | ||
ZINTERCARD, | ||
zInterCard: ZINTERCARD, | ||
ZINTERSTORE, | ||
@@ -492,0 +525,0 @@ zInterStore: ZINTERSTORE, |
@@ -7,2 +7,3 @@ import { RedisCommandArgument, RedisCommandArguments } from '.'; | ||
end: number; | ||
mode?: 'BYTE' | 'BIT'; | ||
} | ||
@@ -9,0 +10,0 @@ export declare function transformArguments(key: RedisCommandArgument, range?: BitCountRange): RedisCommandArguments; |
@@ -10,2 +10,5 @@ "use strict"; | ||
args.push(range.start.toString(), range.end.toString()); | ||
if (range === null || range === void 0 ? void 0 : range.mode) { | ||
args.push(range.mode); | ||
} | ||
} | ||
@@ -12,0 +15,0 @@ return args; |
export declare const FIRST_KEY_INDEX = 1; | ||
export declare const IS_READ_ONLY = true; | ||
declare type BitFieldType = string; | ||
interface BitFieldOperation<S extends string> { | ||
export declare type BitFieldEncoding = `${'i' | 'u'}${number}`; | ||
export interface BitFieldOperation<S extends string> { | ||
operation: S; | ||
} | ||
interface BitFieldGetOperation extends BitFieldOperation<'GET'> { | ||
type: BitFieldType; | ||
export interface BitFieldGetOperation extends BitFieldOperation<'GET'> { | ||
encoding: BitFieldEncoding; | ||
offset: number | string; | ||
} | ||
interface BitFieldSetOperation extends BitFieldOperation<'SET'> { | ||
type: BitFieldType; | ||
encoding: BitFieldEncoding; | ||
offset: number | string; | ||
@@ -17,3 +16,3 @@ value: number; | ||
interface BitFieldIncrByOperation extends BitFieldOperation<'INCRBY'> { | ||
type: BitFieldType; | ||
encoding: BitFieldEncoding; | ||
offset: number | string; | ||
@@ -20,0 +19,0 @@ increment: number; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; | ||
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; | ||
exports.FIRST_KEY_INDEX = 1; | ||
exports.IS_READ_ONLY = true; | ||
function transformArguments(key, operations) { | ||
@@ -11,9 +10,9 @@ const args = ['BITFIELD', key]; | ||
case 'GET': | ||
args.push('GET', options.type, options.offset.toString()); | ||
args.push('GET', options.encoding, options.offset.toString()); | ||
break; | ||
case 'SET': | ||
args.push('SET', options.type, options.offset.toString(), options.value.toString()); | ||
args.push('SET', options.encoding, options.offset.toString(), options.value.toString()); | ||
break; | ||
case 'INCRBY': | ||
args.push('INCRBY', options.type, options.offset.toString(), options.increment.toString()); | ||
args.push('INCRBY', options.encoding, options.offset.toString(), options.increment.toString()); | ||
break; | ||
@@ -20,0 +19,0 @@ case 'OVERFLOW': |
@@ -5,3 +5,3 @@ import { RedisCommandArgument, RedisCommandArguments } from '.'; | ||
export declare const IS_READ_ONLY = true; | ||
export declare function transformArguments(key: RedisCommandArgument, bit: BitValue, start?: number, end?: number): RedisCommandArguments; | ||
export declare function transformArguments(key: RedisCommandArgument, bit: BitValue, start?: number, end?: number, mode?: 'BYTE' | 'BIT'): RedisCommandArguments; | ||
export declare function transformReply(): number; |
@@ -6,3 +6,3 @@ "use strict"; | ||
exports.IS_READ_ONLY = true; | ||
function transformArguments(key, bit, start, end) { | ||
function transformArguments(key, bit, start, end, mode) { | ||
const args = ['BITPOS', key, bit.toString()]; | ||
@@ -15,4 +15,7 @@ if (typeof start === 'number') { | ||
} | ||
if (mode) { | ||
args.push(mode); | ||
} | ||
return args; | ||
} | ||
exports.transformArguments = transformArguments; |
@@ -1,2 +0,3 @@ | ||
export declare function transformArguments(slots: number | Array<number>): Array<string>; | ||
import { RedisCommandArguments } from '.'; | ||
export declare function transformArguments(slots: number | Array<number>): RedisCommandArguments; | ||
export declare function transformReply(): string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transformArguments = void 0; | ||
const generic_transformers_1 = require("./generic-transformers"); | ||
function transformArguments(slots) { | ||
const args = ['CLUSTER', 'ADDSLOTS']; | ||
if (typeof slots === 'number') { | ||
args.push(slots.toString()); | ||
} | ||
else { | ||
args.push(...slots.map(String)); | ||
} | ||
return args; | ||
return (0, generic_transformers_1.pushVerdictNumberArguments)(['CLUSTER', 'ADDSLOTS'], slots); | ||
} | ||
exports.transformArguments = transformArguments; |
export declare function transformArguments(): Array<string>; | ||
export declare function transformReply(): string; | ||
export declare function transformReply(): 'OK'; |
export declare function transformArguments(slot: number, count: number): Array<string>; | ||
export declare function transformReply(): string; | ||
export declare function transformReply(): Array<string>; |
export declare function transformArguments(ip: string, port: number): Array<string>; | ||
export declare function transformReply(): string; | ||
export declare function transformReply(): 'OK'; |
@@ -1,3 +0,2 @@ | ||
export declare type ClusterResetModes = 'HARD' | 'SOFT'; | ||
export declare function transformArguments(mode?: ClusterResetModes): Array<string>; | ||
export declare function transformArguments(mode?: 'HARD' | 'SOFT'): Array<string>; | ||
export declare function transformReply(): string; |
@@ -8,2 +8,2 @@ export declare enum ClusterSlotStates { | ||
export declare function transformArguments(slot: number, state: ClusterSlotStates, nodeId?: string): Array<string>; | ||
export declare function transformReply(): string; | ||
export declare function transformReply(): 'OK'; |
import { RedisCommandArguments } from '.'; | ||
export declare function transformArguments(): RedisCommandArguments; | ||
declare type ClusterSlotsRawNode = [ip: string, port: number, id: string]; | ||
declare type ClusterSlotsRawReply = Array<[from: number, to: number, master: ClusterSlotsRawNode, ...replicas: Array<ClusterSlotsRawNode>]>; | ||
declare type ClusterSlotsRawReply = Array<[ | ||
from: number, | ||
to: number, | ||
master: ClusterSlotsRawNode, | ||
...replicas: Array<ClusterSlotsRawNode> | ||
]>; | ||
declare type ClusterSlotsNode = { | ||
@@ -6,0 +11,0 @@ ip: string; |
@@ -1,2 +0,6 @@ | ||
export declare function transformArguments(parameter: string, value: string): Array<string>; | ||
import { RedisCommandArgument, RedisCommandArguments } from '.'; | ||
declare type SingleParameter = [parameter: RedisCommandArgument, value: RedisCommandArgument]; | ||
declare type MultipleParameters = [config: Record<string, RedisCommandArgument>]; | ||
export declare function transformArguments(...[parameterOrConfig, value]: SingleParameter | MultipleParameters): RedisCommandArguments; | ||
export declare function transformReply(): string; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transformArguments = void 0; | ||
function transformArguments(parameter, value) { | ||
return ['CONFIG', 'SET', parameter, value]; | ||
function transformArguments(...[parameterOrConfig, value]) { | ||
const args = ['CONFIG', 'SET']; | ||
if (typeof parameterOrConfig === 'string') { | ||
args.push(parameterOrConfig, value); | ||
} | ||
else { | ||
for (const [key, value] of Object.entries(parameterOrConfig)) { | ||
args.push(key, value); | ||
} | ||
} | ||
return args; | ||
} | ||
exports.transformArguments = transformArguments; |
import { RedisCommandArgument, RedisCommandArguments } from '.'; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
export declare function transformArguments(keys: RedisCommandArgument | Array<RedisCommandArgument>): RedisCommandArguments; | ||
export declare function transformReply(): number; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transformArguments = void 0; | ||
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; | ||
const generic_transformers_1 = require("./generic-transformers"); | ||
exports.FIRST_KEY_INDEX = 1; | ||
function transformArguments(keys) { | ||
@@ -6,0 +7,0 @@ return (0, generic_transformers_1.pushVerdictArguments)(['DEL'], keys); |
import { RedisCommandArgument, RedisCommandArguments } from '.'; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
export declare function transformArguments(key: RedisCommandArgument): RedisCommandArguments; | ||
export declare function transformReply(): RedisCommandArgument; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transformArguments = void 0; | ||
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; | ||
exports.FIRST_KEY_INDEX = 1; | ||
function transformArguments(key) { | ||
@@ -5,0 +6,0 @@ return ['DUMP', key]; |
import { RedisCommandArgument, RedisCommandArguments } from '.'; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
export declare function transformArguments(key: RedisCommandArgument, seconds: number): RedisCommandArguments; | ||
export declare function transformArguments(key: RedisCommandArgument, seconds: number, mode?: 'NX' | 'XX' | 'GT' | 'LT'): RedisCommandArguments; | ||
export { transformBooleanReply as transformReply } from './generic-transformers'; |
@@ -5,4 +5,8 @@ "use strict"; | ||
exports.FIRST_KEY_INDEX = 1; | ||
function transformArguments(key, seconds) { | ||
return ['EXPIRE', key, seconds.toString()]; | ||
function transformArguments(key, seconds, mode) { | ||
const args = ['EXPIRE', key, seconds.toString()]; | ||
if (mode) { | ||
args.push(mode); | ||
} | ||
return args; | ||
} | ||
@@ -9,0 +13,0 @@ exports.transformArguments = transformArguments; |
import { RedisCommandArgument, RedisCommandArguments } from '.'; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
export declare function transformArguments(key: RedisCommandArgument, timestamp: number | Date): RedisCommandArguments; | ||
export declare function transformArguments(key: RedisCommandArgument, timestamp: number | Date, mode?: 'NX' | 'XX' | 'GT' | 'LT'): RedisCommandArguments; | ||
export { transformBooleanReply as transformReply } from './generic-transformers'; |
@@ -6,4 +6,4 @@ "use strict"; | ||
exports.FIRST_KEY_INDEX = 1; | ||
function transformArguments(key, timestamp) { | ||
return [ | ||
function transformArguments(key, timestamp, mode) { | ||
const args = [ | ||
'EXPIREAT', | ||
@@ -13,2 +13,6 @@ key, | ||
]; | ||
if (mode) { | ||
args.push(mode); | ||
} | ||
return args; | ||
} | ||
@@ -15,0 +19,0 @@ exports.transformArguments = transformArguments; |
@@ -83,2 +83,3 @@ import { RedisCommandArgument, RedisCommandArguments } from '.'; | ||
export declare function pushVerdictArguments(args: RedisCommandArguments, value: RedisCommandArgument | Array<RedisCommandArgument>): RedisCommandArguments; | ||
export declare function pushVerdictNumberArguments(args: RedisCommandArguments, value: number | Array<number>): RedisCommandArguments; | ||
export declare function pushVerdictArgument(args: RedisCommandArguments, value: RedisCommandArgument | Array<RedisCommandArgument>): RedisCommandArguments; | ||
@@ -144,2 +145,18 @@ export declare function pushOptionalVerdictArgument(args: RedisCommandArguments, name: RedisCommandArgument, value: undefined | RedisCommandArgument | Array<RedisCommandArgument>): RedisCommandArguments; | ||
export declare function transformCommandReply(this: void, [name, arity, flags, firstKeyIndex, lastKeyIndex, step, categories]: CommandRawReply): CommandReply; | ||
export interface SortOptions { | ||
BY?: string; | ||
LIMIT?: { | ||
offset: number; | ||
count: number; | ||
}; | ||
GET?: string | Array<string>; | ||
DIRECTION?: 'ASC' | 'DESC'; | ||
ALPHA?: true; | ||
} | ||
export declare function pushSortArguments(args: RedisCommandArguments, options?: SortOptions): RedisCommandArguments; | ||
export interface SlotRange { | ||
start: number; | ||
end: number; | ||
} | ||
export declare function pushSlotRangesArguments(args: RedisCommandArguments, ranges: SlotRange | Array<SlotRange>): RedisCommandArguments; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transformCommandReply = exports.CommandCategories = exports.CommandFlags = exports.pushOptionalVerdictArgument = exports.pushVerdictArgument = exports.pushVerdictArguments = exports.pushEvalArguments = exports.transformPXAT = exports.transformEXAT = exports.transformGeoMembersWithReply = exports.GeoReplyWith = exports.pushGeoSearchArguments = exports.pushGeoCountArgument = exports.transformSortedSetWithScoresReply = exports.transformSortedSetMemberNullReply = exports.transformStreamsMessagesReply = exports.transformStreamMessagesReply = exports.transformTuplesReply = exports.transformStringNumberInfinityArgument = exports.transformNumberInfinityArgument = exports.transformNumberInfinityNullArrayReply = exports.transformNumberInfinityNullReply = exports.transformNumberInfinityReply = exports.pushScanArguments = exports.transformBooleanArrayReply = exports.transformBooleanReply = void 0; | ||
exports.pushSlotRangesArguments = exports.pushSortArguments = exports.transformCommandReply = exports.CommandCategories = exports.CommandFlags = exports.pushOptionalVerdictArgument = exports.pushVerdictArgument = exports.pushVerdictNumberArguments = exports.pushVerdictArguments = exports.pushEvalArguments = exports.transformPXAT = exports.transformEXAT = exports.transformGeoMembersWithReply = exports.GeoReplyWith = exports.pushGeoSearchArguments = exports.pushGeoCountArgument = exports.transformSortedSetWithScoresReply = exports.transformSortedSetMemberNullReply = exports.transformStreamsMessagesReply = exports.transformStreamMessagesReply = exports.transformTuplesReply = exports.transformStringNumberInfinityArgument = exports.transformNumberInfinityArgument = exports.transformNumberInfinityNullArrayReply = exports.transformNumberInfinityNullReply = exports.transformNumberInfinityReply = exports.pushScanArguments = exports.transformBooleanArrayReply = exports.transformBooleanReply = void 0; | ||
function transformBooleanReply(reply) { | ||
@@ -206,2 +206,14 @@ return reply === 1; | ||
exports.pushVerdictArguments = pushVerdictArguments; | ||
function pushVerdictNumberArguments(args, value) { | ||
if (Array.isArray(value)) { | ||
for (const item of value) { | ||
args.push(item.toString()); | ||
} | ||
} | ||
else { | ||
args.push(value.toString()); | ||
} | ||
return args; | ||
} | ||
exports.pushVerdictNumberArguments = pushVerdictNumberArguments; | ||
function pushVerdictArgument(args, value) { | ||
@@ -277,1 +289,37 @@ if (Array.isArray(value)) { | ||
exports.transformCommandReply = transformCommandReply; | ||
function pushSortArguments(args, options) { | ||
if (options === null || options === void 0 ? void 0 : options.BY) { | ||
args.push('BY', options.BY); | ||
} | ||
if (options === null || options === void 0 ? void 0 : options.LIMIT) { | ||
args.push('LIMIT', options.LIMIT.offset.toString(), options.LIMIT.count.toString()); | ||
} | ||
if (options === null || options === void 0 ? void 0 : options.GET) { | ||
for (const pattern of (typeof options.GET === 'string' ? [options.GET] : options.GET)) { | ||
args.push('GET', pattern); | ||
} | ||
} | ||
if (options === null || options === void 0 ? void 0 : options.DIRECTION) { | ||
args.push(options.DIRECTION); | ||
} | ||
if (options === null || options === void 0 ? void 0 : options.ALPHA) { | ||
args.push('ALPHA'); | ||
} | ||
return args; | ||
} | ||
exports.pushSortArguments = pushSortArguments; | ||
function pushSlotRangeArguments(args, range) { | ||
args.push(range.start.toString(), range.end.toString()); | ||
} | ||
function pushSlotRangesArguments(args, ranges) { | ||
if (Array.isArray(ranges)) { | ||
for (const range of ranges) { | ||
pushSlotRangeArguments(args, range); | ||
} | ||
} | ||
else { | ||
pushSlotRangeArguments(args, ranges); | ||
} | ||
return args; | ||
} | ||
exports.pushSlotRangesArguments = pushSlotRangesArguments; |
import { RedisCommandArgument, RedisCommandArguments } from '.'; | ||
import { GeoCoordinates } from './generic-transformers'; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
interface GeoMember extends GeoCoordinates { | ||
@@ -17,5 +18,4 @@ member: RedisCommandArgument; | ||
declare type GeoAddOptions = SetGuards & GeoAddCommonOptions; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
export declare function transformArguments(key: RedisCommandArgument, toAdd: GeoMember | Array<GeoMember>, options?: GeoAddOptions): RedisCommandArguments; | ||
export declare function transformReply(): number; | ||
export {}; |
@@ -6,8 +6,7 @@ "use strict"; | ||
function transformArguments(key, toAdd, options) { | ||
var _a, _b; | ||
const args = ['GEOADD', key]; | ||
if ((_a = options) === null || _a === void 0 ? void 0 : _a.NX) { | ||
if (options === null || options === void 0 ? void 0 : options.NX) { | ||
args.push('NX'); | ||
} | ||
else if ((_b = options) === null || _b === void 0 ? void 0 : _b.XX) { | ||
else if (options === null || options === void 0 ? void 0 : options.XX) { | ||
args.push('XX'); | ||
@@ -14,0 +13,0 @@ } |
import { RedisCommandArgument, RedisCommandArguments } from '.'; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
declare type Types = RedisCommandArgument | number; | ||
@@ -6,3 +7,2 @@ declare type HSETObject = Record<string | number, Types>; | ||
declare type HSETTuples = Array<[Types, Types]> | Array<Types>; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
declare type GenericArguments = [key: RedisCommandArgument]; | ||
@@ -9,0 +9,0 @@ declare type SingleFieldArguments = [...generic: GenericArguments, field: Types, value: Types]; |
import { RedisCommandArgument, RedisCommandArguments } from '.'; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
export declare const IS_READ_ONLY = true; | ||
export declare function transformArguments(key: RedisCommandArgument, index: number): RedisCommandArguments; | ||
export declare function transformReply(): RedisCommandArgument | null; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transformArguments = exports.IS_READ_ONLY = void 0; | ||
exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; | ||
exports.FIRST_KEY_INDEX = 1; | ||
exports.IS_READ_ONLY = true; | ||
@@ -5,0 +6,0 @@ function transformArguments(key, index) { |
import { RedisCommandArgument, RedisCommandArguments } from '.'; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
export declare type LMoveSide = 'LEFT' | 'RIGHT'; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
export declare function transformArguments(source: RedisCommandArgument, destination: RedisCommandArgument, sourceSide: LMoveSide, destinationSide: LMoveSide): RedisCommandArguments; | ||
export declare function transformReply(): RedisCommandArgument | null; |
@@ -0,2 +1,3 @@ | ||
export declare const FIRST_KEY_INDEX = 1; | ||
export declare function transformArguments(key: string, db: number): Array<string>; | ||
export { transformBooleanReply as transformReply } from './generic-transformers'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transformReply = exports.transformArguments = void 0; | ||
exports.transformReply = exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; | ||
exports.FIRST_KEY_INDEX = 1; | ||
function transformArguments(key, db) { | ||
@@ -5,0 +6,0 @@ return ['MOVE', key, db.toString()]; |
import { RedisCommandArgument, RedisCommandArguments } from '.'; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
export declare function transformArguments(key: RedisCommandArgument, milliseconds: number): RedisCommandArguments; | ||
export declare function transformArguments(key: RedisCommandArgument, milliseconds: number, mode?: 'NX' | 'XX' | 'GT' | 'LT'): RedisCommandArguments; | ||
export { transformBooleanReply as transformReply } from './generic-transformers'; |
@@ -5,4 +5,8 @@ "use strict"; | ||
exports.FIRST_KEY_INDEX = 1; | ||
function transformArguments(key, milliseconds) { | ||
return ['PEXPIRE', key, milliseconds.toString()]; | ||
function transformArguments(key, milliseconds, mode) { | ||
const args = ['PEXPIRE', key, milliseconds.toString()]; | ||
if (mode) { | ||
args.push(mode); | ||
} | ||
return args; | ||
} | ||
@@ -9,0 +13,0 @@ exports.transformArguments = transformArguments; |
import { RedisCommandArgument, RedisCommandArguments } from '.'; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
export declare function transformArguments(key: RedisCommandArgument, millisecondsTimestamp: number | Date): RedisCommandArguments; | ||
export declare function transformArguments(key: RedisCommandArgument, millisecondsTimestamp: number | Date, mode?: 'NX' | 'XX' | 'GT' | 'LT'): RedisCommandArguments; | ||
export { transformBooleanReply as transformReply } from './generic-transformers'; |
@@ -6,4 +6,4 @@ "use strict"; | ||
exports.FIRST_KEY_INDEX = 1; | ||
function transformArguments(key, millisecondsTimestamp) { | ||
return [ | ||
function transformArguments(key, millisecondsTimestamp, mode) { | ||
const args = [ | ||
'PEXPIREAT', | ||
@@ -13,2 +13,6 @@ key, | ||
]; | ||
if (mode) { | ||
args.push(mode); | ||
} | ||
return args; | ||
} | ||
@@ -15,0 +19,0 @@ exports.transformArguments = transformArguments; |
@@ -0,16 +1,5 @@ | ||
import { RedisCommandArguments } from '.'; | ||
import { SortOptions } from './generic-transformers'; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
export declare const IS_READ_ONLY = true; | ||
interface SortOptions { | ||
BY?: string; | ||
LIMIT?: { | ||
offset: number; | ||
count: number; | ||
}; | ||
GET?: string | Array<string>; | ||
DIRECTION?: 'ASC' | 'DESC'; | ||
ALPHA?: true; | ||
STORE?: string; | ||
} | ||
export declare function transformArguments(key: string, options?: SortOptions): Array<string>; | ||
export declare function transformReply(reply: Array<string> | number): Array<string> | number; | ||
export {}; | ||
export declare function transformArguments(key: string, options?: SortOptions): RedisCommandArguments; | ||
export declare function transformReply(): Array<string>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transformReply = exports.transformArguments = exports.IS_READ_ONLY = exports.FIRST_KEY_INDEX = void 0; | ||
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; | ||
const generic_transformers_1 = require("./generic-transformers"); | ||
exports.FIRST_KEY_INDEX = 1; | ||
exports.IS_READ_ONLY = true; | ||
function transformArguments(key, options) { | ||
const args = ['SORT', key]; | ||
if (options === null || options === void 0 ? void 0 : options.BY) { | ||
args.push('BY', options.BY); | ||
} | ||
if (options === null || options === void 0 ? void 0 : options.LIMIT) { | ||
args.push('LIMIT', options.LIMIT.offset.toString(), options.LIMIT.count.toString()); | ||
} | ||
if (options === null || options === void 0 ? void 0 : options.GET) { | ||
for (const pattern of (typeof options.GET === 'string' ? [options.GET] : options.GET)) { | ||
args.push('GET', pattern); | ||
} | ||
} | ||
if (options === null || options === void 0 ? void 0 : options.DIRECTION) { | ||
args.push(options.DIRECTION); | ||
} | ||
if (options === null || options === void 0 ? void 0 : options.ALPHA) { | ||
args.push('ALPHA'); | ||
} | ||
if (options === null || options === void 0 ? void 0 : options.STORE) { | ||
args.push('STORE', options.STORE); | ||
} | ||
return args; | ||
return (0, generic_transformers_1.pushSortArguments)(['SORT', key], options); | ||
} | ||
exports.transformArguments = transformArguments; | ||
// integer when using `STORE` | ||
function transformReply(reply) { | ||
return reply; | ||
} | ||
exports.transformReply = transformReply; |
@@ -9,3 +9,3 @@ "use strict"; | ||
function transformReply(reply) { | ||
const seconds = Number(reply[0]), microseconds = Number(reply[1]), d = new Date(seconds + Math.round(microseconds / 1000)); | ||
const seconds = Number(reply[0]), microseconds = Number(reply[1]), d = new Date(seconds * 1000 + microseconds / 1000); | ||
d.microseconds = microseconds; | ||
@@ -12,0 +12,0 @@ return d; |
import { RedisCommandArguments } from '.'; | ||
export declare const FIRST_KEY_INDEX = 1; | ||
export declare function transformArguments(key: string | Array<string>): RedisCommandArguments; | ||
export declare function transformReply(): string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transformArguments = void 0; | ||
exports.transformArguments = exports.FIRST_KEY_INDEX = void 0; | ||
const generic_transformers_1 = require("./generic-transformers"); | ||
exports.FIRST_KEY_INDEX = 1; | ||
function transformArguments(key) { | ||
@@ -6,0 +7,0 @@ return (0, generic_transformers_1.pushVerdictArguments)(['WATCH'], key); |
@@ -7,22 +7,21 @@ "use strict"; | ||
function transformArguments(key, members, options) { | ||
var _a, _b, _c, _d, _e, _f; | ||
const args = ['ZADD', key]; | ||
if ((_a = options) === null || _a === void 0 ? void 0 : _a.NX) { | ||
if (options === null || options === void 0 ? void 0 : options.NX) { | ||
args.push('NX'); | ||
} | ||
else { | ||
if ((_b = options) === null || _b === void 0 ? void 0 : _b.XX) { | ||
if (options === null || options === void 0 ? void 0 : options.XX) { | ||
args.push('XX'); | ||
} | ||
if ((_c = options) === null || _c === void 0 ? void 0 : _c.GT) { | ||
if (options === null || options === void 0 ? void 0 : options.GT) { | ||
args.push('GT'); | ||
} | ||
else if ((_d = options) === null || _d === void 0 ? void 0 : _d.LT) { | ||
else if (options === null || options === void 0 ? void 0 : options.LT) { | ||
args.push('LT'); | ||
} | ||
} | ||
if ((_e = options) === null || _e === void 0 ? void 0 : _e.CH) { | ||
if (options === null || options === void 0 ? void 0 : options.CH) { | ||
args.push('CH'); | ||
} | ||
if ((_f = options) === null || _f === void 0 ? void 0 : _f.INCR) { | ||
if (options === null || options === void 0 ? void 0 : options.INCR) { | ||
args.push('INCR'); | ||
@@ -29,0 +28,0 @@ } |
{ | ||
"name": "@node-redis/client", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"license": "MIT", | ||
@@ -25,16 +25,16 @@ "main": "./dist/index.js", | ||
"@node-redis/test-utils": "*", | ||
"@types/node": "^17.0.13", | ||
"@types/node": "^17.0.23", | ||
"@types/redis-parser": "^3.0.0", | ||
"@types/sinon": "^10.0.9", | ||
"@types/sinon": "^10.0.11", | ||
"@types/yallist": "^4.0.1", | ||
"@typescript-eslint/eslint-plugin": "^5.10.1", | ||
"@typescript-eslint/parser": "^5.10.1", | ||
"eslint": "^8.8.0", | ||
"@typescript-eslint/eslint-plugin": "^5.16.0", | ||
"@typescript-eslint/parser": "^5.16.0", | ||
"eslint": "^8.12.0", | ||
"nyc": "^15.1.0", | ||
"release-it": "^14.12.4", | ||
"sinon": "^13.0.0", | ||
"release-it": "^14.13.1", | ||
"sinon": "^13.0.1", | ||
"source-map-support": "^0.5.21", | ||
"ts-node": "^10.4.0", | ||
"typedoc": "^0.22.11", | ||
"typescript": "^4.5.5" | ||
"ts-node": "^10.7.0", | ||
"typedoc": "^0.22.13", | ||
"typescript": "^4.6.3" | ||
}, | ||
@@ -41,0 +41,0 @@ "engines": { |
492637
650
11013