@midwayjs/koa 2.13.2 → 2.14.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/CHANGELOG.md +38 -0
- package/README.md +2 -2
- package/dist/framework.d.ts +1 -2
- package/dist/framework.js +1 -3
- package/dist/interface.d.ts +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.14.2](https://github.com/midwayjs/midway/compare/v2.14.1...v2.14.2) (2021-12-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* generate middleware typings ([#1442](https://github.com/midwayjs/midway/issues/1442)) ([1b2f99b](https://github.com/midwayjs/midway/commit/1b2f99b0fcfa6d87fa216ac9277d9f1240ef26a2))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [2.14.0](https://github.com/midwayjs/midway/compare/v2.13.5...v2.14.0) (2021-12-06)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* express routing middleware takes effect at the controller level ([#1364](https://github.com/midwayjs/midway/issues/1364)) ([5d5f299](https://github.com/midwayjs/midway/commit/5d5f2992be116ca71b21f01fd782e3a2ac072496))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [2.13.4](https://github.com/midwayjs/midway/compare/v2.13.3...v2.13.4) (2021-10-21)
|
|
29
|
+
|
|
30
|
+
**Note:** Version bump only for package @midwayjs/koa
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## [2.13.3](https://github.com/midwayjs/midway/compare/v2.13.2...v2.13.3) (2021-09-28)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package @midwayjs/koa
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
## [2.13.2](https://github.com/midwayjs/midway/compare/v2.13.1...v2.13.2) (2021-09-09)
|
|
7
45
|
|
|
8
46
|
**Note:** Version bump only for package @midwayjs/koa
|
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# midway
|
|
1
|
+
# midway for koa
|
|
2
2
|
|
|
3
3
|
[](http://packagequality.com/#?package=midway-web)
|
|
4
4
|
[](https://github.com/midwayjs/midway/pulls)
|
|
5
5
|
|
|
6
6
|
this is a sub package for midway.
|
|
7
7
|
|
|
8
|
-
Document: [https://midwayjs.org
|
|
8
|
+
Document: [https://midwayjs.org](https://midwayjs.org)
|
|
9
9
|
|
|
10
10
|
## License
|
|
11
11
|
|
package/dist/framework.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare abstract class MidwayKoaBaseFramework<APP extends IMidwayKoaAppli
|
|
|
21
21
|
* @param routerResponseData
|
|
22
22
|
*/
|
|
23
23
|
generateController(controllerMapping: string, routeArgsInfo?: RouterParamValue[], routerResponseData?: any[]): Middleware<DefaultState, IMidwayKoaContext>;
|
|
24
|
-
generateMiddleware(middlewareId:
|
|
24
|
+
generateMiddleware(middlewareId: any): Promise<Middleware<DefaultState, IMidwayKoaContext, any>>;
|
|
25
25
|
loadMidwayController(): Promise<void>;
|
|
26
26
|
protected createRouter(routerOptions: any): Router;
|
|
27
27
|
private handlerWebMiddleware;
|
|
@@ -30,7 +30,6 @@ export declare abstract class MidwayKoaBaseFramework<APP extends IMidwayKoaAppli
|
|
|
30
30
|
export declare class MidwayKoaFramework extends MidwayKoaBaseFramework<IMidwayKoaApplication, IMidwayKoaContext, IMidwayKoaConfigurationOptions> {
|
|
31
31
|
private server;
|
|
32
32
|
applicationInitialize(options: Partial<IMidwayBootstrapOptions>): Promise<void>;
|
|
33
|
-
protected afterContainerReady(options: Partial<IMidwayBootstrapOptions>): Promise<void>;
|
|
34
33
|
run(): Promise<void>;
|
|
35
34
|
beforeStop(): Promise<void>;
|
|
36
35
|
getFrameworkType(): MidwayFrameworkType;
|
package/dist/framework.js
CHANGED
|
@@ -181,10 +181,8 @@ class MidwayKoaFramework extends MidwayKoaBaseFramework {
|
|
|
181
181
|
// register httpServer to applicationContext
|
|
182
182
|
this.applicationContext.registerObject(core_1.HTTP_SERVER_KEY, this.server);
|
|
183
183
|
}
|
|
184
|
-
async afterContainerReady(options) {
|
|
185
|
-
await this.loadMidwayController();
|
|
186
|
-
}
|
|
187
184
|
async run() {
|
|
185
|
+
await this.loadMidwayController();
|
|
188
186
|
if (this.configurationOptions.port) {
|
|
189
187
|
new Promise(resolve => {
|
|
190
188
|
const args = [this.configurationOptions.port];
|
package/dist/interface.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { RouterParamValue } from '@midwayjs/decorator';
|
|
|
6
6
|
export declare type IMidwayKoaContext = IMidwayContext<KoaContext>;
|
|
7
7
|
export declare type IMidwayKoaApplication = IMidwayApplication<IMidwayKoaContext, koa<DefaultState, IMidwayKoaContext> & {
|
|
8
8
|
generateController(controllerMapping: string, routeArgsInfo?: RouterParamValue[], routerResponseData?: any[]): Middleware<DefaultState, IMidwayKoaContext>;
|
|
9
|
-
generateMiddleware(middlewareId:
|
|
9
|
+
generateMiddleware(middlewareId: any): Promise<Middleware<DefaultState, IMidwayKoaContext>>;
|
|
10
10
|
}>;
|
|
11
11
|
export declare type IMidwayKoaNext = Next;
|
|
12
12
|
export interface IMidwayKoaApplicationPlus<CTX extends IMidwayContext> extends IMidwayApplication<CTX> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/koa",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.2",
|
|
4
4
|
"description": "Midway Web Framework for KOA",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
],
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@midwayjs/decorator": "^2.
|
|
27
|
-
"@midwayjs/mock": "^2.
|
|
26
|
+
"@midwayjs/decorator": "^2.14.0",
|
|
27
|
+
"@midwayjs/mock": "^2.14.0",
|
|
28
28
|
"@types/koa": "^2.11.4",
|
|
29
29
|
"@types/koa-router": "^7.4.1",
|
|
30
30
|
"fs-extra": "^8.0.1",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@koa/router": "^10.0.0",
|
|
36
|
-
"@midwayjs/core": "^2.
|
|
36
|
+
"@midwayjs/core": "^2.14.0",
|
|
37
37
|
"@midwayjs/logger": "^2.13.0",
|
|
38
38
|
"koa": "^2.13.0"
|
|
39
39
|
},
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=10.10.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "68b7fd9182619e8428f353f24a52254abce6e5bf"
|
|
49
49
|
}
|