@valkey/valkey-glide 1.3.5-rc11 → 1.3.5-rc13

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.
@@ -32,6 +32,9 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
35
38
  Object.defineProperty(exports, "__esModule", { value: true });
36
39
  exports.BaseClient = exports.ObjectType = exports.Decoder = exports.ProtocolVersion = void 0;
37
40
  exports.convertGlideRecord = convertGlideRecord;
@@ -41,13 +44,11 @@ exports.convertRecordToGlideRecord = convertRecordToGlideRecord;
41
44
  /**
42
45
  * Copyright Valkey GLIDE Project Contributors - SPDX Identifier: Apache-2.0
43
46
  */
47
+ const long_1 = __importDefault(require("long"));
44
48
  const net = __importStar(require("net"));
45
49
  const minimal_1 = require("protobufjs/minimal");
46
- const native_1 = require("../build-ts/native");
50
+ const _1 = require(".");
47
51
  const ProtobufMessage_1 = require("../build-ts/ProtobufMessage");
48
- const Commands_1 = require("./Commands");
49
- const Errors_1 = require("./Errors");
50
- const Logger_1 = require("./Logger");
51
52
  var ProtocolVersion;
52
53
  (function (ProtocolVersion) {
53
54
  /** Use RESP2 to communicate with the server nodes. */
@@ -169,18 +170,18 @@ var ObjectType;
169
170
  })(ObjectType || (exports.ObjectType = ObjectType = {}));
170
171
  function getRequestErrorClass(type) {
171
172
  if (type === ProtobufMessage_1.response.RequestErrorType.Disconnect) {
172
- return Errors_1.ConnectionError;
173
+ return _1.ConnectionError;
173
174
  }
174
175
  if (type === ProtobufMessage_1.response.RequestErrorType.ExecAbort) {
175
- return Errors_1.ExecAbortError;
176
+ return _1.ExecAbortError;
176
177
  }
177
178
  if (type === ProtobufMessage_1.response.RequestErrorType.Timeout) {
178
- return Errors_1.TimeoutError;
179
+ return _1.TimeoutError;
179
180
  }
180
181
  if (type === ProtobufMessage_1.response.RequestErrorType.Unspecified) {
181
- return Errors_1.RequestError;
182
+ return _1.RequestError;
182
183
  }
183
- return Errors_1.RequestError;
184
+ return _1.RequestError;
184
185
  }
185
186
  /**
186
187
  * Base client interface for GLIDE
@@ -189,11 +190,11 @@ class BaseClient {
189
190
  configurePubsub(options, configuration) {
190
191
  if (options.pubsubSubscriptions) {
191
192
  if (options.protocol == ProtocolVersion.RESP2) {
192
- throw new Errors_1.ConfigurationError("PubSub subscriptions require RESP3 protocol, but RESP2 was configured.");
193
+ throw new _1.ConfigurationError("PubSub subscriptions require RESP3 protocol, but RESP2 was configured.");
193
194
  }
194
195
  const { context, callback } = options.pubsubSubscriptions;
195
196
  if (context && !callback) {
196
- throw new Errors_1.ConfigurationError("PubSub subscriptions with a context require a callback function to be configured.");
197
+ throw new _1.ConfigurationError("PubSub subscriptions with a context require a callback function to be configured.");
197
198
  }
198
199
  configuration.pubsubSubscriptions =
199
200
  ProtobufMessage_1.connection_request.PubSubSubscriptions.create({});
@@ -233,7 +234,7 @@ class BaseClient {
233
234
  else {
234
235
  // Unhandled error
235
236
  const err_message = `Failed to decode the response: ${err}`;
236
- Logger_1.Logger.log("error", "connection", err_message);
237
+ _1.Logger.log("error", "connection", err_message);
237
238
  this.close(err_message);
238
239
  return;
239
240
  }
@@ -304,7 +305,7 @@ class BaseClient {
304
305
  if (port === undefined) {
305
306
  const split = host.split(":");
306
307
  if (split.length !== 2) {
307
- throw new Errors_1.RequestError("No port provided, expected host to be formatted as `{hostname}:{port}`. Received " +
308
+ throw new _1.RequestError("No port provided, expected host to be formatted as `{hostname}:{port}`. Received " +
308
309
  host);
309
310
  }
310
311
  host = split[0];
@@ -315,6 +316,16 @@ class BaseClient {
315
316
  });
316
317
  }
317
318
  }
319
+ dropCommandSpan(spanPtr) {
320
+ if (spanPtr === null || spanPtr === undefined)
321
+ return;
322
+ if (typeof spanPtr === "number") {
323
+ return (0, _1.dropOtelSpan)(BigInt(spanPtr)); // Convert number to BigInt
324
+ }
325
+ else if (spanPtr instanceof long_1.default) {
326
+ return (0, _1.dropOtelSpan)(BigInt(spanPtr.toString())); // Convert Long to BigInt via string
327
+ }
328
+ }
318
329
  processResponse(message) {
319
330
  if (message.closingError != null) {
320
331
  this.close(message.closingError);
@@ -337,11 +348,11 @@ class BaseClient {
337
348
  pointer = new PointerResponse(message.respPointer, message.respPointer.high, message.respPointer.low);
338
349
  }
339
350
  try {
340
- resolve((0, native_1.valueFromSplitPointer)(pointer.high, pointer.low, decoder === Decoder.String));
351
+ resolve((0, _1.valueFromSplitPointer)(pointer.high, pointer.low, decoder === Decoder.String));
341
352
  }
342
353
  catch (err) {
343
- Logger_1.Logger.log("error", "Decoder", `Decoding error: '${err}'`);
344
- reject(err instanceof Errors_1.ValkeyError
354
+ _1.Logger.log("error", "Decoder", `Decoding error: '${err}'`);
355
+ reject(err instanceof _1.ValkeyError
345
356
  ? err
346
357
  : new Error(`Decoding error: '${err}'. \n NOTE: If this was thrown during a command with write operations, the data could be UNRECOVERABLY LOST.`));
347
358
  }
@@ -352,6 +363,7 @@ class BaseClient {
352
363
  else {
353
364
  resolve(null);
354
365
  }
366
+ this.dropCommandSpan(message.rootSpanPtr);
355
367
  }
356
368
  processPush(response) {
357
369
  if (response.closingError != null || !response.respPointer) {
@@ -392,10 +404,10 @@ class BaseClient {
392
404
  AZAffinityReplicasAndPrimary: ProtobufMessage_1.connection_request.ReadFrom.AZAffinityReplicasAndPrimary,
393
405
  };
394
406
  // if logger has been initialized by the external-user on info level this log will be shown
395
- Logger_1.Logger.log("info", "Client lifetime", `construct client`);
407
+ _1.Logger.log("info", "Client lifetime", `construct client`);
396
408
  this.config = options;
397
409
  this.requestTimeout =
398
- options?.requestTimeout ?? native_1.DEFAULT_REQUEST_TIMEOUT_IN_MILLISECONDS;
410
+ options?.requestTimeout ?? _1.DEFAULT_REQUEST_TIMEOUT_IN_MILLISECONDS;
399
411
  this.socket = socket;
400
412
  this.socket
401
413
  .on("data", (data) => this.handleReadData(data))
@@ -405,7 +417,7 @@ class BaseClient {
405
417
  });
406
418
  this.defaultDecoder = options?.defaultDecoder ?? Decoder.String;
407
419
  this.inflightRequestsLimit =
408
- options?.inflightRequestsLimit ?? native_1.DEFAULT_INFLIGHT_REQUESTS_LIMIT;
420
+ options?.inflightRequestsLimit ?? _1.DEFAULT_INFLIGHT_REQUESTS_LIMIT;
409
421
  }
410
422
  getCallbackIndex() {
411
423
  return (this.availableCallbackSlots.pop() ??
@@ -426,7 +438,7 @@ class BaseClient {
426
438
  }
427
439
  ensureClientIsOpen() {
428
440
  if (this.isClosed) {
429
- throw new Errors_1.ClosingError("Unable to execute requests; the client is closed. Please create a new client.");
441
+ throw new _1.ClosingError("Unable to execute requests; the client is closed. Please create a new client.");
430
442
  }
431
443
  }
432
444
  /**
@@ -446,12 +458,21 @@ class BaseClient {
446
458
  const route = this.toProtobufRoute(options?.route);
447
459
  const callbackIndex = this.getCallbackIndex();
448
460
  const basePromise = new Promise((resolve, reject) => {
461
+ // Create a span only if the OpenTelemetry is enabled and measure statistics only according to the requests percentage configuration
462
+ let spanPtr = null;
463
+ if (_1.OpenTelemetry.shouldSample()) {
464
+ const commandName = command instanceof ProtobufMessage_1.command_request.Command
465
+ ? ProtobufMessage_1.command_request.RequestType[command.requestType]
466
+ : "Batch";
467
+ const pair = (0, _1.createLeakedOtelSpan)(commandName);
468
+ spanPtr = new long_1.default(pair[0], pair[1]);
469
+ }
449
470
  this.promiseCallbackFunctions[callbackIndex] = [
450
471
  resolve,
451
472
  reject,
452
473
  options?.decoder,
453
474
  ];
454
- this.writeOrBufferCommandRequest(callbackIndex, command, route, isAtomic, raiseOnError, options);
475
+ this.writeOrBufferCommandRequest(callbackIndex, command, route, spanPtr, isAtomic, raiseOnError, options);
455
476
  });
456
477
  if (!Array.isArray(command)) {
457
478
  return basePromise;
@@ -467,7 +488,7 @@ class BaseClient {
467
488
  if (item?.constructor?.name === "Error" &&
468
489
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
469
490
  item.name === "RequestError") {
470
- Object.setPrototypeOf(item, Errors_1.RequestError.prototype);
491
+ Object.setPrototypeOf(item, _1.RequestError.prototype);
471
492
  }
472
493
  }
473
494
  }
@@ -514,9 +535,9 @@ class BaseClient {
514
535
  * @param raiseOnError - Determines whether to raise an error if any of the commands fails, in the case of a Batch and not a single command. Defaults to `false`.
515
536
  * @param options - Optional settings for batch requests.
516
537
  */
