@midwayjs/web 2.14.0 → 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 CHANGED
@@ -3,6 +3,17 @@
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
+
6
17
  # [2.14.0](https://github.com/midwayjs/midway/compare/v2.13.5...v2.14.0) (2021-12-06)
7
18
 
8
19
 
package/dist/base.js CHANGED
@@ -117,6 +117,9 @@ const createAppWorkerLoader = () => {
117
117
  })
118
118
  .load(this.framework);
119
119
  if (this.app.options['midwaySingleton'] !== true) {
120
+ if (!global['MIDWAY_MAIN_FRAMEWORK']) {
121
+ global['MIDWAY_MAIN_FRAMEWORK'] = this.framework;
122
+ }
120
123
  // 这个代码只会在 egg-cluster 模式下执行
121
124
  this.app.beforeStart(async () => {
122
125
  await this.bootstrap.init();
@@ -8,7 +8,7 @@ export interface IMidwayWebBaseApplication {
8
8
  getLogger(name?: string): EggLogger & ILogger;
9
9
  getCoreLogger(): EggLogger & ILogger;
10
10
  generateController?(controllerMapping: string): any;
11
- generateMiddleware?(middlewareId: string): Promise<Middleware<DefaultState, IMidwayKoaContext>>;
11
+ generateMiddleware?(middlewareId: any): Promise<Middleware<DefaultState, IMidwayKoaContext>>;
12
12
  createLogger(name: string, options: LoggerOptions): EggLogger & ILogger;
13
13
  }
14
14
  declare module 'egg' {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/web",
3
- "version": "2.14.0",
3
+ "version": "2.14.2",
4
4
  "description": "Midway Web Framework for Egg.js",
5
5
  "main": "dist/index",
6
6
  "typings": "dist/index.d.ts",
@@ -43,7 +43,7 @@
43
43
  "@eggjs/router": "^2.0.0",
44
44
  "@midwayjs/bootstrap": "^2.14.0",
45
45
  "@midwayjs/core": "^2.14.0",
46
- "@midwayjs/koa": "^2.14.0",
46
+ "@midwayjs/koa": "^2.14.2",
47
47
  "@midwayjs/logger": "^2.13.0",
48
48
  "debug": "^4.1.1",
49
49
  "egg": "^2.28.0",
@@ -62,5 +62,5 @@
62
62
  "engines": {
63
63
  "node": ">=10.10.0"
64
64
  },
65
- "gitHead": "5fd716b0e731162d8e9f0931790fde7402fb83de"
65
+ "gitHead": "68b7fd9182619e8428f353f24a52254abce6e5bf"
66
66
  }