@upstash/redis 0.1.3 → 0.1.7
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 +4 -32
- package/dist/main/client.d.ts +6 -10
- package/dist/main/client.js +135 -197
- package/dist/main/index-cjs.d.ts +1 -0
- package/dist/main/index-cjs.js +120 -0
- package/dist/main/{type.d.ts → types.d.ts} +1 -11
- package/dist/main/{type.js → types.js} +0 -1
- package/dist/module/client.d.ts +6 -10
- package/dist/module/client.js +135 -197
- package/dist/module/index.d.ts +1 -2
- package/dist/module/index.js +1 -2
- package/dist/module/{type.d.ts → types.d.ts} +1 -11
- package/dist/module/types.js +1 -0
- package/package.json +14 -23
- package/src/client.ts +147 -222
- package/src/index-cjs.ts +117 -0
- package/src/index.ts +2 -2
- package/src/{type.ts → types.ts} +1 -11
- package/tsconfig.json +8 -6
- package/tsconfig.module.json +3 -2
- package/dist/main/client.d.ts.map +0 -1
- package/dist/main/client.js.map +0 -1
- package/dist/main/index.d.ts +0 -4
- package/dist/main/index.d.ts.map +0 -1
- package/dist/main/index.js +0 -13
- package/dist/main/index.js.map +0 -1
- package/dist/main/type.d.ts.map +0 -1
- package/dist/main/type.js.map +0 -1
- package/dist/module/client.d.ts.map +0 -1
- package/dist/module/client.js.map +0 -1
- package/dist/module/index.d.ts.map +0 -1
- package/dist/module/index.js.map +0 -1
- package/dist/module/type.d.ts.map +0 -1
- package/dist/module/type.js +0 -2
- package/dist/module/type.js.map +0 -1
- package/dist/umd/upstash-redis.js +0 -1
- package/webpack.config.js +0 -34
package/dist/module/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import upstash from './client';
|
|
2
|
-
export declare const auth: ((options?: import("./type").ClientObjectProps | undefined) => void) & ((url?: string | undefined, token?: string | undefined) => void) & ((url?: string | import("./type").ClientObjectProps | undefined, token?: string | undefined) => void), append: (...args: any) => import("./type").MethodReturn, decr: (...args: any) => import("./type").MethodReturn, decrby: (...args: any) => import("./type").MethodReturn, get: (...args: any) => import("./type").MethodReturn, getrange: (...args: any) => import("./type").MethodReturn, getset: (...args: any) => import("./type").MethodReturn, incr: (...args: any) => import("./type").MethodReturn, incrby: (...args: any) => import("./type").MethodReturn, incrbyfloat: (...args: any) => import("./type").MethodReturn, mget: (...args: any) => import("./type").MethodReturn, mset: (...args: any) => import("./type").MethodReturn, msetnx: (...args: any) => import("./type").MethodReturn, psetex: (...args: any) => import("./type").MethodReturn, set: (...args: any) => import("./type").MethodReturn, setex: (...args: any) => import("./type").MethodReturn, setnx: (...args: any) => import("./type").MethodReturn, setrange: (...args: any) => import("./type").MethodReturn, strlen: (...args: any) => import("./type").MethodReturn, bitcount: (...args: any) => import("./type").MethodReturn, bitop: (...args: any) => import("./type").MethodReturn, bitpos: (...args: any) => import("./type").MethodReturn, getbit: (...args: any) => import("./type").MethodReturn, setbit: (...args: any) => import("./type").MethodReturn, echo: (...args: any) => import("./type").MethodReturn, ping: (...args: any) => import("./type").MethodReturn, hdel: (...args: any) => import("./type").MethodReturn, hexists: (...args: any) => import("./type").MethodReturn, hget: (...args: any) => import("./type").MethodReturn, hgetall: (...args: any) => import("./type").MethodReturn, hincrby: (...args: any) => import("./type").MethodReturn, hincrbyfloat: (...args: any) => import("./type").MethodReturn, hkeys: (...args: any) => import("./type").MethodReturn, hlen: (...args: any) => import("./type").MethodReturn, hmget: (...args: any) => import("./type").MethodReturn, hmset: (...args: any) => import("./type").MethodReturn, hscan: (...args: any) => import("./type").MethodReturn, hset: (...args: any) => import("./type").MethodReturn, hsetnx: (...args: any) => import("./type").MethodReturn, hvals: (...args: any) => import("./type").MethodReturn, del: (...args: any) => import("./type").MethodReturn, exists: (...args: any) => import("./type").MethodReturn, expire: (...args: any) => import("./type").MethodReturn, expireat: (...args: any) => import("./type").MethodReturn, keys: (...args: any) => import("./type").MethodReturn, persist: (...args: any) => import("./type").MethodReturn, pexpire: (...args: any) => import("./type").MethodReturn, pexpireat: (...args: any) => import("./type").MethodReturn, pttl: (...args: any) => import("./type").MethodReturn, randomkey: (...args: any) => import("./type").MethodReturn, rename: (...args: any) => import("./type").MethodReturn, renamenx: (...args: any) => import("./type").MethodReturn, scan: (...args: any) => import("./type").MethodReturn, touch: (...args: any) => import("./type").MethodReturn, ttl: (...args: any) => import("./type").MethodReturn, type: (...args: any) => import("./type").MethodReturn, unlink: (...args: any) => import("./type").MethodReturn, lindex: (...args: any) => import("./type").MethodReturn, linsert: (...args: any) => import("./type").MethodReturn, llen: (...args: any) => import("./type").MethodReturn, lpop: (...args: any) => import("./type").MethodReturn, lpush: (...args: any) => import("./type").MethodReturn, lpushx: (...args: any) => import("./type").MethodReturn, lrange: (...args: any) => import("./type").MethodReturn, lrem: (...args: any) => import("./type").MethodReturn, lset: (...args: any) => import("./type").MethodReturn, ltrim: (...args: any) => import("./type").MethodReturn, rpop: (...args: any) => import("./type").MethodReturn, rpoplpush: (...args: any) => import("./type").MethodReturn, rpush: (...args: any) => import("./type").MethodReturn, rpushx: (...args: any) => import("./type").MethodReturn, dbsize: (...args: any) => import("./type").MethodReturn, flushall: (...args: any) => import("./type").MethodReturn, flushdb: (...args: any) => import("./type").MethodReturn, info: (...args: any) => import("./type").MethodReturn, time: (...args: any) => import("./type").MethodReturn, sadd: (...args: any) => import("./type").MethodReturn, scard: (...args: any) => import("./type").MethodReturn, sdiff: (...args: any) => import("./type").MethodReturn, sdiffstore: (...args: any) => import("./type").MethodReturn, sinter: (...args: any) => import("./type").MethodReturn, sinterstore: (...args: any) => import("./type").MethodReturn, sismember: (...args: any) => import("./type").MethodReturn, smembers: (...args: any) => import("./type").MethodReturn, smove: (...args: any) => import("./type").MethodReturn, spop: (...args: any) => import("./type").MethodReturn, srandmember: (...args: any) => import("./type").MethodReturn, srem: (...args: any) => import("./type").MethodReturn, sunion: (...args: any) => import("./type").MethodReturn, sunionstore: (...args: any) => import("./type").MethodReturn, zadd: (...args: any) => import("./type").MethodReturn, zcard: (...args: any) => import("./type").MethodReturn, zcount: (...args: any) => import("./type").MethodReturn, zincrby: (...args: any) => import("./type").MethodReturn, zinterstore: (...args: any) => import("./type").MethodReturn, zlexcount: (...args: any) => import("./type").MethodReturn, zpopmax: (...args: any) => import("./type").MethodReturn, zpopmin: (...args: any) => import("./type").MethodReturn, zrange: (...args: any) => import("./type").MethodReturn, zrangebylex: (...args: any) => import("./type").MethodReturn, zrangebyscore: (...args: any) => import("./type").MethodReturn, zrank: (...args: any) => import("./type").MethodReturn, zrem: (...args: any) => import("./type").MethodReturn, zremrangebylex: (...args: any) => import("./type").MethodReturn, zremrangebyrank: (...args: any) => import("./type").MethodReturn, zremrangebyscore: (...args: any) => import("./type").MethodReturn, zrevrange: (...args: any) => import("./type").MethodReturn, zrevrangebylex: (...args: any) => import("./type").MethodReturn, zrevrangebyscore: (...args: any) => import("./type").MethodReturn, zrevrank: (...args: any) => import("./type").MethodReturn, zscore: (...args: any) => import("./type").MethodReturn, zunionstore: (...args: any) => import("./type").MethodReturn;
|
|
3
2
|
export default upstash;
|
|
4
|
-
|
|
3
|
+
export declare const auth: ((options?: import("./types").ClientObjectProps | undefined) => void) & ((url?: string | undefined, token?: string | undefined) => void) & ((url?: string | import("./types").ClientObjectProps | undefined, token?: string | undefined) => void), append: (...args: any) => import("./types").MethodReturn, decr: (...args: any) => import("./types").MethodReturn, decrby: (...args: any) => import("./types").MethodReturn, get: (...args: any) => import("./types").MethodReturn, getrange: (...args: any) => import("./types").MethodReturn, getset: (...args: any) => import("./types").MethodReturn, incr: (...args: any) => import("./types").MethodReturn, incrby: (...args: any) => import("./types").MethodReturn, incrbyfloat: (...args: any) => import("./types").MethodReturn, mget: (...args: any) => import("./types").MethodReturn, mset: (...args: any) => import("./types").MethodReturn, msetnx: (...args: any) => import("./types").MethodReturn, psetex: (...args: any) => import("./types").MethodReturn, set: (...args: any) => import("./types").MethodReturn, setex: (...args: any) => import("./types").MethodReturn, setnx: (...args: any) => import("./types").MethodReturn, setrange: (...args: any) => import("./types").MethodReturn, strlen: (...args: any) => import("./types").MethodReturn, bitcount: (...args: any) => import("./types").MethodReturn, bitop: (...args: any) => import("./types").MethodReturn, bitpos: (...args: any) => import("./types").MethodReturn, getbit: (...args: any) => import("./types").MethodReturn, setbit: (...args: any) => import("./types").MethodReturn, echo: (...args: any) => import("./types").MethodReturn, ping: (...args: any) => import("./types").MethodReturn, hdel: (...args: any) => import("./types").MethodReturn, hexists: (...args: any) => import("./types").MethodReturn, hget: (...args: any) => import("./types").MethodReturn, hgetall: (...args: any) => import("./types").MethodReturn, hincrby: (...args: any) => import("./types").MethodReturn, hincrbyfloat: (...args: any) => import("./types").MethodReturn, hkeys: (...args: any) => import("./types").MethodReturn, hlen: (...args: any) => import("./types").MethodReturn, hmget: (...args: any) => import("./types").MethodReturn, hmset: (...args: any) => import("./types").MethodReturn, hscan: (...args: any) => import("./types").MethodReturn, hset: (...args: any) => import("./types").MethodReturn, hsetnx: (...args: any) => import("./types").MethodReturn, hvals: (...args: any) => import("./types").MethodReturn, del: (...args: any) => import("./types").MethodReturn, exists: (...args: any) => import("./types").MethodReturn, expire: (...args: any) => import("./types").MethodReturn, expireat: (...args: any) => import("./types").MethodReturn, keys: (...args: any) => import("./types").MethodReturn, persist: (...args: any) => import("./types").MethodReturn, pexpire: (...args: any) => import("./types").MethodReturn, pexpireat: (...args: any) => import("./types").MethodReturn, pttl: (...args: any) => import("./types").MethodReturn, randomkey: (...args: any) => import("./types").MethodReturn, rename: (...args: any) => import("./types").MethodReturn, renamenx: (...args: any) => import("./types").MethodReturn, scan: (...args: any) => import("./types").MethodReturn, touch: (...args: any) => import("./types").MethodReturn, ttl: (...args: any) => import("./types").MethodReturn, type: (...args: any) => import("./types").MethodReturn, unlink: (...args: any) => import("./types").MethodReturn, lindex: (...args: any) => import("./types").MethodReturn, linsert: (...args: any) => import("./types").MethodReturn, llen: (...args: any) => import("./types").MethodReturn, lpop: (...args: any) => import("./types").MethodReturn, lpush: (...args: any) => import("./types").MethodReturn, lpushx: (...args: any) => import("./types").MethodReturn, lrange: (...args: any) => import("./types").MethodReturn, lrem: (...args: any) => import("./types").MethodReturn, lset: (...args: any) => import("./types").MethodReturn, ltrim: (...args: any) => import("./types").MethodReturn, rpop: (...args: any) => import("./types").MethodReturn, rpoplpush: (...args: any) => import("./types").MethodReturn, rpush: (...args: any) => import("./types").MethodReturn, rpushx: (...args: any) => import("./types").MethodReturn, dbsize: (...args: any) => import("./types").MethodReturn, flushall: (...args: any) => import("./types").MethodReturn, flushdb: (...args: any) => import("./types").MethodReturn, info: (...args: any) => import("./types").MethodReturn, time: (...args: any) => import("./types").MethodReturn, sadd: (...args: any) => import("./types").MethodReturn, scard: (...args: any) => import("./types").MethodReturn, sdiff: (...args: any) => import("./types").MethodReturn, sdiffstore: (...args: any) => import("./types").MethodReturn, sinter: (...args: any) => import("./types").MethodReturn, sinterstore: (...args: any) => import("./types").MethodReturn, sismember: (...args: any) => import("./types").MethodReturn, smembers: (...args: any) => import("./types").MethodReturn, smove: (...args: any) => import("./types").MethodReturn, spop: (...args: any) => import("./types").MethodReturn, srandmember: (...args: any) => import("./types").MethodReturn, srem: (...args: any) => import("./types").MethodReturn, sunion: (...args: any) => import("./types").MethodReturn, sunionstore: (...args: any) => import("./types").MethodReturn, zadd: (...args: any) => import("./types").MethodReturn, zcard: (...args: any) => import("./types").MethodReturn, zcount: (...args: any) => import("./types").MethodReturn, zincrby: (...args: any) => import("./types").MethodReturn, zinterstore: (...args: any) => import("./types").MethodReturn, zlexcount: (...args: any) => import("./types").MethodReturn, zpopmax: (...args: any) => import("./types").MethodReturn, zpopmin: (...args: any) => import("./types").MethodReturn, zrange: (...args: any) => import("./types").MethodReturn, zrangebylex: (...args: any) => import("./types").MethodReturn, zrangebyscore: (...args: any) => import("./types").MethodReturn, zrank: (...args: any) => import("./types").MethodReturn, zrem: (...args: any) => import("./types").MethodReturn, zremrangebylex: (...args: any) => import("./types").MethodReturn, zremrangebyrank: (...args: any) => import("./types").MethodReturn, zremrangebyscore: (...args: any) => import("./types").MethodReturn, zrevrange: (...args: any) => import("./types").MethodReturn, zrevrangebylex: (...args: any) => import("./types").MethodReturn, zrevrangebyscore: (...args: any) => import("./types").MethodReturn, zrevrank: (...args: any) => import("./types").MethodReturn, zscore: (...args: any) => import("./types").MethodReturn, zunionstore: (...args: any) => import("./types").MethodReturn;
|
package/dist/module/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import upstash from './client';
|
|
2
|
-
export const { auth, append, decr, decrby, get, getrange, getset, incr, incrby, incrbyfloat, mget, mset, msetnx, psetex, set, setex, setnx, setrange, strlen, bitcount, bitop, bitpos, getbit, setbit, echo, ping, hdel, hexists, hget, hgetall, hincrby, hincrbyfloat, hkeys, hlen, hmget, hmset, hscan, hset, hsetnx, hvals, del, exists, expire, expireat, keys, persist, pexpire, pexpireat, pttl, randomkey, rename, renamenx, scan, touch, ttl, type, unlink, lindex, linsert, llen, lpop, lpush, lpushx, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, rpushx, dbsize, flushall, flushdb, info, time, sadd, scard, sdiff, sdiffstore, sinter, sinterstore, sismember, smembers, smove, spop, srandmember, srem, sunion, sunionstore, zadd, zcard, zcount, zincrby, zinterstore, zlexcount, zpopmax, zpopmin, zrange, zrangebylex, zrangebyscore, zrank, zrem, zremrangebylex, zremrangebyrank, zremrangebyscore, zrevrange, zrevrangebylex, zrevrangebyscore, zrevrank, zscore, zunionstore, } = upstash();
|
|
3
2
|
export default upstash;
|
|
4
|
-
|
|
3
|
+
export const { auth, append, decr, decrby, get, getrange, getset, incr, incrby, incrbyfloat, mget, mset, msetnx, psetex, set, setex, setnx, setrange, strlen, bitcount, bitop, bitpos, getbit, setbit, echo, ping, hdel, hexists, hget, hgetall, hincrby, hincrbyfloat, hkeys, hlen, hmget, hmset, hscan, hset, hsetnx, hvals, del, exists, expire, expireat, keys, persist, pexpire, pexpireat, pttl, randomkey, rename, renamenx, scan, touch, ttl, type, unlink, lindex, linsert, llen, lpop, lpush, lpushx, lrange, lrem, lset, ltrim, rpop, rpoplpush, rpush, rpushx, dbsize, flushall, flushdb, info, time, sadd, scard, sdiff, sdiffstore, sinter, sinterstore, sismember, smembers, smove, spop, srandmember, srem, sunion, sunionstore, zadd, zcard, zcount, zincrby, zinterstore, zlexcount, zpopmax, zpopmin, zrange, zrangebylex, zrangebyscore, zrank, zrem, zremrangebylex, zremrangebyrank, zremrangebyscore, zrevrange, zrevrangebylex, zrevrangebyscore, zrevrank, zscore, zunionstore, } = upstash();
|
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
export declare type ClientObjectProps = {
|
|
2
2
|
url?: undefined | string;
|
|
3
3
|
token?: undefined | string;
|
|
4
|
-
|
|
5
|
-
readFromEdge?: boolean;
|
|
4
|
+
requestOptions?: undefined | RequestInit;
|
|
6
5
|
};
|
|
7
|
-
export declare type EdgeCacheType = null | 'miss' | 'hit';
|
|
8
6
|
export declare type ReturnType = {
|
|
9
7
|
data: string | number | [] | any;
|
|
10
8
|
error: string | null;
|
|
11
|
-
metadata?: {
|
|
12
|
-
edge: boolean;
|
|
13
|
-
cache: EdgeCacheType;
|
|
14
|
-
};
|
|
15
9
|
};
|
|
16
10
|
export declare type MethodReturn = Promise<ReturnType>;
|
|
17
|
-
export declare type RequestConfig = undefined | {
|
|
18
|
-
edge?: boolean;
|
|
19
|
-
};
|
|
20
11
|
export declare type Part = string | boolean | number;
|
|
21
12
|
declare type Auth1 = (options?: ClientObjectProps) => void;
|
|
22
13
|
declare type Auth2 = (url?: string, token?: string) => void;
|
|
@@ -136,4 +127,3 @@ export declare type Upstash = {
|
|
|
136
127
|
zunionstore: (...args: any) => MethodReturn;
|
|
137
128
|
};
|
|
138
129
|
export {};
|
|
139
|
-
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upstash/redis",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "An HTTP/REST based Redis client built on top of Upstash REST API.",
|
|
5
5
|
"author": "Adem ilter <adem@upstash.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"main": "dist/main/index.js",
|
|
8
|
-
"types": "dist/main/index.d.ts",
|
|
7
|
+
"main": "dist/main/index-cjs.js",
|
|
9
8
|
"module": "dist/module/index.js",
|
|
10
|
-
"
|
|
11
|
-
"unpkg": "dist/umd/upstash-redis.js",
|
|
9
|
+
"types": "dist/module/index.d.ts",
|
|
12
10
|
"scripts": {
|
|
13
11
|
"clean": "rimraf dist",
|
|
14
12
|
"format": "prettier --write \"{src,test}/**/*.ts\"",
|
|
15
13
|
"build": "run-s clean format build:*",
|
|
16
14
|
"build:main": "tsc -p tsconfig.json",
|
|
17
15
|
"build:module": "tsc -p tsconfig.module.json",
|
|
18
|
-
"build:umd": "webpack",
|
|
19
16
|
"test": "jest --runInBand && npm run size",
|
|
20
17
|
"size": "size-limit"
|
|
21
18
|
},
|
|
@@ -23,34 +20,28 @@
|
|
|
23
20
|
"isomorphic-unfetch": "^3.1.0"
|
|
24
21
|
},
|
|
25
22
|
"devDependencies": {
|
|
26
|
-
"@size-limit/preset-small-lib": "^
|
|
27
|
-
"@types/jest": "^
|
|
23
|
+
"@size-limit/preset-small-lib": "^6.0.4",
|
|
24
|
+
"@types/jest": "^27.0.2",
|
|
28
25
|
"@types/node-fetch": "^2.5.12",
|
|
29
26
|
"dotenv": "^10.0.0",
|
|
30
|
-
"jest": "^27.
|
|
31
|
-
"nanoid": "^3.1.
|
|
27
|
+
"jest": "^27.3.1",
|
|
28
|
+
"nanoid": "^3.1.30",
|
|
32
29
|
"npm-run-all": "^4.1.5",
|
|
33
30
|
"prettier": "^2.3.2",
|
|
34
31
|
"rimraf": "^3.0.2",
|
|
35
|
-
"size-limit": "^
|
|
36
|
-
"ts-jest": "^27.0.
|
|
37
|
-
"ts-loader": "^9.2.
|
|
38
|
-
"typescript": "^4.
|
|
39
|
-
"webpack": "^5.49.0",
|
|
40
|
-
"webpack-cli": "^4.7.2"
|
|
32
|
+
"size-limit": "^6.0.4",
|
|
33
|
+
"ts-jest": "^27.0.7",
|
|
34
|
+
"ts-loader": "^9.2.6",
|
|
35
|
+
"typescript": "^4.5.2"
|
|
41
36
|
},
|
|
42
37
|
"size-limit": [
|
|
43
38
|
{
|
|
44
|
-
"path": "dist/main/index.js",
|
|
45
|
-
"limit": "
|
|
39
|
+
"path": "dist/main/index-cjs.js",
|
|
40
|
+
"limit": "3 KB"
|
|
46
41
|
},
|
|
47
42
|
{
|
|
48
43
|
"path": "dist/module/index.js",
|
|
49
|
-
"limit": "
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"path": "dist/umd/upstash-redis.js",
|
|
53
|
-
"limit": "5 KB"
|
|
44
|
+
"limit": "3 KB"
|
|
54
45
|
}
|
|
55
46
|
],
|
|
56
47
|
"prettier": {
|