@upstash/redis 0.0.0-ci.fbd851d5174af0f471e681ec296b0b4802b3b460 → 0.0.0-ci.fbead4fb2ed281bdc04ec90c263e6380eed1465b-20251021062126

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/cloudflare.mjs CHANGED
@@ -1 +1,93 @@
1
- import{a as n,b as o,c as i}from"./chunk-I4N2IZLH.mjs";var a=class S extends o{constructor(e,r){(e.url.startsWith(" ")||e.url.endsWith(" ")||/\r|\n/.test(e.url))&&console.warn("The redis url contains whitespace or newline, which can cause errors!"),(e.token.startsWith(" ")||e.token.endsWith(" ")||/\r|\n/.test(e.token))&&console.warn("The redis token contains whitespace or newline, which can cause errors!");let t=new n({retry:e.retry,baseUrl:e.url,headers:{authorization:`Bearer ${e.token}`},responseEncoding:e.responseEncoding});super(t,{enableTelemetry:!r?.UPSTASH_DISABLE_TELEMETRY,automaticDeserialization:e.automaticDeserialization}),this.addTelemetry({platform:"cloudflare",sdk:`@upstash/redis@${i}`})}static fromEnv(e,r){let t=e?.UPSTASH_REDIS_REST_URL??UPSTASH_REDIS_REST_URL,s=e?.UPSTASH_REDIS_REST_TOKEN??UPSTASH_REDIS_REST_TOKEN;if(!t)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_URL`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_URL`");if(!s)throw new Error("Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_TOKEN`");return new S({...r,url:t,token:s},e)}};export{a as Redis};
1
+ import {
2
+ HttpClient,
3
+ Redis,
4
+ VERSION,
5
+ error_exports
6
+ } from "./chunk-WTYE7OV3.mjs";
7
+
8
+ // platforms/cloudflare.ts
9
+ var Redis2 = class _Redis extends Redis {
10
+ /**
11
+ * Create a new redis client
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * const redis = new Redis({
16
+ * url: "<UPSTASH_REDIS_REST_URL>",
17
+ * token: "<UPSTASH_REDIS_REST_TOKEN>",
18
+ * });
19
+ * ```
20
+ */
21
+ constructor(config, env) {
22
+ if (!config.url) {
23
+ console.warn(
24
+ `[Upstash Redis] The 'url' property is missing or undefined in your Redis config.`
25
+ );
26
+ } else if (config.url.startsWith(" ") || config.url.endsWith(" ") || /\r|\n/.test(config.url)) {
27
+ console.warn(
28
+ "[Upstash Redis] The redis url contains whitespace or newline, which can cause errors!"
29
+ );
30
+ }
31
+ if (!config.token) {
32
+ console.warn(
33
+ `[Upstash Redis] The 'token' property is missing or undefined in your Redis config.`
34
+ );
35
+ } else if (config.token.startsWith(" ") || config.token.endsWith(" ") || /\r|\n/.test(config.token)) {
36
+ console.warn(
37
+ "[Upstash Redis] The redis token contains whitespace or newline, which can cause errors!"
38
+ );
39
+ }
40
+ const client = new HttpClient({
41
+ retry: config.retry,
42
+ baseUrl: config.url,
43
+ headers: { authorization: `Bearer ${config.token}` },
44
+ responseEncoding: config.responseEncoding,
45
+ signal: config.signal,
46
+ keepAlive: config.keepAlive,
47
+ readYourWrites: config.readYourWrites
48
+ });
49
+ super(client, {
50
+ enableTelemetry: config.enableTelemetry ?? !env?.UPSTASH_DISABLE_TELEMETRY,
51
+ automaticDeserialization: config.automaticDeserialization,
52
+ latencyLogging: config.latencyLogging,
53
+ enableAutoPipelining: config.enableAutoPipelining
54
+ });
55
+ this.addTelemetry({
56
+ platform: "cloudflare",
57
+ sdk: `@upstash/redis@${VERSION}`
58
+ });
59
+ if (this.enableAutoPipelining) {
60
+ return this.autoPipeline();
61
+ }
62
+ }
63
+ /*
64
+ * Create a new Upstash Redis instance from environment variables on cloudflare.
65
+ *
66
+ * This tries to load `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN` from
67
+ * the global namespace
68
+ *
69
+ * If you are using a module worker, please pass in the `env` object.
70
+ * ```ts
71
+ * const redis = Redis.fromEnv(env)
72
+ * ```
73
+ */
74
+ static fromEnv(env, opts) {
75
+ const url = env?.UPSTASH_REDIS_REST_URL ?? UPSTASH_REDIS_REST_URL;
76
+ const token = env?.UPSTASH_REDIS_REST_TOKEN ?? UPSTASH_REDIS_REST_TOKEN;
77
+ if (!url) {
78
+ console.warn(
79
+ "[Upstash Redis] Unable to find environment variable: `UPSTASH_REDIS_REST_URL`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_URL`"
80
+ );
81
+ }
82
+ if (!token) {
83
+ console.warn(
84
+ "[Upstash Redis] Unable to find environment variable: `UPSTASH_REDIS_REST_TOKEN`. Please add it via `wrangler secret put UPSTASH_REDIS_REST_TOKEN`"
85
+ );
86
+ }
87
+ return new _Redis({ ...opts, url, token }, env);
88
+ }
89
+ };
90
+ export {
91
+ Redis2 as Redis,
92
+ error_exports as errors
93
+ };
package/fastly.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-10fd3773.js';
2
- export { A as AppendCommand, B as BitCountCommand, e as BitOpCommand, f as BitPosCommand, C as CopyCommand, D as DBSizeCommand, h as DecrByCommand, g as DecrCommand, i as DelCommand, E as EchoCommand, j as EvalCommand, k as EvalshaCommand, l as ExistsCommand, n as ExpireAtCommand, m as ExpireCommand, F as FlushAllCommand, o as FlushDBCommand, G as GeoAddCommand, p as GeoAddCommandOptions, r as GeoDistCommand, s as GeoHashCommand, q as GeoMember, t as GeoPosCommand, u as GeoSearchCommand, v as GeoSearchStoreCommand, x as GetBitCommand, w as GetCommand, y as GetDelCommand, z as GetRangeCommand, H as GetSetCommand, I as HDelCommand, J as HExistsCommand, L as HGetAllCommand, K as HGetCommand, M as HIncrByCommand, N as HIncrByFloatCommand, O as HKeysCommand, P as HLenCommand, Q as HMGetCommand, S as HMSetCommand, T as HRandFieldCommand, V as HScanCommand, W as HSetCommand, X as HSetNXCommand, Y as HStrLenCommand, Z as HValsCommand, $ as IncrByCommand, a0 as IncrByFloatCommand, _ as IncrCommand, a1 as JsonArrAppendCommand, a2 as JsonArrIndexCommand, a3 as JsonArrInsertCommand, a4 as JsonArrLenCommand, a5 as JsonArrPopCommand, a6 as JsonArrTrimCommand, a7 as JsonClearCommand, a8 as JsonDelCommand, a9 as JsonForgetCommand, aa as JsonGetCommand, ab as JsonMGetCommand, ac as JsonNumIncrByCommand, ad as JsonNumMultByCommand, ae as JsonObjKeysCommand, af as JsonObjLenCommand, ag as JsonRespCommand, ah as JsonSetCommand, ai as JsonStrAppendCommand, aj as JsonStrLenCommand, ak as JsonToggleCommand, al as JsonTypeCommand, am as KeysCommand, an as LIndexCommand, ao as LInsertCommand, ap as LLenCommand, aq as LMoveCommand, ar as LPopCommand, as as LPushCommand, at as LPushXCommand, au as LRangeCommand, av as LRemCommand, aw as LSetCommand, ax as LTrimCommand, ay as MGetCommand, az as MSetCommand, aA as MSetNXCommand, aD as PExpireAtCommand, aC as PExpireCommand, aF as PSetEXCommand, aG as PTtlCommand, aB as PersistCommand, aE as PingCommand, aH as PublishCommand, aL as RPopCommand, aM as RPushCommand, aN as RPushXCommand, aI as RandomKeyCommand, aJ as RenameCommand, aK as RenameNXCommand, c as Requester, aO as SAddCommand, aR as SCardCommand, aV as SDiffCommand, aW as SDiffStoreCommand, b1 as SInterCommand, b2 as SInterStoreCommand, b3 as SIsMemberCommand, b5 as SMIsMemberCommand, b4 as SMembersCommand, b6 as SMoveCommand, b7 as SPopCommand, b8 as SRandMemberCommand, b9 as SRemCommand, ba as SScanCommand, bc as SUnionCommand, bd as SUnionStoreCommand, aP as ScanCommand, aQ as ScanCommandOptions, bm as ScoreMember, aS as ScriptExistsCommand, aT as ScriptFlushCommand, aU as ScriptLoadCommand, aZ as SetBitCommand, aX as SetCommand, aY as SetCommandOptions, a_ as SetExCommand, a$ as SetNxCommand, b0 as SetRangeCommand, bb as StrLenCommand, be as TimeCommand, bf as TouchCommand, bg as TtlCommand, bh as Type, bi as TypeCommand, bj as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bk as XAddCommand, bl as XRangeCommand, bp as ZAddCommand, bn as ZAddCommandOptions, bo as ZAddCommandOptionsWithIncr, bq as ZCardCommand, br as ZCountCommand, bs as ZDiffStoreCommand, bt as ZIncrByCommand, bu as ZInterStoreCommand, bv as ZInterStoreCommandOptions, bw as ZLexCountCommand, bx as ZMScoreCommand, by as ZPopMaxCommand, bz as ZPopMinCommand, bA as ZRangeCommand, bB as ZRangeCommandOptions, bC as ZRankCommand, bD as ZRemCommand, bE as ZRemRangeByLexCommand, bF as ZRemRangeByRankCommand, bG as ZRemRangeByScoreCommand, bH as ZRevRankCommand, bI as ZScanCommand, bJ as ZScoreCommand, bK as ZUnionCommand, bL as ZUnionCommandOptions, bM as ZUnionStoreCommand, bN as ZUnionStoreCommandOptions } from './zmscore-10fd3773.js';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-Cq_Bzgy4.mjs';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, l as EvalCommand, k as EvalROCommand, n as EvalshaCommand, m as EvalshaROCommand, o as ExistsCommand, r as ExpireAtCommand, p as ExpireCommand, q as ExpireOption, F as FlushAllCommand, s as FlushDBCommand, G as GeoAddCommand, t as GeoAddCommandOptions, v as GeoDistCommand, w as GeoHashCommand, u as GeoMember, x as GeoPosCommand, y as GeoSearchCommand, z as GeoSearchStoreCommand, J as GetBitCommand, I as GetCommand, K as GetDelCommand, L as GetExCommand, M as GetRangeCommand, N as GetSetCommand, O as HDelCommand, Q as HExistsCommand, T as HExpireAtCommand, S as HExpireCommand, V as HExpireTimeCommand, a1 as HGetAllCommand, a0 as HGetCommand, a2 as HIncrByCommand, a3 as HIncrByFloatCommand, a4 as HKeysCommand, a5 as HLenCommand, a6 as HMGetCommand, a7 as HMSetCommand, Y as HPExpireAtCommand, X as HPExpireCommand, Z as HPExpireTimeCommand, _ as HPTtlCommand, $ as HPersistCommand, a8 as HRandFieldCommand, a9 as HScanCommand, aa as HSetCommand, ab as HSetNXCommand, ac as HStrLenCommand, W as HTtlCommand, ad as HValsCommand, af as IncrByCommand, ag as IncrByFloatCommand, ae as IncrCommand, ah as JsonArrAppendCommand, ai as JsonArrIndexCommand, aj as JsonArrInsertCommand, ak as JsonArrLenCommand, al as JsonArrPopCommand, am as JsonArrTrimCommand, an as JsonClearCommand, ao as JsonDelCommand, ap as JsonForgetCommand, aq as JsonGetCommand, as as JsonMGetCommand, ar as JsonMergeCommand, at as JsonNumIncrByCommand, au as JsonNumMultByCommand, av as JsonObjKeysCommand, aw as JsonObjLenCommand, ax as JsonRespCommand, ay as JsonSetCommand, az as JsonStrAppendCommand, aA as JsonStrLenCommand, aB as JsonToggleCommand, aC as JsonTypeCommand, aD as KeysCommand, aE as LIndexCommand, aF as LInsertCommand, aG as LLenCommand, aH as LMoveCommand, aI as LPopCommand, aJ as LPushCommand, aK as LPushXCommand, aL as LRangeCommand, aM as LRemCommand, aN as LSetCommand, aO as LTrimCommand, aP as MGetCommand, aQ as MSetCommand, aR as MSetNXCommand, aU as PExpireAtCommand, aT as PExpireCommand, aW as PSetEXCommand, aX as PTtlCommand, aS as PersistCommand, aV as PingCommand, P as Pipeline, aY as PublishCommand, b0 as RPopCommand, b1 as RPushCommand, b2 as RPushXCommand, aZ as RandomKeyCommand, a_ as RenameCommand, a$ as RenameNXCommand, d as Requester, b3 as SAddCommand, b6 as SCardCommand, ba as SDiffCommand, bb as SDiffStoreCommand, bi as SInterCommand, bj as SInterStoreCommand, bk as SIsMemberCommand, bm as SMIsMemberCommand, bl as SMembersCommand, bn as SMoveCommand, bo as SPopCommand, bp as SRandMemberCommand, bq as SRemCommand, br as SScanCommand, bt as SUnionCommand, bu as SUnionStoreCommand, b4 as ScanCommand, b5 as ScanCommandOptions, bD as ScoreMember, b7 as ScriptExistsCommand, b8 as ScriptFlushCommand, b9 as ScriptLoadCommand, be as SetBitCommand, bc as SetCommand, bd as SetCommandOptions, bf as SetExCommand, bg as SetNxCommand, bh as SetRangeCommand, bs as StrLenCommand, bv as TimeCommand, bw as TouchCommand, bx as TtlCommand, by as Type, bz as TypeCommand, bA as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bB as XAddCommand, bC as XRangeCommand, bF as ZAddCommand, bE as ZAddCommandOptions, bG as ZCardCommand, bH as ZCountCommand, bI as ZDiffStoreCommand, bJ as ZIncrByCommand, bK as ZInterStoreCommand, bL as ZInterStoreCommandOptions, bM as ZLexCountCommand, bN as ZMScoreCommand, bO as ZPopMaxCommand, bP as ZPopMinCommand, bQ as ZRangeCommand, bR as ZRangeCommandOptions, bS as ZRankCommand, bT as ZRemCommand, bU as ZRemRangeByLexCommand, bV as ZRemRangeByRankCommand, bW as ZRemRangeByScoreCommand, bX as ZRevRankCommand, bY as ZScanCommand, bZ as ZScoreCommand, b_ as ZUnionCommand, b$ as ZUnionCommandOptions, c0 as ZUnionStoreCommand, c1 as ZUnionStoreCommandOptions, e as errors } from './zmscore-Cq_Bzgy4.mjs';
3
3
 
4
4
  /**
5
5
  * Connection credentials for upstash redis.
@@ -9,17 +9,22 @@ type RedisConfigFastly = {
9
9
  /**
10
10
  * UPSTASH_REDIS_REST_URL
11
11
  */
12
- url: string;
12
+ url: string | undefined;
13
13
  /**
14
14
  * UPSTASH_REDIS_REST_TOKEN
15
15
  */
16
- token: string;
16
+ token: string | undefined;
17
17
  /**
18
18
  * A Request can be forwarded to any backend defined on your service. Backends
19
19
  * can be created via the Fastly CLI, API, or web interface, and are
20
20
  * referenced by name.
21
21
  */
22
22
  backend: string;
23
+ keepAlive?: boolean;
24
+ /**
25
+ * When this flag is enabled, any subsequent commands issued by this client are guaranteed to observe the effects of all earlier writes submitted by the same client.
26
+ */
27
+ readYourWrites?: boolean;
23
28
  } & RedisOptions & RequesterConfig;
