@midwayjs/mock 3.0.0-beta.16 → 3.0.0-beta.17

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 -10
  2. package/package.json +7 -7
package/dist/creator.js CHANGED
@@ -32,12 +32,11 @@ async function create(appDir = process.cwd(), options, customFramework) {
32
32
  options.baseDir = `${appDir}/src`;
33
33
  (0, core_1.safeRequire)((0, path_1.join)(`${options.baseDir}`, 'interface'));
34
34
  }
35
- if (!options.configurationModule && customFramework) {
36
- options.configurationModule =
37
- (0, utils_1.transformFrameworkToConfiguration)(customFramework);
35
+ if (!options.imports && customFramework) {
36
+ options.imports = (0, utils_1.transformFrameworkToConfiguration)(customFramework);
38
37
  }
39
38
  if (customFramework === null || customFramework === void 0 ? void 0 : customFramework['Configuration']) {
40
- options.configurationModule = customFramework;
39
+ options.imports = customFramework;
41
40
  customFramework = customFramework['Framework'];
42
41
  }
43
42
  const container = new core_1.MidwayContainer();
@@ -67,8 +66,8 @@ async function create(appDir = process.cwd(), options, customFramework) {
67
66
  await (0, core_1.initializeGlobalApplicationContext)({
68
67
  ...options,
69
68
  appDir,
70
- configurationModule: []
71
- .concat(options.configurationModule)
69
+ imports: []
70
+ .concat(options.imports)
72
71
  .concat(options.baseDir
73
72
  ? (0, core_1.safeRequire)((0, path_1.join)(options.baseDir, 'configuration'))
74
73
  : []),
@@ -120,7 +119,7 @@ async function createFunctionApp(baseDir = process.cwd(), options, customFramewo
120
119
  ]);
121
120
  const framework = await createApp(baseDir, {
122
121
  ...options,
123
- configurationModule: (0, utils_1.transformFrameworkToConfiguration)(customFramework),
122
+ imports: (0, utils_1.transformFrameworkToConfiguration)(customFramework),
124
123
  }, customFrameworkName);
125
124
  framework.configurationOptions = options;
126
125
  return framework;
@@ -160,9 +159,7 @@ async function createLightApp(baseDir = '', options = {}) {
160
159
  }, (_a = options.globalConfig) !== null && _a !== void 0 ? _a : {});
161
160
  return createApp(baseDir, {
162
161
  ...options,
163
- configurationModule: [
164
- (0, utils_1.transformFrameworkToConfiguration)(LightFramework),
165
- ].concat(options === null || options === void 0 ? void 0 : options.configurationModule),
162
+ imports: [(0, utils_1.transformFrameworkToConfiguration)(LightFramework)].concat(options === null || options === void 0 ? void 0 : options.imports),
166
163
  });
167
164
  }
168
165
  exports.createLightApp = createLightApp;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@midwayjs/mock",
3
- "version": "3.0.0-beta.16",
3
+ "version": "3.0.0-beta.17",
4
4
  "description": "create your test app from midway framework",
5
5
  "main": "dist/index",
6
6
  "typings": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "tsc",
9
- "test": "node --require=ts-node/register ../../node_modules/.bin/jest",
10
- "cov": "node --require=ts-node/register ../../node_modules/.bin/jest --coverage --forceExit",
9
+ "test": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand",
10
+ "cov": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand --coverage --forceExit",
11
11
  "link": "npm link"
12
12
  },
13
13
  "keywords": [
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "license": "MIT",
28
28
  "devDependencies": {
29
- "@midwayjs/core": "^3.0.0-beta.16",
30
- "@midwayjs/decorator": "^3.0.0-beta.16",
29
+ "@midwayjs/core": "^3.0.0-beta.17",
30
+ "@midwayjs/decorator": "^3.0.0-beta.17",
31
31
  "@midwayjs/logger": "2.14.0",
32
32
  "@types/amqplib": "*",
33
33
  "amqplib": "*",
@@ -37,12 +37,12 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "fs-extra": "10.0.0",
40
- "supertest": "6.2.0"
40
+ "supertest": "6.2.1"
41
41
  },
42
42
  "author": "Harry Chen <czy88840616@gmail.com>",
43
43
  "repository": {
44
44
  "type": "git",
45
45
  "url": "http://github.com/midwayjs/midway.git"
46
46
  },
47
- "gitHead": "43a32745ac45164dfef1494cba979f9652a6692b"
47
+ "gitHead": "17a8b5bd3d0b0b21f24dd2f165b5df9097fc3ec4"
48
48
  }