@upstash/redis 1.34.3 → 1.34.5

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.
@@ -25,6 +25,43 @@ var UrlError = class extends Error {
25
25
  }
26
26
  };
27
27
 
28
+ // pkg/util.ts
29
+ function parseRecursive(obj) {
30
+ const parsed = Array.isArray(obj) ? obj.map((o) => {
31
+ try {
32
+ return parseRecursive(o);
33
+ } catch {
34
+ return o;
35
+ }
36
+ }) : JSON.parse(obj);
37
+ if (typeof parsed === "number" && parsed.toString() !== obj) {
38
+ return obj;
39
+ }
40
+ return parsed;
41
+ }
42
+ function parseResponse(result) {
43
+ try {
44
+ return parseRecursive(result);
45
+ } catch {
46
+ return result;
47
+ }
48
+ }
49
+ function deserializeScanResponse(result) {
50
+ return [result[0], ...parseResponse(result.slice(1))];
51
+ }
52
+ function mergeHeaders(...headers) {
53
+ const merged = {};
54
+ for (const header of headers) {
55
+ if (!header) continue;
56
+ for (const [key, value] of Object.entries(header)) {
57
+ if (value !== void 0 && value !== null) {
58
+ merged[key] = value;
59
+ }
60
+ }
61
+ }
62
+ return merged;
63
+ }
64
+
28
65
  // pkg/http.ts
