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.
Files changed (2) hide show
  1. package/core/app.js +12 -2
  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
- this.app[appName].appConfig.router(router)(this.app[appName])
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 pluginDirResult = await fsPromise.readdir(pluginDir)
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "10.0.2",
3
+ "version": "10.0.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {