diff --git a/lib/Redis.ts b/lib/Redis.ts index c737a958..2572ea99 100644 --- a/lib/Redis.ts +++ b/lib/Redis.ts @@ -1,20 +1,18 @@ import { EventEmitter } from "events"; import * as commands from "redis-commands"; import asCallback from "standard-as-callback"; -import { - AbstractConnector, - Cluster, - Command, - ScanStream, - SentinelConnector, -} from "."; +import Cluster from "./cluster"; +import Command from "./command"; import { StandaloneConnector } from "./connectors"; +import AbstractConnector from "./connectors/AbstractConnector"; +import SentinelConnector from "./connectors/SentinelConnector"; import * as eventHandler from "./redis/event_handler"; import { DEFAULT_REDIS_OPTIONS, ReconnectOnError, RedisOptions, } from "./redis/RedisOptions"; +import ScanStream from "./ScanStream"; import { addTransactionSupport, Transaction } from "./transaction"; import { Callback, diff --git a/lib/cluster/index.ts b/lib/cluster/index.ts index 6fa5a90d..1f151783 100644 --- a/lib/cluster/index.ts +++ b/lib/cluster/index.ts @@ -2,7 +2,7 @@ import { EventEmitter } from "events"; import * as commands from "redis-commands"; import { AbortError, RedisError } from "redis-errors"; import asCallback from "standard-as-callback"; -import { Pipeline } from ".."; +import Pipeline from "../pipeline"; import Command from "../command"; import ClusterAllFailedError from "../errors/ClusterAllFailedError"; import Redis from "../Redis"; diff --git a/lib/index.ts b/lib/index.ts index bc7e1d2e..16283c97 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -1,5 +1,6 @@ -import Redis from "./Redis"; +exports = module.exports = require("./Redis").default; +export { default } from "./Redis"; export { default as Cluster } from "./cluster"; /** @@ -64,5 +65,3 @@ export function print(err: Error | null, reply?: any) { console.log("Reply: " + reply); } } - -export default Redis; diff --git a/lib/pipeline.ts b/lib/pipeline.ts index fbada1d3..2ed54632 100644 --- a/lib/pipeline.ts +++ b/lib/pipeline.ts @@ -2,7 +2,8 @@ import * as calculateSlot from "cluster-key-slot"; import { exists, hasFlag } from "redis-commands"; import asCallback from "standard-as-callback"; import { deprecate } from "util"; -import Redis, { Cluster } from "."; +import Redis from "./Redis"; +import Cluster from "./cluster"; import Command from "./command"; import { Callback, PipelineWriteableStream } from "./types"; import { noop } from "./utils";