@midwayjs/express 3.0.0-beta.12 → 3.0.0-beta.13

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
+ # [3.0.0-beta.13](https://github.com/midwayjs/midway/compare/v3.0.0-beta.12...v3.0.0-beta.13) (2021-12-30)
7
+
8
+
9
+ ### Features
10
+
11
+ * 404 error ([#1465](https://github.com/midwayjs/midway/issues/1465)) ([e7e8a9d](https://github.com/midwayjs/midway/commit/e7e8a9dedfa7198ac05b161b41024c2871f93965))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.0.0-beta.12](https://github.com/midwayjs/midway/compare/v3.0.0-beta.11...v3.0.0-beta.12) (2021-12-28)
7
18
 
8
19
 
package/dist/framework.js CHANGED
@@ -49,6 +49,11 @@ let MidwayExpressFramework = class MidwayExpressFramework extends core_1.BaseFra
49
49
  debug('[express]: use user router middleware');
50
50
  // load controller
51
51
  await this.loadMidwayController();
52
+ debug('[express]: use 404 not found middleware');
53
+ // eslint-disable-next-line
54
+ this.app.use(function notFound(req, res, next) {
55
+ next(new core_1.httpError.NotFoundError());
56
+ });
52
57
  debug('[express]: use global error handler middleware');
53
58
  // use global error handler
54
59
  this.app.use((err, req, res, next) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/express",
3
- "version": "3.0.0-beta.12",
3
+ "version": "3.0.0-beta.13",
4
4
  "description": "Midway Web Framework for Express",
5
5
  "main": "dist/index",
6
6
  "typings": "dist/index.d.ts",
@@ -23,16 +23,16 @@
23
23
  ],
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@midwayjs/decorator": "^3.0.0-beta.12",
27
- "@midwayjs/logger": "^3.0.0-beta.12",
28
- "@midwayjs/mock": "^3.0.0-beta.12",
26
+ "@midwayjs/decorator": "^3.0.0-beta.13",
27
+ "@midwayjs/logger": "^3.0.0-beta.13",
28
+ "@midwayjs/mock": "^3.0.0-beta.13",
29
29
  "@types/body-parser": "^1.19.2",
30
30
  "@types/express": "^4.17.8",
31
31
  "fs-extra": "^8.0.1"
32
32
  },
33
33
  "dependencies": {
34
- "@midwayjs/core": "^3.0.0-beta.12",
35
- "@midwayjs/express-session": "^3.0.0-beta.12",
34
+ "@midwayjs/core": "^3.0.0-beta.13",
35
+ "@midwayjs/express-session": "^3.0.0-beta.13",
36
36
  "body-parser": "^1.19.0",
37
37
  "cookie-parser": "^1.4.6",
38
38
  "express": "^4.17.1"
@@ -45,5 +45,5 @@
45
45
  "engines": {
46
46
  "node": ">=12"
47
47
  },
48
- "gitHead": "1c46e53eb934248007eeb7fe3920f5ac24e272c6"
48
+ "gitHead": "d3c47770fee9dce33a8d148882173fd7782864ad"
49
49
  }