1 | "use strict";
|
2 | var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3 | if (k2 === undefined) k2 = k;
|
4 | var desc = Object.getOwnPropertyDescriptor(m, k);
|
5 | if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6 | desc = { enumerable: true, get: function() { return m[k]; } };
|
7 | }
|
8 | Object.defineProperty(o, k2, desc);
|
9 | }) : (function(o, m, k, k2) {
|
10 | if (k2 === undefined) k2 = k;
|
11 | o[k2] = m[k];
|
12 | }));
|
13 | var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14 | for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15 | };
|
16 | Object.defineProperty(exports, "__esModule", { value: true });
|
17 | exports.createCluster = exports.createClient = void 0;
|
18 | const client_1 = require("@redis/client");
|
19 | const bloom_1 = require("@redis/bloom");
|
20 | const graph_1 = require("@redis/graph");
|
21 | const json_1 = require("@redis/json");
|
22 | const search_1 = require("@redis/search");
|
23 | const time_series_1 = require("@redis/time-series");
|
24 | __exportStar(require("@redis/client"), exports);
|
25 | __exportStar(require("@redis/bloom"), exports);
|
26 | __exportStar(require("@redis/graph"), exports);
|
27 | __exportStar(require("@redis/json"), exports);
|
28 | __exportStar(require("@redis/search"), exports);
|
29 | __exportStar(require("@redis/time-series"), exports);
|
30 | const modules = {
|
31 | ...bloom_1.default,
|
32 | graph: graph_1.default,
|
33 | json: json_1.default,
|
34 | ft: search_1.default,
|
35 | ts: time_series_1.default
|
36 | };
|
37 | function createClient(options) {
|
38 | return (0, client_1.createClient)({
|
39 | ...options,
|
40 | modules: {
|
41 | ...modules,
|
42 | ...options?.modules
|
43 | }
|
44 | });
|
45 | }
|
46 | exports.createClient = createClient;
|
47 | function createCluster(options) {
|
48 | return (0, client_1.createCluster)({
|
49 | ...options,
|
50 | modules: {
|
51 | ...modules,
|
52 | ...options?.modules
|
53 | }
|
54 | });
|
55 | }
|
56 | exports.createCluster = createCluster;
|