@upstash/redis 1.39.0 → 1.40.0
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.
- package/{chunk-4WQYU7T6.mjs → chunk-RLVWMRRX.mjs} +21 -14
- package/cloudflare.d.mts +2 -2
- package/cloudflare.d.ts +2 -2
- package/cloudflare.js +21 -14
- package/cloudflare.mjs +1 -1
- package/{error-DOszGRxg.d.mts → error-BNzLTXJG.d.mts} +5 -18
- package/{error-DOszGRxg.d.ts → error-BNzLTXJG.d.ts} +5 -18
- package/fastly.d.mts +2 -2
- package/fastly.d.ts +2 -2
- package/fastly.js +21 -14
- package/fastly.mjs +1 -1
- package/nodejs.d.mts +2 -2
- package/nodejs.d.ts +2 -2
- package/nodejs.js +21 -14
- package/nodejs.mjs +1 -1
- package/package.json +1 -1
|
@@ -34,6 +34,12 @@ var UpstashJSONParseError = class extends UpstashError {
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
// pkg/util.ts
|
|
37
|
+
function parseJSON(value) {
|
|
38
|
+
return JSON.parse(stripBOM(value));
|
|
39
|
+
}
|
|
40
|
+
function stripBOM(value) {
|
|
41
|
+
return typeof value === "string" && value.startsWith("\uFEFF") ? value.slice(1) : value;
|
|
42
|
+
}
|
|
37
43
|
function parseRecursive(obj) {
|
|
38
44
|
const parsed = Array.isArray(obj) ? obj.map((o) => {
|
|
39
45
|
try {
|
|
@@ -41,8 +47,8 @@ function parseRecursive(obj) {
|
|
|
41
47
|
} catch {
|
|
42
48
|
return o;
|
|
43
49
|
}
|
|
44
|
-
}) :
|
|
45
|
-
if (typeof parsed === "number" && parsed.toString() !== obj) {
|
|
50
|
+
}) : parseJSON(obj);
|
|
51
|
+
if (typeof parsed === "number" && parsed.toString() !== stripBOM(obj)) {
|
|
46
52
|
return obj;
|
|
47
53
|
}
|
|
48
54
|
return parsed;
|
|
@@ -101,8 +107,7 @@ var HttpClient = class {
|
|
|
101
107
|
this.options = {
|
|
102
108
|
backend: config.options?.backend,
|
|
103
109
|
agent: config.agent,
|
|
104
|
-
responseEncoding: config.responseEncoding ??
|
|
105
|
-
// default to base64
|
|
110
|
+
responseEncoding: config.responseEncoding ?? false,
|
|
106
111
|
cache: config.cache,
|
|
107
112
|
signal: config.signal,
|
|
108
113
|
keepAlive: config.keepAlive ?? true
|
|
@@ -175,12 +180,14 @@ var HttpClient = class {
|
|
|
175
180
|
if (requestOptions.signal?.aborted && isSignalFunction) {
|
|
176
181
|
throw error_;
|
|
177
182
|
} else if (requestOptions.signal?.aborted) {
|
|
183
|
+
const reason = requestOptions.signal.reason;
|
|
178
184
|
const myBlob = new Blob([
|
|
179
|
-
|
|
185
|
+
// Error reasons (e.g. the default DOMException) would serialize to an empty object
|
|
186
|
+
JSON.stringify({ result: reason instanceof Error ? null : reason ?? null })
|
|
180
187
|
]);
|
|
181
188
|
const myOptions = {
|
|
182
189
|
status: 200,
|
|
183
|
-
statusText:
|
|
190
|
+
statusText: "Aborted"
|
|
184
191
|
};
|
|
185
192
|
res = new Response(myBlob, myOptions);
|
|
186
193
|
break;
|
|
@@ -1051,7 +1058,7 @@ function deserialize(result) {
|
|
|
1051
1058
|
const key = result[i];
|
|
1052
1059
|
const value = result[i + 1];
|
|
1053
1060
|
try {
|
|
1054
|
-
obj[key] =
|
|
1061
|
+
obj[key] = parseJSON(value);
|
|
1055
1062
|
} catch {
|
|
1056
1063
|
obj[key] = value;
|
|
1057
1064
|
}
|
|
@@ -1668,7 +1675,7 @@ var GeoSearchCommand = class extends Command {
|
|
|
1668
1675
|
if (!opts?.withCoord && !opts?.withDist && !opts?.withHash) {
|
|
1669
1676
|
return result.map((member) => {
|
|
1670
1677
|
try {
|
|
1671
|
-
return { member:
|
|
1678
|
+
return { member: parseJSON(member) };
|
|
1672
1679
|
} catch {
|
|
1673
1680
|
return { member };
|
|
1674
1681
|
}
|
|
@@ -1678,7 +1685,7 @@ var GeoSearchCommand = class extends Command {
|
|
|
1678
1685
|
let counter = 1;
|
|
1679
1686
|
const obj = {};
|
|
1680
1687
|
try {
|
|
1681
|
-
obj.member =
|
|
1688
|
+
obj.member = parseJSON(members[0]);
|
|
1682
1689
|
} catch {
|
|
1683
1690
|
obj.member = members[0];
|
|
1684
1691
|
}
|
|
@@ -1940,7 +1947,7 @@ function deserialize4(result) {
|
|
|
1940
1947
|
const value = result[i + 1];
|
|
1941
1948
|
try {
|
|
1942
1949
|
const valueIsNumberAndNotSafeInteger = !Number.isNaN(Number(value)) && !Number.isSafeInteger(Number(value));
|
|
1943
|
-
obj[key] = valueIsNumberAndNotSafeInteger ? value :
|
|
1950
|
+
obj[key] = valueIsNumberAndNotSafeInteger ? value : parseJSON(value);
|
|
1944
1951
|
} catch {
|
|
1945
1952
|
obj[key] = value;
|
|
1946
1953
|
}
|
|
@@ -1964,7 +1971,7 @@ function deserialize5(fields, result) {
|
|
|
1964
1971
|
const obj = {};
|
|
1965
1972
|
for (const [i, field] of fields.entries()) {
|
|
1966
1973
|
try {
|
|
1967
|
-
obj[field] =
|
|
1974
|
+
obj[field] = parseJSON(result[i]);
|
|
1968
1975
|
} catch {
|
|
1969
1976
|
obj[field] = result[i];
|
|
1970
1977
|
}
|
|
@@ -3087,7 +3094,7 @@ function deserialize6(result) {
|
|
|
3087
3094
|
const field = entries[j];
|
|
3088
3095
|
const value = entries[j + 1];
|
|
3089
3096
|
try {
|
|
3090
|
-
obj[streamId][field] =
|
|
3097
|
+
obj[streamId][field] = parseJSON(value);
|
|
3091
3098
|
} catch {
|
|
3092
3099
|
obj[streamId][field] = value;
|
|
3093
3100
|
}
|
|
@@ -3184,7 +3191,7 @@ function deserialize7(result) {
|
|
|
3184
3191
|
const field = entries[j];
|
|
3185
3192
|
const value = entries[j + 1];
|
|
3186
3193
|
try {
|
|
3187
|
-
obj[streamId][field] =
|
|
3194
|
+
obj[streamId][field] = parseJSON(value);
|
|
3188
3195
|
} catch {
|
|
3189
3196
|
obj[streamId][field] = value;
|
|
3190
3197
|
}
|
|
@@ -6035,7 +6042,7 @@ var Redis = class {
|
|
|
6035
6042
|
};
|
|
6036
6043
|
|
|
6037
6044
|
// version.ts
|
|
6038
|
-
var VERSION = "v1.
|
|
6045
|
+
var VERSION = "v1.40.0";
|
|
6039
6046
|
|
|
6040
6047
|
export {
|
|
6041
6048
|
error_exports,
|
package/cloudflare.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as Redis$1, H as HttpClientConfig, a as RedisOptions, b as RequesterConfig } from './error-
|
|
2
|
-
export { A as AppendCommand, c as ArCountCommand, d as ArDelCommand, e as ArDelRangeCommand, f as ArGetCommand, g as ArGetRangeCommand, h as ArGrepCommand, i as ArGrepOptions, j as ArGrepPredicate, k as ArGrepResult, l as ArInfoCommand, m as ArInfoOptions, n as ArInfoResult, o as ArInsertCommand, p as ArLastItemsCommand, q as ArLastItemsOptions, r as ArLenCommand, s as ArMGetCommand, t as ArMSetCommand, u as ArMSetValues, v as ArNextCommand, w as ArOpCommand, x as ArOpOperation, y as ArRingCommand, z as ArScanCommand, B as ArScanOptions, C as ArSeekCommand, D as ArSetCommand, E as BitCountCommand, F as BitOpCommand, G as BitPosCommand, I as ClientSetInfoAttribute, J as ClientSetInfoCommand, K as CopyCommand, L as DBSizeCommand, M as DecrByCommand, N as DecrCommand, O as DelCommand, P as EchoCommand, Q as EvalCommand, S as EvalROCommand, T as EvalshaCommand, U as EvalshaROCommand, V as ExistsCommand, W as ExpireAtCommand, X as ExpireCommand, Y as ExpireOption, Z as FlushAllCommand, _ as FlushDBCommand, $ as GeoAddCommand, a0 as GeoAddCommandOptions, a1 as GeoDistCommand, a2 as GeoHashCommand, a3 as GeoMember, a4 as GeoPosCommand, a5 as GeoSearchCommand, a6 as GeoSearchStoreCommand, a7 as GetBitCommand, a8 as GetCommand, a9 as GetDelCommand, aa as GetExCommand, ab as GetRangeCommand, ac as GetSetCommand, ad as HDelCommand, ae as HExistsCommand, af as HExpireAtCommand, ag as HExpireCommand, ah as HExpireTimeCommand, ai as HGetAllCommand, aj as HGetCommand, ak as HGetDelCommand, al as HGetExCommand, am as HIncrByCommand, an as HIncrByFloatCommand, ao as HKeysCommand, ap as HLenCommand, aq as HMGetCommand, ar as HMSetCommand, as as HPExpireAtCommand, at as HPExpireCommand, au as HPExpireTimeCommand, av as HPTtlCommand, aw as HPersistCommand, ax as HRandFieldCommand, ay as HScanCommand, az as HSetCommand, aA as HSetExCommand, aB as HSetNXCommand, aC as HStrLenCommand, aD as HTtlCommand, aE as HValsCommand, aF as IncrByCommand, aG as IncrByFloatCommand, aH as IncrCommand, aI as JsonArrAppendCommand, aJ as JsonArrIndexCommand, aK as JsonArrInsertCommand, aL as JsonArrLenCommand, aM as JsonArrPopCommand, aN as JsonArrTrimCommand, aO as JsonClearCommand, aP as JsonDelCommand, aQ as JsonForgetCommand, aR as JsonGetCommand, aS as JsonMGetCommand, aT as JsonMergeCommand, aU as JsonNumIncrByCommand, aV as JsonNumMultByCommand, aW as JsonObjKeysCommand, aX as JsonObjLenCommand, aY as JsonRespCommand, aZ as JsonSetCommand, a_ as JsonStrAppendCommand, a$ as JsonStrLenCommand, b0 as JsonToggleCommand, b1 as JsonTypeCommand, b2 as KeysCommand, b3 as LIndexCommand, b4 as LInsertCommand, b5 as LLenCommand, b6 as LMoveCommand, b7 as LPopCommand, b8 as LPushCommand, b9 as LPushXCommand, ba as LRangeCommand, bb as LRemCommand, bc as LSetCommand, bd as LTrimCommand, be as MGetCommand, bf as MSetCommand, bg as MSetNXCommand, bh as PExpireAtCommand, bi as PExpireCommand, bj as PSetEXCommand, bk as PTtlCommand, bl as PersistCommand, bm as PingCommand, bn as Pipeline, bo as PublishCommand, bp as RPopCommand, bq as RPushCommand, br as RPushXCommand, bs as RandomKeyCommand, bt as RenameCommand, bu as RenameNXCommand, bv as Requester, bw as SAddCommand, bx as SCardCommand, by as SDiffCommand, bz as SDiffStoreCommand, bA as SInterCardCommand, bB as SInterCommand, bC as SInterStoreCommand, bD as SIsMemberCommand, bE as SMIsMemberCommand, bF as SMembersCommand, bG as SMoveCommand, bH as SPopCommand, bI as SRandMemberCommand, bJ as SRemCommand, bK as SScanCommand, bL as SUnionCommand, bM as SUnionStoreCommand, bN as ScanCommand, bO as ScanCommandOptions, bP as ScoreMember, bQ as ScriptExistsCommand, bR as ScriptFlushCommand, bS as ScriptLoadCommand, bT as SetBitCommand, bU as SetCommand, bV as SetCommandOptions, bW as SetExCommand, bX as SetNxCommand, bY as SetRangeCommand, bZ as StrLenCommand, b_ as TimeCommand, b$ as TouchCommand, c0 as TtlCommand, c1 as Type, c2 as TypeCommand, c3 as UnlinkCommand, c4 as UpstashRequest, c5 as UpstashResponse, c6 as VectorAddCommand, c7 as VectorCountCommand, c8 as VectorCreateCommand, c9 as VectorDelCommand, ca as VectorDropCommand, cb as VectorGetCommand, cc as VectorInfoCommand, cd as VectorQueryCommand, ce as XAckDelCommand, cf as XAddCommand, cg as XDelExCommand, ch as XRangeCommand, ci as ZAddCommand, cj as ZAddCommandOptions, ck as ZCardCommand, cl as ZCountCommand, cm as ZDiffStoreCommand, cn as ZIncrByCommand, co as ZInterStoreCommand, cp as ZInterStoreCommandOptions, cq as ZLexCountCommand, cr as ZMScoreCommand, cs as ZPopMaxCommand, ct as ZPopMinCommand, cu as ZRangeCommand, cv as ZRangeCommandOptions, cw as ZRankCommand, cx as ZRemCommand, cy as ZRemRangeByLexCommand, cz as ZRemRangeByRankCommand, cA as ZRemRangeByScoreCommand, cB as ZRevRankCommand, cC as ZScanCommand, cD as ZScoreCommand, cE as ZUnionCommand, cF as ZUnionCommandOptions, cG as ZUnionStoreCommand, cH as ZUnionStoreCommandOptions, cI as errors } from './error-
|
|
1
|
+
import { R as Redis$1, H as HttpClientConfig, a as RedisOptions, b as RequesterConfig } from './error-BNzLTXJG.mjs';
|
|
2
|
+
export { A as AppendCommand, c as ArCountCommand, d as ArDelCommand, e as ArDelRangeCommand, f as ArGetCommand, g as ArGetRangeCommand, h as ArGrepCommand, i as ArGrepOptions, j as ArGrepPredicate, k as ArGrepResult, l as ArInfoCommand, m as ArInfoOptions, n as ArInfoResult, o as ArInsertCommand, p as ArLastItemsCommand, q as ArLastItemsOptions, r as ArLenCommand, s as ArMGetCommand, t as ArMSetCommand, u as ArMSetValues, v as ArNextCommand, w as ArOpCommand, x as ArOpOperation, y as ArRingCommand, z as ArScanCommand, B as ArScanOptions, C as ArSeekCommand, D as ArSetCommand, E as BitCountCommand, F as BitOpCommand, G as BitPosCommand, I as ClientSetInfoAttribute, J as ClientSetInfoCommand, K as CopyCommand, L as DBSizeCommand, M as DecrByCommand, N as DecrCommand, O as DelCommand, P as EchoCommand, Q as EvalCommand, S as EvalROCommand, T as EvalshaCommand, U as EvalshaROCommand, V as ExistsCommand, W as ExpireAtCommand, X as ExpireCommand, Y as ExpireOption, Z as FlushAllCommand, _ as FlushDBCommand, $ as GeoAddCommand, a0 as GeoAddCommandOptions, a1 as GeoDistCommand, a2 as GeoHashCommand, a3 as GeoMember, a4 as GeoPosCommand, a5 as GeoSearchCommand, a6 as GeoSearchStoreCommand, a7 as GetBitCommand, a8 as GetCommand, a9 as GetDelCommand, aa as GetExCommand, ab as GetRangeCommand, ac as GetSetCommand, ad as HDelCommand, ae as HExistsCommand, af as HExpireAtCommand, ag as HExpireCommand, ah as HExpireTimeCommand, ai as HGetAllCommand, aj as HGetCommand, ak as HGetDelCommand, al as HGetExCommand, am as HIncrByCommand, an as HIncrByFloatCommand, ao as HKeysCommand, ap as HLenCommand, aq as HMGetCommand, ar as HMSetCommand, as as HPExpireAtCommand, at as HPExpireCommand, au as HPExpireTimeCommand, av as HPTtlCommand, aw as HPersistCommand, ax as HRandFieldCommand, ay as HScanCommand, az as HSetCommand, aA as HSetExCommand, aB as HSetNXCommand, aC as HStrLenCommand, aD as HTtlCommand, aE as HValsCommand, aF as IncrByCommand, aG as IncrByFloatCommand, aH as IncrCommand, aI as JsonArrAppendCommand, aJ as JsonArrIndexCommand, aK as JsonArrInsertCommand, aL as JsonArrLenCommand, aM as JsonArrPopCommand, aN as JsonArrTrimCommand, aO as JsonClearCommand, aP as JsonDelCommand, aQ as JsonForgetCommand, aR as JsonGetCommand, aS as JsonMGetCommand, aT as JsonMergeCommand, aU as JsonNumIncrByCommand, aV as JsonNumMultByCommand, aW as JsonObjKeysCommand, aX as JsonObjLenCommand, aY as JsonRespCommand, aZ as JsonSetCommand, a_ as JsonStrAppendCommand, a$ as JsonStrLenCommand, b0 as JsonToggleCommand, b1 as JsonTypeCommand, b2 as KeysCommand, b3 as LIndexCommand, b4 as LInsertCommand, b5 as LLenCommand, b6 as LMoveCommand, b7 as LPopCommand, b8 as LPushCommand, b9 as LPushXCommand, ba as LRangeCommand, bb as LRemCommand, bc as LSetCommand, bd as LTrimCommand, be as MGetCommand, bf as MSetCommand, bg as MSetNXCommand, bh as PExpireAtCommand, bi as PExpireCommand, bj as PSetEXCommand, bk as PTtlCommand, bl as PersistCommand, bm as PingCommand, bn as Pipeline, bo as PublishCommand, bp as RPopCommand, bq as RPushCommand, br as RPushXCommand, bs as RandomKeyCommand, bt as RenameCommand, bu as RenameNXCommand, bv as Requester, bw as SAddCommand, bx as SCardCommand, by as SDiffCommand, bz as SDiffStoreCommand, bA as SInterCardCommand, bB as SInterCommand, bC as SInterStoreCommand, bD as SIsMemberCommand, bE as SMIsMemberCommand, bF as SMembersCommand, bG as SMoveCommand, bH as SPopCommand, bI as SRandMemberCommand, bJ as SRemCommand, bK as SScanCommand, bL as SUnionCommand, bM as SUnionStoreCommand, bN as ScanCommand, bO as ScanCommandOptions, bP as ScoreMember, bQ as ScriptExistsCommand, bR as ScriptFlushCommand, bS as ScriptLoadCommand, bT as SetBitCommand, bU as SetCommand, bV as SetCommandOptions, bW as SetExCommand, bX as SetNxCommand, bY as SetRangeCommand, bZ as StrLenCommand, b_ as TimeCommand, b$ as TouchCommand, c0 as TtlCommand, c1 as Type, c2 as TypeCommand, c3 as UnlinkCommand, c4 as UpstashRequest, c5 as UpstashResponse, c6 as VectorAddCommand, c7 as VectorCountCommand, c8 as VectorCreateCommand, c9 as VectorDelCommand, ca as VectorDropCommand, cb as VectorGetCommand, cc as VectorInfoCommand, cd as VectorQueryCommand, ce as XAckDelCommand, cf as XAddCommand, cg as XDelExCommand, ch as XRangeCommand, ci as ZAddCommand, cj as ZAddCommandOptions, ck as ZCardCommand, cl as ZCountCommand, cm as ZDiffStoreCommand, cn as ZIncrByCommand, co as ZInterStoreCommand, cp as ZInterStoreCommandOptions, cq as ZLexCountCommand, cr as ZMScoreCommand, cs as ZPopMaxCommand, ct as ZPopMinCommand, cu as ZRangeCommand, cv as ZRangeCommandOptions, cw as ZRankCommand, cx as ZRemCommand, cy as ZRemRangeByLexCommand, cz as ZRemRangeByRankCommand, cA as ZRemRangeByScoreCommand, cB as ZRevRankCommand, cC as ZScanCommand, cD as ZScoreCommand, cE as ZUnionCommand, cF as ZUnionCommandOptions, cG as ZUnionStoreCommand, cH as ZUnionStoreCommandOptions, cI as errors } from './error-BNzLTXJG.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 Redis$1, H as HttpClientConfig, a as RedisOptions, b as RequesterConfig } from './error-
|
|
2
|
-
export { A as AppendCommand, c as ArCountCommand, d as ArDelCommand, e as ArDelRangeCommand, f as ArGetCommand, g as ArGetRangeCommand, h as ArGrepCommand, i as ArGrepOptions, j as ArGrepPredicate, k as ArGrepResult, l as ArInfoCommand, m as ArInfoOptions, n as ArInfoResult, o as ArInsertCommand, p as ArLastItemsCommand, q as ArLastItemsOptions, r as ArLenCommand, s as ArMGetCommand, t as ArMSetCommand, u as ArMSetValues, v as ArNextCommand, w as ArOpCommand, x as ArOpOperation, y as ArRingCommand, z as ArScanCommand, B as ArScanOptions, C as ArSeekCommand, D as ArSetCommand, E as BitCountCommand, F as BitOpCommand, G as BitPosCommand, I as ClientSetInfoAttribute, J as ClientSetInfoCommand, K as CopyCommand, L as DBSizeCommand, M as DecrByCommand, N as DecrCommand, O as DelCommand, P as EchoCommand, Q as EvalCommand, S as EvalROCommand, T as EvalshaCommand, U as EvalshaROCommand, V as ExistsCommand, W as ExpireAtCommand, X as ExpireCommand, Y as ExpireOption, Z as FlushAllCommand, _ as FlushDBCommand, $ as GeoAddCommand, a0 as GeoAddCommandOptions, a1 as GeoDistCommand, a2 as GeoHashCommand, a3 as GeoMember, a4 as GeoPosCommand, a5 as GeoSearchCommand, a6 as GeoSearchStoreCommand, a7 as GetBitCommand, a8 as GetCommand, a9 as GetDelCommand, aa as GetExCommand, ab as GetRangeCommand, ac as GetSetCommand, ad as HDelCommand, ae as HExistsCommand, af as HExpireAtCommand, ag as HExpireCommand, ah as HExpireTimeCommand, ai as HGetAllCommand, aj as HGetCommand, ak as HGetDelCommand, al as HGetExCommand, am as HIncrByCommand, an as HIncrByFloatCommand, ao as HKeysCommand, ap as HLenCommand, aq as HMGetCommand, ar as HMSetCommand, as as HPExpireAtCommand, at as HPExpireCommand, au as HPExpireTimeCommand, av as HPTtlCommand, aw as HPersistCommand, ax as HRandFieldCommand, ay as HScanCommand, az as HSetCommand, aA as HSetExCommand, aB as HSetNXCommand, aC as HStrLenCommand, aD as HTtlCommand, aE as HValsCommand, aF as IncrByCommand, aG as IncrByFloatCommand, aH as IncrCommand, aI as JsonArrAppendCommand, aJ as JsonArrIndexCommand, aK as JsonArrInsertCommand, aL as JsonArrLenCommand, aM as JsonArrPopCommand, aN as JsonArrTrimCommand, aO as JsonClearCommand, aP as JsonDelCommand, aQ as JsonForgetCommand, aR as JsonGetCommand, aS as JsonMGetCommand, aT as JsonMergeCommand, aU as JsonNumIncrByCommand, aV as JsonNumMultByCommand, aW as JsonObjKeysCommand, aX as JsonObjLenCommand, aY as JsonRespCommand, aZ as JsonSetCommand, a_ as JsonStrAppendCommand, a$ as JsonStrLenCommand, b0 as JsonToggleCommand, b1 as JsonTypeCommand, b2 as KeysCommand, b3 as LIndexCommand, b4 as LInsertCommand, b5 as LLenCommand, b6 as LMoveCommand, b7 as LPopCommand, b8 as LPushCommand, b9 as LPushXCommand, ba as LRangeCommand, bb as LRemCommand, bc as LSetCommand, bd as LTrimCommand, be as MGetCommand, bf as MSetCommand, bg as MSetNXCommand, bh as PExpireAtCommand, bi as PExpireCommand, bj as PSetEXCommand, bk as PTtlCommand, bl as PersistCommand, bm as PingCommand, bn as Pipeline, bo as PublishCommand, bp as RPopCommand, bq as RPushCommand, br as RPushXCommand, bs as RandomKeyCommand, bt as RenameCommand, bu as RenameNXCommand, bv as Requester, bw as SAddCommand, bx as SCardCommand, by as SDiffCommand, bz as SDiffStoreCommand, bA as SInterCardCommand, bB as SInterCommand, bC as SInterStoreCommand, bD as SIsMemberCommand, bE as SMIsMemberCommand, bF as SMembersCommand, bG as SMoveCommand, bH as SPopCommand, bI as SRandMemberCommand, bJ as SRemCommand, bK as SScanCommand, bL as SUnionCommand, bM as SUnionStoreCommand, bN as ScanCommand, bO as ScanCommandOptions, bP as ScoreMember, bQ as ScriptExistsCommand, bR as ScriptFlushCommand, bS as ScriptLoadCommand, bT as SetBitCommand, bU as SetCommand, bV as SetCommandOptions, bW as SetExCommand, bX as SetNxCommand, bY as SetRangeCommand, bZ as StrLenCommand, b_ as TimeCommand, b$ as TouchCommand, c0 as TtlCommand, c1 as Type, c2 as TypeCommand, c3 as UnlinkCommand, c4 as UpstashRequest, c5 as UpstashResponse, c6 as VectorAddCommand, c7 as VectorCountCommand, c8 as VectorCreateCommand, c9 as VectorDelCommand, ca as VectorDropCommand, cb as VectorGetCommand, cc as VectorInfoCommand, cd as VectorQueryCommand, ce as XAckDelCommand, cf as XAddCommand, cg as XDelExCommand, ch as XRangeCommand, ci as ZAddCommand, cj as ZAddCommandOptions, ck as ZCardCommand, cl as ZCountCommand, cm as ZDiffStoreCommand, cn as ZIncrByCommand, co as ZInterStoreCommand, cp as ZInterStoreCommandOptions, cq as ZLexCountCommand, cr as ZMScoreCommand, cs as ZPopMaxCommand, ct as ZPopMinCommand, cu as ZRangeCommand, cv as ZRangeCommandOptions, cw as ZRankCommand, cx as ZRemCommand, cy as ZRemRangeByLexCommand, cz as ZRemRangeByRankCommand, cA as ZRemRangeByScoreCommand, cB as ZRevRankCommand, cC as ZScanCommand, cD as ZScoreCommand, cE as ZUnionCommand, cF as ZUnionCommandOptions, cG as ZUnionStoreCommand, cH as ZUnionStoreCommandOptions, cI as errors } from './error-
|
|
1
|
+
import { R as Redis$1, H as HttpClientConfig, a as RedisOptions, b as RequesterConfig } from './error-BNzLTXJG.js';
|
|
2
|
+
export { A as AppendCommand, c as ArCountCommand, d as ArDelCommand, e as ArDelRangeCommand, f as ArGetCommand, g as ArGetRangeCommand, h as ArGrepCommand, i as ArGrepOptions, j as ArGrepPredicate, k as ArGrepResult, l as ArInfoCommand, m as ArInfoOptions, n as ArInfoResult, o as ArInsertCommand, p as ArLastItemsCommand, q as ArLastItemsOptions, r as ArLenCommand, s as ArMGetCommand, t as ArMSetCommand, u as ArMSetValues, v as ArNextCommand, w as ArOpCommand, x as ArOpOperation, y as ArRingCommand, z as ArScanCommand, B as ArScanOptions, C as ArSeekCommand, D as ArSetCommand, E as BitCountCommand, F as BitOpCommand, G as BitPosCommand, I as ClientSetInfoAttribute, J as ClientSetInfoCommand, K as CopyCommand, L as DBSizeCommand, M as DecrByCommand, N as DecrCommand, O as DelCommand, P as EchoCommand, Q as EvalCommand, S as EvalROCommand, T as EvalshaCommand, U as EvalshaROCommand, V as ExistsCommand, W as ExpireAtCommand, X as ExpireCommand, Y as ExpireOption, Z as FlushAllCommand, _ as FlushDBCommand, $ as GeoAddCommand, a0 as GeoAddCommandOptions, a1 as GeoDistCommand, a2 as GeoHashCommand, a3 as GeoMember, a4 as GeoPosCommand, a5 as GeoSearchCommand, a6 as GeoSearchStoreCommand, a7 as GetBitCommand, a8 as GetCommand, a9 as GetDelCommand, aa as GetExCommand, ab as GetRangeCommand, ac as GetSetCommand, ad as HDelCommand, ae as HExistsCommand, af as HExpireAtCommand, ag as HExpireCommand, ah as HExpireTimeCommand, ai as HGetAllCommand, aj as HGetCommand, ak as HGetDelCommand, al as HGetExCommand, am as HIncrByCommand, an as HIncrByFloatCommand, ao as HKeysCommand, ap as HLenCommand, aq as HMGetCommand, ar as HMSetCommand, as as HPExpireAtCommand, at as HPExpireCommand, au as HPExpireTimeCommand, av as HPTtlCommand, aw as HPersistCommand, ax as HRandFieldCommand, ay as HScanCommand, az as HSetCommand, aA as HSetExCommand, aB as HSetNXCommand, aC as HStrLenCommand, aD as HTtlCommand, aE as HValsCommand, aF as IncrByCommand, aG as IncrByFloatCommand, aH as IncrCommand, aI as JsonArrAppendCommand, aJ as JsonArrIndexCommand, aK as JsonArrInsertCommand, aL as JsonArrLenCommand, aM as JsonArrPopCommand, aN as JsonArrTrimCommand, aO as JsonClearCommand, aP as JsonDelCommand, aQ as JsonForgetCommand, aR as JsonGetCommand, aS as JsonMGetCommand, aT as JsonMergeCommand, aU as JsonNumIncrByCommand, aV as JsonNumMultByCommand, aW as JsonObjKeysCommand, aX as JsonObjLenCommand, aY as JsonRespCommand, aZ as JsonSetCommand, a_ as JsonStrAppendCommand, a$ as JsonStrLenCommand, b0 as JsonToggleCommand, b1 as JsonTypeCommand, b2 as KeysCommand, b3 as LIndexCommand, b4 as LInsertCommand, b5 as LLenCommand, b6 as LMoveCommand, b7 as LPopCommand, b8 as LPushCommand, b9 as LPushXCommand, ba as LRangeCommand, bb as LRemCommand, bc as LSetCommand, bd as LTrimCommand, be as MGetCommand, bf as MSetCommand, bg as MSetNXCommand, bh as PExpireAtCommand, bi as PExpireCommand, bj as PSetEXCommand, bk as PTtlCommand, bl as PersistCommand, bm as PingCommand, bn as Pipeline, bo as PublishCommand, bp as RPopCommand, bq as RPushCommand, br as RPushXCommand, bs as RandomKeyCommand, bt as RenameCommand, bu as RenameNXCommand, bv as Requester, bw as SAddCommand, bx as SCardCommand, by as SDiffCommand, bz as SDiffStoreCommand, bA as SInterCardCommand, bB as SInterCommand, bC as SInterStoreCommand, bD as SIsMemberCommand, bE as SMIsMemberCommand, bF as SMembersCommand, bG as SMoveCommand, bH as SPopCommand, bI as SRandMemberCommand, bJ as SRemCommand, bK as SScanCommand, bL as SUnionCommand, bM as SUnionStoreCommand, bN as ScanCommand, bO as ScanCommandOptions, bP as ScoreMember, bQ as ScriptExistsCommand, bR as ScriptFlushCommand, bS as ScriptLoadCommand, bT as SetBitCommand, bU as SetCommand, bV as SetCommandOptions, bW as SetExCommand, bX as SetNxCommand, bY as SetRangeCommand, bZ as StrLenCommand, b_ as TimeCommand, b$ as TouchCommand, c0 as TtlCommand, c1 as Type, c2 as TypeCommand, c3 as UnlinkCommand, c4 as UpstashRequest, c5 as UpstashResponse, c6 as VectorAddCommand, c7 as VectorCountCommand, c8 as VectorCreateCommand, c9 as VectorDelCommand, ca as VectorDropCommand, cb as VectorGetCommand, cc as VectorInfoCommand, cd as VectorQueryCommand, ce as XAckDelCommand, cf as XAddCommand, cg as XDelExCommand, ch as XRangeCommand, ci as ZAddCommand, cj as ZAddCommandOptions, ck as ZCardCommand, cl as ZCountCommand, cm as ZDiffStoreCommand, cn as ZIncrByCommand, co as ZInterStoreCommand, cp as ZInterStoreCommandOptions, cq as ZLexCountCommand, cr as ZMScoreCommand, cs as ZPopMaxCommand, ct as ZPopMinCommand, cu as ZRangeCommand, cv as ZRangeCommandOptions, cw as ZRankCommand, cx as ZRemCommand, cy as ZRemRangeByLexCommand, cz as ZRemRangeByRankCommand, cA as ZRemRangeByScoreCommand, cB as ZRevRankCommand, cC as ZScanCommand, cD as ZScoreCommand, cE as ZUnionCommand, cF as ZUnionCommandOptions, cG as ZUnionStoreCommand, cH as ZUnionStoreCommandOptions, cI as errors } from './error-BNzLTXJG.js';
|
|
3
3
|
|
|
4
4
|
type Env = {
|
|
5
5
|
UPSTASH_DISABLE_TELEMETRY?: string;
|
package/cloudflare.js
CHANGED
|
@@ -55,6 +55,12 @@ var UpstashJSONParseError = class extends UpstashError {
|
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
// pkg/util.ts
|
|
58
|
+
function parseJSON(value) {
|
|
59
|
+
return JSON.parse(stripBOM(value));
|
|
60
|
+
}
|
|
61
|
+
function stripBOM(value) {
|
|
62
|
+
return typeof value === "string" && value.startsWith("\uFEFF") ? value.slice(1) : value;
|
|
63
|
+
}
|
|
58
64
|
function parseRecursive(obj) {
|
|
59
65
|
const parsed = Array.isArray(obj) ? obj.map((o) => {
|
|
60
66
|
try {
|
|
@@ -62,8 +68,8 @@ function parseRecursive(obj) {
|
|
|
62
68
|
} catch {
|
|
63
69
|
return o;
|
|
64
70
|
}
|
|
65
|
-
}) :
|
|
66
|
-
if (typeof parsed === "number" && parsed.toString() !== obj) {
|
|
71
|
+
}) : parseJSON(obj);
|
|
72
|
+
if (typeof parsed === "number" && parsed.toString() !== stripBOM(obj)) {
|
|
67
73
|
return obj;
|
|
68
74
|
}
|
|
69
75
|
return parsed;
|
|
@@ -122,8 +128,7 @@ var HttpClient = class {
|
|
|
122
128
|
this.options = {
|
|
123
129
|
backend: config.options?.backend,
|
|
124
130
|
agent: config.agent,
|
|
125
|
-
responseEncoding: config.responseEncoding ??
|
|
126
|
-
// default to base64
|
|
131
|
+
responseEncoding: config.responseEncoding ?? false,
|
|
127
132
|
cache: config.cache,
|
|
128
133
|
signal: config.signal,
|
|
129
134
|
keepAlive: config.keepAlive ?? true
|
|
@@ -196,12 +201,14 @@ var HttpClient = class {
|
|
|
196
201
|
if (requestOptions.signal?.aborted && isSignalFunction) {
|
|
197
202
|
throw error_;
|
|
198
203
|
} else if (requestOptions.signal?.aborted) {
|
|
204
|
+
const reason = requestOptions.signal.reason;
|
|
199
205
|
const myBlob = new Blob([
|
|
200
|
-
|
|
206
|
+
// Error reasons (e.g. the default DOMException) would serialize to an empty object
|
|
207
|
+
JSON.stringify({ result: reason instanceof Error ? null : reason ?? null })
|
|
201
208
|
]);
|
|
202
209
|
const myOptions = {
|
|
203
210
|
status: 200,
|
|
204
|
-
statusText:
|
|
211
|
+
statusText: "Aborted"
|
|
205
212
|
};
|
|
206
213
|
res = new Response(myBlob, myOptions);
|
|
207
214
|
break;
|
|
@@ -1251,7 +1258,7 @@ var GeoSearchCommand = class extends Command {
|
|
|
1251
1258
|
if (!opts?.withCoord && !opts?.withDist && !opts?.withHash) {
|
|
1252
1259
|
return result.map((member) => {
|
|
1253
1260
|
try {
|
|
1254
|
-
return { member:
|
|
1261
|
+
return { member: parseJSON(member) };
|
|
1255
1262
|
} catch {
|
|
1256
1263
|
return { member };
|
|
1257
1264
|
}
|
|
@@ -1261,7 +1268,7 @@ var GeoSearchCommand = class extends Command {
|
|
|
1261
1268
|
let counter = 1;
|
|
1262
1269
|
const obj = {};
|
|
1263
1270
|
try {
|
|
1264
|
-
obj.member =
|
|
1271
|
+
obj.member = parseJSON(members[0]);
|
|
1265
1272
|
} catch {
|
|
1266
1273
|
obj.member = members[0];
|
|
1267
1274
|
}
|
|
@@ -1523,7 +1530,7 @@ function deserialize3(result) {
|
|
|
1523
1530
|
const value = result[i + 1];
|
|
1524
1531
|
try {
|
|
1525
1532
|
const valueIsNumberAndNotSafeInteger = !Number.isNaN(Number(value)) && !Number.isSafeInteger(Number(value));
|
|
1526
|
-
obj[key] = valueIsNumberAndNotSafeInteger ? value :
|
|
1533
|
+
obj[key] = valueIsNumberAndNotSafeInteger ? value : parseJSON(value);
|
|
1527
1534
|
} catch {
|
|
1528
1535
|
obj[key] = value;
|
|
1529
1536
|
}
|
|
@@ -1547,7 +1554,7 @@ function deserialize4(fields, result) {
|
|
|
1547
1554
|
const obj = {};
|
|
1548
1555
|
for (const [i, field] of fields.entries()) {
|
|
1549
1556
|
try {
|
|
1550
|
-
obj[field] =
|
|
1557
|
+
obj[field] = parseJSON(result[i]);
|
|
1551
1558
|
} catch {
|
|
1552
1559
|
obj[field] = result[i];
|
|
1553
1560
|
}
|
|
@@ -1641,7 +1648,7 @@ function deserialize5(result) {
|
|
|
1641
1648
|
const key = result[i];
|
|
1642
1649
|
const value = result[i + 1];
|
|
1643
1650
|
try {
|
|
1644
|
-
obj[key] =
|
|
1651
|
+
obj[key] = parseJSON(value);
|
|
1645
1652
|
} catch {
|
|
1646
1653
|
obj[key] = value;
|
|
1647
1654
|
}
|
|
@@ -2833,7 +2840,7 @@ function deserialize6(result) {
|
|
|
2833
2840
|
const field = entries[j];
|
|
2834
2841
|
const value = entries[j + 1];
|
|
2835
2842
|
try {
|
|
2836
|
-
obj[streamId][field] =
|
|
2843
|
+
obj[streamId][field] = parseJSON(value);
|
|
2837
2844
|
} catch {
|
|
2838
2845
|
obj[streamId][field] = value;
|
|
2839
2846
|
}
|
|
@@ -2930,7 +2937,7 @@ function deserialize7(result) {
|
|
|
2930
2937
|
const field = entries[j];
|
|
2931
2938
|
const value = entries[j + 1];
|
|
2932
2939
|
try {
|
|
2933
|
-
obj[streamId][field] =
|
|
2940
|
+
obj[streamId][field] = parseJSON(value);
|
|
2934
2941
|
} catch {
|
|
2935
2942
|
obj[streamId][field] = value;
|
|
2936
2943
|
}
|
|
@@ -6056,7 +6063,7 @@ var Redis = class {
|
|
|
6056
6063
|
};
|
|
6057
6064
|
|
|
6058
6065
|
// version.ts
|
|
6059
|
-
var VERSION = "v1.
|
|
6066
|
+
var VERSION = "v1.40.0";
|
|
6060
6067
|
|
|
6061
6068
|
// platforms/cloudflare.ts
|
|
6062
6069
|
var Redis2 = class _Redis extends Redis {
|
package/cloudflare.mjs
CHANGED
|
@@ -95,26 +95,13 @@ type RequesterConfig = {
|
|
|
95
95
|
*/
|
|
96
96
|
retry?: RetryConfig;
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
99
|
-
* valid json and will therefore cause errors when deserializing. This used to happen very
|
|
100
|
-
* frequently with non-utf8 data, such as emojis.
|
|
98
|
+
* Response encoding requested from the server.
|
|
101
99
|
*
|
|
102
|
-
* By default
|
|
103
|
-
*
|
|
100
|
+
* By default the server returns string values as plain JSON strings. Set this to "base64" to have
|
|
101
|
+
* the server base64-encode string values, which the client decodes as utf8. This increases the
|
|
102
|
+
* response size by about 33%.
|
|
104
103
|
*
|
|
105
|
-
*
|
|
106
|
-
* valid utf8, you can disable this behaviour by setting this option to false.
|
|
107
|
-
*
|
|
108
|
-
* Here's what the response body looks like:
|
|
109
|
-
*
|
|
110
|
-
* ```json
|
|
111
|
-
* {
|
|
112
|
-
* result?: "base64-encoded",
|
|
113
|
-
* error?: string
|
|
114
|
-
* }
|
|
115
|
-
* ```
|
|
116
|
-
*
|
|
117
|
-
* @default "base64"
|
|
104
|
+
* @default false
|
|
118
105
|
*/
|
|
119
106
|
responseEncoding?: false | "base64";
|
|
120
107
|
/**
|
|
@@ -95,26 +95,13 @@ type RequesterConfig = {
|
|
|
95
95
|
*/
|
|
96
96
|
retry?: RetryConfig;
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
99
|
-
* valid json and will therefore cause errors when deserializing. This used to happen very
|
|
100
|
-
* frequently with non-utf8 data, such as emojis.
|
|
98
|
+
* Response encoding requested from the server.
|
|
101
99
|
*
|
|
102
|
-
* By default
|
|
103
|
-
*
|
|
100
|
+
* By default the server returns string values as plain JSON strings. Set this to "base64" to have
|
|
101
|
+
* the server base64-encode string values, which the client decodes as utf8. This increases the
|
|
102
|
+
* response size by about 33%.
|
|
104
103
|
*
|
|
105
|
-
*
|
|
106
|
-
* valid utf8, you can disable this behaviour by setting this option to false.
|
|
107
|
-
*
|
|
108
|
-
* Here's what the response body looks like:
|
|
109
|
-
*
|
|
110
|
-
* ```json
|
|
111
|
-
* {
|
|
112
|
-
* result?: "base64-encoded",
|
|
113
|
-
* error?: string
|
|
114
|
-
* }
|
|
115
|
-
* ```
|
|
116
|
-
*
|
|
117
|
-
* @default "base64"
|
|
104
|
+
* @default false
|
|
118
105
|
*/
|
|
119
106
|
responseEncoding?: false | "base64";
|
|
120
107
|
/**
|
package/fastly.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as Redis$1, a as RedisOptions, b as RequesterConfig } from './error-
|
|
2
|
-
export { A as AppendCommand, c as ArCountCommand, d as ArDelCommand, e as ArDelRangeCommand, f as ArGetCommand, g as ArGetRangeCommand, h as ArGrepCommand, i as ArGrepOptions, j as ArGrepPredicate, k as ArGrepResult, l as ArInfoCommand, m as ArInfoOptions, n as ArInfoResult, o as ArInsertCommand, p as ArLastItemsCommand, q as ArLastItemsOptions, r as ArLenCommand, s as ArMGetCommand, t as ArMSetCommand, u as ArMSetValues, v as ArNextCommand, w as ArOpCommand, x as ArOpOperation, y as ArRingCommand, z as ArScanCommand, B as ArScanOptions, C as ArSeekCommand, D as ArSetCommand, E as BitCountCommand, F as BitOpCommand, G as BitPosCommand, I as ClientSetInfoAttribute, J as ClientSetInfoCommand, K as CopyCommand, L as DBSizeCommand, M as DecrByCommand, N as DecrCommand, O as DelCommand, P as EchoCommand, Q as EvalCommand, S as EvalROCommand, T as EvalshaCommand, U as EvalshaROCommand, V as ExistsCommand, W as ExpireAtCommand, X as ExpireCommand, Y as ExpireOption, Z as FlushAllCommand, _ as FlushDBCommand, $ as GeoAddCommand, a0 as GeoAddCommandOptions, a1 as GeoDistCommand, a2 as GeoHashCommand, a3 as GeoMember, a4 as GeoPosCommand, a5 as GeoSearchCommand, a6 as GeoSearchStoreCommand, a7 as GetBitCommand, a8 as GetCommand, a9 as GetDelCommand, aa as GetExCommand, ab as GetRangeCommand, ac as GetSetCommand, ad as HDelCommand, ae as HExistsCommand, af as HExpireAtCommand, ag as HExpireCommand, ah as HExpireTimeCommand, ai as HGetAllCommand, aj as HGetCommand, ak as HGetDelCommand, al as HGetExCommand, am as HIncrByCommand, an as HIncrByFloatCommand, ao as HKeysCommand, ap as HLenCommand, aq as HMGetCommand, ar as HMSetCommand, as as HPExpireAtCommand, at as HPExpireCommand, au as HPExpireTimeCommand, av as HPTtlCommand, aw as HPersistCommand, ax as HRandFieldCommand, ay as HScanCommand, az as HSetCommand, aA as HSetExCommand, aB as HSetNXCommand, aC as HStrLenCommand, aD as HTtlCommand, aE as HValsCommand, aF as IncrByCommand, aG as IncrByFloatCommand, aH as IncrCommand, aI as JsonArrAppendCommand, aJ as JsonArrIndexCommand, aK as JsonArrInsertCommand, aL as JsonArrLenCommand, aM as JsonArrPopCommand, aN as JsonArrTrimCommand, aO as JsonClearCommand, aP as JsonDelCommand, aQ as JsonForgetCommand, aR as JsonGetCommand, aS as JsonMGetCommand, aT as JsonMergeCommand, aU as JsonNumIncrByCommand, aV as JsonNumMultByCommand, aW as JsonObjKeysCommand, aX as JsonObjLenCommand, aY as JsonRespCommand, aZ as JsonSetCommand, a_ as JsonStrAppendCommand, a$ as JsonStrLenCommand, b0 as JsonToggleCommand, b1 as JsonTypeCommand, b2 as KeysCommand, b3 as LIndexCommand, b4 as LInsertCommand, b5 as LLenCommand, b6 as LMoveCommand, b7 as LPopCommand, b8 as LPushCommand, b9 as LPushXCommand, ba as LRangeCommand, bb as LRemCommand, bc as LSetCommand, bd as LTrimCommand, be as MGetCommand, bf as MSetCommand, bg as MSetNXCommand, bh as PExpireAtCommand, bi as PExpireCommand, bj as PSetEXCommand, bk as PTtlCommand, bl as PersistCommand, bm as PingCommand, bn as Pipeline, bo as PublishCommand, bp as RPopCommand, bq as RPushCommand, br as RPushXCommand, bs as RandomKeyCommand, bt as RenameCommand, bu as RenameNXCommand, bv as Requester, bw as SAddCommand, bx as SCardCommand, by as SDiffCommand, bz as SDiffStoreCommand, bA as SInterCardCommand, bB as SInterCommand, bC as SInterStoreCommand, bD as SIsMemberCommand, bE as SMIsMemberCommand, bF as SMembersCommand, bG as SMoveCommand, bH as SPopCommand, bI as SRandMemberCommand, bJ as SRemCommand, bK as SScanCommand, bL as SUnionCommand, bM as SUnionStoreCommand, bN as ScanCommand, bO as ScanCommandOptions, bP as ScoreMember, bQ as ScriptExistsCommand, bR as ScriptFlushCommand, bS as ScriptLoadCommand, bT as SetBitCommand, bU as SetCommand, bV as SetCommandOptions, bW as SetExCommand, bX as SetNxCommand, bY as SetRangeCommand, bZ as StrLenCommand, b_ as TimeCommand, b$ as TouchCommand, c0 as TtlCommand, c1 as Type, c2 as TypeCommand, c3 as UnlinkCommand, c4 as UpstashRequest, c5 as UpstashResponse, c6 as VectorAddCommand, c7 as VectorCountCommand, c8 as VectorCreateCommand, c9 as VectorDelCommand, ca as VectorDropCommand, cb as VectorGetCommand, cc as VectorInfoCommand, cd as VectorQueryCommand, ce as XAckDelCommand, cf as XAddCommand, cg as XDelExCommand, ch as XRangeCommand, ci as ZAddCommand, cj as ZAddCommandOptions, ck as ZCardCommand, cl as ZCountCommand, cm as ZDiffStoreCommand, cn as ZIncrByCommand, co as ZInterStoreCommand, cp as ZInterStoreCommandOptions, cq as ZLexCountCommand, cr as ZMScoreCommand, cs as ZPopMaxCommand, ct as ZPopMinCommand, cu as ZRangeCommand, cv as ZRangeCommandOptions, cw as ZRankCommand, cx as ZRemCommand, cy as ZRemRangeByLexCommand, cz as ZRemRangeByRankCommand, cA as ZRemRangeByScoreCommand, cB as ZRevRankCommand, cC as ZScanCommand, cD as ZScoreCommand, cE as ZUnionCommand, cF as ZUnionCommandOptions, cG as ZUnionStoreCommand, cH as ZUnionStoreCommandOptions, cI as errors } from './error-
|
|
1
|
+
import { R as Redis$1, a as RedisOptions, b as RequesterConfig } from './error-BNzLTXJG.mjs';
|
|
2
|
+
export { A as AppendCommand, c as ArCountCommand, d as ArDelCommand, e as ArDelRangeCommand, f as ArGetCommand, g as ArGetRangeCommand, h as ArGrepCommand, i as ArGrepOptions, j as ArGrepPredicate, k as ArGrepResult, l as ArInfoCommand, m as ArInfoOptions, n as ArInfoResult, o as ArInsertCommand, p as ArLastItemsCommand, q as ArLastItemsOptions, r as ArLenCommand, s as ArMGetCommand, t as ArMSetCommand, u as ArMSetValues, v as ArNextCommand, w as ArOpCommand, x as ArOpOperation, y as ArRingCommand, z as ArScanCommand, B as ArScanOptions, C as ArSeekCommand, D as ArSetCommand, E as BitCountCommand, F as BitOpCommand, G as BitPosCommand, I as ClientSetInfoAttribute, J as ClientSetInfoCommand, K as CopyCommand, L as DBSizeCommand, M as DecrByCommand, N as DecrCommand, O as DelCommand, P as EchoCommand, Q as EvalCommand, S as EvalROCommand, T as EvalshaCommand, U as EvalshaROCommand, V as ExistsCommand, W as ExpireAtCommand, X as ExpireCommand, Y as ExpireOption, Z as FlushAllCommand, _ as FlushDBCommand, $ as GeoAddCommand, a0 as GeoAddCommandOptions, a1 as GeoDistCommand, a2 as GeoHashCommand, a3 as GeoMember, a4 as GeoPosCommand, a5 as GeoSearchCommand, a6 as GeoSearchStoreCommand, a7 as GetBitCommand, a8 as GetCommand, a9 as GetDelCommand, aa as GetExCommand, ab as GetRangeCommand, ac as GetSetCommand, ad as HDelCommand, ae as HExistsCommand, af as HExpireAtCommand, ag as HExpireCommand, ah as HExpireTimeCommand, ai as HGetAllCommand, aj as HGetCommand, ak as HGetDelCommand, al as HGetExCommand, am as HIncrByCommand, an as HIncrByFloatCommand, ao as HKeysCommand, ap as HLenCommand, aq as HMGetCommand, ar as HMSetCommand, as as HPExpireAtCommand, at as HPExpireCommand, au as HPExpireTimeCommand, av as HPTtlCommand, aw as HPersistCommand, ax as HRandFieldCommand, ay as HScanCommand, az as HSetCommand, aA as HSetExCommand, aB as HSetNXCommand, aC as HStrLenCommand, aD as HTtlCommand, aE as HValsCommand, aF as IncrByCommand, aG as IncrByFloatCommand, aH as IncrCommand, aI as JsonArrAppendCommand, aJ as JsonArrIndexCommand, aK as JsonArrInsertCommand, aL as JsonArrLenCommand, aM as JsonArrPopCommand, aN as JsonArrTrimCommand, aO as JsonClearCommand, aP as JsonDelCommand, aQ as JsonForgetCommand, aR as JsonGetCommand, aS as JsonMGetCommand, aT as JsonMergeCommand, aU as JsonNumIncrByCommand, aV as JsonNumMultByCommand, aW as JsonObjKeysCommand, aX as JsonObjLenCommand, aY as JsonRespCommand, aZ as JsonSetCommand, a_ as JsonStrAppendCommand, a$ as JsonStrLenCommand, b0 as JsonToggleCommand, b1 as JsonTypeCommand, b2 as KeysCommand, b3 as LIndexCommand, b4 as LInsertCommand, b5 as LLenCommand, b6 as LMoveCommand, b7 as LPopCommand, b8 as LPushCommand, b9 as LPushXCommand, ba as LRangeCommand, bb as LRemCommand, bc as LSetCommand, bd as LTrimCommand, be as MGetCommand, bf as MSetCommand, bg as MSetNXCommand, bh as PExpireAtCommand, bi as PExpireCommand, bj as PSetEXCommand, bk as PTtlCommand, bl as PersistCommand, bm as PingCommand, bn as Pipeline, bo as PublishCommand, bp as RPopCommand, bq as RPushCommand, br as RPushXCommand, bs as RandomKeyCommand, bt as RenameCommand, bu as RenameNXCommand, bv as Requester, bw as SAddCommand, bx as SCardCommand, by as SDiffCommand, bz as SDiffStoreCommand, bA as SInterCardCommand, bB as SInterCommand, bC as SInterStoreCommand, bD as SIsMemberCommand, bE as SMIsMemberCommand, bF as SMembersCommand, bG as SMoveCommand, bH as SPopCommand, bI as SRandMemberCommand, bJ as SRemCommand, bK as SScanCommand, bL as SUnionCommand, bM as SUnionStoreCommand, bN as ScanCommand, bO as ScanCommandOptions, bP as ScoreMember, bQ as ScriptExistsCommand, bR as ScriptFlushCommand, bS as ScriptLoadCommand, bT as SetBitCommand, bU as SetCommand, bV as SetCommandOptions, bW as SetExCommand, bX as SetNxCommand, bY as SetRangeCommand, bZ as StrLenCommand, b_ as TimeCommand, b$ as TouchCommand, c0 as TtlCommand, c1 as Type, c2 as TypeCommand, c3 as UnlinkCommand, c4 as UpstashRequest, c5 as UpstashResponse, c6 as VectorAddCommand, c7 as VectorCountCommand, c8 as VectorCreateCommand, c9 as VectorDelCommand, ca as VectorDropCommand, cb as VectorGetCommand, cc as VectorInfoCommand, cd as VectorQueryCommand, ce as XAckDelCommand, cf as XAddCommand, cg as XDelExCommand, ch as XRangeCommand, ci as ZAddCommand, cj as ZAddCommandOptions, ck as ZCardCommand, cl as ZCountCommand, cm as ZDiffStoreCommand, cn as ZIncrByCommand, co as ZInterStoreCommand, cp as ZInterStoreCommandOptions, cq as ZLexCountCommand, cr as ZMScoreCommand, cs as ZPopMaxCommand, ct as ZPopMinCommand, cu as ZRangeCommand, cv as ZRangeCommandOptions, cw as ZRankCommand, cx as ZRemCommand, cy as ZRemRangeByLexCommand, cz as ZRemRangeByRankCommand, cA as ZRemRangeByScoreCommand, cB as ZRevRankCommand, cC as ZScanCommand, cD as ZScoreCommand, cE as ZUnionCommand, cF as ZUnionCommandOptions, cG as ZUnionStoreCommand, cH as ZUnionStoreCommandOptions, cI as errors } from './error-BNzLTXJG.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Connection credentials for upstash redis.
|
package/fastly.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as Redis$1, a as RedisOptions, b as RequesterConfig } from './error-
|
|
2
|
-
export { A as AppendCommand, c as ArCountCommand, d as ArDelCommand, e as ArDelRangeCommand, f as ArGetCommand, g as ArGetRangeCommand, h as ArGrepCommand, i as ArGrepOptions, j as ArGrepPredicate, k as ArGrepResult, l as ArInfoCommand, m as ArInfoOptions, n as ArInfoResult, o as ArInsertCommand, p as ArLastItemsCommand, q as ArLastItemsOptions, r as ArLenCommand, s as ArMGetCommand, t as ArMSetCommand, u as ArMSetValues, v as ArNextCommand, w as ArOpCommand, x as ArOpOperation, y as ArRingCommand, z as ArScanCommand, B as ArScanOptions, C as ArSeekCommand, D as ArSetCommand, E as BitCountCommand, F as BitOpCommand, G as BitPosCommand, I as ClientSetInfoAttribute, J as ClientSetInfoCommand, K as CopyCommand, L as DBSizeCommand, M as DecrByCommand, N as DecrCommand, O as DelCommand, P as EchoCommand, Q as EvalCommand, S as EvalROCommand, T as EvalshaCommand, U as EvalshaROCommand, V as ExistsCommand, W as ExpireAtCommand, X as ExpireCommand, Y as ExpireOption, Z as FlushAllCommand, _ as FlushDBCommand, $ as GeoAddCommand, a0 as GeoAddCommandOptions, a1 as GeoDistCommand, a2 as GeoHashCommand, a3 as GeoMember, a4 as GeoPosCommand, a5 as GeoSearchCommand, a6 as GeoSearchStoreCommand, a7 as GetBitCommand, a8 as GetCommand, a9 as GetDelCommand, aa as GetExCommand, ab as GetRangeCommand, ac as GetSetCommand, ad as HDelCommand, ae as HExistsCommand, af as HExpireAtCommand, ag as HExpireCommand, ah as HExpireTimeCommand, ai as HGetAllCommand, aj as HGetCommand, ak as HGetDelCommand, al as HGetExCommand, am as HIncrByCommand, an as HIncrByFloatCommand, ao as HKeysCommand, ap as HLenCommand, aq as HMGetCommand, ar as HMSetCommand, as as HPExpireAtCommand, at as HPExpireCommand, au as HPExpireTimeCommand, av as HPTtlCommand, aw as HPersistCommand, ax as HRandFieldCommand, ay as HScanCommand, az as HSetCommand, aA as HSetExCommand, aB as HSetNXCommand, aC as HStrLenCommand, aD as HTtlCommand, aE as HValsCommand, aF as IncrByCommand, aG as IncrByFloatCommand, aH as IncrCommand, aI as JsonArrAppendCommand, aJ as JsonArrIndexCommand, aK as JsonArrInsertCommand, aL as JsonArrLenCommand, aM as JsonArrPopCommand, aN as JsonArrTrimCommand, aO as JsonClearCommand, aP as JsonDelCommand, aQ as JsonForgetCommand, aR as JsonGetCommand, aS as JsonMGetCommand, aT as JsonMergeCommand, aU as JsonNumIncrByCommand, aV as JsonNumMultByCommand, aW as JsonObjKeysCommand, aX as JsonObjLenCommand, aY as JsonRespCommand, aZ as JsonSetCommand, a_ as JsonStrAppendCommand, a$ as JsonStrLenCommand, b0 as JsonToggleCommand, b1 as JsonTypeCommand, b2 as KeysCommand, b3 as LIndexCommand, b4 as LInsertCommand, b5 as LLenCommand, b6 as LMoveCommand, b7 as LPopCommand, b8 as LPushCommand, b9 as LPushXCommand, ba as LRangeCommand, bb as LRemCommand, bc as LSetCommand, bd as LTrimCommand, be as MGetCommand, bf as MSetCommand, bg as MSetNXCommand, bh as PExpireAtCommand, bi as PExpireCommand, bj as PSetEXCommand, bk as PTtlCommand, bl as PersistCommand, bm as PingCommand, bn as Pipeline, bo as PublishCommand, bp as RPopCommand, bq as RPushCommand, br as RPushXCommand, bs as RandomKeyCommand, bt as RenameCommand, bu as RenameNXCommand, bv as Requester, bw as SAddCommand, bx as SCardCommand, by as SDiffCommand, bz as SDiffStoreCommand, bA as SInterCardCommand, bB as SInterCommand, bC as SInterStoreCommand, bD as SIsMemberCommand, bE as SMIsMemberCommand, bF as SMembersCommand, bG as SMoveCommand, bH as SPopCommand, bI as SRandMemberCommand, bJ as SRemCommand, bK as SScanCommand, bL as SUnionCommand, bM as SUnionStoreCommand, bN as ScanCommand, bO as ScanCommandOptions, bP as ScoreMember, bQ as ScriptExistsCommand, bR as ScriptFlushCommand, bS as ScriptLoadCommand, bT as SetBitCommand, bU as SetCommand, bV as SetCommandOptions, bW as SetExCommand, bX as SetNxCommand, bY as SetRangeCommand, bZ as StrLenCommand, b_ as TimeCommand, b$ as TouchCommand, c0 as TtlCommand, c1 as Type, c2 as TypeCommand, c3 as UnlinkCommand, c4 as UpstashRequest, c5 as UpstashResponse, c6 as VectorAddCommand, c7 as VectorCountCommand, c8 as VectorCreateCommand, c9 as VectorDelCommand, ca as VectorDropCommand, cb as VectorGetCommand, cc as VectorInfoCommand, cd as VectorQueryCommand, ce as XAckDelCommand, cf as XAddCommand, cg as XDelExCommand, ch as XRangeCommand, ci as ZAddCommand, cj as ZAddCommandOptions, ck as ZCardCommand, cl as ZCountCommand, cm as ZDiffStoreCommand, cn as ZIncrByCommand, co as ZInterStoreCommand, cp as ZInterStoreCommandOptions, cq as ZLexCountCommand, cr as ZMScoreCommand, cs as ZPopMaxCommand, ct as ZPopMinCommand, cu as ZRangeCommand, cv as ZRangeCommandOptions, cw as ZRankCommand, cx as ZRemCommand, cy as ZRemRangeByLexCommand, cz as ZRemRangeByRankCommand, cA as ZRemRangeByScoreCommand, cB as ZRevRankCommand, cC as ZScanCommand, cD as ZScoreCommand, cE as ZUnionCommand, cF as ZUnionCommandOptions, cG as ZUnionStoreCommand, cH as ZUnionStoreCommandOptions, cI as errors } from './error-
|
|
1
|
+
import { R as Redis$1, a as RedisOptions, b as RequesterConfig } from './error-BNzLTXJG.js';
|
|
2
|
+
export { A as AppendCommand, c as ArCountCommand, d as ArDelCommand, e as ArDelRangeCommand, f as ArGetCommand, g as ArGetRangeCommand, h as ArGrepCommand, i as ArGrepOptions, j as ArGrepPredicate, k as ArGrepResult, l as ArInfoCommand, m as ArInfoOptions, n as ArInfoResult, o as ArInsertCommand, p as ArLastItemsCommand, q as ArLastItemsOptions, r as ArLenCommand, s as ArMGetCommand, t as ArMSetCommand, u as ArMSetValues, v as ArNextCommand, w as ArOpCommand, x as ArOpOperation, y as ArRingCommand, z as ArScanCommand, B as ArScanOptions, C as ArSeekCommand, D as ArSetCommand, E as BitCountCommand, F as BitOpCommand, G as BitPosCommand, I as ClientSetInfoAttribute, J as ClientSetInfoCommand, K as CopyCommand, L as DBSizeCommand, M as DecrByCommand, N as DecrCommand, O as DelCommand, P as EchoCommand, Q as EvalCommand, S as EvalROCommand, T as EvalshaCommand, U as EvalshaROCommand, V as ExistsCommand, W as ExpireAtCommand, X as ExpireCommand, Y as ExpireOption, Z as FlushAllCommand, _ as FlushDBCommand, $ as GeoAddCommand, a0 as GeoAddCommandOptions, a1 as GeoDistCommand, a2 as GeoHashCommand, a3 as GeoMember, a4 as GeoPosCommand, a5 as GeoSearchCommand, a6 as GeoSearchStoreCommand, a7 as GetBitCommand, a8 as GetCommand, a9 as GetDelCommand, aa as GetExCommand, ab as GetRangeCommand, ac as GetSetCommand, ad as HDelCommand, ae as HExistsCommand, af as HExpireAtCommand, ag as HExpireCommand, ah as HExpireTimeCommand, ai as HGetAllCommand, aj as HGetCommand, ak as HGetDelCommand, al as HGetExCommand, am as HIncrByCommand, an as HIncrByFloatCommand, ao as HKeysCommand, ap as HLenCommand, aq as HMGetCommand, ar as HMSetCommand, as as HPExpireAtCommand, at as HPExpireCommand, au as HPExpireTimeCommand, av as HPTtlCommand, aw as HPersistCommand, ax as HRandFieldCommand, ay as HScanCommand, az as HSetCommand, aA as HSetExCommand, aB as HSetNXCommand, aC as HStrLenCommand, aD as HTtlCommand, aE as HValsCommand, aF as IncrByCommand, aG as IncrByFloatCommand, aH as IncrCommand, aI as JsonArrAppendCommand, aJ as JsonArrIndexCommand, aK as JsonArrInsertCommand, aL as JsonArrLenCommand, aM as JsonArrPopCommand, aN as JsonArrTrimCommand, aO as JsonClearCommand, aP as JsonDelCommand, aQ as JsonForgetCommand, aR as JsonGetCommand, aS as JsonMGetCommand, aT as JsonMergeCommand, aU as JsonNumIncrByCommand, aV as JsonNumMultByCommand, aW as JsonObjKeysCommand, aX as JsonObjLenCommand, aY as JsonRespCommand, aZ as JsonSetCommand, a_ as JsonStrAppendCommand, a$ as JsonStrLenCommand, b0 as JsonToggleCommand, b1 as JsonTypeCommand, b2 as KeysCommand, b3 as LIndexCommand, b4 as LInsertCommand, b5 as LLenCommand, b6 as LMoveCommand, b7 as LPopCommand, b8 as LPushCommand, b9 as LPushXCommand, ba as LRangeCommand, bb as LRemCommand, bc as LSetCommand, bd as LTrimCommand, be as MGetCommand, bf as MSetCommand, bg as MSetNXCommand, bh as PExpireAtCommand, bi as PExpireCommand, bj as PSetEXCommand, bk as PTtlCommand, bl as PersistCommand, bm as PingCommand, bn as Pipeline, bo as PublishCommand, bp as RPopCommand, bq as RPushCommand, br as RPushXCommand, bs as RandomKeyCommand, bt as RenameCommand, bu as RenameNXCommand, bv as Requester, bw as SAddCommand, bx as SCardCommand, by as SDiffCommand, bz as SDiffStoreCommand, bA as SInterCardCommand, bB as SInterCommand, bC as SInterStoreCommand, bD as SIsMemberCommand, bE as SMIsMemberCommand, bF as SMembersCommand, bG as SMoveCommand, bH as SPopCommand, bI as SRandMemberCommand, bJ as SRemCommand, bK as SScanCommand, bL as SUnionCommand, bM as SUnionStoreCommand, bN as ScanCommand, bO as ScanCommandOptions, bP as ScoreMember, bQ as ScriptExistsCommand, bR as ScriptFlushCommand, bS as ScriptLoadCommand, bT as SetBitCommand, bU as SetCommand, bV as SetCommandOptions, bW as SetExCommand, bX as SetNxCommand, bY as SetRangeCommand, bZ as StrLenCommand, b_ as TimeCommand, b$ as TouchCommand, c0 as TtlCommand, c1 as Type, c2 as TypeCommand, c3 as UnlinkCommand, c4 as UpstashRequest, c5 as UpstashResponse, c6 as VectorAddCommand, c7 as VectorCountCommand, c8 as VectorCreateCommand, c9 as VectorDelCommand, ca as VectorDropCommand, cb as VectorGetCommand, cc as VectorInfoCommand, cd as VectorQueryCommand, ce as XAckDelCommand, cf as XAddCommand, cg as XDelExCommand, ch as XRangeCommand, ci as ZAddCommand, cj as ZAddCommandOptions, ck as ZCardCommand, cl as ZCountCommand, cm as ZDiffStoreCommand, cn as ZIncrByCommand, co as ZInterStoreCommand, cp as ZInterStoreCommandOptions, cq as ZLexCountCommand, cr as ZMScoreCommand, cs as ZPopMaxCommand, ct as ZPopMinCommand, cu as ZRangeCommand, cv as ZRangeCommandOptions, cw as ZRankCommand, cx as ZRemCommand, cy as ZRemRangeByLexCommand, cz as ZRemRangeByRankCommand, cA as ZRemRangeByScoreCommand, cB as ZRevRankCommand, cC as ZScanCommand, cD as ZScoreCommand, cE as ZUnionCommand, cF as ZUnionCommandOptions, cG as ZUnionStoreCommand, cH as ZUnionStoreCommandOptions, cI as errors } from './error-BNzLTXJG.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Connection credentials for upstash redis.
|
package/fastly.js
CHANGED
|
@@ -55,6 +55,12 @@ var UpstashJSONParseError = class extends UpstashError {
|
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
// pkg/util.ts
|
|
58
|
+
function parseJSON(value) {
|
|
59
|
+
return JSON.parse(stripBOM(value));
|
|
60
|
+
}
|
|
61
|
+
function stripBOM(value) {
|
|
62
|
+
return typeof value === "string" && value.startsWith("\uFEFF") ? value.slice(1) : value;
|
|
63
|
+
}
|
|
58
64
|
function parseRecursive(obj) {
|
|
59
65
|
const parsed = Array.isArray(obj) ? obj.map((o) => {
|
|
60
66
|
try {
|
|
@@ -62,8 +68,8 @@ function parseRecursive(obj) {
|
|
|
62
68
|
} catch {
|
|
63
69
|
return o;
|
|
64
70
|
}
|
|
65
|
-
}) :
|
|
66
|
-
if (typeof parsed === "number" && parsed.toString() !== obj) {
|
|
71
|
+
}) : parseJSON(obj);
|
|
72
|
+
if (typeof parsed === "number" && parsed.toString() !== stripBOM(obj)) {
|
|
67
73
|
return obj;
|
|
68
74
|
}
|
|
69
75
|
return parsed;
|
|
@@ -122,8 +128,7 @@ var HttpClient = class {
|
|
|
122
128
|
this.options = {
|
|
123
129
|
backend: config.options?.backend,
|
|
124
130
|
agent: config.agent,
|
|
125
|
-
responseEncoding: config.responseEncoding ??
|
|
126
|
-
// default to base64
|
|
131
|
+
responseEncoding: config.responseEncoding ?? false,
|
|
127
132
|
cache: config.cache,
|
|
128
133
|
signal: config.signal,
|
|
129
134
|
keepAlive: config.keepAlive ?? true
|
|
@@ -196,12 +201,14 @@ var HttpClient = class {
|
|
|
196
201
|
if (requestOptions.signal?.aborted && isSignalFunction) {
|
|
197
202
|
throw error_;
|
|
198
203
|
} else if (requestOptions.signal?.aborted) {
|
|
204
|
+
const reason = requestOptions.signal.reason;
|
|
199
205
|
const myBlob = new Blob([
|
|
200
|
-
|
|
206
|
+
// Error reasons (e.g. the default DOMException) would serialize to an empty object
|
|
207
|
+
JSON.stringify({ result: reason instanceof Error ? null : reason ?? null })
|
|
201
208
|
]);
|
|
202
209
|
const myOptions = {
|
|
203
210
|
status: 200,
|
|
204
|
-
statusText:
|
|
211
|
+
statusText: "Aborted"
|
|
205
212
|
};
|
|
206
213
|
res = new Response(myBlob, myOptions);
|
|
207
214
|
break;
|
|
@@ -1251,7 +1258,7 @@ var GeoSearchCommand = class extends Command {
|
|
|
1251
1258
|
if (!opts?.withCoord && !opts?.withDist && !opts?.withHash) {
|
|
1252
1259
|
return result.map((member) => {
|
|
1253
1260
|
try {
|
|
1254
|
-
return { member:
|
|
1261
|
+
return { member: parseJSON(member) };
|
|
1255
1262
|
} catch {
|
|
1256
1263
|
return { member };
|
|
1257
1264
|
}
|
|
@@ -1261,7 +1268,7 @@ var GeoSearchCommand = class extends Command {
|
|
|
1261
1268
|
let counter = 1;
|
|
1262
1269
|
const obj = {};
|
|
1263
1270
|
try {
|
|
1264
|
-
obj.member =
|
|
1271
|
+
obj.member = parseJSON(members[0]);
|
|
1265
1272
|
} catch {
|
|
1266
1273
|
obj.member = members[0];
|
|
1267
1274
|
}
|
|
@@ -1523,7 +1530,7 @@ function deserialize3(result) {
|
|
|
1523
1530
|
const value = result[i + 1];
|
|
1524
1531
|
try {
|
|
1525
1532
|
const valueIsNumberAndNotSafeInteger = !Number.isNaN(Number(value)) && !Number.isSafeInteger(Number(value));
|
|
1526
|
-
obj[key] = valueIsNumberAndNotSafeInteger ? value :
|
|
1533
|
+
obj[key] = valueIsNumberAndNotSafeInteger ? value : parseJSON(value);
|
|
1527
1534
|
} catch {
|
|
1528
1535
|
obj[key] = value;
|
|
1529
1536
|
}
|
|
@@ -1547,7 +1554,7 @@ function deserialize4(fields, result) {
|
|
|
1547
1554
|
const obj = {};
|
|
1548
1555
|
for (const [i, field] of fields.entries()) {
|
|
1549
1556
|
try {
|
|
1550
|
-
obj[field] =
|
|
1557
|
+
obj[field] = parseJSON(result[i]);
|
|
1551
1558
|
} catch {
|
|
1552
1559
|
obj[field] = result[i];
|
|
1553
1560
|
}
|
|
@@ -1641,7 +1648,7 @@ function deserialize5(result) {
|
|
|
1641
1648
|
const key = result[i];
|
|
1642
1649
|
const value = result[i + 1];
|
|
1643
1650
|
try {
|
|
1644
|
-
obj[key] =
|
|
1651
|
+
obj[key] = parseJSON(value);
|
|
1645
1652
|
} catch {
|
|
1646
1653
|
obj[key] = value;
|
|
1647
1654
|
}
|
|
@@ -2833,7 +2840,7 @@ function deserialize6(result) {
|
|
|
2833
2840
|
const field = entries[j];
|
|
2834
2841
|
const value = entries[j + 1];
|
|
2835
2842
|
try {
|
|
2836
|
-
obj[streamId][field] =
|
|
2843
|
+
obj[streamId][field] = parseJSON(value);
|
|
2837
2844
|
} catch {
|
|
2838
2845
|
obj[streamId][field] = value;
|
|
2839
2846
|
}
|
|
@@ -2930,7 +2937,7 @@ function deserialize7(result) {
|
|
|
2930
2937
|
const field = entries[j];
|
|
2931
2938
|
const value = entries[j + 1];
|
|
2932
2939
|
try {
|
|
2933
|
-
obj[streamId][field] =
|
|
2940
|
+
obj[streamId][field] = parseJSON(value);
|
|
2934
2941
|
} catch {
|
|
2935
2942
|
obj[streamId][field] = value;
|
|
2936
2943
|
}
|
|
@@ -6056,7 +6063,7 @@ var Redis = class {
|
|
|
6056
6063
|
};
|
|
6057
6064
|
|
|
6058
6065
|
// version.ts
|
|
6059
|
-
var VERSION = "v1.
|
|
6066
|
+
var VERSION = "v1.40.0";
|
|
6060
6067
|
|
|
6061
6068
|
// platforms/fastly.ts
|
|
6062
6069
|
var Redis2 = class extends Redis {
|
package/fastly.mjs
CHANGED
package/nodejs.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cJ as NumericField, cK as NestedIndexSchema, R as Redis$1, H as HttpClientConfig, a as RedisOptions, b as RequesterConfig, bv as Requester } from './error-
|
|
2
|
-
export { A as AppendCommand, c as ArCountCommand, d as ArDelCommand, e as ArDelRangeCommand, f as ArGetCommand, g as ArGetRangeCommand, h as ArGrepCommand, i as ArGrepOptions, j as ArGrepPredicate, k as ArGrepResult, l as ArInfoCommand, m as ArInfoOptions, n as ArInfoResult, o as ArInsertCommand, p as ArLastItemsCommand, q as ArLastItemsOptions, r as ArLenCommand, s as ArMGetCommand, t as ArMSetCommand, u as ArMSetValues, v as ArNextCommand, w as ArOpCommand, x as ArOpOperation, y as ArRingCommand, z as ArScanCommand, B as ArScanOptions, C as ArSeekCommand, D as ArSetCommand, E as BitCountCommand, F as BitOpCommand, G as BitPosCommand, I as ClientSetInfoAttribute, J as ClientSetInfoCommand, K as CopyCommand, cL as CreateIndexParameters, cM as CreateVectorIndexParameters, L as DBSizeCommand, M as DecrByCommand, N as DecrCommand, O as DelCommand, P as EchoCommand, Q as EvalCommand, S as EvalROCommand, T as EvalshaCommand, U as EvalshaROCommand, V as ExistsCommand, W as ExpireAtCommand, X as ExpireCommand, Y as ExpireOption, cN as FlatIndexSchema, Z as FlushAllCommand, _ as FlushDBCommand, $ as GeoAddCommand, a0 as GeoAddCommandOptions, a1 as GeoDistCommand, a2 as GeoHashCommand, a3 as GeoMember, a4 as GeoPosCommand, a5 as GeoSearchCommand, a6 as GeoSearchStoreCommand, a7 as GetBitCommand, a8 as GetCommand, a9 as GetDelCommand, aa as GetExCommand, ab as GetRangeCommand, ac as GetSetCommand, ad as HDelCommand, ae as HExistsCommand, af as HExpireAtCommand, ag as HExpireCommand, ah as HExpireTimeCommand, ai as HGetAllCommand, aj as HGetCommand, ak as HGetDelCommand, al as HGetExCommand, am as HIncrByCommand, an as HIncrByFloatCommand, ao as HKeysCommand, ap as HLenCommand, aq as HMGetCommand, ar as HMSetCommand, as as HPExpireAtCommand, at as HPExpireCommand, au as HPExpireTimeCommand, av as HPTtlCommand, aw as HPersistCommand, ax as HRandFieldCommand, ay as HScanCommand, az as HSetCommand, aA as HSetExCommand, aB as HSetNXCommand, aC as HStrLenCommand, aD as HTtlCommand, aE as HValsCommand, aF as IncrByCommand, aG as IncrByFloatCommand, aH as IncrCommand, cO as InferFilterFromSchema, aI as JsonArrAppendCommand, aJ as JsonArrIndexCommand, aK as JsonArrInsertCommand, aL as JsonArrLenCommand, aM as JsonArrPopCommand, aN as JsonArrTrimCommand, aO as JsonClearCommand, aP as JsonDelCommand, aQ as JsonForgetCommand, aR as JsonGetCommand, aS as JsonMGetCommand, aT as JsonMergeCommand, aU as JsonNumIncrByCommand, aV as JsonNumMultByCommand, aW as JsonObjKeysCommand, aX as JsonObjLenCommand, aY as JsonRespCommand, aZ as JsonSetCommand, a_ as JsonStrAppendCommand, a$ as JsonStrLenCommand, b0 as JsonToggleCommand, b1 as JsonTypeCommand, b2 as KeysCommand, b3 as LIndexCommand, b4 as LInsertCommand, b5 as LLenCommand, b6 as LMoveCommand, b7 as LPopCommand, b8 as LPushCommand, b9 as LPushXCommand, ba as LRangeCommand, bb as LRemCommand, bc as LSetCommand, bd as LTrimCommand, be as MGetCommand, bf as MSetCommand, bg as MSetNXCommand, bh as PExpireAtCommand, bi as PExpireCommand, bj as PSetEXCommand, bk as PTtlCommand, bl as PersistCommand, bm as PingCommand, bn as Pipeline, bo as PublishCommand, cP as QueryResult, bp as RPopCommand, bq as RPushCommand, br as RPushXCommand, bs as RandomKeyCommand, bt as RenameCommand, bu as RenameNXCommand, bw as SAddCommand, bx as SCardCommand, by as SDiffCommand, bz as SDiffStoreCommand, bA as SInterCardCommand, bB as SInterCommand, bC as SInterStoreCommand, bD as SIsMemberCommand, bE as SMIsMemberCommand, bF as SMembersCommand, bG as SMoveCommand, bH as SPopCommand, bI as SRandMemberCommand, bJ as SRemCommand, bK as SScanCommand, bL as SUnionCommand, bM as SUnionStoreCommand, bN as ScanCommand, bO as ScanCommandOptions, bP as ScoreMember, bQ as ScriptExistsCommand, bR as ScriptFlushCommand, bS as ScriptLoadCommand, cQ as SearchIndex, cR as SearchIndexParameters, bT as SetBitCommand, bU as SetCommand, bV as SetCommandOptions, bW as SetExCommand, bX as SetNxCommand, bY as SetRangeCommand, bZ as StrLenCommand, b_ as TimeCommand, b$ as TouchCommand, c0 as TtlCommand, c1 as Type, c2 as TypeCommand, c3 as UnlinkCommand, c4 as UpstashRequest, c5 as UpstashResponse, c6 as VectorAddCommand, c7 as VectorCountCommand, c8 as VectorCreateCommand, cS as VectorCreateOptions, c9 as VectorDelCommand, ca as VectorDropCommand, cb as VectorGetCommand, cT as VectorIndex, cU as VectorIndexInfo, cV as VectorIndexParameters, cc as VectorInfoCommand, cW as VectorInput, cX as VectorMetric, cd as VectorQueryCommand, cY as VectorQueryOptions, cZ as VectorQueryProfile, c_ as VectorQueryResult, ce as XAckDelCommand, cf as XAddCommand, cg as XDelExCommand, ch as XRangeCommand, ci as ZAddCommand, cj as ZAddCommandOptions, ck as ZCardCommand, cl as ZCountCommand, cm as ZDiffStoreCommand, cn as ZIncrByCommand, co as ZInterStoreCommand, cp as ZInterStoreCommandOptions, cq as ZLexCountCommand, cr as ZMScoreCommand, cs as ZPopMaxCommand, ct as ZPopMinCommand, cu as ZRangeCommand, cv as ZRangeCommandOptions, cw as ZRankCommand, cx as ZRemCommand, cy as ZRemRangeByLexCommand, cz as ZRemRangeByRankCommand, cA as ZRemRangeByScoreCommand, cB as ZRevRankCommand, cC as ZScanCommand, cD as ZScoreCommand, cE as ZUnionCommand, cF as ZUnionCommandOptions, cG as ZUnionStoreCommand, cH as ZUnionStoreCommandOptions, cI as errors } from './error-
|
|
1
|
+
import { cJ as NumericField, cK as NestedIndexSchema, R as Redis$1, H as HttpClientConfig, a as RedisOptions, b as RequesterConfig, bv as Requester } from './error-BNzLTXJG.mjs';
|
|
2
|
+
export { A as AppendCommand, c as ArCountCommand, d as ArDelCommand, e as ArDelRangeCommand, f as ArGetCommand, g as ArGetRangeCommand, h as ArGrepCommand, i as ArGrepOptions, j as ArGrepPredicate, k as ArGrepResult, l as ArInfoCommand, m as ArInfoOptions, n as ArInfoResult, o as ArInsertCommand, p as ArLastItemsCommand, q as ArLastItemsOptions, r as ArLenCommand, s as ArMGetCommand, t as ArMSetCommand, u as ArMSetValues, v as ArNextCommand, w as ArOpCommand, x as ArOpOperation, y as ArRingCommand, z as ArScanCommand, B as ArScanOptions, C as ArSeekCommand, D as ArSetCommand, E as BitCountCommand, F as BitOpCommand, G as BitPosCommand, I as ClientSetInfoAttribute, J as ClientSetInfoCommand, K as CopyCommand, cL as CreateIndexParameters, cM as CreateVectorIndexParameters, L as DBSizeCommand, M as DecrByCommand, N as DecrCommand, O as DelCommand, P as EchoCommand, Q as EvalCommand, S as EvalROCommand, T as EvalshaCommand, U as EvalshaROCommand, V as ExistsCommand, W as ExpireAtCommand, X as ExpireCommand, Y as ExpireOption, cN as FlatIndexSchema, Z as FlushAllCommand, _ as FlushDBCommand, $ as GeoAddCommand, a0 as GeoAddCommandOptions, a1 as GeoDistCommand, a2 as GeoHashCommand, a3 as GeoMember, a4 as GeoPosCommand, a5 as GeoSearchCommand, a6 as GeoSearchStoreCommand, a7 as GetBitCommand, a8 as GetCommand, a9 as GetDelCommand, aa as GetExCommand, ab as GetRangeCommand, ac as GetSetCommand, ad as HDelCommand, ae as HExistsCommand, af as HExpireAtCommand, ag as HExpireCommand, ah as HExpireTimeCommand, ai as HGetAllCommand, aj as HGetCommand, ak as HGetDelCommand, al as HGetExCommand, am as HIncrByCommand, an as HIncrByFloatCommand, ao as HKeysCommand, ap as HLenCommand, aq as HMGetCommand, ar as HMSetCommand, as as HPExpireAtCommand, at as HPExpireCommand, au as HPExpireTimeCommand, av as HPTtlCommand, aw as HPersistCommand, ax as HRandFieldCommand, ay as HScanCommand, az as HSetCommand, aA as HSetExCommand, aB as HSetNXCommand, aC as HStrLenCommand, aD as HTtlCommand, aE as HValsCommand, aF as IncrByCommand, aG as IncrByFloatCommand, aH as IncrCommand, cO as InferFilterFromSchema, aI as JsonArrAppendCommand, aJ as JsonArrIndexCommand, aK as JsonArrInsertCommand, aL as JsonArrLenCommand, aM as JsonArrPopCommand, aN as JsonArrTrimCommand, aO as JsonClearCommand, aP as JsonDelCommand, aQ as JsonForgetCommand, aR as JsonGetCommand, aS as JsonMGetCommand, aT as JsonMergeCommand, aU as JsonNumIncrByCommand, aV as JsonNumMultByCommand, aW as JsonObjKeysCommand, aX as JsonObjLenCommand, aY as JsonRespCommand, aZ as JsonSetCommand, a_ as JsonStrAppendCommand, a$ as JsonStrLenCommand, b0 as JsonToggleCommand, b1 as JsonTypeCommand, b2 as KeysCommand, b3 as LIndexCommand, b4 as LInsertCommand, b5 as LLenCommand, b6 as LMoveCommand, b7 as LPopCommand, b8 as LPushCommand, b9 as LPushXCommand, ba as LRangeCommand, bb as LRemCommand, bc as LSetCommand, bd as LTrimCommand, be as MGetCommand, bf as MSetCommand, bg as MSetNXCommand, bh as PExpireAtCommand, bi as PExpireCommand, bj as PSetEXCommand, bk as PTtlCommand, bl as PersistCommand, bm as PingCommand, bn as Pipeline, bo as PublishCommand, cP as QueryResult, bp as RPopCommand, bq as RPushCommand, br as RPushXCommand, bs as RandomKeyCommand, bt as RenameCommand, bu as RenameNXCommand, bw as SAddCommand, bx as SCardCommand, by as SDiffCommand, bz as SDiffStoreCommand, bA as SInterCardCommand, bB as SInterCommand, bC as SInterStoreCommand, bD as SIsMemberCommand, bE as SMIsMemberCommand, bF as SMembersCommand, bG as SMoveCommand, bH as SPopCommand, bI as SRandMemberCommand, bJ as SRemCommand, bK as SScanCommand, bL as SUnionCommand, bM as SUnionStoreCommand, bN as ScanCommand, bO as ScanCommandOptions, bP as ScoreMember, bQ as ScriptExistsCommand, bR as ScriptFlushCommand, bS as ScriptLoadCommand, cQ as SearchIndex, cR as SearchIndexParameters, bT as SetBitCommand, bU as SetCommand, bV as SetCommandOptions, bW as SetExCommand, bX as SetNxCommand, bY as SetRangeCommand, bZ as StrLenCommand, b_ as TimeCommand, b$ as TouchCommand, c0 as TtlCommand, c1 as Type, c2 as TypeCommand, c3 as UnlinkCommand, c4 as UpstashRequest, c5 as UpstashResponse, c6 as VectorAddCommand, c7 as VectorCountCommand, c8 as VectorCreateCommand, cS as VectorCreateOptions, c9 as VectorDelCommand, ca as VectorDropCommand, cb as VectorGetCommand, cT as VectorIndex, cU as VectorIndexInfo, cV as VectorIndexParameters, cc as VectorInfoCommand, cW as VectorInput, cX as VectorMetric, cd as VectorQueryCommand, cY as VectorQueryOptions, cZ as VectorQueryProfile, c_ as VectorQueryResult, ce as XAckDelCommand, cf as XAddCommand, cg as XDelExCommand, ch as XRangeCommand, ci as ZAddCommand, cj as ZAddCommandOptions, ck as ZCardCommand, cl as ZCountCommand, cm as ZDiffStoreCommand, cn as ZIncrByCommand, co as ZInterStoreCommand, cp as ZInterStoreCommandOptions, cq as ZLexCountCommand, cr as ZMScoreCommand, cs as ZPopMaxCommand, ct as ZPopMinCommand, cu as ZRangeCommand, cv as ZRangeCommandOptions, cw as ZRankCommand, cx as ZRemCommand, cy as ZRemRangeByLexCommand, cz as ZRemRangeByRankCommand, cA as ZRemRangeByScoreCommand, cB as ZRevRankCommand, cC as ZScanCommand, cD as ZScoreCommand, cE as ZUnionCommand, cF as ZUnionCommandOptions, cG as ZUnionStoreCommand, cH as ZUnionStoreCommandOptions, cI as errors } from './error-BNzLTXJG.mjs';
|
|
3
3
|
|
|
4
4
|
type TextFieldBuild<TNoTokenize extends Record<"noTokenize", boolean>, TNoStem extends Record<"noStem", boolean>, TFrom extends Record<"from", string | null>> = TNoTokenize["noTokenize"] extends true ? {
|
|
5
5
|
type: "TEXT";
|
package/nodejs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cJ as NumericField, cK as NestedIndexSchema, R as Redis$1, H as HttpClientConfig, a as RedisOptions, b as RequesterConfig, bv as Requester } from './error-
|
|
2
|
-
export { A as AppendCommand, c as ArCountCommand, d as ArDelCommand, e as ArDelRangeCommand, f as ArGetCommand, g as ArGetRangeCommand, h as ArGrepCommand, i as ArGrepOptions, j as ArGrepPredicate, k as ArGrepResult, l as ArInfoCommand, m as ArInfoOptions, n as ArInfoResult, o as ArInsertCommand, p as ArLastItemsCommand, q as ArLastItemsOptions, r as ArLenCommand, s as ArMGetCommand, t as ArMSetCommand, u as ArMSetValues, v as ArNextCommand, w as ArOpCommand, x as ArOpOperation, y as ArRingCommand, z as ArScanCommand, B as ArScanOptions, C as ArSeekCommand, D as ArSetCommand, E as BitCountCommand, F as BitOpCommand, G as BitPosCommand, I as ClientSetInfoAttribute, J as ClientSetInfoCommand, K as CopyCommand, cL as CreateIndexParameters, cM as CreateVectorIndexParameters, L as DBSizeCommand, M as DecrByCommand, N as DecrCommand, O as DelCommand, P as EchoCommand, Q as EvalCommand, S as EvalROCommand, T as EvalshaCommand, U as EvalshaROCommand, V as ExistsCommand, W as ExpireAtCommand, X as ExpireCommand, Y as ExpireOption, cN as FlatIndexSchema, Z as FlushAllCommand, _ as FlushDBCommand, $ as GeoAddCommand, a0 as GeoAddCommandOptions, a1 as GeoDistCommand, a2 as GeoHashCommand, a3 as GeoMember, a4 as GeoPosCommand, a5 as GeoSearchCommand, a6 as GeoSearchStoreCommand, a7 as GetBitCommand, a8 as GetCommand, a9 as GetDelCommand, aa as GetExCommand, ab as GetRangeCommand, ac as GetSetCommand, ad as HDelCommand, ae as HExistsCommand, af as HExpireAtCommand, ag as HExpireCommand, ah as HExpireTimeCommand, ai as HGetAllCommand, aj as HGetCommand, ak as HGetDelCommand, al as HGetExCommand, am as HIncrByCommand, an as HIncrByFloatCommand, ao as HKeysCommand, ap as HLenCommand, aq as HMGetCommand, ar as HMSetCommand, as as HPExpireAtCommand, at as HPExpireCommand, au as HPExpireTimeCommand, av as HPTtlCommand, aw as HPersistCommand, ax as HRandFieldCommand, ay as HScanCommand, az as HSetCommand, aA as HSetExCommand, aB as HSetNXCommand, aC as HStrLenCommand, aD as HTtlCommand, aE as HValsCommand, aF as IncrByCommand, aG as IncrByFloatCommand, aH as IncrCommand, cO as InferFilterFromSchema, aI as JsonArrAppendCommand, aJ as JsonArrIndexCommand, aK as JsonArrInsertCommand, aL as JsonArrLenCommand, aM as JsonArrPopCommand, aN as JsonArrTrimCommand, aO as JsonClearCommand, aP as JsonDelCommand, aQ as JsonForgetCommand, aR as JsonGetCommand, aS as JsonMGetCommand, aT as JsonMergeCommand, aU as JsonNumIncrByCommand, aV as JsonNumMultByCommand, aW as JsonObjKeysCommand, aX as JsonObjLenCommand, aY as JsonRespCommand, aZ as JsonSetCommand, a_ as JsonStrAppendCommand, a$ as JsonStrLenCommand, b0 as JsonToggleCommand, b1 as JsonTypeCommand, b2 as KeysCommand, b3 as LIndexCommand, b4 as LInsertCommand, b5 as LLenCommand, b6 as LMoveCommand, b7 as LPopCommand, b8 as LPushCommand, b9 as LPushXCommand, ba as LRangeCommand, bb as LRemCommand, bc as LSetCommand, bd as LTrimCommand, be as MGetCommand, bf as MSetCommand, bg as MSetNXCommand, bh as PExpireAtCommand, bi as PExpireCommand, bj as PSetEXCommand, bk as PTtlCommand, bl as PersistCommand, bm as PingCommand, bn as Pipeline, bo as PublishCommand, cP as QueryResult, bp as RPopCommand, bq as RPushCommand, br as RPushXCommand, bs as RandomKeyCommand, bt as RenameCommand, bu as RenameNXCommand, bw as SAddCommand, bx as SCardCommand, by as SDiffCommand, bz as SDiffStoreCommand, bA as SInterCardCommand, bB as SInterCommand, bC as SInterStoreCommand, bD as SIsMemberCommand, bE as SMIsMemberCommand, bF as SMembersCommand, bG as SMoveCommand, bH as SPopCommand, bI as SRandMemberCommand, bJ as SRemCommand, bK as SScanCommand, bL as SUnionCommand, bM as SUnionStoreCommand, bN as ScanCommand, bO as ScanCommandOptions, bP as ScoreMember, bQ as ScriptExistsCommand, bR as ScriptFlushCommand, bS as ScriptLoadCommand, cQ as SearchIndex, cR as SearchIndexParameters, bT as SetBitCommand, bU as SetCommand, bV as SetCommandOptions, bW as SetExCommand, bX as SetNxCommand, bY as SetRangeCommand, bZ as StrLenCommand, b_ as TimeCommand, b$ as TouchCommand, c0 as TtlCommand, c1 as Type, c2 as TypeCommand, c3 as UnlinkCommand, c4 as UpstashRequest, c5 as UpstashResponse, c6 as VectorAddCommand, c7 as VectorCountCommand, c8 as VectorCreateCommand, cS as VectorCreateOptions, c9 as VectorDelCommand, ca as VectorDropCommand, cb as VectorGetCommand, cT as VectorIndex, cU as VectorIndexInfo, cV as VectorIndexParameters, cc as VectorInfoCommand, cW as VectorInput, cX as VectorMetric, cd as VectorQueryCommand, cY as VectorQueryOptions, cZ as VectorQueryProfile, c_ as VectorQueryResult, ce as XAckDelCommand, cf as XAddCommand, cg as XDelExCommand, ch as XRangeCommand, ci as ZAddCommand, cj as ZAddCommandOptions, ck as ZCardCommand, cl as ZCountCommand, cm as ZDiffStoreCommand, cn as ZIncrByCommand, co as ZInterStoreCommand, cp as ZInterStoreCommandOptions, cq as ZLexCountCommand, cr as ZMScoreCommand, cs as ZPopMaxCommand, ct as ZPopMinCommand, cu as ZRangeCommand, cv as ZRangeCommandOptions, cw as ZRankCommand, cx as ZRemCommand, cy as ZRemRangeByLexCommand, cz as ZRemRangeByRankCommand, cA as ZRemRangeByScoreCommand, cB as ZRevRankCommand, cC as ZScanCommand, cD as ZScoreCommand, cE as ZUnionCommand, cF as ZUnionCommandOptions, cG as ZUnionStoreCommand, cH as ZUnionStoreCommandOptions, cI as errors } from './error-
|
|
1
|
+
import { cJ as NumericField, cK as NestedIndexSchema, R as Redis$1, H as HttpClientConfig, a as RedisOptions, b as RequesterConfig, bv as Requester } from './error-BNzLTXJG.js';
|
|
2
|
+
export { A as AppendCommand, c as ArCountCommand, d as ArDelCommand, e as ArDelRangeCommand, f as ArGetCommand, g as ArGetRangeCommand, h as ArGrepCommand, i as ArGrepOptions, j as ArGrepPredicate, k as ArGrepResult, l as ArInfoCommand, m as ArInfoOptions, n as ArInfoResult, o as ArInsertCommand, p as ArLastItemsCommand, q as ArLastItemsOptions, r as ArLenCommand, s as ArMGetCommand, t as ArMSetCommand, u as ArMSetValues, v as ArNextCommand, w as ArOpCommand, x as ArOpOperation, y as ArRingCommand, z as ArScanCommand, B as ArScanOptions, C as ArSeekCommand, D as ArSetCommand, E as BitCountCommand, F as BitOpCommand, G as BitPosCommand, I as ClientSetInfoAttribute, J as ClientSetInfoCommand, K as CopyCommand, cL as CreateIndexParameters, cM as CreateVectorIndexParameters, L as DBSizeCommand, M as DecrByCommand, N as DecrCommand, O as DelCommand, P as EchoCommand, Q as EvalCommand, S as EvalROCommand, T as EvalshaCommand, U as EvalshaROCommand, V as ExistsCommand, W as ExpireAtCommand, X as ExpireCommand, Y as ExpireOption, cN as FlatIndexSchema, Z as FlushAllCommand, _ as FlushDBCommand, $ as GeoAddCommand, a0 as GeoAddCommandOptions, a1 as GeoDistCommand, a2 as GeoHashCommand, a3 as GeoMember, a4 as GeoPosCommand, a5 as GeoSearchCommand, a6 as GeoSearchStoreCommand, a7 as GetBitCommand, a8 as GetCommand, a9 as GetDelCommand, aa as GetExCommand, ab as GetRangeCommand, ac as GetSetCommand, ad as HDelCommand, ae as HExistsCommand, af as HExpireAtCommand, ag as HExpireCommand, ah as HExpireTimeCommand, ai as HGetAllCommand, aj as HGetCommand, ak as HGetDelCommand, al as HGetExCommand, am as HIncrByCommand, an as HIncrByFloatCommand, ao as HKeysCommand, ap as HLenCommand, aq as HMGetCommand, ar as HMSetCommand, as as HPExpireAtCommand, at as HPExpireCommand, au as HPExpireTimeCommand, av as HPTtlCommand, aw as HPersistCommand, ax as HRandFieldCommand, ay as HScanCommand, az as HSetCommand, aA as HSetExCommand, aB as HSetNXCommand, aC as HStrLenCommand, aD as HTtlCommand, aE as HValsCommand, aF as IncrByCommand, aG as IncrByFloatCommand, aH as IncrCommand, cO as InferFilterFromSchema, aI as JsonArrAppendCommand, aJ as JsonArrIndexCommand, aK as JsonArrInsertCommand, aL as JsonArrLenCommand, aM as JsonArrPopCommand, aN as JsonArrTrimCommand, aO as JsonClearCommand, aP as JsonDelCommand, aQ as JsonForgetCommand, aR as JsonGetCommand, aS as JsonMGetCommand, aT as JsonMergeCommand, aU as JsonNumIncrByCommand, aV as JsonNumMultByCommand, aW as JsonObjKeysCommand, aX as JsonObjLenCommand, aY as JsonRespCommand, aZ as JsonSetCommand, a_ as JsonStrAppendCommand, a$ as JsonStrLenCommand, b0 as JsonToggleCommand, b1 as JsonTypeCommand, b2 as KeysCommand, b3 as LIndexCommand, b4 as LInsertCommand, b5 as LLenCommand, b6 as LMoveCommand, b7 as LPopCommand, b8 as LPushCommand, b9 as LPushXCommand, ba as LRangeCommand, bb as LRemCommand, bc as LSetCommand, bd as LTrimCommand, be as MGetCommand, bf as MSetCommand, bg as MSetNXCommand, bh as PExpireAtCommand, bi as PExpireCommand, bj as PSetEXCommand, bk as PTtlCommand, bl as PersistCommand, bm as PingCommand, bn as Pipeline, bo as PublishCommand, cP as QueryResult, bp as RPopCommand, bq as RPushCommand, br as RPushXCommand, bs as RandomKeyCommand, bt as RenameCommand, bu as RenameNXCommand, bw as SAddCommand, bx as SCardCommand, by as SDiffCommand, bz as SDiffStoreCommand, bA as SInterCardCommand, bB as SInterCommand, bC as SInterStoreCommand, bD as SIsMemberCommand, bE as SMIsMemberCommand, bF as SMembersCommand, bG as SMoveCommand, bH as SPopCommand, bI as SRandMemberCommand, bJ as SRemCommand, bK as SScanCommand, bL as SUnionCommand, bM as SUnionStoreCommand, bN as ScanCommand, bO as ScanCommandOptions, bP as ScoreMember, bQ as ScriptExistsCommand, bR as ScriptFlushCommand, bS as ScriptLoadCommand, cQ as SearchIndex, cR as SearchIndexParameters, bT as SetBitCommand, bU as SetCommand, bV as SetCommandOptions, bW as SetExCommand, bX as SetNxCommand, bY as SetRangeCommand, bZ as StrLenCommand, b_ as TimeCommand, b$ as TouchCommand, c0 as TtlCommand, c1 as Type, c2 as TypeCommand, c3 as UnlinkCommand, c4 as UpstashRequest, c5 as UpstashResponse, c6 as VectorAddCommand, c7 as VectorCountCommand, c8 as VectorCreateCommand, cS as VectorCreateOptions, c9 as VectorDelCommand, ca as VectorDropCommand, cb as VectorGetCommand, cT as VectorIndex, cU as VectorIndexInfo, cV as VectorIndexParameters, cc as VectorInfoCommand, cW as VectorInput, cX as VectorMetric, cd as VectorQueryCommand, cY as VectorQueryOptions, cZ as VectorQueryProfile, c_ as VectorQueryResult, ce as XAckDelCommand, cf as XAddCommand, cg as XDelExCommand, ch as XRangeCommand, ci as ZAddCommand, cj as ZAddCommandOptions, ck as ZCardCommand, cl as ZCountCommand, cm as ZDiffStoreCommand, cn as ZIncrByCommand, co as ZInterStoreCommand, cp as ZInterStoreCommandOptions, cq as ZLexCountCommand, cr as ZMScoreCommand, cs as ZPopMaxCommand, ct as ZPopMinCommand, cu as ZRangeCommand, cv as ZRangeCommandOptions, cw as ZRankCommand, cx as ZRemCommand, cy as ZRemRangeByLexCommand, cz as ZRemRangeByRankCommand, cA as ZRemRangeByScoreCommand, cB as ZRevRankCommand, cC as ZScanCommand, cD as ZScoreCommand, cE as ZUnionCommand, cF as ZUnionCommandOptions, cG as ZUnionStoreCommand, cH as ZUnionStoreCommandOptions, cI as errors } from './error-BNzLTXJG.js';
|
|
3
3
|
|
|
4
4
|
type TextFieldBuild<TNoTokenize extends Record<"noTokenize", boolean>, TNoStem extends Record<"noStem", boolean>, TFrom extends Record<"from", string | null>> = TNoTokenize["noTokenize"] extends true ? {
|
|
5
5
|
type: "TEXT";
|
package/nodejs.js
CHANGED
|
@@ -58,6 +58,12 @@ var UpstashJSONParseError = class extends UpstashError {
|
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
// pkg/util.ts
|
|
61
|
+
function parseJSON(value) {
|
|
62
|
+
return JSON.parse(stripBOM(value));
|
|
63
|
+
}
|
|
64
|
+
function stripBOM(value) {
|
|
65
|
+
return typeof value === "string" && value.startsWith("\uFEFF") ? value.slice(1) : value;
|
|
66
|
+
}
|
|
61
67
|
function parseRecursive(obj) {
|
|
62
68
|
const parsed = Array.isArray(obj) ? obj.map((o) => {
|
|
63
69
|
try {
|
|
@@ -65,8 +71,8 @@ function parseRecursive(obj) {
|
|
|
65
71
|
} catch {
|
|
66
72
|
return o;
|
|
67
73
|
}
|
|
68
|
-
}) :
|
|
69
|
-
if (typeof parsed === "number" && parsed.toString() !== obj) {
|
|
74
|
+
}) : parseJSON(obj);
|
|
75
|
+
if (typeof parsed === "number" && parsed.toString() !== stripBOM(obj)) {
|
|
70
76
|
return obj;
|
|
71
77
|
}
|
|
72
78
|
return parsed;
|
|
@@ -125,8 +131,7 @@ var HttpClient = class {
|
|
|
125
131
|
this.options = {
|
|
126
132
|
backend: config.options?.backend,
|
|
127
133
|
agent: config.agent,
|
|
128
|
-
responseEncoding: config.responseEncoding ??
|
|
129
|
-
// default to base64
|
|
134
|
+
responseEncoding: config.responseEncoding ?? false,
|
|
130
135
|
cache: config.cache,
|
|
131
136
|
signal: config.signal,
|
|
132
137
|
keepAlive: config.keepAlive ?? true
|
|
@@ -199,12 +204,14 @@ var HttpClient = class {
|
|
|
199
204
|
if (requestOptions.signal?.aborted && isSignalFunction) {
|
|
200
205
|
throw error_;
|
|
201
206
|
} else if (requestOptions.signal?.aborted) {
|
|
207
|
+
const reason = requestOptions.signal.reason;
|
|
202
208
|
const myBlob = new Blob([
|
|
203
|
-
|
|
209
|
+
// Error reasons (e.g. the default DOMException) would serialize to an empty object
|
|
210
|
+
JSON.stringify({ result: reason instanceof Error ? null : reason ?? null })
|
|
204
211
|
]);
|
|
205
212
|
const myOptions = {
|
|
206
213
|
status: 200,
|
|
207
|
-
statusText:
|
|
214
|
+
statusText: "Aborted"
|
|
208
215
|
};
|
|
209
216
|
res = new Response(myBlob, myOptions);
|
|
210
217
|
break;
|
|
@@ -1254,7 +1261,7 @@ var GeoSearchCommand = class extends Command {
|
|
|
1254
1261
|
if (!opts?.withCoord && !opts?.withDist && !opts?.withHash) {
|
|
1255
1262
|
return result.map((member) => {
|
|
1256
1263
|
try {
|
|
1257
|
-
return { member:
|
|
1264
|
+
return { member: parseJSON(member) };
|
|
1258
1265
|
} catch {
|
|
1259
1266
|
return { member };
|
|
1260
1267
|
}
|
|
@@ -1264,7 +1271,7 @@ var GeoSearchCommand = class extends Command {
|
|
|
1264
1271
|
let counter = 1;
|
|
1265
1272
|
const obj = {};
|
|
1266
1273
|
try {
|
|
1267
|
-
obj.member =
|
|
1274
|
+
obj.member = parseJSON(members[0]);
|
|
1268
1275
|
} catch {
|
|
1269
1276
|
obj.member = members[0];
|
|
1270
1277
|
}
|
|
@@ -1526,7 +1533,7 @@ function deserialize3(result) {
|
|
|
1526
1533
|
const value = result[i + 1];
|
|
1527
1534
|
try {
|
|
1528
1535
|
const valueIsNumberAndNotSafeInteger = !Number.isNaN(Number(value)) && !Number.isSafeInteger(Number(value));
|
|
1529
|
-
obj[key] = valueIsNumberAndNotSafeInteger ? value :
|
|
1536
|
+
obj[key] = valueIsNumberAndNotSafeInteger ? value : parseJSON(value);
|
|
1530
1537
|
} catch {
|
|
1531
1538
|
obj[key] = value;
|
|
1532
1539
|
}
|
|
@@ -1550,7 +1557,7 @@ function deserialize4(fields, result) {
|
|
|
1550
1557
|
const obj = {};
|
|
1551
1558
|
for (const [i, field] of fields.entries()) {
|
|
1552
1559
|
try {
|
|
1553
|
-
obj[field] =
|
|
1560
|
+
obj[field] = parseJSON(result[i]);
|
|
1554
1561
|
} catch {
|
|
1555
1562
|
obj[field] = result[i];
|
|
1556
1563
|
}
|
|
@@ -1644,7 +1651,7 @@ function deserialize5(result) {
|
|
|
1644
1651
|
const key = result[i];
|
|
1645
1652
|
const value = result[i + 1];
|
|
1646
1653
|
try {
|
|
1647
|
-
obj[key] =
|
|
1654
|
+
obj[key] = parseJSON(value);
|
|
1648
1655
|
} catch {
|
|
1649
1656
|
obj[key] = value;
|
|
1650
1657
|
}
|
|
@@ -2836,7 +2843,7 @@ function deserialize6(result) {
|
|
|
2836
2843
|
const field = entries[j];
|
|
2837
2844
|
const value = entries[j + 1];
|
|
2838
2845
|
try {
|
|
2839
|
-
obj[streamId][field] =
|
|
2846
|
+
obj[streamId][field] = parseJSON(value);
|
|
2840
2847
|
} catch {
|
|
2841
2848
|
obj[streamId][field] = value;
|
|
2842
2849
|
}
|
|
@@ -2933,7 +2940,7 @@ function deserialize7(result) {
|
|
|
2933
2940
|
const field = entries[j];
|
|
2934
2941
|
const value = entries[j + 1];
|
|
2935
2942
|
try {
|
|
2936
|
-
obj[streamId][field] =
|
|
2943
|
+
obj[streamId][field] = parseJSON(value);
|
|
2937
2944
|
} catch {
|
|
2938
2945
|
obj[streamId][field] = value;
|
|
2939
2946
|
}
|
|
@@ -6059,7 +6066,7 @@ var Redis = class {
|
|
|
6059
6066
|
};
|
|
6060
6067
|
|
|
6061
6068
|
// version.ts
|
|
6062
|
-
var VERSION = "v1.
|
|
6069
|
+
var VERSION = "v1.40.0";
|
|
6063
6070
|
|
|
6064
6071
|
// pkg/commands/search/schema-builder.ts
|
|
6065
6072
|
var BUILD = /* @__PURE__ */ Symbol("build");
|
package/nodejs.mjs
CHANGED