Socket
Socket
Sign inDemoInstall

@redis/client

Package Overview
Dependencies
3
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.13 to 1.5.14

8

dist/lib/client/commands-queue.js

@@ -159,3 +159,3 @@ "use strict";

__classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").reset();
__classPrivateFieldGet(RedisCommandsQueue, _a, "m", _RedisCommandsQueue_flushQueue).call(RedisCommandsQueue, __classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f"), err);
__classPrivateFieldGet(_a, _a, "m", _RedisCommandsQueue_flushQueue).call(_a, __classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f"), err);
if (!__classPrivateFieldGet(this, _RedisCommandsQueue_chainInExecution, "f"))

@@ -171,7 +171,6 @@ return;

__classPrivateFieldGet(this, _RedisCommandsQueue_pubSub, "f").reset();
__classPrivateFieldGet(RedisCommandsQueue, _a, "m", _RedisCommandsQueue_flushQueue).call(RedisCommandsQueue, __classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f"), err);
__classPrivateFieldGet(RedisCommandsQueue, _a, "m", _RedisCommandsQueue_flushQueue).call(RedisCommandsQueue, __classPrivateFieldGet(this, _RedisCommandsQueue_waitingToBeSent, "f"), err);
__classPrivateFieldGet(_a, _a, "m", _RedisCommandsQueue_flushQueue).call(_a, __classPrivateFieldGet(this, _RedisCommandsQueue_waitingForReply, "f"), err);
__classPrivateFieldGet(_a, _a, "m", _RedisCommandsQueue_flushQueue).call(_a, __classPrivateFieldGet(this, _RedisCommandsQueue_waitingToBeSent, "f"), err);
}
}
exports.default = RedisCommandsQueue;
_a = RedisCommandsQueue, _RedisCommandsQueue_maxLength = new WeakMap(), _RedisCommandsQueue_waitingToBeSent = new WeakMap(), _RedisCommandsQueue_waitingForReply = new WeakMap(), _RedisCommandsQueue_onShardedChannelMoved = new WeakMap(), _RedisCommandsQueue_pubSub = new WeakMap(), _RedisCommandsQueue_chainInExecution = new WeakMap(), _RedisCommandsQueue_decoder = new WeakMap(), _RedisCommandsQueue_instances = new WeakSet(), _RedisCommandsQueue_flushQueue = function _RedisCommandsQueue_flushQueue(queue, err) {

@@ -200,1 +199,2 @@ while (queue.length) {

};
exports.default = RedisCommandsQueue;

@@ -13,3 +13,3 @@ "use strict";

};
var _RedisClient_instances, _RedisClient_options, _RedisClient_socket, _RedisClient_queue, _RedisClient_isolationPool, _RedisClient_v4, _RedisClient_selectedDB, _RedisClient_initiateOptions, _RedisClient_initiateQueue, _RedisClient_initiateSocket, _RedisClient_initiateIsolationPool, _RedisClient_legacyMode, _RedisClient_legacySendCommand, _RedisClient_defineLegacyCommand, _RedisClient_pingTimer, _RedisClient_setPingTimer, _RedisClient_sendCommand, _RedisClient_pubSubCommand, _RedisClient_tick, _RedisClient_addMultiCommands, _RedisClient_destroyIsolationPool;
var _RedisClient_instances, _a, _RedisClient_options, _RedisClient_socket, _RedisClient_queue, _RedisClient_isolationPool, _RedisClient_v4, _RedisClient_selectedDB, _RedisClient_initiateOptions, _RedisClient_initiateQueue, _RedisClient_initiateSocket, _RedisClient_initiateIsolationPool, _RedisClient_legacyMode, _RedisClient_legacySendCommand, _RedisClient_defineLegacyCommand, _RedisClient_pingTimer, _RedisClient_setPingTimer, _RedisClient_sendCommand, _RedisClient_pubSubCommand, _RedisClient_tick, _RedisClient_addMultiCommands, _RedisClient_destroyIsolationPool;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -34,11 +34,11 @@ const commands_1 = require("./commands");

const Client = (0, commander_1.attachExtensions)({
BaseClass: RedisClient,
modulesExecutor: RedisClient.prototype.commandsExecutor,
BaseClass: _a,
modulesExecutor: _a.prototype.commandsExecutor,
modules: extensions?.modules,
functionsExecutor: RedisClient.prototype.functionsExecuter,
functionsExecutor: _a.prototype.functionsExecuter,
functions: extensions?.functions,
scriptsExecutor: RedisClient.prototype.scriptsExecuter,
scriptsExecutor: _a.prototype.scriptsExecuter,
scripts: extensions?.scripts
});
if (Client !== RedisClient) {
if (Client !== _a) {
Client.prototype.Multi = multi_command_1.default.extend(extensions);

@@ -49,3 +49,3 @@ }

static create(options) {
return new (RedisClient.extend(options))(options);
return new (_a.extend(options))(options);
}

@@ -108,3 +108,3 @@ static parseURL(url) {

writable: true,
value: RedisClient.commandOptions
value: _a.commandOptions
});

@@ -357,6 +357,5 @@ _RedisClient_options.set(this, void 0);

}
exports.default = RedisClient;
_RedisClient_options = new WeakMap(), _RedisClient_socket = new WeakMap(), _RedisClient_queue = new WeakMap(), _RedisClient_isolationPool = new WeakMap(), _RedisClient_v4 = new WeakMap(), _RedisClient_selectedDB = new WeakMap(), _RedisClient_pingTimer = new WeakMap(), _RedisClient_instances = new WeakSet(), _RedisClient_initiateOptions = function _RedisClient_initiateOptions(options) {
_a = RedisClient, _RedisClient_options = new WeakMap(), _RedisClient_socket = new WeakMap(), _RedisClient_queue = new WeakMap(), _RedisClient_isolationPool = new WeakMap(), _RedisClient_v4 = new WeakMap(), _RedisClient_selectedDB = new WeakMap(), _RedisClient_pingTimer = new WeakMap(), _RedisClient_instances = new WeakSet(), _RedisClient_initiateOptions = function _RedisClient_initiateOptions(options) {
if (options?.url) {
const parsed = RedisClient.parseURL(options.url);
const parsed = _a.parseURL(options.url);
if (options.socket) {

@@ -449,3 +448,3 @@ parsed.socket = Object.assign(options.socket, parsed.socket);

}, _RedisClient_legacyMode = function _RedisClient_legacyMode() {
var _a, _b;
var _b, _c;
if (!__classPrivateFieldGet(this, _RedisClient_options, "f")?.legacyMode)

@@ -464,3 +463,3 @@ return;

__classPrivateFieldGet(this, _RedisClient_instances, "m", _RedisClient_defineLegacyCommand).call(this, name, command);
(_a = this)[_b = name.toLowerCase()] ?? (_a[_b] = this[name]);
(_b = this)[_c = name.toLowerCase()] ?? (_b[_c] = this[name]);
}

@@ -555,2 +554,3 @@ // hard coded commands

};
exports.default = RedisClient;
(0, commander_1.attachCommands)({

@@ -557,0 +557,0 @@ BaseClass: RedisClient,

@@ -89,3 +89,2 @@ "use strict";

}
exports.default = RedisClientMultiCommand;
_RedisClientMultiCommand_multi = new WeakMap(), _RedisClientMultiCommand_executor = new WeakMap(), _RedisClientMultiCommand_selectedDB = new WeakMap(), _RedisClientMultiCommand_instances = new WeakSet(), _RedisClientMultiCommand_legacyMode = function _RedisClientMultiCommand_legacyMode() {

@@ -127,2 +126,3 @@ var _a, _b;

};
exports.default = RedisClientMultiCommand;
(0, commander_1.attachCommands)({

@@ -129,0 +129,0 @@ BaseClass: RedisClientMultiCommand,

@@ -21,3 +21,3 @@ "use strict";

PubSubType["SHARDED"] = "SHARDED";
})(PubSubType = exports.PubSubType || (exports.PubSubType = {}));
})(PubSubType || (exports.PubSubType = PubSubType = {}));
const COMMANDS = {

@@ -66,3 +66,3 @@ [PubSubType.CHANNELS]: {

var _b;
const args = [COMMANDS[type].subscribe], channelsArray = __classPrivateFieldGet(PubSub, _a, "m", _PubSub_channelsArray).call(PubSub, channels);
const args = [COMMANDS[type].subscribe], channelsArray = __classPrivateFieldGet(_a, _a, "m", _PubSub_channelsArray).call(_a, channels);
for (const channel of channelsArray) {

@@ -77,3 +77,3 @@ let channelListeners = __classPrivateFieldGet(this, _PubSub_listeners, "f")[type].get(channel);

for (const channel of channelsArray) {
__classPrivateFieldGet(PubSub, _a, "m", _PubSub_listenersSet).call(PubSub, __classPrivateFieldGet(this, _PubSub_listeners, "f")[type].get(channel), returnBuffers).add(listener);
__classPrivateFieldGet(_a, _a, "m", _PubSub_listenersSet).call(_a, __classPrivateFieldGet(this, _PubSub_listeners, "f")[type].get(channel), returnBuffers).add(listener);
}

@@ -100,3 +100,3 @@ return;

}
__classPrivateFieldGet(PubSub, _a, "m", _PubSub_listenersSet).call(PubSub, listeners, returnBuffers).add(listener);
__classPrivateFieldGet(_a, _a, "m", _PubSub_listenersSet).call(_a, listeners, returnBuffers).add(listener);
}

@@ -162,3 +162,3 @@ },

}
const channelsArray = __classPrivateFieldGet(PubSub, _a, "m", _PubSub_channelsArray).call(PubSub, channels);
const channelsArray = __classPrivateFieldGet(_a, _a, "m", _PubSub_channelsArray).call(_a, channels);
if (!listener) {

@@ -195,3 +195,3 @@ return __classPrivateFieldGet(this, _PubSub_instances, "m", _PubSub_unsubscribeCommand).call(this, [COMMANDS[type].unsubscribe, ...channelsArray], channelsArray.length, () => {

for (const channel of channelsArray) {
__classPrivateFieldGet(PubSub, _a, "m", _PubSub_listenersSet).call(PubSub, listeners.get(channel), returnBuffers).delete(listener);
__classPrivateFieldGet(_a, _a, "m", _PubSub_listenersSet).call(_a, listeners.get(channel), returnBuffers).delete(listener);
}

@@ -198,0 +198,0 @@ return;

@@ -44,3 +44,3 @@ "use strict";

__classPrivateFieldSet(this, _RedisSocket_initiator, initiator, "f");
__classPrivateFieldSet(this, _RedisSocket_options, __classPrivateFieldGet(RedisSocket, _a, "m", _RedisSocket_initiateOptions).call(RedisSocket, options), "f");
__classPrivateFieldSet(this, _RedisSocket_options, __classPrivateFieldGet(_a, _a, "m", _RedisSocket_initiateOptions).call(_a, options), "f");
}

@@ -98,3 +98,2 @@ async connect() {

}
exports.default = RedisSocket;
_a = RedisSocket, _RedisSocket_initiator = new WeakMap(), _RedisSocket_options = new WeakMap(), _RedisSocket_socket = new WeakMap(), _RedisSocket_isOpen = new WeakMap(), _RedisSocket_isReady = new WeakMap(), _RedisSocket_writableNeedDrain = new WeakMap(), _RedisSocket_isSocketUnrefed = new WeakMap(), _RedisSocket_isCorked = new WeakMap(), _RedisSocket_instances = new WeakSet(), _RedisSocket_initiateOptions = function _RedisSocket_initiateOptions(options) {

@@ -176,3 +175,3 @@ var _b, _c;

return new Promise((resolve, reject) => {
const { connectEvent, socket } = __classPrivateFieldGet(RedisSocket, _a, "m", _RedisSocket_isTlsSocket).call(RedisSocket, __classPrivateFieldGet(this, _RedisSocket_options, "f")) ?
const { connectEvent, socket } = __classPrivateFieldGet(_a, _a, "m", _RedisSocket_isTlsSocket).call(_a, __classPrivateFieldGet(this, _RedisSocket_options, "f")) ?
__classPrivateFieldGet(this, _RedisSocket_instances, "m", _RedisSocket_createTlsSocket).call(this) :

@@ -237,1 +236,2 @@ __classPrivateFieldGet(this, _RedisSocket_instances, "m", _RedisSocket_createNetSocket).call(this);

};
exports.default = RedisSocket;

@@ -36,3 +36,3 @@ "use strict";

writable: true,
value: new Array(__classPrivateFieldGet(RedisClusterSlots, _a, "f", _RedisClusterSlots_SLOTS))
value: new Array(__classPrivateFieldGet(_a, _a, "f", _RedisClusterSlots_SLOTS))
});

@@ -139,3 +139,3 @@ Object.defineProperty(this, "shards", {

await unsubscribe(client);
if (!client.isPubSubActive) {
if (!client.isPubSubActive && client.isOpen) {
await client.disconnect();

@@ -155,3 +155,3 @@ this.pubSubNode = undefined;

await unsubscribe(client);
if (!client.isPubSubActive) {
if (!client.isPubSubActive && client.isOpen) {
await client.disconnect();

@@ -162,3 +162,2 @@ master.pubSubClient = undefined;

}
exports.default = RedisClusterSlots;
_a = RedisClusterSlots, _RedisClusterSlots_options = new WeakMap(), _RedisClusterSlots_Client = new WeakMap(), _RedisClusterSlots_emit = new WeakMap(), _RedisClusterSlots_isOpen = new WeakMap(), _RedisClusterSlots_runningRediscoverPromise = new WeakMap(), _RedisClusterSlots_randomNodeIterator = new WeakMap(), _RedisClusterSlots_instances = new WeakSet(), _RedisClusterSlots_discoverWithRootNodes = async function _RedisClusterSlots_discoverWithRootNodes() {

@@ -176,3 +175,3 @@ let start = Math.floor(Math.random() * __classPrivateFieldGet(this, _RedisClusterSlots_options, "f").rootNodes.length);

}, _RedisClusterSlots_resetSlots = function _RedisClusterSlots_resetSlots() {
this.slots = new Array(__classPrivateFieldGet(RedisClusterSlots, _a, "f", _RedisClusterSlots_SLOTS));
this.slots = new Array(__classPrivateFieldGet(_a, _a, "f", _RedisClusterSlots_SLOTS));
this.shards = [];

@@ -440,1 +439,2 @@ this.masters = [];

_RedisClusterSlots_SLOTS = { value: 16384 };
exports.default = RedisClusterSlots;

@@ -215,3 +215,2 @@ "use strict";

}
exports.default = RedisCluster;
_RedisCluster_options = new WeakMap(), _RedisCluster_slots = new WeakMap(), _RedisCluster_Multi = new WeakMap(), _RedisCluster_instances = new WeakSet(), _RedisCluster_execute = async function _RedisCluster_execute(firstKey, isReadonly, executor) {

@@ -251,2 +250,3 @@ const maxCommandRedirections = __classPrivateFieldGet(this, _RedisCluster_options, "f").maxCommandRedirections ?? 16;

};
exports.default = RedisCluster;
(0, commander_1.attachCommands)({

@@ -253,0 +253,0 @@ BaseClass: RedisCluster,

@@ -74,4 +74,4 @@ "use strict";

}
_RedisClusterMultiCommand_multi = new WeakMap(), _RedisClusterMultiCommand_executor = new WeakMap(), _RedisClusterMultiCommand_firstKey = new WeakMap();
exports.default = RedisClusterMultiCommand;
_RedisClusterMultiCommand_multi = new WeakMap(), _RedisClusterMultiCommand_executor = new WeakMap(), _RedisClusterMultiCommand_firstKey = new WeakMap();
(0, commander_1.attachCommands)({

@@ -78,0 +78,0 @@ BaseClass: RedisClusterMultiCommand,

@@ -12,3 +12,3 @@ "use strict";

ClientKillFilters["SKIP_ME"] = "SKIPME";
})(ClientKillFilters = exports.ClientKillFilters || (exports.ClientKillFilters = {}));
})(ClientKillFilters || (exports.ClientKillFilters = ClientKillFilters = {}));
function transformArguments(filters) {

@@ -15,0 +15,0 @@ const args = ['CLIENT', 'KILL'];

@@ -8,3 +8,3 @@ "use strict";

FailoverModes["TAKEOVER"] = "TAKEOVER";
})(FailoverModes = exports.FailoverModes || (exports.FailoverModes = {}));
})(FailoverModes || (exports.FailoverModes = FailoverModes = {}));
function transformArguments(mode) {

@@ -11,0 +11,0 @@ const args = ['CLUSTER', 'FAILOVER'];

@@ -12,3 +12,3 @@ "use strict";

RedisClusterNodeLinkStates["DISCONNECTED"] = "disconnected";
})(RedisClusterNodeLinkStates = exports.RedisClusterNodeLinkStates || (exports.RedisClusterNodeLinkStates = {}));
})(RedisClusterNodeLinkStates || (exports.RedisClusterNodeLinkStates = RedisClusterNodeLinkStates = {}));
function transformReply(reply) {

@@ -15,0 +15,0 @@ const lines = reply.split('\n');

@@ -10,3 +10,3 @@ "use strict";

ClusterSlotStates["NODE"] = "NODE";
})(ClusterSlotStates = exports.ClusterSlotStates || (exports.ClusterSlotStates = {}));
})(ClusterSlotStates || (exports.ClusterSlotStates = ClusterSlotStates = {}));
function transformArguments(slot, state, nodeId) {

@@ -13,0 +13,0 @@ const args = ['CLUSTER', 'SETSLOT', slot.toString(), state];

@@ -10,3 +10,3 @@ "use strict";

FilterBy["PATTERN"] = "PATTERN";
})(FilterBy = exports.FilterBy || (exports.FilterBy = {}));
})(FilterBy || (exports.FilterBy = FilterBy = {}));
function transformArguments(filter) {

@@ -13,0 +13,0 @@ const args = ['COMMAND', 'LIST'];

@@ -8,3 +8,3 @@ "use strict";

RedisFlushModes["SYNC"] = "SYNC";
})(RedisFlushModes = exports.RedisFlushModes || (exports.RedisFlushModes = {}));
})(RedisFlushModes || (exports.RedisFlushModes = RedisFlushModes = {}));
function transformArguments(mode) {

@@ -11,0 +11,0 @@ const args = ['FLUSHALL'];

@@ -208,3 +208,3 @@ "use strict";

GeoReplyWith["COORDINATES"] = "WITHCOORD";
})(GeoReplyWith = exports.GeoReplyWith || (exports.GeoReplyWith = {}));
})(GeoReplyWith || (exports.GeoReplyWith = GeoReplyWith = {}));
function transformGeoMembersWithReply(reply, replyWith) {

@@ -316,3 +316,3 @@ const replyWithSet = new Set(replyWith);

CommandFlags["MOVABLEKEYS"] = "movablekeys"; // keys have no pre-determined position. You must discover keys yourself.
})(CommandFlags = exports.CommandFlags || (exports.CommandFlags = {}));
})(CommandFlags || (exports.CommandFlags = CommandFlags = {}));
var CommandCategories;

@@ -341,3 +341,3 @@ (function (CommandCategories) {

CommandCategories["SCRIPTING"] = "@scripting";
})(CommandCategories = exports.CommandCategories || (exports.CommandCategories = {}));
})(CommandCategories || (exports.CommandCategories = CommandCategories = {}));
function transformCommandReply([name, arity, flags, firstKeyIndex, lastKeyIndex, step, categories]) {

@@ -361,3 +361,3 @@ return {

RedisFunctionFlags["NO_CLUSTER"] = "no-cluster";
})(RedisFunctionFlags = exports.RedisFunctionFlags || (exports.RedisFunctionFlags = {}));
})(RedisFunctionFlags || (exports.RedisFunctionFlags = RedisFunctionFlags = {}));
function transformFunctionListItemReply(reply) {

@@ -364,0 +364,0 @@ return {

{
"name": "@redis/client",
"version": "1.5.12",
"version": "1.5.13",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

{
"name": "@redis/client",
"version": "1.5.13",
"version": "1.5.14",
"license": "MIT",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc