@pi-r/redis 0.6.3 → 0.6.4
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/client/index.d.ts +2 -2
- package/client/index.js +3 -1
- package/package.json +4 -4
package/client/index.d.ts
CHANGED
package/client/index.js
CHANGED
|
@@ -21,6 +21,7 @@ class RedisPool extends DbPool {
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
const POOL_STATE = {};
|
|
24
|
+
const POOL_ACTIVE = new WeakSet();
|
|
24
25
|
async function getClient(db, options, poolKey) {
|
|
25
26
|
const socket = options.socket || (options.socket = {});
|
|
26
27
|
if (!poolKey) {
|
|
@@ -40,7 +41,7 @@ async function getClient(db, options, poolKey) {
|
|
|
40
41
|
});
|
|
41
42
|
}
|
|
42
43
|
function removePoolProperties(options) {
|
|
43
|
-
if (!options.uuidKey && ('socket' in options || 'isolationPoolOptions' in options)) {
|
|
44
|
+
if (!options.uuidKey && ('socket' in options || 'isolationPoolOptions' in options) && POOL_ACTIVE.has(options)) {
|
|
44
45
|
return { ...options, socket: options.socket?.tls ? { tls: true } : undefined, isolationPoolOptions: undefined };
|
|
45
46
|
}
|
|
46
47
|
return options;
|
|
@@ -188,6 +189,7 @@ async function executeBatchQuery(batch, options = '', outResult) {
|
|
|
188
189
|
if (pool) {
|
|
189
190
|
client = pool.client;
|
|
190
191
|
pool.connected = true;
|
|
192
|
+
POOL_ACTIVE.add(credential);
|
|
191
193
|
}
|
|
192
194
|
}
|
|
193
195
|
if (!client) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/redis",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"description": "Redis client driver for E-mc.",
|
|
5
5
|
"main": "client/index.js",
|
|
6
6
|
"types": "client/index.d.ts",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@e-mc/db": "^0.8.
|
|
25
|
-
"@e-mc/types": "^0.8.
|
|
26
|
-
"redis": "^4.6.
|
|
24
|
+
"@e-mc/db": "^0.8.4",
|
|
25
|
+
"@e-mc/types": "^0.8.4",
|
|
26
|
+
"redis": "^4.6.13"
|
|
27
27
|
}
|
|
28
28
|
}
|