@midwayjs/mock 3.10.10 → 3.10.11

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/dist/creator.js +7 -1
  2. package/package.json +2 -2
package/dist/creator.js CHANGED
@@ -129,7 +129,13 @@ async function create(appDir = process.cwd(), options, customFramework) {
129
129
  }
130
130
  else {
131
131
  const frameworkService = await container.getAsync(core_1.MidwayFrameworkService);
132
- return frameworkService.getMainFramework();
132
+ const mainFramework = frameworkService.getMainFramework();
133
+ if (mainFramework) {
134
+ return mainFramework;
135
+ }
136
+ else {
137
+ throw new Error('Can not get main framework, please check your configuration.ts.');
138
+ }
133
139
  }
134
140
  }
135
141
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/mock",
3
- "version": "3.10.10",
3
+ "version": "3.10.11",
4
4
  "description": "create your test app from midway framework",
5
5
  "main": "dist/index",
6
6
  "typings": "dist/index.d.ts",
@@ -49,5 +49,5 @@
49
49
  "type": "git",
50
50
  "url": "https://github.com/midwayjs/midway.git"
51
51
  },
52
- "gitHead": "93d333e82e75b6eb44ab83f74a378172508730d6"
52
+ "gitHead": "df0db0aaa0e3ff168204e3d5cf1c534dccc9b15e"
53
53
  }