@zintrust/cache-redis 2.0.0 → 2.1.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/dist/RedisProxyAdapter.js +4 -2
- package/dist/index.js +6 -2
- package/package.json +2 -2
- package/dist/build-manifest.json +0 -51
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Env
|
|
1
|
+
import { Env } from '@zintrust/core/config';
|
|
2
|
+
import { ErrorFactory } from '@zintrust/core/errors';
|
|
3
|
+
import { createRedisConnection } from '@zintrust/core/redis';
|
|
2
4
|
const createProxyClient = () => {
|
|
3
5
|
if (Env.REDIS_PROXY_URL.trim() === '' && Env.USE_REDIS_PROXY !== true) {
|
|
4
6
|
throw ErrorFactory.createConfigError('Redis proxy URL is missing (REDIS_PROXY_URL)');
|
|
@@ -8,7 +10,7 @@ const createProxyClient = () => {
|
|
|
8
10
|
port: Env.getInt('REDIS_PORT', 6379),
|
|
9
11
|
password: Env.get('REDIS_PASSWORD'),
|
|
10
12
|
db: Env.getInt('REDIS_DB', 0),
|
|
11
|
-
}, 3, { subsystem: 'cache' });
|
|
13
|
+
}, 3, { subsystem: 'cache', requireDirectForScripts: false });
|
|
12
14
|
};
|
|
13
15
|
export const RedisProxyAdapter = Object.freeze({
|
|
14
16
|
create() {
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { Cloudflare
|
|
1
|
+
import { Cloudflare } from '@zintrust/core/cloudflare';
|
|
2
|
+
import { Env } from '@zintrust/core/config';
|
|
3
|
+
import { ErrorFactory } from '@zintrust/core/errors';
|
|
4
|
+
import { Logger } from '@zintrust/core/logger';
|
|
5
|
+
import { createRedisConnection } from '@zintrust/core/redis';
|
|
2
6
|
const createSharedRedisConnection = createRedisConnection;
|
|
3
7
|
const safeJsonParse = (value) => {
|
|
4
8
|
try {
|
|
@@ -103,7 +107,7 @@ const createWorkersCacheDriver = (config) => {
|
|
|
103
107
|
port: config.port,
|
|
104
108
|
password: config.password,
|
|
105
109
|
db: config.database ?? 0,
|
|
106
|
-
}, 3, { subsystem: 'cache' });
|
|
110
|
+
}, 3, { subsystem: 'cache', requireDirectForScripts: false });
|
|
107
111
|
if (!connected && typeof client.connect === 'function') {
|
|
108
112
|
await client.connect();
|
|
109
113
|
connected = true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zintrust/cache-redis",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"description": "Redis cache driver for ZinTrust.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -42,4 +42,4 @@
|
|
|
42
42
|
"build": "tsc -p tsconfig.json",
|
|
43
43
|
"prepublishOnly": "npm run build"
|
|
44
44
|
}
|
|
45
|
-
}
|
|
45
|
+
}
|
package/dist/build-manifest.json
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@zintrust/cache-redis",
|
|
3
|
-
"version": "2.0.0",
|
|
4
|
-
"buildDate": "2026-05-20T20:02:08.647Z",
|
|
5
|
-
"buildEnvironment": {
|
|
6
|
-
"node": "v20.20.2",
|
|
7
|
-
"platform": "linux",
|
|
8
|
-
"arch": "x64"
|
|
9
|
-
},
|
|
10
|
-
"git": {
|
|
11
|
-
"commit": "be96835b",
|
|
12
|
-
"branch": "master"
|
|
13
|
-
},
|
|
14
|
-
"package": {
|
|
15
|
-
"engines": {
|
|
16
|
-
"node": ">=20.0.0"
|
|
17
|
-
},
|
|
18
|
-
"dependencies": [
|
|
19
|
-
"redis"
|
|
20
|
-
],
|
|
21
|
-
"peerDependencies": [
|
|
22
|
-
"@zintrust/core"
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
"files": {
|
|
26
|
-
"RedisProxyAdapter.d.ts": {
|
|
27
|
-
"size": 163,
|
|
28
|
-
"sha256": "91df2fbb1916b073c3bafa1dc253ab5ee8998cc924c3cd52308c09798c1d829f"
|
|
29
|
-
},
|
|
30
|
-
"RedisProxyAdapter.js": {
|
|
31
|
-
"size": 1693,
|
|
32
|
-
"sha256": "b1cd4417d827598b41226597355559eef423eac869448df5fd94d338d16a09f2"
|
|
33
|
-
},
|
|
34
|
-
"index.d.ts": {
|
|
35
|
-
"size": 842,
|
|
36
|
-
"sha256": "b47614dfdb736524165785958f4a685818c055315961c2e2b48d99ef6ca491e2"
|
|
37
|
-
},
|
|
38
|
-
"index.js": {
|
|
39
|
-
"size": 6818,
|
|
40
|
-
"sha256": "31034a560d1f3f01da0aa50385a325cb2ff124f0c3050b48adb0296edf04761e"
|
|
41
|
-
},
|
|
42
|
-
"register.d.ts": {
|
|
43
|
-
"size": 184,
|
|
44
|
-
"sha256": "005e0163b4f5833a0096cfcba7d5851b6f21c0fea7d8faf01a913dc2808730ad"
|
|
45
|
-
},
|
|
46
|
-
"register.js": {
|
|
47
|
-
"size": 472,
|
|
48
|
-
"sha256": "0fa19f823df12b6b99973a893c1b975e767d183b0275e9b78a60e454ca63b6ca"
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|