@midwayjs/express 3.9.9 → 3.10.0
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/configuration.js +1 -2
- package/dist/interface.d.ts +7 -7
- package/package.json +6 -6
package/dist/configuration.js
CHANGED
|
@@ -19,8 +19,7 @@ const framework_1 = require("./framework");
|
|
|
19
19
|
let ExpressConfiguration = class ExpressConfiguration {
|
|
20
20
|
init() {
|
|
21
21
|
this.decoratorService.registerParameterHandler(core_1.WEB_ROUTER_PARAM_KEY, options => {
|
|
22
|
-
|
|
23
|
-
return (0, core_1.extractExpressLikeValue)(options.metadata.type, options.metadata.propertyData, options.originParamType, (_a = options.metadata) === null || _a === void 0 ? void 0 : _a.pipes)(options.originArgs[0], options.originArgs[1], options.originArgs[2]);
|
|
22
|
+
return (0, core_1.extractExpressLikeValue)(options.metadata.type, options.metadata.propertyData, options.originParamType)(options.originArgs[0], options.originArgs[1], options.originArgs[2]);
|
|
24
23
|
});
|
|
25
24
|
}
|
|
26
25
|
async onReady() {
|
package/dist/interface.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { CommonMiddlewareUnion, ContextMiddlewareManager, FunctionMiddleware, IConfigurationOptions, IMiddleware, IMidwayApplication, IMidwayContext } from '@midwayjs/core';
|
|
3
3
|
import { Application as ExpressApplication, NextFunction as ExpressNextFunction, Request as ExpressRequest, Response as ExpressResponse } from 'express';
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
type Request = IMidwayContext<ExpressRequest>;
|
|
5
|
+
export type Response = ExpressResponse;
|
|
6
|
+
export type NextFunction = ExpressNextFunction;
|
|
7
7
|
export interface Context extends Request {
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* @deprecated use Context
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type IMidwayExpressRequest = Context;
|
|
13
13
|
/**
|
|
14
14
|
* @deprecated use Context
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
17
|
-
export
|
|
16
|
+
export type IMidwayExpressContext = Context;
|
|
17
|
+
export type IMidwayExpressMiddleware = IMiddleware<Context, ExpressResponse, ExpressNextFunction>;
|
|
18
18
|
export interface IMidwayExpressApplication extends IMidwayApplication<Context, ExpressApplication> {
|
|
19
19
|
/**
|
|
20
20
|
* mount router and middleware
|
|
@@ -66,6 +66,6 @@ export interface IMidwayExpressConfigurationOptions extends IConfigurationOption
|
|
|
66
66
|
*/
|
|
67
67
|
globalPrefix?: string;
|
|
68
68
|
}
|
|
69
|
-
export
|
|
69
|
+
export type Application = IMidwayExpressApplication;
|
|
70
70
|
export {};
|
|
71
71
|
//# sourceMappingURL=interface.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/express",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"description": "Midway Web Framework for Express",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@midwayjs/logger": "^2.15.0",
|
|
28
|
-
"@midwayjs/mock": "^3.
|
|
28
|
+
"@midwayjs/mock": "^3.10.0",
|
|
29
29
|
"@types/body-parser": "1.19.2",
|
|
30
|
-
"@types/express": "4.17.
|
|
30
|
+
"@types/express": "4.17.16",
|
|
31
31
|
"fs-extra": "10.1.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@midwayjs/core": "^3.
|
|
35
|
-
"@midwayjs/express-session": "^3.
|
|
34
|
+
"@midwayjs/core": "^3.10.0",
|
|
35
|
+
"@midwayjs/express-session": "^3.10.0",
|
|
36
36
|
"body-parser": "1.20.1",
|
|
37
37
|
"cookie-parser": "^1.4.6",
|
|
38
38
|
"express": "4.18.2"
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=12"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "33d28f1a020963404488e866432916fd15c0952c"
|
|
49
49
|
}
|