@midwayjs/core 3.0.0 → 3.0.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.
|
@@ -69,14 +69,20 @@ let MidwayDecoratorService = class MidwayDecoratorService {
|
|
|
69
69
|
throw new error_1.MidwayCommonError(`Parameter Decorator "${key}" handler not found, please register first.`);
|
|
70
70
|
}
|
|
71
71
|
const paramTypes = (0, decorator_1.getMethodParamTypes)(Clzz, propertyName);
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
try {
|
|
73
|
+
newArgs[parameterIndex] = await parameterDecoratorHandler({
|
|
74
|
+
metadata,
|
|
75
|
+
propertyName,
|
|
76
|
+
parameterIndex,
|
|
77
|
+
target: Clzz,
|
|
78
|
+
originArgs: joinPoint.args,
|
|
79
|
+
originParamType: paramTypes[parameterIndex],
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
catch (err) {
|
|
83
|
+
// ignore
|
|
84
|
+
debug(`[core]: Parameter decorator throw error and use origin args, ${err.stack}`);
|
|
85
|
+
}
|
|
80
86
|
}
|
|
81
87
|
joinPoint.args = newArgs;
|
|
82
88
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "midway core",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@midwayjs/glob": "^1.0.2",
|
|
35
|
-
"@midwayjs/logger": "2.14.0",
|
|
35
|
+
"@midwayjs/logger": "^2.14.0",
|
|
36
36
|
"class-transformer": "^0.5.1",
|
|
37
37
|
"picomatch": "2.3.1"
|
|
38
38
|
},
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"engines": {
|
|
45
45
|
"node": ">=12"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "f345b4ed0392e5c3b9e815438ef0a377ad6da076"
|
|
48
48
|
}
|