q-koa 10.0.2 → 10.0.3
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/core/app.js +12 -2
- package/package.json +1 -1
package/core/app.js
CHANGED
|
@@ -442,7 +442,9 @@ class APP {
|
|
|
442
442
|
this.app[appName].appConfig &&
|
|
443
443
|
this.app[appName].appConfig.router
|
|
444
444
|
) {
|
|
445
|
-
|
|
445
|
+
try {
|
|
446
|
+
this.app[appName].appConfig.router(router)(this.app[appName])
|
|
447
|
+
} catch (e) {}
|
|
446
448
|
}
|
|
447
449
|
|
|
448
450
|
if (this.config.defaultRouter) {
|
|
@@ -520,7 +522,15 @@ class APP {
|
|
|
520
522
|
)
|
|
521
523
|
const publicExist = fs.existsSync(pluginDir)
|
|
522
524
|
if (!publicExist) await fsPromise.mkdir(pluginDir)
|
|
523
|
-
const
|
|
525
|
+
const excludesModel = _.get(
|
|
526
|
+
this.app[appName],
|
|
527
|
+
'appConfig.excludesModel',
|
|
528
|
+
[]
|
|
529
|
+
)
|
|
530
|
+
const pluginDirList = await fsPromise.readdir(pluginDir)
|
|
531
|
+
const pluginDirResult = pluginDirList.filter(
|
|
532
|
+
(item) => !excludesModel.includes(item)
|
|
533
|
+
)
|
|
524
534
|
for (let i = 0; i < pluginDirResult.length; i++) {
|
|
525
535
|
const folder = pluginDirResult[i]
|
|
526
536
|
const isFolder = fs
|