24
29
  /**
25
30
  * Serverless redis client for upstash.
@@ -40,4 +45,4 @@ declare class Redis extends Redis$1 {
40
45
  constructor(config: RedisConfigFastly);
41
46
  }
42
47
 
43
- export { Redis, RedisConfigFastly };
48
+ export { Redis, type RedisConfigFastly };
package/fastly.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-10fd3773.js';
2
- export { A as AppendCommand, B as BitCountCommand, e as BitOpCommand, f as BitPosCommand, C as CopyCommand, D as DBSizeCommand, h as DecrByCommand, g as DecrCommand, i as DelCommand, E as EchoCommand, j as EvalCommand, k as EvalshaCommand, l as ExistsCommand, n as ExpireAtCommand, m as ExpireCommand, F as FlushAllCommand, o as FlushDBCommand, G as GeoAddCommand, p as GeoAddCommandOptions, r as GeoDistCommand, s as GeoHashCommand, q as GeoMember, t as GeoPosCommand, u as GeoSearchCommand, v as GeoSearchStoreCommand, x as GetBitCommand, w as GetCommand, y as GetDelCommand, z as GetRangeCommand, H as GetSetCommand, I as HDelCommand, J as HExistsCommand, L as HGetAllCommand, K as HGetCommand, M as HIncrByCommand, N as HIncrByFloatCommand, O as HKeysCommand, P as HLenCommand, Q as HMGetCommand, S as HMSetCommand, T as HRandFieldCommand, V as HScanCommand, W as HSetCommand, X as HSetNXCommand, Y as HStrLenCommand, Z as HValsCommand, $ as IncrByCommand, a0 as IncrByFloatCommand, _ as IncrCommand, a1 as JsonArrAppendCommand, a2 as JsonArrIndexCommand, a3 as JsonArrInsertCommand, a4 as JsonArrLenCommand, a5 as JsonArrPopCommand, a6 as JsonArrTrimCommand, a7 as JsonClearCommand, a8 as JsonDelCommand, a9 as JsonForgetCommand, aa as JsonGetCommand, ab as JsonMGetCommand, ac as JsonNumIncrByCommand, ad as JsonNumMultByCommand, ae as JsonObjKeysCommand, af as JsonObjLenCommand, ag as JsonRespCommand, ah as JsonSetCommand, ai as JsonStrAppendCommand, aj as JsonStrLenCommand, ak as JsonToggleCommand, al as JsonTypeCommand, am as KeysCommand, an as LIndexCommand, ao as LInsertCommand, ap as LLenCommand, aq as LMoveCommand, ar as LPopCommand, as as LPushCommand, at as LPushXCommand, au as LRangeCommand, av as LRemCommand, aw as LSetCommand, ax as LTrimCommand, ay as MGetCommand, az as MSetCommand, aA as MSetNXCommand, aD as PExpireAtCommand, aC as PExpireCommand, aF as PSetEXCommand, aG as PTtlCommand, aB as PersistCommand, aE as PingCommand, aH as PublishCommand, aL as RPopCommand, aM as RPushCommand, aN as RPushXCommand, aI as RandomKeyCommand, aJ as RenameCommand, aK as RenameNXCommand, c as Requester, aO as SAddCommand, aR as SCardCommand, aV as SDiffCommand, aW as SDiffStoreCommand, b1 as SInterCommand, b2 as SInterStoreCommand, b3 as SIsMemberCommand, b5 as SMIsMemberCommand, b4 as SMembersCommand, b6 as SMoveCommand, b7 as SPopCommand, b8 as SRandMemberCommand, b9 as SRemCommand, ba as SScanCommand, bc as SUnionCommand, bd as SUnionStoreCommand, aP as ScanCommand, aQ as ScanCommandOptions, bm as ScoreMember, aS as ScriptExistsCommand, aT as ScriptFlushCommand, aU as ScriptLoadCommand, aZ as SetBitCommand, aX as SetCommand, aY as SetCommandOptions, a_ as SetExCommand, a$ as SetNxCommand, b0 as SetRangeCommand, bb as StrLenCommand, be as TimeCommand, bf as TouchCommand, bg as TtlCommand, bh as Type, bi as TypeCommand, bj as UnlinkCommand, U as UpstashRequest, d as UpstashResponse, bk as XAddCommand, bl as XRangeCommand, bp as ZAddCommand, bn as ZAddCommandOptions, bo as ZAddCommandOptionsWithIncr, bq as ZCardCommand, br as ZCountCommand, bs as ZDiffStoreCommand, bt as ZIncrByCommand, bu as ZInterStoreCommand, bv as ZInterStoreCommandOptions, bw as ZLexCountCommand, bx as ZMScoreCommand, by as ZPopMaxCommand, bz as ZPopMinCommand, bA as ZRangeCommand, bB as ZRangeCommandOptions, bC as ZRankCommand, bD as ZRemCommand, bE as ZRemRangeByLexCommand, bF as ZRemRangeByRankCommand, bG as ZRemRangeByScoreCommand, bH as ZRevRankCommand, bI as ZScanCommand, bJ as ZScoreCommand, bK as ZUnionCommand, bL as ZUnionCommandOptions, bM as ZUnionStoreCommand, bN as ZUnionStoreCommandOptions } from './zmscore-10fd3773.js';
1
+ import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-Cq_Bzgy4.js';
2
+ export { A as AppendCommand, B as BitCountCommand, f as BitOpCommand, g as BitPosCommand, C as CopyCommand, D as DBSizeCommand, i as DecrByCommand, h as DecrCommand, j as DelCommand, E as EchoCommand, l as EvalCommand, k as EvalROCommand, n as EvalshaCommand, m as EvalshaROCommand, o as ExistsCommand, r as ExpireAtCommand, p as ExpireCommand, q as ExpireOption, F as FlushAllCommand, s as FlushDBCommand, G as GeoAddCommand, t as GeoAddCommandOptions, v as GeoDistCommand, w as GeoHashCommand, u as GeoMember, x as GeoPosCommand, y as GeoSearchCommand, z as GeoSearchStoreCommand, J as GetBitCommand, I as GetCommand, K as GetDelCommand, L as GetExCommand, M as GetRangeCommand, N as GetSetCommand, O as HDelCommand, Q as HExistsCommand, T as HExpireAtCommand, S as HExpireCommand, V as HExpireTimeCommand, a1 as HGetAllCommand, a0 as HGetCommand, a2 as HIncrByCommand, a3 as HIncrByFloatCommand, a4 as HKeysCommand, a5 as HLenCommand, a6 as HMGetCommand, a7 as HMSetCommand, Y as HPExpireAtCommand, X as HPExpireCommand, Z as HPExpireTimeCommand, _ as HPTtlCommand, $ as HPersistCommand, a8 as HRandFieldCommand, a9 as HScanCommand, aa as HSetCommand, ab as HSetNXCommand, ac as HStrLenCommand, W as HTtlCommand, ad as HValsCommand, af as IncrByCommand, ag as IncrByFloatCommand, ae as IncrCommand, ah as JsonArrAppendCommand, ai as JsonArrIndexCommand, aj as JsonArrInsertCommand, ak as JsonArrLenCommand, al as JsonArrPopCommand, am as JsonArrTrimCommand, an as JsonClearCommand, ao as JsonDelCommand, ap as JsonForgetCommand, aq as JsonGetCommand, as as JsonMGetCommand, ar as JsonMergeCommand, at as JsonNumIncrByCommand, au as JsonNumMultByCommand, av as JsonObjKeysCommand, aw as JsonObjLenCommand, ax as JsonRespCommand, ay as JsonSetCommand, az as JsonStrAppendCommand, aA as JsonStrLenCommand, aB as JsonToggleCommand, aC as JsonTypeCommand, aD as KeysCommand, aE as LIndexCommand, aF as LInsertCommand, aG as LLenCommand, aH as LMoveCommand, aI as LPopCommand, aJ as LPushCommand, aK as LPushXCommand, aL as LRangeCommand, aM as LRemCommand, aN as LSetCommand, aO as LTrimCommand, aP as MGetCommand, aQ as MSetCommand, aR as MSetNXCommand, aU as PExpireAtCommand, aT as PExpireCommand, aW as PSetEXCommand, aX as PTtlCommand, aS as PersistCommand, aV as PingCommand, P as Pipeline, aY as PublishCommand, b0 as RPopCommand, b1 as RPushCommand, b2 as RPushXCommand, aZ as RandomKeyCommand, a_ as RenameCommand, a$ as RenameNXCommand, d as Requester, b3 as SAddCommand, b6 as SCardCommand, ba as SDiffCommand, bb as SDiffStoreCommand, bi as SInterCommand, bj as SInterStoreCommand, bk as SIsMemberCommand, bm as SMIsMemberCommand, bl as SMembersCommand, bn as SMoveCommand, bo as SPopCommand, bp as SRandMemberCommand, bq as SRemCommand, br as SScanCommand, bt as SUnionCommand, bu as SUnionStoreCommand, b4 as ScanCommand, b5 as ScanCommandOptions, bD as ScoreMember, b7 as ScriptExistsCommand, b8 as ScriptFlushCommand, b9 as ScriptLoadCommand, be as SetBitCommand, bc as SetCommand, bd as SetCommandOptions, bf as SetExCommand, bg as SetNxCommand, bh as SetRangeCommand, bs as StrLenCommand, bv as TimeCommand, bw as TouchCommand, bx as TtlCommand, by as Type, bz as TypeCommand, bA as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bB as XAddCommand, bC as XRangeCommand, bF as ZAddCommand, bE as ZAddCommandOptions, bG as ZCardCommand, bH as ZCountCommand, bI as ZDiffStoreCommand, bJ as ZIncrByCommand, bK as ZInterStoreCommand, bL as ZInterStoreCommandOptions, bM as ZLexCountCommand, bN as ZMScoreCommand, bO as ZPopMaxCommand, bP as ZPopMinCommand, bQ as ZRangeCommand, bR as ZRangeCommandOptions, bS as ZRankCommand, bT as ZRemCommand, bU as ZRemRangeByLexCommand, bV as ZRemRangeByRankCommand, bW as ZRemRangeByScoreCommand, bX as ZRevRankCommand, bY as ZScanCommand, bZ as ZScoreCommand, b_ as ZUnionCommand, b$ as ZUnionCommandOptions, c0 as ZUnionStoreCommand, c1 as ZUnionStoreCommandOptions, e as errors } from './zmscore-Cq_Bzgy4.js';
3
3
 
4
4
  /**
5
5
  * Connection credentials for upstash redis.
@@ -9,17 +9,22 @@ type RedisConfigFastly = {
9
9
  /**
10
10
  * UPSTASH_REDIS_REST_URL
11
11
  */
12
- url: string;
12
+ url: string | undefined;
13
13
  /**
14
14
  * UPSTASH_REDIS_REST_TOKEN
15
15
  */
16
- token: string;
16
+ token: string | undefined;
17
17
  /**
18
18
  * A Request can be forwarded to any backend defined on your service. Backends
19
19
  * can be created via the Fastly CLI, API, or web interface, and are
20
20
  * referenced by name.
21
21
  */
22
22
  backend: string;
23
+ keepAlive?: boolean;
24
+ /**
25
+ * When this flag is enabled, any subsequent commands issued by this client are guaranteed to observe the effects of all earlier writes submitted by the same client.
26
+ */
27
+ readYourWrites?: boolean;
23
28
  } & RedisOptions & RequesterConfig;
24
29
  /**
25
30
  * Serverless redis client for upstash.
@@ -40,4 +45,4 @@ declare class Redis extends Redis$1 {
40
45
  constructor(config: RedisConfigFastly);
41
46
  }
42
47
 
43
- export { Redis, RedisConfigFastly };
48
+ export { Redis, type RedisConfigFastly };