@gat-solutions/redis
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "@gat-solutions/redis", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Custom IORedis for GAT", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -9,2 +9,3 @@ /** Redis Service | ||
private readonly redisWriteDb; | ||
private readonly redisWritePrefix; | ||
private readonly redisReadHost; | ||
@@ -14,2 +15,3 @@ private readonly redisReadPort; | ||
private readonly redisReadDb; | ||
private readonly redisReadPrefix; | ||
constructor(); | ||
@@ -16,0 +18,0 @@ private get redisWriteOptions(); |
@@ -29,3 +29,3 @@ "use strict"; | ||
constructor() { | ||
const { REDIS_WRITE_HOST, REDIS_WRITE_PORT, REDIS_WRITE_PASSWORD, REDIS_WRITE_DB, REDIS_READ_HOST, REDIS_READ_PORT, REDIS_READ_PASSWORD, REDIS_READ_DB, } = process.env; | ||
const { REDIS_WRITE_HOST, REDIS_WRITE_PORT, REDIS_WRITE_PASSWORD, REDIS_WRITE_DB, REDIS_WRITE_PREFIX, REDIS_READ_HOST, REDIS_READ_PORT, REDIS_READ_PASSWORD, REDIS_READ_DB, REDIS_READ_PREFIX, } = process.env; | ||
if (!REDIS_WRITE_HOST) { | ||
@@ -43,2 +43,5 @@ throw new Error("Missing REDIS_WRITE_HOST"); | ||
} | ||
if (!REDIS_WRITE_PREFIX) { | ||
throw new Error("Missing REDIS_WRITE_PREFIX"); | ||
} | ||
if (!REDIS_READ_HOST) { | ||
@@ -56,2 +59,5 @@ throw new Error("Missing REDIS_READ_HOST"); | ||
} | ||
if (!REDIS_READ_PREFIX) { | ||
throw new Error("Missing REDIS_READ_PREFIX"); | ||
} | ||
this.redisWriteHost = REDIS_WRITE_HOST; | ||
@@ -61,2 +67,3 @@ this.redisWritePort = REDIS_WRITE_PORT; | ||
this.redisWriteDb = REDIS_WRITE_DB; | ||
this.redisWritePrefix = REDIS_WRITE_PREFIX; | ||
this.redisReadHost = REDIS_READ_HOST; | ||
@@ -66,2 +73,3 @@ this.redisReadPort = REDIS_READ_PORT; | ||
this.redisReadDb = REDIS_READ_DB; | ||
this.redisReadPrefix = REDIS_READ_PREFIX; | ||
} | ||
@@ -74,2 +82,3 @@ get redisWriteOptions() { | ||
db: +this.redisWriteDb, | ||
keyPrefix: this.redisWritePrefix | ||
}; | ||
@@ -87,2 +96,3 @@ return options; | ||
db: +this.redisReadDb, | ||
keyPrefix: this.redisReadPrefix | ||
}; | ||
@@ -89,0 +99,0 @@ return options; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
11541
242
0