@upstash/redis 0.0.0-ci.5cd8bd7f → 0.0.0-ci.608697de-20221127
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/README.md +38 -281
- package/esm/deps/deno.land/x/base64@v0.2.1/base.js +100 -0
- package/esm/deps/deno.land/x/base64@v0.2.1/base64url.js +9 -0
- package/esm/deps/deno.land/x/sha1@v1.0.3/deps.js +1 -0
- package/esm/deps/deno.land/x/sha1@v1.0.3/mod.js +191 -0
- package/esm/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +50 -0
- package/esm/pkg/commands/getdel.js +9 -0
- package/esm/pkg/commands/hgetall.js +0 -4
- package/esm/pkg/commands/hrandfield.js +39 -0
- package/esm/pkg/commands/lpos.js +19 -0
- package/esm/pkg/commands/mod.js +3 -0
- package/esm/pkg/commands/scan.js +3 -0
- package/esm/pkg/commands/script_exists.js +1 -10
- package/esm/pkg/commands/sdiffstore.js +1 -1
- package/esm/pkg/commands/set.js +16 -4
- package/esm/pkg/commands/zmscore.js +10 -0
- package/esm/pkg/commands/zrange.js +6 -0
- package/esm/pkg/http.js +116 -8
- package/esm/pkg/pipeline.js +52 -6
- package/esm/pkg/redis.js +79 -2
- package/esm/pkg/script.js +77 -0
- package/esm/platforms/cloudflare.js +14 -26
- package/esm/platforms/fastly.js +5 -25
- package/esm/platforms/node_with_fetch.js +18 -26
- package/esm/platforms/nodejs.js +18 -26
- package/esm/version.js +1 -0
- package/package.json +10 -37
- package/script/deps/deno.land/x/base64@v0.2.1/base.js +104 -0
- package/script/deps/deno.land/x/base64@v0.2.1/base64url.js +13 -0
- package/script/deps/deno.land/x/sha1@v1.0.3/deps.js +6 -0
- package/script/deps/deno.land/x/sha1@v1.0.3/mod.js +196 -0
- package/script/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.js +55 -0
- package/script/pkg/commands/getdel.js +13 -0
- package/script/pkg/commands/hgetall.js +0 -4
- package/script/pkg/commands/hrandfield.js +43 -0
- package/script/pkg/commands/lpos.js +23 -0
- package/script/pkg/commands/mod.js +3 -0
- package/script/pkg/commands/scan.js +3 -0
- package/script/pkg/commands/script_exists.js +1 -10
- package/script/pkg/commands/sdiffstore.js +1 -1
- package/script/pkg/commands/set.js +16 -4
- package/script/pkg/commands/zmscore.js +14 -0
- package/script/pkg/commands/zrange.js +6 -0
- package/script/pkg/http.js +116 -8
- package/script/pkg/pipeline.js +51 -5
- package/script/pkg/redis.js +78 -1
- package/script/pkg/script.js +81 -0
- package/script/platforms/cloudflare.js +14 -26
- package/script/platforms/fastly.js +5 -25
- package/script/platforms/node_with_fetch.js +18 -26
- package/script/platforms/nodejs.js +18 -26
- package/script/version.js +4 -0
- package/types/deps/deno.land/x/base64@v0.2.1/base.d.ts +5 -0
- package/types/deps/deno.land/x/base64@v0.2.1/base64url.d.ts +1 -0
- package/types/deps/deno.land/x/sha1@v1.0.3/deps.d.ts +1 -0
- package/types/deps/deno.land/x/sha1@v1.0.3/mod.d.ts +26 -0
- package/types/deps/denopkg.com/chiefbiiko/std-encoding@v1.0.0/mod.d.ts +3 -0
- package/types/pkg/commands/bitop.d.ts +0 -1
- package/types/pkg/commands/bitpos.d.ts +1 -1
- package/types/pkg/commands/getdel.d.ts +7 -0
- package/types/pkg/commands/hmset.d.ts +2 -2
- package/types/pkg/commands/hrandfield.d.ts +9 -0
- package/types/pkg/commands/lpop.d.ts +1 -1
- package/types/pkg/commands/lpos.d.ts +15 -0
- package/types/pkg/commands/mget.d.ts +1 -1
- package/types/pkg/commands/mod.d.ts +3 -0
- package/types/pkg/commands/rpop.d.ts +2 -2
- package/types/pkg/commands/scan.d.ts +1 -0
- package/types/pkg/commands/script_exists.d.ts +2 -4
- package/types/pkg/commands/sdiffstore.d.ts +1 -1
- package/types/pkg/commands/set.d.ts +31 -2
- package/types/pkg/commands/sinterstore.d.ts +2 -2
- package/types/pkg/commands/spop.d.ts +2 -2
- package/types/pkg/commands/zadd.d.ts +1 -1
- package/types/pkg/commands/zmscore.d.ts +7 -0
- package/types/pkg/commands/zrange.d.ts +7 -0
- package/types/pkg/http.d.ts +76 -4
- package/types/pkg/pipeline.d.ts +34 -9
- package/types/pkg/redis.d.ts +51 -11
- package/types/pkg/script.d.ts +42 -0
- package/types/platforms/cloudflare.d.ts +8 -3
- package/types/platforms/fastly.d.ts +2 -2
- package/types/platforms/node_with_fetch.d.ts +2 -2
- package/types/platforms/nodejs.d.ts +18 -2
- package/types/version.d.ts +1 -0
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as core from "../pkg/redis.js";
|
|
2
2
|
import type { Requester, UpstashRequest, UpstashResponse } from "../pkg/http.js";
|
|
3
|
+
import { RequesterConfig } from "../pkg/http.js";
|
|
4
|
+
declare type Env = {
|
|
5
|
+
UPSTASH_DISABLE_TELEMETRY?: string;
|
|
6
|
+
};
|
|
3
7
|
export type { Requester, UpstashRequest, UpstashResponse };
|
|
4
8
|
/**
|
|
5
9
|
* Connection credentials for upstash redis.
|
|
@@ -14,7 +18,7 @@ export declare type RedisConfigCloudflare = {
|
|
|
14
18
|
* UPSTASH_REDIS_REST_TOKEN
|
|
15
19
|
*/
|
|
16
20
|
token: string;
|
|
17
|
-
} & core.RedisOptions;
|
|
21
|
+
} & core.RedisOptions & RequesterConfig & Env;
|
|
18
22
|
/**
|
|
19
23
|
* Serverless redis client for upstash.
|
|
20
24
|
*/
|
|
@@ -30,9 +34,10 @@ export declare class Redis extends core.Redis {
|
|
|
30
34
|
* });
|
|
31
35
|
* ```
|
|
32
36
|
*/
|
|
33
|
-
constructor(config: RedisConfigCloudflare);
|
|
37
|
+
constructor(config: RedisConfigCloudflare, env?: Env);
|
|
34
38
|
static fromEnv(env?: {
|
|
35
39
|
UPSTASH_REDIS_REST_URL: string;
|
|
36
40
|
UPSTASH_REDIS_REST_TOKEN: string;
|
|
37
|
-
|
|
41
|
+
UPSTASH_DISABLE_TELEMETRY?: string;
|
|
42
|
+
}, opts?: Omit<RedisConfigCloudflare, "url" | "token">): Redis;
|
|
38
43
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as core from "../pkg/redis.js";
|
|
2
|
-
import type { Requester, UpstashRequest, UpstashResponse } from "../pkg/http.js";
|
|
2
|
+
import type { Requester, RequesterConfig, UpstashRequest, UpstashResponse } from "../pkg/http.js";
|
|
3
3
|
export type { Requester, UpstashRequest, UpstashResponse };
|
|
4
4
|
/**
|
|
5
5
|
* Connection credentials for upstash redis.
|
|
@@ -20,7 +20,7 @@ export declare type RedisConfigFastly = {
|
|
|
20
20
|
* referenced by name.
|
|
21
21
|
*/
|
|
22
22
|
backend: string;
|
|
23
|
-
} & core.RedisOptions;
|
|
23
|
+
} & core.RedisOptions & RequesterConfig;
|
|
24
24
|
/**
|
|
25
25
|
* Serverless redis client for upstash.
|
|
26
26
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as core from "../pkg/redis.js";
|
|
2
|
-
import { Requester, UpstashRequest, UpstashResponse } from "../pkg/http.js";
|
|
2
|
+
import { Requester, RequesterConfig, UpstashRequest, UpstashResponse } from "../pkg/http.js";
|
|
3
3
|
import "isomorphic-fetch";
|
|
4
4
|
export type { Requester, UpstashRequest, UpstashResponse };
|
|
5
5
|
/**
|
|
@@ -15,7 +15,7 @@ export declare type RedisConfigNodejs = {
|
|
|
15
15
|
* UPSTASH_REDIS_REST_TOKEN
|
|
16
16
|
*/
|
|
17
17
|
token: string;
|
|
18
|
-
} & core.RedisOptions;
|
|
18
|
+
} & core.RedisOptions & RequesterConfig;
|
|
19
19
|
/**
|
|
20
20
|
* Serverless redis client for upstash.
|
|
21
21
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as core from "../pkg/redis.js";
|
|
2
|
-
import { Requester, UpstashRequest, UpstashResponse } from "../pkg/http.js";
|
|
2
|
+
import { Requester, RequesterConfig, UpstashRequest, UpstashResponse } from "../pkg/http.js";
|
|
3
3
|
export type { Requester, UpstashRequest, UpstashResponse };
|
|
4
4
|
/**
|
|
5
5
|
* Connection credentials for upstash redis.
|
|
@@ -14,7 +14,23 @@ export declare type RedisConfigNodejs = {
|
|
|
14
14
|
* UPSTASH_REDIS_REST_TOKEN
|
|
15
15
|
*/
|
|
16
16
|
token: string;
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* An agent allows you to reuse connections to reduce latency for multiple sequential requests.
|
|
19
|
+
*
|
|
20
|
+
* This is a node specific implementation and is not supported in various runtimes like Vercel
|
|
21
|
+
* edge functions.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* import https from "https"
|
|
26
|
+
*
|
|
27
|
+
* const options: RedisConfigNodejs = {
|
|
28
|
+
* agent: new https.Agent({ keepAlive: true })
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
agent?: any;
|
|
33
|
+
} & core.RedisOptions & RequesterConfig;
|
|
18
34
|
/**
|
|
19
35
|
* Serverless redis client for upstash.
|
|
20
36
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VERSION = "v0.0.0-ci.608697de-20221127";
|