@graphql-mesh/cache-upstash-redis 0.0.6 → 0.0.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/cjs/index.js +1 -2
- package/esm/index.js +1 -2
- package/package.json +2 -3
- package/typings/index.d.cts +1 -1
- package/typings/index.d.ts +1 -1
package/cjs/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const cross_helpers_1 = require("@graphql-mesh/cross-helpers");
|
|
4
|
-
const utils_1 = require("@graphql-mesh/utils");
|
|
5
4
|
const redis_1 = require("@upstash/redis");
|
|
6
5
|
const disposablestack_1 = require("@whatwg-node/disposablestack");
|
|
7
6
|
class UpstashRedisCache {
|
|
@@ -30,7 +29,7 @@ class UpstashRedisCache {
|
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
delete(key) {
|
|
33
|
-
return
|
|
32
|
+
return this.redis.del(key).then(num => num > 0);
|
|
34
33
|
}
|
|
35
34
|
async getKeysByPrefix(prefix) {
|
|
36
35
|
const keys = [];
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { process } from '@graphql-mesh/cross-helpers';
|
|
2
|
-
import { mapMaybePromise } from '@graphql-mesh/utils';
|
|
3
2
|
import { Redis } from '@upstash/redis';
|
|
4
3
|
import { DisposableSymbols } from '@whatwg-node/disposablestack';
|
|
5
4
|
export default class UpstashRedisCache {
|
|
@@ -28,7 +27,7 @@ export default class UpstashRedisCache {
|
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
29
|
delete(key) {
|
|
31
|
-
return
|
|
30
|
+
return this.redis.del(key).then(num => num > 0);
|
|
32
31
|
}
|
|
33
32
|
async getKeysByPrefix(prefix) {
|
|
34
33
|
const keys = [];
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-mesh/cache-upstash-redis",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"graphql": "*"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@graphql-mesh/cross-helpers": "^0.4.9",
|
|
10
|
-
"@graphql-mesh/types": "^0.103.
|
|
11
|
-
"@graphql-mesh/utils": "^0.103.19",
|
|
10
|
+
"@graphql-mesh/types": "^0.103.20",
|
|
12
11
|
"@upstash/redis": "^1.34.3",
|
|
13
12
|
"@whatwg-node/disposablestack": "^0.0.5",
|
|
14
13
|
"tslib": "^2.4.0"
|
package/typings/index.d.cts
CHANGED
|
@@ -9,7 +9,7 @@ export default class UpstashRedisCache implements KeyValueCache {
|
|
|
9
9
|
set<T>(key: string, value: T, options?: {
|
|
10
10
|
ttl?: number;
|
|
11
11
|
}): Promise<"OK" | T>;
|
|
12
|
-
delete(key: string):
|
|
12
|
+
delete(key: string): Promise<boolean>;
|
|
13
13
|
getKeysByPrefix(prefix: string): Promise<string[]>;
|
|
14
14
|
[DisposableSymbols.dispose](): void;
|
|
15
15
|
}
|
package/typings/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export default class UpstashRedisCache implements KeyValueCache {
|
|
|
9
9
|
set<T>(key: string, value: T, options?: {
|
|
10
10
|
ttl?: number;
|
|
11
11
|
}): Promise<"OK" | T>;
|
|
12
|
-
delete(key: string):
|
|
12
|
+
delete(key: string): Promise<boolean>;
|
|
13
13
|
getKeysByPrefix(prefix: string): Promise<string[]>;
|
|
14
14
|
[DisposableSymbols.dispose](): void;
|
|
15
15
|
}
|