@upstash/redis 1.34.6 → 1.34.7

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.
@@ -346,6 +346,26 @@ var Command = class {
346
346
  }
347
347
  };
348
348
 
349
+ // pkg/commands/hexpire.ts
350
+ var HExpireCommand = class extends Command {
351
+ constructor(cmd, opts) {
352
+ const [key, fields, seconds, option] = cmd;
353
+ const fieldArray = Array.isArray(fields) ? fields : [fields];
354
+ super(
355
+ [
356
+ "hexpire",
357
+ key,
358
+ seconds,
359
+ ...option ? [option] : [],
360
+ "FIELDS",
361
+ fieldArray.length,
362
+ ...fieldArray
363
+ ],
364
+ opts
365
+ );
366
+ }
367
+ };
368
+
349
369
  // pkg/commands/hrandfield.ts
350
370
  function deserialize(result) {
351
371
  if (result.length === 0) {
@@ -496,6 +516,13 @@ var EchoCommand = class extends Command {
496
516
  }
497
517
  };
498
518
 
519
+ // pkg/commands/evalRo.ts
520
+ var EvalROCommand = class extends Command {
521
+ constructor([script, keys, args], opts) {
522
+ super(["eval_ro", script, keys.length, ...keys, ...args ?? []], opts);
523
+ }
524
+ };
525
+
499
526
  // pkg/commands/eval.ts
500
527
  var EvalCommand = class extends Command {
501
528
  constructor([script, keys, args], opts) {
@@ -503,6 +530,13 @@ var EvalCommand = class extends Command {
503
530
  }
504
531
  };
505
532
 
533
+ // pkg/commands/evalshaRo.ts
534
+ var EvalshaROCommand = class extends Command {
535
+ constructor([sha, keys, args], opts) {
536
+ super(["evalsha_ro", sha, keys.length, ...keys, ...args ?? []], opts);
537
+ }
538
+ };
539
+
506
540
  // pkg/commands/evalsha.ts
507
541
  var EvalshaCommand = class extends Command {
508
542
  constructor([sha, keys, args], opts) {
@@ -1033,6 +1067,14 @@ var JsonGetCommand = class extends Command {
1033
1067
  }
1034
1068
  };
1035
1069
 
1070
+ // pkg/commands/json_merge.ts
1071
+ var JsonMergeCommand = class extends Command {
1072
+ constructor(cmd, opts) {
1073
+ const command = ["JSON.MERGE", ...cmd];
1074
+ super(command, opts);
1075
+ }
1076
+ };
1077
+
1036
1078
  // pkg/commands/json_mget.ts
1037
1079
  var JsonMGetCommand = class extends Command {
1038
1080
  constructor(cmd, opts) {
@@ -2327,10 +2369,18 @@ var Pipeline = class {
2327
2369
  * @see https://redis.io/commands/echo
2328
2370
  */
2329
2371
  echo = (...args) => this.chain(new EchoCommand(args, this.commandOptions));
2372
+ /**
2373
+ * @see https://redis.io/commands/eval_ro
2374
+ */
2375
+ evalRo = (...args) => this.chain(new EvalROCommand(args, this.commandOptions));
2330
2376
  /**
2331
2377
  * @see https://redis.io/commands/eval
2332
2378
  */
2333
2379
  eval = (...args) => this.chain(new EvalCommand(args, this.commandOptions));
2380
+ /**
2381
+ * @see https://redis.io/commands/evalsha_ro
2382
+ */
2383
+ evalshaRo = (...args) => this.chain(new EvalshaROCommand(args, this.commandOptions));
2334
2384
  /**
2335
2385
  * @see https://redis.io/commands/evalsha
2336
2386
  */
@@ -2411,6 +2461,10 @@ var Pipeline = class {
2411
2461
  * @see https://redis.io/commands/hexists
2412
2462
  */
2413
2463
  hexists = (...args) => this.chain(new HExistsCommand(args, this.commandOptions));
2464
+ /**
2465
+ * @see https://redis.io/commands/hexpire
2466
+ */
2467
+ hexpire = (...args) => this.chain(new HExpireCommand(args, this.commandOptions));
2414
2468
  /**
2415
2469
  * @see https://redis.io/commands/hget
2416
2470
  */
@@ -2928,6 +2982,10 @@ var Pipeline = class {
2928
2982
  * @see https://redis.io/commands/json.get
2929
2983
  */
2930
2984
  get: (...args) => this.chain(new JsonGetCommand(args, this.commandOptions)),
2985
+ /**
2986
+ * @see https://redis.io/commands/json.merge
2987
+ */
2988
+ merge: (...args) => this.chain(new JsonMergeCommand(args, this.commandOptions)),
2931
2989
  /**
2932
2990
  * @see https://redis.io/commands/json.mget
2933
2991
  */
@@ -3283,6 +3341,53 @@ var Script = class {
3283
3341
  }
3284
3342
  };
3285
3343
 
3344
+ // pkg/scriptRo.ts
3345
+ import Hex2 from "crypto-js/enc-hex.js";
3346
+ import sha12 from "crypto-js/sha1.js";
3347
+ var ScriptRO = class {
3348
+ script;
3349
+ sha1;
3350
+ redis;
3351
+ constructor(redis, script) {
3352
+ this.redis = redis;
3353
+ this.sha1 = this.digest(script);
3354
+ this.script = script;
3355
+ }
3356
+ /**
3357
+ * Send an `EVAL_RO` command to redis.
3358
+ */
3359
+ async evalRo(keys, args) {
3360
+ return await this.redis.evalRo(this.script, keys, args);
3361
+ }
3362
+ /**
3363
+ * Calculates the sha1 hash of the script and then calls `EVALSHA_RO`.
3364
+ */
3365
+ async evalshaRo(keys, args) {
3366
+ return await this.redis.evalshaRo(this.sha1, keys, args);
3367
+ }
3368
+ /**
3369
+ * Optimistically try to run `EVALSHA_RO` first.
3370
+ * If the script is not loaded in redis, it will fall back and try again with `EVAL_RO`.
3371
+ *
3372
+ * Following calls will be able to use the cached script
3373
+ */
3374
+ async exec(keys, args) {
3375
+ const res = await this.redis.evalshaRo(this.sha1, keys, args).catch(async (error) => {
3376
+ if (error instanceof Error && error.message.toLowerCase().includes("noscript")) {
3377
+ return await this.redis.evalRo(this.script, keys, args);
3378
+ }
3379
+ throw error;
3380
+ });
3381
+ return res;
3382
+ }
3383
+ /**
3384
+ * Compute the sha1 hash of the script and return its hex representation.
3385
+ */
3386
+ digest(s) {
3387
+ return Hex2.stringify(sha12(s));
3388
+ }
3389
+ };
3390
+
3286
3391
  // pkg/redis.ts
3287
3392
  var Redis = class {
3288
3393
  client;
@@ -3357,6 +3462,10 @@ var Redis = class {
3357
3462
  * @see https://redis.io/commands/json.get
3358
3463
  */
3359
3464
  get: (...args) => new JsonGetCommand(args, this.opts).exec(this.client),
3465
+ /**
3466
+ * @see https://redis.io/commands/json.merge
3467
+ */
3468
+ merge: (...args) => new JsonMergeCommand(args, this.opts).exec(this.client),
3360
3469
  /**
3361
3470
  * @see https://redis.io/commands/json.mget
3362
3471
  */
@@ -3426,8 +3535,36 @@ var Redis = class {
3426
3535
  } catch {
3427
3536
  }
3428
3537
  };
3429
- createScript(script) {
3430
- return new Script(this, script);
3538
+ /**
3539
+ * Creates a new script.
3540
+ *
3541
+ * Scripts offer the ability to optimistically try to execute a script without having to send the
3542
+ * entire script to the server. If the script is loaded on the server, it tries again by sending
3543
+ * the entire script. Afterwards, the script is cached on the server.
3544
+ *
3545
+ * @param script - The script to create
3546
+ * @param opts - Optional options to pass to the script `{ readonly?: boolean }`
3547
+ * @returns A new script
3548
+ *
3549
+ * @example
3550
+ * ```ts
3551
+ * const redis = new Redis({...})
3552
+ *
3553
+ * const script = redis.createScript<string>("return ARGV[1];")
3554
+ * const arg1 = await script.eval([], ["Hello World"])
3555
+ * expect(arg1, "Hello World")
3556
+ * ```
3557
+ * @example
3558
+ * ```ts
3559
+ * const redis = new Redis({...})
3560
+ *
3561
+ * const script = redis.createScript<string>("return ARGV[1];", { readonly: true })
3562
+ * const arg1 = await script.evalRo([], ["Hello World"])
3563
+ * expect(arg1, "Hello World")
3564
+ * ```
3565
+ */
3566
+ createScript(script, opts) {
3567
+ return opts?.readonly ? new ScriptRO(this, script) : new Script(this, script);
3431
3568
  }
3432
3569
  /**
3433
3570
  * Create a new pipeline that allows you to send requests in bulk.
@@ -3514,10 +3651,18 @@ var Redis = class {
3514
3651
  * @see https://redis.io/commands/echo
3515
3652
  */
3516
3653
  echo = (...args) => new EchoCommand(args, this.opts).exec(this.client);
3654
+ /**
3655
+ * @see https://redis.io/commands/eval_ro
3656
+ */
3657
+ evalRo = (...args) => new EvalROCommand(args, this.opts).exec(this.client);
3517
3658
  /**
3518
3659
  * @see https://redis.io/commands/eval
3519
3660
  */
3520
3661
  eval = (...args) => new EvalCommand(args, this.opts).exec(this.client);
3662
+ /**
3663
+ * @see https://redis.io/commands/evalsha_ro
3664
+ */
3665
+ evalshaRo = (...args) => new EvalshaROCommand(args, this.opts).exec(this.client);
3521
3666
  /**
3522
3667
  * @see https://redis.io/commands/evalsha
3523
3668
  */
@@ -3602,6 +3747,10 @@ var Redis = class {
3602
3747
  * @see https://redis.io/commands/hexists
3603
3748
  */
3604
3749
  hexists = (...args) => new HExistsCommand(args, this.opts).exec(this.client);
3750
+ /**
3751
+ * @see https://redis.io/commands/hexpire
3752
+ */
3753
+ hexpire = (...args) => new HExpireCommand(args, this.opts).exec(this.client);
3605
3754
  /**
3606
3755
  * @see https://redis.io/commands/hget
3607
3756
  */
@@ -4093,7 +4242,7 @@ var Redis = class {
4093
4242
  };
4094
4243
 
4095
4244
  // version.ts
4096
- var VERSION = "v1.34.6";
4245
+ var VERSION = "v1.34.7";
4097
4246
 
4098
4247
  export {
4099
4248
  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-BdNsMd17.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-BdNsMd17.mjs';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-hRk-rDLY.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, l as EvalCommand, k as EvalROCommand, n as EvalshaCommand, m as EvalshaROCommand, o as ExistsCommand, q as ExpireAtCommand, p as ExpireCommand, F as FlushAllCommand, r as FlushDBCommand, G as GeoAddCommand, s as GeoAddCommandOptions, u as GeoDistCommand, v as GeoHashCommand, t as GeoMember, w as GeoPosCommand, x as GeoSearchCommand, y as GeoSearchStoreCommand, H as GetBitCommand, z as GetCommand, I as GetDelCommand, J as GetExCommand, K as GetRangeCommand, L as GetSetCommand, M as HDelCommand, N as HExistsCommand, O as HExpireCommand, S as HGetAllCommand, Q as HGetCommand, T as HIncrByCommand, V as HIncrByFloatCommand, W as HKeysCommand, X as HLenCommand, Y as HMGetCommand, Z as HMSetCommand, _ as HRandFieldCommand, $ as HScanCommand, a0 as HSetCommand, a1 as HSetNXCommand, a2 as HStrLenCommand, a3 as HValsCommand, a5 as IncrByCommand, a6 as IncrByFloatCommand, a4 as IncrCommand, a7 as JsonArrAppendCommand, a8 as JsonArrIndexCommand, a9 as JsonArrInsertCommand, aa as JsonArrLenCommand, ab as JsonArrPopCommand, ac as JsonArrTrimCommand, ad as JsonClearCommand, ae as JsonDelCommand, af as JsonForgetCommand, ag as JsonGetCommand, ai as JsonMGetCommand, ah as JsonMergeCommand, aj as JsonNumIncrByCommand, ak as JsonNumMultByCommand, al as JsonObjKeysCommand, am as JsonObjLenCommand, an as JsonRespCommand, ao as JsonSetCommand, ap as JsonStrAppendCommand, aq as JsonStrLenCommand, ar as JsonToggleCommand, as as JsonTypeCommand, at as KeysCommand, au as LIndexCommand, av as LInsertCommand, aw as LLenCommand, ax as LMoveCommand, ay as LPopCommand, az as LPushCommand, aA as LPushXCommand, aB as LRangeCommand, aC as LRemCommand, aD as LSetCommand, aE as LTrimCommand, aF as MGetCommand, aG as MSetCommand, aH as MSetNXCommand, aK as PExpireAtCommand, aJ as PExpireCommand, aM as PSetEXCommand, aN as PTtlCommand, aI as PersistCommand, aL as PingCommand, P as Pipeline, aO as PublishCommand, aS as RPopCommand, aT as RPushCommand, aU as RPushXCommand, aP as RandomKeyCommand, aQ as RenameCommand, aR as RenameNXCommand, d as Requester, aV as SAddCommand, aY as SCardCommand, b0 as SDiffCommand, b1 as SDiffStoreCommand, b8 as SInterCommand, b9 as SInterStoreCommand, ba as SIsMemberCommand, bc as SMIsMemberCommand, bb as SMembersCommand, bd as SMoveCommand, be as SPopCommand, bf as SRandMemberCommand, bg as SRemCommand, bh as SScanCommand, bj as SUnionCommand, bk as SUnionStoreCommand, aW as ScanCommand, aX as ScanCommandOptions, bt as ScoreMember, aZ as ScriptExistsCommand, a_ as ScriptFlushCommand, a$ as ScriptLoadCommand, b4 as SetBitCommand, b2 as SetCommand, b3 as SetCommandOptions, b5 as SetExCommand, b6 as SetNxCommand, b7 as SetRangeCommand, bi as StrLenCommand, bl as TimeCommand, bm as TouchCommand, bn as TtlCommand, bo as Type, bp as TypeCommand, bq as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, br as XAddCommand, bs as XRangeCommand, bv as ZAddCommand, bu as ZAddCommandOptions, bw as ZCardCommand, bx as ZCountCommand, by as ZDiffStoreCommand, bz as ZIncrByCommand, bA as ZInterStoreCommand, bB as ZInterStoreCommandOptions, bC as ZLexCountCommand, bD as ZMScoreCommand, bE as ZPopMaxCommand, bF as ZPopMinCommand, bG as ZRangeCommand, bH as ZRangeCommandOptions, bI as ZRankCommand, bJ as ZRemCommand, bK as ZRemRangeByLexCommand, bL as ZRemRangeByRankCommand, bM as ZRemRangeByScoreCommand, bN as ZRevRankCommand, bO as ZScanCommand, bP as ZScoreCommand, bQ as ZUnionCommand, bR as ZUnionCommandOptions, bS as ZUnionStoreCommand, bT as ZUnionStoreCommandOptions, e as errors } from './zmscore-hRk-rDLY.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-BdNsMd17.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-BdNsMd17.js';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-hRk-rDLY.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, l as EvalCommand, k as EvalROCommand, n as EvalshaCommand, m as EvalshaROCommand, o as ExistsCommand, q as ExpireAtCommand, p as ExpireCommand, F as FlushAllCommand, r as FlushDBCommand, G as GeoAddCommand, s as GeoAddCommandOptions, u as GeoDistCommand, v as GeoHashCommand, t as GeoMember, w as GeoPosCommand, x as GeoSearchCommand, y as GeoSearchStoreCommand, H as GetBitCommand, z as GetCommand, I as GetDelCommand, J as GetExCommand, K as GetRangeCommand, L as GetSetCommand, M as HDelCommand, N as HExistsCommand, O as HExpireCommand, S as HGetAllCommand, Q as HGetCommand, T as HIncrByCommand, V as HIncrByFloatCommand, W as HKeysCommand, X as HLenCommand, Y as HMGetCommand, Z as HMSetCommand, _ as HRandFieldCommand, $ as HScanCommand, a0 as HSetCommand, a1 as HSetNXCommand, a2 as HStrLenCommand, a3 as HValsCommand, a5 as IncrByCommand, a6 as IncrByFloatCommand, a4 as IncrCommand, a7 as JsonArrAppendCommand, a8 as JsonArrIndexCommand, a9 as JsonArrInsertCommand, aa as JsonArrLenCommand, ab as JsonArrPopCommand, ac as JsonArrTrimCommand, ad as JsonClearCommand, ae as JsonDelCommand, af as JsonForgetCommand, ag as JsonGetCommand, ai as JsonMGetCommand, ah as JsonMergeCommand, aj as JsonNumIncrByCommand, ak as JsonNumMultByCommand, al as JsonObjKeysCommand, am as JsonObjLenCommand, an as JsonRespCommand, ao as JsonSetCommand, ap as JsonStrAppendCommand, aq as JsonStrLenCommand, ar as JsonToggleCommand, as as JsonTypeCommand, at as KeysCommand, au as LIndexCommand, av as LInsertCommand, aw as LLenCommand, ax as LMoveCommand, ay as LPopCommand, az as LPushCommand, aA as LPushXCommand, aB as LRangeCommand, aC as LRemCommand, aD as LSetCommand, aE as LTrimCommand, aF as MGetCommand, aG as MSetCommand, aH as MSetNXCommand, aK as PExpireAtCommand, aJ as PExpireCommand, aM as PSetEXCommand, aN as PTtlCommand, aI as PersistCommand, aL as PingCommand, P as Pipeline, aO as PublishCommand, aS as RPopCommand, aT as RPushCommand, aU as RPushXCommand, aP as RandomKeyCommand, aQ as RenameCommand, aR as RenameNXCommand, d as Requester, aV as SAddCommand, aY as SCardCommand, b0 as SDiffCommand, b1 as SDiffStoreCommand, b8 as SInterCommand, b9 as SInterStoreCommand, ba as SIsMemberCommand, bc as SMIsMemberCommand, bb as SMembersCommand, bd as SMoveCommand, be as SPopCommand, bf as SRandMemberCommand, bg as SRemCommand, bh as SScanCommand, bj as SUnionCommand, bk as SUnionStoreCommand, aW as ScanCommand, aX as ScanCommandOptions, bt as ScoreMember, aZ as ScriptExistsCommand, a_ as ScriptFlushCommand, a$ as ScriptLoadCommand, b4 as SetBitCommand, b2 as SetCommand, b3 as SetCommandOptions, b5 as SetExCommand, b6 as SetNxCommand, b7 as SetRangeCommand, bi as StrLenCommand, bl as TimeCommand, bm as TouchCommand, bn as TtlCommand, bo as Type, bp as TypeCommand, bq as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, br as XAddCommand, bs as XRangeCommand, bv as ZAddCommand, bu as ZAddCommandOptions, bw as ZCardCommand, bx as ZCountCommand, by as ZDiffStoreCommand, bz as ZIncrByCommand, bA as ZInterStoreCommand, bB as ZInterStoreCommandOptions, bC as ZLexCountCommand, bD as ZMScoreCommand, bE as ZPopMaxCommand, bF as ZPopMinCommand, bG as ZRangeCommand, bH as ZRangeCommandOptions, bI as ZRankCommand, bJ as ZRemCommand, bK as ZRemRangeByLexCommand, bL as ZRemRangeByRankCommand, bM as ZRemRangeByScoreCommand, bN as ZRevRankCommand, bO as ZScanCommand, bP as ZScoreCommand, bQ as ZUnionCommand, bR as ZUnionCommandOptions, bS as ZUnionStoreCommand, bT as ZUnionStoreCommandOptions, e as errors } from './zmscore-hRk-rDLY.js';
3
3
 
4
4
  type Env = {
5
5
  UPSTASH_DISABLE_TELEMETRY?: string;
package/cloudflare.js CHANGED
@@ -456,6 +456,26 @@ var Command = class {
456
456
  }
457
457
  };
458
458
 
459
+ // pkg/commands/hexpire.ts
460
+ var HExpireCommand = class extends Command {
461
+ constructor(cmd, opts) {
462
+ const [key, fields, seconds, option] = cmd;
463
+ const fieldArray = Array.isArray(fields) ? fields : [fields];
464
+ super(
465
+ [
466
+ "hexpire",
467
+ key,
468
+ seconds,
469
+ ...option ? [option] : [],
470
+ "FIELDS",
471
+ fieldArray.length,
472
+ ...fieldArray
473
+ ],
474
+ opts
475
+ );
476
+ }
477
+ };
478
+
459
479
  // pkg/commands/append.ts
460
480
  var AppendCommand = class extends Command {
461
481
  constructor(cmd, opts) {
@@ -572,6 +592,13 @@ var EchoCommand = class extends Command {
572
592
  }
573
593
  };
574
594
 
595
+ // pkg/commands/evalRo.ts
596
+ var EvalROCommand = class extends Command {
597
+ constructor([script, keys, args], opts) {
598
+ super(["eval_ro", script, keys.length, ...keys, ...args ?? []], opts);
599
+ }
600
+ };
601
+
575
602
  // pkg/commands/eval.ts
576
603
  var EvalCommand = class extends Command {
577
604
  constructor([script, keys, args], opts) {
@@ -579,6 +606,13 @@ var EvalCommand = class extends Command {
579
606
  }
580
607
  };
581
608
 
609
+ // pkg/commands/evalshaRo.ts
610
+ var EvalshaROCommand = class extends Command {
611
+ constructor([sha, keys, args], opts) {
612
+ super(["evalsha_ro", sha, keys.length, ...keys, ...args ?? []], opts);
613
+ }
614
+ };
615
+
582
616
  // pkg/commands/evalsha.ts
583
617
  var EvalshaCommand = class extends Command {
584
618
  constructor([sha, keys, args], opts) {
@@ -1143,6 +1177,14 @@ var JsonGetCommand = class extends Command {
1143
1177
  }
1144
1178
  };
1145
1179
 
1180
+ // pkg/commands/json_merge.ts
1181
+ var JsonMergeCommand = class extends Command {
1182
+ constructor(cmd, opts) {
1183
+ const command = ["JSON.MERGE", ...cmd];
1184
+ super(command, opts);
1185
+ }
1186
+ };
1187
+
1146
1188
  // pkg/commands/json_mget.ts
1147
1189
  var JsonMGetCommand = class extends Command {
1148
1190
  constructor(cmd, opts) {
@@ -2614,10 +2656,18 @@ var Pipeline = class {
2614
2656
  * @see https://redis.io/commands/echo
2615
2657
  */
2616
2658
  echo = (...args) => this.chain(new EchoCommand(args, this.commandOptions));
2659
+ /**
2660
+ * @see https://redis.io/commands/eval_ro
2661
+ */
2662
+ evalRo = (...args) => this.chain(new EvalROCommand(args, this.commandOptions));
2617
2663
  /**
2618
2664
  * @see https://redis.io/commands/eval
2619
2665
  */
2620
2666
  eval = (...args) => this.chain(new EvalCommand(args, this.commandOptions));
2667
+ /**
2668
+ * @see https://redis.io/commands/evalsha_ro
2669
+ */
2670
+ evalshaRo = (...args) => this.chain(new EvalshaROCommand(args, this.commandOptions));
2621
2671
  /**
2622
2672
  * @see https://redis.io/commands/evalsha
2623
2673
  */
@@ -2698,6 +2748,10 @@ var Pipeline = class {
2698
2748
  * @see https://redis.io/commands/hexists
2699
2749
  */
2700
2750
  hexists = (...args) => this.chain(new HExistsCommand(args, this.commandOptions));
2751
+ /**
2752
+ * @see https://redis.io/commands/hexpire
2753
+ */
2754
+ hexpire = (...args) => this.chain(new HExpireCommand(args, this.commandOptions));
2701
2755
  /**
2702
2756
  * @see https://redis.io/commands/hget
2703
2757
  */
@@ -3215,6 +3269,10 @@ var Pipeline = class {
3215
3269
  * @see https://redis.io/commands/json.get
3216
3270
  */
3217
3271
  get: (...args) => this.chain(new JsonGetCommand(args, this.commandOptions)),
3272
+ /**
3273
+ * @see https://redis.io/commands/json.merge
3274
+ */
3275
+ merge: (...args) => this.chain(new JsonMergeCommand(args, this.commandOptions)),
3218
3276
  /**
3219
3277
  * @see https://redis.io/commands/json.mget
3220
3278
  */
@@ -3314,6 +3372,53 @@ var Script = class {
3314
3372
  }
3315
3373
  };
3316
3374
 
3375
+ // pkg/scriptRo.ts
3376
+ var import_enc_hex2 = __toESM(require("crypto-js/enc-hex.js"));
3377
+ var import_sha12 = __toESM(require("crypto-js/sha1.js"));
3378
+ var ScriptRO = class {
3379
+ script;
3380
+ sha1;
3381
+ redis;
3382
+ constructor(redis, script) {
3383
+ this.redis = redis;
3384
+ this.sha1 = this.digest(script);
3385
+ this.script = script;
3386
+ }
3387
+ /**
3388
+ * Send an `EVAL_RO` command to redis.
3389
+ */
3390
+ async evalRo(keys, args) {
3391
+ return await this.redis.evalRo(this.script, keys, args);
3392
+ }
3393
+ /**
3394
+ * Calculates the sha1 hash of the script and then calls `EVALSHA_RO`.
3395
+ */
3396
+ async evalshaRo(keys, args) {
3397
+ return await this.redis.evalshaRo(this.sha1, keys, args);
3398
+ }
3399
+ /**
3400
+ * Optimistically try to run `EVALSHA_RO` first.
3401
+ * If the script is not loaded in redis, it will fall back and try again with `EVAL_RO`.
3402
+ *
3403
+ * Following calls will be able to use the cached script
3404
+ */
3405
+ async exec(keys, args) {
3406
+ const res = await this.redis.evalshaRo(this.sha1, keys, args).catch(async (error) => {
3407
+ if (error instanceof Error && error.message.toLowerCase().includes("noscript")) {
3408
+ return await this.redis.evalRo(this.script, keys, args);
3409
+ }
3410
+ throw error;
3411
+ });
3412
+ return res;
3413
+ }
3414
+ /**
3415
+ * Compute the sha1 hash of the script and return its hex representation.
3416
+ */
3417
+ digest(s) {
3418
+ return import_enc_hex2.default.stringify((0, import_sha12.default)(s));
3419
+ }
3420
+ };
3421
+
3317
3422
  // pkg/redis.ts
3318
3423
  var Redis = class {
3319
3424
  client;
@@ -3388,6 +3493,10 @@ var Redis = class {
3388
3493
  * @see https://redis.io/commands/json.get
3389
3494
  */
3390
3495
  get: (...args) => new JsonGetCommand(args, this.opts).exec(this.client),
3496
+ /**
3497
+ * @see https://redis.io/commands/json.merge
3498
+ */
3499
+ merge: (...args) => new JsonMergeCommand(args, this.opts).exec(this.client),
3391
3500
  /**
3392
3501
  * @see https://redis.io/commands/json.mget
3393
3502
  */
@@ -3457,8 +3566,36 @@ var Redis = class {
3457
3566
  } catch {
3458
3567
  }
3459
3568
  };
3460
- createScript(script) {
3461
- return new Script(this, script);
3569
+ /**
3570
+ * Creates a new script.
3571
+ *
3572
+ * Scripts offer the ability to optimistically try to execute a script without having to send the
3573
+ * entire script to the server. If the script is loaded on the server, it tries again by sending
3574
+ * the entire script. Afterwards, the script is cached on the server.
3575
+ *
3576
+ * @param script - The script to create
3577
+ * @param opts - Optional options to pass to the script `{ readonly?: boolean }`
3578
+ * @returns A new script
3579
+ *
3580
+ * @example
3581
+ * ```ts
3582
+ * const redis = new Redis({...})
3583
+ *
3584
+ * const script = redis.createScript<string>("return ARGV[1];")
3585
+ * const arg1 = await script.eval([], ["Hello World"])
3586
+ * expect(arg1, "Hello World")
3587
+ * ```
3588
+ * @example
3589
+ * ```ts
3590
+ * const redis = new Redis({...})
3591
+ *
3592
+ * const script = redis.createScript<string>("return ARGV[1];", { readonly: true })
3593
+ * const arg1 = await script.evalRo([], ["Hello World"])
3594
+ * expect(arg1, "Hello World")
3595
+ * ```
3596
+ */
3597
+ createScript(script, opts) {
3598
+ return opts?.readonly ? new ScriptRO(this, script) : new Script(this, script);
3462
3599
  }
3463
3600
  /**
3464
3601
  * Create a new pipeline that allows you to send requests in bulk.
@@ -3545,10 +3682,18 @@ var Redis = class {
3545
3682
  * @see https://redis.io/commands/echo
3546
3683
  */
3547
3684
  echo = (...args) => new EchoCommand(args, this.opts).exec(this.client);
3685
+ /**
3686
+ * @see https://redis.io/commands/eval_ro
3687
+ */
3688
+ evalRo = (...args) => new EvalROCommand(args, this.opts).exec(this.client);
3548
3689
  /**
3549
3690
  * @see https://redis.io/commands/eval
3550
3691
  */
3551
3692
  eval = (...args) => new EvalCommand(args, this.opts).exec(this.client);
3693
+ /**
3694
+ * @see https://redis.io/commands/evalsha_ro
3695
+ */
3696
+ evalshaRo = (...args) => new EvalshaROCommand(args, this.opts).exec(this.client);
3552
3697
  /**
3553
3698
  * @see https://redis.io/commands/evalsha
3554
3699
  */
@@ -3633,6 +3778,10 @@ var Redis = class {
3633
3778
  * @see https://redis.io/commands/hexists
3634
3779
  */
3635
3780
  hexists = (...args) => new HExistsCommand(args, this.opts).exec(this.client);
3781
+ /**
3782
+ * @see https://redis.io/commands/hexpire
3783
+ */
3784
+ hexpire = (...args) => new HExpireCommand(args, this.opts).exec(this.client);
3636
3785
  /**
3637
3786
  * @see https://redis.io/commands/hget
3638
3787
  */
@@ -4124,7 +4273,7 @@ var Redis = class {
4124
4273
  };
4125
4274
 
4126
4275
  // version.ts
4127
- var VERSION = "v1.34.6";
4276
+ var VERSION = "v1.34.7";
4128
4277
 
4129
4278
  // platforms/cloudflare.ts
4130
4279
  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-56TVFNIH.mjs";
6
+ } from "./chunk-TA73MYTP.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-BdNsMd17.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-BdNsMd17.mjs';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-hRk-rDLY.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, l as EvalCommand, k as EvalROCommand, n as EvalshaCommand, m as EvalshaROCommand, o as ExistsCommand, q as ExpireAtCommand, p as ExpireCommand, F as FlushAllCommand, r as FlushDBCommand, G as GeoAddCommand, s as GeoAddCommandOptions, u as GeoDistCommand, v as GeoHashCommand, t as GeoMember, w as GeoPosCommand, x as GeoSearchCommand, y as GeoSearchStoreCommand, H as GetBitCommand, z as GetCommand, I as GetDelCommand, J as GetExCommand, K as GetRangeCommand, L as GetSetCommand, M as HDelCommand, N as HExistsCommand, O as HExpireCommand, S as HGetAllCommand, Q as HGetCommand, T as HIncrByCommand, V as HIncrByFloatCommand, W as HKeysCommand, X as HLenCommand, Y as HMGetCommand, Z as HMSetCommand, _ as HRandFieldCommand, $ as HScanCommand, a0 as HSetCommand, a1 as HSetNXCommand, a2 as HStrLenCommand, a3 as HValsCommand, a5 as IncrByCommand, a6 as IncrByFloatCommand, a4 as IncrCommand, a7 as JsonArrAppendCommand, a8 as JsonArrIndexCommand, a9 as JsonArrInsertCommand, aa as JsonArrLenCommand, ab as JsonArrPopCommand, ac as JsonArrTrimCommand, ad as JsonClearCommand, ae as JsonDelCommand, af as JsonForgetCommand, ag as JsonGetCommand, ai as JsonMGetCommand, ah as JsonMergeCommand, aj as JsonNumIncrByCommand, ak as JsonNumMultByCommand, al as JsonObjKeysCommand, am as JsonObjLenCommand, an as JsonRespCommand, ao as JsonSetCommand, ap as JsonStrAppendCommand, aq as JsonStrLenCommand, ar as JsonToggleCommand, as as JsonTypeCommand, at as KeysCommand, au as LIndexCommand, av as LInsertCommand, aw as LLenCommand, ax as LMoveCommand, ay as LPopCommand, az as LPushCommand, aA as LPushXCommand, aB as LRangeCommand, aC as LRemCommand, aD as LSetCommand, aE as LTrimCommand, aF as MGetCommand, aG as MSetCommand, aH as MSetNXCommand, aK as PExpireAtCommand, aJ as PExpireCommand, aM as PSetEXCommand, aN as PTtlCommand, aI as PersistCommand, aL as PingCommand, P as Pipeline, aO as PublishCommand, aS as RPopCommand, aT as RPushCommand, aU as RPushXCommand, aP as RandomKeyCommand, aQ as RenameCommand, aR as RenameNXCommand, d as Requester, aV as SAddCommand, aY as SCardCommand, b0 as SDiffCommand, b1 as SDiffStoreCommand, b8 as SInterCommand, b9 as SInterStoreCommand, ba as SIsMemberCommand, bc as SMIsMemberCommand, bb as SMembersCommand, bd as SMoveCommand, be as SPopCommand, bf as SRandMemberCommand, bg as SRemCommand, bh as SScanCommand, bj as SUnionCommand, bk as SUnionStoreCommand, aW as ScanCommand, aX as ScanCommandOptions, bt as ScoreMember, aZ as ScriptExistsCommand, a_ as ScriptFlushCommand, a$ as ScriptLoadCommand, b4 as SetBitCommand, b2 as SetCommand, b3 as SetCommandOptions, b5 as SetExCommand, b6 as SetNxCommand, b7 as SetRangeCommand, bi as StrLenCommand, bl as TimeCommand, bm as TouchCommand, bn as TtlCommand, bo as Type, bp as TypeCommand, bq as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, br as XAddCommand, bs as XRangeCommand, bv as ZAddCommand, bu as ZAddCommandOptions, bw as ZCardCommand, bx as ZCountCommand, by as ZDiffStoreCommand, bz as ZIncrByCommand, bA as ZInterStoreCommand, bB as ZInterStoreCommandOptions, bC as ZLexCountCommand, bD as ZMScoreCommand, bE as ZPopMaxCommand, bF as ZPopMinCommand, bG as ZRangeCommand, bH as ZRangeCommandOptions, bI as ZRankCommand, bJ as ZRemCommand, bK as ZRemRangeByLexCommand, bL as ZRemRangeByRankCommand, bM as ZRemRangeByScoreCommand, bN as ZRevRankCommand, bO as ZScanCommand, bP as ZScoreCommand, bQ as ZUnionCommand, bR as ZUnionCommandOptions, bS as ZUnionStoreCommand, bT as ZUnionStoreCommandOptions, e as errors } from './zmscore-hRk-rDLY.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-BdNsMd17.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-BdNsMd17.js';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-hRk-rDLY.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, l as EvalCommand, k as EvalROCommand, n as EvalshaCommand, m as EvalshaROCommand, o as ExistsCommand, q as ExpireAtCommand, p as ExpireCommand, F as FlushAllCommand, r as FlushDBCommand, G as GeoAddCommand, s as GeoAddCommandOptions, u as GeoDistCommand, v as GeoHashCommand, t as GeoMember, w as GeoPosCommand, x as GeoSearchCommand, y as GeoSearchStoreCommand, H as GetBitCommand, z as GetCommand, I as GetDelCommand, J as GetExCommand, K as GetRangeCommand, L as GetSetCommand, M as HDelCommand, N as HExistsCommand, O as HExpireCommand, S as HGetAllCommand, Q as HGetCommand, T as HIncrByCommand, V as HIncrByFloatCommand, W as HKeysCommand, X as HLenCommand, Y as HMGetCommand, Z as HMSetCommand, _ as HRandFieldCommand, $ as HScanCommand, a0 as HSetCommand, a1 as HSetNXCommand, a2 as HStrLenCommand, a3 as HValsCommand, a5 as IncrByCommand, a6 as IncrByFloatCommand, a4 as IncrCommand, a7 as JsonArrAppendCommand, a8 as JsonArrIndexCommand, a9 as JsonArrInsertCommand, aa as JsonArrLenCommand, ab as JsonArrPopCommand, ac as JsonArrTrimCommand, ad as JsonClearCommand, ae as JsonDelCommand, af as JsonForgetCommand, ag as JsonGetCommand, ai as JsonMGetCommand, ah as JsonMergeCommand, aj as JsonNumIncrByCommand, ak as JsonNumMultByCommand, al as JsonObjKeysCommand, am as JsonObjLenCommand, an as JsonRespCommand, ao as JsonSetCommand, ap as JsonStrAppendCommand, aq as JsonStrLenCommand, ar as JsonToggleCommand, as as JsonTypeCommand, at as KeysCommand, au as LIndexCommand, av as LInsertCommand, aw as LLenCommand, ax as LMoveCommand, ay as LPopCommand, az as LPushCommand, aA as LPushXCommand, aB as LRangeCommand, aC as LRemCommand, aD as LSetCommand, aE as LTrimCommand, aF as MGetCommand, aG as MSetCommand, aH as MSetNXCommand, aK as PExpireAtCommand, aJ as PExpireCommand, aM as PSetEXCommand, aN as PTtlCommand, aI as PersistCommand, aL as PingCommand, P as Pipeline, aO as PublishCommand, aS as RPopCommand, aT as RPushCommand, aU as RPushXCommand, aP as RandomKeyCommand, aQ as RenameCommand, aR as RenameNXCommand, d as Requester, aV as SAddCommand, aY as SCardCommand, b0 as SDiffCommand, b1 as SDiffStoreCommand, b8 as SInterCommand, b9 as SInterStoreCommand, ba as SIsMemberCommand, bc as SMIsMemberCommand, bb as SMembersCommand, bd as SMoveCommand, be as SPopCommand, bf as SRandMemberCommand, bg as SRemCommand, bh as SScanCommand, bj as SUnionCommand, bk as SUnionStoreCommand, aW as ScanCommand, aX as ScanCommandOptions, bt as ScoreMember, aZ as ScriptExistsCommand, a_ as ScriptFlushCommand, a$ as ScriptLoadCommand, b4 as SetBitCommand, b2 as SetCommand, b3 as SetCommandOptions, b5 as SetExCommand, b6 as SetNxCommand, b7 as SetRangeCommand, bi as StrLenCommand, bl as TimeCommand, bm as TouchCommand, bn as TtlCommand, bo as Type, bp as TypeCommand, bq as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, br as XAddCommand, bs as XRangeCommand, bv as ZAddCommand, bu as ZAddCommandOptions, bw as ZCardCommand, bx as ZCountCommand, by as ZDiffStoreCommand, bz as ZIncrByCommand, bA as ZInterStoreCommand, bB as ZInterStoreCommandOptions, bC as ZLexCountCommand, bD as ZMScoreCommand, bE as ZPopMaxCommand, bF as ZPopMinCommand, bG as ZRangeCommand, bH as ZRangeCommandOptions, bI as ZRankCommand, bJ as ZRemCommand, bK as ZRemRangeByLexCommand, bL as ZRemRangeByRankCommand, bM as ZRemRangeByScoreCommand, bN as ZRevRankCommand, bO as ZScanCommand, bP as ZScoreCommand, bQ as ZUnionCommand, bR as ZUnionCommandOptions, bS as ZUnionStoreCommand, bT as ZUnionStoreCommandOptions, e as errors } from './zmscore-hRk-rDLY.js';
3
3
 
4
4
  /**
5
5
  * Connection credentials for upstash redis.