@midwayjs/mock 3.11.1 → 3.11.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.
- package/dist/utils.js +3 -4
- package/package.json +2 -2
package/dist/utils.js
CHANGED
|
@@ -10,8 +10,7 @@ exports.mergeGlobalConfig = exports.removeFile = exports.transformFrameworkToCon
|
|
|
10
10
|
const core_1 = require("@midwayjs/core");
|
|
11
11
|
const os = require("os");
|
|
12
12
|
const assert = require("assert");
|
|
13
|
-
const
|
|
14
|
-
const { access, unlink, constants } = fs_1.promises;
|
|
13
|
+
const fs = require("fs");
|
|
15
14
|
function isTestEnvironment() {
|
|
16
15
|
const testEnv = ['test', 'unittest'];
|
|
17
16
|
return (testEnv.includes(process.env.MIDWAY_SERVER_ENV) ||
|
|
@@ -74,8 +73,8 @@ function transformFrameworkToConfiguration(Framework) {
|
|
|
74
73
|
exports.transformFrameworkToConfiguration = transformFrameworkToConfiguration;
|
|
75
74
|
async function removeFile(file) {
|
|
76
75
|
try {
|
|
77
|
-
await access(file, constants.W_OK);
|
|
78
|
-
await unlink(file);
|
|
76
|
+
await fs.promises.access(file, fs.constants.W_OK);
|
|
77
|
+
await fs.promises.unlink(file);
|
|
79
78
|
}
|
|
80
79
|
catch (_a) {
|
|
81
80
|
// ignore
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/mock",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.3",
|
|
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": "
|
|
52
|
+
"gitHead": "1dedbeefabfadd9f4978c57cd280727d04718d4a"
|
|
53
53
|
}
|