@upstash/redis 1.0.1 → 1.1.0-alpha.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-HGM7M7CJ.mjs → chunk-3O2RMOYK.mjs} +6 -0
- package/{chunk-2EIGUPGW.mjs → chunk-45MG55KM.mjs} +3 -3
- package/{chunk-WPH7MAB2.mjs → chunk-5GTJT4CY.mjs} +1 -1
- package/cloudflare.d.ts +2 -2
- package/cloudflare.js +8 -2
- package/cloudflare.mjs +2 -2
- package/commands.d.ts +11 -4
- package/commands.js +6 -0
- package/commands.mjs +1 -1
- package/fastly.d.ts +2 -2
- package/fastly.js +8 -2
- package/fastly.mjs +2 -2
- package/index.d.ts +2 -2
- package/index.js +8 -2
- package/index.mjs +3 -3
- package/nodejs.d.ts +2 -2
- package/nodejs.js +8 -2
- package/nodejs.mjs +3 -3
- package/package.json +1 -1
- package/{redis-05a33429.d.ts → redis-a5141bfc.d.ts} +34 -6
- package/{zunionstore-98bb4d18.d.ts → zunionstore-342168a6.d.ts} +18 -10
|
@@ -861,6 +861,12 @@ var ZPopMinCommand = class extends Command {
|
|
|
861
861
|
var ZRangeCommand = class extends Command {
|
|
862
862
|
constructor(key, min, max, opts) {
|
|
863
863
|
const command = ["zrange", key, min, max];
|
|
864
|
+
if (opts == null ? void 0 : opts.byScore) {
|
|
865
|
+
command.push("byscore");
|
|
866
|
+
}
|
|
867
|
+
if (opts == null ? void 0 : opts.byLex) {
|
|
868
|
+
command.push("bylex");
|
|
869
|
+
}
|
|
864
870
|
if (opts == null ? void 0 : opts.withScores) {
|
|
865
871
|
command.push("withscores");
|
|
866
872
|
}
|
|
@@ -106,7 +106,7 @@ import {
|
|
|
106
106
|
ZScanCommand,
|
|
107
107
|
ZScoreCommand,
|
|
108
108
|
ZUnionStoreCommand
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-3O2RMOYK.mjs";
|
|
110
110
|
import {
|
|
111
111
|
UpstashError
|
|
112
112
|
} from "./chunk-7YUZYRJS.mjs";
|
|
@@ -231,7 +231,7 @@ var Pipeline = class {
|
|
|
231
231
|
this.zlexcount = (...args) => this.chain(new ZLexCountCommand(...args));
|
|
232
232
|
this.zpopmax = (...args) => this.chain(new ZPopMaxCommand(...args));
|
|
233
233
|
this.zpopmin = (...args) => this.chain(new ZPopMinCommand(...args));
|
|
234
|
-
this.zrange = (...args) => this.chain(new ZRangeCommand(
|
|
234
|
+
this.zrange = (...args) => this.chain(new ZRangeCommand(args[0], args[1], args[2], args[3]));
|
|
235
235
|
this.zrank = (key, member) => this.chain(new ZRankCommand(key, member));
|
|
236
236
|
this.zrem = (key, ...members) => this.chain(new ZRemCommand(key, ...members));
|
|
237
237
|
this.zremrangebylex = (...args) => this.chain(new ZRemRangeByLexCommand(...args));
|
|
@@ -356,7 +356,7 @@ var Redis = class {
|
|
|
356
356
|
this.zlexcount = (...args) => new ZLexCountCommand(...args).exec(this.client);
|
|
357
357
|
this.zpopmax = (...args) => new ZPopMaxCommand(...args).exec(this.client);
|
|
358
358
|
this.zpopmin = (...args) => new ZPopMinCommand(...args).exec(this.client);
|
|
359
|
-
this.zrange = (...args) => new ZRangeCommand(
|
|
359
|
+
this.zrange = (...args) => new ZRangeCommand(args[0], args[1], args[2], args[3]).exec(this.client);
|
|
360
360
|
this.zrank = (key, member) => new ZRankCommand(key, member).exec(this.client);
|
|
361
361
|
this.zrem = (key, ...members) => new ZRemCommand(key, ...members).exec(this.client);
|
|
362
362
|
this.zremrangebylex = (...args) => new ZRemRangeByLexCommand(...args).exec(this.client);
|
package/cloudflare.d.ts
CHANGED
package/cloudflare.js
CHANGED
|
@@ -908,6 +908,12 @@ var ZPopMinCommand = class extends Command {
|
|
|
908
908
|
var ZRangeCommand = class extends Command {
|
|
909
909
|
constructor(key, min, max, opts) {
|
|
910
910
|
const command = ["zrange", key, min, max];
|
|
911
|
+
if (opts == null ? void 0 : opts.byScore) {
|
|
912
|
+
command.push("byscore");
|
|
913
|
+
}
|
|
914
|
+
if (opts == null ? void 0 : opts.byLex) {
|
|
915
|
+
command.push("bylex");
|
|
916
|
+
}
|
|
911
917
|
if (opts == null ? void 0 : opts.withScores) {
|
|
912
918
|
command.push("withscores");
|
|
913
919
|
}
|
|
@@ -1121,7 +1127,7 @@ var Pipeline = class {
|
|
|
1121
1127
|
this.zlexcount = (...args) => this.chain(new ZLexCountCommand(...args));
|
|
1122
1128
|
this.zpopmax = (...args) => this.chain(new ZPopMaxCommand(...args));
|
|
1123
1129
|
this.zpopmin = (...args) => this.chain(new ZPopMinCommand(...args));
|
|
1124
|
-
this.zrange = (...args) => this.chain(new ZRangeCommand(
|
|
1130
|
+
this.zrange = (...args) => this.chain(new ZRangeCommand(args[0], args[1], args[2], args[3]));
|
|
1125
1131
|
this.zrank = (key, member) => this.chain(new ZRankCommand(key, member));
|
|
1126
1132
|
this.zrem = (key, ...members) => this.chain(new ZRemCommand(key, ...members));
|
|
1127
1133
|
this.zremrangebylex = (...args) => this.chain(new ZRemRangeByLexCommand(...args));
|
|
@@ -1246,7 +1252,7 @@ var Redis = class {
|
|
|
1246
1252
|
this.zlexcount = (...args) => new ZLexCountCommand(...args).exec(this.client);
|
|
1247
1253
|
this.zpopmax = (...args) => new ZPopMaxCommand(...args).exec(this.client);
|
|
1248
1254
|
this.zpopmin = (...args) => new ZPopMinCommand(...args).exec(this.client);
|
|
1249
|
-
this.zrange = (...args) => new ZRangeCommand(
|
|
1255
|
+
this.zrange = (...args) => new ZRangeCommand(args[0], args[1], args[2], args[3]).exec(this.client);
|
|
1250
1256
|
this.zrank = (key, member) => new ZRankCommand(key, member).exec(this.client);
|
|
1251
1257
|
this.zrem = (key, ...members) => new ZRemCommand(key, ...members).exec(this.client);
|
|
1252
1258
|
this.zremrangebylex = (...args) => new ZRemRangeByLexCommand(...args).exec(this.client);
|
package/cloudflare.mjs
CHANGED
package/commands.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { g as Command, N as NonEmptyArray, S as ScanCommandOptions } from './zunionstore-342168a6';
|
|
2
|
+
export { g as Command, h as ScanCommand, S as ScanCommandOptions, b as ScoreMember, i as SetCommand, a as SetCommandOptions, T as Type, j as TypeCommand, U as UnlinkCommand, k as ZAddCommand, Z as ZAddCommandOptions, c as ZAddCommandOptionsWithIncr, l as ZInterStoreCommand, d as ZInterStoreCommandOptions, m as ZRangeCommand, e as ZRangeCommandOptions, n as ZUnionStoreCommand, f as ZUnionStoreCommandOptions } from './zunionstore-342168a6';
|
|
3
3
|
import './http';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -70,7 +70,7 @@ declare class EchoCommand extends Command<string, string> {
|
|
|
70
70
|
/**
|
|
71
71
|
* @see https://redis.io/commands/exists
|
|
72
72
|
*/
|
|
73
|
-
declare class ExistsCommand extends Command<
|
|
73
|
+
declare class ExistsCommand extends Command<number, number> {
|
|
74
74
|
constructor(...keys: NonEmptyArray<string>);
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -599,6 +599,13 @@ declare class TimeCommand extends Command<[number, number], [number, number]> {
|
|
|
599
599
|
constructor();
|
|
600
600
|
}
|
|
601
601
|
|
|
602
|
+
/**
|
|
603
|
+
* @see https://redis.io/commands/touch
|
|
604
|
+
*/
|
|
605
|
+
declare class TouchCommand extends Command<number, number> {
|
|
606
|
+
constructor(...keys: NonEmptyArray<string>);
|
|
607
|
+
}
|
|
608
|
+
|
|
602
609
|
/**
|
|
603
610
|
* @see https://redis.io/commands/ttl
|
|
604
611
|
*/
|
|
@@ -710,4 +717,4 @@ declare class ZScoreCommand<TData> extends Command<number | null, string | null>
|
|
|
710
717
|
constructor(key: string, member: TData);
|
|
711
718
|
}
|
|
712
719
|
|
|
713
|
-
export { AppendCommand, BitCountCommand, BitOpCommand, BitPosCommand, DBSizeCommand, DecrByCommand, DecrCommand, DelCommand, EchoCommand, ExistsCommand, ExpireAtCommand, ExpireCommand, FlushAllCommand, FlushDBCommand, GetBitCommand, GetCommand, GetRangeCommand, GetSetCommand, HDelCommand, HExistsCommand, HGetAllCommand, HGetCommand, HIncrByCommand, HIncrByFloatCommand, HKeysCommand, HLenCommand, HMGetCommand, HMSetCommand, HScanCommand, HSetCommand, HSetNXCommand, HStrLenCommand, HValsCommand, IncrByCommand, IncrByFloatCommand, IncrCommand, KeysCommand, LIndexCommand, LInsertCommand, LLenCommand, LPopCommand, LPushCommand, LPushXCommand, LRangeCommand, LRemCommand, LSetCommand, LTrimCommand, MGetCommand, MSetCommand, MSetNXCommand, PExpireAtCommand, PExpireCommand, PSetEXCommand, PTtlCommand, PersistCommand, PingCommand, RPopCommand, RPushCommand, RPushXCommand, RandomKeyCommand, RenameCommand, RenameNXCommand, SAddCommand, SCardCommand, SDiffCommand, SDiffStoreCommand, SInterCommand, SInterStoreCommand, SIsMemberCommand, SMembersCommand, SMoveCommand, SPopCommand, SRandMemberCommand, SRemCommand, SScanCommand, SUnionCommand, SUnionStoreCommand, SetBitCommand, SetExCommand, SetNxCommand, SetRangeCommand, StrLenCommand, TimeCommand, TtlCommand, ZCardCommand, ZCountCommand, ZIncrByComand, ZLexCountCommand, ZPopMaxCommand, ZPopMinCommand, ZRankCommand, ZRemCommand, ZRemRangeByLexCommand, ZRemRangeByRankCommand, ZRemRangeByScoreCommand, ZRevRankCommand, ZScanCommand, ZScoreCommand };
|
|
720
|
+
export { AppendCommand, BitCountCommand, BitOpCommand, BitPosCommand, DBSizeCommand, DecrByCommand, DecrCommand, DelCommand, EchoCommand, ExistsCommand, ExpireAtCommand, ExpireCommand, FlushAllCommand, FlushDBCommand, GetBitCommand, GetCommand, GetRangeCommand, GetSetCommand, HDelCommand, HExistsCommand, HGetAllCommand, HGetCommand, HIncrByCommand, HIncrByFloatCommand, HKeysCommand, HLenCommand, HMGetCommand, HMSetCommand, HScanCommand, HSetCommand, HSetNXCommand, HStrLenCommand, HValsCommand, IncrByCommand, IncrByFloatCommand, IncrCommand, KeysCommand, LIndexCommand, LInsertCommand, LLenCommand, LPopCommand, LPushCommand, LPushXCommand, LRangeCommand, LRemCommand, LSetCommand, LTrimCommand, MGetCommand, MSetCommand, MSetNXCommand, PExpireAtCommand, PExpireCommand, PSetEXCommand, PTtlCommand, PersistCommand, PingCommand, RPopCommand, RPushCommand, RPushXCommand, RandomKeyCommand, RenameCommand, RenameNXCommand, SAddCommand, SCardCommand, SDiffCommand, SDiffStoreCommand, SInterCommand, SInterStoreCommand, SIsMemberCommand, SMembersCommand, SMoveCommand, SPopCommand, SRandMemberCommand, SRemCommand, SScanCommand, SUnionCommand, SUnionStoreCommand, SetBitCommand, SetExCommand, SetNxCommand, SetRangeCommand, StrLenCommand, TimeCommand, TouchCommand, TtlCommand, ZCardCommand, ZCountCommand, ZIncrByComand, ZLexCountCommand, ZPopMaxCommand, ZPopMinCommand, ZRankCommand, ZRemCommand, ZRemRangeByLexCommand, ZRemRangeByRankCommand, ZRemRangeByScoreCommand, ZRevRankCommand, ZScanCommand, ZScoreCommand };
|
package/commands.js
CHANGED
|
@@ -1001,6 +1001,12 @@ var ZPopMinCommand = class extends Command {
|
|
|
1001
1001
|
var ZRangeCommand = class extends Command {
|
|
1002
1002
|
constructor(key, min, max, opts) {
|
|
1003
1003
|
const command = ["zrange", key, min, max];
|
|
1004
|
+
if (opts == null ? void 0 : opts.byScore) {
|
|
1005
|
+
command.push("byscore");
|
|
1006
|
+
}
|
|
1007
|
+
if (opts == null ? void 0 : opts.byLex) {
|
|
1008
|
+
command.push("bylex");
|
|
1009
|
+
}
|
|
1004
1010
|
if (opts == null ? void 0 : opts.withScores) {
|
|
1005
1011
|
command.push("withscores");
|
|
1006
1012
|
}
|
package/commands.mjs
CHANGED
package/fastly.d.ts
CHANGED
package/fastly.js
CHANGED
|
@@ -908,6 +908,12 @@ var ZPopMinCommand = class extends Command {
|
|
|
908
908
|
var ZRangeCommand = class extends Command {
|
|
909
909
|
constructor(key, min, max, opts) {
|
|
910
910
|
const command = ["zrange", key, min, max];
|
|
911
|
+
if (opts == null ? void 0 : opts.byScore) {
|
|
912
|
+
command.push("byscore");
|
|
913
|
+
}
|
|
914
|
+
if (opts == null ? void 0 : opts.byLex) {
|
|
915
|
+
command.push("bylex");
|
|
916
|
+
}
|
|
911
917
|
if (opts == null ? void 0 : opts.withScores) {
|
|
912
918
|
command.push("withscores");
|
|
913
919
|
}
|
|
@@ -1121,7 +1127,7 @@ var Pipeline = class {
|
|
|
1121
1127
|
this.zlexcount = (...args) => this.chain(new ZLexCountCommand(...args));
|
|
1122
1128
|
this.zpopmax = (...args) => this.chain(new ZPopMaxCommand(...args));
|
|
1123
1129
|
this.zpopmin = (...args) => this.chain(new ZPopMinCommand(...args));
|
|
1124
|
-
this.zrange = (...args) => this.chain(new ZRangeCommand(
|
|
1130
|
+
this.zrange = (...args) => this.chain(new ZRangeCommand(args[0], args[1], args[2], args[3]));
|
|
1125
1131
|
this.zrank = (key, member) => this.chain(new ZRankCommand(key, member));
|
|
1126
1132
|
this.zrem = (key, ...members) => this.chain(new ZRemCommand(key, ...members));
|
|
1127
1133
|
this.zremrangebylex = (...args) => this.chain(new ZRemRangeByLexCommand(...args));
|
|
@@ -1246,7 +1252,7 @@ var Redis = class {
|
|
|
1246
1252
|
this.zlexcount = (...args) => new ZLexCountCommand(...args).exec(this.client);
|
|
1247
1253
|
this.zpopmax = (...args) => new ZPopMaxCommand(...args).exec(this.client);
|
|
1248
1254
|
this.zpopmin = (...args) => new ZPopMinCommand(...args).exec(this.client);
|
|
1249
|
-
this.zrange = (...args) => new ZRangeCommand(
|
|
1255
|
+
this.zrange = (...args) => new ZRangeCommand(args[0], args[1], args[2], args[3]).exec(this.client);
|
|
1250
1256
|
this.zrank = (key, member) => new ZRankCommand(key, member).exec(this.client);
|
|
1251
1257
|
this.zrem = (key, ...members) => new ZRemCommand(key, ...members).exec(this.client);
|
|
1252
1258
|
this.zremrangebylex = (...args) => new ZRemRangeByLexCommand(...args).exec(this.client);
|
package/fastly.mjs
CHANGED
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -909,6 +909,12 @@ var ZPopMinCommand = class extends Command {
|
|
|
909
909
|
var ZRangeCommand = class extends Command {
|
|
910
910
|
constructor(key, min, max, opts) {
|
|
911
911
|
const command = ["zrange", key, min, max];
|
|
912
|
+
if (opts == null ? void 0 : opts.byScore) {
|
|
913
|
+
command.push("byscore");
|
|
914
|
+
}
|
|
915
|
+
if (opts == null ? void 0 : opts.byLex) {
|
|
916
|
+
command.push("bylex");
|
|
917
|
+
}
|
|
912
918
|
if (opts == null ? void 0 : opts.withScores) {
|
|
913
919
|
command.push("withscores");
|
|
914
920
|
}
|
|
@@ -1122,7 +1128,7 @@ var Pipeline = class {
|
|
|
1122
1128
|
this.zlexcount = (...args) => this.chain(new ZLexCountCommand(...args));
|
|
1123
1129
|
this.zpopmax = (...args) => this.chain(new ZPopMaxCommand(...args));
|
|
1124
1130
|
this.zpopmin = (...args) => this.chain(new ZPopMinCommand(...args));
|
|
1125
|
-
this.zrange = (...args) => this.chain(new ZRangeCommand(
|
|
1131
|
+
this.zrange = (...args) => this.chain(new ZRangeCommand(args[0], args[1], args[2], args[3]));
|
|
1126
1132
|
this.zrank = (key, member) => this.chain(new ZRankCommand(key, member));
|
|
1127
1133
|
this.zrem = (key, ...members) => this.chain(new ZRemCommand(key, ...members));
|
|
1128
1134
|
this.zremrangebylex = (...args) => this.chain(new ZRemRangeByLexCommand(...args));
|
|
@@ -1247,7 +1253,7 @@ var Redis = class {
|
|
|
1247
1253
|
this.zlexcount = (...args) => new ZLexCountCommand(...args).exec(this.client);
|
|
1248
1254
|
this.zpopmax = (...args) => new ZPopMaxCommand(...args).exec(this.client);
|
|
1249
1255
|
this.zpopmin = (...args) => new ZPopMinCommand(...args).exec(this.client);
|
|
1250
|
-
this.zrange = (...args) => new ZRangeCommand(
|
|
1256
|
+
this.zrange = (...args) => new ZRangeCommand(args[0], args[1], args[2], args[3]).exec(this.client);
|
|
1251
1257
|
this.zrank = (key, member) => new ZRankCommand(key, member).exec(this.client);
|
|
1252
1258
|
this.zrem = (key, ...members) => new ZRemCommand(key, ...members).exec(this.client);
|
|
1253
1259
|
this.zremrangebylex = (...args) => new ZRemRangeByLexCommand(...args).exec(this.client);
|
package/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Redis
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-5GTJT4CY.mjs";
|
|
4
|
+
import "./chunk-45MG55KM.mjs";
|
|
5
|
+
import "./chunk-3O2RMOYK.mjs";
|
|
6
6
|
import "./chunk-HIDCSH5S.mjs";
|
|
7
7
|
import {
|
|
8
8
|
UpstashError
|
package/nodejs.d.ts
CHANGED
package/nodejs.js
CHANGED
|
@@ -908,6 +908,12 @@ var ZPopMinCommand = class extends Command {
|
|
|
908
908
|
var ZRangeCommand = class extends Command {
|
|
909
909
|
constructor(key, min, max, opts) {
|
|
910
910
|
const command = ["zrange", key, min, max];
|
|
911
|
+
if (opts == null ? void 0 : opts.byScore) {
|
|
912
|
+
command.push("byscore");
|
|
913
|
+
}
|
|
914
|
+
if (opts == null ? void 0 : opts.byLex) {
|
|
915
|
+
command.push("bylex");
|
|
916
|
+
}
|
|
911
917
|
if (opts == null ? void 0 : opts.withScores) {
|
|
912
918
|
command.push("withscores");
|
|
913
919
|
}
|
|
@@ -1121,7 +1127,7 @@ var Pipeline = class {
|
|
|
1121
1127
|
this.zlexcount = (...args) => this.chain(new ZLexCountCommand(...args));
|
|
1122
1128
|
this.zpopmax = (...args) => this.chain(new ZPopMaxCommand(...args));
|
|
1123
1129
|
this.zpopmin = (...args) => this.chain(new ZPopMinCommand(...args));
|
|
1124
|
-
this.zrange = (...args) => this.chain(new ZRangeCommand(
|
|
1130
|
+
this.zrange = (...args) => this.chain(new ZRangeCommand(args[0], args[1], args[2], args[3]));
|
|
1125
1131
|
this.zrank = (key, member) => this.chain(new ZRankCommand(key, member));
|
|
1126
1132
|
this.zrem = (key, ...members) => this.chain(new ZRemCommand(key, ...members));
|
|
1127
1133
|
this.zremrangebylex = (...args) => this.chain(new ZRemRangeByLexCommand(...args));
|
|
@@ -1246,7 +1252,7 @@ var Redis = class {
|
|
|
1246
1252
|
this.zlexcount = (...args) => new ZLexCountCommand(...args).exec(this.client);
|
|
1247
1253
|
this.zpopmax = (...args) => new ZPopMaxCommand(...args).exec(this.client);
|
|
1248
1254
|
this.zpopmin = (...args) => new ZPopMinCommand(...args).exec(this.client);
|
|
1249
|
-
this.zrange = (...args) => new ZRangeCommand(
|
|
1255
|
+
this.zrange = (...args) => new ZRangeCommand(args[0], args[1], args[2], args[3]).exec(this.client);
|
|
1250
1256
|
this.zrank = (key, member) => new ZRankCommand(key, member).exec(this.client);
|
|
1251
1257
|
this.zrem = (key, ...members) => new ZRemCommand(key, ...members).exec(this.client);
|
|
1252
1258
|
this.zremrangebylex = (...args) => new ZRemRangeByLexCommand(...args).exec(this.client);
|
package/nodejs.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Redis
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-5GTJT4CY.mjs";
|
|
4
|
+
import "./chunk-45MG55KM.mjs";
|
|
5
|
+
import "./chunk-3O2RMOYK.mjs";
|
|
6
6
|
import "./chunk-HIDCSH5S.mjs";
|
|
7
7
|
import "./chunk-7YUZYRJS.mjs";
|
|
8
8
|
export {
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "@upstash/redis", "version": "v1.0.
|
|
1
|
+
{ "name": "@upstash/redis", "version": "v1.1.0-alpha.0", "engines": { "node": ">=10" }, "description": "An HTTP/REST based Redis client built on top of Upstash REST API.", "main": "./index.js", "module": "./index.mjs", "types": "./index.d.ts", "scripts": { "test": "jest -i", "fmt": "pnpm lint && pnpm prettier --write .", "lint": "eslint --ext .ts --fix --ignore-path .gitignore .", "build": "tsup && cp package.json ./dist/ && pnpm size-limit" }, "repository": { "type": "git", "url": "git+https://github.com/upstash/upstash-redis.git" }, "keywords": [ "redis", "database", "serverless", "edge", "upstash" ], "author": "Andreas Thomas <andreas.thomas@chronark.com>", "license": "MIT", "bugs": { "url": "https://github.com/upstash/upstash-redis/issues" }, "homepage": "https://github.com/upstash/upstash-redis#readme", "directories": { "examples": "examples" }, "devDependencies": { "@jest/globals": "^27.4.6", "@size-limit/preset-small-lib": "^7.0.8", "@trivago/prettier-plugin-sort-imports": "^3.2.0", "@types/jest": "^27.4.0", "@types/node": "^17.0.8", "@typescript-eslint/eslint-plugin": "^5.9.1", "@typescript-eslint/parser": "^5.9.1", "dotenv": "^12.0.3", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-prettier": "^4.0.0", "jest": "^27.4.7", "prettier": "^2.5.1", "size-limit": "^7.0.8", "ts-jest": "^27.1.3", "tsup": "^5.11.11", "typescript": "^4.5.5" }, "dependencies": { "isomorphic-fetch": "^3.0.0" }, "browser": { "isomorphic-fetch": false }, "size-limit": [ { "path": "dist/index.js", "limit": "5 KB" }, { "path": "dist/index.mjs", "limit": "5 KB" }, { "path": "dist/cloudflare.js", "limit": "5 KB" }, { "path": "dist/cloudflare.mjs", "limit": "5 KB" }, { "path": "dist/nodejs.js", "limit": "5 KB" }, { "path": "dist/nodejs.mjs", "limit": "5 KB" }, { "path": "dist/fastly.js", "limit": "5 KB" }, { "path": "dist/fastly.mjs", "limit": "5 KB" } ] }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from './http';
|
|
2
|
-
import { S as ScanCommandOptions, a as SetCommandOptions, C as CommandArgs,
|
|
2
|
+
import { S as ScanCommandOptions, a as SetCommandOptions, C as CommandArgs, U as UnlinkCommand, b as ScoreMember, Z as ZAddCommandOptions, c as ZAddCommandOptionsWithIncr, d as ZInterStoreCommandOptions, e as ZRangeCommandOptions, f as ZUnionStoreCommandOptions, T as Type } from './zunionstore-342168a6';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Upstash REST API supports command pipelining to send multiple commands in
|
|
@@ -418,7 +418,7 @@ declare class Pipeline {
|
|
|
418
418
|
/**
|
|
419
419
|
* @see https://redis.io/commands/touch
|
|
420
420
|
*/
|
|
421
|
-
touch: (...
|
|
421
|
+
touch: (args_0: string, ...args_1: string[]) => this;
|
|
422
422
|
/**
|
|
423
423
|
* @see https://redis.io/commands/ttl
|
|
424
424
|
*/
|
|
@@ -466,7 +466,21 @@ declare class Pipeline {
|
|
|
466
466
|
/**
|
|
467
467
|
* @see https://redis.io/commands/zrange
|
|
468
468
|
*/
|
|
469
|
-
zrange: <TData extends unknown[]>(key: string, min: number
|
|
469
|
+
zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
|
|
470
|
+
key: string,
|
|
471
|
+
min: `(${string}` | `[${string}` | "-" | "+",
|
|
472
|
+
max: `(${string}` | `[${string}` | "-" | "+",
|
|
473
|
+
opts: {
|
|
474
|
+
byLex: true;
|
|
475
|
+
} & ZRangeCommandOptions
|
|
476
|
+
] | [
|
|
477
|
+
key: string,
|
|
478
|
+
min: number | `(${number}` | "-inf" | "+inf",
|
|
479
|
+
max: number | `(${number}` | "-inf" | "+inf",
|
|
480
|
+
opts: {
|
|
481
|
+
byScore: true;
|
|
482
|
+
} & ZRangeCommandOptions
|
|
483
|
+
]) => this;
|
|
470
484
|
/**
|
|
471
485
|
* @see https://redis.io/commands/zrank
|
|
472
486
|
*/
|
|
@@ -570,7 +584,7 @@ declare class Redis {
|
|
|
570
584
|
/**
|
|
571
585
|
* @see https://redis.io/commands/exists
|
|
572
586
|
*/
|
|
573
|
-
exists: (args_0: string, ...args_1: string[]) => Promise<
|
|
587
|
+
exists: (args_0: string, ...args_1: string[]) => Promise<number>;
|
|
574
588
|
/**
|
|
575
589
|
* @see https://redis.io/commands/expire
|
|
576
590
|
*/
|
|
@@ -886,7 +900,7 @@ declare class Redis {
|
|
|
886
900
|
/**
|
|
887
901
|
* @see https://redis.io/commands/touch
|
|
888
902
|
*/
|
|
889
|
-
touch: (...
|
|
903
|
+
touch: (args_0: string, ...args_1: string[]) => Promise<number>;
|
|
890
904
|
/**
|
|
891
905
|
* @see https://redis.io/commands/ttl
|
|
892
906
|
*/
|
|
@@ -934,7 +948,21 @@ declare class Redis {
|
|
|
934
948
|
/**
|
|
935
949
|
* @see https://redis.io/commands/zrange
|
|
936
950
|
*/
|
|
937
|
-
zrange: <TData extends unknown[]>(key: string, min: number
|
|
951
|
+
zrange: <TData extends unknown[]>(...args: [key: string, min: number, max: number, opts?: ZRangeCommandOptions] | [
|
|
952
|
+
key: string,
|
|
953
|
+
min: `(${string}` | `[${string}` | "-" | "+",
|
|
954
|
+
max: `(${string}` | `[${string}` | "-" | "+",
|
|
955
|
+
opts: {
|
|
956
|
+
byLex: true;
|
|
957
|
+
} & ZRangeCommandOptions
|
|
958
|
+
] | [
|
|
959
|
+
key: string,
|
|
960
|
+
min: number | `(${number}` | "-inf" | "+inf",
|
|
961
|
+
max: number | `(${number}` | "-inf" | "+inf",
|
|
962
|
+
opts: {
|
|
963
|
+
byScore: true;
|
|
964
|
+
} & ZRangeCommandOptions
|
|
965
|
+
]) => Promise<TData>;
|
|
938
966
|
/**
|
|
939
967
|
* @see https://redis.io/commands/zrank
|
|
940
968
|
*/
|
|
@@ -63,13 +63,6 @@ declare class SetCommand<TData, TResult = "OK"> extends Command<TData, TResult>
|
|
|
63
63
|
constructor(key: string, value: TData, opts?: SetCommandOptions);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
/**
|
|
67
|
-
* @see https://redis.io/commands/touch
|
|
68
|
-
*/
|
|
69
|
-
declare class TouchCommand extends Command<number, number> {
|
|
70
|
-
constructor(...keys: string[]);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
66
|
declare type Type = "string" | "list" | "set" | "zset" | "hash" | "none";
|
|
74
67
|
/**
|
|
75
68
|
* @see https://redis.io/commands/type
|
|
@@ -134,12 +127,27 @@ declare class ZInterStoreCommand extends Command<number, number> {
|
|
|
134
127
|
|
|
135
128
|
declare type ZRangeCommandOptions = {
|
|
136
129
|
withScores?: boolean;
|
|
137
|
-
}
|
|
130
|
+
} & ({
|
|
131
|
+
byScore: true;
|
|
132
|
+
byLex?: never;
|
|
133
|
+
} | {
|
|
134
|
+
byScore?: never;
|
|
135
|
+
byLex: true;
|
|
136
|
+
} | {
|
|
137
|
+
byScore?: never;
|
|
138
|
+
byLex?: never;
|
|
139
|
+
});
|
|
138
140
|
/**
|
|
139
141
|
* @see https://redis.io/commands/zrange
|
|
140
142
|
*/
|
|
141
143
|
declare class ZRangeCommand<TData extends unknown[]> extends Command<TData, string[]> {
|
|
142
|
-
constructor(key: string, min: number
|
|
144
|
+
constructor(key: string, min: number, max: number, opts?: ZRangeCommandOptions);
|
|
145
|
+
constructor(key: string, min: `(${string}` | `[${string}` | "-" | "+", max: `(${string}` | `[${string}` | "-" | "+", opts: {
|
|
146
|
+
byLex: true;
|
|
147
|
+
} & ZRangeCommandOptions);
|
|
148
|
+
constructor(key: string, min: number | `(${number}` | "-inf" | "+inf", max: number | `(${number}` | "-inf" | "+inf", opts: {
|
|
149
|
+
byScore: true;
|
|
150
|
+
} & ZRangeCommandOptions);
|
|
143
151
|
}
|
|
144
152
|
|
|
145
153
|
declare type ZUnionStoreCommandOptions = {
|
|
@@ -162,4 +170,4 @@ declare class ZUnionStoreCommand extends Command<number, number> {
|
|
|
162
170
|
constructor(destination: string, numKeys: number, keys: string[], opts?: ZUnionStoreCommandOptions);
|
|
163
171
|
}
|
|
164
172
|
|
|
165
|
-
export { CommandArgs as C, NonEmptyArray as N, ScanCommandOptions as S,
|
|
173
|
+
export { CommandArgs as C, NonEmptyArray as N, ScanCommandOptions as S, Type as T, UnlinkCommand as U, ZAddCommandOptions as Z, SetCommandOptions as a, ScoreMember as b, ZAddCommandOptionsWithIncr as c, ZInterStoreCommandOptions as d, ZRangeCommandOptions as e, ZUnionStoreCommandOptions as f, Command as g, ScanCommand as h, SetCommand as i, TypeCommand as j, ZAddCommand as k, ZInterStoreCommand as l, ZRangeCommand as m, ZUnionStoreCommand as n };
|