@upstash/redis 1.34.3 → 1.34.4

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.
@@ -115,7 +115,9 @@ var HttpClient = class {
115
115
  break;
116
116
  }
117
117
  error = error_;
118
- await new Promise((r) => setTimeout(r, this.retry.backoff(i)));
118
+ if (i < this.retry.attempts) {
119
+ await new Promise((r) => setTimeout(r, this.retry.backoff(i)));
120
+ }
119
121
  }
120
122
  }
121
123
  if (!res) {
@@ -446,6 +448,14 @@ var EvalshaCommand = class extends Command {
446
448
  }
447
449
  };
448
450
 
451
+ // pkg/commands/exec.ts
452
+ var ExecCommand = class extends Command {
453
+ constructor(cmd, opts) {
454
+ const normalizedCmd = cmd.map((arg) => typeof arg === "string" ? arg : String(arg));
455
+ super(normalizedCmd, opts);
456
+ }
457
+ };
458
+
449
459
  // pkg/commands/exists.ts
450
460
  var ExistsCommand = class extends Command {
451
461
  constructor(cmd, opts) {
@@ -662,6 +672,27 @@ var GetDelCommand = class extends Command {
662
672
  }
663
673
  };
664
674
 
675
+ // pkg/commands/getex.ts
676
+ var GetExCommand = class extends Command {
677
+ constructor([key, opts], cmdOpts) {
678
+ const command = ["getex", key];
679
+ if (opts) {
680
+ if ("ex" in opts && typeof opts.ex === "number") {
681
+ command.push("ex", opts.ex);
682
+ } else if ("px" in opts && typeof opts.px === "number") {
683
+ command.push("px", opts.px);
684
+ } else if ("exat" in opts && typeof opts.exat === "number") {
685
+ command.push("exat", opts.exat);
686
+ } else if ("pxat" in opts && typeof opts.pxat === "number") {
687
+ command.push("pxat", opts.pxat);
688
+ } else if ("persist" in opts && opts.persist) {
689
+ command.push("persist");
690
+ }
691
+ }
692
+ super(command, cmdOpts);
693
+ }
694
+ };
695
+
665
696
  // pkg/commands/getrange.ts
666
697
  var GetRangeCommand = class extends Command {
667
698
  constructor(cmd, opts) {
@@ -2298,6 +2329,10 @@ var Pipeline = class {
2298
2329
  * @see https://redis.io/commands/getdel
2299
2330
  */
2300
2331
  getdel = (...args) => this.chain(new GetDelCommand(args, this.commandOptions));
2332
+ /**
2333
+ * @see https://redis.io/commands/getex
2334
+ */
2335
+ getex = (...args) => this.chain(new GetExCommand(args, this.commandOptions));
2301
2336
  /**
2302
2337
  * @see https://redis.io/commands/getrange
2303
2338
  */
@@ -3248,6 +3283,10 @@ var Redis = class {
3248
3283
  * @see https://redis.io/commands/evalsha
3249
3284
  */
3250
3285
  evalsha = (...args) => new EvalshaCommand(args, this.opts).exec(this.client);
3286
+ /**
3287
+ * Generic method to execute any Redis command.
3288
+ */
3289
+ exec = (args) => new ExecCommand(args, this.opts).exec(this.client);
3251
3290
  /**
3252
3291
  * @see https://redis.io/commands/exists
3253
3292
  */
@@ -3304,6 +3343,10 @@ var Redis = class {
3304
3343
  * @see https://redis.io/commands/getdel
3305
3344
  */
3306
3345
  getdel = (...args) => new GetDelCommand(args, this.opts).exec(this.client);
3346
+ /**
3347
+ * @see https://redis.io/commands/getex
3348
+ */
3349
+ getex = (...args) => new GetExCommand(args, this.opts).exec(this.client);
3307
3350
  /**
3308
3351
  * @see https://redis.io/commands/getrange
3309
3352
  */
@@ -3797,7 +3840,7 @@ var Redis = class {
3797
3840
  };
3798
3841
 
3799
3842
  // version.ts
3800
- var VERSION = "v1.34.3";
3843
+ var VERSION = "v1.34.4";
3801
3844
 
3802
3845
  export {
3803
3846
  error_exports,
package/cloudflare.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-Dc6Llqgr.mjs';
2
- export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, d as Requester, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-Dc6Llqgr.mjs';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-C3G81zLz.mjs';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetExCommand, I as GetRangeCommand, J as GetSetCommand, K as HDelCommand, L as HExistsCommand, N as HGetAllCommand, M as HGetCommand, O as HIncrByCommand, Q as HIncrByFloatCommand, S as HKeysCommand, T as HLenCommand, V as HMGetCommand, W as HMSetCommand, X as HRandFieldCommand, Y as HScanCommand, Z as HSetCommand, _ as HSetNXCommand, $ as HStrLenCommand, a0 as HValsCommand, a2 as IncrByCommand, a3 as IncrByFloatCommand, a1 as IncrCommand, a4 as JsonArrAppendCommand, a5 as JsonArrIndexCommand, a6 as JsonArrInsertCommand, a7 as JsonArrLenCommand, a8 as JsonArrPopCommand, a9 as JsonArrTrimCommand, aa as JsonClearCommand, ab as JsonDelCommand, ac as JsonForgetCommand, ad as JsonGetCommand, ae as JsonMGetCommand, af as JsonNumIncrByCommand, ag as JsonNumMultByCommand, ah as JsonObjKeysCommand, ai as JsonObjLenCommand, aj as JsonRespCommand, ak as JsonSetCommand, al as JsonStrAppendCommand, am as JsonStrLenCommand, an as JsonToggleCommand, ao as JsonTypeCommand, ap as KeysCommand, aq as LIndexCommand, ar as LInsertCommand, as as LLenCommand, at as LMoveCommand, au as LPopCommand, av as LPushCommand, aw as LPushXCommand, ax as LRangeCommand, ay as LRemCommand, az as LSetCommand, aA as LTrimCommand, aB as MGetCommand, aC as MSetCommand, aD as MSetNXCommand, aG as PExpireAtCommand, aF as PExpireCommand, aI as PSetEXCommand, aJ as PTtlCommand, aE as PersistCommand, aH as PingCommand, P as Pipeline, aK as PublishCommand, aO as RPopCommand, aP as RPushCommand, aQ as RPushXCommand, aL as RandomKeyCommand, aM as RenameCommand, aN as RenameNXCommand, d as Requester, aR as SAddCommand, aU as SCardCommand, aY as SDiffCommand, aZ as SDiffStoreCommand, b4 as SInterCommand, b5 as SInterStoreCommand, b6 as SIsMemberCommand, b8 as SMIsMemberCommand, b7 as SMembersCommand, b9 as SMoveCommand, ba as SPopCommand, bb as SRandMemberCommand, bc as SRemCommand, bd as SScanCommand, bf as SUnionCommand, bg as SUnionStoreCommand, aS as ScanCommand, aT as ScanCommandOptions, bp as ScoreMember, aV as ScriptExistsCommand, aW as ScriptFlushCommand, aX as ScriptLoadCommand, b0 as SetBitCommand, a_ as SetCommand, a$ as SetCommandOptions, b1 as SetExCommand, b2 as SetNxCommand, b3 as SetRangeCommand, be as StrLenCommand, bh as TimeCommand, bi as TouchCommand, bj as TtlCommand, bk as Type, bl as TypeCommand, bm as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bn as XAddCommand, bo as XRangeCommand, br as ZAddCommand, bq as ZAddCommandOptions, bs as ZCardCommand, bt as ZCountCommand, bu as ZDiffStoreCommand, bv as ZIncrByCommand, bw as ZInterStoreCommand, bx as ZInterStoreCommandOptions, by as ZLexCountCommand, bz as ZMScoreCommand, bA as ZPopMaxCommand, bB as ZPopMinCommand, bC as ZRangeCommand, bD as ZRangeCommandOptions, bE as ZRankCommand, bF as ZRemCommand, bG as ZRemRangeByLexCommand, bH as ZRemRangeByRankCommand, bI as ZRemRangeByScoreCommand, bJ as ZRevRankCommand, bK as ZScanCommand, bL as ZScoreCommand, bM as ZUnionCommand, bN as ZUnionCommandOptions, bO as ZUnionStoreCommand, bP as ZUnionStoreCommandOptions, e as errors } from './zmscore-C3G81zLz.mjs';
3
3
 
4
4
  type Env = {
5
5
  UPSTASH_DISABLE_TELEMETRY?: string;
package/cloudflare.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-Dc6Llqgr.js';
2
- export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, d as Requester, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-Dc6Llqgr.js';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-C3G81zLz.js';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetExCommand, I as GetRangeCommand, J as GetSetCommand, K as HDelCommand, L as HExistsCommand, N as HGetAllCommand, M as HGetCommand, O as HIncrByCommand, Q as HIncrByFloatCommand, S as HKeysCommand, T as HLenCommand, V as HMGetCommand, W as HMSetCommand, X as HRandFieldCommand, Y as HScanCommand, Z as HSetCommand, _ as HSetNXCommand, $ as HStrLenCommand, a0 as HValsCommand, a2 as IncrByCommand, a3 as IncrByFloatCommand, a1 as IncrCommand, a4 as JsonArrAppendCommand, a5 as JsonArrIndexCommand, a6 as JsonArrInsertCommand, a7 as JsonArrLenCommand, a8 as JsonArrPopCommand, a9 as JsonArrTrimCommand, aa as JsonClearCommand, ab as JsonDelCommand, ac as JsonForgetCommand, ad as JsonGetCommand, ae as JsonMGetCommand, af as JsonNumIncrByCommand, ag as JsonNumMultByCommand, ah as JsonObjKeysCommand, ai as JsonObjLenCommand, aj as JsonRespCommand, ak as JsonSetCommand, al as JsonStrAppendCommand, am as JsonStrLenCommand, an as JsonToggleCommand, ao as JsonTypeCommand, ap as KeysCommand, aq as LIndexCommand, ar as LInsertCommand, as as LLenCommand, at as LMoveCommand, au as LPopCommand, av as LPushCommand, aw as LPushXCommand, ax as LRangeCommand, ay as LRemCommand, az as LSetCommand, aA as LTrimCommand, aB as MGetCommand, aC as MSetCommand, aD as MSetNXCommand, aG as PExpireAtCommand, aF as PExpireCommand, aI as PSetEXCommand, aJ as PTtlCommand, aE as PersistCommand, aH as PingCommand, P as Pipeline, aK as PublishCommand, aO as RPopCommand, aP as RPushCommand, aQ as RPushXCommand, aL as RandomKeyCommand, aM as RenameCommand, aN as RenameNXCommand, d as Requester, aR as SAddCommand, aU as SCardCommand, aY as SDiffCommand, aZ as SDiffStoreCommand, b4 as SInterCommand, b5 as SInterStoreCommand, b6 as SIsMemberCommand, b8 as SMIsMemberCommand, b7 as SMembersCommand, b9 as SMoveCommand, ba as SPopCommand, bb as SRandMemberCommand, bc as SRemCommand, bd as SScanCommand, bf as SUnionCommand, bg as SUnionStoreCommand, aS as ScanCommand, aT as ScanCommandOptions, bp as ScoreMember, aV as ScriptExistsCommand, aW as ScriptFlushCommand, aX as ScriptLoadCommand, b0 as SetBitCommand, a_ as SetCommand, a$ as SetCommandOptions, b1 as SetExCommand, b2 as SetNxCommand, b3 as SetRangeCommand, be as StrLenCommand, bh as TimeCommand, bi as TouchCommand, bj as TtlCommand, bk as Type, bl as TypeCommand, bm as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bn as XAddCommand, bo as XRangeCommand, br as ZAddCommand, bq as ZAddCommandOptions, bs as ZCardCommand, bt as ZCountCommand, bu as ZDiffStoreCommand, bv as ZIncrByCommand, bw as ZInterStoreCommand, bx as ZInterStoreCommandOptions, by as ZLexCountCommand, bz as ZMScoreCommand, bA as ZPopMaxCommand, bB as ZPopMinCommand, bC as ZRangeCommand, bD as ZRangeCommandOptions, bE as ZRankCommand, bF as ZRemCommand, bG as ZRemRangeByLexCommand, bH as ZRemRangeByRankCommand, bI as ZRemRangeByScoreCommand, bJ as ZRevRankCommand, bK as ZScanCommand, bL as ZScoreCommand, bM as ZUnionCommand, bN as ZUnionCommandOptions, bO as ZUnionStoreCommand, bP as ZUnionStoreCommandOptions, e as errors } from './zmscore-C3G81zLz.js';
3
3
 
4
4
  type Env = {
5
5
  UPSTASH_DISABLE_TELEMETRY?: string;
package/cloudflare.js CHANGED
@@ -146,7 +146,9 @@ var HttpClient = class {
146
146
  break;
147
147
  }
148
148
  error = error_;
149
- await new Promise((r) => setTimeout(r, this.retry.backoff(i)));
149
+ if (i < this.retry.attempts) {
150
+ await new Promise((r) => setTimeout(r, this.retry.backoff(i)));
151
+ }
150
152
  }
151
153
  }
152
154
  if (!res) {
@@ -522,6 +524,14 @@ var EvalshaCommand = class extends Command {
522
524
  }
523
525
  };
524
526
 
527
+ // pkg/commands/exec.ts
528
+ var ExecCommand = class extends Command {
529
+ constructor(cmd, opts) {
530
+ const normalizedCmd = cmd.map((arg) => typeof arg === "string" ? arg : String(arg));
531
+ super(normalizedCmd, opts);
532
+ }
533
+ };
534
+
525
535
  // pkg/commands/exists.ts
526
536
  var ExistsCommand = class extends Command {
527
537
  constructor(cmd, opts) {
@@ -738,6 +748,27 @@ var GetDelCommand = class extends Command {
738
748
  }
739
749
  };
740
750
 
751
+ // pkg/commands/getex.ts
752
+ var GetExCommand = class extends Command {
753
+ constructor([key, opts], cmdOpts) {
754
+ const command = ["getex", key];
755
+ if (opts) {
756
+ if ("ex" in opts && typeof opts.ex === "number") {
757
+ command.push("ex", opts.ex);
758
+ } else if ("px" in opts && typeof opts.px === "number") {
759
+ command.push("px", opts.px);
760
+ } else if ("exat" in opts && typeof opts.exat === "number") {
761
+ command.push("exat", opts.exat);
762
+ } else if ("pxat" in opts && typeof opts.pxat === "number") {
763
+ command.push("pxat", opts.pxat);
764
+ } else if ("persist" in opts && opts.persist) {
765
+ command.push("persist");
766
+ }
767
+ }
768
+ super(command, cmdOpts);
769
+ }
770
+ };
771
+
741
772
  // pkg/commands/getrange.ts
742
773
  var GetRangeCommand = class extends Command {
743
774
  constructor(cmd, opts) {
@@ -2408,6 +2439,10 @@ var Pipeline = class {
2408
2439
  * @see https://redis.io/commands/getdel
2409
2440
  */
2410
2441
  getdel = (...args) => this.chain(new GetDelCommand(args, this.commandOptions));
2442
+ /**
2443
+ * @see https://redis.io/commands/getex
2444
+ */
2445
+ getex = (...args) => this.chain(new GetExCommand(args, this.commandOptions));
2411
2446
  /**
2412
2447
  * @see https://redis.io/commands/getrange
2413
2448
  */
@@ -3279,6 +3314,10 @@ var Redis = class {
3279
3314
  * @see https://redis.io/commands/evalsha
3280
3315
  */
3281
3316
  evalsha = (...args) => new EvalshaCommand(args, this.opts).exec(this.client);
3317
+ /**
3318
+ * Generic method to execute any Redis command.
3319
+ */
3320
+ exec = (args) => new ExecCommand(args, this.opts).exec(this.client);
3282
3321
  /**
3283
3322
  * @see https://redis.io/commands/exists
3284
3323
  */
@@ -3335,6 +3374,10 @@ var Redis = class {
3335
3374
  * @see https://redis.io/commands/getdel
3336
3375
  */
3337
3376
  getdel = (...args) => new GetDelCommand(args, this.opts).exec(this.client);
3377
+ /**
3378
+ * @see https://redis.io/commands/getex
3379
+ */
3380
+ getex = (...args) => new GetExCommand(args, this.opts).exec(this.client);
3338
3381
  /**
3339
3382
  * @see https://redis.io/commands/getrange
3340
3383
  */
@@ -3828,7 +3871,7 @@ var Redis = class {
3828
3871
  };
3829
3872
 
3830
3873
  // version.ts
3831
- var VERSION = "v1.34.3";
3874
+ var VERSION = "v1.34.4";
3832
3875
 
3833
3876
  // platforms/cloudflare.ts
3834
3877
  var Redis2 = class _Redis extends Redis {
package/cloudflare.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Redis,
4
4
  VERSION,
5
5
  error_exports
6
- } from "./chunk-FV6JMGNF.mjs";
6
+ } from "./chunk-T6D4KAGH.mjs";
7
7
 
8
8
  // platforms/cloudflare.ts
9
9
  var Redis2 = class _Redis extends Redis {
package/fastly.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-Dc6Llqgr.mjs';
2
- export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, d as Requester, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-Dc6Llqgr.mjs';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-C3G81zLz.mjs';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetExCommand, I as GetRangeCommand, J as GetSetCommand, K as HDelCommand, L as HExistsCommand, N as HGetAllCommand, M as HGetCommand, O as HIncrByCommand, Q as HIncrByFloatCommand, S as HKeysCommand, T as HLenCommand, V as HMGetCommand, W as HMSetCommand, X as HRandFieldCommand, Y as HScanCommand, Z as HSetCommand, _ as HSetNXCommand, $ as HStrLenCommand, a0 as HValsCommand, a2 as IncrByCommand, a3 as IncrByFloatCommand, a1 as IncrCommand, a4 as JsonArrAppendCommand, a5 as JsonArrIndexCommand, a6 as JsonArrInsertCommand, a7 as JsonArrLenCommand, a8 as JsonArrPopCommand, a9 as JsonArrTrimCommand, aa as JsonClearCommand, ab as JsonDelCommand, ac as JsonForgetCommand, ad as JsonGetCommand, ae as JsonMGetCommand, af as JsonNumIncrByCommand, ag as JsonNumMultByCommand, ah as JsonObjKeysCommand, ai as JsonObjLenCommand, aj as JsonRespCommand, ak as JsonSetCommand, al as JsonStrAppendCommand, am as JsonStrLenCommand, an as JsonToggleCommand, ao as JsonTypeCommand, ap as KeysCommand, aq as LIndexCommand, ar as LInsertCommand, as as LLenCommand, at as LMoveCommand, au as LPopCommand, av as LPushCommand, aw as LPushXCommand, ax as LRangeCommand, ay as LRemCommand, az as LSetCommand, aA as LTrimCommand, aB as MGetCommand, aC as MSetCommand, aD as MSetNXCommand, aG as PExpireAtCommand, aF as PExpireCommand, aI as PSetEXCommand, aJ as PTtlCommand, aE as PersistCommand, aH as PingCommand, P as Pipeline, aK as PublishCommand, aO as RPopCommand, aP as RPushCommand, aQ as RPushXCommand, aL as RandomKeyCommand, aM as RenameCommand, aN as RenameNXCommand, d as Requester, aR as SAddCommand, aU as SCardCommand, aY as SDiffCommand, aZ as SDiffStoreCommand, b4 as SInterCommand, b5 as SInterStoreCommand, b6 as SIsMemberCommand, b8 as SMIsMemberCommand, b7 as SMembersCommand, b9 as SMoveCommand, ba as SPopCommand, bb as SRandMemberCommand, bc as SRemCommand, bd as SScanCommand, bf as SUnionCommand, bg as SUnionStoreCommand, aS as ScanCommand, aT as ScanCommandOptions, bp as ScoreMember, aV as ScriptExistsCommand, aW as ScriptFlushCommand, aX as ScriptLoadCommand, b0 as SetBitCommand, a_ as SetCommand, a$ as SetCommandOptions, b1 as SetExCommand, b2 as SetNxCommand, b3 as SetRangeCommand, be as StrLenCommand, bh as TimeCommand, bi as TouchCommand, bj as TtlCommand, bk as Type, bl as TypeCommand, bm as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bn as XAddCommand, bo as XRangeCommand, br as ZAddCommand, bq as ZAddCommandOptions, bs as ZCardCommand, bt as ZCountCommand, bu as ZDiffStoreCommand, bv as ZIncrByCommand, bw as ZInterStoreCommand, bx as ZInterStoreCommandOptions, by as ZLexCountCommand, bz as ZMScoreCommand, bA as ZPopMaxCommand, bB as ZPopMinCommand, bC as ZRangeCommand, bD as ZRangeCommandOptions, bE as ZRankCommand, bF as ZRemCommand, bG as ZRemRangeByLexCommand, bH as ZRemRangeByRankCommand, bI as ZRemRangeByScoreCommand, bJ as ZRevRankCommand, bK as ZScanCommand, bL as ZScoreCommand, bM as ZUnionCommand, bN as ZUnionCommandOptions, bO as ZUnionStoreCommand, bP as ZUnionStoreCommandOptions, e as errors } from './zmscore-C3G81zLz.mjs';
3
3
 
4
4
  /**
5
5
  * Connection credentials for upstash redis.
package/fastly.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-Dc6Llqgr.js';
2
- export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, d as Requester, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-Dc6Llqgr.js';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-C3G81zLz.js';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetExCommand, I as GetRangeCommand, J as GetSetCommand, K as HDelCommand, L as HExistsCommand, N as HGetAllCommand, M as HGetCommand, O as HIncrByCommand, Q as HIncrByFloatCommand, S as HKeysCommand, T as HLenCommand, V as HMGetCommand, W as HMSetCommand, X as HRandFieldCommand, Y as HScanCommand, Z as HSetCommand, _ as HSetNXCommand, $ as HStrLenCommand, a0 as HValsCommand, a2 as IncrByCommand, a3 as IncrByFloatCommand, a1 as IncrCommand, a4 as JsonArrAppendCommand, a5 as JsonArrIndexCommand, a6 as JsonArrInsertCommand, a7 as JsonArrLenCommand, a8 as JsonArrPopCommand, a9 as JsonArrTrimCommand, aa as JsonClearCommand, ab as JsonDelCommand, ac as JsonForgetCommand, ad as JsonGetCommand, ae as JsonMGetCommand, af as JsonNumIncrByCommand, ag as JsonNumMultByCommand, ah as JsonObjKeysCommand, ai as JsonObjLenCommand, aj as JsonRespCommand, ak as JsonSetCommand, al as JsonStrAppendCommand, am as JsonStrLenCommand, an as JsonToggleCommand, ao as JsonTypeCommand, ap as KeysCommand, aq as LIndexCommand, ar as LInsertCommand, as as LLenCommand, at as LMoveCommand, au as LPopCommand, av as LPushCommand, aw as LPushXCommand, ax as LRangeCommand, ay as LRemCommand, az as LSetCommand, aA as LTrimCommand, aB as MGetCommand, aC as MSetCommand, aD as MSetNXCommand, aG as PExpireAtCommand, aF as PExpireCommand, aI as PSetEXCommand, aJ as PTtlCommand, aE as PersistCommand, aH as PingCommand, P as Pipeline, aK as PublishCommand, aO as RPopCommand, aP as RPushCommand, aQ as RPushXCommand, aL as RandomKeyCommand, aM as RenameCommand, aN as RenameNXCommand, d as Requester, aR as SAddCommand, aU as SCardCommand, aY as SDiffCommand, aZ as SDiffStoreCommand, b4 as SInterCommand, b5 as SInterStoreCommand, b6 as SIsMemberCommand, b8 as SMIsMemberCommand, b7 as SMembersCommand, b9 as SMoveCommand, ba as SPopCommand, bb as SRandMemberCommand, bc as SRemCommand, bd as SScanCommand, bf as SUnionCommand, bg as SUnionStoreCommand, aS as ScanCommand, aT as ScanCommandOptions, bp as ScoreMember, aV as ScriptExistsCommand, aW as ScriptFlushCommand, aX as ScriptLoadCommand, b0 as SetBitCommand, a_ as SetCommand, a$ as SetCommandOptions, b1 as SetExCommand, b2 as SetNxCommand, b3 as SetRangeCommand, be as StrLenCommand, bh as TimeCommand, bi as TouchCommand, bj as TtlCommand, bk as Type, bl as TypeCommand, bm as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bn as XAddCommand, bo as XRangeCommand, br as ZAddCommand, bq as ZAddCommandOptions, bs as ZCardCommand, bt as ZCountCommand, bu as ZDiffStoreCommand, bv as ZIncrByCommand, bw as ZInterStoreCommand, bx as ZInterStoreCommandOptions, by as ZLexCountCommand, bz as ZMScoreCommand, bA as ZPopMaxCommand, bB as ZPopMinCommand, bC as ZRangeCommand, bD as ZRangeCommandOptions, bE as ZRankCommand, bF as ZRemCommand, bG as ZRemRangeByLexCommand, bH as ZRemRangeByRankCommand, bI as ZRemRangeByScoreCommand, bJ as ZRevRankCommand, bK as ZScanCommand, bL as ZScoreCommand, bM as ZUnionCommand, bN as ZUnionCommandOptions, bO as ZUnionStoreCommand, bP as ZUnionStoreCommandOptions, e as errors } from './zmscore-C3G81zLz.js';
3
3
 
4
4
  /**
5
5
  * Connection credentials for upstash redis.
package/fastly.js CHANGED
@@ -146,7 +146,9 @@ var HttpClient = class {
146
146
  break;
147
147
  }
148
148
  error = error_;
149
- await new Promise((r) => setTimeout(r, this.retry.backoff(i)));
149
+ if (i < this.retry.attempts) {
150
+ await new Promise((r) => setTimeout(r, this.retry.backoff(i)));
151
+ }
150
152
  }
151
153
  }
152
154
  if (!res) {
@@ -522,6 +524,14 @@ var EvalshaCommand = class extends Command {
522
524
  }
523
525
  };
524
526
 
527
+ // pkg/commands/exec.ts
528
+ var ExecCommand = class extends Command {
529
+ constructor(cmd, opts) {
530
+ const normalizedCmd = cmd.map((arg) => typeof arg === "string" ? arg : String(arg));
531
+ super(normalizedCmd, opts);
532
+ }
533
+ };
534
+
525
535
  // pkg/commands/exists.ts
526
536
  var ExistsCommand = class extends Command {
527
537
  constructor(cmd, opts) {
@@ -738,6 +748,27 @@ var GetDelCommand = class extends Command {
738
748
  }
739
749
  };
740
750
 
751
+ // pkg/commands/getex.ts
752
+ var GetExCommand = class extends Command {
753
+ constructor([key, opts], cmdOpts) {
754
+ const command = ["getex", key];
755
+ if (opts) {
756
+ if ("ex" in opts && typeof opts.ex === "number") {
757
+ command.push("ex", opts.ex);
758
+ } else if ("px" in opts && typeof opts.px === "number") {
759
+ command.push("px", opts.px);
760
+ } else if ("exat" in opts && typeof opts.exat === "number") {
761
+ command.push("exat", opts.exat);
762
+ } else if ("pxat" in opts && typeof opts.pxat === "number") {
763
+ command.push("pxat", opts.pxat);
764
+ } else if ("persist" in opts && opts.persist) {
765
+ command.push("persist");
766
+ }
767
+ }
768
+ super(command, cmdOpts);
769
+ }
770
+ };
771
+
741
772
  // pkg/commands/getrange.ts
742
773
  var GetRangeCommand = class extends Command {
743
774
  constructor(cmd, opts) {
@@ -2408,6 +2439,10 @@ var Pipeline = class {
2408
2439
  * @see https://redis.io/commands/getdel
2409
2440
  */
2410
2441
  getdel = (...args) => this.chain(new GetDelCommand(args, this.commandOptions));
2442
+ /**
2443
+ * @see https://redis.io/commands/getex
2444
+ */
2445
+ getex = (...args) => this.chain(new GetExCommand(args, this.commandOptions));
2411
2446
  /**
2412
2447
  * @see https://redis.io/commands/getrange
2413
2448
  */
@@ -3279,6 +3314,10 @@ var Redis = class {
3279
3314
  * @see https://redis.io/commands/evalsha
3280
3315
  */
3281
3316
  evalsha = (...args) => new EvalshaCommand(args, this.opts).exec(this.client);
3317
+ /**
3318
+ * Generic method to execute any Redis command.
3319
+ */
3320
+ exec = (args) => new ExecCommand(args, this.opts).exec(this.client);
3282
3321
  /**
3283
3322
  * @see https://redis.io/commands/exists
3284
3323
  */
@@ -3335,6 +3374,10 @@ var Redis = class {
3335
3374
  * @see https://redis.io/commands/getdel
3336
3375
  */
3337
3376
  getdel = (...args) => new GetDelCommand(args, this.opts).exec(this.client);
3377
+ /**
3378
+ * @see https://redis.io/commands/getex
3379
+ */
3380
+ getex = (...args) => new GetExCommand(args, this.opts).exec(this.client);
3338
3381
  /**
3339
3382
  * @see https://redis.io/commands/getrange
3340
3383
  */
@@ -3828,7 +3871,7 @@ var Redis = class {
3828
3871
  };
3829
3872
 
3830
3873
  // version.ts
3831
- var VERSION = "v1.34.3";
3874
+ var VERSION = "v1.34.4";
3832
3875
 
3833
3876
  // platforms/fastly.ts
3834
3877
  var Redis2 = class extends Redis {
package/fastly.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Redis,
4
4
  VERSION,
5
5
  error_exports
6
- } from "./chunk-FV6JMGNF.mjs";
6
+ } from "./chunk-T6D4KAGH.mjs";
7
7
 
8
8
  // platforms/fastly.ts
9
9
  var Redis2 = class extends Redis {
package/nodejs.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-Dc6Llqgr.mjs';
2
- export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, d as Requester, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-Dc6Llqgr.mjs';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-C3G81zLz.mjs';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetExCommand, I as GetRangeCommand, J as GetSetCommand, K as HDelCommand, L as HExistsCommand, N as HGetAllCommand, M as HGetCommand, O as HIncrByCommand, Q as HIncrByFloatCommand, S as HKeysCommand, T as HLenCommand, V as HMGetCommand, W as HMSetCommand, X as HRandFieldCommand, Y as HScanCommand, Z as HSetCommand, _ as HSetNXCommand, $ as HStrLenCommand, a0 as HValsCommand, a2 as IncrByCommand, a3 as IncrByFloatCommand, a1 as IncrCommand, a4 as JsonArrAppendCommand, a5 as JsonArrIndexCommand, a6 as JsonArrInsertCommand, a7 as JsonArrLenCommand, a8 as JsonArrPopCommand, a9 as JsonArrTrimCommand, aa as JsonClearCommand, ab as JsonDelCommand, ac as JsonForgetCommand, ad as JsonGetCommand, ae as JsonMGetCommand, af as JsonNumIncrByCommand, ag as JsonNumMultByCommand, ah as JsonObjKeysCommand, ai as JsonObjLenCommand, aj as JsonRespCommand, ak as JsonSetCommand, al as JsonStrAppendCommand, am as JsonStrLenCommand, an as JsonToggleCommand, ao as JsonTypeCommand, ap as KeysCommand, aq as LIndexCommand, ar as LInsertCommand, as as LLenCommand, at as LMoveCommand, au as LPopCommand, av as LPushCommand, aw as LPushXCommand, ax as LRangeCommand, ay as LRemCommand, az as LSetCommand, aA as LTrimCommand, aB as MGetCommand, aC as MSetCommand, aD as MSetNXCommand, aG as PExpireAtCommand, aF as PExpireCommand, aI as PSetEXCommand, aJ as PTtlCommand, aE as PersistCommand, aH as PingCommand, P as Pipeline, aK as PublishCommand, aO as RPopCommand, aP as RPushCommand, aQ as RPushXCommand, aL as RandomKeyCommand, aM as RenameCommand, aN as RenameNXCommand, d as Requester, aR as SAddCommand, aU as SCardCommand, aY as SDiffCommand, aZ as SDiffStoreCommand, b4 as SInterCommand, b5 as SInterStoreCommand, b6 as SIsMemberCommand, b8 as SMIsMemberCommand, b7 as SMembersCommand, b9 as SMoveCommand, ba as SPopCommand, bb as SRandMemberCommand, bc as SRemCommand, bd as SScanCommand, bf as SUnionCommand, bg as SUnionStoreCommand, aS as ScanCommand, aT as ScanCommandOptions, bp as ScoreMember, aV as ScriptExistsCommand, aW as ScriptFlushCommand, aX as ScriptLoadCommand, b0 as SetBitCommand, a_ as SetCommand, a$ as SetCommandOptions, b1 as SetExCommand, b2 as SetNxCommand, b3 as SetRangeCommand, be as StrLenCommand, bh as TimeCommand, bi as TouchCommand, bj as TtlCommand, bk as Type, bl as TypeCommand, bm as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bn as XAddCommand, bo as XRangeCommand, br as ZAddCommand, bq as ZAddCommandOptions, bs as ZCardCommand, bt as ZCountCommand, bu as ZDiffStoreCommand, bv as ZIncrByCommand, bw as ZInterStoreCommand, bx as ZInterStoreCommandOptions, by as ZLexCountCommand, bz as ZMScoreCommand, bA as ZPopMaxCommand, bB as ZPopMinCommand, bC as ZRangeCommand, bD as ZRangeCommandOptions, bE as ZRankCommand, bF as ZRemCommand, bG as ZRemRangeByLexCommand, bH as ZRemRangeByRankCommand, bI as ZRemRangeByScoreCommand, bJ as ZRevRankCommand, bK as ZScanCommand, bL as ZScoreCommand, bM as ZUnionCommand, bN as ZUnionCommandOptions, bO as ZUnionStoreCommand, bP as ZUnionStoreCommandOptions, e as errors } from './zmscore-C3G81zLz.mjs';
3
3
 
4
4
  /**
5
5
  * Connection credentials for upstash redis.
package/nodejs.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-Dc6Llqgr.js';
2
- export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetRangeCommand, I as GetSetCommand, J as HDelCommand, K as HExistsCommand, M as HGetAllCommand, L as HGetCommand, N as HIncrByCommand, O as HIncrByFloatCommand, Q as HKeysCommand, S as HLenCommand, T as HMGetCommand, V as HMSetCommand, W as HRandFieldCommand, X as HScanCommand, Y as HSetCommand, Z as HSetNXCommand, _ as HStrLenCommand, $ as HValsCommand, a1 as IncrByCommand, a2 as IncrByFloatCommand, a0 as IncrCommand, a3 as JsonArrAppendCommand, a4 as JsonArrIndexCommand, a5 as JsonArrInsertCommand, a6 as JsonArrLenCommand, a7 as JsonArrPopCommand, a8 as JsonArrTrimCommand, a9 as JsonClearCommand, aa as JsonDelCommand, ab as JsonForgetCommand, ac as JsonGetCommand, ad as JsonMGetCommand, ae as JsonNumIncrByCommand, af as JsonNumMultByCommand, ag as JsonObjKeysCommand, ah as JsonObjLenCommand, ai as JsonRespCommand, aj as JsonSetCommand, ak as JsonStrAppendCommand, al as JsonStrLenCommand, am as JsonToggleCommand, an as JsonTypeCommand, ao as KeysCommand, ap as LIndexCommand, aq as LInsertCommand, ar as LLenCommand, as as LMoveCommand, at as LPopCommand, au as LPushCommand, av as LPushXCommand, aw as LRangeCommand, ax as LRemCommand, ay as LSetCommand, az as LTrimCommand, aA as MGetCommand, aB as MSetCommand, aC as MSetNXCommand, aF as PExpireAtCommand, aE as PExpireCommand, aH as PSetEXCommand, aI as PTtlCommand, aD as PersistCommand, aG as PingCommand, P as Pipeline, aJ as PublishCommand, aN as RPopCommand, aO as RPushCommand, aP as RPushXCommand, aK as RandomKeyCommand, aL as RenameCommand, aM as RenameNXCommand, d as Requester, aQ as SAddCommand, aT as SCardCommand, aX as SDiffCommand, aY as SDiffStoreCommand, b3 as SInterCommand, b4 as SInterStoreCommand, b5 as SIsMemberCommand, b7 as SMIsMemberCommand, b6 as SMembersCommand, b8 as SMoveCommand, b9 as SPopCommand, ba as SRandMemberCommand, bb as SRemCommand, bc as SScanCommand, be as SUnionCommand, bf as SUnionStoreCommand, aR as ScanCommand, aS as ScanCommandOptions, bo as ScoreMember, aU as ScriptExistsCommand, aV as ScriptFlushCommand, aW as ScriptLoadCommand, a$ as SetBitCommand, aZ as SetCommand, a_ as SetCommandOptions, b0 as SetExCommand, b1 as SetNxCommand, b2 as SetRangeCommand, bd as StrLenCommand, bg as TimeCommand, bh as TouchCommand, bi as TtlCommand, bj as Type, bk as TypeCommand, bl as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bm as XAddCommand, bn as XRangeCommand, bq as ZAddCommand, bp as ZAddCommandOptions, br as ZCardCommand, bs as ZCountCommand, bt as ZDiffStoreCommand, bu as ZIncrByCommand, bv as ZInterStoreCommand, bw as ZInterStoreCommandOptions, bx as ZLexCountCommand, by as ZMScoreCommand, bz as ZPopMaxCommand, bA as ZPopMinCommand, bB as ZRangeCommand, bC as ZRangeCommandOptions, bD as ZRankCommand, bE as ZRemCommand, bF as ZRemRangeByLexCommand, bG as ZRemRangeByRankCommand, bH as ZRemRangeByScoreCommand, bI as ZRevRankCommand, bJ as ZScanCommand, bK as ZScoreCommand, bL as ZUnionCommand, bM as ZUnionCommandOptions, bN as ZUnionStoreCommand, bO as ZUnionStoreCommandOptions, e as errors } from './zmscore-Dc6Llqgr.js';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-C3G81zLz.js';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetExCommand, I as GetRangeCommand, J as GetSetCommand, K as HDelCommand, L as HExistsCommand, N as HGetAllCommand, M as HGetCommand, O as HIncrByCommand, Q as HIncrByFloatCommand, S as HKeysCommand, T as HLenCommand, V as HMGetCommand, W as HMSetCommand, X as HRandFieldCommand, Y as HScanCommand, Z as HSetCommand, _ as HSetNXCommand, $ as HStrLenCommand, a0 as HValsCommand, a2 as IncrByCommand, a3 as IncrByFloatCommand, a1 as IncrCommand, a4 as JsonArrAppendCommand, a5 as JsonArrIndexCommand, a6 as JsonArrInsertCommand, a7 as JsonArrLenCommand, a8 as JsonArrPopCommand, a9 as JsonArrTrimCommand, aa as JsonClearCommand, ab as JsonDelCommand, ac as JsonForgetCommand, ad as JsonGetCommand, ae as JsonMGetCommand, af as JsonNumIncrByCommand, ag as JsonNumMultByCommand, ah as JsonObjKeysCommand, ai as JsonObjLenCommand, aj as JsonRespCommand, ak as JsonSetCommand, al as JsonStrAppendCommand, am as JsonStrLenCommand, an as JsonToggleCommand, ao as JsonTypeCommand, ap as KeysCommand, aq as LIndexCommand, ar as LInsertCommand, as as LLenCommand, at as LMoveCommand, au as LPopCommand, av as LPushCommand, aw as LPushXCommand, ax as LRangeCommand, ay as LRemCommand, az as LSetCommand, aA as LTrimCommand, aB as MGetCommand, aC as MSetCommand, aD as MSetNXCommand, aG as PExpireAtCommand, aF as PExpireCommand, aI as PSetEXCommand, aJ as PTtlCommand, aE as PersistCommand, aH as PingCommand, P as Pipeline, aK as PublishCommand, aO as RPopCommand, aP as RPushCommand, aQ as RPushXCommand, aL as RandomKeyCommand, aM as RenameCommand, aN as RenameNXCommand, d as Requester, aR as SAddCommand, aU as SCardCommand, aY as SDiffCommand, aZ as SDiffStoreCommand, b4 as SInterCommand, b5 as SInterStoreCommand, b6 as SIsMemberCommand, b8 as SMIsMemberCommand, b7 as SMembersCommand, b9 as SMoveCommand, ba as SPopCommand, bb as SRandMemberCommand, bc as SRemCommand, bd as SScanCommand, bf as SUnionCommand, bg as SUnionStoreCommand, aS as ScanCommand, aT as ScanCommandOptions, bp as ScoreMember, aV as ScriptExistsCommand, aW as ScriptFlushCommand, aX as ScriptLoadCommand, b0 as SetBitCommand, a_ as SetCommand, a$ as SetCommandOptions, b1 as SetExCommand, b2 as SetNxCommand, b3 as SetRangeCommand, be as StrLenCommand, bh as TimeCommand, bi as TouchCommand, bj as TtlCommand, bk as Type, bl as TypeCommand, bm as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bn as XAddCommand, bo as XRangeCommand, br as ZAddCommand, bq as ZAddCommandOptions, bs as ZCardCommand, bt as ZCountCommand, bu as ZDiffStoreCommand, bv as ZIncrByCommand, bw as ZInterStoreCommand, bx as ZInterStoreCommandOptions, by as ZLexCountCommand, bz as ZMScoreCommand, bA as ZPopMaxCommand, bB as ZPopMinCommand, bC as ZRangeCommand, bD as ZRangeCommandOptions, bE as ZRankCommand, bF as ZRemCommand, bG as ZRemRangeByLexCommand, bH as ZRemRangeByRankCommand, bI as ZRemRangeByScoreCommand, bJ as ZRevRankCommand, bK as ZScanCommand, bL as ZScoreCommand, bM as ZUnionCommand, bN as ZUnionCommandOptions, bO as ZUnionStoreCommand, bP as ZUnionStoreCommandOptions, e as errors } from './zmscore-C3G81zLz.js';
3
3
 
4
4
  /**
5
5
  * Connection credentials for upstash redis.
package/nodejs.js CHANGED
@@ -146,7 +146,9 @@ var HttpClient = class {
146
146
  break;
147
147
  }
148
148
  error = error_;
149
- await new Promise((r) => setTimeout(r, this.retry.backoff(i)));
149
+ if (i < this.retry.attempts) {
150
+ await new Promise((r) => setTimeout(r, this.retry.backoff(i)));
151
+ }
150
152
  }
151
153
  }
152
154
  if (!res) {
@@ -522,6 +524,14 @@ var EvalshaCommand = class extends Command {
522
524
  }
523
525
  };
524
526
 
527
+ // pkg/commands/exec.ts
528
+ var ExecCommand = class extends Command {
529
+ constructor(cmd, opts) {
530
+ const normalizedCmd = cmd.map((arg) => typeof arg === "string" ? arg : String(arg));
531
+ super(normalizedCmd, opts);
532
+ }
533
+ };
534
+
525
535
  // pkg/commands/exists.ts
526
536
  var ExistsCommand = class extends Command {
527
537
  constructor(cmd, opts) {
@@ -738,6 +748,27 @@ var GetDelCommand = class extends Command {
738
748
  }
739
749
  };
740
750
 
751
+ // pkg/commands/getex.ts
752
+ var GetExCommand = class extends Command {
753
+ constructor([key, opts], cmdOpts) {
754
+ const command = ["getex", key];
755
+ if (opts) {
756
+ if ("ex" in opts && typeof opts.ex === "number") {
757
+ command.push("ex", opts.ex);
758
+ } else if ("px" in opts && typeof opts.px === "number") {
759
+ command.push("px", opts.px);
760
+ } else if ("exat" in opts && typeof opts.exat === "number") {
761
+ command.push("exat", opts.exat);
762
+ } else if ("pxat" in opts && typeof opts.pxat === "number") {
763
+ command.push("pxat", opts.pxat);
764
+ } else if ("persist" in opts && opts.persist) {
765
+ command.push("persist");
766
+ }
767
+ }
768
+ super(command, cmdOpts);
769
+ }
770
+ };
771
+
741
772
  // pkg/commands/getrange.ts
742
773
  var GetRangeCommand = class extends Command {
743
774
  constructor(cmd, opts) {
@@ -2408,6 +2439,10 @@ var Pipeline = class {
2408
2439
  * @see https://redis.io/commands/getdel
2409
2440
  */
2410
2441
  getdel = (...args) => this.chain(new GetDelCommand(args, this.commandOptions));
2442
+ /**
2443
+ * @see https://redis.io/commands/getex
2444
+ */
2445
+ getex = (...args) => this.chain(new GetExCommand(args, this.commandOptions));
2411
2446
  /**
2412
2447
  * @see https://redis.io/commands/getrange
2413
2448
  */
@@ -3279,6 +3314,10 @@ var Redis = class {
3279
3314
  * @see https://redis.io/commands/evalsha
3280
3315
  */
3281
3316
  evalsha = (...args) => new EvalshaCommand(args, this.opts).exec(this.client);
3317
+ /**
3318
+ * Generic method to execute any Redis command.
3319
+ */
3320
+ exec = (args) => new ExecCommand(args, this.opts).exec(this.client);
3282
3321
  /**
3283
3322
  * @see https://redis.io/commands/exists
3284
3323
  */
@@ -3335,6 +3374,10 @@ var Redis = class {
3335
3374
  * @see https://redis.io/commands/getdel
3336
3375
  */
3337
3376
  getdel = (...args) => new GetDelCommand(args, this.opts).exec(this.client);
3377
+ /**
3378
+ * @see https://redis.io/commands/getex
3379
+ */
3380
+ getex = (...args) => new GetExCommand(args, this.opts).exec(this.client);
3338
3381
  /**
3339
3382
  * @see https://redis.io/commands/getrange
3340
3383
  */
@@ -3828,7 +3871,7 @@ var Redis = class {
3828
3871
  };
3829
3872
 
3830
3873
  // version.ts
3831
- var VERSION = "v1.34.3";
3874
+ var VERSION = "v1.34.4";
3832
3875
 
3833
3876
  // platforms/nodejs.ts
3834
3877
  if (typeof atob === "undefined") {
package/nodejs.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  Redis,
4
4
  VERSION,
5
5
  error_exports
6
- } from "./chunk-FV6JMGNF.mjs";
6
+ } from "./chunk-T6D4KAGH.mjs";
7
7
 
8
8
  // platforms/nodejs.ts
9
9
  if (typeof atob === "undefined") {
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@upstash/redis","version":"v1.34.3","main":"./nodejs.js","module":"./nodejs.mjs","types":"./nodejs.d.ts","exports":{".":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./node":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.js":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.mjs":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./fastly":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.js":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.mjs":{"import":"./fastly.mjs","require":"./fastly.js"}},"description":"An HTTP/REST based Redis client built on top of Upstash REST API.","repository":{"type":"git","url":"git+https://github.com/upstash/upstash-redis.git"},"keywords":["redis","database","serverless","edge","upstash"],"files":["./*"],"scripts":{"build":"tsup && cp package.json README.md LICENSE dist/","test":"bun test pkg","fmt":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","lint":"eslint \"**/*.{js,ts,tsx}\" --quiet --fix","format":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","format:check":"prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"","lint:fix":"eslint . -c .ts,.tsx,.js,.jsx --fix","commit":"cz","lint:format":"bun run lint:fix && bun run format","check-exports":"bun run build && cd dist && attw -P"},"author":"Andreas Thomas <dev@chronark.com>","license":"MIT","bugs":{"url":"https://github.com/upstash/upstash-redis/issues"},"homepage":"https://github.com/upstash/upstash-redis#readme","devDependencies":{"@biomejs/biome":"latest","@commitlint/cli":"^19.3.0","@commitlint/config-conventional":"^19.2.2","@types/crypto-js":"^4.1.3","@typescript-eslint/eslint-plugin":"8.4.0","@typescript-eslint/parser":"8.4.0","bun-types":"1.0.33","eslint":"9.10.0","eslint-plugin-unicorn":"55.0.0","husky":"^9.1.1","prettier":"^3.3.3","tsup":"^8.2.3","typescript":"latest"},"dependencies":{"crypto-js":"^4.2.0"}}
1
+ {"name":"@upstash/redis","version":"v1.34.4","main":"./nodejs.js","module":"./nodejs.mjs","types":"./nodejs.d.ts","exports":{".":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./node":{"import":"./nodejs.mjs","require":"./nodejs.js"},"./cloudflare":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.js":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./cloudflare.mjs":{"import":"./cloudflare.mjs","require":"./cloudflare.js"},"./fastly":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.js":{"import":"./fastly.mjs","require":"./fastly.js"},"./fastly.mjs":{"import":"./fastly.mjs","require":"./fastly.js"}},"description":"An HTTP/REST based Redis client built on top of Upstash REST API.","repository":{"type":"git","url":"git+https://github.com/upstash/upstash-redis.git"},"keywords":["redis","database","serverless","edge","upstash"],"files":["./*"],"scripts":{"build":"tsup && cp package.json README.md LICENSE dist/","test":"bun test pkg","fmt":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","lint":"eslint \"**/*.{js,ts,tsx}\" --quiet --fix","format":"prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"","format:check":"prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"","lint:fix":"eslint . -c .ts,.tsx,.js,.jsx --fix","commit":"cz","lint:format":"bun run lint:fix && bun run format","check-exports":"bun run build && cd dist && attw -P"},"author":"Andreas Thomas <dev@chronark.com>","license":"MIT","bugs":{"url":"https://github.com/upstash/upstash-redis/issues"},"homepage":"https://github.com/upstash/upstash-redis#readme","devDependencies":{"@biomejs/biome":"latest","@commitlint/cli":"^19.3.0","@commitlint/config-conventional":"^19.2.2","@types/crypto-js":"^4.1.3","@typescript-eslint/eslint-plugin":"8.4.0","@typescript-eslint/parser":"8.4.0","bun-types":"1.0.33","eslint":"9.10.0","eslint-plugin-unicorn":"55.0.0","husky":"^9.1.1","prettier":"^3.3.3","tsup":"^8.2.3","typescript":"latest"},"dependencies":{"crypto-js":"^4.2.0"}}
@@ -563,6 +563,50 @@ declare class GetDelCommand<TData = string> extends Command<unknown | null, TDat
563
563
  constructor(cmd: [key: string], opts?: CommandOptions<unknown | null, TData | null>);
564
564
  }
565
565
 
566
+ type GetExCommandOptions = {
567
+ ex: number;
568
+ px?: never;
569
+ exat?: never;
570
+ pxat?: never;
571
+ persist?: never;
572
+ } | {
573
+ ex?: never;
574
+ px: number;
575
+ exat?: never;
576
+ pxat?: never;
577
+ persist?: never;
578
+ } | {
579
+ ex?: never;
580
+ px?: never;
581
+ exat: number;
582
+ pxat?: never;
583
+ persist?: never;
584
+ } | {
585
+ ex?: never;
586
+ px?: never;
587
+ exat?: never;
588
+ pxat: number;
589
+ persist?: never;
590
+ } | {
591
+ ex?: never;
592
+ px?: never;
593
+ exat?: never;
594
+ pxat?: never;
595
+ persist: true;
596
+ } | {
597
+ ex?: never;
598
+ px?: never;
599
+ exat?: never;
600
+ pxat?: never;
601
+ persist?: never;
602
+ };
603
+ /**
604
+ * @see https://redis.io/commands/getex
605
+ */
606
+ declare class GetExCommand<TData = string> extends Command<unknown | null, TData | null> {
607
+ constructor([key, opts]: [key: string, opts?: GetExCommandOptions], cmdOpts?: CommandOptions<unknown | null, TData | null>);
608
+ }
609
+
566
610
  /**
567
611
  * @see https://redis.io/commands/getrange
568
612
  */
@@ -1891,6 +1935,46 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1891
1935
  * @see https://redis.io/commands/getdel
1892
1936
  */
1893
1937
  getdel: <TData>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
1938
+ /**
1939
+ * @see https://redis.io/commands/getex
1940
+ */
1941
+ getex: <TData>(key: string, opts?: ({
1942
+ ex: number;
1943
+ px?: never;
1944
+ exat?: never;
1945
+ pxat?: never;
1946
+ persist?: never;
1947
+ } | {
1948
+ ex?: never;
1949
+ px: number;
1950
+ exat?: never;
1951
+ pxat?: never;
1952
+ persist?: never;
1953
+ } | {
1954
+ ex?: never;
1955
+ px?: never;
1956
+ exat: number;
1957
+ pxat?: never;
1958
+ persist?: never;
1959
+ } | {
1960
+ ex?: never;
1961
+ px?: never;
1962
+ exat?: never;
1963
+ pxat: number;
1964
+ persist?: never;
1965
+ } | {
1966
+ ex?: never;
1967
+ px?: never;
1968
+ exat?: never;
1969
+ pxat?: never;
1970
+ persist: true;
1971
+ } | {
1972
+ ex?: never;
1973
+ px?: never;
1974
+ exat?: never;
1975
+ pxat?: never;
1976
+ persist?: never;
1977
+ }) | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
1894
1978
  /**
1895
1979
  * @see https://redis.io/commands/getrange
1896
1980
  */
@@ -2792,6 +2876,10 @@ declare class Redis {
2792
2876
  * @see https://redis.io/commands/evalsha
2793
2877
  */
2794
2878
  evalsha: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => Promise<TData>;
2879
+ /**
2880
+ * Generic method to execute any Redis command.
2881
+ */
2882
+ exec: <TResult>(args: [command: string, ...args: (string | number | boolean)[]]) => Promise<TResult>;
2795
2883
  /**
2796
2884
  * @see https://redis.io/commands/exists
2797
2885
  */
@@ -2916,6 +3004,46 @@ declare class Redis {
2916
3004
  * @see https://redis.io/commands/getdel
2917
3005
  */
2918
3006
  getdel: <TData>(key: string) => Promise<TData | null>;
3007
+ /**
3008
+ * @see https://redis.io/commands/getex
3009
+ */
3010
+ getex: <TData>(key: string, opts?: ({
3011
+ ex: number;
3012
+ px?: never;
3013
+ exat?: never;
3014
+ pxat?: never;
3015
+ persist?: never;
3016
+ } | {
3017
+ ex?: never;
3018
+ px: number;
3019
+ exat?: never;
3020
+ pxat?: never;
3021
+ persist?: never;
3022
+ } | {
3023
+ ex?: never;
3024
+ px?: never;
3025
+ exat: number;
3026
+ pxat?: never;
3027
+ persist?: never;
3028
+ } | {
3029
+ ex?: never;
3030
+ px?: never;
3031
+ exat?: never;
3032
+ pxat: number;
3033
+ persist?: never;
3034
+ } | {
3035
+ ex?: never;
3036
+ px?: never;
3037
+ exat?: never;
3038
+ pxat?: never;
3039
+ persist: true;
3040
+ } | {
3041
+ ex?: never;
3042
+ px?: never;
3043
+ exat?: never;
3044
+ pxat?: never;
3045
+ persist?: never;
3046
+ }) | undefined) => Promise<TData | null>;
2919
3047
  /**
2920
3048
  * @see https://redis.io/commands/getrange
2921
3049
  */
@@ -3506,4 +3634,4 @@ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] |
3506
3634
  constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
3507
3635
  }
3508
3636
 
3509
- export { HValsCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, GetRangeCommand as H, GetSetCommand as I, HDelCommand as J, HExistsCommand as K, HGetCommand as L, HGetAllCommand as M, HIncrByCommand as N, HIncrByFloatCommand as O, Pipeline as P, HKeysCommand as Q, type RedisOptions as R, HLenCommand as S, HMGetCommand as T, type UpstashRequest as U, HMSetCommand as V, HRandFieldCommand as W, HScanCommand as X, HSetCommand as Y, HSetNXCommand as Z, HStrLenCommand as _, type RequesterConfig as a, SetBitCommand as a$, IncrCommand as a0, IncrByCommand as a1, IncrByFloatCommand as a2, JsonArrAppendCommand as a3, JsonArrIndexCommand as a4, JsonArrInsertCommand as a5, JsonArrLenCommand as a6, JsonArrPopCommand as a7, JsonArrTrimCommand as a8, JsonClearCommand as a9, MGetCommand as aA, MSetCommand as aB, MSetNXCommand as aC, PersistCommand as aD, PExpireCommand as aE, PExpireAtCommand as aF, PingCommand as aG, PSetEXCommand as aH, PTtlCommand as aI, PublishCommand as aJ, RandomKeyCommand as aK, RenameCommand as aL, RenameNXCommand as aM, RPopCommand as aN, RPushCommand as aO, RPushXCommand as aP, SAddCommand as aQ, ScanCommand as aR, type ScanCommandOptions as aS, SCardCommand as aT, ScriptExistsCommand as aU, ScriptFlushCommand as aV, ScriptLoadCommand as aW, SDiffCommand as aX, SDiffStoreCommand as aY, SetCommand as aZ, type SetCommandOptions as a_, JsonDelCommand as aa, JsonForgetCommand as ab, JsonGetCommand as ac, JsonMGetCommand as ad, JsonNumIncrByCommand as ae, JsonNumMultByCommand as af, JsonObjKeysCommand as ag, JsonObjLenCommand as ah, JsonRespCommand as ai, JsonSetCommand as aj, JsonStrAppendCommand as ak, JsonStrLenCommand as al, JsonToggleCommand as am, JsonTypeCommand as an, KeysCommand as ao, LIndexCommand as ap, LInsertCommand as aq, LLenCommand as ar, LMoveCommand as as, LPopCommand as at, LPushCommand as au, LPushXCommand as av, LRangeCommand as aw, LRemCommand as ax, LSetCommand as ay, LTrimCommand as az, Redis as b, SetExCommand as b0, SetNxCommand as b1, SetRangeCommand as b2, SInterCommand as b3, SInterStoreCommand as b4, SIsMemberCommand as b5, SMembersCommand as b6, SMIsMemberCommand as b7, SMoveCommand as b8, SPopCommand as b9, ZPopMinCommand as bA, ZRangeCommand as bB, type ZRangeCommandOptions as bC, ZRankCommand as bD, ZRemCommand as bE, ZRemRangeByLexCommand as bF, ZRemRangeByRankCommand as bG, ZRemRangeByScoreCommand as bH, ZRevRankCommand as bI, ZScanCommand as bJ, ZScoreCommand as bK, ZUnionCommand as bL, type ZUnionCommandOptions as bM, ZUnionStoreCommand as bN, type ZUnionStoreCommandOptions as bO, SRandMemberCommand as ba, SRemCommand as bb, SScanCommand as bc, StrLenCommand as bd, SUnionCommand as be, SUnionStoreCommand as bf, TimeCommand as bg, TouchCommand as bh, TtlCommand as bi, type Type as bj, TypeCommand as bk, UnlinkCommand as bl, XAddCommand as bm, XRangeCommand as bn, type ScoreMember as bo, type ZAddCommandOptions as bp, ZAddCommand as bq, ZCardCommand as br, ZCountCommand as bs, ZDiffStoreCommand as bt, ZIncrByCommand as bu, ZInterStoreCommand as bv, type ZInterStoreCommandOptions as bw, ZLexCountCommand as bx, ZMScoreCommand as by, ZPopMaxCommand as bz, type UpstashResponse as c, type Requester as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalCommand as k, EvalshaCommand as l, ExistsCommand as m, ExpireCommand as n, ExpireAtCommand as o, FlushDBCommand as p, type GeoAddCommandOptions as q, type GeoMember as r, GeoDistCommand as s, GeoHashCommand as t, GeoPosCommand as u, GeoSearchCommand as v, GeoSearchStoreCommand as w, GetCommand as x, GetBitCommand as y, GetDelCommand as z };
3637
+ export { HStrLenCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, GetExCommand as H, GetRangeCommand as I, GetSetCommand as J, HDelCommand as K, HExistsCommand as L, HGetCommand as M, HGetAllCommand as N, HIncrByCommand as O, Pipeline as P, HIncrByFloatCommand as Q, type RedisOptions as R, HKeysCommand as S, HLenCommand as T, type UpstashRequest as U, HMGetCommand as V, HMSetCommand as W, HRandFieldCommand as X, HScanCommand as Y, HSetCommand as Z, HSetNXCommand as _, type RequesterConfig as a, type SetCommandOptions as a$, HValsCommand as a0, IncrCommand as a1, IncrByCommand as a2, IncrByFloatCommand as a3, JsonArrAppendCommand as a4, JsonArrIndexCommand as a5, JsonArrInsertCommand as a6, JsonArrLenCommand as a7, JsonArrPopCommand as a8, JsonArrTrimCommand as a9, LTrimCommand as aA, MGetCommand as aB, MSetCommand as aC, MSetNXCommand as aD, PersistCommand as aE, PExpireCommand as aF, PExpireAtCommand as aG, PingCommand as aH, PSetEXCommand as aI, PTtlCommand as aJ, PublishCommand as aK, RandomKeyCommand as aL, RenameCommand as aM, RenameNXCommand as aN, RPopCommand as aO, RPushCommand as aP, RPushXCommand as aQ, SAddCommand as aR, ScanCommand as aS, type ScanCommandOptions as aT, SCardCommand as aU, ScriptExistsCommand as aV, ScriptFlushCommand as aW, ScriptLoadCommand as aX, SDiffCommand as aY, SDiffStoreCommand as aZ, SetCommand as a_, JsonClearCommand as aa, JsonDelCommand as ab, JsonForgetCommand as ac, JsonGetCommand as ad, JsonMGetCommand as ae, JsonNumIncrByCommand as af, JsonNumMultByCommand as ag, JsonObjKeysCommand as ah, JsonObjLenCommand as ai, JsonRespCommand as aj, JsonSetCommand as ak, JsonStrAppendCommand as al, JsonStrLenCommand as am, JsonToggleCommand as an, JsonTypeCommand as ao, KeysCommand as ap, LIndexCommand as aq, LInsertCommand as ar, LLenCommand as as, LMoveCommand as at, LPopCommand as au, LPushCommand as av, LPushXCommand as aw, LRangeCommand as ax, LRemCommand as ay, LSetCommand as az, Redis as b, SetBitCommand as b0, SetExCommand as b1, SetNxCommand as b2, SetRangeCommand as b3, SInterCommand as b4, SInterStoreCommand as b5, SIsMemberCommand as b6, SMembersCommand as b7, SMIsMemberCommand as b8, SMoveCommand as b9, ZPopMaxCommand as bA, ZPopMinCommand as bB, ZRangeCommand as bC, type ZRangeCommandOptions as bD, ZRankCommand as bE, ZRemCommand as bF, ZRemRangeByLexCommand as bG, ZRemRangeByRankCommand as bH, ZRemRangeByScoreCommand as bI, ZRevRankCommand as bJ, ZScanCommand as bK, ZScoreCommand as bL, ZUnionCommand as bM, type ZUnionCommandOptions as bN, ZUnionStoreCommand as bO, type ZUnionStoreCommandOptions as bP, SPopCommand as ba, SRandMemberCommand as bb, SRemCommand as bc, SScanCommand as bd, StrLenCommand as be, SUnionCommand as bf, SUnionStoreCommand as bg, TimeCommand as bh, TouchCommand as bi, TtlCommand as bj, type Type as bk, TypeCommand as bl, UnlinkCommand as bm, XAddCommand as bn, XRangeCommand as bo, type ScoreMember as bp, type ZAddCommandOptions as bq, ZAddCommand as br, ZCardCommand as bs, ZCountCommand as bt, ZDiffStoreCommand as bu, ZIncrByCommand as bv, ZInterStoreCommand as bw, type ZInterStoreCommandOptions as bx, ZLexCountCommand as by, ZMScoreCommand as bz, type UpstashResponse as c, type Requester as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalCommand as k, EvalshaCommand as l, ExistsCommand as m, ExpireCommand as n, ExpireAtCommand as o, FlushDBCommand as p, type GeoAddCommandOptions as q, type GeoMember as r, GeoDistCommand as s, GeoHashCommand as t, GeoPosCommand as u, GeoSearchCommand as v, GeoSearchStoreCommand as w, GetCommand as x, GetBitCommand as y, GetDelCommand as z };
@@ -563,6 +563,50 @@ declare class GetDelCommand<TData = string> extends Command<unknown | null, TDat
563
563
  constructor(cmd: [key: string], opts?: CommandOptions<unknown | null, TData | null>);
564
564
  }
565
565
 
566
+ type GetExCommandOptions = {
567
+ ex: number;
568
+ px?: never;
569
+ exat?: never;
570
+ pxat?: never;
571
+ persist?: never;
572
+ } | {
573
+ ex?: never;
574
+ px: number;
575
+ exat?: never;
576
+ pxat?: never;
577
+ persist?: never;
578
+ } | {
579
+ ex?: never;
580
+ px?: never;
581
+ exat: number;
582
+ pxat?: never;
583
+ persist?: never;
584
+ } | {
585
+ ex?: never;
586
+ px?: never;
587
+ exat?: never;
588
+ pxat: number;
589
+ persist?: never;
590
+ } | {
591
+ ex?: never;
592
+ px?: never;
593
+ exat?: never;
594
+ pxat?: never;
595
+ persist: true;
596
+ } | {
597
+ ex?: never;
598
+ px?: never;
599
+ exat?: never;
600
+ pxat?: never;
601
+ persist?: never;
602
+ };
603
+ /**
604
+ * @see https://redis.io/commands/getex
605
+ */
606
+ declare class GetExCommand<TData = string> extends Command<unknown | null, TData | null> {
607
+ constructor([key, opts]: [key: string, opts?: GetExCommandOptions], cmdOpts?: CommandOptions<unknown | null, TData | null>);
608
+ }
609
+
566
610
  /**
567
611
  * @see https://redis.io/commands/getrange
568
612
  */
@@ -1891,6 +1935,46 @@ declare class Pipeline<TCommands extends Command<any, any>[] = []> {
1891
1935
  * @see https://redis.io/commands/getdel
1892
1936
  */
1893
1937
  getdel: <TData>(key: string) => Pipeline<[...TCommands, Command<any, TData | null>]>;
1938
+ /**
1939
+ * @see https://redis.io/commands/getex
1940
+ */
1941
+ getex: <TData>(key: string, opts?: ({
1942
+ ex: number;
1943
+ px?: never;
1944
+ exat?: never;
1945
+ pxat?: never;
1946
+ persist?: never;
1947
+ } | {
1948
+ ex?: never;
1949
+ px: number;
1950
+ exat?: never;
1951
+ pxat?: never;
1952
+ persist?: never;
1953
+ } | {
1954
+ ex?: never;
1955
+ px?: never;
1956
+ exat: number;
1957
+ pxat?: never;
1958
+ persist?: never;
1959
+ } | {
1960
+ ex?: never;
1961
+ px?: never;
1962
+ exat?: never;
1963
+ pxat: number;
1964
+ persist?: never;
1965
+ } | {
1966
+ ex?: never;
1967
+ px?: never;
1968
+ exat?: never;
1969
+ pxat?: never;
1970
+ persist: true;
1971
+ } | {
1972
+ ex?: never;
1973
+ px?: never;
1974
+ exat?: never;
1975
+ pxat?: never;
1976
+ persist?: never;
1977
+ }) | undefined) => Pipeline<[...TCommands, Command<any, TData | null>]>;
1894
1978
  /**
1895
1979
  * @see https://redis.io/commands/getrange
1896
1980
  */
@@ -2792,6 +2876,10 @@ declare class Redis {
2792
2876
  * @see https://redis.io/commands/evalsha
2793
2877
  */
2794
2878
  evalsha: <TArgs extends unknown[], TData = unknown>(sha1: string, keys: string[], args: TArgs) => Promise<TData>;
2879
+ /**
2880
+ * Generic method to execute any Redis command.
2881
+ */
2882
+ exec: <TResult>(args: [command: string, ...args: (string | number | boolean)[]]) => Promise<TResult>;
2795
2883
  /**
2796
2884
  * @see https://redis.io/commands/exists
2797
2885
  */
@@ -2916,6 +3004,46 @@ declare class Redis {
2916
3004
  * @see https://redis.io/commands/getdel
2917
3005
  */
2918
3006
  getdel: <TData>(key: string) => Promise<TData | null>;
3007
+ /**
3008
+ * @see https://redis.io/commands/getex
3009
+ */
3010
+ getex: <TData>(key: string, opts?: ({
3011
+ ex: number;
3012
+ px?: never;
3013
+ exat?: never;
3014
+ pxat?: never;
3015
+ persist?: never;
3016
+ } | {
3017
+ ex?: never;
3018
+ px: number;
3019
+ exat?: never;
3020
+ pxat?: never;
3021
+ persist?: never;
3022
+ } | {
3023
+ ex?: never;
3024
+ px?: never;
3025
+ exat: number;
3026
+ pxat?: never;
3027
+ persist?: never;
3028
+ } | {
3029
+ ex?: never;
3030
+ px?: never;
3031
+ exat?: never;
3032
+ pxat: number;
3033
+ persist?: never;
3034
+ } | {
3035
+ ex?: never;
3036
+ px?: never;
3037
+ exat?: never;
3038
+ pxat?: never;
3039
+ persist: true;
3040
+ } | {
3041
+ ex?: never;
3042
+ px?: never;
3043
+ exat?: never;
3044
+ pxat?: never;
3045
+ persist?: never;
3046
+ }) | undefined) => Promise<TData | null>;
2919
3047
  /**
2920
3048
  * @see https://redis.io/commands/getrange
2921
3049
  */
@@ -3506,4 +3634,4 @@ declare class ZMScoreCommand<TData> extends Command<string[] | null, number[] |
3506
3634
  constructor(cmd: [key: string, members: TData[]], opts?: CommandOptions<string[] | null, number[] | null>);
3507
3635
  }
3508
3636
 
3509
- export { HValsCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, GetRangeCommand as H, GetSetCommand as I, HDelCommand as J, HExistsCommand as K, HGetCommand as L, HGetAllCommand as M, HIncrByCommand as N, HIncrByFloatCommand as O, Pipeline as P, HKeysCommand as Q, type RedisOptions as R, HLenCommand as S, HMGetCommand as T, type UpstashRequest as U, HMSetCommand as V, HRandFieldCommand as W, HScanCommand as X, HSetCommand as Y, HSetNXCommand as Z, HStrLenCommand as _, type RequesterConfig as a, SetBitCommand as a$, IncrCommand as a0, IncrByCommand as a1, IncrByFloatCommand as a2, JsonArrAppendCommand as a3, JsonArrIndexCommand as a4, JsonArrInsertCommand as a5, JsonArrLenCommand as a6, JsonArrPopCommand as a7, JsonArrTrimCommand as a8, JsonClearCommand as a9, MGetCommand as aA, MSetCommand as aB, MSetNXCommand as aC, PersistCommand as aD, PExpireCommand as aE, PExpireAtCommand as aF, PingCommand as aG, PSetEXCommand as aH, PTtlCommand as aI, PublishCommand as aJ, RandomKeyCommand as aK, RenameCommand as aL, RenameNXCommand as aM, RPopCommand as aN, RPushCommand as aO, RPushXCommand as aP, SAddCommand as aQ, ScanCommand as aR, type ScanCommandOptions as aS, SCardCommand as aT, ScriptExistsCommand as aU, ScriptFlushCommand as aV, ScriptLoadCommand as aW, SDiffCommand as aX, SDiffStoreCommand as aY, SetCommand as aZ, type SetCommandOptions as a_, JsonDelCommand as aa, JsonForgetCommand as ab, JsonGetCommand as ac, JsonMGetCommand as ad, JsonNumIncrByCommand as ae, JsonNumMultByCommand as af, JsonObjKeysCommand as ag, JsonObjLenCommand as ah, JsonRespCommand as ai, JsonSetCommand as aj, JsonStrAppendCommand as ak, JsonStrLenCommand as al, JsonToggleCommand as am, JsonTypeCommand as an, KeysCommand as ao, LIndexCommand as ap, LInsertCommand as aq, LLenCommand as ar, LMoveCommand as as, LPopCommand as at, LPushCommand as au, LPushXCommand as av, LRangeCommand as aw, LRemCommand as ax, LSetCommand as ay, LTrimCommand as az, Redis as b, SetExCommand as b0, SetNxCommand as b1, SetRangeCommand as b2, SInterCommand as b3, SInterStoreCommand as b4, SIsMemberCommand as b5, SMembersCommand as b6, SMIsMemberCommand as b7, SMoveCommand as b8, SPopCommand as b9, ZPopMinCommand as bA, ZRangeCommand as bB, type ZRangeCommandOptions as bC, ZRankCommand as bD, ZRemCommand as bE, ZRemRangeByLexCommand as bF, ZRemRangeByRankCommand as bG, ZRemRangeByScoreCommand as bH, ZRevRankCommand as bI, ZScanCommand as bJ, ZScoreCommand as bK, ZUnionCommand as bL, type ZUnionCommandOptions as bM, ZUnionStoreCommand as bN, type ZUnionStoreCommandOptions as bO, SRandMemberCommand as ba, SRemCommand as bb, SScanCommand as bc, StrLenCommand as bd, SUnionCommand as be, SUnionStoreCommand as bf, TimeCommand as bg, TouchCommand as bh, TtlCommand as bi, type Type as bj, TypeCommand as bk, UnlinkCommand as bl, XAddCommand as bm, XRangeCommand as bn, type ScoreMember as bo, type ZAddCommandOptions as bp, ZAddCommand as bq, ZCardCommand as br, ZCountCommand as bs, ZDiffStoreCommand as bt, ZIncrByCommand as bu, ZInterStoreCommand as bv, type ZInterStoreCommandOptions as bw, ZLexCountCommand as bx, ZMScoreCommand as by, ZPopMaxCommand as bz, type UpstashResponse as c, type Requester as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalCommand as k, EvalshaCommand as l, ExistsCommand as m, ExpireCommand as n, ExpireAtCommand as o, FlushDBCommand as p, type GeoAddCommandOptions as q, type GeoMember as r, GeoDistCommand as s, GeoHashCommand as t, GeoPosCommand as u, GeoSearchCommand as v, GeoSearchStoreCommand as w, GetCommand as x, GetBitCommand as y, GetDelCommand as z };
3637
+ export { HStrLenCommand as $, AppendCommand as A, BitCountCommand as B, CopyCommand as C, DBSizeCommand as D, EchoCommand as E, FlushAllCommand as F, GeoAddCommand as G, GetExCommand as H, GetRangeCommand as I, GetSetCommand as J, HDelCommand as K, HExistsCommand as L, HGetCommand as M, HGetAllCommand as N, HIncrByCommand as O, Pipeline as P, HIncrByFloatCommand as Q, type RedisOptions as R, HKeysCommand as S, HLenCommand as T, type UpstashRequest as U, HMGetCommand as V, HMSetCommand as W, HRandFieldCommand as X, HScanCommand as Y, HSetCommand as Z, HSetNXCommand as _, type RequesterConfig as a, type SetCommandOptions as a$, HValsCommand as a0, IncrCommand as a1, IncrByCommand as a2, IncrByFloatCommand as a3, JsonArrAppendCommand as a4, JsonArrIndexCommand as a5, JsonArrInsertCommand as a6, JsonArrLenCommand as a7, JsonArrPopCommand as a8, JsonArrTrimCommand as a9, LTrimCommand as aA, MGetCommand as aB, MSetCommand as aC, MSetNXCommand as aD, PersistCommand as aE, PExpireCommand as aF, PExpireAtCommand as aG, PingCommand as aH, PSetEXCommand as aI, PTtlCommand as aJ, PublishCommand as aK, RandomKeyCommand as aL, RenameCommand as aM, RenameNXCommand as aN, RPopCommand as aO, RPushCommand as aP, RPushXCommand as aQ, SAddCommand as aR, ScanCommand as aS, type ScanCommandOptions as aT, SCardCommand as aU, ScriptExistsCommand as aV, ScriptFlushCommand as aW, ScriptLoadCommand as aX, SDiffCommand as aY, SDiffStoreCommand as aZ, SetCommand as a_, JsonClearCommand as aa, JsonDelCommand as ab, JsonForgetCommand as ac, JsonGetCommand as ad, JsonMGetCommand as ae, JsonNumIncrByCommand as af, JsonNumMultByCommand as ag, JsonObjKeysCommand as ah, JsonObjLenCommand as ai, JsonRespCommand as aj, JsonSetCommand as ak, JsonStrAppendCommand as al, JsonStrLenCommand as am, JsonToggleCommand as an, JsonTypeCommand as ao, KeysCommand as ap, LIndexCommand as aq, LInsertCommand as ar, LLenCommand as as, LMoveCommand as at, LPopCommand as au, LPushCommand as av, LPushXCommand as aw, LRangeCommand as ax, LRemCommand as ay, LSetCommand as az, Redis as b, SetBitCommand as b0, SetExCommand as b1, SetNxCommand as b2, SetRangeCommand as b3, SInterCommand as b4, SInterStoreCommand as b5, SIsMemberCommand as b6, SMembersCommand as b7, SMIsMemberCommand as b8, SMoveCommand as b9, ZPopMaxCommand as bA, ZPopMinCommand as bB, ZRangeCommand as bC, type ZRangeCommandOptions as bD, ZRankCommand as bE, ZRemCommand as bF, ZRemRangeByLexCommand as bG, ZRemRangeByRankCommand as bH, ZRemRangeByScoreCommand as bI, ZRevRankCommand as bJ, ZScanCommand as bK, ZScoreCommand as bL, ZUnionCommand as bM, type ZUnionCommandOptions as bN, ZUnionStoreCommand as bO, type ZUnionStoreCommandOptions as bP, SPopCommand as ba, SRandMemberCommand as bb, SRemCommand as bc, SScanCommand as bd, StrLenCommand as be, SUnionCommand as bf, SUnionStoreCommand as bg, TimeCommand as bh, TouchCommand as bi, TtlCommand as bj, type Type as bk, TypeCommand as bl, UnlinkCommand as bm, XAddCommand as bn, XRangeCommand as bo, type ScoreMember as bp, type ZAddCommandOptions as bq, ZAddCommand as br, ZCardCommand as bs, ZCountCommand as bt, ZDiffStoreCommand as bu, ZIncrByCommand as bv, ZInterStoreCommand as bw, type ZInterStoreCommandOptions as bx, ZLexCountCommand as by, ZMScoreCommand as bz, type UpstashResponse as c, type Requester as d, error as e, BitOpCommand as f, BitPosCommand as g, DecrCommand as h, DecrByCommand as i, DelCommand as j, EvalCommand as k, EvalshaCommand as l, ExistsCommand as m, ExpireCommand as n, ExpireAtCommand as o, FlushDBCommand as p, type GeoAddCommandOptions as q, type GeoMember as r, GeoDistCommand as s, GeoHashCommand as t, GeoPosCommand as u, GeoSearchCommand as v, GeoSearchStoreCommand as w, GetCommand as x, GetBitCommand as y, GetDelCommand as z };