@midwayjs/mock 3.4.0-beta.8 → 3.4.0-beta.9
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/dist/creator.js +2 -1
- package/package.json +5 -4
package/dist/creator.js
CHANGED
|
@@ -11,6 +11,7 @@ const util_1 = require("util");
|
|
|
11
11
|
const fs_1 = require("fs");
|
|
12
12
|
const yaml = require("js-yaml");
|
|
13
13
|
const getRawBody = require("raw-body");
|
|
14
|
+
const async_hooks_context_manager_1 = require("@midwayjs/async-hooks-context-manager");
|
|
14
15
|
const debug = (0, util_1.debuglog)('midway:debug');
|
|
15
16
|
process.setMaxListeners(0);
|
|
16
17
|
function formatPath(baseDir, p) {
|
|
@@ -100,6 +101,7 @@ async function create(appDir = process.cwd(), options, customFramework) {
|
|
|
100
101
|
await (0, core_1.initializeGlobalApplicationContext)({
|
|
101
102
|
...options,
|
|
102
103
|
appDir,
|
|
104
|
+
asyncContextManager: (0, async_hooks_context_manager_1.createContextManager)(),
|
|
103
105
|
imports: []
|
|
104
106
|
.concat(options.imports)
|
|
105
107
|
.concat(options.baseDir
|
|
@@ -166,7 +168,6 @@ async function createFunctionApp(baseDir = process.cwd(), options, customFramewo
|
|
|
166
168
|
}
|
|
167
169
|
}
|
|
168
170
|
if (options.starter) {
|
|
169
|
-
options.exportAllHandler = true;
|
|
170
171
|
options.appDir = baseDir;
|
|
171
172
|
debug(`[mock]: Create app, appDir="${options.appDir}"`);
|
|
172
173
|
process.env.MIDWAY_TS_MODE = 'true';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/mock",
|
|
3
|
-
"version": "3.4.0-beta.
|
|
3
|
+
"version": "3.4.0-beta.9",
|
|
4
4
|
"description": "create your test app from midway framework",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@midwayjs/core": "^3.4.0-beta.
|
|
31
|
-
"@midwayjs/decorator": "^3.4.0-beta.
|
|
30
|
+
"@midwayjs/core": "^3.4.0-beta.9",
|
|
31
|
+
"@midwayjs/decorator": "^3.4.0-beta.9",
|
|
32
32
|
"@midwayjs/logger": "^2.15.0",
|
|
33
33
|
"@types/amqplib": "0.8.2",
|
|
34
34
|
"amqplib": "0.10.0",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"ws": "8.8.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
+
"@midwayjs/async-hooks-context-manager": "^3.4.0-beta.9",
|
|
41
42
|
"@types/supertest": "2.0.12",
|
|
42
43
|
"fs-extra": "10.0.1",
|
|
43
44
|
"js-yaml": "4.1.0",
|
|
@@ -49,5 +50,5 @@
|
|
|
49
50
|
"type": "git",
|
|
50
51
|
"url": "http://github.com/midwayjs/midway.git"
|
|
51
52
|
},
|
|
52
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "41e82a0fba386c6ec42c2eefd1dff4795a81b389"
|
|
53
54
|
}
|