29
66
  var HttpClient = class {
30
67
  baseUrl;
@@ -73,15 +110,18 @@ var HttpClient = class {
73
110
  this.headers = merge(this.headers, "Upstash-Telemetry-Sdk", telemetry.sdk);
74
111
  }
75
112
  async request(req) {
113
+ const requestHeaders = mergeHeaders(this.headers, req.headers ?? {});
114
+ const requestUrl = [this.baseUrl, ...req.path ?? []].join("/");
115
+ const isEventStream = requestHeaders.Accept === "text/event-stream";
76
116
  const requestOptions = {
77
117
  //@ts-expect-error this should throw due to bun regression
78
118
  cache: this.options.cache,
79
119
  method: "POST",
80
- headers: this.headers,
120
+ headers: requestHeaders,
81
121
  body: JSON.stringify(req.body),
82
122
  keepalive: this.options.keepAlive,
83
123
  agent: this.options.agent,
84
- signal: this.options.signal,
124
+ signal: req.signal ?? this.options.signal,
85
125
  /**
86
126
  * Fastly specific
87
127
  */
@@ -100,7 +140,7 @@ var HttpClient = class {
100
140
  let error = null;
101
141
  for (let i = 0; i <= this.retry.attempts; i++) {
102
142
  try {
103
- res = await fetch([this.baseUrl, ...req.path ?? []].join("/"), requestOptions);
143
+ res = await fetch(requestUrl, requestOptions);
104
144
  break;
105
145
  } catch (error_) {
106
146
  if (this.options.signal?.aborted) {
@@ -115,20 +155,54 @@ var HttpClient = class {
115
155
  break;
116
156
  }
117
157
  error = error_;
118
- await new Promise((r) => setTimeout(r, this.retry.backoff(i)));
158
+ if (i < this.retry.attempts) {
159
+ await new Promise((r) => setTimeout(r, this.retry.backoff(i)));
160
+ }
119
161
  }
120
162
  }
121
163
  if (!res) {
122
164
  throw error ?? new Error("Exhausted all retries");
123
165
  }
124
- const body = await res.json();
125
166
  if (!res.ok) {
126
- throw new UpstashError(`${body.error}, command was: ${JSON.stringify(req.body)}`);
167
+ const body2 = await res.json();
168
+ throw new UpstashError(`${body2.error}, command was: ${JSON.stringify(req.body)}`);
127
169
  }
128
170
  if (this.readYourWrites) {
129
171
  const headers = res.headers;
130
172
  this.upstashSyncToken = headers.get("upstash-sync-token") ?? "";
131
173
  }
174
+ if (isEventStream && req && req.onMessage && res.body) {
175
+ const reader = res.body.getReader();
176
+ const decoder = new TextDecoder();
177
+ (async () => {
178
+ try {
179
+ while (true) {
180
+ const { value, done } = await reader.read();
181
+ if (done) break;
182
+ const chunk = decoder.decode(value);
183
+ const lines = chunk.split("\n");
184
+ for (const line of lines) {
185
+ if (line.startsWith("data: ")) {
186
+ const data = line.slice(6);
187
+ req.onMessage?.(data);
188
+ }
189
+ }
190
+ }
191
+ } catch (error2) {
192
+ if (error2 instanceof Error && error2.name === "AbortError") {
193
+ } else {
194
+ console.error("Stream reading error:", error2);
195
+ }
196
+ } finally {
197
+ try {
198
+ await reader.cancel();
199
+ } catch {
200
+ }
201
+ }
202
+ })();
203
+ return { result: 1 };
204
+ }
205
+ const body = await res.json();
132
206
  if (this.readYourWrites) {
133
207
  const headers = res.headers;
134
208
  this.upstashSyncToken = headers.get("upstash-sync-token") ?? "";
@@ -199,31 +273,6 @@ function merge(obj, key, value) {
199
273
  return obj;
200
274
  }
201
275
 
202
- // pkg/util.ts
203
- function parseRecursive(obj) {
204
- const parsed = Array.isArray(obj) ? obj.map((o) => {
205
- try {
206
- return parseRecursive(o);
207
- } catch {
208
- return o;
209
- }
210
- }) : JSON.parse(obj);
211
- if (typeof parsed === "number" && parsed.toString() !== obj) {
212
- return obj;
213
- }
214
- return parsed;
215
- }
216
- function parseResponse(result) {
217
- try {
218
- return parseRecursive(result);
219
- } catch {
220
- return result;
221
- }
222
- }
223
- function deserializeScanResponse(result) {
224
- return [result[0], ...parseResponse(result.slice(1))];
225
- }
226
-
227
276
  // pkg/commands/command.ts
228
277
  var defaultSerializer = (c) => {
229
278
  switch (typeof c) {
@@ -241,6 +290,11 @@ var Command = class {
241
290
  command;
242
291
  serialize;
243
292
  deserialize;
293
+ headers;
294
+ path;
295
+ onMessage;
296
+ isStreaming;
297
+ signal;
244
298
  /**
245
299
  * Create a new command instance.
246
300
  *
@@ -250,6 +304,11 @@ var Command = class {
250
304
  this.serialize = defaultSerializer;
251
305
  this.deserialize = opts?.automaticDeserialization === void 0 || opts.automaticDeserialization ? opts?.deserialize ?? parseResponse : (x) => x;
252
306
  this.command = command.map((c) => this.serialize(c));
307
+ this.headers = opts?.headers;
308
+ this.path = opts?.path;
309
+ this.onMessage = opts?.streamOptions?.onMessage;
310
+ this.isStreaming = opts?.streamOptions?.isStreaming ?? false;
311
+ this.signal = opts?.streamOptions?.signal;
253
312
  if (opts?.latencyLogging) {
254
313
  const originalExec = this.exec.bind(this);
255
314
  this.exec = async (client) => {
@@ -270,7 +329,12 @@ var Command = class {
270
329
  async exec(client) {
271
330
  const { result, error } = await client.request({
272
331
  body: this.command,
273
- upstashSyncToken: client.upstashSyncToken
332
+ path: this.path,
333
+ upstashSyncToken: client.upstashSyncToken,
334
+ headers: this.headers,
335
+ onMessage: this.onMessage,
336
+ isStreaming: this.isStreaming,
337
+ signal: this.signal
274
338
  });
275
339
  if (error) {
276
340
  throw new UpstashError(error);
@@ -446,6 +510,14 @@ var EvalshaCommand = class extends Command {
446
510
  }
447
511
  };
448
512
 
513
+ // pkg/commands/exec.ts
514
+ var ExecCommand = class extends Command {
515
+ constructor(cmd, opts) {
516
+ const normalizedCmd = cmd.map((arg) => typeof arg === "string" ? arg : String(arg));
517
+ super(normalizedCmd, opts);
518
+ }
519
+ };
520
+
449
521
  // pkg/commands/exists.ts
450
522
  var ExistsCommand = class extends Command {
451
523
  constructor(cmd, opts) {
@@ -662,6 +734,27 @@ var GetDelCommand = class extends Command {
662
734
  }
663
735
  };
664
736
 
737
+ // pkg/commands/getex.ts
738
+ var GetExCommand = class extends Command {
739
+ constructor([key, opts], cmdOpts) {
740
+ const command = ["getex", key];
741
+ if (opts) {
742
+ if ("ex" in opts && typeof opts.ex === "number") {
743
+ command.push("ex", opts.ex);
744
+ } else if ("px" in opts && typeof opts.px === "number") {
745
+ command.push("px", opts.px);
746
+ } else if ("exat" in opts && typeof opts.exat === "number") {
747
+ command.push("exat", opts.exat);
748
+ } else if ("pxat" in opts && typeof opts.pxat === "number") {
749
+ command.push("pxat", opts.pxat);
750
+ } else if ("persist" in opts && opts.persist) {
751
+ command.push("persist");
752
+ }
753
+ }
754
+ super(command, cmdOpts);
755
+ }
756
+ };
757
+
665
758
  // pkg/commands/getrange.ts
666
759
  var GetRangeCommand = class extends Command {
667
760
  constructor(cmd, opts) {
@@ -2298,6 +2391,10 @@ var Pipeline = class {
2298
2391
  * @see https://redis.io/commands/getdel
2299
2392
  */
2300
2393
  getdel = (...args) => this.chain(new GetDelCommand(args, this.commandOptions));
2394
+ /**
2395
+ * @see https://redis.io/commands/getex
2396
+ */
2397
+ getex = (...args) => this.chain(new GetExCommand(args, this.commandOptions));
2301
2398
  /**
2302
2399
  * @see https://redis.io/commands/getrange
2303
2400
  */
@@ -2962,6 +3059,183 @@ var AutoPipelineExecutor = class {
2962
3059
  }
2963
3060
  };
2964
3061
 
3062
+ // pkg/commands/psubscribe.ts
3063
+ var PSubscribeCommand = class extends Command {
3064
+ constructor(cmd, opts) {
3065
+ const sseHeaders = {
3066
+ Accept: "text/event-stream",
3067
+ "Cache-Control": "no-cache",
3068
+ Connection: "keep-alive"
3069
+ };
3070
+ super([], {
3071
+ ...opts,
3072
+ headers: sseHeaders,
3073
+ path: ["psubscribe", ...cmd],
3074
+ streamOptions: {
3075
+ isStreaming: true,
3076
+ onMessage: opts?.streamOptions?.onMessage,
3077
+ signal: opts?.streamOptions?.signal
3078
+ }
3079
+ });
3080
+ }
3081
+ };
3082
+
3083
+ // pkg/commands/subscribe.ts
3084
+ var Subscriber = class extends EventTarget {
3085
+ subscriptions;
3086
+ client;
3087
+ listeners;
3088
+ constructor(client, channels, isPattern = false) {
3089
+ super();
3090
+ this.client = client;
3091
+ this.subscriptions = /* @__PURE__ */ new Map();
3092
+ this.listeners = /* @__PURE__ */ new Map();
3093
+ for (const channel of channels) {
3094
+ if (isPattern) {
3095
+ this.subscribeToPattern(channel);
3096
+ } else {
3097
+ this.subscribeToChannel(channel);
3098
+ }
3099
+ }
3100
+ }
3101
+ subscribeToChannel(channel) {
3102
+ const controller = new AbortController();
3103
+ const command = new SubscribeCommand([channel], {
3104
+ streamOptions: {
3105
+ signal: controller.signal,
3106
+ onMessage: (data) => this.handleMessage(data, false)
3107
+ }
3108
+ });
3109
+ command.exec(this.client).catch((error) => {
3110
+ if (error.name !== "AbortError") {
3111
+ this.dispatchToListeners("error", error);
3112
+ }
3113
+ });
3114
+ this.subscriptions.set(channel, {
3115
+ command,
3116
+ controller,
3117
+ isPattern: false
3118
+ });
3119
+ }
3120
+ subscribeToPattern(pattern) {
3121
+ const controller = new AbortController();
3122
+ const command = new PSubscribeCommand([pattern], {
3123
+ streamOptions: {
3124
+ signal: controller.signal,
3125
+ onMessage: (data) => this.handleMessage(data, true)
3126
+ }
3127
+ });
3128
+ command.exec(this.client).catch((error) => {
3129
+ if (error.name !== "AbortError") {
3130
+ this.dispatchToListeners("error", error);
3131
+ }
3132
+ });
3133
+ this.subscriptions.set(pattern, {
3134
+ command,
3135
+ controller,
3136
+ isPattern: true
3137
+ });
3138
+ }
3139
+ handleMessage(data, isPattern) {
3140
+ const messageData = data.replace(/^data:\s*/, "");
3141
+ const firstCommaIndex = messageData.indexOf(",");
3142
+ const secondCommaIndex = messageData.indexOf(",", firstCommaIndex + 1);
3143
+ const thirdCommaIndex = isPattern ? messageData.indexOf(",", secondCommaIndex + 1) : -1;
3144
+ if (firstCommaIndex !== -1 && secondCommaIndex !== -1) {
3145
+ const type = messageData.slice(0, firstCommaIndex);
3146
+ if (isPattern && type === "pmessage" && thirdCommaIndex !== -1) {
3147
+ const pattern = messageData.slice(firstCommaIndex + 1, secondCommaIndex);
3148
+ const channel = messageData.slice(secondCommaIndex + 1, thirdCommaIndex);
3149
+ const messageStr = messageData.slice(thirdCommaIndex + 1);
3150
+ try {
3151
+ const message = JSON.parse(messageStr);
3152
+ this.dispatchToListeners("pmessage", { pattern, channel, message });
3153
+ this.dispatchToListeners(`pmessage:${pattern}`, { pattern, channel, message });
3154
+ } catch (error) {
3155
+ this.dispatchToListeners("error", new Error(`Failed to parse message: ${error}`));
3156
+ }
3157
+ } else {
3158
+ const channel = messageData.slice(firstCommaIndex + 1, secondCommaIndex);
3159
+ const messageStr = messageData.slice(secondCommaIndex + 1);
3160
+ try {
3161
+ if (type === "subscribe" || type === "psubscribe" || type === "unsubscribe" || type === "punsubscribe") {
3162
+ const count = Number.parseInt(messageStr);
3163
+ this.dispatchToListeners(type, count);
3164
+ } else {
3165
+ const message = JSON.parse(messageStr);
3166
+ this.dispatchToListeners(type, { channel, message });
3167
+ this.dispatchToListeners(`${type}:${channel}`, { channel, message });
3168
+ }
3169
+ } catch (error) {
3170
+ this.dispatchToListeners("error", new Error(`Failed to parse message: ${error}`));
3171
+ }
3172
+ }
3173
+ }
3174
+ }
3175
+ dispatchToListeners(type, data) {
3176
+ const listeners = this.listeners.get(type);
3177
+ if (listeners) {
3178
+ for (const listener of listeners) {
3179
+ listener(data);
3180
+ }
3181
+ }
3182
+ }
3183
+ on(type, listener) {
3184
+ if (!this.listeners.has(type)) {
3185
+ this.listeners.set(type, /* @__PURE__ */ new Set());
3186
+ }
3187
+ this.listeners.get(type)?.add(listener);
3188
+ }
3189
+ removeAllListeners() {
3190
+ this.listeners.clear();
3191
+ }
3192
+ async unsubscribe(channels) {
3193
+ if (channels) {
3194
+ for (const channel of channels) {
3195
+ const subscription = this.subscriptions.get(channel);
3196
+ if (subscription) {
3197
+ try {
3198
+ subscription.controller.abort();
3199
+ } catch {
3200
+ }
3201
+ this.subscriptions.delete(channel);
3202
+ }
3203
+ }
3204
+ } else {
3205
+ for (const subscription of this.subscriptions.values()) {
3206
+ try {
3207
+ subscription.controller.abort();
3208
+ } catch {
3209
+ }
3210
+ }
3211
+ this.subscriptions.clear();
3212
+ this.removeAllListeners();
3213
+ }
3214
+ }
3215
+ getSubscribedChannels() {
3216
+ return [...this.subscriptions.keys()];
3217
+ }
3218
+ };
3219
+ var SubscribeCommand = class extends Command {
3220
+ constructor(cmd, opts) {
3221
+ const sseHeaders = {
3222
+ Accept: "text/event-stream",
3223
+ "Cache-Control": "no-cache",
3224
+ Connection: "keep-alive"
3225
+ };
3226
+ super([], {
3227
+ ...opts,
3228
+ headers: sseHeaders,
3229
+ path: ["subscribe", ...cmd],
3230
+ streamOptions: {
3231
+ isStreaming: true,
3232
+ onMessage: opts?.streamOptions?.onMessage,
3233
+ signal: opts?.streamOptions?.signal
3234
+ }
3235
+ });
3236
+ }
3237
+ };
3238
+
2965
3239
  // pkg/script.ts
2966
3240
  import Hex from "crypto-js/enc-hex.js";
2967
3241
  import sha1 from "crypto-js/sha1.js";
@@ -3248,6 +3522,10 @@ var Redis = class {
3248
3522
  * @see https://redis.io/commands/evalsha
3249
3523
  */
3250
3524
  evalsha = (...args) => new EvalshaCommand(args, this.opts).exec(this.client);
3525
+ /**
3526
+ * Generic method to execute any Redis command.
3527
+ */
3528
+ exec = (args) => new ExecCommand(args, this.opts).exec(this.client);
3251
3529
  /**
3252
3530
  * @see https://redis.io/commands/exists
3253
3531
  */
@@ -3304,6 +3582,10 @@ var Redis = class {
3304
3582
  * @see https://redis.io/commands/getdel
3305
3583
  */
3306
3584
  getdel = (...args) => new GetDelCommand(args, this.opts).exec(this.client);
3585
+ /**
3586
+ * @see https://redis.io/commands/getex
3587
+ */
3588
+ getex = (...args) => new GetExCommand(args, this.opts).exec(this.client);
3307
3589
  /**
3308
3590
  * @see https://redis.io/commands/getrange
3309
3591
  */
@@ -3488,6 +3770,13 @@ var Redis = class {
3488
3770
  * @see https://redis.io/commands/psetex
3489
3771
  */
3490
3772
  psetex = (key, ttl, value) => new PSetEXCommand([key, ttl, value], this.opts).exec(this.client);
3773
+ /**
3774
+ * @see https://redis.io/commands/psubscribe
3775
+ */
3776
+ psubscribe = (patterns) => {
3777
+ const patternArray = Array.isArray(patterns) ? patterns : [patterns];
3778
+ return new Subscriber(this.client, patternArray, true);
3779
+ };
3491
3780
  /**
3492
3781
  * @see https://redis.io/commands/pttl
3493
3782
  */
@@ -3616,6 +3905,13 @@ var Redis = class {
3616
3905
  * @see https://redis.io/commands/strlen
3617
3906
  */
3618
3907
  strlen = (...args) => new StrLenCommand(args, this.opts).exec(this.client);
3908
+ /**
3909
+ * @see https://redis.io/commands/subscribe
3910
+ */
3911
+ subscribe = (channels) => {
3912
+ const channelArray = Array.isArray(channels) ? channels : [channels];
3913
+ return new Subscriber(this.client, channelArray);
3914
+ };
3619
3915
  /**
3620
3916
  * @see https://redis.io/commands/sunion
3621
3917
  */
@@ -3797,7 +4093,7 @@ var Redis = class {
3797
4093
  };
3798
4094
 
3799
4095
  // version.ts
3800
- var VERSION = "v1.34.3";
4096
+ var VERSION = "v1.34.5";
3801
4097
 
3802
4098
  export {
3803
4099
  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-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';
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-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';
3
3
 
4
4
  type Env = {
5
5
  UPSTASH_DISABLE_TELEMETRY?: string;