q-koa 9.8.2 → 10.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.
package/core/app.js CHANGED
@@ -978,6 +978,7 @@ class APP {
978
978
  }
979
979
  const _str = formatPostFunction(include)
980
980
  const postInclude = nodeVm.runInNewContext(_str)
981
+ const strInclude = postInclude(app[appName])
981
982
  // const postInclude = include.toFunction();
982
983
  myInclude =
983
984
  app[appName] &&
@@ -985,8 +986,14 @@ class APP {
985
986
  app[appName].include[controller]
986
987
  ? _.uniqWith(
987
988
  [
988
- ...postInclude(app[appName]),
989
- ...app[appName].include[controller],
989
+ ...strInclude,
990
+ ...app[appName].include[controller].filter((item) => {
991
+ return !strInclude.some(
992
+ (i) =>
993
+ (i.model && i.model.getName()) ===
994
+ (item.model && item.model.getName())
995
+ )
996
+ }),
990
997
  ],
991
998
  _.isEqual
992
999
  )
@@ -167,5 +167,5 @@ exports.getAppConfig = async ({ app, config, key }) => {
167
167
 
168
168
  const target = application.find(findConfig(config || key))
169
169
 
170
- return target
170
+ return target || null
171
171
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q-koa",
3
- "version": "9.8.2",
3
+ "version": "10.0.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {