@upstash/redis 1.36.1 → 1.36.2

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.
@@ -493,6 +493,13 @@ var BitPosCommand = class extends Command {
493
493
  }
494
494
  };
495
495
 
496
+ // pkg/commands/client_setinfo.ts
497
+ var ClientSetInfoCommand = class extends Command {
498
+ constructor([attribute, value], opts) {
499
+ super(["CLIENT", "SETINFO", attribute.toUpperCase(), value], opts);
500
+ }
501
+ };
502
+
496
503
  // pkg/commands/copy.ts
497
504
  var CopyCommand = class extends Command {
498
505
  constructor([key, destinationKey, opts], commandOptions) {
@@ -1090,6 +1097,63 @@ var HGetAllCommand = class extends Command {
1090
1097
  }
1091
1098
  };
1092
1099
 
1100
+ // pkg/commands/hmget.ts
1101
+ function deserialize5(fields, result) {
1102
+ if (result.every((field) => field === null)) {
1103
+ return null;
1104
+ }
1105
+ const obj = {};
1106
+ for (const [i, field] of fields.entries()) {
1107
+ try {
1108
+ obj[field] = JSON.parse(result[i]);
1109
+ } catch {
1110
+ obj[field] = result[i];
1111
+ }
1112
+ }
1113
+ return obj;
1114
+ }
1115
+ var HMGetCommand = class extends Command {
1116
+ constructor([key, ...fields], opts) {
1117
+ super(["hmget", key, ...fields], {
1118
+ deserialize: (result) => deserialize5(fields, result),
1119
+ ...opts
1120
+ });
1121
+ }
1122
+ };
1123
+
1124
+ // pkg/commands/hgetdel.ts
1125
+ var HGetDelCommand = class extends Command {
1126
+ constructor([key, ...fields], opts) {
1127
+ super(["hgetdel", key, "FIELDS", fields.length, ...fields], {
1128
+ deserialize: (result) => deserialize5(fields.map(String), result),
1129
+ ...opts
1130
+ });
1131
+ }
1132
+ };
1133
+
1134
+ // pkg/commands/hgetex.ts
1135
+ var HGetExCommand = class extends Command {
1136
+ constructor([key, opts, ...fields], cmdOpts) {
1137
+ const command = ["hgetex", key];
1138
+ if ("ex" in opts && typeof opts.ex === "number") {
1139
+ command.push("EX", opts.ex);
1140
+ } else if ("px" in opts && typeof opts.px === "number") {
1141
+ command.push("PX", opts.px);
1142
+ } else if ("exat" in opts && typeof opts.exat === "number") {
1143
+ command.push("EXAT", opts.exat);
1144
+ } else if ("pxat" in opts && typeof opts.pxat === "number") {
1145
+ command.push("PXAT", opts.pxat);
1146
+ } else if ("persist" in opts && opts.persist) {
1147
+ command.push("PERSIST");
1148
+ }
1149
+ command.push("FIELDS", fields.length, ...fields);
1150
+ super(command, {
1151
+ deserialize: (result) => deserialize5(fields.map(String), result),
1152
+ ...cmdOpts
1153
+ });
1154
+ }
1155
+ };
1156
+
1093
1157
  // pkg/commands/hincrby.ts
1094
1158
  var HIncrByCommand = class extends Command {
1095
1159
  constructor(cmd, opts) {
@@ -1118,30 +1182,6 @@ var HLenCommand = class extends Command {
1118
1182
  }
1119
1183
  };
1120
1184
 
1121
- // pkg/commands/hmget.ts
1122
- function deserialize5(fields, result) {
1123
- if (result.every((field) => field === null)) {
1124
- return null;
1125
- }
1126
- const obj = {};
1127
- for (const [i, field] of fields.entries()) {
1128
- try {
1129
- obj[field] = JSON.parse(result[i]);
1130
- } catch {
1131
- obj[field] = result[i];
1132
- }
1133
- }
1134
- return obj;
1135
- }
1136
- var HMGetCommand = class extends Command {
1137
- constructor([key, ...fields], opts) {
1138
- super(["hmget", key, ...fields], {
1139
- deserialize: (result) => deserialize5(fields, result),
1140
- ...opts
1141
- });
1142
- }
1143
- };
1144
-
1145
1185
  // pkg/commands/hmset.ts
1146
1186
  var HMSetCommand = class extends Command {
1147
1187
  constructor([key, kv], opts) {
@@ -1173,6 +1213,35 @@ var HSetCommand = class extends Command {
1173
1213
  }
1174
1214
  };
1175
1215
 
1216
+ // pkg/commands/hsetex.ts
1217
+ var HSetExCommand = class extends Command {
1218
+ constructor([key, opts, kv], cmdOpts) {
1219
+ const command = ["hsetex", key];
1220
+ if (opts.conditional) {
1221
+ command.push(opts.conditional.toUpperCase());
1222
+ }
1223
+ if (opts.expiration) {
1224
+ if ("ex" in opts.expiration && typeof opts.expiration.ex === "number") {
1225
+ command.push("EX", opts.expiration.ex);
1226
+ } else if ("px" in opts.expiration && typeof opts.expiration.px === "number") {
1227
+ command.push("PX", opts.expiration.px);
1228
+ } else if ("exat" in opts.expiration && typeof opts.expiration.exat === "number") {
1229
+ command.push("EXAT", opts.expiration.exat);
1230
+ } else if ("pxat" in opts.expiration && typeof opts.expiration.pxat === "number") {
1231
+ command.push("PXAT", opts.expiration.pxat);
1232
+ } else if ("keepttl" in opts.expiration && opts.expiration.keepttl) {
1233
+ command.push("KEEPTTL");
1234
+ }
1235
+ }
1236
+ const entries = Object.entries(kv);
1237
+ command.push("FIELDS", entries.length);
1238
+ for (const [field, value] of entries) {
1239
+ command.push(field, value);
1240
+ }
1241
+ super(command, cmdOpts);
1242
+ }
1243
+ };
1244
+
1176
1245
  // pkg/commands/hsetnx.ts
1177
1246
  var HSetNXCommand = class extends Command {
1178
1247
  constructor(cmd, opts) {
@@ -1956,6 +2025,16 @@ var XAckCommand = class extends Command {
1956
2025
  }
1957
2026
  };
1958
2027
 
2028
+ // pkg/commands/xackdel.ts
2029
+ var XAckDelCommand = class extends Command {
2030
+ constructor([key, group, opts, ...ids], cmdOpts) {
2031
+ const command = ["XACKDEL", key, group];
2032
+ command.push(opts.toUpperCase());
2033
+ command.push("IDS", ids.length, ...ids);
2034
+ super(command, cmdOpts);
2035
+ }
2036
+ };
2037
+
1959
2038
  // pkg/commands/xadd.ts
1960
2039
  var XAddCommand = class extends Command {
1961
2040
  constructor([key, id, entries, opts], commandOptions) {
@@ -2028,6 +2107,18 @@ var XDelCommand = class extends Command {
2028
2107
  }
2029
2108
  };
2030
2109
 
2110
+ // pkg/commands/xdelex.ts
2111
+ var XDelExCommand = class extends Command {
2112
+ constructor([key, opts, ...ids], cmdOpts) {
2113
+ const command = ["XDELEX", key];
2114
+ if (opts) {
2115
+ command.push(opts.toUpperCase());
2116
+ }
2117
+ command.push("IDS", ids.length, ...ids);
2118
+ super(command, cmdOpts);
2119
+ }
2120
+ };
2121
+
2031
2122
  // pkg/commands/xgroup.ts
2032
2123
  var XGroupCommand = class extends Command {
2033
2124
  constructor([key, opts], commandOptions) {
@@ -2592,6 +2683,10 @@ var Pipeline = class {
2592
2683
  * @see https://redis.io/commands/bitpos
2593
2684
  */
2594
2685
  bitpos = (...args) => this.chain(new BitPosCommand(args, this.commandOptions));
2686
+ /**
2687
+ * @see https://redis.io/commands/client-setinfo
2688
+ */
2689
+ clientSetinfo = (...args) => this.chain(new ClientSetInfoCommand(args, this.commandOptions));
2595
2690
  /**
2596
2691
  * @see https://redis.io/commands/copy
2597
2692
  */
@@ -2756,6 +2851,14 @@ var Pipeline = class {
2756
2851
  * @see https://redis.io/commands/hgetall
2757
2852
  */
2758
2853
  hgetall = (...args) => this.chain(new HGetAllCommand(args, this.commandOptions));
2854
+ /**
2855
+ * @see https://redis.io/commands/hgetdel
2856
+ */
2857
+ hgetdel = (...args) => this.chain(new HGetDelCommand(args, this.commandOptions));
2858
+ /**
2859
+ * @see https://redis.io/commands/hgetex
2860
+ */
2861
+ hgetex = (...args) => this.chain(new HGetExCommand(args, this.commandOptions));
2759
2862
  /**
2760
2863
  * @see https://redis.io/commands/hincrby
2761
2864
  */
@@ -2792,6 +2895,10 @@ var Pipeline = class {
2792
2895
  * @see https://redis.io/commands/hset
2793
2896
  */
2794
2897
  hset = (key, kv) => this.chain(new HSetCommand([key, kv], this.commandOptions));
2898
+ /**
2899
+ * @see https://redis.io/commands/hsetex
2900
+ */
2901
+ hsetex = (...args) => this.chain(new HSetExCommand(args, this.commandOptions));
2795
2902
  /**
2796
2903
  * @see https://redis.io/commands/hsetnx
2797
2904
  */
@@ -3096,10 +3203,18 @@ var Pipeline = class {
3096
3203
  * @see https://redis.io/commands/xack
3097
3204
  */
3098
3205
  xack = (...args) => this.chain(new XAckCommand(args, this.commandOptions));
3206
+ /**
3207
+ * @see https://redis.io/commands/xackdel
3208
+ */
3209
+ xackdel = (...args) => this.chain(new XAckDelCommand(args, this.commandOptions));
3099
3210
  /**
3100
3211
  * @see https://redis.io/commands/xdel
3101
3212
  */
3102
3213
  xdel = (...args) => this.chain(new XDelCommand(args, this.commandOptions));
3214
+ /**
3215
+ * @see https://redis.io/commands/xdelex
3216
+ */
3217
+ xdelex = (...args) => this.chain(new XDelExCommand(args, this.commandOptions));
3103
3218
  /**
3104
3219
  * @see https://redis.io/commands/xgroup
3105
3220
  */
@@ -4043,6 +4158,10 @@ var Redis = class {
4043
4158
  * @see https://redis.io/commands/bitpos
4044
4159
  */
4045
4160
  bitpos = (...args) => new BitPosCommand(args, this.opts).exec(this.client);
4161
+ /**
4162
+ * @see https://redis.io/commands/client-setinfo
4163
+ */
4164
+ clientSetinfo = (...args) => new ClientSetInfoCommand(args, this.opts).exec(this.client);
4046
4165
  /**
4047
4166
  * @see https://redis.io/commands/copy
4048
4167
  */
@@ -4207,6 +4326,14 @@ var Redis = class {
4207
4326
  * @see https://redis.io/commands/hgetall
4208
4327
  */
4209
4328
  hgetall = (...args) => new HGetAllCommand(args, this.opts).exec(this.client);
4329
+ /**
4330
+ * @see https://redis.io/commands/hgetdel
4331
+ */
4332
+ hgetdel = (...args) => new HGetDelCommand(args, this.opts).exec(this.client);
4333
+ /**
4334
+ * @see https://redis.io/commands/hgetex
4335
+ */
4336
+ hgetex = (...args) => new HGetExCommand(args, this.opts).exec(this.client);
4210
4337
  /**
4211
4338
  * @see https://redis.io/commands/hincrby
4212
4339
  */
@@ -4243,6 +4370,10 @@ var Redis = class {
4243
4370
  * @see https://redis.io/commands/hset
4244
4371
  */
4245
4372
  hset = (key, kv) => new HSetCommand([key, kv], this.opts).exec(this.client);
4373
+ /**
4374
+ * @see https://redis.io/commands/hsetex
4375
+ */
4376
+ hsetex = (...args) => new HSetExCommand(args, this.opts).exec(this.client);
4246
4377
  /**
4247
4378
  * @see https://redis.io/commands/hsetnx
4248
4379
  */
@@ -4544,10 +4675,18 @@ var Redis = class {
4544
4675
  * @see https://redis.io/commands/xack
4545
4676
  */
4546
4677
  xack = (...args) => new XAckCommand(args, this.opts).exec(this.client);
4678
+ /**
4679
+ * @see https://redis.io/commands/xackdel
4680
+ */
4681
+ xackdel = (...args) => new XAckDelCommand(args, this.opts).exec(this.client);
4547
4682
  /**
4548
4683
  * @see https://redis.io/commands/xdel
4549
4684
  */
4550
4685
  xdel = (...args) => new XDelCommand(args, this.opts).exec(this.client);
4686
+ /**
4687
+ * @see https://redis.io/commands/xdelex
4688
+ */
4689
+ xdelex = (...args) => new XDelExCommand(args, this.opts).exec(this.client);
4551
4690
  /**
4552
4691
  * @see https://redis.io/commands/xgroup
4553
4692
  */
@@ -4689,7 +4828,7 @@ var Redis = class {
4689
4828
  };
4690
4829
 
4691
4830
  // version.ts
4692
- var VERSION = "v1.36.1";
4831
+ var VERSION = "v1.36.2";
4693
4832
 
4694
4833
  export {
4695
4834
  error_exports,
package/cloudflare.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HttpClientConfig, R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-0SAuWM0q.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, r as ExpireAtCommand, p as ExpireCommand, q as ExpireOption, F as FlushAllCommand, s as FlushDBCommand, G as GeoAddCommand, t as GeoAddCommandOptions, v as GeoDistCommand, w as GeoHashCommand, u as GeoMember, x as GeoPosCommand, y as GeoSearchCommand, z as GeoSearchStoreCommand, J as GetBitCommand, I as GetCommand, K as GetDelCommand, L as GetExCommand, M as GetRangeCommand, N as GetSetCommand, O as HDelCommand, Q as HExistsCommand, T as HExpireAtCommand, S as HExpireCommand, V as HExpireTimeCommand, a1 as HGetAllCommand, a0 as HGetCommand, a2 as HIncrByCommand, a3 as HIncrByFloatCommand, a4 as HKeysCommand, a5 as HLenCommand, a6 as HMGetCommand, a7 as HMSetCommand, Y as HPExpireAtCommand, X as HPExpireCommand, Z as HPExpireTimeCommand, _ as HPTtlCommand, $ as HPersistCommand, a8 as HRandFieldCommand, a9 as HScanCommand, aa as HSetCommand, ab as HSetNXCommand, ac as HStrLenCommand, W as HTtlCommand, ad as HValsCommand, af as IncrByCommand, ag as IncrByFloatCommand, ae as IncrCommand, ah as JsonArrAppendCommand, ai as JsonArrIndexCommand, aj as JsonArrInsertCommand, ak as JsonArrLenCommand, al as JsonArrPopCommand, am as JsonArrTrimCommand, an as JsonClearCommand, ao as JsonDelCommand, ap as JsonForgetCommand, aq as JsonGetCommand, as as JsonMGetCommand, ar as JsonMergeCommand, at as JsonNumIncrByCommand, au as JsonNumMultByCommand, av as JsonObjKeysCommand, aw as JsonObjLenCommand, ax as JsonRespCommand, ay as JsonSetCommand, az as JsonStrAppendCommand, aA as JsonStrLenCommand, aB as JsonToggleCommand, aC as JsonTypeCommand, aD as KeysCommand, aE as LIndexCommand, aF as LInsertCommand, aG as LLenCommand, aH as LMoveCommand, aI as LPopCommand, aJ as LPushCommand, aK as LPushXCommand, aL as LRangeCommand, aM as LRemCommand, aN as LSetCommand, aO as LTrimCommand, aP as MGetCommand, aQ as MSetCommand, aR as MSetNXCommand, aU as PExpireAtCommand, aT as PExpireCommand, aW as PSetEXCommand, aX as PTtlCommand, aS as PersistCommand, aV as PingCommand, P as Pipeline, aY as PublishCommand, b0 as RPopCommand, b1 as RPushCommand, b2 as RPushXCommand, aZ as RandomKeyCommand, a_ as RenameCommand, a$ as RenameNXCommand, c as Requester, b3 as SAddCommand, b6 as SCardCommand, ba as SDiffCommand, bb as SDiffStoreCommand, bi as SInterCommand, bj as SInterStoreCommand, bk as SIsMemberCommand, bm as SMIsMemberCommand, bl as SMembersCommand, bn as SMoveCommand, bo as SPopCommand, bp as SRandMemberCommand, bq as SRemCommand, br as SScanCommand, bt as SUnionCommand, bu as SUnionStoreCommand, b4 as ScanCommand, b5 as ScanCommandOptions, bD as ScoreMember, b7 as ScriptExistsCommand, b8 as ScriptFlushCommand, b9 as ScriptLoadCommand, be as SetBitCommand, bc as SetCommand, bd as SetCommandOptions, bf as SetExCommand, bg as SetNxCommand, bh as SetRangeCommand, bs as StrLenCommand, bv as TimeCommand, bw as TouchCommand, bx as TtlCommand, by as Type, bz as TypeCommand, bA as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bB as XAddCommand, bC as XRangeCommand, bF as ZAddCommand, bE as ZAddCommandOptions, bG as ZCardCommand, bH as ZCountCommand, bI as ZDiffStoreCommand, bJ as ZIncrByCommand, bK as ZInterStoreCommand, bL as ZInterStoreCommandOptions, bM as ZLexCountCommand, bN as ZMScoreCommand, bO as ZPopMaxCommand, bP as ZPopMinCommand, bQ as ZRangeCommand, bR as ZRangeCommandOptions, bS as ZRankCommand, bT as ZRemCommand, bU as ZRemRangeByLexCommand, bV as ZRemRangeByRankCommand, bW as ZRemRangeByScoreCommand, bX as ZRevRankCommand, bY as ZScanCommand, bZ as ZScoreCommand, b_ as ZUnionCommand, b$ as ZUnionCommandOptions, c0 as ZUnionStoreCommand, c1 as ZUnionStoreCommandOptions, e as errors } from './zmscore-0SAuWM0q.mjs';
1
+ import { H as HttpClientConfig, R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-BjNXmrug.mjs';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, h as ClientSetInfoAttribute, C as ClientSetInfoCommand, i as CopyCommand, D as DBSizeCommand, k as DecrByCommand, j as DecrCommand, l as DelCommand, E as EchoCommand, n as EvalCommand, m as EvalROCommand, p as EvalshaCommand, o as EvalshaROCommand, q as ExistsCommand, t as ExpireAtCommand, r as ExpireCommand, s as ExpireOption, F as FlushAllCommand, u as FlushDBCommand, G as GeoAddCommand, v as GeoAddCommandOptions, x as GeoDistCommand, y as GeoHashCommand, w as GeoMember, z as GeoPosCommand, I as GeoSearchCommand, J as GeoSearchStoreCommand, L as GetBitCommand, K as GetCommand, M as GetDelCommand, N as GetExCommand, O as GetRangeCommand, Q as GetSetCommand, S as HDelCommand, T as HExistsCommand, W as HExpireAtCommand, V as HExpireCommand, X as HExpireTimeCommand, a3 as HGetAllCommand, a2 as HGetCommand, a4 as HGetDelCommand, a5 as HGetExCommand, a6 as HIncrByCommand, a7 as HIncrByFloatCommand, a8 as HKeysCommand, a9 as HLenCommand, aa as HMGetCommand, ab as HMSetCommand, _ as HPExpireAtCommand, Z as HPExpireCommand, $ as HPExpireTimeCommand, a0 as HPTtlCommand, a1 as HPersistCommand, ac as HRandFieldCommand, ad as HScanCommand, ae as HSetCommand, af as HSetExCommand, ag as HSetNXCommand, ah as HStrLenCommand, Y as HTtlCommand, ai as HValsCommand, ak as IncrByCommand, al as IncrByFloatCommand, aj as IncrCommand, am as JsonArrAppendCommand, an as JsonArrIndexCommand, ao as JsonArrInsertCommand, ap as JsonArrLenCommand, aq as JsonArrPopCommand, ar as JsonArrTrimCommand, as as JsonClearCommand, at as JsonDelCommand, au as JsonForgetCommand, av as JsonGetCommand, ax as JsonMGetCommand, aw as JsonMergeCommand, ay as JsonNumIncrByCommand, az as JsonNumMultByCommand, aA as JsonObjKeysCommand, aB as JsonObjLenCommand, aC as JsonRespCommand, aD as JsonSetCommand, aE as JsonStrAppendCommand, aF as JsonStrLenCommand, aG as JsonToggleCommand, aH as JsonTypeCommand, aI as KeysCommand, aJ as LIndexCommand, aK as LInsertCommand, aL as LLenCommand, aM as LMoveCommand, aN as LPopCommand, aO as LPushCommand, aP as LPushXCommand, aQ as LRangeCommand, aR as LRemCommand, aS as LSetCommand, aT as LTrimCommand, aU as MGetCommand, aV as MSetCommand, aW as MSetNXCommand, aZ as PExpireAtCommand, aY as PExpireCommand, a$ as PSetEXCommand, b0 as PTtlCommand, aX as PersistCommand, a_ as PingCommand, P as Pipeline, b1 as PublishCommand, b5 as RPopCommand, b6 as RPushCommand, b7 as RPushXCommand, b2 as RandomKeyCommand, b3 as RenameCommand, b4 as RenameNXCommand, c as Requester, b8 as SAddCommand, bb as SCardCommand, bf as SDiffCommand, bg as SDiffStoreCommand, bn as SInterCommand, bo as SInterStoreCommand, bp as SIsMemberCommand, br as SMIsMemberCommand, bq as SMembersCommand, bs as SMoveCommand, bt as SPopCommand, bu as SRandMemberCommand, bv as SRemCommand, bw as SScanCommand, by as SUnionCommand, bz as SUnionStoreCommand, b9 as ScanCommand, ba as ScanCommandOptions, bK as ScoreMember, bc as ScriptExistsCommand, bd as ScriptFlushCommand, be as ScriptLoadCommand, bj as SetBitCommand, bh as SetCommand, bi as SetCommandOptions, bk as SetExCommand, bl as SetNxCommand, bm as SetRangeCommand, bx as StrLenCommand, bA as TimeCommand, bB as TouchCommand, bC as TtlCommand, bD as Type, bE as TypeCommand, bF as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bH as XAckDelCommand, bG as XAddCommand, bI as XDelExCommand, bJ as XRangeCommand, bM as ZAddCommand, bL as ZAddCommandOptions, bN as ZCardCommand, bO as ZCountCommand, bP as ZDiffStoreCommand, bQ as ZIncrByCommand, bR as ZInterStoreCommand, bS as ZInterStoreCommandOptions, bT as ZLexCountCommand, bU as ZMScoreCommand, bV as ZPopMaxCommand, bW as ZPopMinCommand, bX as ZRangeCommand, bY as ZRangeCommandOptions, bZ as ZRankCommand, b_ as ZRemCommand, b$ as ZRemRangeByLexCommand, c0 as ZRemRangeByRankCommand, c1 as ZRemRangeByScoreCommand, c2 as ZRevRankCommand, c3 as ZScanCommand, c4 as ZScoreCommand, c5 as ZUnionCommand, c6 as ZUnionCommandOptions, c7 as ZUnionStoreCommand, c8 as ZUnionStoreCommandOptions, e as errors } from './zmscore-BjNXmrug.mjs';
3
3
 
4
4
  type Env = {
5
5
  UPSTASH_DISABLE_TELEMETRY?: string;
package/cloudflare.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { H as HttpClientConfig, R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-0SAuWM0q.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, r as ExpireAtCommand, p as ExpireCommand, q as ExpireOption, F as FlushAllCommand, s as FlushDBCommand, G as GeoAddCommand, t as GeoAddCommandOptions, v as GeoDistCommand, w as GeoHashCommand, u as GeoMember, x as GeoPosCommand, y as GeoSearchCommand, z as GeoSearchStoreCommand, J as GetBitCommand, I as GetCommand, K as GetDelCommand, L as GetExCommand, M as GetRangeCommand, N as GetSetCommand, O as HDelCommand, Q as HExistsCommand, T as HExpireAtCommand, S as HExpireCommand, V as HExpireTimeCommand, a1 as HGetAllCommand, a0 as HGetCommand, a2 as HIncrByCommand, a3 as HIncrByFloatCommand, a4 as HKeysCommand, a5 as HLenCommand, a6 as HMGetCommand, a7 as HMSetCommand, Y as HPExpireAtCommand, X as HPExpireCommand, Z as HPExpireTimeCommand, _ as HPTtlCommand, $ as HPersistCommand, a8 as HRandFieldCommand, a9 as HScanCommand, aa as HSetCommand, ab as HSetNXCommand, ac as HStrLenCommand, W as HTtlCommand, ad as HValsCommand, af as IncrByCommand, ag as IncrByFloatCommand, ae as IncrCommand, ah as JsonArrAppendCommand, ai as JsonArrIndexCommand, aj as JsonArrInsertCommand, ak as JsonArrLenCommand, al as JsonArrPopCommand, am as JsonArrTrimCommand, an as JsonClearCommand, ao as JsonDelCommand, ap as JsonForgetCommand, aq as JsonGetCommand, as as JsonMGetCommand, ar as JsonMergeCommand, at as JsonNumIncrByCommand, au as JsonNumMultByCommand, av as JsonObjKeysCommand, aw as JsonObjLenCommand, ax as JsonRespCommand, ay as JsonSetCommand, az as JsonStrAppendCommand, aA as JsonStrLenCommand, aB as JsonToggleCommand, aC as JsonTypeCommand, aD as KeysCommand, aE as LIndexCommand, aF as LInsertCommand, aG as LLenCommand, aH as LMoveCommand, aI as LPopCommand, aJ as LPushCommand, aK as LPushXCommand, aL as LRangeCommand, aM as LRemCommand, aN as LSetCommand, aO as LTrimCommand, aP as MGetCommand, aQ as MSetCommand, aR as MSetNXCommand, aU as PExpireAtCommand, aT as PExpireCommand, aW as PSetEXCommand, aX as PTtlCommand, aS as PersistCommand, aV as PingCommand, P as Pipeline, aY as PublishCommand, b0 as RPopCommand, b1 as RPushCommand, b2 as RPushXCommand, aZ as RandomKeyCommand, a_ as RenameCommand, a$ as RenameNXCommand, c as Requester, b3 as SAddCommand, b6 as SCardCommand, ba as SDiffCommand, bb as SDiffStoreCommand, bi as SInterCommand, bj as SInterStoreCommand, bk as SIsMemberCommand, bm as SMIsMemberCommand, bl as SMembersCommand, bn as SMoveCommand, bo as SPopCommand, bp as SRandMemberCommand, bq as SRemCommand, br as SScanCommand, bt as SUnionCommand, bu as SUnionStoreCommand, b4 as ScanCommand, b5 as ScanCommandOptions, bD as ScoreMember, b7 as ScriptExistsCommand, b8 as ScriptFlushCommand, b9 as ScriptLoadCommand, be as SetBitCommand, bc as SetCommand, bd as SetCommandOptions, bf as SetExCommand, bg as SetNxCommand, bh as SetRangeCommand, bs as StrLenCommand, bv as TimeCommand, bw as TouchCommand, bx as TtlCommand, by as Type, bz as TypeCommand, bA as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bB as XAddCommand, bC as XRangeCommand, bF as ZAddCommand, bE as ZAddCommandOptions, bG as ZCardCommand, bH as ZCountCommand, bI as ZDiffStoreCommand, bJ as ZIncrByCommand, bK as ZInterStoreCommand, bL as ZInterStoreCommandOptions, bM as ZLexCountCommand, bN as ZMScoreCommand, bO as ZPopMaxCommand, bP as ZPopMinCommand, bQ as ZRangeCommand, bR as ZRangeCommandOptions, bS as ZRankCommand, bT as ZRemCommand, bU as ZRemRangeByLexCommand, bV as ZRemRangeByRankCommand, bW as ZRemRangeByScoreCommand, bX as ZRevRankCommand, bY as ZScanCommand, bZ as ZScoreCommand, b_ as ZUnionCommand, b$ as ZUnionCommandOptions, c0 as ZUnionStoreCommand, c1 as ZUnionStoreCommandOptions, e as errors } from './zmscore-0SAuWM0q.js';
1
+ import { H as HttpClientConfig, R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-BjNXmrug.js';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, h as ClientSetInfoAttribute, C as ClientSetInfoCommand, i as CopyCommand, D as DBSizeCommand, k as DecrByCommand, j as DecrCommand, l as DelCommand, E as EchoCommand, n as EvalCommand, m as EvalROCommand, p as EvalshaCommand, o as EvalshaROCommand, q as ExistsCommand, t as ExpireAtCommand, r as ExpireCommand, s as ExpireOption, F as FlushAllCommand, u as FlushDBCommand, G as GeoAddCommand, v as GeoAddCommandOptions, x as GeoDistCommand, y as GeoHashCommand, w as GeoMember, z as GeoPosCommand, I as GeoSearchCommand, J as GeoSearchStoreCommand, L as GetBitCommand, K as GetCommand, M as GetDelCommand, N as GetExCommand, O as GetRangeCommand, Q as GetSetCommand, S as HDelCommand, T as HExistsCommand, W as HExpireAtCommand, V as HExpireCommand, X as HExpireTimeCommand, a3 as HGetAllCommand, a2 as HGetCommand, a4 as HGetDelCommand, a5 as HGetExCommand, a6 as HIncrByCommand, a7 as HIncrByFloatCommand, a8 as HKeysCommand, a9 as HLenCommand, aa as HMGetCommand, ab as HMSetCommand, _ as HPExpireAtCommand, Z as HPExpireCommand, $ as HPExpireTimeCommand, a0 as HPTtlCommand, a1 as HPersistCommand, ac as HRandFieldCommand, ad as HScanCommand, ae as HSetCommand, af as HSetExCommand, ag as HSetNXCommand, ah as HStrLenCommand, Y as HTtlCommand, ai as HValsCommand, ak as IncrByCommand, al as IncrByFloatCommand, aj as IncrCommand, am as JsonArrAppendCommand, an as JsonArrIndexCommand, ao as JsonArrInsertCommand, ap as JsonArrLenCommand, aq as JsonArrPopCommand, ar as JsonArrTrimCommand, as as JsonClearCommand, at as JsonDelCommand, au as JsonForgetCommand, av as JsonGetCommand, ax as JsonMGetCommand, aw as JsonMergeCommand, ay as JsonNumIncrByCommand, az as JsonNumMultByCommand, aA as JsonObjKeysCommand, aB as JsonObjLenCommand, aC as JsonRespCommand, aD as JsonSetCommand, aE as JsonStrAppendCommand, aF as JsonStrLenCommand, aG as JsonToggleCommand, aH as JsonTypeCommand, aI as KeysCommand, aJ as LIndexCommand, aK as LInsertCommand, aL as LLenCommand, aM as LMoveCommand, aN as LPopCommand, aO as LPushCommand, aP as LPushXCommand, aQ as LRangeCommand, aR as LRemCommand, aS as LSetCommand, aT as LTrimCommand, aU as MGetCommand, aV as MSetCommand, aW as MSetNXCommand, aZ as PExpireAtCommand, aY as PExpireCommand, a$ as PSetEXCommand, b0 as PTtlCommand, aX as PersistCommand, a_ as PingCommand, P as Pipeline, b1 as PublishCommand, b5 as RPopCommand, b6 as RPushCommand, b7 as RPushXCommand, b2 as RandomKeyCommand, b3 as RenameCommand, b4 as RenameNXCommand, c as Requester, b8 as SAddCommand, bb as SCardCommand, bf as SDiffCommand, bg as SDiffStoreCommand, bn as SInterCommand, bo as SInterStoreCommand, bp as SIsMemberCommand, br as SMIsMemberCommand, bq as SMembersCommand, bs as SMoveCommand, bt as SPopCommand, bu as SRandMemberCommand, bv as SRemCommand, bw as SScanCommand, by as SUnionCommand, bz as SUnionStoreCommand, b9 as ScanCommand, ba as ScanCommandOptions, bK as ScoreMember, bc as ScriptExistsCommand, bd as ScriptFlushCommand, be as ScriptLoadCommand, bj as SetBitCommand, bh as SetCommand, bi as SetCommandOptions, bk as SetExCommand, bl as SetNxCommand, bm as SetRangeCommand, bx as StrLenCommand, bA as TimeCommand, bB as TouchCommand, bC as TtlCommand, bD as Type, bE as TypeCommand, bF as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bH as XAckDelCommand, bG as XAddCommand, bI as XDelExCommand, bJ as XRangeCommand, bM as ZAddCommand, bL as ZAddCommandOptions, bN as ZCardCommand, bO as ZCountCommand, bP as ZDiffStoreCommand, bQ as ZIncrByCommand, bR as ZInterStoreCommand, bS as ZInterStoreCommandOptions, bT as ZLexCountCommand, bU as ZMScoreCommand, bV as ZPopMaxCommand, bW as ZPopMinCommand, bX as ZRangeCommand, bY as ZRangeCommandOptions, bZ as ZRankCommand, b_ as ZRemCommand, b$ as ZRemRangeByLexCommand, c0 as ZRemRangeByRankCommand, c1 as ZRemRangeByScoreCommand, c2 as ZRevRankCommand, c3 as ZScanCommand, c4 as ZScoreCommand, c5 as ZUnionCommand, c6 as ZUnionCommandOptions, c7 as ZUnionStoreCommand, c8 as ZUnionStoreCommandOptions, e as errors } from './zmscore-BjNXmrug.js';
3
3
 
4
4
  type Env = {
5
5
  UPSTASH_DISABLE_TELEMETRY?: string;
package/cloudflare.js CHANGED
@@ -580,6 +580,13 @@ var BitPosCommand = class extends Command {
580
580
  }
581
581
  };
582
582
 
583
+ // pkg/commands/client_setinfo.ts
584
+ var ClientSetInfoCommand = class extends Command {
585
+ constructor([attribute, value], opts) {
586
+ super(["CLIENT", "SETINFO", attribute.toUpperCase(), value], opts);
587
+ }
588
+ };
589
+
583
590
  // pkg/commands/copy.ts
584
591
  var CopyCommand = class extends Command {
585
592
  constructor([key, destinationKey, opts], commandOptions) {
@@ -1177,6 +1184,63 @@ var HGetAllCommand = class extends Command {
1177
1184
  }
1178
1185
  };
1179
1186
 
1187
+ // pkg/commands/hmget.ts
1188
+ function deserialize4(fields, result) {
1189
+ if (result.every((field) => field === null)) {
1190
+ return null;
1191
+ }
1192
+ const obj = {};
1193
+ for (const [i, field] of fields.entries()) {
1194
+ try {
1195
+ obj[field] = JSON.parse(result[i]);
1196
+ } catch {
1197
+ obj[field] = result[i];
1198
+ }
1199
+ }
1200
+ return obj;
1201
+ }
1202
+ var HMGetCommand = class extends Command {
1203
+ constructor([key, ...fields], opts) {
1204
+ super(["hmget", key, ...fields], {
1205
+ deserialize: (result) => deserialize4(fields, result),
1206
+ ...opts
1207
+ });
1208
+ }
1209
+ };
1210
+
1211
+ // pkg/commands/hgetdel.ts
1212
+ var HGetDelCommand = class extends Command {
1213
+ constructor([key, ...fields], opts) {
1214
+ super(["hgetdel", key, "FIELDS", fields.length, ...fields], {
1215
+ deserialize: (result) => deserialize4(fields.map(String), result),
1216
+ ...opts
1217
+ });
1218
+ }
1219
+ };
1220
+
1221
+ // pkg/commands/hgetex.ts
1222
+ var HGetExCommand = class extends Command {
1223
+ constructor([key, opts, ...fields], cmdOpts) {
1224
+ const command = ["hgetex", key];
1225
+ if ("ex" in opts && typeof opts.ex === "number") {
1226
+ command.push("EX", opts.ex);
1227
+ } else if ("px" in opts && typeof opts.px === "number") {
1228
+ command.push("PX", opts.px);
1229
+ } else if ("exat" in opts && typeof opts.exat === "number") {
1230
+ command.push("EXAT", opts.exat);
1231
+ } else if ("pxat" in opts && typeof opts.pxat === "number") {
1232
+ command.push("PXAT", opts.pxat);
1233
+ } else if ("persist" in opts && opts.persist) {
1234
+ command.push("PERSIST");
1235
+ }
1236
+ command.push("FIELDS", fields.length, ...fields);
1237
+ super(command, {
1238
+ deserialize: (result) => deserialize4(fields.map(String), result),
1239
+ ...cmdOpts
1240
+ });
1241
+ }
1242
+ };
1243
+
1180
1244
  // pkg/commands/hincrby.ts
1181
1245
  var HIncrByCommand = class extends Command {
1182
1246
  constructor(cmd, opts) {
@@ -1205,30 +1269,6 @@ var HLenCommand = class extends Command {
1205
1269
  }
1206
1270
  };
1207
1271
 
1208
- // pkg/commands/hmget.ts
1209
- function deserialize4(fields, result) {
1210
- if (result.every((field) => field === null)) {
1211
- return null;
1212
- }
1213
- const obj = {};
1214
- for (const [i, field] of fields.entries()) {
1215
- try {
1216
- obj[field] = JSON.parse(result[i]);
1217
- } catch {
1218
- obj[field] = result[i];
1219
- }
1220
- }
1221
- return obj;
1222
- }
1223
- var HMGetCommand = class extends Command {
1224
- constructor([key, ...fields], opts) {
1225
- super(["hmget", key, ...fields], {
1226
- deserialize: (result) => deserialize4(fields, result),
1227
- ...opts
1228
- });
1229
- }
1230
- };
1231
-
1232
1272
  // pkg/commands/hmset.ts
1233
1273
  var HMSetCommand = class extends Command {
1234
1274
  constructor([key, kv], opts) {
@@ -1294,6 +1334,35 @@ var HSetCommand = class extends Command {
1294
1334
  }
1295
1335
  };
1296
1336
 
1337
+ // pkg/commands/hsetex.ts
1338
+ var HSetExCommand = class extends Command {
1339
+ constructor([key, opts, kv], cmdOpts) {
1340
+ const command = ["hsetex", key];
1341
+ if (opts.conditional) {
1342
+ command.push(opts.conditional.toUpperCase());
1343
+ }
1344
+ if (opts.expiration) {
1345
+ if ("ex" in opts.expiration && typeof opts.expiration.ex === "number") {
1346
+ command.push("EX", opts.expiration.ex);
1347
+ } else if ("px" in opts.expiration && typeof opts.expiration.px === "number") {
1348
+ command.push("PX", opts.expiration.px);
1349
+ } else if ("exat" in opts.expiration && typeof opts.expiration.exat === "number") {
1350
+ command.push("EXAT", opts.expiration.exat);
1351
+ } else if ("pxat" in opts.expiration && typeof opts.expiration.pxat === "number") {
1352
+ command.push("PXAT", opts.expiration.pxat);
1353
+ } else if ("keepttl" in opts.expiration && opts.expiration.keepttl) {
1354
+ command.push("KEEPTTL");
1355
+ }
1356
+ }
1357
+ const entries = Object.entries(kv);
1358
+ command.push("FIELDS", entries.length);
1359
+ for (const [field, value] of entries) {
1360
+ command.push(field, value);
1361
+ }
1362
+ super(command, cmdOpts);
1363
+ }
1364
+ };
1365
+
1297
1366
  // pkg/commands/hsetnx.ts
1298
1367
  var HSetNXCommand = class extends Command {
1299
1368
  constructor(cmd, opts) {
@@ -2077,6 +2146,16 @@ var XAckCommand = class extends Command {
2077
2146
  }
2078
2147
  };
2079
2148
 
2149
+ // pkg/commands/xackdel.ts
2150
+ var XAckDelCommand = class extends Command {
2151
+ constructor([key, group, opts, ...ids], cmdOpts) {
2152
+ const command = ["XACKDEL", key, group];
2153
+ command.push(opts.toUpperCase());
2154
+ command.push("IDS", ids.length, ...ids);
2155
+ super(command, cmdOpts);
2156
+ }
2157
+ };
2158
+
2080
2159
  // pkg/commands/xadd.ts
2081
2160
  var XAddCommand = class extends Command {
2082
2161
  constructor([key, id, entries, opts], commandOptions) {
@@ -2149,6 +2228,18 @@ var XDelCommand = class extends Command {
2149
2228
  }
2150
2229
  };
2151
2230
 
2231
+ // pkg/commands/xdelex.ts
2232
+ var XDelExCommand = class extends Command {
2233
+ constructor([key, opts, ...ids], cmdOpts) {
2234
+ const command = ["XDELEX", key];
2235
+ if (opts) {
2236
+ command.push(opts.toUpperCase());
2237
+ }
2238
+ command.push("IDS", ids.length, ...ids);
2239
+ super(command, cmdOpts);
2240
+ }
2241
+ };
2242
+
2152
2243
  // pkg/commands/xgroup.ts
2153
2244
  var XGroupCommand = class extends Command {
2154
2245
  constructor([key, opts], commandOptions) {
@@ -2899,6 +2990,10 @@ var Pipeline = class {
2899
2990
  * @see https://redis.io/commands/bitpos
2900
2991
  */
2901
2992
  bitpos = (...args) => this.chain(new BitPosCommand(args, this.commandOptions));
2993
+ /**
2994
+ * @see https://redis.io/commands/client-setinfo
2995
+ */
2996
+ clientSetinfo = (...args) => this.chain(new ClientSetInfoCommand(args, this.commandOptions));
2902
2997
  /**
2903
2998
  * @see https://redis.io/commands/copy
2904
2999
  */
@@ -3063,6 +3158,14 @@ var Pipeline = class {
3063
3158
  * @see https://redis.io/commands/hgetall
3064
3159
  */
3065
3160
  hgetall = (...args) => this.chain(new HGetAllCommand(args, this.commandOptions));
3161
+ /**
3162
+ * @see https://redis.io/commands/hgetdel
3163
+ */
3164
+ hgetdel = (...args) => this.chain(new HGetDelCommand(args, this.commandOptions));
3165
+ /**
3166
+ * @see https://redis.io/commands/hgetex
3167
+ */
3168
+ hgetex = (...args) => this.chain(new HGetExCommand(args, this.commandOptions));
3066
3169
  /**
3067
3170
  * @see https://redis.io/commands/hincrby
3068
3171
  */
@@ -3099,6 +3202,10 @@ var Pipeline = class {
3099
3202
  * @see https://redis.io/commands/hset
3100
3203
  */
3101
3204
  hset = (key, kv) => this.chain(new HSetCommand([key, kv], this.commandOptions));
3205
+ /**
3206
+ * @see https://redis.io/commands/hsetex
3207
+ */
3208
+ hsetex = (...args) => this.chain(new HSetExCommand(args, this.commandOptions));
3102
3209
  /**
3103
3210
  * @see https://redis.io/commands/hsetnx
3104
3211
  */
@@ -3403,10 +3510,18 @@ var Pipeline = class {
3403
3510
  * @see https://redis.io/commands/xack
3404
3511
  */
3405
3512
  xack = (...args) => this.chain(new XAckCommand(args, this.commandOptions));
3513
+ /**
3514
+ * @see https://redis.io/commands/xackdel
3515
+ */
3516
+ xackdel = (...args) => this.chain(new XAckDelCommand(args, this.commandOptions));
3406
3517
  /**
3407
3518
  * @see https://redis.io/commands/xdel
3408
3519
  */
3409
3520
  xdel = (...args) => this.chain(new XDelCommand(args, this.commandOptions));
3521
+ /**
3522
+ * @see https://redis.io/commands/xdelex
3523
+ */
3524
+ xdelex = (...args) => this.chain(new XDelExCommand(args, this.commandOptions));
3410
3525
  /**
3411
3526
  * @see https://redis.io/commands/xgroup
3412
3527
  */
@@ -4064,6 +4179,10 @@ var Redis = class {
4064
4179
  * @see https://redis.io/commands/bitpos
4065
4180
  */
4066
4181
  bitpos = (...args) => new BitPosCommand(args, this.opts).exec(this.client);
4182
+ /**
4183
+ * @see https://redis.io/commands/client-setinfo
4184
+ */
4185
+ clientSetinfo = (...args) => new ClientSetInfoCommand(args, this.opts).exec(this.client);
4067
4186
  /**
4068
4187
  * @see https://redis.io/commands/copy
4069
4188
  */
@@ -4228,6 +4347,14 @@ var Redis = class {
4228
4347
  * @see https://redis.io/commands/hgetall
4229
4348
  */
4230
4349
  hgetall = (...args) => new HGetAllCommand(args, this.opts).exec(this.client);
4350
+ /**
4351
+ * @see https://redis.io/commands/hgetdel
4352
+ */
4353
+ hgetdel = (...args) => new HGetDelCommand(args, this.opts).exec(this.client);
4354
+ /**
4355
+ * @see https://redis.io/commands/hgetex
4356
+ */
4357
+ hgetex = (...args) => new HGetExCommand(args, this.opts).exec(this.client);
4231
4358
  /**
4232
4359
  * @see https://redis.io/commands/hincrby
4233
4360
  */
@@ -4264,6 +4391,10 @@ var Redis = class {
4264
4391
  * @see https://redis.io/commands/hset
4265
4392
  */
4266
4393
  hset = (key, kv) => new HSetCommand([key, kv], this.opts).exec(this.client);
4394
+ /**
4395
+ * @see https://redis.io/commands/hsetex
4396
+ */
4397
+ hsetex = (...args) => new HSetExCommand(args, this.opts).exec(this.client);
4267
4398
  /**
4268
4399
  * @see https://redis.io/commands/hsetnx
4269
4400
  */
@@ -4565,10 +4696,18 @@ var Redis = class {
4565
4696
  * @see https://redis.io/commands/xack
4566
4697
  */
4567
4698
  xack = (...args) => new XAckCommand(args, this.opts).exec(this.client);
4699
+ /**
4700
+ * @see https://redis.io/commands/xackdel
4701
+ */
4702
+ xackdel = (...args) => new XAckDelCommand(args, this.opts).exec(this.client);
4568
4703
  /**
4569
4704
  * @see https://redis.io/commands/xdel
4570
4705
  */
4571
4706
  xdel = (...args) => new XDelCommand(args, this.opts).exec(this.client);
4707
+ /**
4708
+ * @see https://redis.io/commands/xdelex
4709
+ */
4710
+ xdelex = (...args) => new XDelExCommand(args, this.opts).exec(this.client);
4572
4711
  /**
4573
4712
  * @see https://redis.io/commands/xgroup
4574
4713
  */
@@ -4710,7 +4849,7 @@ var Redis = class {
4710
4849
  };
4711
4850
 
4712
4851
  // version.ts
4713
- var VERSION = "v1.36.1";
4852
+ var VERSION = "v1.36.2";
4714
4853
 
4715
4854
  // platforms/cloudflare.ts
4716
4855
  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-LLI2WIYN.mjs";
6
+ } from "./chunk-Q3SWX4BB.mjs";
7
7
 
8
8
  // platforms/cloudflare.ts
9
9
  var Redis2 = class _Redis extends Redis {