@midwayjs/web 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.
- package/dist/base.js +2 -3
- package/dist/logger.js +1 -2
- package/dist/utils.js +3 -3
- package/package.json +7 -8
package/dist/base.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createEggAgent = exports.createEggApplication = exports.createAgentWorkerLoader = exports.createAppWorkerLoader = void 0;
|
|
4
4
|
const utils_1 = require("./utils");
|
|
5
|
-
const extend = require("extend2");
|
|
6
5
|
const core_1 = require("@midwayjs/core");
|
|
7
6
|
const path_1 = require("path");
|
|
8
7
|
const fs_1 = require("fs");
|
|
@@ -70,7 +69,7 @@ const createAppWorkerLoader = () => {
|
|
|
70
69
|
if (!this.appInfo) {
|
|
71
70
|
const appInfo = super.getAppInfo();
|
|
72
71
|
// ROOT == HOME in prod env
|
|
73
|
-
this.appInfo = extend(true, appInfo, {
|
|
72
|
+
this.appInfo = (0, core_1.extend)(true, appInfo, {
|
|
74
73
|
root: appInfo.env === 'local' || appInfo.env === 'unittest'
|
|
75
74
|
? this.appDir
|
|
76
75
|
: appInfo.root,
|
|
@@ -185,7 +184,7 @@ const createAgentWorkerLoader = () => {
|
|
|
185
184
|
if (!this.appInfo) {
|
|
186
185
|
const appInfo = super.getAppInfo();
|
|
187
186
|
// ROOT == HOME in prod env
|
|
188
|
-
this.appInfo = extend(true, appInfo, {
|
|
187
|
+
this.appInfo = (0, core_1.extend)(true, appInfo, {
|
|
189
188
|
root: appInfo.env === 'local' || appInfo.env === 'unittest'
|
|
190
189
|
? this.appDir
|
|
191
190
|
: appInfo.root,
|
package/dist/logger.js
CHANGED
|
@@ -7,7 +7,6 @@ const fs_1 = require("fs");
|
|
|
7
7
|
const utils_1 = require("./utils");
|
|
8
8
|
const os = require("os");
|
|
9
9
|
const core_1 = require("@midwayjs/core");
|
|
10
|
-
const extend = require("extend2");
|
|
11
10
|
const util_1 = require("util");
|
|
12
11
|
const debug = (0, util_1.debuglog)('midway:debug');
|
|
13
12
|
const isWindows = os.platform() === 'win32';
|
|
@@ -97,7 +96,7 @@ class MidwayLoggers extends Map {
|
|
|
97
96
|
},
|
|
98
97
|
};
|
|
99
98
|
const midwayLoggerConfig = loggerService.transformEggLogger(options);
|
|
100
|
-
extend(true, options, midwayLoggerConfig);
|
|
99
|
+
(0, core_1.extend)(true, options, midwayLoggerConfig);
|
|
101
100
|
if ((_a = options === null || options === void 0 ? void 0 : options.midwayLogger) === null || _a === void 0 ? void 0 : _a.clients) {
|
|
102
101
|
// 从 egg 过来,这里有可能没有 dir
|
|
103
102
|
if (!((_b = options.midwayLogger['default']) === null || _b === void 0 ? void 0 : _b.dir)) {
|
package/dist/utils.js
CHANGED
|
@@ -117,12 +117,12 @@ async function initializeAgentApplicationContext(agent, globalOptions) {
|
|
|
117
117
|
const aspectService = await applicationContext.getAsync(core_1.MidwayAspectService, [applicationContext]);
|
|
118
118
|
// init decorator service
|
|
119
119
|
const decoratorService = await applicationContext.getAsync(core_1.MidwayDecoratorService, [applicationContext]);
|
|
120
|
-
if (!globalOptions.
|
|
121
|
-
globalOptions.
|
|
120
|
+
if (!globalOptions.imports) {
|
|
121
|
+
globalOptions.imports = [
|
|
122
122
|
(0, core_1.safeRequire)((0, path_1.join)(globalOptions.baseDir, 'configuration')),
|
|
123
123
|
];
|
|
124
124
|
}
|
|
125
|
-
for (const configurationModule of [].concat(globalOptions.
|
|
125
|
+
for (const configurationModule of [].concat(globalOptions.imports)) {
|
|
126
126
|
// load configuration and component
|
|
127
127
|
applicationContext.load(configurationModule);
|
|
128
128
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/web",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.17",
|
|
4
4
|
"description": "Midway Web Framework for Egg.js",
|
|
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": [
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
],
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@midwayjs/decorator": "^3.0.0-beta.
|
|
30
|
+
"@midwayjs/decorator": "^3.0.0-beta.17",
|
|
31
31
|
"@midwayjs/logger": "2.14.0",
|
|
32
|
-
"@midwayjs/mock": "^3.0.0-beta.
|
|
32
|
+
"@midwayjs/mock": "^3.0.0-beta.17",
|
|
33
33
|
"dayjs": "1.10.7",
|
|
34
34
|
"egg-logger": "2.7.1",
|
|
35
35
|
"egg-mock": "4.2.0",
|
|
@@ -44,9 +44,8 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@eggjs/router": "^2.0.0",
|
|
47
|
-
"@midwayjs/core": "^3.0.0-beta.
|
|
47
|
+
"@midwayjs/core": "^3.0.0-beta.17",
|
|
48
48
|
"egg": "^2.28.0",
|
|
49
|
-
"extend2": "^1.0.0",
|
|
50
49
|
"find-up": "5.0.0",
|
|
51
50
|
"mkdirp": "^1.0.4"
|
|
52
51
|
},
|
|
@@ -58,5 +57,5 @@
|
|
|
58
57
|
"engines": {
|
|
59
58
|
"node": ">=12"
|
|
60
59
|
},
|
|
61
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "17a8b5bd3d0b0b21f24dd2f165b5df9097fc3ec4"
|
|
62
61
|
}
|