@duvdu-v1/duvdu 1.1.30 → 1.1.31
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import RedisStore from 'connect-redis';
|
|
2
|
-
export declare const redisConnection: (url: string
|
|
2
|
+
export declare const redisConnection: (url: string) => import("@redis/client").RedisClientType<{
|
|
3
3
|
graph: {
|
|
4
4
|
CONFIG_GET: typeof import("@redis/graph/dist/commands/CONFIG_GET");
|
|
5
5
|
configGet: typeof import("@redis/graph/dist/commands/CONFIG_GET");
|
|
@@ -289,4 +289,4 @@ export declare const redisConnection: (url: string, password: string, port: numb
|
|
|
289
289
|
reserve: typeof import("@redis/bloom/dist/commands/top-k/RESERVE");
|
|
290
290
|
};
|
|
291
291
|
} & import("redis").RedisModules, import("redis").RedisFunctions, import("redis").RedisScripts>;
|
|
292
|
-
export declare const sessionStore: (url: string
|
|
292
|
+
export declare const sessionStore: (url: string) => RedisStore;
|
|
@@ -7,14 +7,8 @@ exports.sessionStore = exports.redisConnection = void 0;
|
|
|
7
7
|
const connect_redis_1 = __importDefault(require("connect-redis"));
|
|
8
8
|
const redis_1 = require("redis");
|
|
9
9
|
const data_base_connections_1 = require("../errors/data-base-connections");
|
|
10
|
-
const redisConnection = (url
|
|
11
|
-
const client = (0, redis_1.createClient)({
|
|
12
|
-
password,
|
|
13
|
-
socket: {
|
|
14
|
-
host: url,
|
|
15
|
-
port
|
|
16
|
-
}
|
|
17
|
-
});
|
|
10
|
+
const redisConnection = (url) => {
|
|
11
|
+
const client = (0, redis_1.createClient)({ url });
|
|
18
12
|
client
|
|
19
13
|
.connect()
|
|
20
14
|
.then(() => console.log(`redis connected in : ${url}`))
|
|
@@ -24,5 +18,5 @@ const redisConnection = (url, password, port) => {
|
|
|
24
18
|
return client;
|
|
25
19
|
};
|
|
26
20
|
exports.redisConnection = redisConnection;
|
|
27
|
-
const sessionStore = (url
|
|
21
|
+
const sessionStore = (url) => new connect_redis_1.default({ client: (0, exports.redisConnection)(url) });
|
|
28
22
|
exports.sessionStore = sessionStore;
|