@midwayjs/socketio 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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../src/configuration.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAoD;AAKpD,IAAa,qBAAqB,GAAlC,MAAa,qBAAqB;CAAG,CAAA;AAAxB,qBAAqB;IAHjC,IAAA,yBAAa,EAAC;QACb,SAAS,EAAE,UAAU;KACtB,CAAC;GACW,qBAAqB,CAAG;AAAxB,sDAAqB","sourcesContent":["import { Configuration } from '@midwayjs/decorator';\n\n@Configuration({\n namespace: 'socketIO',\n})\nexport class SocketIOConfiguration {}\n"]}
package/dist/framework.js CHANGED
@@ -94,7 +94,7 @@ let MidwaySocketIOFramework = class MidwaySocketIOFramework extends core_1.BaseF
94
94
  socket.on(wsEventInfo.messageEventName, async (...args) => {
95
95
  debug('got message', wsEventInfo.messageEventName, args);
96
96
  try {
97
- const result = await (await this.getMiddleware(async (ctx, next) => {
97
+ const result = await (await this.applyMiddleware(async (ctx, next) => {
98
98
  // eslint-disable-next-line prefer-spread
99
99
  return controller[wsEventInfo.propertyName].apply(controller, args);
100
100
  }))(socket);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"framework.js","sourceRoot":"","sources":["../src/framework.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yCAKwB;AACxB,+BAAgC;AAChC,MAAM,KAAK,GAAG,IAAA,eAAQ,EAAC,kBAAkB,CAAC,CAAC;AAO3C,yCAAmC;AACnC,mDAS6B;AAC7B,qCAAuD;AAGvD,IAAa,uBAAuB,GAApC,MAAa,uBAAwB,SAAQ,oBAI5C;IAJD;;QAKU,kBAAa,GAAG,EAAE,CAAC;IA0N7B,CAAC;IAxNC,SAAS;QACP,OAAO,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACzD,CAA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C;SACJ;IACH,CAAC;IAEO,KAAK,CAAC,kBAAkB,CAC9B,MAAW,EACX,MAA8B,EAC9B,YAAoB,EACpB,SAEC;QAED,IAAI,MAAM,IAAI,SAAS,CAAC,YAAY,CAAC,EAAE;YACrC,KAAK,MAAM,WAAW,IAAI,SAAS,CAAC,YAAY,CAAC,CAAC,cAAc,EAAE;gBAChE,IAAI,WAAW,CAAC,SAAS,KAAK,2BAAe,CAAC,IAAI,EAAE;oBAClD,IAAI,WAAW,CAAC,QAAQ,CAAC,MAAM,EAAE;wBAC/B,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;4BACpD,OAAO,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;wBACzB,CAAC,EAAE,MAAM,CAAC,CAAC;qBACZ;oBACD,yCAAyC;oBACzC,MAAM,CAAC,IAAI,CAAC,KAAK,CACf,MAAM,EACN,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAC9C,CAAC;iBACH;qBAAM,IAAI,WAAW,CAAC,SAAS,KAAK,2BAAe,CAAC,SAAS,EAAE;oBAC9D,yCAAyC;oBACzC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;iBACtD;aACF;SACF;IACH,CAAC;IAEM,gBAAgB;QACrB,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAEM,4BAA4B;QACjC,OAAO,oCAA2B,CAAC;IACrC,CAAC;CACF,CAAA;AA/NY,uBAAuB;IADnC,IAAA,qBAAS,GAAE;GACC,uBAAuB,CA+NnC;AA/NY,0DAAuB","sourcesContent":["import {\n BaseFramework,\n HTTP_SERVER_KEY,\n IMidwayBootstrapOptions,\n MidwayFrameworkType,\n} from '@midwayjs/core';\nimport { debuglog } from 'util';\nconst debug = debuglog('midway:socket.io');\n\nimport {\n IMidwaySocketIOApplication,\n IMidwaySocketIOConfigurationOptions,\n IMidwaySocketIOContext,\n} from './interface';\nimport { Server } from 'socket.io';\nimport {\n WS_CONTROLLER_KEY,\n WS_EVENT_KEY,\n WSControllerOption,\n WSEventInfo,\n WSEventTypeEnum,\n getClassMetadata,\n listModule,\n Framework,\n} from '@midwayjs/decorator';\nimport { MidwaySocketIOContextLogger } from './logger';\n\n@Framework()\nexport class MidwaySocketIOFramework extends BaseFramework<\n IMidwaySocketIOApplication,\n IMidwaySocketIOContext,\n IMidwaySocketIOConfigurationOptions\n> {\n private namespaceList = [];\n\n configure(): IMidwaySocketIOConfigurationOptions {\n return this.configService.getConfiguration('socketIO');\n }\n\n applicationInitialize(options: IMidwayBootstrapOptions) {\n this.app = new Server(\n this.configurationOptions\n ) as IMidwaySocketIOApplication;\n }\n public app: IMidwaySocketIOApplication;\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 if (this.configurationOptions.adapter) {\n this.app.adapter(this.configurationOptions.adapter);\n this.logger.debug('init socket.io-redis ready!');\n }\n\n // listen port when http server not exist\n if (this.configurationOptions.port) {\n this.app.listen(\n this.configurationOptions.port,\n this.configurationOptions\n );\n this.logger.info(\n `Socket.io server port = ${this.configurationOptions.port} start success`\n );\n } else if (this.applicationContext.hasObject(HTTP_SERVER_KEY)) {\n this.app.attach(\n this.applicationContext.get(HTTP_SERVER_KEY),\n this.configurationOptions\n );\n this.logger.info(\n 'Socket.io server start success and attach to web server'\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 });\n }\n\n public getFrameworkType(): MidwayFrameworkType {\n return MidwayFrameworkType.WS_IO;\n }\n\n private async loadMidwayController() {\n // create room\n const controllerModules = listModule(WS_CONTROLLER_KEY);\n for (const module of controllerModules) {\n await this.addNamespace(module);\n }\n }\n\n private async addNamespace(target: any) {\n const controllerOption: WSControllerOption = getClassMetadata(\n WS_CONTROLLER_KEY,\n target\n );\n\n const nsp = this.app.of(controllerOption.namespace);\n this.namespaceList.push(controllerOption.namespace);\n\n nsp.use((socket: any, next) => {\n this.app.createAnonymousContext(socket);\n socket.requestContext.registerObject('socket', socket);\n socket.app = this.app;\n next();\n });\n\n nsp.on('connect', async (socket: IMidwaySocketIOContext) => {\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]\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('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('disconnect', async (reason: string) => {\n try {\n const result = await controller[wsEventInfo.propertyName].apply(\n controller,\n [reason]\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 });\n } else {\n // 存储每个方法对应的后置响应处理,供后续快速匹配\n methodMap[wsEventInfo.propertyName].responseEvents.push(\n wsEventInfo\n );\n }\n }\n }\n });\n\n if (nsp.adapter) {\n nsp.adapter.on('error', err => {\n this.logger.error(err);\n });\n }\n }\n\n private async bindSocketResponse(\n result: any,\n socket: IMidwaySocketIOContext,\n propertyName: string,\n methodMap: {\n responseEvents?: WSEventInfo[];\n }\n ) {\n if (result && methodMap[propertyName]) {\n for (const wsEventInfo of methodMap[propertyName].responseEvents) {\n if (wsEventInfo.eventType === WSEventTypeEnum.EMIT) {\n if (wsEventInfo.roomName.length) {\n socket = wsEventInfo.roomName.reduce((socket, name) => {\n return socket.to(name);\n }, socket);\n }\n // eslint-disable-next-line prefer-spread\n socket.emit.apply(\n socket,\n [wsEventInfo.messageEventName].concat(result)\n );\n } else if (wsEventInfo.eventType === WSEventTypeEnum.BROADCAST) {\n // eslint-disable-next-line prefer-spread\n socket.nsp.emit.apply(socket.nsp, [].concat(result));\n }\n }\n }\n }\n\n public getFrameworkName() {\n return 'midway:socketIO';\n }\n\n public getDefaultContextLoggerClass(): any {\n return MidwaySocketIOContextLogger;\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yCAAmE;AAA1D,sGAAA,uBAAuB,OAAa;AAC7C,+BAA4C;AAAnC,0GAAA,kBAAkB,OAAA;AAC3B,8CAA4B;AAC5B,iDAAyE;AAAhE,8GAAA,qBAAqB,OAAiB","sourcesContent":["export { MidwaySocketIOFramework as Framework } from './framework';\nexport { createRedisAdapter } from './util';\nexport * from './interface';\nexport { SocketIOConfiguration as Configuration } from './configuration';\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interface.js","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":"","sourcesContent":["import * as SocketIO from 'socket.io';\nimport {\n IConfigurationOptions,\n IMidwayApplication,\n IMidwayContext,\n NextFunction as BaseNextFunction\n} from '@midwayjs/core';\n\nexport type IMidwaySocketIOApplication = IMidwayApplication<IMidwaySocketIOContext, {\n use(fn: (socket: IMidwaySocketIOContext, fn: (err?: any) => void) => void): SocketIO.Namespace;\n} & SocketIO.Server>;\n\nexport type IMidwaySocketIOConfigurationOptions = {\n port?: number;\n pubClient?: any;\n subClient?: any;\n} & Partial<SocketIO.ServerOptions> & IConfigurationOptions;\n\nexport type IMidwaySocketIOContext = IMidwayContext<SocketIO.Socket & {\n app: IMidwaySocketIOApplication\n}>;\n\nexport type Application = IMidwaySocketIOApplication;\n\nexport interface Context extends IMidwaySocketIOContext {}\nexport type NextFunction = BaseNextFunction;\n\ndeclare module '@midwayjs/core/dist/interface' {\n interface MidwayConfig {\n socketIO?: IMidwaySocketIOConfigurationOptions;\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":";;;AAAA,6CAAuD;AAGvD,MAAa,2BAA4B,SAAQ,4BAA2C;IAC1F,kBAAkB;QAChB,wDAAwD;QACxD,sDAAsD;QACtD,uBAAuB;QACvB,+CAA+C;QAC/C,WAAW;QACX,aAAa;QACb,UAAU;QACV,aAAa;QACb,UAAU;QACV,cAAc;QACd,UAAU;QACV,UAAU;QACV,YAAY;QACZ,iBAAiB;QACjB,UAAU;QACV,YAAY;QACZ,OAAO,EAAE,CAAC;IACZ,CAAC;CACF;AApBD,kEAoBC","sourcesContent":["import { MidwayContextLogger } from '@midwayjs/logger';\nimport { IMidwaySocketIOContext } from './interface';\n\nexport class MidwaySocketIOContextLogger extends MidwayContextLogger<IMidwaySocketIOContext> {\n formatContextLabel() {\n // format: '[$userId/$ip/$traceId/$use_ms $method $url]'\n // const userId = req?.['session']?.['userId'] || '-';\n // const traceId = '-';\n // const use = Date.now() - this.ctx.startTime;\n // return (\n // userId +\n // '/' +\n // req.ip +\n // '/' +\n // traceId +\n // '/' +\n // use +\n // 'ms ' +\n // req.method +\n // ' ' +\n // req.url\n return '';\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;AAAA,qDAAqE;AAMrE,SAAgB,kBAAkB,CAAC,OAAY;IAC7C,IAAI,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,EAAE;QAChC,OAAO,IAAA,+BAAa,EAClB,UAAU,GAAG,OAAO,CAAC,IAAI,GAAG,GAAG,GAAG,OAAO,CAAC,IAAI,EAC9C,OAAO,CACR,CAAC;KACH;IACD,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS,EAAE;QAC1C,OAAO,IAAA,+BAAa,EAAC,OAAO,CAAC,CAAC;KAC/B;IACD,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAClD,CAAC;AAXD,gDAWC","sourcesContent":["import { createAdapter, RedisAdapterOptions } from 'socket.io-redis';\n\nexport function createRedisAdapter(\n options: { host: string; port: number } & Partial<RedisAdapterOptions>\n);\nexport function createRedisAdapter(options: Partial<RedisAdapterOptions>);\nexport function createRedisAdapter(options: any) {\n if (options.host && options.port) {\n return createAdapter(\n 'redis://' + options.host + ':' + options.port,\n options\n );\n }\n if (options.pubClient && options.subClient) {\n return createAdapter(options);\n }\n throw new Error('error socket adapter options');\n}\n"]}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@midwayjs/socketio",
3
- "version": "3.0.0-beta.8",
3
+ "version": "3.0.2",
4
4
  "description": "Midway Web Framework for socket.io",
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": [
@@ -19,20 +19,21 @@
19
19
  ],
20
20
  "files": [
21
21
  "dist/**/*.js",
22
- "dist/**/*.d.ts"
22
+ "dist/**/*.d.ts",
23
+ "dist/**/*.js.map"
23
24
  ],
24
25
  "license": "MIT",
25
26
  "devDependencies": {
26
- "@midwayjs/decorator": "^3.0.0-beta.8",
27
- "@midwayjs/mock": "^3.0.0-beta.8",
28
- "@types/socket.io-client": "^1.4.36",
29
- "fs-extra": "^8.0.1",
30
- "socket.io-client": "^4.0.0"
27
+ "@midwayjs/decorator": "^3.0.2",
28
+ "@midwayjs/mock": "^3.0.2",
29
+ "@types/socket.io-client": "1.4.36",
30
+ "fs-extra": "10.0.0",
31
+ "socket.io-client": "4.4.1"
31
32
  },
32
33
  "dependencies": {
33
- "@midwayjs/core": "^3.0.0-beta.8",
34
- "@midwayjs/logger": "^3.0.0-beta.8",
35
- "socket.io": "^4.0.0",
34
+ "@midwayjs/core": "^3.0.2",
35
+ "@midwayjs/logger": "^2.14.0",
36
+ "socket.io": "4.4.1",
36
37
  "socket.io-redis": "^6.1.0"
37
38
  },
38
39
  "author": "Harry Chen <czy88840616@gmail.com>",
@@ -43,5 +44,5 @@
43
44
  "engines": {
44
45
  "node": ">=12"
45
46
  },
46
- "gitHead": "bfafbdf8798f48d4daac5dd88ad53c6b2f33c110"
47
+ "gitHead": "ca77247d229978a736e79bb208579c014ed226fc"
47
48
  }
package/CHANGELOG.md DELETED
@@ -1,911 +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/socketio
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/socketio
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/socketio
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
- **Note:** Version bump only for package @midwayjs/socketio
77
-
78
-
79
-
80
-
81
-
82
- ## [2.12.3](https://github.com/midwayjs/midway/compare/v2.12.2...v2.12.3) (2021-08-09)
83
-
84
- **Note:** Version bump only for package @midwayjs/socketio
85
-
86
-
87
-
88
-
89
-
90
- ## [2.12.1](https://github.com/midwayjs/midway/compare/v2.12.0...v2.12.1) (2021-08-01)
91
-
92
- **Note:** Version bump only for package @midwayjs/socketio
93
-
94
-
95
-
96
-
97
-
98
- # [2.12.0](https://github.com/midwayjs/midway/compare/v2.11.7...v2.12.0) (2021-07-30)
99
-
100
- **Note:** Version bump only for package @midwayjs/socketio
101
-
102
-
103
-
104
-
105
-
106
- ## [2.11.7](https://github.com/midwayjs/midway/compare/v2.11.6...v2.11.7) (2021-07-24)
107
-
108
-
109
- ### Bug Fixes
110
-
111
- * socket listen sequelize ([#1175](https://github.com/midwayjs/midway/issues/1175)) ([84f9b68](https://github.com/midwayjs/midway/commit/84f9b68def0761d48242fa73d64f83de03f582ab))
112
-
113
-
114
-
115
-
116
-
117
- ## [2.11.6](https://github.com/midwayjs/midway/compare/v2.11.5...v2.11.6) (2021-07-16)
118
-
119
- **Note:** Version bump only for package @midwayjs/socketio
120
-
121
-
122
-
123
-
124
-
125
- ## [2.11.5](https://github.com/midwayjs/midway/compare/v2.11.4...v2.11.5) (2021-07-15)
126
-
127
- **Note:** Version bump only for package @midwayjs/socketio
128
-
129
-
130
-
131
-
132
-
133
- ## [2.11.4](https://github.com/midwayjs/midway/compare/v2.11.3...v2.11.4) (2021-07-06)
134
-
135
- **Note:** Version bump only for package @midwayjs/socketio
136
-
137
-
138
-
139
-
140
-
141
- ## [2.11.3](https://github.com/midwayjs/midway/compare/v2.11.2...v2.11.3) (2021-07-02)
142
-
143
- **Note:** Version bump only for package @midwayjs/socketio
144
-
145
-
146
-
147
-
148
-
149
- ## [2.11.2](https://github.com/midwayjs/midway/compare/v2.11.1...v2.11.2) (2021-06-28)
150
-
151
- **Note:** Version bump only for package @midwayjs/socketio
152
-
153
-
154
-
155
-
156
-
157
- ## [2.11.1](https://github.com/midwayjs/midway/compare/v2.11.0...v2.11.1) (2021-06-19)
158
-
159
- **Note:** Version bump only for package @midwayjs/socketio
160
-
161
-
162
-
163
-
164
-
165
- # [2.11.0](https://github.com/midwayjs/midway/compare/v2.10.19...v2.11.0) (2021-06-10)
166
-
167
- **Note:** Version bump only for package @midwayjs/socketio
168
-
169
-
170
-
171
-
172
-
173
- ## [2.10.18](https://github.com/midwayjs/midway/compare/v2.10.17...v2.10.18) (2021-05-26)
174
-
175
- **Note:** Version bump only for package @midwayjs/socketio
176
-
177
-
178
-
179
-
180
-
181
- ## [2.10.14](https://github.com/midwayjs/midway/compare/v2.10.13...v2.10.14) (2021-05-11)
182
-
183
-
184
- ### Bug Fixes
185
-
186
- * serverless app more method ([#1034](https://github.com/midwayjs/midway/issues/1034)) ([9c44c3f](https://github.com/midwayjs/midway/commit/9c44c3f58930d0c12464d00eceee93cb9e7aaa62))
187
-
188
-
189
-
190
-
191
-
192
- ## [2.10.13](https://github.com/midwayjs/midway/compare/v2.10.12...v2.10.13) (2021-05-08)
193
-
194
-
195
- ### Bug Fixes
196
-
197
- * remove zlib ([#1035](https://github.com/midwayjs/midway/issues/1035)) ([cc2cd40](https://github.com/midwayjs/midway/commit/cc2cd405a104b3388d93a09d981b59b472fd8ea1))
198
-
199
-
200
-
201
-
202
-
203
- ## [2.10.12](https://github.com/midwayjs/midway/compare/v2.10.11...v2.10.12) (2021-05-07)
204
-
205
- **Note:** Version bump only for package @midwayjs/socketio
206
-
207
-
208
-
209
-
210
-
211
- ## [2.10.11](https://github.com/midwayjs/midway/compare/v2.10.10...v2.10.11) (2021-04-29)
212
-
213
- **Note:** Version bump only for package @midwayjs/socketio
214
-
215
-
216
-
217
-
218
-
219
- ## [2.10.10](https://github.com/midwayjs/midway/compare/v2.10.9...v2.10.10) (2021-04-24)
220
-
221
- **Note:** Version bump only for package @midwayjs/socketio
222
-
223
-
224
-
225
-
226
-
227
- ## [2.10.9](https://github.com/midwayjs/midway/compare/v2.10.8...v2.10.9) (2021-04-21)
228
-
229
- **Note:** Version bump only for package @midwayjs/socketio
230
-
231
-
232
-
233
-
234
-
235
- ## [2.10.8](https://github.com/midwayjs/midway/compare/v2.10.7...v2.10.8) (2021-04-21)
236
-
237
- **Note:** Version bump only for package @midwayjs/socketio
238
-
239
-
240
-
241
-
242
-
243
- ## [2.10.7](https://github.com/midwayjs/midway/compare/v2.10.6...v2.10.7) (2021-04-17)
244
-
245
-
246
- ### Bug Fixes
247
-
248
- * add event name args ([#986](https://github.com/midwayjs/midway/issues/986)) ([bfd8232](https://github.com/midwayjs/midway/commit/bfd82320aee8600d8fa30bd2821a0e68c80fd755))
249
- * format ([#997](https://github.com/midwayjs/midway/issues/997)) ([456cc14](https://github.com/midwayjs/midway/commit/456cc14513bdb000d1aa3130e9719caf7a8a803f))
250
-
251
-
252
-
253
-
254
-
255
- ## [2.10.6](https://github.com/midwayjs/midway/compare/v2.10.5...v2.10.6) (2021-04-14)
256
-
257
- **Note:** Version bump only for package @midwayjs/socketio
258
-
259
-
260
-
261
-
262
-
263
- ## [2.10.5](https://github.com/midwayjs/midway/compare/v2.10.4...v2.10.5) (2021-04-13)
264
-
265
-
266
- ### Bug Fixes
267
-
268
- * delay load without layer and egg-cluster ([#985](https://github.com/midwayjs/midway/issues/985)) ([52ba60d](https://github.com/midwayjs/midway/commit/52ba60d67d6e2df7a53609f72ec067dc083317ce))
269
-
270
-
271
-
272
-
273
-
274
- ## [2.10.4](https://github.com/midwayjs/midway/compare/v2.10.3...v2.10.4) (2021-04-10)
275
-
276
-
277
- ### Bug Fixes
278
-
279
- * clear container cache when test ([#978](https://github.com/midwayjs/midway/issues/978)) ([a202075](https://github.com/midwayjs/midway/commit/a202075b52d281e06f1ed7c6139e968fafc960f6))
280
-
281
-
282
-
283
-
284
-
285
- ## [2.10.3](https://github.com/midwayjs/midway/compare/v2.10.2...v2.10.3) (2021-04-07)
286
-
287
- **Note:** Version bump only for package @midwayjs/socketio
288
-
289
-
290
-
291
-
292
-
293
- ## [2.10.2](https://github.com/midwayjs/midway/compare/v2.10.1...v2.10.2) (2021-04-05)
294
-
295
- **Note:** Version bump only for package @midwayjs/socketio
296
-
297
-
298
-
299
-
300
-
301
- # [2.10.0](https://github.com/midwayjs/midway/compare/v2.9.3...v2.10.0) (2021-04-02)
302
-
303
- **Note:** Version bump only for package @midwayjs/socketio
304
-
305
-
306
-
307
-
308
-
309
- ## [2.9.3](https://github.com/midwayjs/midway/compare/v2.9.2...v2.9.3) (2021-03-30)
310
-
311
- **Note:** Version bump only for package @midwayjs/socketio
312
-
313
-
314
-
315
-
316
-
317
- ## [2.9.2](https://github.com/midwayjs/midway/compare/v2.9.1...v2.9.2) (2021-03-27)
318
-
319
-
320
- ### Bug Fixes
321
-
322
- * missing namespace requestContainer ([#942](https://github.com/midwayjs/midway/issues/942)) ([92e4ee6](https://github.com/midwayjs/midway/commit/92e4ee638d657677b1295bb71c033471b850990b))
323
-
324
-
325
-
326
-
327
-
328
- ## [2.9.1](https://github.com/midwayjs/midway/compare/v2.9.0...v2.9.1) (2021-03-24)
329
-
330
- **Note:** Version bump only for package @midwayjs/socketio
331
-
332
-
333
-
334
-
335
-
336
- # [2.9.0](https://github.com/midwayjs/midway/compare/v2.8.13...v2.9.0) (2021-03-22)
337
-
338
-
339
- ### Features
340
-
341
- * add socket.io-redis support ([#874](https://github.com/midwayjs/midway/issues/874)) ([2818920](https://github.com/midwayjs/midway/commit/2818920b9d3391c81666c5b8587a899b9b237d9e))
342
-
343
-
344
-
345
-
346
-
347
- ## [2.8.13](https://github.com/midwayjs/midway/compare/v2.8.12...v2.8.13) (2021-03-17)
348
-
349
- **Note:** Version bump only for package @midwayjs/socketio
350
-
351
-
352
-
353
-
354
-
355
- ## [2.8.11](https://github.com/midwayjs/midway/compare/v2.8.10...v2.8.11) (2021-03-12)
356
-
357
- **Note:** Version bump only for package @midwayjs/socketio
358
-
359
-
360
-
361
-
362
-
363
- ## [2.8.9](https://github.com/midwayjs/midway/compare/v2.8.8...v2.8.9) (2021-03-08)
364
-
365
- **Note:** Version bump only for package @midwayjs/socketio
366
-
367
-
368
-
369
-
370
-
371
- ## [2.8.8](https://github.com/midwayjs/midway/compare/v2.8.7...v2.8.8) (2021-03-06)
372
-
373
- **Note:** Version bump only for package @midwayjs/socketio
374
-
375
-
376
-
377
-
378
-
379
- ## [2.8.7](https://github.com/midwayjs/midway/compare/v2.8.6...v2.8.7) (2021-03-04)
380
-
381
- **Note:** Version bump only for package @midwayjs/socketio
382
-
383
-
384
-
385
-
386
-
387
- ## [2.8.6](https://github.com/midwayjs/midway/compare/v2.8.5...v2.8.6) (2021-03-03)
388
-
389
- **Note:** Version bump only for package @midwayjs/socketio
390
-
391
-
392
-
393
-
394
-
395
- ## [2.8.5](https://github.com/midwayjs/midway/compare/v2.8.4...v2.8.5) (2021-03-03)
396
-
397
- **Note:** Version bump only for package @midwayjs/socketio
398
-
399
-
400
-
401
-
402
-
403
- ## [2.8.4](https://github.com/midwayjs/midway/compare/v2.8.3...v2.8.4) (2021-03-03)
404
-
405
- **Note:** Version bump only for package @midwayjs/socketio
406
-
407
-
408
-
409
-
410
-
411
- ## [2.8.3](https://github.com/midwayjs/midway/compare/v2.8.2...v2.8.3) (2021-03-01)
412
-
413
- **Note:** Version bump only for package @midwayjs/socketio
414
-
415
-
416
-
417
-
418
-
419
- ## [2.8.2](https://github.com/midwayjs/midway/compare/v2.8.0...v2.8.2) (2021-02-27)
420
-
421
- **Note:** Version bump only for package @midwayjs/socketio
422
-
423
-
424
-
425
-
426
-
427
- # [2.8.0](https://github.com/midwayjs/midway/compare/v2.7.7...v2.8.0) (2021-02-24)
428
-
429
-
430
- ### Features
431
-
432
- * 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))
433
-
434
-
435
-
436
-
437
-
438
- ## [2.7.7](https://github.com/midwayjs/midway/compare/v2.7.6...v2.7.7) (2021-02-20)
439
-
440
- **Note:** Version bump only for package @midwayjs/socketio
441
-
442
-
443
-
444
-
445
-
446
- ## [2.7.5](https://github.com/midwayjs/midway/compare/v2.7.4...v2.7.5) (2021-02-08)
447
-
448
- **Note:** Version bump only for package @midwayjs/socketio
449
-
450
-
451
-
452
-
453
-
454
- ## [2.7.2](https://github.com/midwayjs/midway/compare/v2.7.1...v2.7.2) (2021-01-28)
455
-
456
- **Note:** Version bump only for package @midwayjs/socketio
457
-
458
-
459
-
460
-
461
-
462
- # [2.7.0](https://github.com/midwayjs/midway/compare/v2.6.13...v2.7.0) (2021-01-27)
463
-
464
-
465
- ### Features
466
-
467
- * add midway gRPC framework ([#786](https://github.com/midwayjs/midway/issues/786)) ([d90362c](https://github.com/midwayjs/midway/commit/d90362c6bf15c00621ffc2981f19842f216395f8))
468
- * support entry file in bootstrap ([#819](https://github.com/midwayjs/midway/issues/819)) ([49a5ff6](https://github.com/midwayjs/midway/commit/49a5ff662134bdd42dc3a80738b44a05138f8f7c))
469
-
470
-
471
-
472
-
473
-
474
- ## [2.6.13](https://github.com/midwayjs/midway/compare/v2.6.12...v2.6.13) (2021-01-21)
475
-
476
- **Note:** Version bump only for package @midwayjs/socketio
477
-
478
-
479
-
480
-
481
-
482
- ## [2.6.12](https://github.com/midwayjs/midway/compare/v2.6.11...v2.6.12) (2021-01-15)
483
-
484
- **Note:** Version bump only for package @midwayjs/socketio
485
-
486
-
487
-
488
-
489
-
490
- ## [2.6.10](https://github.com/midwayjs/midway/compare/v2.6.9...v2.6.10) (2021-01-10)
491
-
492
- **Note:** Version bump only for package @midwayjs/socketio
493
-
494
-
495
-
496
-
497
-
498
- ## [2.6.9](https://github.com/midwayjs/midway/compare/v2.6.8...v2.6.9) (2021-01-08)
499
-
500
- **Note:** Version bump only for package @midwayjs/socketio
501
-
502
-
503
-
504
-
505
-
506
- ## [2.6.8](https://github.com/midwayjs/midway/compare/v2.6.7...v2.6.8) (2021-01-06)
507
-
508
- **Note:** Version bump only for package @midwayjs/socketio
509
-
510
-
511
-
512
-
513
-
514
- ## [2.6.7](https://github.com/midwayjs/midway/compare/v2.6.6...v2.6.7) (2021-01-05)
515
-
516
- **Note:** Version bump only for package @midwayjs/socketio
517
-
518
-
519
-
520
-
521
-
522
- ## [2.6.6](https://github.com/midwayjs/midway/compare/v2.6.5...v2.6.6) (2021-01-04)
523
-
524
- **Note:** Version bump only for package @midwayjs/socketio
525
-
526
-
527
-
528
-
529
-
530
- ## [2.6.5](https://github.com/midwayjs/midway/compare/v2.6.4...v2.6.5) (2021-01-04)
531
-
532
- **Note:** Version bump only for package @midwayjs/socketio
533
-
534
-
535
-
536
-
537
-
538
- ## [2.6.4](https://github.com/midwayjs/midway/compare/v2.6.3...v2.6.4) (2021-01-02)
539
-
540
- **Note:** Version bump only for package @midwayjs/socketio
541
-
542
-
543
-
544
-
545
-
546
- ## [2.6.3](https://github.com/midwayjs/midway/compare/v2.6.2...v2.6.3) (2020-12-30)
547
-
548
- **Note:** Version bump only for package @midwayjs/socketio
549
-
550
-
551
-
552
-
553
-
554
- ## [2.6.2](https://github.com/midwayjs/midway/compare/v2.6.1...v2.6.2) (2020-12-30)
555
-
556
- **Note:** Version bump only for package @midwayjs/socketio
557
-
558
-
559
-
560
-
561
-
562
- ## [2.6.1](https://github.com/midwayjs/midway/compare/v2.6.0...v2.6.1) (2020-12-29)
563
-
564
- **Note:** Version bump only for package @midwayjs/socketio
565
-
566
-
567
-
568
-
569
-
570
- # [2.6.0](https://github.com/midwayjs/midway/compare/v2.5.5...v2.6.0) (2020-12-28)
571
-
572
- **Note:** Version bump only for package @midwayjs/socketio
573
-
574
-
575
-
576
-
577
-
578
- ## [2.5.5](https://github.com/midwayjs/midway/compare/v2.5.4...v2.5.5) (2020-12-15)
579
-
580
- **Note:** Version bump only for package @midwayjs/socketio
581
-
582
-
583
-
584
-
585
-
586
- ## [2.5.2](https://github.com/midwayjs/midway/compare/v2.5.1...v2.5.2) (2020-12-04)
587
-
588
- **Note:** Version bump only for package @midwayjs/socketio
589
-
590
-
591
-
592
-
593
-
594
- # [2.5.0](https://github.com/midwayjs/midway/compare/v2.4.8...v2.5.0) (2020-11-28)
595
-
596
- **Note:** Version bump only for package @midwayjs/socketio
597
-
598
-
599
-
600
-
601
-
602
- ## [2.4.7](https://github.com/midwayjs/midway/compare/v2.4.6...v2.4.7) (2020-11-23)
603
-
604
- **Note:** Version bump only for package @midwayjs/socketio
605
-
606
-
607
-
608
-
609
-
610
- ## [2.4.5](https://github.com/midwayjs/midway/compare/v2.4.4...v2.4.5) (2020-11-19)
611
-
612
- **Note:** Version bump only for package @midwayjs/socketio
613
-
614
-
615
-
616
-
617
-
618
- ## [2.4.3](https://github.com/midwayjs/midway/compare/v2.4.2...v2.4.3) (2020-11-16)
619
-
620
- **Note:** Version bump only for package @midwayjs/socketio
621
-
622
-
623
-
624
-
625
-
626
- ## [2.4.2](https://github.com/midwayjs/midway/compare/v2.4.1...v2.4.2) (2020-11-13)
627
-
628
- **Note:** Version bump only for package @midwayjs/socketio
629
-
630
-
631
-
632
-
633
-
634
- ## [2.4.1](https://github.com/midwayjs/midway/compare/v2.4.0...v2.4.1) (2020-11-12)
635
-
636
- **Note:** Version bump only for package @midwayjs/socketio
637
-
638
-
639
-
640
-
641
-
642
- # [2.4.0](https://github.com/midwayjs/midway/compare/v2.3.23...v2.4.0) (2020-11-11)
643
-
644
-
645
- ### Features
646
-
647
- * support define custom egg framework ([#709](https://github.com/midwayjs/midway/issues/709)) ([f5baba1](https://github.com/midwayjs/midway/commit/f5baba18d10e3dc91ba9651effadd00b8f66cf8b))
648
-
649
-
650
-
651
-
652
-
653
- ## [2.3.23](https://github.com/midwayjs/midway/compare/v2.3.22...v2.3.23) (2020-11-03)
654
-
655
- **Note:** Version bump only for package @midwayjs/socketio
656
-
657
-
658
-
659
-
660
-
661
- ## [2.3.22](https://github.com/midwayjs/midway/compare/v2.3.21...v2.3.22) (2020-10-31)
662
-
663
- **Note:** Version bump only for package @midwayjs/socketio
664
-
665
-
666
-
667
-
668
-
669
- ## [2.3.20](https://github.com/midwayjs/midway/compare/v2.3.19...v2.3.20) (2020-10-29)
670
-
671
- **Note:** Version bump only for package @midwayjs/socketio
672
-
673
-
674
-
675
-
676
-
677
- ## [2.3.19](https://github.com/midwayjs/midway/compare/v2.3.18...v2.3.19) (2020-10-28)
678
-
679
- **Note:** Version bump only for package @midwayjs/socketio
680
-
681
-
682
-
683
-
684
-
685
- ## [2.3.18](https://github.com/midwayjs/midway/compare/v2.3.17...v2.3.18) (2020-10-27)
686
-
687
-
688
- ### Bug Fixes
689
-
690
- * configuration inject plugin and more in production environment ([#680](https://github.com/midwayjs/midway/issues/680)) ([41bce5d](https://github.com/midwayjs/midway/commit/41bce5d8a60a6fde61ff62794612eecff2e260ed))
691
-
692
-
693
-
694
-
695
-
696
- ## [2.3.17](https://github.com/midwayjs/midway/compare/v2.3.16...v2.3.17) (2020-10-22)
697
-
698
- **Note:** Version bump only for package @midwayjs/socketio
699
-
700
-
701
-
702
-
703
-
704
- ## [2.3.15](https://github.com/midwayjs/midway/compare/v2.3.14...v2.3.15) (2020-10-15)
705
-
706
- **Note:** Version bump only for package @midwayjs/socketio
707
-
708
-
709
-
710
-
711
-
712
- ## [2.3.14](https://github.com/midwayjs/midway/compare/v2.3.13...v2.3.14) (2020-10-15)
713
-
714
- **Note:** Version bump only for package @midwayjs/socketio
715
-
716
-
717
-
718
-
719
-
720
- ## [2.3.13](https://github.com/midwayjs/midway/compare/v2.3.12...v2.3.13) (2020-10-13)
721
-
722
-
723
- ### Bug Fixes
724
-
725
- * [@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))
726
-
727
-
728
-
729
-
730
-
731
- ## [2.3.11](https://github.com/midwayjs/midway/compare/v2.3.10...v2.3.11) (2020-10-08)
732
-
733
- **Note:** Version bump only for package @midwayjs/socketio
734
-
735
-
736
-
737
-
738
-
739
- ## [2.3.10](https://github.com/midwayjs/midway/compare/v2.3.9...v2.3.10) (2020-10-08)
740
-
741
-
742
- ### Features
743
-
744
- * 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))
745
-
746
-
747
-
748
-
749
-
750
- ## [2.3.9](https://github.com/midwayjs/midway/compare/v2.3.8...v2.3.9) (2020-10-05)
751
-
752
- **Note:** Version bump only for package @midwayjs/socketio
753
-
754
-
755
-
756
-
757
-
758
- ## [2.3.8](https://github.com/midwayjs/midway/compare/v2.3.7...v2.3.8) (2020-10-05)
759
-
760
- **Note:** Version bump only for package @midwayjs/socketio
761
-
762
-
763
-
764
-
765
-
766
- ## [2.3.7](https://github.com/midwayjs/midway/compare/v2.3.6...v2.3.7) (2020-10-04)
767
-
768
- **Note:** Version bump only for package @midwayjs/socketio
769
-
770
-
771
-
772
-
773
-
774
- ## [2.3.6](https://github.com/midwayjs/midway/compare/v2.3.4...v2.3.6) (2020-10-02)
775
-
776
- **Note:** Version bump only for package @midwayjs/socketio
777
-
778
-
779
-
780
-
781
-
782
- ## [2.3.4](https://github.com/midwayjs/midway/compare/v2.3.3...v2.3.4) (2020-09-28)
783
-
784
- **Note:** Version bump only for package @midwayjs/socketio
785
-
786
-
787
-
788
-
789
-
790
- ## [2.3.2](https://github.com/midwayjs/midway/compare/v2.3.1...v2.3.2) (2020-09-28)
791
-
792
- **Note:** Version bump only for package @midwayjs/socketio
793
-
794
-
795
-
796
-
797
-
798
- ## [2.3.1](https://github.com/midwayjs/midway/compare/v2.3.0...v2.3.1) (2020-09-27)
799
-
800
- **Note:** Version bump only for package @midwayjs/socketio
801
-
802
-
803
-
804
-
805
-
806
- # [2.3.0](https://github.com/midwayjs/midway/compare/v2.2.10...v2.3.0) (2020-09-27)
807
-
808
-
809
- ### Features
810
-
811
- * add rabbitmq ([#647](https://github.com/midwayjs/midway/issues/647)) ([2c03eb4](https://github.com/midwayjs/midway/commit/2c03eb4f5e979d309048a11f17f7579a1d299ba1))
812
-
813
-
814
-
815
-
816
-
817
- ## [2.2.10](https://github.com/midwayjs/midway/compare/v2.2.9...v2.2.10) (2020-09-24)
818
-
819
- **Note:** Version bump only for package @midwayjs/socketio
820
-
821
-
822
-
823
-
824
-
825
- ## [2.2.9](https://github.com/midwayjs/midway/compare/v2.2.8...v2.2.9) (2020-09-24)
826
-
827
-
828
- ### Bug Fixes
829
-
830
- * remove sourcemap and src in dist ([#645](https://github.com/midwayjs/midway/issues/645)) ([e561a88](https://github.com/midwayjs/midway/commit/e561a88f4a70af15d4be3d5fe0bd39487677d4ce))
831
-
832
-
833
-
834
-
835
-
836
- ## [2.2.8](https://github.com/midwayjs/midway/compare/v2.2.7...v2.2.8) (2020-09-23)
837
-
838
- **Note:** Version bump only for package @midwayjs/socketio
839
-
840
-
841
-
842
-
843
-
844
- ## [2.2.7](https://github.com/midwayjs/midway/compare/v2.2.6...v2.2.7) (2020-09-20)
845
-
846
- **Note:** Version bump only for package @midwayjs/socketio
847
-
848
-
849
-
850
-
851
-
852
- ## [2.2.6](https://github.com/midwayjs/midway/compare/v2.2.5...v2.2.6) (2020-09-18)
853
-
854
-
855
- ### Features
856
-
857
- * add aop ([#640](https://github.com/midwayjs/midway/issues/640)) ([c3e15b3](https://github.com/midwayjs/midway/commit/c3e15b328c184318e364bf40d32fa4df6be2a30a))
858
-
859
-
860
-
861
-
862
-
863
- ## [2.2.5](https://github.com/midwayjs/midway/compare/v2.2.4...v2.2.5) (2020-09-17)
864
-
865
-
866
- ### Features
867
-
868
- * use midway cli replace egg-bin ([#639](https://github.com/midwayjs/midway/issues/639)) ([62bbf38](https://github.com/midwayjs/midway/commit/62bbf3852899476600a0b594cb7dc274b05e29ec))
869
-
870
-
871
-
872
-
873
-
874
- ## [2.2.4](https://github.com/midwayjs/midway/compare/v2.2.3...v2.2.4) (2020-09-15)
875
-
876
- **Note:** Version bump only for package @midwayjs/socketio
877
-
878
-
879
-
880
-
881
-
882
- ## [2.2.3](https://github.com/midwayjs/midway/compare/v2.2.2...v2.2.3) (2020-09-14)
883
-
884
- **Note:** Version bump only for package @midwayjs/socketio
885
-
886
-
887
-
888
-
889
-
890
- ## [2.2.2](https://github.com/midwayjs/midway/compare/v2.2.1...v2.2.2) (2020-09-14)
891
-
892
- **Note:** Version bump only for package @midwayjs/socketio
893
-
894
-
895
-
896
-
897
-
898
- ## [2.2.1](https://github.com/midwayjs/midway/compare/v2.2.0...v2.2.1) (2020-09-14)
899
-
900
- **Note:** Version bump only for package @midwayjs/socketio
901
-
902
-
903
-
904
-
905
-
906
- # [2.2.0](https://github.com/midwayjs/midway/compare/v2.1.4...v2.2.0) (2020-09-13)
907
-
908
-
909
- ### Features
910
-
911
- * complete 2.x beta ([#630](https://github.com/midwayjs/midway/issues/630)) ([b23cd00](https://github.com/midwayjs/midway/commit/b23cd00fe9cefc9057a2284d38d5419773539206))