@midwayjs/core 3.4.0 → 3.4.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.
|
@@ -45,7 +45,7 @@ class DirectoryFileDetector extends AbstractFileDetector {
|
|
|
45
45
|
});
|
|
46
46
|
// 检查重复模块
|
|
47
47
|
const checkDuplicatedHandler = (module, options) => {
|
|
48
|
-
if (decorator_1.Types.isClass(module)) {
|
|
48
|
+
if (this.extraDetectorOptions.conflictCheck && decorator_1.Types.isClass(module)) {
|
|
49
49
|
const name = (0, decorator_1.getProviderName)(module);
|
|
50
50
|
if (name) {
|
|
51
51
|
if (this.duplicateModuleCheckSet.has(name)) {
|
|
@@ -53,9 +53,10 @@ class ContainerConfiguration {
|
|
|
53
53
|
namespace = configurationOptions.namespace;
|
|
54
54
|
this.namespaceList.push(namespace);
|
|
55
55
|
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
this.detectorOptionsList.push({
|
|
57
|
+
conflictCheck: configurationOptions.conflictCheck,
|
|
58
|
+
...configurationOptions.detectorOptions,
|
|
59
|
+
});
|
|
59
60
|
debug(`[core]: load configuration in namespace="${namespace}"`);
|
|
60
61
|
this.addImports(configurationOptions.imports);
|
|
61
62
|
this.addImportObjects(configurationOptions.importObjects);
|
|
@@ -95,7 +95,7 @@ let MidwayWebRouterService = class MidwayWebRouterService {
|
|
|
95
95
|
}
|
|
96
96
|
else {
|
|
97
97
|
// 不同的 controller,可能会有相同的 prefix,一旦 options 不同,就要报错
|
|
98
|
-
if (middleware) {
|
|
98
|
+
if (middleware && middleware.length > 0) {
|
|
99
99
|
const originRoute = this.routesPriority.filter(el => {
|
|
100
100
|
return el.prefix === prefix;
|
|
101
101
|
})[0];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/core",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "midway core",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@midwayjs/decorator": "^3.4.
|
|
24
|
+
"@midwayjs/decorator": "^3.4.1",
|
|
25
25
|
"koa": "2.13.4",
|
|
26
26
|
"midway-test-component": "*",
|
|
27
27
|
"mm": "3.2.0",
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"engines": {
|
|
46
46
|
"node": ">=12"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "c7b47267c80f93407537677d8366f68bc6dfc462"
|
|
49
49
|
}
|