517
- writeOrBufferCommandRequest(callbackIdx, command, route, isAtomic = false, raiseOnError = false, options = {}) {
538
+ writeOrBufferCommandRequest(callbackIdx, command, route, commandSpanPtr, isAtomic = false, raiseOnError = false, options = {}) {
518
539
  if (isAtomic && "retryStrategy" in options) {
519
- throw new Errors_1.RequestError("Retry strategy is not supported for atomic batches.");
540
+ throw new _1.RequestError("Retry strategy is not supported for atomic batches.");
520
541
  }
521
542
  const isBatch = Array.isArray(command);
522
543
  let batch;
@@ -542,6 +563,7 @@ class BaseClient {
542
563
  singleCommand: isBatch ? undefined : command,
543
564
  batch,
544
565
  route,
566
+ rootSpanPtr: commandSpanPtr,
545
567
  });
546
568
  this.writeOrBufferRequest(message, (msg, writer) => {
547
569
  ProtobufMessage_1.command_request.CommandRequest.encodeDelimited(msg, writer);
@@ -592,13 +614,13 @@ class BaseClient {
592
614
  }
593
615
  async getPubSubMessage() {
594
616
  if (this.isClosed) {
595
- throw new Errors_1.ClosingError("Unable to execute requests; the client is closed. Please create a new client.");
617
+ throw new _1.ClosingError("Unable to execute requests; the client is closed. Please create a new client.");
596
618
  }
597
619
  if (!this.isPubsubConfigured(this.config)) {
598
- throw new Errors_1.ConfigurationError("The operation will never complete since there was no pubsbub subscriptions applied to the client.");
620
+ throw new _1.ConfigurationError("The operation will never complete since there was no pubsbub subscriptions applied to the client.");
599
621
  }
600
622
  if (this.getPubsubCallbackAndContext(this.config)[0]) {
601
- throw new Errors_1.ConfigurationError("The operation will never complete since messages will be passed to the configured callback.");
623
+ throw new _1.ConfigurationError("The operation will never complete since messages will be passed to the configured callback.");
602
624
  }
603
625
  return new Promise((resolve, reject) => {
604
626
  this.pubsubFutures.push([resolve, reject]);
@@ -607,13 +629,13 @@ class BaseClient {
607
629
  }
608
630
  tryGetPubSubMessage(decoder) {
609
631
  if (this.isClosed) {
610
- throw new Errors_1.ClosingError("Unable to execute requests; the client is closed. Please create a new client.");
632
+ throw new _1.ClosingError("Unable to execute requests; the client is closed. Please create a new client.");
611
633
  }
612
634
  if (!this.isPubsubConfigured(this.config)) {
613
- throw new Errors_1.ConfigurationError("The operation will never complete since there was no pubsbub subscriptions applied to the client.");
635
+ throw new _1.ConfigurationError("The operation will never complete since there was no pubsbub subscriptions applied to the client.");
614
636
  }
615
637
  if (this.getPubsubCallbackAndContext(this.config)[0]) {
616
- throw new Errors_1.ConfigurationError("The operation will never complete since messages will be passed to the configured callback.");
638
+ throw new _1.ConfigurationError("The operation will never complete since messages will be passed to the configured callback.");
617
639
  }
618
640
  let msg = null;
619
641
  this.completePubSubFuturesSafe();
@@ -630,14 +652,14 @@ class BaseClient {
630
652
  const isStringDecoder = (decoder ?? this.defaultDecoder) === Decoder.String;
631
653
  if (responsePointer) {
632
654
  if (typeof responsePointer !== "number") {
633
- nextPushNotificationValue = (0, native_1.valueFromSplitPointer)(responsePointer.high, responsePointer.low, isStringDecoder);
655
+ nextPushNotificationValue = (0, _1.valueFromSplitPointer)(responsePointer.high, responsePointer.low, isStringDecoder);
634
656
  }
635
657
  else {
636
- nextPushNotificationValue = (0, native_1.valueFromSplitPointer)(0, responsePointer, isStringDecoder);
658
+ nextPushNotificationValue = (0, _1.valueFromSplitPointer)(0, responsePointer, isStringDecoder);
637
659
  }
638
660
  const messageKind = nextPushNotificationValue["kind"];
639
661
  if (messageKind === "Disconnect") {
640
- Logger_1.Logger.log("warn", "disconnect notification", "Transport disconnected, messages might be lost");
662
+ _1.Logger.log("warn", "disconnect notification", "Transport disconnected, messages might be lost");
641
663
  }
642
664
  else if (messageKind === "Message" ||
643
665
  messageKind === "PMessage" ||
@@ -667,7 +689,7 @@ class BaseClient {
667
689
  // pass
668
690
  }
669
691
  else {
670
- Logger_1.Logger.log("error", "unknown notification", `Unknown notification: '${messageKind}'`);
692
+ _1.Logger.log("error", "unknown notification", `Unknown notification: '${messageKind}'`);
671
693
  }
672
694
  }
673
695
  return msg;
@@ -702,7 +724,7 @@ class BaseClient {
702
724
  * ```
703
725
  */
704
726
  async get(key, options) {
705
- return this.createWritePromise((0, Commands_1.createGet)(key), options);
727
+ return this.createWritePromise((0, _1.createGet)(key), options);
706
728
  }
707
729
  /**
708
730
  * Get the value of `key` and optionally set its expiration. `GETEX` is similar to {@link get}.
@@ -725,7 +747,7 @@ class BaseClient {
725
747
  * ```
726
748
  */
727
749
  async getex(key, options) {
728
- return this.createWritePromise((0, Commands_1.createGetEx)(key, options?.expiry), options);
750
+ return this.createWritePromise((0, _1.createGetEx)(key, options?.expiry), options);
729
751
  }
730
752
  /**
731
753
  * Gets a string value associated with the given `key`and deletes the key.
@@ -745,7 +767,7 @@ class BaseClient {
745
767
  * ```
746
768
  */
747
769
  async getdel(key, options) {
748
- return this.createWritePromise((0, Commands_1.createGetDel)(key), options);
770
+ return this.createWritePromise((0, _1.createGetDel)(key), options);
749
771
  }
750
772
  /**
751
773
  * Returns the substring of the string value stored at `key`, determined by the byte offsets
@@ -776,7 +798,7 @@ class BaseClient {
776
798
  * ```
777
799
  */
778
800
  async getrange(key, start, end, options) {
779
- return this.createWritePromise((0, Commands_1.createGetRange)(key, start, end), options);
801
+ return this.createWritePromise((0, _1.createGetRange)(key, start, end), options);
780
802
  }
781
803
  /** Set the given key with the given value. Return value is dependent on the passed options.
782
804
  *
@@ -817,7 +839,7 @@ class BaseClient {
817
839
  * ```
818
840
  */
819
841
  async set(key, value, options) {
820
- return this.createWritePromise((0, Commands_1.createSet)(key, value, options), options);
842
+ return this.createWritePromise((0, _1.createSet)(key, value, options), options);
821
843
  }
822
844
  /**
823
845
  * Removes the specified keys. A key is ignored if it does not exist.
@@ -851,7 +873,7 @@ class BaseClient {
851
873
  * ```
852
874
  */
853
875
  async del(keys) {
854
- return this.createWritePromise((0, Commands_1.createDel)(keys));
876
+ return this.createWritePromise((0, _1.createDel)(keys));
855
877
  }
856
878
  /**
857
879
  * Serialize the value stored at `key` in a Valkey-specific format and return it to the user.
@@ -874,7 +896,7 @@ class BaseClient {
874
896
  * ```
875
897
  */
876
898
  async dump(key) {
877
- return this.createWritePromise((0, Commands_1.createDump)(key), {
899
+ return this.createWritePromise((0, _1.createDump)(key), {
878
900
  decoder: Decoder.Bytes,
879
901
  });
880
902
  }
@@ -916,7 +938,7 @@ class BaseClient {
916
938
  * ```
917
939
  */
918
940
  async restore(key, ttl, value, options) {
919
- return this.createWritePromise((0, Commands_1.createRestore)(key, ttl, value, options), { decoder: Decoder.String });
941
+ return this.createWritePromise((0, _1.createRestore)(key, ttl, value, options), { decoder: Decoder.String });
920
942
  }
921
943
  /** Retrieve the values of multiple keys.
922
944
  *
@@ -945,7 +967,7 @@ class BaseClient {
945
967
  * ```
946
968
  */
947
969
  async mget(keys, options) {
948
- return this.createWritePromise((0, Commands_1.createMGet)(keys), options);
970
+ return this.createWritePromise((0, _1.createMGet)(keys), options);
949
971
  }
950
972
  /** Set multiple keys to multiple values in a single operation.
951
973
  *
@@ -978,7 +1000,7 @@ class BaseClient {
978
1000
  * ```
979
1001
  */
980
1002
  async mset(keysAndValues) {
981
- return this.createWritePromise((0, Commands_1.createMSet)(convertGlideRecord(keysAndValues)));
1003
+ return this.createWritePromise((0, _1.createMSet)(convertGlideRecord(keysAndValues)));
982
1004
  }
983
1005
  /**
984
1006
  * Sets multiple keys to values if the key does not exist. The operation is atomic, and if one or
@@ -1000,7 +1022,7 @@ class BaseClient {
1000
1022
  * ```
1001
1023
  */
1002
1024
  async msetnx(keysAndValues) {
1003
- return this.createWritePromise((0, Commands_1.createMSetNX)(convertGlideRecord(keysAndValues)));
1025
+ return this.createWritePromise((0, _1.createMSetNX)(convertGlideRecord(keysAndValues)));
1004
1026
  }
1005
1027
  /** Increments the number stored at `key` by one. If `key` does not exist, it is set to 0 before performing the operation.
1006
1028
  *
@@ -1018,7 +1040,7 @@ class BaseClient {
1018
1040
  * ```
1019
1041
  */
1020
1042
  async incr(key) {
1021
- return this.createWritePromise((0, Commands_1.createIncr)(key));
1043
+ return this.createWritePromise((0, _1.createIncr)(key));
1022
1044
  }
1023
1045
  /** Increments the number stored at `key` by `amount`. If `key` does not exist, it is set to 0 before performing the operation.
1024
1046
  *
@@ -1037,7 +1059,7 @@ class BaseClient {
1037
1059
  * ```
1038
1060
  */
1039
1061
  async incrBy(key, amount) {
1040
- return this.createWritePromise((0, Commands_1.createIncrBy)(key, amount));
1062
+ return this.createWritePromise((0, _1.createIncrBy)(key, amount));
1041
1063
  }
1042
1064
  /** Increment the string representing a floating point number stored at `key` by `amount`.
1043
1065
  * By using a negative increment value, the result is that the value stored at `key` is decremented.
@@ -1058,7 +1080,7 @@ class BaseClient {
1058
1080
  * ```
1059
1081
  */
1060
1082
  async incrByFloat(key, amount) {
1061
- return this.createWritePromise((0, Commands_1.createIncrByFloat)(key, amount));
1083
+ return this.createWritePromise((0, _1.createIncrByFloat)(key, amount));
1062
1084
  }
1063
1085
  /** Decrements the number stored at `key` by one. If `key` does not exist, it is set to 0 before performing the operation.
1064
1086
  *
@@ -1076,7 +1098,7 @@ class BaseClient {
1076
1098
  * ```
1077
1099
  */
1078
1100
  async decr(key) {
1079
- return this.createWritePromise((0, Commands_1.createDecr)(key));
1101
+ return this.createWritePromise((0, _1.createDecr)(key));
1080
1102
  }
1081
1103
  /** Decrements the number stored at `key` by `amount`. If `key` does not exist, it is set to 0 before performing the operation.
1082
1104
  *
@@ -1095,7 +1117,7 @@ class BaseClient {
1095
1117
  * ```
1096
1118
  */
1097
1119
  async decrBy(key, amount) {
1098
- return this.createWritePromise((0, Commands_1.createDecrBy)(key, amount));
1120
+ return this.createWritePromise((0, _1.createDecrBy)(key, amount));
1099
1121
  }
1100
1122
  /**
1101
1123
  * Perform a bitwise operation between multiple keys (containing string values) and store the result in the
@@ -1121,7 +1143,7 @@ class BaseClient {
1121
1143
  * ```
1122
1144
  */
1123
1145
  async bitop(operation, destination, keys) {
1124
- return this.createWritePromise((0, Commands_1.createBitOp)(operation, destination, keys));
1146
+ return this.createWritePromise((0, _1.createBitOp)(operation, destination, keys));
1125
1147
  }
1126
1148
  /**
1127
1149
  * Returns the bit value at `offset` in the string value stored at `key`. `offset` must be greater than or equal
@@ -1141,7 +1163,7 @@ class BaseClient {
1141
1163
  * ```
1142
1164
  */
1143
1165
  async getbit(key, offset) {
1144
- return this.createWritePromise((0, Commands_1.createGetBit)(key, offset));
1166
+ return this.createWritePromise((0, _1.createGetBit)(key, offset));
1145
1167
  }
1146
1168
  /**
1147
1169
  * Sets or clears the bit at `offset` in the string value stored at `key`. The `offset` is a zero-based index, with
@@ -1163,7 +1185,7 @@ class BaseClient {
1163
1185
  * ```
1164
1186
  */
1165
1187
  async setbit(key, offset, value) {
1166
- return this.createWritePromise((0, Commands_1.createSetBit)(key, offset, value));
1188
+ return this.createWritePromise((0, _1.createSetBit)(key, offset, value));
1167
1189
  }
1168
1190
  /**
1169
1191
  * Returns the position of the first bit matching the given `bit` value. The optional starting offset
@@ -1198,7 +1220,7 @@ class BaseClient {
1198
1220
  * ```
1199
1221
  */
1200
1222
  async bitpos(key, bit, options) {
1201
- return this.createWritePromise((0, Commands_1.createBitPos)(key, bit, options));
1223
+ return this.createWritePromise((0, _1.createBitPos)(key, bit, options));
1202
1224
  }
1203
1225
  /**
1204
1226
  * Reads or modifies the array of bits representing the string that is held at `key` based on the specified
@@ -1232,7 +1254,7 @@ class BaseClient {
1232
1254
  * ```
1233
1255
  */
1234
1256
  async bitfield(key, subcommands) {
1235
- return this.createWritePromise((0, Commands_1.createBitField)(key, subcommands));
1257
+ return this.createWritePromise((0, _1.createBitField)(key, subcommands));
1236
1258
  }
1237
1259
  /**
1238
1260
  * Reads the array of bits representing the string that is held at `key` based on the specified `subcommands`.
@@ -1252,7 +1274,7 @@ class BaseClient {
1252
1274
  * ```
1253
1275
  */
1254
1276
  async bitfieldReadOnly(key, subcommands) {
1255
- return this.createWritePromise((0, Commands_1.createBitField)(key, subcommands, true));
1277
+ return this.createWritePromise((0, _1.createBitField)(key, subcommands, true));
1256
1278
  }
1257
1279
  /** Retrieve the value associated with `field` in the hash stored at `key`.
1258
1280
  *
@@ -1279,7 +1301,7 @@ class BaseClient {
1279
1301
  * ```
1280
1302
  */
1281
1303
  async hget(key, field, options) {
1282
- return this.createWritePromise((0, Commands_1.createHGet)(key, field), options);
1304
+ return this.createWritePromise((0, _1.createHGet)(key, field), options);
1283
1305
  }
1284
1306
  /** Sets the specified fields to their respective values in the hash stored at `key`.
1285
1307
  *
@@ -1301,7 +1323,7 @@ class BaseClient {
1301
1323
  * ```
1302
1324
  */
1303
1325
  async hset(key, fieldsAndValues) {
1304
- return this.createWritePromise((0, Commands_1.createHSet)(key, (0, Commands_1.convertFieldsAndValuesToHashDataType)(fieldsAndValues)));
1326
+ return this.createWritePromise((0, _1.createHSet)(key, (0, _1.convertFieldsAndValuesToHashDataType)(fieldsAndValues)));
1305
1327
  }
1306
1328
  /**
1307
1329
  * Returns all field names in the hash stored at `key`.
@@ -1321,7 +1343,7 @@ class BaseClient {
1321
1343
  * ```
1322
1344
  */
1323
1345
  async hkeys(key, options) {
1324
- return this.createWritePromise((0, Commands_1.createHKeys)(key), options);
1346
+ return this.createWritePromise((0, _1.createHKeys)(key), options);
1325
1347
  }
1326
1348
  /** Sets `field` in the hash stored at `key` to `value`, only if `field` does not yet exist.
1327
1349
  * If `key` does not exist, a new key holding a hash is created.
@@ -1349,7 +1371,7 @@ class BaseClient {
1349
1371
  * ```
1350
1372
  */
1351
1373
  async hsetnx(key, field, value) {
1352
- return this.createWritePromise((0, Commands_1.createHSetNX)(key, field, value));
1374
+ return this.createWritePromise((0, _1.createHSetNX)(key, field, value));
1353
1375
  }
1354
1376
  /** Removes the specified fields from the hash stored at `key`.
1355
1377
  * Specified fields that do not exist within this hash are ignored.
@@ -1369,7 +1391,7 @@ class BaseClient {
1369
1391
  * ```
1370
1392
  */
1371
1393
  async hdel(key, fields) {
1372
- return this.createWritePromise((0, Commands_1.createHDel)(key, fields));
1394
+ return this.createWritePromise((0, _1.createHDel)(key, fields));
1373
1395
  }
1374
1396
  /** Returns the values associated with the specified fields in the hash stored at `key`.
1375
1397
  *
@@ -1390,7 +1412,7 @@ class BaseClient {
1390
1412
  * ```
1391
1413
  */
1392
1414
  async hmget(key, fields, options) {
1393
- return this.createWritePromise((0, Commands_1.createHMGet)(key, fields), options);
1415
+ return this.createWritePromise((0, _1.createHMGet)(key, fields), options);
1394
1416
  }
1395
1417
  /** Returns if `field` is an existing field in the hash stored at `key`.
1396
1418
  *
@@ -1415,7 +1437,7 @@ class BaseClient {
1415
1437
  * ```
1416
1438
  */
1417
1439
  async hexists(key, field) {
1418
- return this.createWritePromise((0, Commands_1.createHExists)(key, field));
1440
+ return this.createWritePromise((0, _1.createHExists)(key, field));
1419
1441
  }
1420
1442
  /**
1421
1443
  * Returns all fields and values of the hash stored at `key`.
@@ -1439,7 +1461,7 @@ class BaseClient {
1439
1461
  * ```
1440
1462
  */
1441
1463
  async hgetall(key, options) {
1442
- return this.createWritePromise((0, Commands_1.createHGetAll)(key), options).then((res) => res.map((r) => {
1464
+ return this.createWritePromise((0, _1.createHGetAll)(key), options).then((res) => res.map((r) => {
1443
1465
  return { field: r.key, value: r.value };
1444
1466
  }));
1445
1467
  }
@@ -1462,7 +1484,7 @@ class BaseClient {
1462
1484
  * ```
1463
1485
  */
1464
1486
  async hincrBy(key, field, amount) {
1465
- return this.createWritePromise((0, Commands_1.createHIncrBy)(key, field, amount));
1487
+ return this.createWritePromise((0, _1.createHIncrBy)(key, field, amount));
1466
1488
  }
1467
1489
  /** Increment the string representing a floating point number stored at `field` in the hash stored at `key` by increment.
1468
1490
  * By using a negative increment value, the value stored at `field` in the hash stored at `key` is decremented.
@@ -1483,7 +1505,7 @@ class BaseClient {
1483
1505
  * ```
1484
1506
  */
1485
1507
  async hincrByFloat(key, field, amount) {
1486
- return this.createWritePromise((0, Commands_1.createHIncrByFloat)(key, field, amount));
1508
+ return this.createWritePromise((0, _1.createHIncrByFloat)(key, field, amount));
1487
1509
  }
1488
1510
  /** Returns the number of fields contained in the hash stored at `key`.
1489
1511
  *
@@ -1507,7 +1529,7 @@ class BaseClient {
1507
1529
  * ```
1508
1530
  */
1509
1531
  async hlen(key) {
1510
- return this.createWritePromise((0, Commands_1.createHLen)(key));
1532
+ return this.createWritePromise((0, _1.createHLen)(key));
1511
1533
  }
1512
1534
  /** Returns all values in the hash stored at key.
1513
1535
  *
@@ -1525,7 +1547,7 @@ class BaseClient {
1525
1547
  * ```
1526
1548
  */
1527
1549
  async hvals(key, options) {
1528
- return this.createWritePromise((0, Commands_1.createHVals)(key), options);
1550
+ return this.createWritePromise((0, _1.createHVals)(key), options);
1529
1551
  }
1530
1552
  /**
1531
1553
  * Returns the string length of the value associated with `field` in the hash stored at `key`.
@@ -1544,7 +1566,7 @@ class BaseClient {
1544
1566
  * ```
1545
1567
  */
1546
1568
  async hstrlen(key, field) {
1547
- return this.createWritePromise((0, Commands_1.createHStrlen)(key, field));
1569
+ return this.createWritePromise((0, _1.createHStrlen)(key, field));
1548
1570
  }
1549
1571
  /**
1550
1572
  * Returns a random field name from the hash value stored at `key`.
@@ -1563,7 +1585,7 @@ class BaseClient {
1563
1585
  * ```
1564
1586
  */
1565
1587
  async hrandfield(key, options) {
1566
- return this.createWritePromise((0, Commands_1.createHRandField)(key), options);
1588
+ return this.createWritePromise((0, _1.createHRandField)(key), options);
1567
1589
  }
1568
1590
  /**
1569
1591
  * Iterates incrementally over a hash.
@@ -1627,7 +1649,7 @@ class BaseClient {
1627
1649
  * ```
1628
1650
  */
1629
1651
  async hscan(key, cursor, options) {
1630
- return this.createWritePromise((0, Commands_1.createHScan)(key, cursor, options), options).then((res) => [res[0].toString(), res[1]]); // convert cursor back to string
1652
+ return this.createWritePromise((0, _1.createHScan)(key, cursor, options), options).then((res) => [res[0].toString(), res[1]]); // convert cursor back to string
1631
1653
  }
1632
1654
  /**
1633
1655
  * Retrieves up to `count` random field names from the hash value stored at `key`.
@@ -1649,7 +1671,7 @@ class BaseClient {
1649
1671
  * ```
1650
1672
  */
1651
1673
  async hrandfieldCount(key, count, options) {
1652
- return this.createWritePromise((0, Commands_1.createHRandField)(key, count), options);
1674
+ return this.createWritePromise((0, _1.createHRandField)(key, count), options);
1653
1675
  }
1654
1676
  /**
1655
1677
  * Retrieves up to `count` random field names along with their values from the hash
@@ -1674,7 +1696,7 @@ class BaseClient {
1674
1696
  * ```
1675
1697
  */
1676
1698
  async hrandfieldWithValues(key, count, options) {
1677
- return this.createWritePromise((0, Commands_1.createHRandField)(key, count, true), options);
1699
+ return this.createWritePromise((0, _1.createHRandField)(key, count, true), options);
1678
1700
  }
1679
1701
  /** Inserts all the specified values at the head of the list stored at `key`.
1680
1702
  * `elements` are inserted one after the other to the head of the list, from the leftmost element to the rightmost element.
@@ -1701,7 +1723,7 @@ class BaseClient {
1701
1723
  * ```
1702
1724
  */
1703
1725
  async lpush(key, elements) {
1704
- return this.createWritePromise((0, Commands_1.createLPush)(key, elements));
1726
+ return this.createWritePromise((0, _1.createLPush)(key, elements));
1705
1727
  }
1706
1728
  /**
1707
1729
  * Inserts specified values at the head of the `list`, only if `key` already
@@ -1719,7 +1741,7 @@ class BaseClient {
1719
1741
  * ```
1720
1742
  */
1721
1743
  async lpushx(key, elements) {
1722
- return this.createWritePromise((0, Commands_1.createLPushX)(key, elements));
1744
+ return this.createWritePromise((0, _1.createLPushX)(key, elements));
1723
1745
  }
1724
1746
  /** Removes and returns the first elements of the list stored at `key`.
1725
1747
  * The command pops a single element from the beginning of the list.
@@ -1746,7 +1768,7 @@ class BaseClient {
1746
1768
  * ```
1747
1769
  */
1748
1770
  async lpop(key, options) {
1749
- return this.createWritePromise((0, Commands_1.createLPop)(key), options);
1771
+ return this.createWritePromise((0, _1.createLPop)(key), options);
1750
1772
  }
1751
1773
  /** Removes and returns up to `count` elements of the list stored at `key`, depending on the list's length.
1752
1774
  *
@@ -1773,7 +1795,7 @@ class BaseClient {
1773
1795
  * ```
1774
1796
  */
1775
1797
  async lpopCount(key, count, options) {
1776
- return this.createWritePromise((0, Commands_1.createLPop)(key, count), options);
1798
+ return this.createWritePromise((0, _1.createLPop)(key, count), options);
1777
1799
  }
1778
1800
  /** Returns the specified elements of the list stored at `key`.
1779
1801
  * The offsets `start` and `end` are zero-based indexes, with 0 being the first element of the list, 1 being the next element and so on.
@@ -1813,7 +1835,7 @@ class BaseClient {
1813
1835
  * ```
1814
1836
  */
1815
1837
  async lrange(key, start, end, options) {
1816
- return this.createWritePromise((0, Commands_1.createLRange)(key, start, end), options);
1838
+ return this.createWritePromise((0, _1.createLRange)(key, start, end), options);
1817
1839
  }
1818
1840
  /** Returns the length of the list stored at `key`.
1819
1841
  *
@@ -1831,7 +1853,7 @@ class BaseClient {
1831
1853
  * ```
1832
1854
  */
1833
1855
  async llen(key) {
1834
- return this.createWritePromise((0, Commands_1.createLLen)(key));
1856
+ return this.createWritePromise((0, _1.createLLen)(key));
1835
1857
  }
1836
1858
  /**
1837
1859
  * Atomically pops and removes the left/right-most element to the list stored at `source`
@@ -1864,7 +1886,7 @@ class BaseClient {
1864
1886
  * ```
1865
1887
  */
1866
1888
  async lmove(source, destination, whereFrom, whereTo, options) {
1867
- return this.createWritePromise((0, Commands_1.createLMove)(source, destination, whereFrom, whereTo), options);
1889
+ return this.createWritePromise((0, _1.createLMove)(source, destination, whereFrom, whereTo), options);
1868
1890
  }
1869
1891
  /**
1870
1892
  * Blocks the connection until it pops atomically and removes the left/right-most element to the
@@ -1900,7 +1922,7 @@ class BaseClient {
1900
1922
  * ```
1901
1923
  */
1902
1924
  async blmove(source, destination, whereFrom, whereTo, timeout, options) {
1903
- return this.createWritePromise((0, Commands_1.createBLMove)(source, destination, whereFrom, whereTo, timeout), options);
1925
+ return this.createWritePromise((0, _1.createBLMove)(source, destination, whereFrom, whereTo, timeout), options);
1904
1926
  }
1905
1927
  /**
1906
1928
  * Sets the list element at `index` to `element`.
@@ -1923,7 +1945,7 @@ class BaseClient {
1923
1945
  * ```
1924
1946
  */
1925
1947
  async lset(key, index, element) {
1926
- return this.createWritePromise((0, Commands_1.createLSet)(key, index, element), {
1948
+ return this.createWritePromise((0, _1.createLSet)(key, index, element), {
1927
1949
  decoder: Decoder.String,
1928
1950
  });
1929
1951
  }
@@ -1950,7 +1972,7 @@ class BaseClient {
1950
1972
  * ```
1951
1973
  */
1952
1974
  async ltrim(key, start, end) {
1953
- return this.createWritePromise((0, Commands_1.createLTrim)(key, start, end), {
1975
+ return this.createWritePromise((0, _1.createLTrim)(key, start, end), {
1954
1976
  decoder: Decoder.String,
1955
1977
  });
1956
1978
  }
@@ -1973,7 +1995,7 @@ class BaseClient {
1973
1995
  * ```
1974
1996
  */
1975
1997
  async lrem(key, count, element) {
1976
- return this.createWritePromise((0, Commands_1.createLRem)(key, count, element));
1998
+ return this.createWritePromise((0, _1.createLRem)(key, count, element));
1977
1999
  }
1978
2000
  /** Inserts all the specified values at the tail of the list stored at `key`.
1979
2001
  * `elements` are inserted one after the other to the tail of the list, from the leftmost element to the rightmost element.
@@ -2000,7 +2022,7 @@ class BaseClient {
2000
2022
  * ```
2001
2023
  */
2002
2024
  async rpush(key, elements) {
2003
- return this.createWritePromise((0, Commands_1.createRPush)(key, elements));
2025
+ return this.createWritePromise((0, _1.createRPush)(key, elements));
2004
2026
  }
2005
2027
  /**
2006
2028
  * Inserts specified values at the tail of the `list`, only if `key` already
@@ -2018,7 +2040,7 @@ class BaseClient {
2018
2040
  * ```
2019
2041
  * */
2020
2042
  async rpushx(key, elements) {
2021
- return this.createWritePromise((0, Commands_1.createRPushX)(key, elements));
2043
+ return this.createWritePromise((0, _1.createRPushX)(key, elements));
2022
2044
  }
2023
2045
  /** Removes and returns the last elements of the list stored at `key`.
2024
2046
  * The command pops a single element from the end of the list.
@@ -2045,7 +2067,7 @@ class BaseClient {
2045
2067
  * ```
2046
2068
  */
2047
2069
  async rpop(key, options) {
2048
- return this.createWritePromise((0, Commands_1.createRPop)(key), options);
2070
+ return this.createWritePromise((0, _1.createRPop)(key), options);
2049
2071
  }
2050
2072
  /** Removes and returns up to `count` elements from the list stored at `key`, depending on the list's length.
2051
2073
  *
@@ -2072,7 +2094,7 @@ class BaseClient {
2072
2094
  * ```
2073
2095
  */
2074
2096
  async rpopCount(key, count, options) {
2075
- return this.createWritePromise((0, Commands_1.createRPop)(key, count), options);
2097
+ return this.createWritePromise((0, _1.createRPop)(key, count), options);
2076
2098
  }
2077
2099
  /** Adds the specified members to the set stored at `key`. Specified members that are already a member of this set are ignored.
2078
2100
  * If `key` does not exist, a new set is created before adding `members`.
@@ -2091,7 +2113,7 @@ class BaseClient {
2091
2113
  * ```
2092
2114
  */
2093
2115
  async sadd(key, members) {
2094
- return this.createWritePromise((0, Commands_1.createSAdd)(key, members));
2116
+ return this.createWritePromise((0, _1.createSAdd)(key, members));
2095
2117
  }
2096
2118
  /** Removes the specified members from the set stored at `key`. Specified members that are not a member of this set are ignored.
2097
2119
  *
@@ -2110,7 +2132,7 @@ class BaseClient {
2110
2132
  * ```
2111
2133
  */
2112
2134
  async srem(key, members) {
2113
- return this.createWritePromise((0, Commands_1.createSRem)(key, members));
2135
+ return this.createWritePromise((0, _1.createSRem)(key, members));
2114
2136
  }
2115
2137
  /**
2116
2138
  * Iterates incrementally over a set.
@@ -2149,7 +2171,7 @@ class BaseClient {
2149
2171
  * ```
2150
2172
  */
2151
2173
  async sscan(key, cursor, options) {
2152
- return this.createWritePromise((0, Commands_1.createSScan)(key, cursor, options), options);
2174
+ return this.createWritePromise((0, _1.createSScan)(key, cursor, options), options);
2153
2175
  }
2154
2176
  /** Returns all the members of the set value stored at `key`.
2155
2177
  *
@@ -2168,7 +2190,7 @@ class BaseClient {
2168
2190
  * ```
2169
2191
  */
2170
2192
  async smembers(key, options) {
2171
- return this.createWritePromise((0, Commands_1.createSMembers)(key), options).then((smembers) => new Set(smembers));
2193
+ return this.createWritePromise((0, _1.createSMembers)(key), options).then((smembers) => new Set(smembers));
2172
2194
  }
2173
2195
  /** Moves `member` from the set at `source` to the set at `destination`, removing it from the source set.
2174
2196
  * Creates a new destination set if needed. The operation is atomic.
@@ -2188,7 +2210,7 @@ class BaseClient {
2188
2210
  * ```
2189
2211
  */
2190
2212
  async smove(source, destination, member) {
2191
- return this.createWritePromise((0, Commands_1.createSMove)(source, destination, member));
2213
+ return this.createWritePromise((0, _1.createSMove)(source, destination, member));
2192
2214
  }
2193
2215
  /** Returns the set cardinality (number of elements) of the set stored at `key`.
2194
2216
  *
@@ -2205,7 +2227,7 @@ class BaseClient {
2205
2227
  * ```
2206
2228
  */
2207
2229
  async scard(key) {
2208
- return this.createWritePromise((0, Commands_1.createSCard)(key));
2230
+ return this.createWritePromise((0, _1.createSCard)(key));
2209
2231
  }
2210
2232
  /** Gets the intersection of all the given sets.
2211
2233
  *
@@ -2232,7 +2254,7 @@ class BaseClient {
2232
2254
  * ```
2233
2255
  */
2234
2256
  async sinter(keys, options) {
2235
- return this.createWritePromise((0, Commands_1.createSInter)(keys), options).then((sinter) => new Set(sinter));
2257
+ return this.createWritePromise((0, _1.createSInter)(keys), options).then((sinter) => new Set(sinter));
2236
2258
  }
2237
2259
  /**
2238
2260
  * Gets the cardinality of the intersection of all the given sets.
@@ -2258,7 +2280,7 @@ class BaseClient {
2258
2280
  * ```
2259
2281
  */
2260
2282
  async sintercard(keys, options) {
2261
- return this.createWritePromise((0, Commands_1.createSInterCard)(keys, options?.limit));
2283
+ return this.createWritePromise((0, _1.createSInterCard)(keys, options?.limit));
2262
2284
  }
2263
2285
  /**
2264
2286
  * Stores the members of the intersection of all given sets specified by `keys` into a new set at `destination`.
@@ -2277,7 +2299,7 @@ class BaseClient {
2277
2299
  * ```
2278
2300
  */
2279
2301
  async sinterstore(destination, keys) {
2280
- return this.createWritePromise((0, Commands_1.createSInterStore)(destination, keys));
2302
+ return this.createWritePromise((0, _1.createSInterStore)(destination, keys));
2281
2303
  }
2282
2304
  /**
2283
2305
  * Computes the difference between the first set and all the successive sets in `keys`.
@@ -2299,7 +2321,7 @@ class BaseClient {
2299
2321
  * ```
2300
2322
  */
2301
2323
  async sdiff(keys, options) {
2302
- return this.createWritePromise((0, Commands_1.createSDiff)(keys), options).then((sdiff) => new Set(sdiff));
2324
+ return this.createWritePromise((0, _1.createSDiff)(keys), options).then((sdiff) => new Set(sdiff));
2303
2325
  }
2304
2326
  /**
2305
2327
  * Stores the difference between the first set and all the successive sets in `keys` into a new set at `destination`.
@@ -2320,7 +2342,7 @@ class BaseClient {
2320
2342
  * ```
2321
2343
  */
2322
2344
  async sdiffstore(destination, keys) {
2323
- return this.createWritePromise((0, Commands_1.createSDiffStore)(destination, keys));
2345
+ return this.createWritePromise((0, _1.createSDiffStore)(destination, keys));
2324
2346
  }
2325
2347
  /**
2326
2348
  * Gets the union of all the given sets.
@@ -2345,7 +2367,7 @@ class BaseClient {
2345
2367
  * ```
2346
2368
  */
2347
2369
  async sunion(keys, options) {
2348
- return this.createWritePromise((0, Commands_1.createSUnion)(keys), options).then((sunion) => new Set(sunion));
2370
+ return this.createWritePromise((0, _1.createSUnion)(keys), options).then((sunion) => new Set(sunion));
2349
2371
  }
2350
2372
  /**
2351
2373
  * Stores the members of the union of all given sets specified by `keys` into a new set
@@ -2365,7 +2387,7 @@ class BaseClient {
2365
2387
  * ```
2366
2388
  */
2367
2389
  async sunionstore(destination, keys) {
2368
- return this.createWritePromise((0, Commands_1.createSUnionStore)(destination, keys));
2390
+ return this.createWritePromise((0, _1.createSUnionStore)(destination, keys));
2369
2391
  }
2370
2392
  /** Returns if `member` is a member of the set stored at `key`.
2371
2393
  *
@@ -2391,7 +2413,7 @@ class BaseClient {
2391
2413
  * ```
2392
2414
  */
2393
2415
  async sismember(key, member) {
2394
- return this.createWritePromise((0, Commands_1.createSIsMember)(key, member));
2416
+ return this.createWritePromise((0, _1.createSIsMember)(key, member));
2395
2417
  }
2396
2418
  /**
2397
2419
  * Checks whether each member is contained in the members of the set stored at `key`.
@@ -2411,7 +2433,7 @@ class BaseClient {
2411
2433
  * ```
2412
2434
  */
2413
2435
  async smismember(key, members) {
2414
- return this.createWritePromise((0, Commands_1.createSMIsMember)(key, members));
2436
+ return this.createWritePromise((0, _1.createSMIsMember)(key, members));
2415
2437
  }
2416
2438
  /** Removes and returns one random member from the set value store at `key`.
2417
2439
  * To pop multiple members, see {@link spopCount}.
@@ -2438,7 +2460,7 @@ class BaseClient {
2438
2460
  * ```
2439
2461
  */
2440
2462
  async spop(key, options) {
2441
- return this.createWritePromise((0, Commands_1.createSPop)(key), options);
2463
+ return this.createWritePromise((0, _1.createSPop)(key), options);
2442
2464
  }
2443
2465
  /** Removes and returns up to `count` random members from the set value store at `key`, depending on the set's length.
2444
2466
  *
@@ -2465,7 +2487,7 @@ class BaseClient {
2465
2487
  * ```
2466
2488
  */
2467
2489
  async spopCount(key, count, options) {
2468
- return this.createWritePromise((0, Commands_1.createSPop)(key, count), options).then((spop) => new Set(spop));
2490
+ return this.createWritePromise((0, _1.createSPop)(key, count), options).then((spop) => new Set(spop));
2469
2491
  }
2470
2492
  /**
2471
2493
  * Returns a random element from the set value stored at `key`.
@@ -2491,7 +2513,7 @@ class BaseClient {
2491
2513
  * ```
2492
2514
  */
2493
2515
  async srandmember(key, options) {
2494
- return this.createWritePromise((0, Commands_1.createSRandMember)(key), options);
2516
+ return this.createWritePromise((0, _1.createSRandMember)(key), options);
2495
2517
  }
2496
2518
  /**
2497
2519
  * Returns one or more random elements from the set value stored at `key`.
@@ -2520,7 +2542,7 @@ class BaseClient {
2520
2542
  * ```
2521
2543
  */
2522
2544
  async srandmemberCount(key, count, options) {
2523
- return this.createWritePromise((0, Commands_1.createSRandMember)(key, count), options);
2545
+ return this.createWritePromise((0, _1.createSRandMember)(key, count), options);
2524
2546
  }
2525
2547
  /**
2526
2548
  * Returns the number of keys in `keys` that exist in the database.
@@ -2547,7 +2569,7 @@ class BaseClient {
2547
2569
  * ```
2548
2570
  */
2549
2571
  async exists(keys) {
2550
- return this.createWritePromise((0, Commands_1.createExists)(keys));
2572
+ return this.createWritePromise((0, _1.createExists)(keys));
2551
2573
  }
2552
2574
  /**
2553
2575
  * Removes the specified keys. A key is ignored if it does not exist.
@@ -2575,7 +2597,7 @@ class BaseClient {
2575
2597
  * ```
2576
2598
  */
2577
2599
  async unlink(keys) {
2578
- return this.createWritePromise((0, Commands_1.createUnlink)(keys));
2600
+ return this.createWritePromise((0, _1.createUnlink)(keys));
2579
2601
  }
2580
2602
  /**
2581
2603
  * Sets a timeout on `key` in seconds. After the timeout has expired, the key will automatically be deleted.
@@ -2607,7 +2629,7 @@ class BaseClient {
2607
2629
  * ```
2608
2630
  */
2609
2631
  async expire(key, seconds, options) {
2610
- return this.createWritePromise((0, Commands_1.createExpire)(key, seconds, options?.expireOption));
2632
+ return this.createWritePromise((0, _1.createExpire)(key, seconds, options?.expireOption));
2611
2633
  }
2612
2634
  /**
2613
2635
  * Sets a timeout on `key`. It takes an absolute Unix timestamp (seconds since January 1, 1970) instead of specifying the number of seconds.
@@ -2632,7 +2654,7 @@ class BaseClient {
2632
2654
  * ```
2633
2655
  */
2634
2656
  async expireAt(key, unixSeconds, options) {
2635
- return this.createWritePromise((0, Commands_1.createExpireAt)(key, unixSeconds, options?.expireOption));
2657
+ return this.createWritePromise((0, _1.createExpireAt)(key, unixSeconds, options?.expireOption));
2636
2658
  }
2637
2659
  /**
2638
2660
  * Returns the absolute Unix timestamp (since January 1, 1970) at which the given `key` will expire, in seconds.
@@ -2659,7 +2681,7 @@ class BaseClient {
2659
2681
  * ```
2660
2682
  */
2661
2683
  async expiretime(key) {
2662
- return this.createWritePromise((0, Commands_1.createExpireTime)(key));
2684
+ return this.createWritePromise((0, _1.createExpireTime)(key));
2663
2685
  }
2664
2686
  /**
2665
2687
  * Sets a timeout on `key` in milliseconds. After the timeout has expired, the key will automatically be deleted.
@@ -2684,7 +2706,7 @@ class BaseClient {
2684
2706
  * ```
2685
2707
  */
2686
2708
  async pexpire(key, milliseconds, options) {
2687
- return this.createWritePromise((0, Commands_1.createPExpire)(key, milliseconds, options?.expireOption));
2709
+ return this.createWritePromise((0, _1.createPExpire)(key, milliseconds, options?.expireOption));
2688
2710
  }
2689
2711
  /**
2690
2712
  * Sets a timeout on `key`. It takes an absolute Unix timestamp (milliseconds since January 1, 1970) instead of specifying the number of milliseconds.
@@ -2709,7 +2731,7 @@ class BaseClient {
2709
2731
  * ```
2710
2732
  */
2711
2733
  async pexpireAt(key, unixMilliseconds, options) {
2712
- return this.createWritePromise((0, Commands_1.createPExpireAt)(key, unixMilliseconds, options?.expireOption));
2734
+ return this.createWritePromise((0, _1.createPExpireAt)(key, unixMilliseconds, options?.expireOption));
2713
2735
  }
2714
2736
  /**
2715
2737
  * Returns the absolute Unix timestamp (since January 1, 1970) at which the given `key` will expire, in milliseconds.
@@ -2735,7 +2757,7 @@ class BaseClient {
2735
2757
  * ```
2736
2758
  */
2737
2759
  async pexpiretime(key) {
2738
- return this.createWritePromise((0, Commands_1.createPExpireTime)(key));
2760
+ return this.createWritePromise((0, _1.createPExpireTime)(key));
2739
2761
  }
2740
2762
  /**
2741
2763
  * Returns the remaining time to live of `key` that has a timeout.
@@ -2767,7 +2789,7 @@ class BaseClient {
2767
2789
  * ```
2768
2790
  */
2769
2791
  async ttl(key) {
2770
- return this.createWritePromise((0, Commands_1.createTTL)(key));
2792
+ return this.createWritePromise((0, _1.createTTL)(key));
2771
2793
  }
2772
2794
  /**
2773
2795
  * Invokes a Lua script with its keys and arguments.
@@ -2823,7 +2845,7 @@ class BaseClient {
2823
2845
  * ```
2824
2846
  */
2825
2847
  async scriptShow(sha1, options) {
2826
- return this.createWritePromise((0, Commands_1.createScriptShow)(sha1), options);
2848
+ return this.createWritePromise((0, _1.createScriptShow)(sha1), options);
2827
2849
  }
2828
2850
  /**
2829
2851
  * Returns stream entries matching a given range of entry IDs.
@@ -2858,7 +2880,7 @@ class BaseClient {
2858
2880
  * ```
2859
2881
  */
2860
2882
  async xrange(key, start, end, options) {
2861
- return this.createWritePromise((0, Commands_1.createXRange)(key, start, end, options?.count), options).then((res) => (res === null ? null : convertGlideRecordToRecord(res)));
2883
+ return this.createWritePromise((0, _1.createXRange)(key, start, end, options?.count), options).then((res) => (res === null ? null : convertGlideRecordToRecord(res)));
2862
2884
  }
2863
2885
  /**
2864
2886
  * Returns stream entries matching a given range of entry IDs in reverse order. Equivalent to {@link xrange} but returns the
@@ -2894,7 +2916,7 @@ class BaseClient {
2894
2916
  * ```
2895
2917
  */
2896
2918
  async xrevrange(key, end, start, options) {
2897
- return this.createWritePromise((0, Commands_1.createXRevRange)(key, end, start, options?.count), options).then((res) => res === null ? null : convertGlideRecordToRecord(res));
2919
+ return this.createWritePromise((0, _1.createXRevRange)(key, end, start, options?.count), options).then((res) => res === null ? null : convertGlideRecordToRecord(res));
2898
2920
  }
2899
2921
  /**
2900
2922
  * Adds members with their scores to the sorted set stored at `key`.
@@ -2925,7 +2947,7 @@ class BaseClient {
2925
2947
  * ```
2926
2948
  */
2927
2949
  async zadd(key, membersAndScores, options) {
2928
- return this.createWritePromise((0, Commands_1.createZAdd)(key, membersAndScores, options));
2950
+ return this.createWritePromise((0, _1.createZAdd)(key, membersAndScores, options));
2929
2951
  }
2930
2952
  /**
2931
2953
  * Increments the score of member in the sorted set stored at `key` by `increment`.
@@ -2956,7 +2978,7 @@ class BaseClient {
2956
2978
  * ```
2957
2979
  */
2958
2980
  async zaddIncr(key, member, increment, options) {
2959
- return this.createWritePromise((0, Commands_1.createZAdd)(key, [{ element: member, score: increment }], options, true));
2981
+ return this.createWritePromise((0, _1.createZAdd)(key, [{ element: member, score: increment }], options, true));
2960
2982
  }
2961
2983
  /**
2962
2984
  * Removes the specified members from the sorted set stored at `key`.
@@ -2984,7 +3006,7 @@ class BaseClient {
2984
3006
  * ```
2985
3007
  */
2986
3008
  async zrem(key, members) {
2987
- return this.createWritePromise((0, Commands_1.createZRem)(key, members));
3009
+ return this.createWritePromise((0, _1.createZRem)(key, members));
2988
3010
  }
2989
3011
  /**
2990
3012
  * Returns the cardinality (number of elements) of the sorted set stored at `key`.
@@ -3010,7 +3032,7 @@ class BaseClient {
3010
3032
  * ```
3011
3033
  */
3012
3034
  async zcard(key) {
3013
- return this.createWritePromise((0, Commands_1.createZCard)(key));
3035
+ return this.createWritePromise((0, _1.createZCard)(key));
3014
3036
  }
3015
3037
  /**
3016
3038
  * Returns the cardinality of the intersection of the sorted sets specified by `keys`.
@@ -3031,7 +3053,7 @@ class BaseClient {
3031
3053
  * ```
3032
3054
  */
3033
3055
  async zintercard(keys, options) {
3034
- return this.createWritePromise((0, Commands_1.createZInterCard)(keys, options?.limit));
3056
+ return this.createWritePromise((0, _1.createZInterCard)(keys, options?.limit));
3035
3057
  }
3036
3058
  /**
3037
3059
  * Returns the difference between the first sorted set and all the successive sorted sets.
@@ -3056,7 +3078,7 @@ class BaseClient {
3056
3078
  * ```
3057
3079
  */
3058
3080
  async zdiff(keys, options) {
3059
- return this.createWritePromise((0, Commands_1.createZDiff)(keys), options);
3081
+ return this.createWritePromise((0, _1.createZDiff)(keys), options);
3060
3082
  }
3061
3083
  /**
3062
3084
  * Returns the difference between the first sorted set and all the successive sorted sets, with the associated
@@ -3082,7 +3104,7 @@ class BaseClient {
3082
3104
  * ```
3083
3105
  */
3084
3106
  async zdiffWithScores(keys, options) {
3085
- return this.createWritePromise((0, Commands_1.createZDiffWithScores)(keys), options).then(convertGlideRecordForSortedSet);
3107
+ return this.createWritePromise((0, _1.createZDiffWithScores)(keys), options).then(convertGlideRecordForSortedSet);
3086
3108
  }
3087
3109
  /**
3088
3110
  * Calculates the difference between the first sorted set and all the successive sorted sets in `keys` and stores
@@ -3109,7 +3131,7 @@ class BaseClient {
3109
3131
  * ```
3110
3132
  */
3111
3133
  async zdiffstore(destination, keys) {
3112
- return this.createWritePromise((0, Commands_1.createZDiffStore)(destination, keys));
3134
+ return this.createWritePromise((0, _1.createZDiffStore)(destination, keys));
3113
3135
  }
3114
3136
  /**
3115
3137
  * Returns the score of `member` in the sorted set stored at `key`.
@@ -3144,7 +3166,7 @@ class BaseClient {
3144
3166
  * ```
3145
3167
  */
3146
3168
  async zscore(key, member) {
3147
- return this.createWritePromise((0, Commands_1.createZScore)(key, member));
3169
+ return this.createWritePromise((0, _1.createZScore)(key, member));
3148
3170
  }
3149
3171
  /**
3150
3172
  * Computes the union of sorted sets given by the specified `keys` and stores the result in `destination`.
@@ -3192,7 +3214,7 @@ class BaseClient {
3192
3214
  * ```
3193
3215
  */
3194
3216
  async zunionstore(destination, keys, options) {
3195
- return this.createWritePromise((0, Commands_1.createZUnionStore)(destination, keys, options?.aggregationType));
3217
+ return this.createWritePromise((0, _1.createZUnionStore)(destination, keys, options?.aggregationType));
3196
3218
  }
3197
3219
  /**
3198
3220
  * Returns the scores associated with the specified `members` in the sorted set stored at `key`.
@@ -3212,7 +3234,7 @@ class BaseClient {
3212
3234
  * ```
3213
3235
  */
3214
3236
  async zmscore(key, members) {
3215
- return this.createWritePromise((0, Commands_1.createZMScore)(key, members));
3237
+ return this.createWritePromise((0, _1.createZMScore)(key, members));
3216
3238
  }
3217
3239
  /**
3218
3240
  * Returns the number of members in the sorted set stored at `key` with scores between `minScore` and `maxScore`.
@@ -3241,7 +3263,7 @@ class BaseClient {
3241
3263
  * ```
3242
3264
  */
3243
3265
  async zcount(key, minScore, maxScore) {
3244
- return this.createWritePromise((0, Commands_1.createZCount)(key, minScore, maxScore));
3266
+ return this.createWritePromise((0, _1.createZCount)(key, minScore, maxScore));
3245
3267
  }
3246
3268
  /**
3247
3269
  * Returns the specified range of elements in the sorted set stored at `key`.
@@ -3282,7 +3304,7 @@ class BaseClient {
3282
3304
  * ```
3283
3305
  */
3284
3306
  async zrange(key, rangeQuery, options) {
3285
- return this.createWritePromise((0, Commands_1.createZRange)(key, rangeQuery, options?.reverse), options);
3307
+ return this.createWritePromise((0, _1.createZRange)(key, rangeQuery, options?.reverse), options);
3286
3308
  }
3287
3309
  /**
3288
3310
  * Returns the specified range of elements with their scores in the sorted set stored at `key`.
@@ -3324,7 +3346,7 @@ class BaseClient {
3324
3346
  * ```
3325
3347
  */
3326
3348
  async zrangeWithScores(key, rangeQuery, options) {
3327
- return this.createWritePromise((0, Commands_1.createZRangeWithScores)(key, rangeQuery, options?.reverse), options).then(convertGlideRecordForSortedSet);
3349
+ return this.createWritePromise((0, _1.createZRangeWithScores)(key, rangeQuery, options?.reverse), options).then(convertGlideRecordForSortedSet);
3328
3350
  }
3329
3351
  /**
3330
3352
  * Stores a specified range of elements from the sorted set at `source`, into a new
@@ -3362,7 +3384,7 @@ class BaseClient {
3362
3384
  * ```
3363
3385
  */
3364
3386
  async zrangeStore(destination, source, rangeQuery, reverse = false) {
3365
- return this.createWritePromise((0, Commands_1.createZRangeStore)(destination, source, rangeQuery, reverse));
3387
+ return this.createWritePromise((0, _1.createZRangeStore)(destination, source, rangeQuery, reverse));
3366
3388
  }
3367
3389
  /**
3368
3390
  * Computes the intersection of sorted sets given by the specified `keys` and stores the result in `destination`.
@@ -3400,7 +3422,7 @@ class BaseClient {
3400
3422
  * ```
3401
3423
  */
3402
3424
  async zinterstore(destination, keys, options) {
3403
- return this.createWritePromise((0, Commands_1.createZInterstore)(destination, keys, options?.aggregationType));
3425
+ return this.createWritePromise((0, _1.createZInterstore)(destination, keys, options?.aggregationType));
3404
3426
  }
3405
3427
  /**
3406
3428
  * Computes the intersection of sorted sets given by the specified `keys` and returns a list of intersecting elements.
@@ -3426,7 +3448,7 @@ class BaseClient {
3426
3448
  * ```
3427
3449
  */
3428
3450
  async zinter(keys, options) {
3429
- return this.createWritePromise((0, Commands_1.createZInter)(keys), options);
3451
+ return this.createWritePromise((0, _1.createZInter)(keys), options);
3430
3452
  }
3431
3453
  /**
3432
3454
  * Computes the intersection of sorted sets given by the specified `keys` and returns a list of intersecting elements with scores.
@@ -3462,7 +3484,7 @@ class BaseClient {
3462
3484
  * ```
3463
3485
  */
3464
3486
  async zinterWithScores(keys, options) {
3465
- return this.createWritePromise((0, Commands_1.createZInter)(keys, options?.aggregationType, true), options).then(convertGlideRecordForSortedSet);
3487
+ return this.createWritePromise((0, _1.createZInter)(keys, options?.aggregationType, true), options).then(convertGlideRecordForSortedSet);
3466
3488
  }
3467
3489
  /**
3468
3490
  * Computes the union of sorted sets given by the specified `keys` and returns a list of union elements.
@@ -3487,7 +3509,7 @@ class BaseClient {
3487
3509
  * ```
3488
3510
  */
3489
3511
  async zunion(keys, options) {
3490
- return this.createWritePromise((0, Commands_1.createZUnion)(keys), options);
3512
+ return this.createWritePromise((0, _1.createZUnion)(keys), options);
3491
3513
  }
3492
3514
  /**
3493
3515
  * Computes the intersection of sorted sets given by the specified `keys` and returns a list of union elements with scores.
@@ -3521,7 +3543,7 @@ class BaseClient {
3521
3543
  * ```
3522
3544
  */
3523
3545
  async zunionWithScores(keys, options) {
3524
- return this.createWritePromise((0, Commands_1.createZUnion)(keys, options?.aggregationType, true), options).then(convertGlideRecordForSortedSet);
3546
+ return this.createWritePromise((0, _1.createZUnion)(keys, options?.aggregationType, true), options).then(convertGlideRecordForSortedSet);
3525
3547
  }
3526
3548
  /**
3527
3549
  * Returns a random member from the sorted set stored at `key`.
@@ -3546,7 +3568,7 @@ class BaseClient {
3546
3568
  * ```
3547
3569
  */
3548
3570
  async zrandmember(key, options) {
3549
- return this.createWritePromise((0, Commands_1.createZRandMember)(key), options);
3571
+ return this.createWritePromise((0, _1.createZRandMember)(key), options);
3550
3572
  }
3551
3573
  /**
3552
3574
  * Returns random members from the sorted set stored at `key`.
@@ -3574,7 +3596,7 @@ class BaseClient {
3574
3596
  * ```
3575
3597
  */
3576
3598
  async zrandmemberWithCount(key, count, options) {
3577
- return this.createWritePromise((0, Commands_1.createZRandMember)(key, count), options);
3599
+ return this.createWritePromise((0, _1.createZRandMember)(key, count), options);
3578
3600
  }
3579
3601
  /**
3580
3602
  * Returns random members with scores from the sorted set stored at `key`.
@@ -3602,7 +3624,7 @@ class BaseClient {
3602
3624
  * ```
3603
3625
  */
3604
3626
  async zrandmemberWithCountWithScores(key, count, options) {
3605
- return this.createWritePromise((0, Commands_1.createZRandMember)(key, count, true), options);
3627
+ return this.createWritePromise((0, _1.createZRandMember)(key, count, true), options);
3606
3628
  }
3607
3629
  /**
3608
3630
  * Returns the length of the string value stored at `key`.
@@ -3629,7 +3651,7 @@ class BaseClient {
3629
3651
  * ```
3630
3652
  */
3631
3653
  async strlen(key) {
3632
- return this.createWritePromise((0, Commands_1.createStrlen)(key));
3654
+ return this.createWritePromise((0, _1.createStrlen)(key));
3633
3655
  }
3634
3656
  /**
3635
3657
  * Returns the string representation of the type of the value stored at `key`.
@@ -3656,7 +3678,7 @@ class BaseClient {
3656
3678
  * ```
3657
3679
  */
3658
3680
  async type(key) {
3659
- return this.createWritePromise((0, Commands_1.createType)(key), {
3681
+ return this.createWritePromise((0, _1.createType)(key), {
3660
3682
  decoder: Decoder.String,
3661
3683
  });
3662
3684
  }
@@ -3697,7 +3719,7 @@ class BaseClient {
3697
3719
  * ```
3698
3720
  */
3699
3721
  async zpopmin(key, options) {
3700
- return this.createWritePromise((0, Commands_1.createZPopMin)(key, options?.count), options).then(convertGlideRecordForSortedSet);
3722
+ return this.createWritePromise((0, _1.createZPopMin)(key, options?.count), options).then(convertGlideRecordForSortedSet);
3701
3723
  }
3702
3724
  /**
3703
3725
  * Blocks the connection until it removes and returns a member with the lowest score from the
@@ -3722,7 +3744,7 @@ class BaseClient {
3722
3744
  * ```
3723
3745
  */
3724
3746
  async bzpopmin(keys, timeout, options) {
3725
- return this.createWritePromise((0, Commands_1.createBZPopMin)(keys, timeout), options);
3747
+ return this.createWritePromise((0, _1.createBZPopMin)(keys, timeout), options);
3726
3748
  }
3727
3749
  /**
3728
3750
  * Removes and returns the members with the highest scores from the sorted set stored at `key`.
@@ -3761,7 +3783,7 @@ class BaseClient {
3761
3783
  * ```
3762
3784
  */
3763
3785
  async zpopmax(key, options) {
3764
- return this.createWritePromise((0, Commands_1.createZPopMax)(key, options?.count), options).then(convertGlideRecordForSortedSet);
3786
+ return this.createWritePromise((0, _1.createZPopMax)(key, options?.count), options).then(convertGlideRecordForSortedSet);
3765
3787
  }
3766
3788
  /**
3767
3789
  * Blocks the connection until it removes and returns a member with the highest score from the
@@ -3786,7 +3808,7 @@ class BaseClient {
3786
3808
  * ```
3787
3809
  */
3788
3810
  async bzpopmax(keys, timeout, options) {
3789
- return this.createWritePromise((0, Commands_1.createBZPopMax)(keys, timeout), options);
3811
+ return this.createWritePromise((0, _1.createBZPopMax)(keys, timeout), options);
3790
3812
  }
3791
3813
  /**
3792
3814
  * Returns the remaining time to live of `key` that has a timeout, in milliseconds.
@@ -3818,7 +3840,7 @@ class BaseClient {
3818
3840
  * ```
3819
3841
  */
3820
3842
  async pttl(key) {
3821
- return this.createWritePromise((0, Commands_1.createPTTL)(key));
3843
+ return this.createWritePromise((0, _1.createPTTL)(key));
3822
3844
  }
3823
3845
  /**
3824
3846
  * Removes all elements in the sorted set stored at `key` with rank between `start` and `end`.
@@ -3843,7 +3865,7 @@ class BaseClient {
3843
3865
  * ```
3844
3866
  */
3845
3867
  async zremRangeByRank(key, start, end) {
3846
- return this.createWritePromise((0, Commands_1.createZRemRangeByRank)(key, start, end));
3868
+ return this.createWritePromise((0, _1.createZRemRangeByRank)(key, start, end));
3847
3869
  }
3848
3870
  /**
3849
3871
  * Removes all elements in the sorted set stored at `key` with lexicographical order between `minLex` and `maxLex`.
@@ -3872,7 +3894,7 @@ class BaseClient {
3872
3894
  * ```
3873
3895
  */
3874
3896
  async zremRangeByLex(key, minLex, maxLex) {
3875
- return this.createWritePromise((0, Commands_1.createZRemRangeByLex)(key, minLex, maxLex));
3897
+ return this.createWritePromise((0, _1.createZRemRangeByLex)(key, minLex, maxLex));
3876
3898
  }
3877
3899
  /**
3878
3900
  * Removes all elements in the sorted set stored at `key` with a score between `minScore` and `maxScore`.
@@ -3901,7 +3923,7 @@ class BaseClient {
3901
3923
  * ```
3902
3924
  */
3903
3925
  async zremRangeByScore(key, minScore, maxScore) {
3904
- return this.createWritePromise((0, Commands_1.createZRemRangeByScore)(key, minScore, maxScore));
3926
+ return this.createWritePromise((0, _1.createZRemRangeByScore)(key, minScore, maxScore));
3905
3927
  }
3906
3928
  /**
3907
3929
  * Returns the number of members in the sorted set stored at 'key' with scores between 'minLex' and 'maxLex'.
@@ -3928,7 +3950,7 @@ class BaseClient {
3928
3950
  * ```
3929
3951
  */
3930
3952
  async zlexcount(key, minLex, maxLex) {
3931
- return this.createWritePromise((0, Commands_1.createZLexCount)(key, minLex, maxLex));
3953
+ return this.createWritePromise((0, _1.createZLexCount)(key, minLex, maxLex));
3932
3954
  }
3933
3955
  /**
3934
3956
  * Returns the rank of `member` in the sorted set stored at `key`, with scores ordered from low to high.
@@ -3956,7 +3978,7 @@ class BaseClient {
3956
3978
  * ```
3957
3979
  */
3958
3980
  async zrank(key, member) {
3959
- return this.createWritePromise((0, Commands_1.createZRank)(key, member));
3981
+ return this.createWritePromise((0, _1.createZRank)(key, member));
3960
3982
  }
3961
3983
  /**
3962
3984
  * Returns the rank of `member` in the sorted set stored at `key` with its score, where scores are ordered from the lowest to highest.
@@ -3984,7 +4006,7 @@ class BaseClient {
3984
4006
  * ```
3985
4007
  */
3986
4008
  async zrankWithScore(key, member) {
3987
- return this.createWritePromise((0, Commands_1.createZRank)(key, member, true));
4009
+ return this.createWritePromise((0, _1.createZRank)(key, member, true));
3988
4010
  }
3989
4011
  /**
3990
4012
  * Returns the rank of `member` in the sorted set stored at `key`, where
@@ -4005,7 +4027,7 @@ class BaseClient {
4005
4027
  * ```
4006
4028
  */
4007
4029
  async zrevrank(key, member) {
4008
- return this.createWritePromise((0, Commands_1.createZRevRank)(key, member));
4030
+ return this.createWritePromise((0, _1.createZRevRank)(key, member));
4009
4031
  }
4010
4032
  /**
4011
4033
  * Returns the rank of `member` in the sorted set stored at `key` with its
@@ -4027,7 +4049,7 @@ class BaseClient {
4027
4049
  * ```
4028
4050
  */
4029
4051
  async zrevrankWithScore(key, member) {
4030
- return this.createWritePromise((0, Commands_1.createZRevRankWithScore)(key, member));
4052
+ return this.createWritePromise((0, _1.createZRevRankWithScore)(key, member));
4031
4053
  }
4032
4054
  /**
4033
4055
  * Adds an entry to the specified stream stored at `key`. If the `key` doesn't exist, the stream is created.
@@ -4041,7 +4063,7 @@ class BaseClient {
4041
4063
  * @returns The id of the added entry, or `null` if `options.makeStream` is set to `false` and no stream with the matching `key` exists.
4042
4064
  */
4043
4065
  async xadd(key, values, options) {
4044
- return this.createWritePromise((0, Commands_1.createXAdd)(key, values, options), options);
4066
+ return this.createWritePromise((0, _1.createXAdd)(key, values, options), options);
4045
4067
  }
4046
4068
  /**
4047
4069
  * Removes the specified entries by id from a stream, and returns the number of entries deleted.
@@ -4060,7 +4082,7 @@ class BaseClient {
4060
4082
  * ```
4061
4083
  */
4062
4084
  async xdel(key, ids) {
4063
- return this.createWritePromise((0, Commands_1.createXDel)(key, ids));
4085
+ return this.createWritePromise((0, _1.createXDel)(key, ids));
4064
4086
  }
4065
4087
  /**
4066
4088
  * Trims the stream stored at `key` by evicting older entries.
@@ -4072,7 +4094,7 @@ class BaseClient {
4072
4094
  * @returns The number of entries deleted from the stream. If `key` doesn't exist, 0 is returned.
4073
4095
  */
4074
4096
  async xtrim(key, options) {
4075
- return this.createWritePromise((0, Commands_1.createXTrim)(key, options));
4097
+ return this.createWritePromise((0, _1.createXTrim)(key, options));
4076
4098
  }
4077
4099
  /**
4078
4100
  * Reads entries from the given streams.
@@ -4106,7 +4128,7 @@ class BaseClient {
4106
4128
  * ```
4107
4129
  */
4108
4130
  async xread(keys_and_ids, options) {
4109
- return this.createWritePromise((0, Commands_1.createXRead)((0, Commands_1.convertKeysAndEntries)(keys_and_ids), options), options).then((res) => res?.map((k) => {
4131
+ return this.createWritePromise((0, _1.createXRead)((0, _1.convertKeysAndEntries)(keys_and_ids), options), options).then((res) => res?.map((k) => {
4110
4132
  return {
4111
4133
  key: k.key,
4112
4134
  value: convertGlideRecordToRecord(k.value),
@@ -4153,7 +4175,7 @@ class BaseClient {
4153
4175
  * ```
4154
4176
  */
4155
4177
  async xreadgroup(group, consumer, keys_and_ids, options) {
4156
- return this.createWritePromise((0, Commands_1.createXReadGroup)(group, consumer, (0, Commands_1.convertKeysAndEntries)(keys_and_ids), options), options).then((res) => res?.map((k) => {
4178
+ return this.createWritePromise((0, _1.createXReadGroup)(group, consumer, (0, _1.convertKeysAndEntries)(keys_and_ids), options), options).then((res) => res?.map((k) => {
4157
4179
  return {
4158
4180
  key: k.key,
4159
4181
  value: convertGlideRecordToRecord(k.value),
@@ -4175,7 +4197,7 @@ class BaseClient {
4175
4197
  * ```
4176
4198
  */
4177
4199
  async xlen(key) {
4178
- return this.createWritePromise((0, Commands_1.createXLen)(key));
4200
+ return this.createWritePromise((0, _1.createXLen)(key));
4179
4201
  }
4180
4202
  /**
4181
4203
  * Returns stream message summary information for pending messages matching a given range of IDs.
@@ -4200,7 +4222,7 @@ class BaseClient {
4200
4222
  * ```
4201
4223
  */
4202
4224
  async xpending(key, group) {
4203
- return this.createWritePromise((0, Commands_1.createXPending)(key, group));
4225
+ return this.createWritePromise((0, _1.createXPending)(key, group));
4204
4226
  }
4205
4227
  /**
4206
4228
  * Returns an extended form of stream message information for pending messages matching a given range of IDs.
@@ -4237,7 +4259,7 @@ class BaseClient {
4237
4259
  * ```
4238
4260
  */
4239
4261
  async xpendingWithOptions(key, group, options) {
4240
- return this.createWritePromise((0, Commands_1.createXPending)(key, group, options));
4262
+ return this.createWritePromise((0, _1.createXPending)(key, group, options));
4241
4263
  }
4242
4264
  /**
4243
4265
  * Returns the list of all consumers and their attributes for the given consumer group of the
@@ -4267,7 +4289,7 @@ class BaseClient {
4267
4289
  * ```
4268
4290
  */
4269
4291
  async xinfoConsumers(key, group, options) {
4270
- return this.createWritePromise((0, Commands_1.createXInfoConsumers)(key, group), options).then((res) => res.map(convertGlideRecordToRecord));
4292
+ return this.createWritePromise((0, _1.createXInfoConsumers)(key, group), options).then((res) => res.map(convertGlideRecordToRecord));
4271
4293
  }
4272
4294
  /**
4273
4295
  * Returns the list of all consumer groups and their attributes for the stream stored at `key`.
@@ -4303,7 +4325,7 @@ class BaseClient {
4303
4325
  * ```
4304
4326
  */
4305
4327
  async xinfoGroups(key, options) {
4306
- return this.createWritePromise((0, Commands_1.createXInfoGroups)(key), options).then((res) => res.map(convertGlideRecordToRecord));
4328
+ return this.createWritePromise((0, _1.createXInfoGroups)(key), options).then((res) => res.map(convertGlideRecordToRecord));
4307
4329
  }
4308
4330
  /**
4309
4331
  * Changes the ownership of a pending message.
@@ -4329,7 +4351,7 @@ class BaseClient {
4329
4351
  * ```
4330
4352
  */
4331
4353
  async xclaim(key, group, consumer, minIdleTime, ids, options) {
4332
- return this.createWritePromise((0, Commands_1.createXClaim)(key, group, consumer, minIdleTime, ids, options), options).then(convertGlideRecordToRecord);
4354
+ return this.createWritePromise((0, _1.createXClaim)(key, group, consumer, minIdleTime, ids, options), options).then(convertGlideRecordToRecord);
4333
4355
  }
4334
4356
  /**
4335
4357
  * Transfers ownership of pending stream entries that match the specified criteria.
@@ -4376,7 +4398,7 @@ class BaseClient {
4376
4398
  * ```
4377
4399
  */
4378
4400
  async xautoclaim(key, group, consumer, minIdleTime, start, options) {
4379
- return this.createWritePromise((0, Commands_1.createXAutoClaim)(key, group, consumer, minIdleTime, start, options?.count), options).then((res) => res.length === 3
4401
+ return this.createWritePromise((0, _1.createXAutoClaim)(key, group, consumer, minIdleTime, start, options?.count), options).then((res) => res.length === 3
4380
4402
  ? [res[0], convertGlideRecordToRecord(res[1]), res[2]]
4381
4403
  : [res[0], convertGlideRecordToRecord(res[1])]);
4382
4404
  }
@@ -4422,7 +4444,7 @@ class BaseClient {
4422
4444
  * ```
4423
4445
  */
4424
4446
  async xautoclaimJustId(key, group, consumer, minIdleTime, start, options) {
4425
- return this.createWritePromise((0, Commands_1.createXAutoClaim)(key, group, consumer, minIdleTime, start, options?.count, true), { decoder: Decoder.String });
4447
+ return this.createWritePromise((0, _1.createXAutoClaim)(key, group, consumer, minIdleTime, start, options?.count, true), { decoder: Decoder.String });
4426
4448
  }
4427
4449
  /**
4428
4450
  * Changes the ownership of a pending message. This function returns an `array` with
@@ -4446,7 +4468,7 @@ class BaseClient {
4446
4468
  * ```
4447
4469
  */
4448
4470
  async xclaimJustId(key, group, consumer, minIdleTime, ids, options) {
4449
- return this.createWritePromise((0, Commands_1.createXClaim)(key, group, consumer, minIdleTime, ids, options, true), { decoder: Decoder.String });
4471
+ return this.createWritePromise((0, _1.createXClaim)(key, group, consumer, minIdleTime, ids, options, true), { decoder: Decoder.String });
4450
4472
  }
4451
4473
  /**
4452
4474
  * Creates a new consumer group uniquely identified by `groupname` for the stream stored at `key`.
@@ -4466,7 +4488,7 @@ class BaseClient {
4466
4488
  * ```
4467
4489
  */
4468
4490
  async xgroupCreate(key, groupName, id, options) {
4469
- return this.createWritePromise((0, Commands_1.createXGroupCreate)(key, groupName, id, options), { decoder: Decoder.String });
4491
+ return this.createWritePromise((0, _1.createXGroupCreate)(key, groupName, id, options), { decoder: Decoder.String });
4470
4492
  }
4471
4493
  /**
4472
4494
  * Destroys the consumer group `groupname` for the stream stored at `key`.
@@ -4484,7 +4506,7 @@ class BaseClient {
4484
4506
  * ```
4485
4507
  */
4486
4508
  async xgroupDestroy(key, groupName) {
4487
- return this.createWritePromise((0, Commands_1.createXGroupDestroy)(key, groupName));
4509
+ return this.createWritePromise((0, _1.createXGroupDestroy)(key, groupName));
4488
4510
  }
4489
4511
  /**
4490
4512
  * Returns information about the stream stored at `key`.
@@ -4553,7 +4575,7 @@ class BaseClient {
4553
4575
  * ```
4554
4576
  */
4555
4577
  async xinfoStream(key, options) {
4556
- return this.createWritePromise((0, Commands_1.createXInfoStream)(key, options?.fullOptions ?? false), options).then((xinfoStream) => convertGlideRecordToRecord(xinfoStream));
4578
+ return this.createWritePromise((0, _1.createXInfoStream)(key, options?.fullOptions ?? false), options).then((xinfoStream) => convertGlideRecordToRecord(xinfoStream));
4557
4579
  }
4558
4580
  /**
4559
4581
  * Creates a consumer named `consumerName` in the consumer group `groupName` for the stream stored at `key`.
@@ -4572,7 +4594,7 @@ class BaseClient {
4572
4594
  * ```
4573
4595
  */
4574
4596
  async xgroupCreateConsumer(key, groupName, consumerName) {
4575
- return this.createWritePromise((0, Commands_1.createXGroupCreateConsumer)(key, groupName, consumerName));
4597
+ return this.createWritePromise((0, _1.createXGroupCreateConsumer)(key, groupName, consumerName));
4576
4598
  }
4577
4599
  /**
4578
4600
  * Deletes a consumer named `consumerName` in the consumer group `groupName` for the stream stored at `key`.
@@ -4591,7 +4613,7 @@ class BaseClient {
4591
4613
  * ```
4592
4614
  */
4593
4615
  async xgroupDelConsumer(key, groupName, consumerName) {
4594
- return this.createWritePromise((0, Commands_1.createXGroupDelConsumer)(key, groupName, consumerName));
4616
+ return this.createWritePromise((0, _1.createXGroupDelConsumer)(key, groupName, consumerName));
4595
4617
  }
4596
4618
  /**
4597
4619
  * Returns the number of messages that were successfully acknowledged by the consumer group member of a stream.
@@ -4614,7 +4636,7 @@ class BaseClient {
4614
4636
  * ```
4615
4637
  */
4616
4638
  async xack(key, group, ids) {
4617
- return this.createWritePromise((0, Commands_1.createXAck)(key, group, ids));
4639
+ return this.createWritePromise((0, _1.createXAck)(key, group, ids));
4618
4640
  }
4619
4641
  /**
4620
4642
  * Sets the last delivered ID for a consumer group.
@@ -4635,7 +4657,7 @@ class BaseClient {
4635
4657
  * ```
4636
4658
  */
4637
4659
  async xgroupSetId(key, groupName, id, options) {
4638
- return this.createWritePromise((0, Commands_1.createXGroupSetid)(key, groupName, id, options?.entriesRead), { decoder: Decoder.String });
4660
+ return this.createWritePromise((0, _1.createXGroupSetid)(key, groupName, id, options?.entriesRead), { decoder: Decoder.String });
4639
4661
  }
4640
4662
  /** Returns the element at index `index` in the list stored at `key`.
4641
4663
  * The index is zero-based, so 0 means the first element, 1 the second element and so on.
@@ -4665,7 +4687,7 @@ class BaseClient {
4665
4687
  * ```
4666
4688
  */
4667
4689
  async lindex(key, index, options) {
4668
- return this.createWritePromise((0, Commands_1.createLIndex)(key, index), options);
4690
+ return this.createWritePromise((0, _1.createLIndex)(key, index), options);
4669
4691
  }
4670
4692
  /**
4671
4693
  * Inserts `element` in the list at `key` either before or after the `pivot`.
@@ -4688,7 +4710,7 @@ class BaseClient {
4688
4710
  * ```
4689
4711
  */
4690
4712
  async linsert(key, position, pivot, element) {
4691
- return this.createWritePromise((0, Commands_1.createLInsert)(key, position, pivot, element));
4713
+ return this.createWritePromise((0, _1.createLInsert)(key, position, pivot, element));
4692
4714
  }
4693
4715
  /**
4694
4716
  * Removes the existing timeout on `key`, turning the key from volatile (a key with an expire set) to
@@ -4707,7 +4729,7 @@ class BaseClient {
4707
4729
  * ```
4708
4730
  */
4709
4731
  async persist(key) {
4710
- return this.createWritePromise((0, Commands_1.createPersist)(key));
4732
+ return this.createWritePromise((0, _1.createPersist)(key));
4711
4733
  }
4712
4734
  /**
4713
4735
  * Renames `key` to `newkey`.
@@ -4729,7 +4751,7 @@ class BaseClient {
4729
4751
  * ```
4730
4752
  */
4731
4753
  async rename(key, newKey) {
4732
- return this.createWritePromise((0, Commands_1.createRename)(key, newKey), {
4754
+ return this.createWritePromise((0, _1.createRename)(key, newKey), {
4733
4755
  decoder: Decoder.String,
4734
4756
  });
4735
4757
  }
@@ -4753,7 +4775,7 @@ class BaseClient {
4753
4775
  * ```
4754
4776
  */
4755
4777
  async renamenx(key, newKey) {
4756
- return this.createWritePromise((0, Commands_1.createRenameNX)(key, newKey));
4778
+ return this.createWritePromise((0, _1.createRenameNX)(key, newKey));
4757
4779
  }
4758
4780
  /** Blocking list pop primitive.
4759
4781
  * Pop an element from the tail of the first list that is non-empty,
@@ -4778,7 +4800,7 @@ class BaseClient {
4778
4800
  * ```
4779
4801
  */
4780
4802
  async brpop(keys, timeout, options) {
4781
- return this.createWritePromise((0, Commands_1.createBRPop)(keys, timeout), options);
4803
+ return this.createWritePromise((0, _1.createBRPop)(keys, timeout), options);
4782
4804
  }
4783
4805
  /** Blocking list pop primitive.
4784
4806
  * Pop an element from the head of the first list that is non-empty,
@@ -4802,7 +4824,7 @@ class BaseClient {
4802
4824
  * ```
4803
4825
  */
4804
4826
  async blpop(keys, timeout, options) {
4805
- return this.createWritePromise((0, Commands_1.createBLPop)(keys, timeout), options);
4827
+ return this.createWritePromise((0, _1.createBLPop)(keys, timeout), options);
4806
4828
  }
4807
4829
  /** Adds all elements to the HyperLogLog data structure stored at the specified `key`.
4808
4830
  * Creates a new structure if the `key` does not exist.
@@ -4823,7 +4845,7 @@ class BaseClient {
4823
4845
  * ```
4824
4846
  */
4825
4847
  async pfadd(key, elements) {
4826
- return this.createWritePromise((0, Commands_1.createPfAdd)(key, elements));
4848
+ return this.createWritePromise((0, _1.createPfAdd)(key, elements));
4827
4849
  }
4828
4850
  /** Estimates the cardinality of the data stored in a HyperLogLog structure for a single key or
4829
4851
  * calculates the combined cardinality of multiple keys by merging their HyperLogLogs temporarily.
@@ -4841,7 +4863,7 @@ class BaseClient {
4841
4863
  * ```
4842
4864
  */
4843
4865
  async pfcount(keys) {
4844
- return this.createWritePromise((0, Commands_1.createPfCount)(keys));
4866
+ return this.createWritePromise((0, _1.createPfCount)(keys));
4845
4867
  }
4846
4868
  /**
4847
4869
  * Merges multiple HyperLogLog values into a unique value. If the destination variable exists, it is
@@ -4865,7 +4887,7 @@ class BaseClient {
4865
4887
  * ```
4866
4888
  */
4867
4889
  async pfmerge(destination, sourceKeys) {
4868
- return this.createWritePromise((0, Commands_1.createPfMerge)(destination, sourceKeys), {
4890
+ return this.createWritePromise((0, _1.createPfMerge)(destination, sourceKeys), {
4869
4891
  decoder: Decoder.String,
4870
4892
  });
4871
4893
  }
@@ -4885,7 +4907,7 @@ class BaseClient {
4885
4907
  * ```
4886
4908
  */
4887
4909
  async objectEncoding(key) {
4888
- return this.createWritePromise((0, Commands_1.createObjectEncoding)(key), {
4910
+ return this.createWritePromise((0, _1.createObjectEncoding)(key), {
4889
4911
  decoder: Decoder.String,
4890
4912
  });
4891
4913
  }
@@ -4905,7 +4927,7 @@ class BaseClient {
4905
4927
  * ```
4906
4928
  */
4907
4929
  async objectFreq(key) {
4908
- return this.createWritePromise((0, Commands_1.createObjectFreq)(key));
4930
+ return this.createWritePromise((0, _1.createObjectFreq)(key));
4909
4931
  }
4910
4932
  /**
4911
4933
  * Returns the time in seconds since the last access to the value stored at `key`.
@@ -4922,7 +4944,7 @@ class BaseClient {
4922
4944
  * ```
4923
4945
  */
4924
4946
  async objectIdletime(key) {
4925
- return this.createWritePromise((0, Commands_1.createObjectIdletime)(key));
4947
+ return this.createWritePromise((0, _1.createObjectIdletime)(key));
4926
4948
  }
4927
4949
  /**
4928
4950
  * Returns the reference count of the object stored at `key`.
@@ -4940,7 +4962,7 @@ class BaseClient {
4940
4962
  * ```
4941
4963
  */
4942
4964
  async objectRefcount(key) {
4943
- return this.createWritePromise((0, Commands_1.createObjectRefcount)(key));
4965
+ return this.createWritePromise((0, _1.createObjectRefcount)(key));
4944
4966
  }
4945
4967
  /**
4946
4968
  * Invokes a previously loaded function.
@@ -4963,7 +4985,7 @@ class BaseClient {
4963
4985
  * ```
4964
4986
  */
4965
4987
  async fcall(func, keys, args, options) {
4966
- return this.createWritePromise((0, Commands_1.createFCall)(func, keys, args), options);
4988
+ return this.createWritePromise((0, _1.createFCall)(func, keys, args), options);
4967
4989
  }
4968
4990
  /**
4969
4991
  * Invokes a previously loaded read-only function.
@@ -4987,7 +5009,7 @@ class BaseClient {
4987
5009
  * ```
4988
5010
  */
4989
5011
  async fcallReadonly(func, keys, args, options) {
4990
- return this.createWritePromise((0, Commands_1.createFCallReadOnly)(func, keys, args), options);
5012
+ return this.createWritePromise((0, _1.createFCallReadOnly)(func, keys, args), options);
4991
5013
  }
4992
5014
  /**
4993
5015
  * Returns the index of the first occurrence of `element` inside the list specified by `key`. If no
@@ -5011,7 +5033,7 @@ class BaseClient {
5011
5033
  * ```
5012
5034
  */
5013
5035
  async lpos(key, element, options) {
5014
- return this.createWritePromise((0, Commands_1.createLPos)(key, element, options));
5036
+ return this.createWritePromise((0, _1.createLPos)(key, element, options));
5015
5037
  }
5016
5038
  /**
5017
5039
  * Counts the number of set bits (population counting) in the string stored at `key`. The `options` argument can
@@ -5035,7 +5057,7 @@ class BaseClient {
5035
5057
  * ```
5036
5058
  */
5037
5059
  async bitcount(key, options) {
5038
- return this.createWritePromise((0, Commands_1.createBitCount)(key, options));
5060
+ return this.createWritePromise((0, _1.createBitCount)(key, options));
5039
5061
  }
5040
5062
  /**
5041
5063
  * Adds geospatial members with their positions to the specified sorted set stored at `key`.
@@ -5062,7 +5084,7 @@ class BaseClient {
5062
5084
  * ```
5063
5085
  */
5064
5086
  async geoadd(key, membersToGeospatialData, options) {
5065
- return this.createWritePromise((0, Commands_1.createGeoAdd)(key, membersToGeospatialData, options));
5087
+ return this.createWritePromise((0, _1.createGeoAdd)(key, membersToGeospatialData, options));
5066
5088
  }
5067
5089
  /**
5068
5090
  * Returns the members of a sorted set populated with geospatial information using {@link geoadd},
@@ -5132,7 +5154,7 @@ class BaseClient {
5132
5154
  * ```
5133
5155
  */
5134
5156
  async geosearch(key, searchFrom, searchBy, options) {
5135
- return this.createWritePromise((0, Commands_1.createGeoSearch)(key, searchFrom, searchBy, options), options);
5157
+ return this.createWritePromise((0, _1.createGeoSearch)(key, searchFrom, searchBy, options), options);
5136
5158
  }
5137
5159
  /**
5138
5160
  * Searches for members in a sorted set stored at `source` representing geospatial data
@@ -5195,7 +5217,7 @@ class BaseClient {
5195
5217
  * ```
5196
5218
  */
5197
5219
  async geosearchstore(destination, source, searchFrom, searchBy, options) {
5198
- return this.createWritePromise((0, Commands_1.createGeoSearchStore)(destination, source, searchFrom, searchBy, options));
5220
+ return this.createWritePromise((0, _1.createGeoSearchStore)(destination, source, searchFrom, searchBy, options));
5199
5221
  }
5200
5222
  /**
5201
5223
  * Returns the positions (longitude, latitude) of all the specified `members` of the
@@ -5225,7 +5247,7 @@ class BaseClient {
5225
5247
  * ```
5226
5248
  */
5227
5249
  async geopos(key, members) {
5228
- return this.createWritePromise((0, Commands_1.createGeoPos)(key, members));
5250
+ return this.createWritePromise((0, _1.createGeoPos)(key, members));
5229
5251
  }
5230
5252
  /**
5231
5253
  * Pops member-score pairs from the first non-empty sorted set, with the given `keys`
@@ -5259,7 +5281,7 @@ class BaseClient {
5259
5281
  * ```
5260
5282
  */
5261
5283
  async zmpop(keys, modifier, options) {
5262
- return this.createWritePromise((0, Commands_1.createZMPop)(keys, modifier, options?.count), options).then((res) => res === null
5284
+ return this.createWritePromise((0, _1.createZMPop)(keys, modifier, options?.count), options).then((res) => res === null
5263
5285
  ? null
5264
5286
  : [res[0], convertGlideRecordForSortedSet(res[1])]);
5265
5287
  }
@@ -5299,7 +5321,7 @@ class BaseClient {
5299
5321
  * ```
5300
5322
  */
5301
5323
  async bzmpop(keys, modifier, timeout, options) {
5302
- return this.createWritePromise((0, Commands_1.createBZMPop)(keys, modifier, timeout, options?.count), options).then((res) => res === null
5324
+ return this.createWritePromise((0, _1.createBZMPop)(keys, modifier, timeout, options?.count), options).then((res) => res === null
5303
5325
  ? null
5304
5326
  : [res[0], convertGlideRecordForSortedSet(res[1])]);
5305
5327
  }
@@ -5329,7 +5351,7 @@ class BaseClient {
5329
5351
  * ```
5330
5352
  */
5331
5353
  async zincrby(key, increment, member) {
5332
- return this.createWritePromise((0, Commands_1.createZIncrBy)(key, increment, member));
5354
+ return this.createWritePromise((0, _1.createZIncrBy)(key, increment, member));
5333
5355
  }
5334
5356
  /**
5335
5357
  * Iterates incrementally over a sorted set.
@@ -5395,7 +5417,7 @@ class BaseClient {
5395
5417
  * ```
5396
5418
  */
5397
5419
  async zscan(key, cursor, options) {
5398
- return this.createWritePromise((0, Commands_1.createZScan)(key, cursor, options), options).then((res) => [res[0].toString(), res[1]]); // convert cursor back to string
5420
+ return this.createWritePromise((0, _1.createZScan)(key, cursor, options), options).then((res) => [res[0].toString(), res[1]]); // convert cursor back to string
5399
5421
  }
5400
5422
  /**
5401
5423
  * Returns the distance between `member1` and `member2` saved in the geospatial index stored at `key`.
@@ -5418,7 +5440,7 @@ class BaseClient {
5418
5440
  * ```
5419
5441
  */
5420
5442
  async geodist(key, member1, member2, options) {
5421
- return this.createWritePromise((0, Commands_1.createGeoDist)(key, member1, member2, options?.unit));
5443
+ return this.createWritePromise((0, _1.createGeoDist)(key, member1, member2, options?.unit));
5422
5444
  }
5423
5445
  /**
5424
5446
  * Returns the `GeoHash` strings representing the positions of all the specified `members` in the sorted set stored at `key`.
@@ -5437,7 +5459,7 @@ class BaseClient {
5437
5459
  * ```
5438
5460
  */
5439
5461
  async geohash(key, members) {
5440
- return this.createWritePromise((0, Commands_1.createGeoHash)(key, members), {
5462
+ return this.createWritePromise((0, _1.createGeoHash)(key, members), {
5441
5463
  decoder: Decoder.String,
5442
5464
  });
5443
5465
  }
@@ -5462,7 +5484,7 @@ class BaseClient {
5462
5484
  * ```
5463
5485
  */
5464
5486
  async lcs(key1, key2, options) {
5465
- return this.createWritePromise((0, Commands_1.createLCS)(key1, key2), options);
5487
+ return this.createWritePromise((0, _1.createLCS)(key1, key2), options);
5466
5488
  }
5467
5489
  /**
5468
5490
  * Returns the total length of all the longest common subsequences between strings stored at `key1` and `key2`.
@@ -5484,7 +5506,7 @@ class BaseClient {
5484
5506
  * ```
5485
5507
  */
5486
5508
  async lcsLen(key1, key2, options) {
5487
- return this.createWritePromise((0, Commands_1.createLCS)(key1, key2, { len: true }), options);
5509
+ return this.createWritePromise((0, _1.createLCS)(key1, key2, { len: true }), options);
5488
5510
  }
5489
5511
  /**
5490
5512
  * Returns the indices and lengths of the longest common subsequences between strings stored at
@@ -5534,7 +5556,7 @@ class BaseClient {
5534
5556
  * ```
5535
5557
  */
5536
5558
  async lcsIdx(key1, key2, options) {
5537
- return this.createWritePromise((0, Commands_1.createLCS)(key1, key2, { idx: options ?? {} })).then(convertGlideRecordToRecord);
5559
+ return this.createWritePromise((0, _1.createLCS)(key1, key2, { idx: options ?? {} })).then(convertGlideRecordToRecord);
5538
5560
  }
5539
5561
  /**
5540
5562
  * Updates the last access time of the specified keys.
@@ -5561,7 +5583,7 @@ class BaseClient {
5561
5583
  * ```
5562
5584
  */
5563
5585
  async touch(keys) {
5564
- return this.createWritePromise((0, Commands_1.createTouch)(keys));
5586
+ return this.createWritePromise((0, _1.createTouch)(keys));
5565
5587
  }
5566
5588
  /**
5567
5589
  * Marks the given keys to be watched for conditional execution of a transaction. Transactions
@@ -5599,7 +5621,7 @@ class BaseClient {
5599
5621
  * ```
5600
5622
  */
5601
5623
  async watch(keys) {
5602
- return this.createWritePromise((0, Commands_1.createWatch)(keys), {
5624
+ return this.createWritePromise((0, _1.createWatch)(keys), {
5603
5625
  decoder: Decoder.String,
5604
5626
  });
5605
5627
  }
@@ -5622,7 +5644,7 @@ class BaseClient {
5622
5644
  * ```
5623
5645
  */
5624
5646
  async wait(numreplicas, timeout) {
5625
- return this.createWritePromise((0, Commands_1.createWait)(numreplicas, timeout));
5647
+ return this.createWritePromise((0, _1.createWait)(numreplicas, timeout));
5626
5648
  }
5627
5649
  /**
5628
5650
  * Overwrites part of the string stored at `key`, starting at the specified byte `offset`,
@@ -5645,7 +5667,7 @@ class BaseClient {
5645
5667
  * ```
5646
5668
  */
5647
5669
  async setrange(key, offset, value) {
5648
- return this.createWritePromise((0, Commands_1.createSetRange)(key, offset, value));
5670
+ return this.createWritePromise((0, _1.createSetRange)(key, offset, value));
5649
5671
  }
5650
5672
  /**
5651
5673
  * Appends a `value` to a `key`. If `key` does not exist it is created and set as an empty string,
@@ -5670,7 +5692,7 @@ class BaseClient {
5670
5692
  * ```
5671
5693
  */
5672
5694
  async append(key, value) {
5673
- return this.createWritePromise((0, Commands_1.createAppend)(key, value));
5695
+ return this.createWritePromise((0, _1.createAppend)(key, value));
5674
5696
  }
5675
5697
  /**
5676
5698
  * Pops one or more elements from the first non-empty list from the provided `keys`.
@@ -5696,7 +5718,7 @@ class BaseClient {
5696
5718
  * ```
5697
5719
  */
5698
5720
  async lmpop(keys, direction, options) {
5699
- return this.createWritePromise((0, Commands_1.createLMPop)(keys, direction, options?.count), options).then((res) => res === null
5721
+ return this.createWritePromise((0, _1.createLMPop)(keys, direction, options?.count), options).then((res) => res === null
5700
5722
  ? null
5701
5723
  : res.map((r) => {
5702
5724
  return { key: r.key, elements: r.value };
@@ -5728,7 +5750,7 @@ class BaseClient {
5728
5750
  * ```
5729
5751
  */
5730
5752
  async blmpop(keys, direction, timeout, options) {
5731
- return this.createWritePromise((0, Commands_1.createBLMPop)(keys, direction, timeout, options?.count), options).then((res) => res === null
5753
+ return this.createWritePromise((0, _1.createBLMPop)(keys, direction, timeout, options?.count), options).then((res) => res === null
5732
5754
  ? null
5733
5755
  : res.map((r) => {
5734
5756
  return { key: r.key, elements: r.value };
@@ -5757,7 +5779,7 @@ class BaseClient {
5757
5779
  * ```
5758
5780
  */
5759
5781
  async pubsubChannels(options) {
5760
- return this.createWritePromise((0, Commands_1.createPubSubChannels)(options?.pattern), options);
5782
+ return this.createWritePromise((0, _1.createPubSubChannels)(options?.pattern), options);
5761
5783
  }
5762
5784
  /**
5763
5785
  * Returns the number of unique patterns that are subscribed to by clients.
@@ -5777,7 +5799,7 @@ class BaseClient {
5777
5799
  * ```
5778
5800
  */
5779
5801
  async pubsubNumPat() {
5780
- return this.createWritePromise((0, Commands_1.createPubSubNumPat)());
5802
+ return this.createWritePromise((0, _1.createPubSubNumPat)());
5781
5803
  }
5782
5804
  /**
5783
5805
  * Returns the number of subscribers (exclusive of clients subscribed to patterns) for the specified channels.
@@ -5800,7 +5822,7 @@ class BaseClient {
5800
5822
  * ```
5801
5823
  */
5802
5824
  async pubsubNumSub(channels, options) {
5803
- return this.createWritePromise((0, Commands_1.createPubSubNumSub)(channels), options).then((res) => res.map((r) => {
5825
+ return this.createWritePromise((0, _1.createPubSubNumSub)(channels), options).then((res) => res.map((r) => {
5804
5826
  return { channel: r.key, numSub: r.value };
5805
5827
  }));
5806
5828
  }
@@ -5831,7 +5853,7 @@ class BaseClient {
5831
5853
  * ```
5832
5854
  */
5833
5855
  async sort(key, options) {
5834
- return this.createWritePromise((0, Commands_1.createSort)(key, options), options);
5856
+ return this.createWritePromise((0, _1.createSort)(key, options), options);
5835
5857
  }
5836
5858
  /**
5837
5859
  * Sorts the elements in the list, set, or sorted set at `key` and returns the result.
@@ -5860,7 +5882,7 @@ class BaseClient {
5860
5882
  * ```
5861
5883
  */
5862
5884
  async sortReadOnly(key, options) {
5863
- return this.createWritePromise((0, Commands_1.createSortReadOnly)(key, options), options);
5885
+ return this.createWritePromise((0, _1.createSortReadOnly)(key, options), options);
5864
5886
  }
5865
5887
  /**
5866
5888
  * Sorts the elements in the list, set, or sorted set at `key` and stores the result in
@@ -5892,7 +5914,7 @@ class BaseClient {
5892
5914
  * ```
5893
5915
  */
5894
5916
  async sortStore(key, destination, options) {
5895
- return this.createWritePromise((0, Commands_1.createSort)(key, options, destination));
5917
+ return this.createWritePromise((0, _1.createSort)(key, options, destination));
5896
5918
  }
5897
5919
  /**
5898
5920
  * @internal
@@ -5930,7 +5952,7 @@ class BaseClient {
5930
5952
  configureAdvancedConfigurationBase(options, request) {
5931
5953
  request.connectionTimeout =
5932
5954
  options.connectionTimeout ??
5933
- native_1.DEFAULT_CONNECTION_TIMEOUT_IN_MILLISECONDS;
5955
+ _1.DEFAULT_CONNECTION_TIMEOUT_IN_MILLISECONDS;
5934
5956
  }
5935
5957
  /**
5936
5958
  * @internal
@@ -5956,13 +5978,13 @@ class BaseClient {
5956
5978
  close(errorMessage) {
5957
5979
  this.isClosed = true;
5958
5980
  this.promiseCallbackFunctions.forEach(([, reject]) => {
5959
- reject(new Errors_1.ClosingError(errorMessage || ""));
5981
+ reject(new _1.ClosingError(errorMessage || ""));
5960
5982
  });
5961
5983
  // Handle pubsub futures
5962
5984
  this.pubsubFutures.forEach(([, reject]) => {
5963
- reject(new Errors_1.ClosingError(errorMessage || ""));
5985
+ reject(new _1.ClosingError(errorMessage || ""));
5964
5986
  });
5965
- Logger_1.Logger.log("info", "Client lifetime", "disposing of client");
5987
+ _1.Logger.log("info", "Client lifetime", "disposing of client");
5966
5988
  this.socket.end();
5967
5989
  }
5968
5990
  /**
@@ -5971,7 +5993,7 @@ class BaseClient {
5971
5993
  static async __createClientInternal(options, connectedSocket, constructor) {
5972
5994
  const connection = constructor(connectedSocket, options);
5973
5995
  await connection.connectToServer(options);
5974
- Logger_1.Logger.log("info", "Client lifetime", "connected to server");
5996
+ _1.Logger.log("info", "Client lifetime", "connected to server");
5975
5997
  return connection;
5976
5998
  }
5977
5999
  /**
@@ -5990,7 +6012,7 @@ class BaseClient {
5990
6012
  * @internal
5991
6013
  */
5992
6014
  static async createClientInternal(options, constructor) {
5993
- const path = await (0, native_1.StartSocketConnection)();
6015
+ const path = await (0, _1.StartSocketConnection)();
5994
6016
  const socket = await this.GetSocket(path);
5995
6017
  try {
5996
6018
  return await this.__createClientInternal(options, socket, constructor);
@@ -6043,7 +6065,7 @@ class BaseClient {
6043
6065
  * @return Return an object that contains the statistics collected internally by GLIDE core
6044
6066
  */
6045
6067
  getStatistics() {
6046
- return (0, native_1.getStatistics)();
6068
+ return (0, _1.getStatistics)();
6047
6069
  }
6048
6070
  }
6049
6071
  exports.BaseClient = BaseClient;