@midwayjs/ws 3.0.0-beta.8 → 3.0.2

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # midway framework for socket.io
1
+ # midway framework for WebSocket
2
2
 
3
3
  [![Package Quality](http://npm.packagequality.com/shield/midway-web.svg)](http://packagequality.com/#?package=midway-web)
4
4
  [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/midwayjs/midway/pulls)
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../src/configuration.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAoD;AAYpD,IAAa,sBAAsB,GAAnC,MAAa,sBAAsB;CAAG,CAAA;AAAzB,sBAAsB;IAVlC,IAAA,yBAAa,EAAC;QACb,SAAS,EAAE,WAAW;QACtB,aAAa,EAAE;YACb;gBACE,OAAO,EAAE;oBACP,SAAS,EAAE,EAAE;iBACd;aACF;SACF;KACF,CAAC;GACW,sBAAsB,CAAG;AAAzB,wDAAsB","sourcesContent":["import { Configuration } from '@midwayjs/decorator';\n\n@Configuration({\n namespace: 'webSocket',\n importConfigs: [\n {\n default: {\n webSocket: {},\n },\n },\n ],\n})\nexport class WebSocketConfiguration {}\n"]}
package/dist/framework.js CHANGED
@@ -10,7 +10,7 @@ exports.MidwayWSFramework = void 0;
10
10
  const core_1 = require("@midwayjs/core");
11
11
  const http = require("http");
12
12
  const util_1 = require("util");
13
- const debug = (0, util_1.debuglog)('midway:ws');
13
+ const debug = (0, util_1.debuglog)('midway:debug');
14
14
  const WebSocket = require("ws");
15
15
  const decorator_1 = require("@midwayjs/decorator");
16
16
  let MidwayWSFramework = class MidwayWSFramework extends core_1.BaseFramework {
@@ -96,9 +96,9 @@ let MidwayWSFramework = class MidwayWSFramework extends core_1.BaseFramework {
96
96
  else if (wsEventInfo.eventType === decorator_1.WSEventTypeEnum.ON_MESSAGE) {
97
97
  // on user custom event
98
98
  socket.on(wsEventInfo.messageEventName, async (...args) => {
99
- debug('got message', wsEventInfo.messageEventName, args);
99
+ debug('[ws]: got message', wsEventInfo.messageEventName, args);
100
100
  try {
101
- const result = await (await this.getMiddleware(async (ctx, next) => {
101
+ const result = await (await this.applyMiddleware(async (ctx, next) => {
102
102
  // eslint-disable-next-line prefer-spread
103
103
  return controller[wsEventInfo.propertyName].apply(controller, args);
104
104
  }))(socket);
@@ -177,6 +177,6 @@ MidwayWSFramework = __decorate([
177
177
  ], MidwayWSFramework);
178
178
  exports.MidwayWSFramework = MidwayWSFramework;
179
179
  function formatResult(result) {
180
- return (0, decorator_1.isObject)(result) ? JSON.stringify(result) : result;
180
+ return decorator_1.Types.isObject(result) ? JSON.stringify(result) : result;
181
181
  }
182
182
  //# sourceMappingURL=framework.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"framework.js","sourceRoot":"","sources":["../src/framework.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yCAKwB;AACxB,6BAA6B;AAC7B,+BAAgC;AAChC,MAAM,KAAK,GAAG,IAAA,eAAQ,EAAC,cAAc,CAAC,CAAC;AAOvC,gCAAgC;AAChC,mDAS6B;AAG7B,IAAa,iBAAiB,GAA9B,MAAa,iBAAkB,SAAQ,oBAItC;IAGC,SAAS;QACP,OAAO,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC1D,CAAC;IAED,qBAAqB,CAAC,OAAgC;QACpD,IAAI,CAAC,oBAAoB,CAAC,QAAQ,GAAG,IAAI,CAAC;QAC1C,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1E,IAAI,CAAC,GAAG,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAyB,CAAC;IAChE,CAAC;IAGS,KAAK,CAAC,mBA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CAAC,CAAC,CAAC,MAAM,CAAC;AAClE,CAAC","sourcesContent":["import {\n BaseFramework,\n HTTP_SERVER_KEY,\n IMidwayBootstrapOptions,\n MidwayFrameworkType,\n} from '@midwayjs/core';\nimport * as http from 'http';\nimport { debuglog } from 'util';\nconst debug = debuglog('midway:debug');\n\nimport {\n IMidwayWSApplication,\n IMidwayWSConfigurationOptions,\n IMidwayWSContext,\n} from './interface';\nimport * as WebSocket from 'ws';\nimport {\n Types,\n WS_CONTROLLER_KEY,\n WS_EVENT_KEY,\n WSEventInfo,\n WSEventTypeEnum,\n getClassMetadata,\n listModule,\n Framework,\n} from '@midwayjs/decorator';\n\n@Framework()\nexport class MidwayWSFramework extends BaseFramework<\n IMidwayWSApplication,\n IMidwayWSContext,\n IMidwayWSConfigurationOptions\n> {\n server: http.Server;\n\n configure(): IMidwayWSConfigurationOptions {\n return this.configService.getConfiguration('webSocket');\n }\n\n applicationInitialize(options: IMidwayBootstrapOptions) {\n this.configurationOptions.noServer = true;\n const opts = Object.assign({}, this.configurationOptions, { port: null });\n this.app = new WebSocket.Server(opts) as IMidwayWSApplication;\n }\n public app: IMidwayWSApplication;\n\n protected async afterContainerReady(\n options: Partial<IMidwayBootstrapOptions>\n ): Promise<void> {\n await this.loadMidwayController();\n }\n\n public async run(): Promise<void> {\n let server: http.Server;\n if (!this.configurationOptions.port) {\n server = this.applicationContext.get(HTTP_SERVER_KEY);\n } else {\n server = this.configurationOptions.server ?? http.createServer();\n }\n\n server.on('upgrade', (request, socket: any, head) => {\n this.app.handleUpgrade(request, socket, head, ws => {\n this.app.emit('connection', ws, request);\n });\n });\n\n this.server = server;\n\n if (this.configurationOptions.port) {\n await new Promise<void>(resolve => {\n server.listen(this.configurationOptions.port, () => {\n this.logger.info(\n `WebSocket server port = ${this.configurationOptions.port} start success`\n );\n resolve();\n });\n });\n }\n }\n\n protected async beforeStop(): Promise<void> {\n return new Promise<void>(resolve => {\n this.app.close(() => {\n setTimeout(() => {\n resolve();\n }, 1000);\n });\n this.server.close();\n });\n }\n\n public getFrameworkType(): MidwayFrameworkType {\n return MidwayFrameworkType.WS;\n }\n\n private async loadMidwayController() {\n // create room\n const controllerModules = listModule(WS_CONTROLLER_KEY);\n if (controllerModules.length > 0) {\n // ws just one namespace\n await this.addNamespace(controllerModules[0]);\n }\n }\n\n private async addNamespace(target: any) {\n this.app.on(\n 'connection',\n async (socket: IMidwayWSContext, request: http.IncomingMessage) => {\n // create request context\n this.app.createAnonymousContext(socket);\n socket.requestContext.registerObject('socket', socket);\n socket.app = this.app;\n\n const wsEventInfos: WSEventInfo[] = getClassMetadata(\n WS_EVENT_KEY,\n target\n );\n\n // 存储方法对应的响应处理\n const methodMap = {};\n\n if (wsEventInfos.length) {\n for (const wsEventInfo of wsEventInfos) {\n methodMap[wsEventInfo.propertyName] = methodMap[\n wsEventInfo.propertyName\n ] || { responseEvents: [] };\n const controller = await socket.requestContext.getAsync(target);\n // on connection\n if (wsEventInfo.eventType === WSEventTypeEnum.ON_CONNECTION) {\n try {\n const result = await controller[wsEventInfo.propertyName].apply(\n controller,\n [socket, request]\n );\n await this.bindSocketResponse(\n result,\n socket,\n wsEventInfo.propertyName,\n methodMap\n );\n } catch (err) {\n this.logger.error(err);\n }\n } else if (wsEventInfo.eventType === WSEventTypeEnum.ON_MESSAGE) {\n // on user custom event\n socket.on(wsEventInfo.messageEventName, async (...args) => {\n debug('[ws]: got message', wsEventInfo.messageEventName, args);\n\n try {\n const result = await (\n await this.applyMiddleware(async (ctx, next) => {\n // eslint-disable-next-line prefer-spread\n return controller[wsEventInfo.propertyName].apply(\n controller,\n args\n );\n })\n )(socket);\n if (typeof args[args.length - 1] === 'function') {\n // ack\n args[args.length - 1](result);\n } else {\n // emit\n await this.bindSocketResponse(\n result,\n socket,\n wsEventInfo.propertyName,\n methodMap\n );\n }\n } catch (error) {\n this.logger.error(error);\n }\n });\n } else if (\n wsEventInfo.eventType === WSEventTypeEnum.ON_DISCONNECTION\n ) {\n // on socket disconnect\n socket.on('close', async (reason: string) => {\n try {\n const result = await controller[\n wsEventInfo.propertyName\n ].apply(controller, [reason]);\n await this.bindSocketResponse(\n result,\n socket,\n wsEventInfo.propertyName,\n methodMap\n );\n } catch (err) {\n this.logger.error(err);\n }\n });\n } else {\n // 存储每个方法对应的后置响应处理,供后续快速匹配\n methodMap[wsEventInfo.propertyName].responseEvents.push(\n wsEventInfo\n );\n }\n }\n }\n }\n );\n\n this.app.on('error', err => {\n this.logger.error('socket server close');\n });\n\n this.app.on('close', () => {\n this.logger.info('socket server close');\n });\n }\n\n private async bindSocketResponse(\n result: any,\n socket: IMidwayWSContext,\n propertyName: string,\n methodMap: {\n responseEvents?: WSEventInfo[];\n }\n ) {\n if (!result) return;\n if (methodMap[propertyName]) {\n for (const wsEventInfo of methodMap[propertyName].responseEvents) {\n if (wsEventInfo.eventType === WSEventTypeEnum.EMIT) {\n socket.send(formatResult(result));\n } else if (wsEventInfo.eventType === WSEventTypeEnum.BROADCAST) {\n this.app.clients.forEach(client => {\n if (client.readyState === WebSocket.OPEN) {\n client.send(formatResult(result));\n }\n });\n }\n }\n if (methodMap[propertyName].responseEvents.length === 0) {\n // no emit decorator\n socket.send(formatResult(result));\n }\n } else {\n // just send\n socket.send(formatResult(result));\n }\n }\n\n public getFrameworkName() {\n return 'midway:ws';\n }\n}\n\nfunction formatResult(result) {\n return Types.isObject(result) ? JSON.stringify(result) : result;\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yCAA6D;AAApD,sGAAA,iBAAiB,OAAa;AACvC,8CAA4B;AAC5B,iDAA0E;AAAjE,8GAAA,sBAAsB,OAAiB","sourcesContent":["export { MidwayWSFramework as Framework } from './framework';\nexport * from './interface';\nexport { WebSocketConfiguration as Configuration } from './configuration';\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.js","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":"","sourcesContent":["import * as WebSocket from 'ws';\nimport {\n IConfigurationOptions,\n IMidwayApplication,\n IMidwayContext,\n NextFunction as BaseNextFunction\n} from '@midwayjs/core';\n\nexport type IMidwayWSApplication = IMidwayApplication<IMidwayWSContext> & WebSocket.Server;\n\nexport type IMidwayWSConfigurationOptions = {\n pubClient?: any;\n subClient?: any;\n} & Partial<WebSocket.ServerOptions> & IConfigurationOptions;\n\nexport type IMidwayWSContext = IMidwayContext<WebSocket & {\n app: IMidwayWSApplication;\n}>;\n\nexport type Application = IMidwayWSApplication;\nexport type NextFunction = BaseNextFunction;\nexport interface Context extends IMidwayWSContext {}\n\ndeclare module '@midwayjs/core/dist/interface' {\n interface MidwayConfig {\n webSocket?: IMidwayWSConfigurationOptions;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@midwayjs/ws",
3
- "version": "3.0.0-beta.8",
3
+ "version": "3.0.2",
4
4
  "description": "Midway Web Framework for ws",
5
5
  "main": "dist/index",
6
6
  "typings": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "tsc",
9
- "test": "node --require=ts-node/register ../../node_modules/.bin/jest",
10
- "cov": "node --require=ts-node/register ../../node_modules/.bin/jest --coverage --forceExit",
9
+ "test": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand",
10
+ "cov": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand --coverage --forceExit",
11
11
  "ci": "npm run test"
12
12
  },
13
13
  "keywords": [
@@ -18,19 +18,20 @@
18
18
  ],
19
19
  "files": [
20
20
  "dist/**/*.js",
21
- "dist/**/*.d.ts"
21
+ "dist/**/*.d.ts",
22
+ "dist/**/*.js.map"
22
23
  ],
23
24
  "license": "MIT",
24
25
  "devDependencies": {
25
- "@midwayjs/decorator": "^3.0.0-beta.8",
26
- "@midwayjs/mock": "^3.0.0-beta.8",
27
- "@types/ws": "^7.4.4",
28
- "fs-extra": "^8.0.1"
26
+ "@midwayjs/decorator": "^3.0.2",
27
+ "@midwayjs/mock": "^3.0.2",
28
+ "@types/ws": "8.2.2",
29
+ "fs-extra": "10.0.0"
29
30
  },
30
31
  "dependencies": {
31
- "@midwayjs/core": "^3.0.0-beta.8",
32
- "@midwayjs/logger": "^3.0.0-beta.8",
33
- "ws": "^7.4.5"
32
+ "@midwayjs/core": "^3.0.2",
33
+ "@midwayjs/logger": "^2.14.0",
34
+ "ws": "8.4.2"
34
35
  },
35
36
  "author": "Harry Chen <czy88840616@gmail.com>",
36
37
  "repository": {
@@ -40,5 +41,5 @@
40
41
  "engines": {
41
42
  "node": ">=12"
42
43
  },
43
- "gitHead": "bfafbdf8798f48d4daac5dd88ad53c6b2f33c110"
44
+ "gitHead": "ca77247d229978a736e79bb208579c014ed226fc"
44
45
  }
package/CHANGELOG.md DELETED
@@ -1,907 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [3.0.0-beta.8](https://github.com/midwayjs/midway/compare/v3.0.0-beta.7...v3.0.0-beta.8) (2021-12-08)
7
-
8
-
9
- ### Bug Fixes
10
-
11
- * express routing middleware takes effect at the controller level ([#1364](https://github.com/midwayjs/midway/issues/1364)) ([b9272e0](https://github.com/midwayjs/midway/commit/b9272e0971003443304b0c53815be31a0061b4bd))
12
-
13
-
14
-
15
-
16
-
17
- # [3.0.0-beta.7](https://github.com/midwayjs/midway/compare/v3.0.0-beta.6...v3.0.0-beta.7) (2021-12-03)
18
-
19
-
20
- ### Bug Fixes
21
-
22
- * middleware with ctx.body ([#1389](https://github.com/midwayjs/midway/issues/1389)) ([77af5c0](https://github.com/midwayjs/midway/commit/77af5c0b456f1843f4dcfd3dbfd2c0aa244c51bd))
23
-
24
-
25
-
26
-
27
-
28
- # [3.0.0-beta.6](https://github.com/midwayjs/midway/compare/v3.0.0-beta.5...v3.0.0-beta.6) (2021-11-26)
29
-
30
- **Note:** Version bump only for package @midwayjs/ws
31
-
32
-
33
-
34
-
35
-
36
- # [3.0.0-beta.5](https://github.com/midwayjs/midway/compare/v3.0.0-beta.4...v3.0.0-beta.5) (2021-11-25)
37
-
38
- **Note:** Version bump only for package @midwayjs/ws
39
-
40
-
41
-
42
-
43
-
44
- # [3.0.0-beta.4](https://github.com/midwayjs/midway/compare/v3.0.0-beta.3...v3.0.0-beta.4) (2021-11-24)
45
-
46
-
47
- ### Features
48
-
49
- * add i18n ([#1375](https://github.com/midwayjs/midway/issues/1375)) ([bffefe0](https://github.com/midwayjs/midway/commit/bffefe07afe45777d49b5a76b9ab17fc2b9d9a55))
50
-
51
-
52
-
53
-
54
-
55
- # [3.0.0-beta.3](https://github.com/midwayjs/midway/compare/v3.0.0-beta.2...v3.0.0-beta.3) (2021-11-18)
56
-
57
-
58
- ### Features
59
-
60
- * add component and framework config definition ([#1367](https://github.com/midwayjs/midway/issues/1367)) ([b2fe615](https://github.com/midwayjs/midway/commit/b2fe6157f99659471ff1333eca0b86bb889f61a3))
61
-
62
-
63
-
64
-
65
-
66
- # [3.0.0-beta.2](https://github.com/midwayjs/midway/compare/v3.0.0-beta.1...v3.0.0-beta.2) (2021-11-16)
67
-
68
- **Note:** Version bump only for package @midwayjs/ws
69
-
70
-
71
-
72
-
73
-
74
- # [3.0.0-beta.1](https://github.com/midwayjs/midway/compare/v2.12.4...v3.0.0-beta.1) (2021-11-14)
75
-
76
-
77
- ### Bug Fixes
78
-
79
- * correct aspect chain bug ([#1204](https://github.com/midwayjs/midway/issues/1204)) ([5de5284](https://github.com/midwayjs/midway/commit/5de5284c70b44acc73eaaad651fd2edc72d54f28))
80
-
81
-
82
-
83
-
84
-
85
- ## [2.12.3](https://github.com/midwayjs/midway/compare/v2.12.2...v2.12.3) (2021-08-09)
86
-
87
-
88
- ### Bug Fixes
89
-
90
- * decorator manager singleton ([#1211](https://github.com/midwayjs/midway/issues/1211)) ([7e9150e](https://github.com/midwayjs/midway/commit/7e9150ef6805389a1a550361f78e3bb997ae9196))
91
-
92
-
93
-
94
-
95
-
96
- ## [2.12.1](https://github.com/midwayjs/midway/compare/v2.12.0...v2.12.1) (2021-08-01)
97
-
98
- **Note:** Version bump only for package @midwayjs/ws
99
-
100
-
101
-
102
-
103
-
104
- # [2.12.0](https://github.com/midwayjs/midway/compare/v2.11.7...v2.12.0) (2021-07-30)
105
-
106
- **Note:** Version bump only for package @midwayjs/ws
107
-
108
-
109
-
110
-
111
-
112
- ## [2.11.6](https://github.com/midwayjs/midway/compare/v2.11.5...v2.11.6) (2021-07-16)
113
-
114
- **Note:** Version bump only for package @midwayjs/ws
115
-
116
-
117
-
118
-
119
-
120
- ## [2.11.5](https://github.com/midwayjs/midway/compare/v2.11.4...v2.11.5) (2021-07-15)
121
-
122
- **Note:** Version bump only for package @midwayjs/ws
123
-
124
-
125
-
126
-
127
-
128
- ## [2.11.4](https://github.com/midwayjs/midway/compare/v2.11.3...v2.11.4) (2021-07-06)
129
-
130
-
131
- ### Bug Fixes
132
-
133
- * remove port with other framework ([#1140](https://github.com/midwayjs/midway/issues/1140)) ([88fec38](https://github.com/midwayjs/midway/commit/88fec380ec410bc4c44b30d4d5a751d5341b266f))
134
-
135
-
136
-
137
-
138
-
139
- ## [2.11.3](https://github.com/midwayjs/midway/compare/v2.11.2...v2.11.3) (2021-07-02)
140
-
141
- **Note:** Version bump only for package @midwayjs/ws
142
-
143
-
144
-
145
-
146
-
147
- ## [2.11.2](https://github.com/midwayjs/midway/compare/v2.11.1...v2.11.2) (2021-06-28)
148
-
149
- **Note:** Version bump only for package @midwayjs/ws
150
-
151
-
152
-
153
-
154
-
155
- ## [2.11.1](https://github.com/midwayjs/midway/compare/v2.11.0...v2.11.1) (2021-06-19)
156
-
157
-
158
- ### Bug Fixes
159
-
160
- * remove emit required parameter ([#1091](https://github.com/midwayjs/midway/issues/1091)) ([54a29d8](https://github.com/midwayjs/midway/commit/54a29d8fe072c15a0b3d1fe9a616d2c84996edc3))
161
-
162
-
163
-
164
-
165
-
166
- # [2.11.0](https://github.com/midwayjs/midway/compare/v2.10.19...v2.11.0) (2021-06-10)
167
-
168
-
169
- ### Features
170
-
171
- * add ws support ([#1058](https://github.com/midwayjs/midway/issues/1058)) ([e73cfcb](https://github.com/midwayjs/midway/commit/e73cfcb0ede82244a4eb8fe7c7612adf5586f47d))
172
-
173
-
174
-
175
-
176
-
177
- ## [2.10.14](https://github.com/midwayjs/midway/compare/v2.10.13...v2.10.14) (2021-05-11)
178
-
179
-
180
- ### Bug Fixes
181
-
182
- * serverless app more method ([#1034](https://github.com/midwayjs/midway/issues/1034)) ([9c44c3f](https://github.com/midwayjs/midway/commit/9c44c3f58930d0c12464d00eceee93cb9e7aaa62))
183
-
184
-
185
-
186
-
187
-
188
- ## [2.10.13](https://github.com/midwayjs/midway/compare/v2.10.12...v2.10.13) (2021-05-08)
189
-
190
-
191
- ### Bug Fixes
192
-
193
- * remove zlib ([#1035](https://github.com/midwayjs/midway/issues/1035)) ([cc2cd40](https://github.com/midwayjs/midway/commit/cc2cd405a104b3388d93a09d981b59b472fd8ea1))
194
-
195
-
196
-
197
-
198
-
199
- ## [2.10.12](https://github.com/midwayjs/midway/compare/v2.10.11...v2.10.12) (2021-05-07)
200
-
201
- **Note:** Version bump only for package @midwayjs/socketio
202
-
203
-
204
-
205
-
206
-
207
- ## [2.10.11](https://github.com/midwayjs/midway/compare/v2.10.10...v2.10.11) (2021-04-29)
208
-
209
- **Note:** Version bump only for package @midwayjs/socketio
210
-
211
-
212
-
213
-
214
-
215
- ## [2.10.10](https://github.com/midwayjs/midway/compare/v2.10.9...v2.10.10) (2021-04-24)
216
-
217
- **Note:** Version bump only for package @midwayjs/socketio
218
-
219
-
220
-
221
-
222
-
223
- ## [2.10.9](https://github.com/midwayjs/midway/compare/v2.10.8...v2.10.9) (2021-04-21)
224
-
225
- **Note:** Version bump only for package @midwayjs/socketio
226
-
227
-
228
-
229
-
230
-
231
- ## [2.10.8](https://github.com/midwayjs/midway/compare/v2.10.7...v2.10.8) (2021-04-21)
232
-
233
- **Note:** Version bump only for package @midwayjs/socketio
234
-
235
-
236
-
237
-
238
-
239
- ## [2.10.7](https://github.com/midwayjs/midway/compare/v2.10.6...v2.10.7) (2021-04-17)
240
-
241
-
242
- ### Bug Fixes
243
-
244
- * add event name args ([#986](https://github.com/midwayjs/midway/issues/986)) ([bfd8232](https://github.com/midwayjs/midway/commit/bfd82320aee8600d8fa30bd2821a0e68c80fd755))
245
- * format ([#997](https://github.com/midwayjs/midway/issues/997)) ([456cc14](https://github.com/midwayjs/midway/commit/456cc14513bdb000d1aa3130e9719caf7a8a803f))
246
-
247
-
248
-
249
-
250
-
251
- ## [2.10.6](https://github.com/midwayjs/midway/compare/v2.10.5...v2.10.6) (2021-04-14)
252
-
253
- **Note:** Version bump only for package @midwayjs/socketio
254
-
255
-
256
-
257
-
258
-
259
- ## [2.10.5](https://github.com/midwayjs/midway/compare/v2.10.4...v2.10.5) (2021-04-13)
260
-
261
-
262
- ### Bug Fixes
263
-
264
- * delay load without layer and egg-cluster ([#985](https://github.com/midwayjs/midway/issues/985)) ([52ba60d](https://github.com/midwayjs/midway/commit/52ba60d67d6e2df7a53609f72ec067dc083317ce))
265
-
266
-
267
-
268
-
269
-
270
- ## [2.10.4](https://github.com/midwayjs/midway/compare/v2.10.3...v2.10.4) (2021-04-10)
271
-
272
-
273
- ### Bug Fixes
274
-
275
- * clear container cache when test ([#978](https://github.com/midwayjs/midway/issues/978)) ([a202075](https://github.com/midwayjs/midway/commit/a202075b52d281e06f1ed7c6139e968fafc960f6))
276
-
277
-
278
-
279
-
280
-
281
- ## [2.10.3](https://github.com/midwayjs/midway/compare/v2.10.2...v2.10.3) (2021-04-07)
282
-
283
- **Note:** Version bump only for package @midwayjs/socketio
284
-
285
-
286
-
287
-
288
-
289
- ## [2.10.2](https://github.com/midwayjs/midway/compare/v2.10.1...v2.10.2) (2021-04-05)
290
-
291
- **Note:** Version bump only for package @midwayjs/socketio
292
-
293
-
294
-
295
-
296
-
297
- # [2.10.0](https://github.com/midwayjs/midway/compare/v2.9.3...v2.10.0) (2021-04-02)
298
-
299
- **Note:** Version bump only for package @midwayjs/socketio
300
-
301
-
302
-
303
-
304
-
305
- ## [2.9.3](https://github.com/midwayjs/midway/compare/v2.9.2...v2.9.3) (2021-03-30)
306
-
307
- **Note:** Version bump only for package @midwayjs/socketio
308
-
309
-
310
-
311
-
312
-
313
- ## [2.9.2](https://github.com/midwayjs/midway/compare/v2.9.1...v2.9.2) (2021-03-27)
314
-
315
-
316
- ### Bug Fixes
317
-
318
- * missing namespace requestContainer ([#942](https://github.com/midwayjs/midway/issues/942)) ([92e4ee6](https://github.com/midwayjs/midway/commit/92e4ee638d657677b1295bb71c033471b850990b))
319
-
320
-
321
-
322
-
323
-
324
- ## [2.9.1](https://github.com/midwayjs/midway/compare/v2.9.0...v2.9.1) (2021-03-24)
325
-
326
- **Note:** Version bump only for package @midwayjs/socketio
327
-
328
-
329
-
330
-
331
-
332
- # [2.9.0](https://github.com/midwayjs/midway/compare/v2.8.13...v2.9.0) (2021-03-22)
333
-
334
-
335
- ### Features
336
-
337
- * add socket.io-redis support ([#874](https://github.com/midwayjs/midway/issues/874)) ([2818920](https://github.com/midwayjs/midway/commit/2818920b9d3391c81666c5b8587a899b9b237d9e))
338
-
339
-
340
-
341
-
342
-
343
- ## [2.8.13](https://github.com/midwayjs/midway/compare/v2.8.12...v2.8.13) (2021-03-17)
344
-
345
- **Note:** Version bump only for package @midwayjs/socketio
346
-
347
-
348
-
349
-
350
-
351
- ## [2.8.11](https://github.com/midwayjs/midway/compare/v2.8.10...v2.8.11) (2021-03-12)
352
-
353
- **Note:** Version bump only for package @midwayjs/socketio
354
-
355
-
356
-
357
-
358
-
359
- ## [2.8.9](https://github.com/midwayjs/midway/compare/v2.8.8...v2.8.9) (2021-03-08)
360
-
361
- **Note:** Version bump only for package @midwayjs/socketio
362
-
363
-
364
-
365
-
366
-
367
- ## [2.8.8](https://github.com/midwayjs/midway/compare/v2.8.7...v2.8.8) (2021-03-06)
368
-
369
- **Note:** Version bump only for package @midwayjs/socketio
370
-
371
-
372
-
373
-
374
-
375
- ## [2.8.7](https://github.com/midwayjs/midway/compare/v2.8.6...v2.8.7) (2021-03-04)
376
-
377
- **Note:** Version bump only for package @midwayjs/socketio
378
-
379
-
380
-
381
-
382
-
383
- ## [2.8.6](https://github.com/midwayjs/midway/compare/v2.8.5...v2.8.6) (2021-03-03)
384
-
385
- **Note:** Version bump only for package @midwayjs/socketio
386
-
387
-
388
-
389
-
390
-
391
- ## [2.8.5](https://github.com/midwayjs/midway/compare/v2.8.4...v2.8.5) (2021-03-03)
392
-
393
- **Note:** Version bump only for package @midwayjs/socketio
394
-
395
-
396
-
397
-
398
-
399
- ## [2.8.4](https://github.com/midwayjs/midway/compare/v2.8.3...v2.8.4) (2021-03-03)
400
-
401
- **Note:** Version bump only for package @midwayjs/socketio
402
-
403
-
404
-
405
-
406
-
407
- ## [2.8.3](https://github.com/midwayjs/midway/compare/v2.8.2...v2.8.3) (2021-03-01)
408
-
409
- **Note:** Version bump only for package @midwayjs/socketio
410
-
411
-
412
-
413
-
414
-
415
- ## [2.8.2](https://github.com/midwayjs/midway/compare/v2.8.0...v2.8.2) (2021-02-27)
416
-
417
- **Note:** Version bump only for package @midwayjs/socketio
418
-
419
-
420
-
421
-
422
-
423
- # [2.8.0](https://github.com/midwayjs/midway/compare/v2.7.7...v2.8.0) (2021-02-24)
424
-
425
-
426
- ### Features
427
-
428
- * move context logger to @midwayjs/logger and add createFileL… ([#859](https://github.com/midwayjs/midway/issues/859)) ([49f568f](https://github.com/midwayjs/midway/commit/49f568f372b610494d59fa415f4f241c400c7db0))
429
-
430
-
431
-
432
-
433
-
434
- ## [2.7.7](https://github.com/midwayjs/midway/compare/v2.7.6...v2.7.7) (2021-02-20)
435
-
436
- **Note:** Version bump only for package @midwayjs/socketio
437
-
438
-
439
-
440
-
441
-
442
- ## [2.7.5](https://github.com/midwayjs/midway/compare/v2.7.4...v2.7.5) (2021-02-08)
443
-
444
- **Note:** Version bump only for package @midwayjs/socketio
445
-
446
-
447
-
448
-
449
-
450
- ## [2.7.2](https://github.com/midwayjs/midway/compare/v2.7.1...v2.7.2) (2021-01-28)
451
-
452
- **Note:** Version bump only for package @midwayjs/socketio
453
-
454
-
455
-
456
-
457
-
458
- # [2.7.0](https://github.com/midwayjs/midway/compare/v2.6.13...v2.7.0) (2021-01-27)
459
-
460
-
461
- ### Features
462
-
463
- * add midway gRPC framework ([#786](https://github.com/midwayjs/midway/issues/786)) ([d90362c](https://github.com/midwayjs/midway/commit/d90362c6bf15c00621ffc2981f19842f216395f8))
464
- * support entry file in bootstrap ([#819](https://github.com/midwayjs/midway/issues/819)) ([49a5ff6](https://github.com/midwayjs/midway/commit/49a5ff662134bdd42dc3a80738b44a05138f8f7c))
465
-
466
-
467
-
468
-
469
-
470
- ## [2.6.13](https://github.com/midwayjs/midway/compare/v2.6.12...v2.6.13) (2021-01-21)
471
-
472
- **Note:** Version bump only for package @midwayjs/socketio
473
-
474
-
475
-
476
-
477
-
478
- ## [2.6.12](https://github.com/midwayjs/midway/compare/v2.6.11...v2.6.12) (2021-01-15)
479
-
480
- **Note:** Version bump only for package @midwayjs/socketio
481
-
482
-
483
-
484
-
485
-
486
- ## [2.6.10](https://github.com/midwayjs/midway/compare/v2.6.9...v2.6.10) (2021-01-10)
487
-
488
- **Note:** Version bump only for package @midwayjs/socketio
489
-
490
-
491
-
492
-
493
-
494
- ## [2.6.9](https://github.com/midwayjs/midway/compare/v2.6.8...v2.6.9) (2021-01-08)
495
-
496
- **Note:** Version bump only for package @midwayjs/socketio
497
-
498
-
499
-
500
-
501
-
502
- ## [2.6.8](https://github.com/midwayjs/midway/compare/v2.6.7...v2.6.8) (2021-01-06)
503
-
504
- **Note:** Version bump only for package @midwayjs/socketio
505
-
506
-
507
-
508
-
509
-
510
- ## [2.6.7](https://github.com/midwayjs/midway/compare/v2.6.6...v2.6.7) (2021-01-05)
511
-
512
- **Note:** Version bump only for package @midwayjs/socketio
513
-
514
-
515
-
516
-
517
-
518
- ## [2.6.6](https://github.com/midwayjs/midway/compare/v2.6.5...v2.6.6) (2021-01-04)
519
-
520
- **Note:** Version bump only for package @midwayjs/socketio
521
-
522
-
523
-
524
-
525
-
526
- ## [2.6.5](https://github.com/midwayjs/midway/compare/v2.6.4...v2.6.5) (2021-01-04)
527
-
528
- **Note:** Version bump only for package @midwayjs/socketio
529
-
530
-
531
-
532
-
533
-
534
- ## [2.6.4](https://github.com/midwayjs/midway/compare/v2.6.3...v2.6.4) (2021-01-02)
535
-
536
- **Note:** Version bump only for package @midwayjs/socketio
537
-
538
-
539
-
540
-
541
-
542
- ## [2.6.3](https://github.com/midwayjs/midway/compare/v2.6.2...v2.6.3) (2020-12-30)
543
-
544
- **Note:** Version bump only for package @midwayjs/socketio
545
-
546
-
547
-
548
-
549
-
550
- ## [2.6.2](https://github.com/midwayjs/midway/compare/v2.6.1...v2.6.2) (2020-12-30)
551
-
552
- **Note:** Version bump only for package @midwayjs/socketio
553
-
554
-
555
-
556
-
557
-
558
- ## [2.6.1](https://github.com/midwayjs/midway/compare/v2.6.0...v2.6.1) (2020-12-29)
559
-
560
- **Note:** Version bump only for package @midwayjs/socketio
561
-
562
-
563
-
564
-
565
-
566
- # [2.6.0](https://github.com/midwayjs/midway/compare/v2.5.5...v2.6.0) (2020-12-28)
567
-
568
- **Note:** Version bump only for package @midwayjs/socketio
569
-
570
-
571
-
572
-
573
-
574
- ## [2.5.5](https://github.com/midwayjs/midway/compare/v2.5.4...v2.5.5) (2020-12-15)
575
-
576
- **Note:** Version bump only for package @midwayjs/socketio
577
-
578
-
579
-
580
-
581
-
582
- ## [2.5.2](https://github.com/midwayjs/midway/compare/v2.5.1...v2.5.2) (2020-12-04)
583
-
584
- **Note:** Version bump only for package @midwayjs/socketio
585
-
586
-
587
-
588
-
589
-
590
- # [2.5.0](https://github.com/midwayjs/midway/compare/v2.4.8...v2.5.0) (2020-11-28)
591
-
592
- **Note:** Version bump only for package @midwayjs/socketio
593
-
594
-
595
-
596
-
597
-
598
- ## [2.4.7](https://github.com/midwayjs/midway/compare/v2.4.6...v2.4.7) (2020-11-23)
599
-
600
- **Note:** Version bump only for package @midwayjs/socketio
601
-
602
-
603
-
604
-
605
-
606
- ## [2.4.5](https://github.com/midwayjs/midway/compare/v2.4.4...v2.4.5) (2020-11-19)
607
-
608
- **Note:** Version bump only for package @midwayjs/socketio
609
-
610
-
611
-
612
-
613
-
614
- ## [2.4.3](https://github.com/midwayjs/midway/compare/v2.4.2...v2.4.3) (2020-11-16)
615
-
616
- **Note:** Version bump only for package @midwayjs/socketio
617
-
618
-
619
-
620
-
621
-
622
- ## [2.4.2](https://github.com/midwayjs/midway/compare/v2.4.1...v2.4.2) (2020-11-13)
623
-
624
- **Note:** Version bump only for package @midwayjs/socketio
625
-
626
-
627
-
628
-
629
-
630
- ## [2.4.1](https://github.com/midwayjs/midway/compare/v2.4.0...v2.4.1) (2020-11-12)
631
-
632
- **Note:** Version bump only for package @midwayjs/socketio
633
-
634
-
635
-
636
-
637
-
638
- # [2.4.0](https://github.com/midwayjs/midway/compare/v2.3.23...v2.4.0) (2020-11-11)
639
-
640
-
641
- ### Features
642
-
643
- * support define custom egg framework ([#709](https://github.com/midwayjs/midway/issues/709)) ([f5baba1](https://github.com/midwayjs/midway/commit/f5baba18d10e3dc91ba9651effadd00b8f66cf8b))
644
-
645
-
646
-
647
-
648
-
649
- ## [2.3.23](https://github.com/midwayjs/midway/compare/v2.3.22...v2.3.23) (2020-11-03)
650
-
651
- **Note:** Version bump only for package @midwayjs/socketio
652
-
653
-
654
-
655
-
656
-
657
- ## [2.3.22](https://github.com/midwayjs/midway/compare/v2.3.21...v2.3.22) (2020-10-31)
658
-
659
- **Note:** Version bump only for package @midwayjs/socketio
660
-
661
-
662
-
663
-
664
-
665
- ## [2.3.20](https://github.com/midwayjs/midway/compare/v2.3.19...v2.3.20) (2020-10-29)
666
-
667
- **Note:** Version bump only for package @midwayjs/socketio
668
-
669
-
670
-
671
-
672
-
673
- ## [2.3.19](https://github.com/midwayjs/midway/compare/v2.3.18...v2.3.19) (2020-10-28)
674
-
675
- **Note:** Version bump only for package @midwayjs/socketio
676
-
677
-
678
-
679
-
680
-
681
- ## [2.3.18](https://github.com/midwayjs/midway/compare/v2.3.17...v2.3.18) (2020-10-27)
682
-
683
-
684
- ### Bug Fixes
685
-
686
- * configuration inject plugin and more in production environment ([#680](https://github.com/midwayjs/midway/issues/680)) ([41bce5d](https://github.com/midwayjs/midway/commit/41bce5d8a60a6fde61ff62794612eecff2e260ed))
687
-
688
-
689
-
690
-
691
-
692
- ## [2.3.17](https://github.com/midwayjs/midway/compare/v2.3.16...v2.3.17) (2020-10-22)
693
-
694
- **Note:** Version bump only for package @midwayjs/socketio
695
-
696
-
697
-
698
-
699
-
700
- ## [2.3.15](https://github.com/midwayjs/midway/compare/v2.3.14...v2.3.15) (2020-10-15)
701
-
702
- **Note:** Version bump only for package @midwayjs/socketio
703
-
704
-
705
-
706
-
707
-
708
- ## [2.3.14](https://github.com/midwayjs/midway/compare/v2.3.13...v2.3.14) (2020-10-15)
709
-
710
- **Note:** Version bump only for package @midwayjs/socketio
711
-
712
-
713
-
714
-
715
-
716
- ## [2.3.13](https://github.com/midwayjs/midway/compare/v2.3.12...v2.3.13) (2020-10-13)
717
-
718
-
719
- ### Bug Fixes
720
-
721
- * [@plugin](https://github.com/plugin) inject undefined in web middleware ([#667](https://github.com/midwayjs/midway/issues/667)) ([cacb2fa](https://github.com/midwayjs/midway/commit/cacb2faa61258172ef445db0a86e45c3f19014a6))
722
-
723
-
724
-
725
-
726
-
727
- ## [2.3.11](https://github.com/midwayjs/midway/compare/v2.3.10...v2.3.11) (2020-10-08)
728
-
729
- **Note:** Version bump only for package @midwayjs/socketio
730
-
731
-
732
-
733
-
734
-
735
- ## [2.3.10](https://github.com/midwayjs/midway/compare/v2.3.9...v2.3.10) (2020-10-08)
736
-
737
-
738
- ### Features
739
-
740
- * replace configuration.imports to object directly and deprecated string ([#657](https://github.com/midwayjs/midway/issues/657)) ([f1b42a1](https://github.com/midwayjs/midway/commit/f1b42a1b338a69cdfaf63e2d951a65333e4f3007))
741
-
742
-
743
-
744
-
745
-
746
- ## [2.3.9](https://github.com/midwayjs/midway/compare/v2.3.8...v2.3.9) (2020-10-05)
747
-
748
- **Note:** Version bump only for package @midwayjs/socketio
749
-
750
-
751
-
752
-
753
-
754
- ## [2.3.8](https://github.com/midwayjs/midway/compare/v2.3.7...v2.3.8) (2020-10-05)
755
-
756
- **Note:** Version bump only for package @midwayjs/socketio
757
-
758
-
759
-
760
-
761
-
762
- ## [2.3.7](https://github.com/midwayjs/midway/compare/v2.3.6...v2.3.7) (2020-10-04)
763
-
764
- **Note:** Version bump only for package @midwayjs/socketio
765
-
766
-
767
-
768
-
769
-
770
- ## [2.3.6](https://github.com/midwayjs/midway/compare/v2.3.4...v2.3.6) (2020-10-02)
771
-
772
- **Note:** Version bump only for package @midwayjs/socketio
773
-
774
-
775
-
776
-
777
-
778
- ## [2.3.4](https://github.com/midwayjs/midway/compare/v2.3.3...v2.3.4) (2020-09-28)
779
-
780
- **Note:** Version bump only for package @midwayjs/socketio
781
-
782
-
783
-
784
-
785
-
786
- ## [2.3.2](https://github.com/midwayjs/midway/compare/v2.3.1...v2.3.2) (2020-09-28)
787
-
788
- **Note:** Version bump only for package @midwayjs/socketio
789
-
790
-
791
-
792
-
793
-
794
- ## [2.3.1](https://github.com/midwayjs/midway/compare/v2.3.0...v2.3.1) (2020-09-27)
795
-
796
- **Note:** Version bump only for package @midwayjs/socketio
797
-
798
-
799
-
800
-
801
-
802
- # [2.3.0](https://github.com/midwayjs/midway/compare/v2.2.10...v2.3.0) (2020-09-27)
803
-
804
-
805
- ### Features
806
-
807
- * add rabbitmq ([#647](https://github.com/midwayjs/midway/issues/647)) ([2c03eb4](https://github.com/midwayjs/midway/commit/2c03eb4f5e979d309048a11f17f7579a1d299ba1))
808
-
809
-
810
-
811
-
812
-
813
- ## [2.2.10](https://github.com/midwayjs/midway/compare/v2.2.9...v2.2.10) (2020-09-24)
814
-
815
- **Note:** Version bump only for package @midwayjs/socketio
816
-
817
-
818
-
819
-
820
-
821
- ## [2.2.9](https://github.com/midwayjs/midway/compare/v2.2.8...v2.2.9) (2020-09-24)
822
-
823
-
824
- ### Bug Fixes
825
-
826
- * remove sourcemap and src in dist ([#645](https://github.com/midwayjs/midway/issues/645)) ([e561a88](https://github.com/midwayjs/midway/commit/e561a88f4a70af15d4be3d5fe0bd39487677d4ce))
827
-
828
-
829
-
830
-
831
-
832
- ## [2.2.8](https://github.com/midwayjs/midway/compare/v2.2.7...v2.2.8) (2020-09-23)
833
-
834
- **Note:** Version bump only for package @midwayjs/socketio
835
-
836
-
837
-
838
-
839
-
840
- ## [2.2.7](https://github.com/midwayjs/midway/compare/v2.2.6...v2.2.7) (2020-09-20)
841
-
842
- **Note:** Version bump only for package @midwayjs/socketio
843
-
844
-
845
-
846
-
847
-
848
- ## [2.2.6](https://github.com/midwayjs/midway/compare/v2.2.5...v2.2.6) (2020-09-18)
849
-
850
-
851
- ### Features
852
-
853
- * add aop ([#640](https://github.com/midwayjs/midway/issues/640)) ([c3e15b3](https://github.com/midwayjs/midway/commit/c3e15b328c184318e364bf40d32fa4df6be2a30a))
854
-
855
-
856
-
857
-
858
-
859
- ## [2.2.5](https://github.com/midwayjs/midway/compare/v2.2.4...v2.2.5) (2020-09-17)
860
-
861
-
862
- ### Features
863
-
864
- * use midway cli replace egg-bin ([#639](https://github.com/midwayjs/midway/issues/639)) ([62bbf38](https://github.com/midwayjs/midway/commit/62bbf3852899476600a0b594cb7dc274b05e29ec))
865
-
866
-
867
-
868
-
869
-
870
- ## [2.2.4](https://github.com/midwayjs/midway/compare/v2.2.3...v2.2.4) (2020-09-15)
871
-
872
- **Note:** Version bump only for package @midwayjs/socketio
873
-
874
-
875
-
876
-
877
-
878
- ## [2.2.3](https://github.com/midwayjs/midway/compare/v2.2.2...v2.2.3) (2020-09-14)
879
-
880
- **Note:** Version bump only for package @midwayjs/socketio
881
-
882
-
883
-
884
-
885
-
886
- ## [2.2.2](https://github.com/midwayjs/midway/compare/v2.2.1...v2.2.2) (2020-09-14)
887
-
888
- **Note:** Version bump only for package @midwayjs/socketio
889
-
890
-
891
-
892
-
893
-
894
- ## [2.2.1](https://github.com/midwayjs/midway/compare/v2.2.0...v2.2.1) (2020-09-14)
895
-
896
- **Note:** Version bump only for package @midwayjs/socketio
897
-
898
-
899
-
900
-
901
-
902
- # [2.2.0](https://github.com/midwayjs/midway/compare/v2.1.4...v2.2.0) (2020-09-13)
903
-
904
-
905
- ### Features
906
-
907
- * complete 2.x beta ([#630](https://github.com/midwayjs/midway/issues/630)) ([b23cd00](https://github.com/midwayjs/midway/commit/b23cd00fe9cefc9057a2284d38d5419773539206))