From 2f14e84287f584b910b2da0b9a722288a261953c Mon Sep 17 00:00:00 2001 From: bLue Date: Mon, 5 Aug 2024 21:30:25 +0800 Subject: [PATCH] chore: upgrade egg-redis and fix socket.io config --- package-lock.json | 14 +++++++------- package.json | 2 +- src/sub-app/socket-io/package-lock.json | 14 +++++++------- src/sub-app/socket-io/package.json | 2 +- src/sub-app/socket-io/src/config/config.default.ts | 3 ++- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 35dbf56..735c1ed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "crypto-random-string": "^3.2.0", "egg": "^2.37.0", "egg-alinode": "^2.0.1", - "egg-redis": "^2.4.0", + "egg-redis": "^2.6.0", "egg-scripts": "^2.10.0", "egg-security": "^2.11.0", "egg-sequelize": "^5.2.1", @@ -6000,9 +6000,9 @@ } }, "node_modules/egg-redis": { - "version": "2.4.0", - "resolved": "https://registry.npmmirror.com/egg-redis/download/egg-redis-2.4.0.tgz", - "integrity": "sha1-l3Ot/ONLjrkCYQ7adSXM/v2HpzU=", + "version": "2.6.0", + "resolved": "https://registry.npmmirror.com/egg-redis/-/egg-redis-2.6.0.tgz", + "integrity": "sha512-QNYpRQpkyiUUBFRcCW0iehQJ0YjE3VTbeiDINguIy33iNsL5MSRoyUUV/HPEcfmPa3ydudfN6g66rrQX5x8Sqg==", "dependencies": { "@types/ioredis": "^4.0.10", "await-first": "^1.0.0", @@ -26946,9 +26946,9 @@ } }, "egg-redis": { - "version": "2.4.0", - "resolved": "https://registry.npmmirror.com/egg-redis/download/egg-redis-2.4.0.tgz", - "integrity": "sha1-l3Ot/ONLjrkCYQ7adSXM/v2HpzU=", + "version": "2.6.0", + "resolved": "https://registry.npmmirror.com/egg-redis/-/egg-redis-2.6.0.tgz", + "integrity": "sha512-QNYpRQpkyiUUBFRcCW0iehQJ0YjE3VTbeiDINguIy33iNsL5MSRoyUUV/HPEcfmPa3ydudfN6g66rrQX5x8Sqg==", "requires": { "@types/ioredis": "^4.0.10", "await-first": "^1.0.0", diff --git a/package.json b/package.json index 60f95c9..dd4eee7 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "crypto-random-string": "^3.2.0", "egg": "^2.37.0", "egg-alinode": "^2.0.1", - "egg-redis": "^2.4.0", + "egg-redis": "^2.6.0", "egg-scripts": "^2.10.0", "egg-security": "^2.11.0", "egg-sequelize": "^5.2.1", diff --git a/src/sub-app/socket-io/package-lock.json b/src/sub-app/socket-io/package-lock.json index ba89ded..bdac0bc 100644 --- a/src/sub-app/socket-io/package-lock.json +++ b/src/sub-app/socket-io/package-lock.json @@ -11,7 +11,7 @@ "chalk": "^4.1.2", "egg": "^2.37.0", "egg-alinode": "^2.0.1", - "egg-redis": "^2.4.0", + "egg-redis": "^2.6.0", "egg-scripts": "^2.10.0", "egg-session-redis": "^2.1.0", "egg-socket.io": "^4.1.6", @@ -4335,9 +4335,9 @@ } }, "node_modules/egg-redis": { - "version": "2.4.0", - "resolved": "https://registry.npmmirror.com/egg-redis/-/egg-redis-2.4.0.tgz", - "integrity": "sha512-c8NBivXMfHhxBh2hdAFlYP5R1790SF+E9dMCEN54Qbgu3QsMKoGH3Db5dN2cZ6SpBD0XED/Evlcl0LXqNecToA==", + "version": "2.6.0", + "resolved": "https://registry.npmmirror.com/egg-redis/-/egg-redis-2.6.0.tgz", + "integrity": "sha512-QNYpRQpkyiUUBFRcCW0iehQJ0YjE3VTbeiDINguIy33iNsL5MSRoyUUV/HPEcfmPa3ydudfN6g66rrQX5x8Sqg==", "dependencies": { "@types/ioredis": "^4.0.10", "await-first": "^1.0.0", @@ -19023,9 +19023,9 @@ } }, "egg-redis": { - "version": "2.4.0", - "resolved": "https://registry.npmmirror.com/egg-redis/-/egg-redis-2.4.0.tgz", - "integrity": "sha512-c8NBivXMfHhxBh2hdAFlYP5R1790SF+E9dMCEN54Qbgu3QsMKoGH3Db5dN2cZ6SpBD0XED/Evlcl0LXqNecToA==", + "version": "2.6.0", + "resolved": "https://registry.npmmirror.com/egg-redis/-/egg-redis-2.6.0.tgz", + "integrity": "sha512-QNYpRQpkyiUUBFRcCW0iehQJ0YjE3VTbeiDINguIy33iNsL5MSRoyUUV/HPEcfmPa3ydudfN6g66rrQX5x8Sqg==", "requires": { "@types/ioredis": "^4.0.10", "await-first": "^1.0.0", diff --git a/src/sub-app/socket-io/package.json b/src/sub-app/socket-io/package.json index f8f0bb6..217ce30 100644 --- a/src/sub-app/socket-io/package.json +++ b/src/sub-app/socket-io/package.json @@ -23,7 +23,7 @@ "chalk": "^4.1.2", "egg": "^2.37.0", "egg-alinode": "^2.0.1", - "egg-redis": "^2.4.0", + "egg-redis": "^2.6.0", "egg-scripts": "^2.10.0", "egg-session-redis": "^2.1.0", "egg-socket.io": "^4.1.6", diff --git a/src/sub-app/socket-io/src/config/config.default.ts b/src/sub-app/socket-io/src/config/config.default.ts index c47c7b9..36ab5f3 100644 --- a/src/sub-app/socket-io/src/config/config.default.ts +++ b/src/sub-app/socket-io/src/config/config.default.ts @@ -80,6 +80,7 @@ export default (appInfo: EggAppInfo) => { redis: { host: '127.0.0.1', port: 6379, + // 这里透传给 socket.io-redis,需要的字段为 `auth_pass` auth_pass: null, db: 0, }, @@ -89,7 +90,7 @@ export default (appInfo: EggAppInfo) => { client: { host: '127.0.0.1', port: 6379, - auth_pass: null, + password: null, db: 0, }, };