@upstash/redis 1.35.0-canary → 1.35.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/{dist/chunk-Q4ZBDYYE.mjs → chunk-QZ3IMTW7.mjs} +775 -86
- package/cloudflare.d.mts +55 -0
- package/cloudflare.d.ts +55 -0
- package/{dist/cloudflare.js → cloudflare.js} +789 -108
- package/{dist/cloudflare.mjs → cloudflare.mjs} +15 -13
- package/fastly.d.mts +48 -0
- package/fastly.d.ts +48 -0
- package/{dist/fastly.js → fastly.js} +785 -104
- package/{dist/fastly.mjs → fastly.mjs} +11 -9
- package/nodejs.d.mts +73 -0
- package/nodejs.d.ts +73 -0
- package/{dist/nodejs.js → nodejs.js} +792 -110
- package/{dist/nodejs.mjs → nodejs.mjs} +18 -15
- package/package.json +1 -1
- package/{dist/zmscore-BhX8yEQc.d.mts → zmscore-DzNHSWxc.d.mts} +575 -46
- package/{dist/zmscore-BhX8yEQc.d.ts → zmscore-DzNHSWxc.d.ts} +575 -46
- package/dist/cloudflare.d.mts +0 -55
- package/dist/cloudflare.d.ts +0 -55
- package/dist/fastly.d.mts +0 -48
- package/dist/fastly.d.ts +0 -48
- package/dist/nodejs.d.mts +0 -73
- package/dist/nodejs.d.ts +0 -73
package/cloudflare.d.mts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-DzNHSWxc.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, I as GetBitCommand, H as GetCommand, J as GetDelCommand, K as GetExCommand, L as GetRangeCommand, M as GetSetCommand, N as HDelCommand, O as HExistsCommand, S as HExpireAtCommand, Q as HExpireCommand, T as HExpireTimeCommand, a0 as HGetAllCommand, $ as HGetCommand, a1 as HIncrByCommand, a2 as HIncrByFloatCommand, a3 as HKeysCommand, a4 as HLenCommand, a5 as HMGetCommand, a6 as HMSetCommand, X as HPExpireAtCommand, W as HPExpireCommand, Y as HPExpireTimeCommand, Z as HPTtlCommand, _ as HPersistCommand, a7 as HRandFieldCommand, a8 as HScanCommand, a9 as HSetCommand, aa as HSetNXCommand, ab as HStrLenCommand, V as HTtlCommand, ac as HValsCommand, ae as IncrByCommand, af as IncrByFloatCommand, ad as IncrCommand, ag as JsonArrAppendCommand, ah as JsonArrIndexCommand, ai as JsonArrInsertCommand, aj as JsonArrLenCommand, ak as JsonArrPopCommand, al as JsonArrTrimCommand, am as JsonClearCommand, an as JsonDelCommand, ao as JsonForgetCommand, ap as JsonGetCommand, ar as JsonMGetCommand, aq as JsonMergeCommand, as as JsonNumIncrByCommand, at as JsonNumMultByCommand, au as JsonObjKeysCommand, av as JsonObjLenCommand, aw as JsonRespCommand, ax as JsonSetCommand, ay as JsonStrAppendCommand, az as JsonStrLenCommand, aA as JsonToggleCommand, aB as JsonTypeCommand, aC as KeysCommand, aD as LIndexCommand, aE as LInsertCommand, aF as LLenCommand, aG as LMoveCommand, aH as LPopCommand, aI as LPushCommand, aJ as LPushXCommand, aK as LRangeCommand, aL as LRemCommand, aM as LSetCommand, aN as LTrimCommand, aO as MGetCommand, aP as MSetCommand, aQ as MSetNXCommand, aT as PExpireAtCommand, aS as PExpireCommand, aV as PSetEXCommand, aW as PTtlCommand, aR as PersistCommand, aU as PingCommand, P as Pipeline, aX as PublishCommand, a$ as RPopCommand, b0 as RPushCommand, b1 as RPushXCommand, aY as RandomKeyCommand, aZ as RenameCommand, a_ as RenameNXCommand, d as Requester, b2 as SAddCommand, b5 as SCardCommand, b9 as SDiffCommand, ba as SDiffStoreCommand, bh as SInterCommand, bi as SInterStoreCommand, bj as SIsMemberCommand, bl as SMIsMemberCommand, bk as SMembersCommand, bm as SMoveCommand, bn as SPopCommand, bo as SRandMemberCommand, bp as SRemCommand, bq as SScanCommand, bs as SUnionCommand, bt as SUnionStoreCommand, b3 as ScanCommand, b4 as ScanCommandOptions, bC as ScoreMember, b6 as ScriptExistsCommand, b7 as ScriptFlushCommand, b8 as ScriptLoadCommand, bd as SetBitCommand, bb as SetCommand, bc as SetCommandOptions, be as SetExCommand, bf as SetNxCommand, bg as SetRangeCommand, br as StrLenCommand, bu as TimeCommand, bv as TouchCommand, bw as TtlCommand, bx as Type, by as TypeCommand, bz as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bA as XAddCommand, bB as XRangeCommand, bE as ZAddCommand, bD as ZAddCommandOptions, bF as ZCardCommand, bG as ZCountCommand, bH as ZDiffStoreCommand, bI as ZIncrByCommand, bJ as ZInterStoreCommand, bK as ZInterStoreCommandOptions, bL as ZLexCountCommand, bM as ZMScoreCommand, bN as ZPopMaxCommand, bO as ZPopMinCommand, bP as ZRangeCommand, bQ as ZRangeCommandOptions, bR as ZRankCommand, bS as ZRemCommand, bT as ZRemRangeByLexCommand, bU as ZRemRangeByRankCommand, bV as ZRemRangeByScoreCommand, bW as ZRevRankCommand, bX as ZScanCommand, bY as ZScoreCommand, bZ as ZUnionCommand, b_ as ZUnionCommandOptions, b$ as ZUnionStoreCommand, c0 as ZUnionStoreCommandOptions, e as errors } from './zmscore-DzNHSWxc.mjs';
|
|
3
|
+
|
|
4
|
+
type Env = {
|
|
5
|
+
UPSTASH_DISABLE_TELEMETRY?: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Connection credentials for upstash redis.
|
|
10
|
+
* Get them from https://console.upstash.com/redis/<uuid>
|
|
11
|
+
*/
|
|
12
|
+
type RedisConfigCloudflare = {
|
|
13
|
+
/**
|
|
14
|
+
* UPSTASH_REDIS_REST_URL
|
|
15
|
+
*/
|
|
16
|
+
url: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* UPSTASH_REDIS_REST_TOKEN
|
|
19
|
+
*/
|
|
20
|
+
token: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The signal will allow aborting requests on the fly.
|
|
23
|
+
* For more check: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
|
24
|
+
*/
|
|
25
|
+
signal?: AbortSignal;
|
|
26
|
+
keepAlive?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 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.
|
|
29
|
+
*/
|
|
30
|
+
readYourWrites?: boolean;
|
|
31
|
+
} & RedisOptions & RequesterConfig & Env;
|
|
32
|
+
/**
|
|
33
|
+
* Serverless redis client for upstash.
|
|
34
|
+
*/
|
|
35
|
+
declare class Redis extends Redis$1 {
|
|
36
|
+
/**
|
|
37
|
+
* Create a new redis client
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* const redis = new Redis({
|
|
42
|
+
* url: "<UPSTASH_REDIS_REST_URL>",
|
|
43
|
+
* token: "<UPSTASH_REDIS_REST_TOKEN>",
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
constructor(config: RedisConfigCloudflare, env?: Env);
|
|
48
|
+
static fromEnv(env?: {
|
|
49
|
+
UPSTASH_REDIS_REST_URL: string;
|
|
50
|
+
UPSTASH_REDIS_REST_TOKEN: string;
|
|
51
|
+
UPSTASH_DISABLE_TELEMETRY?: string;
|
|
52
|
+
}, opts?: Omit<RedisConfigCloudflare, "url" | "token">): Redis;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { Redis, type RedisConfigCloudflare };
|
package/cloudflare.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { R as RedisOptions, a as RequesterConfig, b as Redis$1 } from './zmscore-DzNHSWxc.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, I as GetBitCommand, H as GetCommand, J as GetDelCommand, K as GetExCommand, L as GetRangeCommand, M as GetSetCommand, N as HDelCommand, O as HExistsCommand, S as HExpireAtCommand, Q as HExpireCommand, T as HExpireTimeCommand, a0 as HGetAllCommand, $ as HGetCommand, a1 as HIncrByCommand, a2 as HIncrByFloatCommand, a3 as HKeysCommand, a4 as HLenCommand, a5 as HMGetCommand, a6 as HMSetCommand, X as HPExpireAtCommand, W as HPExpireCommand, Y as HPExpireTimeCommand, Z as HPTtlCommand, _ as HPersistCommand, a7 as HRandFieldCommand, a8 as HScanCommand, a9 as HSetCommand, aa as HSetNXCommand, ab as HStrLenCommand, V as HTtlCommand, ac as HValsCommand, ae as IncrByCommand, af as IncrByFloatCommand, ad as IncrCommand, ag as JsonArrAppendCommand, ah as JsonArrIndexCommand, ai as JsonArrInsertCommand, aj as JsonArrLenCommand, ak as JsonArrPopCommand, al as JsonArrTrimCommand, am as JsonClearCommand, an as JsonDelCommand, ao as JsonForgetCommand, ap as JsonGetCommand, ar as JsonMGetCommand, aq as JsonMergeCommand, as as JsonNumIncrByCommand, at as JsonNumMultByCommand, au as JsonObjKeysCommand, av as JsonObjLenCommand, aw as JsonRespCommand, ax as JsonSetCommand, ay as JsonStrAppendCommand, az as JsonStrLenCommand, aA as JsonToggleCommand, aB as JsonTypeCommand, aC as KeysCommand, aD as LIndexCommand, aE as LInsertCommand, aF as LLenCommand, aG as LMoveCommand, aH as LPopCommand, aI as LPushCommand, aJ as LPushXCommand, aK as LRangeCommand, aL as LRemCommand, aM as LSetCommand, aN as LTrimCommand, aO as MGetCommand, aP as MSetCommand, aQ as MSetNXCommand, aT as PExpireAtCommand, aS as PExpireCommand, aV as PSetEXCommand, aW as PTtlCommand, aR as PersistCommand, aU as PingCommand, P as Pipeline, aX as PublishCommand, a$ as RPopCommand, b0 as RPushCommand, b1 as RPushXCommand, aY as RandomKeyCommand, aZ as RenameCommand, a_ as RenameNXCommand, d as Requester, b2 as SAddCommand, b5 as SCardCommand, b9 as SDiffCommand, ba as SDiffStoreCommand, bh as SInterCommand, bi as SInterStoreCommand, bj as SIsMemberCommand, bl as SMIsMemberCommand, bk as SMembersCommand, bm as SMoveCommand, bn as SPopCommand, bo as SRandMemberCommand, bp as SRemCommand, bq as SScanCommand, bs as SUnionCommand, bt as SUnionStoreCommand, b3 as ScanCommand, b4 as ScanCommandOptions, bC as ScoreMember, b6 as ScriptExistsCommand, b7 as ScriptFlushCommand, b8 as ScriptLoadCommand, bd as SetBitCommand, bb as SetCommand, bc as SetCommandOptions, be as SetExCommand, bf as SetNxCommand, bg as SetRangeCommand, br as StrLenCommand, bu as TimeCommand, bv as TouchCommand, bw as TtlCommand, bx as Type, by as TypeCommand, bz as UnlinkCommand, U as UpstashRequest, c as UpstashResponse, bA as XAddCommand, bB as XRangeCommand, bE as ZAddCommand, bD as ZAddCommandOptions, bF as ZCardCommand, bG as ZCountCommand, bH as ZDiffStoreCommand, bI as ZIncrByCommand, bJ as ZInterStoreCommand, bK as ZInterStoreCommandOptions, bL as ZLexCountCommand, bM as ZMScoreCommand, bN as ZPopMaxCommand, bO as ZPopMinCommand, bP as ZRangeCommand, bQ as ZRangeCommandOptions, bR as ZRankCommand, bS as ZRemCommand, bT as ZRemRangeByLexCommand, bU as ZRemRangeByRankCommand, bV as ZRemRangeByScoreCommand, bW as ZRevRankCommand, bX as ZScanCommand, bY as ZScoreCommand, bZ as ZUnionCommand, b_ as ZUnionCommandOptions, b$ as ZUnionStoreCommand, c0 as ZUnionStoreCommandOptions, e as errors } from './zmscore-DzNHSWxc.js';
|
|
3
|
+
|
|
4
|
+
type Env = {
|
|
5
|
+
UPSTASH_DISABLE_TELEMETRY?: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Connection credentials for upstash redis.
|
|
10
|
+
* Get them from https://console.upstash.com/redis/<uuid>
|
|
11
|
+
*/
|
|
12
|
+
type RedisConfigCloudflare = {
|
|
13
|
+
/**
|
|
14
|
+
* UPSTASH_REDIS_REST_URL
|
|
15
|
+
*/
|
|
16
|
+
url: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* UPSTASH_REDIS_REST_TOKEN
|
|
19
|
+
*/
|
|
20
|
+
token: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The signal will allow aborting requests on the fly.
|
|
23
|
+
* For more check: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
|
24
|
+
*/
|
|
25
|
+
signal?: AbortSignal;
|
|
26
|
+
keepAlive?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 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.
|
|
29
|
+
*/
|
|
30
|
+
readYourWrites?: boolean;
|
|
31
|
+
} & RedisOptions & RequesterConfig & Env;
|
|
32
|
+
/**
|
|
33
|
+
* Serverless redis client for upstash.
|
|
34
|
+
*/
|
|
35
|
+
declare class Redis extends Redis$1 {
|
|
36
|
+
/**
|
|
37
|
+
* Create a new redis client
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```typescript
|
|
41
|
+
* const redis = new Redis({
|
|
42
|
+
* url: "<UPSTASH_REDIS_REST_URL>",
|
|
43
|
+
* token: "<UPSTASH_REDIS_REST_TOKEN>",
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
constructor(config: RedisConfigCloudflare, env?: Env);
|
|
48
|
+
static fromEnv(env?: {
|
|
49
|
+
UPSTASH_REDIS_REST_URL: string;
|
|
50
|
+
UPSTASH_REDIS_REST_TOKEN: string;
|
|
51
|
+
UPSTASH_DISABLE_TELEMETRY?: string;
|
|
52
|
+
}, opts?: Omit<RedisConfigCloudflare, "url" | "token">): Redis;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { Redis, type RedisConfigCloudflare };
|