@upstash/redis 0.0.0-ci.f55d85c5 → 0.0.0-ci.fcd85d60
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/esm/pkg/commands/script_exists.js +1 -10
- package/package.json +21 -10
- package/script/pkg/commands/script_exists.js +1 -10
- package/types/pkg/commands/hmset.d.ts +2 -2
- package/types/pkg/commands/script_exists.d.ts +2 -4
- package/types/pkg/commands/sinterstore.d.ts +2 -2
- package/types/pkg/commands/spop.d.ts +1 -1
- package/types/pkg/pipeline.d.ts +2 -2
- package/types/pkg/redis.d.ts +4 -4
|
@@ -5,16 +5,7 @@ import { Command } from "./command.js";
|
|
|
5
5
|
export class ScriptExistsCommand extends Command {
|
|
6
6
|
constructor(hashes, opts) {
|
|
7
7
|
super(["script", "exists", ...hashes], {
|
|
8
|
-
deserialize: (result) =>
|
|
9
|
-
/**
|
|
10
|
-
* This isn't very pretty but it does the job.
|
|
11
|
-
* The user facing api is clean and will return a single `string` if they provided
|
|
12
|
-
* a single script hash, and an array of strings of the same length when given an
|
|
13
|
-
* array of hashes.
|
|
14
|
-
*/
|
|
15
|
-
const parsed = result;
|
|
16
|
-
return parsed.length === 1 ? parsed[0] : parsed;
|
|
17
|
-
},
|
|
8
|
+
deserialize: (result) => result,
|
|
18
9
|
...opts,
|
|
19
10
|
});
|
|
20
11
|
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"main": "./script/platforms/nodejs.js",
|
|
4
4
|
"types": "./types/platforms/nodejs.d.ts",
|
|
5
5
|
"name": "@upstash/redis",
|
|
6
|
-
"version": "v0.0.0-ci.
|
|
6
|
+
"version": "v0.0.0-ci.fcd85d60",
|
|
7
7
|
"description": "An HTTP/REST based Redis client built on top of Upstash REST API.",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -16,24 +16,27 @@
|
|
|
16
16
|
"edge",
|
|
17
17
|
"upstash"
|
|
18
18
|
],
|
|
19
|
-
"author": "Andreas Thomas <
|
|
19
|
+
"author": "Andreas Thomas <dev@chronark.com>",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"bugs": {
|
|
22
22
|
"url": "https://github.com/upstash/upstash-redis/issues"
|
|
23
23
|
},
|
|
24
|
-
"dependencies": {
|
|
25
|
-
"isomorphic-fetch": "^3.0.0"
|
|
26
|
-
},
|
|
27
24
|
"homepage": "https://github.com/upstash/upstash-redis#readme",
|
|
28
|
-
"browser": {
|
|
29
|
-
"isomorphic-fetch": false,
|
|
30
|
-
"http": false,
|
|
31
|
-
"https": false
|
|
32
|
-
},
|
|
33
25
|
"devDependencies": {
|
|
34
26
|
"@size-limit/preset-small-lib": "latest",
|
|
35
27
|
"size-limit": "latest"
|
|
36
28
|
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"isomorphic-fetch": "^3.0.0"
|
|
31
|
+
},
|
|
32
|
+
"typesVersions": {
|
|
33
|
+
"*": {
|
|
34
|
+
"nodejs": "./types/platforms/nodejs.d.ts",
|
|
35
|
+
"cloudflare": "./types/platforms/cloudflare.d.ts",
|
|
36
|
+
"fastly": "./types/platforms/fastly.d.ts",
|
|
37
|
+
"with-fetch": "./types/platforms/node_with_fetch.d.ts"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
37
40
|
"size-limit": [
|
|
38
41
|
{
|
|
39
42
|
"path": "esm/platforms/nodejs.js",
|
|
@@ -47,6 +50,10 @@
|
|
|
47
50
|
"path": "esm/platforms/cloudflare.js",
|
|
48
51
|
"limit": "5 KB"
|
|
49
52
|
},
|
|
53
|
+
{
|
|
54
|
+
"path": "esm/platforms/node_with_fetch.js",
|
|
55
|
+
"limit": "15 KB"
|
|
56
|
+
},
|
|
50
57
|
{
|
|
51
58
|
"path": "script/platforms/nodejs.js",
|
|
52
59
|
"limit": "10 KB"
|
|
@@ -58,6 +65,10 @@
|
|
|
58
65
|
{
|
|
59
66
|
"path": "script/platforms/cloudflare.js",
|
|
60
67
|
"limit": "10 KB"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"path": "script/platforms/node_with_fetch.js",
|
|
71
|
+
"limit": "15 KB"
|
|
61
72
|
}
|
|
62
73
|
],
|
|
63
74
|
"exports": {
|
|
@@ -8,16 +8,7 @@ const command_js_1 = require("./command.js");
|
|
|
8
8
|
class ScriptExistsCommand extends command_js_1.Command {
|
|
9
9
|
constructor(hashes, opts) {
|
|
10
10
|
super(["script", "exists", ...hashes], {
|
|
11
|
-
deserialize: (result) =>
|
|
12
|
-
/**
|
|
13
|
-
* This isn't very pretty but it does the job.
|
|
14
|
-
* The user facing api is clean and will return a single `string` if they provided
|
|
15
|
-
* a single script hash, and an array of strings of the same length when given an
|
|
16
|
-
* array of hashes.
|
|
17
|
-
*/
|
|
18
|
-
const parsed = result;
|
|
19
|
-
return parsed.length === 1 ? parsed[0] : parsed;
|
|
20
|
-
},
|
|
11
|
+
deserialize: (result) => result,
|
|
21
12
|
...opts,
|
|
22
13
|
});
|
|
23
14
|
}
|
|
@@ -2,8 +2,8 @@ import { Command, CommandOptions } from "./command.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/hmset
|
|
4
4
|
*/
|
|
5
|
-
export declare class HMSetCommand<TData> extends Command<
|
|
5
|
+
export declare class HMSetCommand<TData> extends Command<"OK", "OK"> {
|
|
6
6
|
constructor([key, kv]: [key: string, kv: {
|
|
7
7
|
[field: string]: TData;
|
|
8
|
-
}], opts?: CommandOptions<
|
|
8
|
+
}], opts?: CommandOptions<"OK", "OK">);
|
|
9
9
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Command, CommandOptions } from "./command.js";
|
|
2
|
-
declare type TupleOfLength<T, L extends number, R extends T[] = []> = R["length"] extends L ? R : TupleOfLength<T, L, [...R, T]>;
|
|
3
2
|
/**
|
|
4
3
|
* @see https://redis.io/commands/script-exists
|
|
5
4
|
*/
|
|
6
|
-
export declare class ScriptExistsCommand<T extends
|
|
7
|
-
constructor(hashes: T, opts?: CommandOptions<
|
|
5
|
+
export declare class ScriptExistsCommand<T extends string[]> extends Command<string[], number[]> {
|
|
6
|
+
constructor(hashes: T, opts?: CommandOptions<string[], number[]>);
|
|
8
7
|
}
|
|
9
|
-
export {};
|
|
@@ -2,6 +2,6 @@ import { Command, CommandOptions } from "./command.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/sinterstore
|
|
4
4
|
*/
|
|
5
|
-
export declare class SInterStoreCommand
|
|
6
|
-
constructor(cmd: [destination: string, key: string, ...keys: string[]], opts?: CommandOptions<
|
|
5
|
+
export declare class SInterStoreCommand extends Command<number, number> {
|
|
6
|
+
constructor(cmd: [destination: string, key: string, ...keys: string[]], opts?: CommandOptions<number, number>);
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@ import { Command, CommandOptions } from "./command.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* @see https://redis.io/commands/spop
|
|
4
4
|
*/
|
|
5
|
-
export declare class SPopCommand<TData
|
|
5
|
+
export declare class SPopCommand<TData> extends Command<string | null, TData | null> {
|
|
6
6
|
constructor([key, count]: [key: string, count?: number], opts?: CommandOptions<string | null, TData | null>);
|
|
7
7
|
}
|
package/types/pkg/pipeline.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DelCommand, ExistsCommand, FlushAllCommand, PingCommand, ScoreMember, SetCommandOptions, TouchCommand, UnlinkCommand, ZAddCommandOptions, ZAddCommandOptionsWithIncr, ZRangeCommandOptions } from "./commands/mod.js";
|
|
1
|
+
import { DelCommand, ExistsCommand, FlushAllCommand, PingCommand, ScoreMember, ScriptExistsCommand, SetCommandOptions, TouchCommand, UnlinkCommand, ZAddCommandOptions, ZAddCommandOptionsWithIncr, ZRangeCommandOptions } from "./commands/mod.js";
|
|
2
2
|
import { CommandOptions } from "./commands/command.js";
|
|
3
3
|
import { Requester } from "./http.js";
|
|
4
4
|
import { CommandArgs } from "./types.js";
|
|
@@ -349,7 +349,7 @@ export declare class Pipeline {
|
|
|
349
349
|
/**
|
|
350
350
|
* @see https://redis.io/commands/script-exists
|
|
351
351
|
*/
|
|
352
|
-
scriptExists: (
|
|
352
|
+
scriptExists: (...args: CommandArgs<typeof ScriptExistsCommand>) => this;
|
|
353
353
|
/**
|
|
354
354
|
* @see https://redis.io/commands/script-flush
|
|
355
355
|
*/
|
package/types/pkg/redis.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CommandOptions, DelCommand, ExistsCommand, FlushAllCommand, PingCommand, ScoreMember, SetCommandOptions, TouchCommand, UnlinkCommand, ZAddCommandOptions, ZAddCommandOptionsWithIncr, ZRangeCommandOptions } from "./commands/mod.js";
|
|
1
|
+
import { CommandOptions, DelCommand, ExistsCommand, FlushAllCommand, PingCommand, ScoreMember, ScriptExistsCommand, SetCommandOptions, TouchCommand, UnlinkCommand, ZAddCommandOptions, ZAddCommandOptionsWithIncr, ZRangeCommandOptions } from "./commands/mod.js";
|
|
2
2
|
import { Requester } from "./http.js";
|
|
3
3
|
import { Pipeline } from "./pipeline.js";
|
|
4
4
|
import type { CommandArgs } from "./types.js";
|
|
@@ -160,7 +160,7 @@ export declare class Redis {
|
|
|
160
160
|
*/
|
|
161
161
|
hmset: <TData>(key: string, kv: {
|
|
162
162
|
[field: string]: TData;
|
|
163
|
-
}) => Promise<
|
|
163
|
+
}) => Promise<"OK">;
|
|
164
164
|
/**
|
|
165
165
|
* @see https://redis.io/commands/hscan
|
|
166
166
|
*/
|
|
@@ -322,7 +322,7 @@ export declare class Redis {
|
|
|
322
322
|
/**
|
|
323
323
|
* @see https://redis.io/commands/script-exists
|
|
324
324
|
*/
|
|
325
|
-
scriptExists: (
|
|
325
|
+
scriptExists: (...args: CommandArgs<typeof ScriptExistsCommand>) => Promise<number[]>;
|
|
326
326
|
/**
|
|
327
327
|
* @see https://redis.io/commands/script-flush
|
|
328
328
|
*/
|
|
@@ -366,7 +366,7 @@ export declare class Redis {
|
|
|
366
366
|
/**
|
|
367
367
|
* @see https://redis.io/commands/sinterstore
|
|
368
368
|
*/
|
|
369
|
-
sinterstore: (destination: string, key: string, ...keys: string[]) => Promise<
|
|
369
|
+
sinterstore: (destination: string, key: string, ...keys: string[]) => Promise<number>;
|
|
370
370
|
/**
|
|
371
371
|
* @see https://redis.io/commands/sismember
|
|
372
372
|
*/
|