@midwayjs/koa 3.5.0 → 3.5.1
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/dist/framework.js +8 -0
- package/package.json +5 -5
package/dist/framework.js
CHANGED
|
@@ -56,6 +56,14 @@ let MidwayKoaFramework = class MidwayKoaFramework extends core_1.BaseFramework {
|
|
|
56
56
|
},
|
|
57
57
|
enumerable: true,
|
|
58
58
|
});
|
|
59
|
+
Object.defineProperty(this.app.context, 'locals', {
|
|
60
|
+
get() {
|
|
61
|
+
return this.state;
|
|
62
|
+
},
|
|
63
|
+
set(value) {
|
|
64
|
+
this.state = value;
|
|
65
|
+
},
|
|
66
|
+
});
|
|
59
67
|
const onerrorConfig = this.configService.getConfiguration('onerror');
|
|
60
68
|
(0, onerror_1.setupOnError)(this.app, onerrorConfig, this.logger);
|
|
61
69
|
// not found middleware
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/koa",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "Midway Web Framework for KOA",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@midwayjs/decorator": "^3.4.11",
|
|
28
28
|
"@midwayjs/logger": "^2.15.0",
|
|
29
|
-
"@midwayjs/mock": "^3.5.
|
|
29
|
+
"@midwayjs/mock": "^3.5.1",
|
|
30
30
|
"@types/koa": "2.13.5",
|
|
31
31
|
"@types/koa-router": "7.4.4",
|
|
32
32
|
"fs-extra": "10.0.1"
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@koa/router": "^11.0.0",
|
|
36
36
|
"@midwayjs/cookies": "^1.0.2",
|
|
37
|
-
"@midwayjs/core": "^3.5.
|
|
38
|
-
"@midwayjs/session": "^3.5.
|
|
37
|
+
"@midwayjs/core": "^3.5.1",
|
|
38
|
+
"@midwayjs/session": "^3.5.1",
|
|
39
39
|
"koa": "2.13.4",
|
|
40
40
|
"koa-bodyparser": "4.3.0"
|
|
41
41
|
},
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=12"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "3b63fc768617037644602dd5ad66d3734ce01b16"
|
|
51
51
|
}
|