@upstash/redis 1.34.4 → 1.34.6

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) {
@@ -123,14 +163,46 @@ var HttpClient = class {
123
163
  if (!res) {
124
164
  throw error ?? new Error("Exhausted all retries");
125
165
  }
126
- const body = await res.json();
127
166
  if (!res.ok) {
128
- 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)}`);
129
169
  }
130
170
  if (this.readYourWrites) {
131
171
  const headers = res.headers;
132
172
  this.upstashSyncToken = headers.get("upstash-sync-token") ?? "";
133
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();
134
206
  if (this.readYourWrites) {
135
207
  const headers = res.headers;
136
208
  this.upstashSyncToken = headers.get("upstash-sync-token") ?? "";
@@ -201,31 +273,6 @@ function merge(obj, key, value) {
201
273
  return obj;
202
274
  }
203
275
 
204
- // pkg/util.ts
205
- function parseRecursive(obj) {
206
- const parsed = Array.isArray(obj) ? obj.map((o) => {
207
- try {
208
- return parseRecursive(o);
209
- } catch {
210
- return o;
211
- }
212
- }) : JSON.parse(obj);
213
- if (typeof parsed === "number" && parsed.toString() !== obj) {
214
- return obj;
215
- }
216
- return parsed;
217
- }
218
- function parseResponse(result) {
219
- try {
220
- return parseRecursive(result);
221
- } catch {
222
- return result;
223
- }
224
- }
225
- function deserializeScanResponse(result) {
226
- return [result[0], ...parseResponse(result.slice(1))];
227
- }
228
-
229
276
  // pkg/commands/command.ts
230
277
  var defaultSerializer = (c) => {
231
278
  switch (typeof c) {
@@ -243,6 +290,11 @@ var Command = class {
243
290
  command;
244
291
  serialize;
245
292
  deserialize;
293
+ headers;
294
+ path;
295
+ onMessage;
296
+ isStreaming;
297
+ signal;
246
298
  /**
247
299
  * Create a new command instance.
248
300
  *
@@ -252,6 +304,11 @@ var Command = class {
252
304
  this.serialize = defaultSerializer;
253
305
  this.deserialize = opts?.automaticDeserialization === void 0 || opts.automaticDeserialization ? opts?.deserialize ?? parseResponse : (x) => x;
254
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;
255
312
  if (opts?.latencyLogging) {
256
313
  const originalExec = this.exec.bind(this);
257
314
  this.exec = async (client) => {
@@ -272,7 +329,12 @@ var Command = class {
272
329
  async exec(client) {
273
330
  const { result, error } = await client.request({
274
331
  body: this.command,
275
- 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
276
338
  });
277
339
  if (error) {
278
340
  throw new UpstashError(error);
@@ -290,9 +352,9 @@ function deserialize(result) {
290
352
  return null;
291
353
  }
292
354
  const obj = {};
293
- while (result.length >= 2) {
294
- const key = result.shift();
295
- const value = result.shift();
355
+ for (let i = 0; i < result.length; i += 2) {
356
+ const key = result[i];
357
+ const value = result[i + 1];
296
358
  try {
297
359
  obj[key] = JSON.parse(value);
298
360
  } catch {
@@ -734,9 +796,9 @@ function deserialize2(result) {
734
796
  return null;
735
797
  }
736
798
  const obj = {};
737
- while (result.length >= 2) {
738
- const key = result.shift();
739
- const value = result.shift();
799
+ for (let i = 0; i < result.length; i += 2) {
800
+ const key = result[i];
801
+ const value = result[i + 1];
740
802
  try {
741
803
  const valueIsNumberAndNotSafeInteger = !Number.isNaN(Number(value)) && !Number.isSafeInteger(Number(value));
742
804
  obj[key] = valueIsNumberAndNotSafeInteger ? value : JSON.parse(value);
@@ -1761,15 +1823,15 @@ var XPendingCommand = class extends Command {
1761
1823
  function deserialize4(result) {
1762
1824
  const obj = {};
1763
1825
  for (const e of result) {
1764
- while (e.length >= 2) {
1765
- const streamId = e.shift();
1766
- const entries = e.shift();
1826
+ for (let i = 0; i < e.length; i += 2) {
1827
+ const streamId = e[i];
1828
+ const entries = e[i + 1];
1767
1829
  if (!(streamId in obj)) {
1768
1830
  obj[streamId] = {};
1769
1831
  }
1770
- while (entries.length >= 2) {
1771
- const field = entries.shift();
1772
- const value = entries.shift();
1832
+ for (let j = 0; j < entries.length; j += 2) {
1833
+ const field = entries[j];
1834
+ const value = entries[j + 1];
1773
1835
  try {
1774
1836
  obj[streamId][field] = JSON.parse(value);
1775
1837
  } catch {
@@ -1858,15 +1920,15 @@ var XRevRangeCommand = class extends Command {
1858
1920
  function deserialize5(result) {
1859
1921
  const obj = {};
1860
1922
  for (const e of result) {
1861
- while (e.length >= 2) {
1862
- const streamId = e.shift();
1863
- const entries = e.shift();
1923
+ for (let i = 0; i < e.length; i += 2) {
1924
+ const streamId = e[i];
1925
+ const entries = e[i + 1];
1864
1926
  if (!(streamId in obj)) {
1865
1927
  obj[streamId] = {};
1866
1928
  }
1867
- while (entries.length >= 2) {
1868
- const field = entries.shift();
1869
- const value = entries.shift();
1929
+ for (let j = 0; j < entries.length; j += 2) {
1930
+ const field = entries[j];
1931
+ const value = entries[j + 1];
1870
1932
  try {
1871
1933
  obj[streamId][field] = JSON.parse(value);
1872
1934
  } catch {
@@ -2997,6 +3059,183 @@ var AutoPipelineExecutor = class {
2997
3059
  }
2998
3060
  };
2999
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
+
3000
3239
  // pkg/script.ts
3001
3240
  import Hex from "crypto-js/enc-hex.js";
3002
3241
  import sha1 from "crypto-js/sha1.js";
@@ -3531,6 +3770,13 @@ var Redis = class {
3531
3770
  * @see https://redis.io/commands/psetex
3532
3771
  */
3533
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
+ };
3534
3780
  /**
3535
3781
  * @see https://redis.io/commands/pttl
3536
3782
  */
@@ -3659,6 +3905,13 @@ var Redis = class {
3659
3905
  * @see https://redis.io/commands/strlen
3660
3906
  */
3661
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
+ };
3662
3915
  /**
3663
3916
  * @see https://redis.io/commands/sunion
3664
3917
  */
@@ -3840,7 +4093,7 @@ var Redis = class {
3840
4093
  };
3841
4094
 
3842
4095
  // version.ts
3843
- var VERSION = "v1.34.4";
4096
+ var VERSION = "v1.34.6";
3844
4097
 
3845
4098
  export {
3846
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-C3G81zLz.mjs';
2
- export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetExCommand, I as GetRangeCommand, J as GetSetCommand, K as HDelCommand, L as HExistsCommand, N as HGetAllCommand, M as HGetCommand, O as HIncrByCommand, Q as HIncrByFloatCommand, S as HKeysCommand, T as HLenCommand, V as HMGetCommand, W as HMSetCommand, X as HRandFieldCommand, Y as HScanCommand, Z as HSetCommand, _ as HSetNXCommand, $ as HStrLenCommand, a0 as HValsCommand, a2 as IncrByCommand, a3 as IncrByFloatCommand, a1 as IncrCommand, a4 as JsonArrAppendCommand, a5 as JsonArrIndexCommand, a6 as JsonArrInsertCommand, a7 as JsonArrLenCommand, a8 as JsonArrPopCommand, a9 as JsonArrTrimCommand, aa as JsonClearCommand, ab as JsonDelCommand, ac as JsonForgetCommand, ad as JsonGetCommand, ae as JsonMGetCommand, af as JsonNumIncrByCommand, ag as JsonNumMultByCommand, ah as JsonObjKeysCommand, ai as JsonObjLenCommand, aj as JsonRespCommand, ak as JsonSetCommand, al as JsonStrAppendCommand, am as JsonStrLenCommand, an as JsonToggleCommand, ao as JsonTypeCommand, ap as KeysCommand, aq as LIndexCommand, ar as LInsertCommand, as as LLenCommand, at as LMoveCommand, au as LPopCommand, av as LPushCommand, aw as LPushXCommand, ax as LRangeCommand, ay as LRemCommand, az as LSetCommand, aA as LTrimCommand, aB as MGetCommand, aC as MSetCommand, aD as MSetNXCommand, aG as PExpireAtCommand, aF as PExpireCommand, aI as PSetEXCommand, aJ as PTtlCommand, aE as PersistCommand, aH as PingCommand, P as Pipeline, aK as PublishCommand, aO as RPopCommand, aP as RPushCommand, aQ as RPushXCommand, aL as RandomKeyCommand, aM as RenameCommand, aN as RenameNXCommand, d as Requester, aR as SAddCommand, aU as SCardCommand, aY as SDiffCommand, aZ as SDiffStoreCommand, b4 as SInterCommand, b5 as SInterStoreCommand, b6 as SIsMemberCommand, b8 as SMIsMemberCommand, b7 as SMembersCommand, b9 as SMoveCommand, ba as SPopCommand, bb as SRandMemberCommand, bc as SRemCommand, bd as SScanCommand, bf as SUnionCommand, bg as SUnionStoreCommand, aS as ScanCommand, aT as ScanCommandOptions, bp as ScoreMember, aV as ScriptExistsCommand, aW as ScriptFlushCommand, aX as ScriptLoadCommand, b0 as SetBitCommand, a_ as SetCommand, a$ as SetCommandOptions, b1 as SetExCommand, b2 as SetNxCommand, b3 as SetRangeCommand, be as StrLenCommand, bh as TimeCommand, bi as TouchCommand, bj as TtlCommand, bk as Type, bl as TypeCommand, bm as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bn as XAddCommand, bo as XRangeCommand, br as ZAddCommand, bq as ZAddCommandOptions, bs as ZCardCommand, bt as ZCountCommand, bu as ZDiffStoreCommand, bv as ZIncrByCommand, bw as ZInterStoreCommand, bx as ZInterStoreCommandOptions, by as ZLexCountCommand, bz as ZMScoreCommand, bA as ZPopMaxCommand, bB as ZPopMinCommand, bC as ZRangeCommand, bD as ZRangeCommandOptions, bE as ZRankCommand, bF as ZRemCommand, bG as ZRemRangeByLexCommand, bH as ZRemRangeByRankCommand, bI as ZRemRangeByScoreCommand, bJ as ZRevRankCommand, bK as ZScanCommand, bL as ZScoreCommand, bM as ZUnionCommand, bN as ZUnionCommandOptions, bO as ZUnionStoreCommand, bP as ZUnionStoreCommandOptions, e as errors } from './zmscore-C3G81zLz.mjs';
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-C3G81zLz.js';
2
- export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, k as EvalCommand, l as EvalshaCommand, m as ExistsCommand, o as ExpireAtCommand, n as ExpireCommand, F as FlushAllCommand, p as FlushDBCommand, G as GeoAddCommand, q as GeoAddCommandOptions, s as GeoDistCommand, t as GeoHashCommand, r as GeoMember, u as GeoPosCommand, v as GeoSearchCommand, w as GeoSearchStoreCommand, y as GetBitCommand, x as GetCommand, z as GetDelCommand, H as GetExCommand, I as GetRangeCommand, J as GetSetCommand, K as HDelCommand, L as HExistsCommand, N as HGetAllCommand, M as HGetCommand, O as HIncrByCommand, Q as HIncrByFloatCommand, S as HKeysCommand, T as HLenCommand, V as HMGetCommand, W as HMSetCommand, X as HRandFieldCommand, Y as HScanCommand, Z as HSetCommand, _ as HSetNXCommand, $ as HStrLenCommand, a0 as HValsCommand, a2 as IncrByCommand, a3 as IncrByFloatCommand, a1 as IncrCommand, a4 as JsonArrAppendCommand, a5 as JsonArrIndexCommand, a6 as JsonArrInsertCommand, a7 as JsonArrLenCommand, a8 as JsonArrPopCommand, a9 as JsonArrTrimCommand, aa as JsonClearCommand, ab as JsonDelCommand, ac as JsonForgetCommand, ad as JsonGetCommand, ae as JsonMGetCommand, af as JsonNumIncrByCommand, ag as JsonNumMultByCommand, ah as JsonObjKeysCommand, ai as JsonObjLenCommand, aj as JsonRespCommand, ak as JsonSetCommand, al as JsonStrAppendCommand, am as JsonStrLenCommand, an as JsonToggleCommand, ao as JsonTypeCommand, ap as KeysCommand, aq as LIndexCommand, ar as LInsertCommand, as as LLenCommand, at as LMoveCommand, au as LPopCommand, av as LPushCommand, aw as LPushXCommand, ax as LRangeCommand, ay as LRemCommand, az as LSetCommand, aA as LTrimCommand, aB as MGetCommand, aC as MSetCommand, aD as MSetNXCommand, aG as PExpireAtCommand, aF as PExpireCommand, aI as PSetEXCommand, aJ as PTtlCommand, aE as PersistCommand, aH as PingCommand, P as Pipeline, aK as PublishCommand, aO as RPopCommand, aP as RPushCommand, aQ as RPushXCommand, aL as RandomKeyCommand, aM as RenameCommand, aN as RenameNXCommand, d as Requester, aR as SAddCommand, aU as SCardCommand, aY as SDiffCommand, aZ as SDiffStoreCommand, b4 as SInterCommand, b5 as SInterStoreCommand, b6 as SIsMemberCommand, b8 as SMIsMemberCommand, b7 as SMembersCommand, b9 as SMoveCommand, ba as SPopCommand, bb as SRandMemberCommand, bc as SRemCommand, bd as SScanCommand, bf as SUnionCommand, bg as SUnionStoreCommand, aS as ScanCommand, aT as ScanCommandOptions, bp as ScoreMember, aV as ScriptExistsCommand, aW as ScriptFlushCommand, aX as ScriptLoadCommand, b0 as SetBitCommand, a_ as SetCommand, a$ as SetCommandOptions, b1 as SetExCommand, b2 as SetNxCommand, b3 as SetRangeCommand, be as StrLenCommand, bh as TimeCommand, bi as TouchCommand, bj as TtlCommand, bk as Type, bl as TypeCommand, bm as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bn as XAddCommand, bo as XRangeCommand, br as ZAddCommand, bq as ZAddCommandOptions, bs as ZCardCommand, bt as ZCountCommand, bu as ZDiffStoreCommand, bv as ZIncrByCommand, bw as ZInterStoreCommand, bx as ZInterStoreCommandOptions, by as ZLexCountCommand, bz as ZMScoreCommand, bA as ZPopMaxCommand, bB as ZPopMinCommand, bC as ZRangeCommand, bD as ZRangeCommandOptions, bE as ZRankCommand, bF as ZRemCommand, bG as ZRemRangeByLexCommand, bH as ZRemRangeByRankCommand, bI as ZRemRangeByScoreCommand, bJ as ZRevRankCommand, bK as ZScanCommand, bL as ZScoreCommand, bM as ZUnionCommand, bN as ZUnionCommandOptions, bO as ZUnionStoreCommand, bP as ZUnionStoreCommandOptions, e as errors } from './zmscore-C3G81zLz.js';
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;