@midwayjs/web 3.0.14-beta.1 → 3.1.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2013 - Now midwayjs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -19,7 +19,7 @@ module.exports = {
19
19
  if (this[ctxLogger]) {
20
20
  return this[ctxLogger];
21
21
  }
22
- return this.app.createContextLogger(this, 'logger');
22
+ return this.app.createContextLogger(this);
23
23
  },
24
24
 
25
25
  set logger(customLogger) {
package/app.js CHANGED
@@ -65,6 +65,13 @@ class AppBootHook {
65
65
  const eggRouterMiddleware = this.app.router.middleware();
66
66
  eggRouterMiddleware._name = 'eggRouterMiddleware';
67
67
  this.app.useMiddleware(eggRouterMiddleware);
68
+
69
+ if (process.env['EGG_CLUSTER_MODE'] === 'true') {
70
+ // 多进程时的路由加载必须放在这里,中间件加载之后
71
+ const framework = this.app.applicationContext.get('midwayWebFramework');
72
+ await framework.loadMidwayController();
73
+ }
74
+
68
75
  this.app.emit('application-ready');
69
76
  }
70
77
 
package/dist/base.js CHANGED
@@ -8,6 +8,8 @@ const fs_1 = require("fs");
8
8
  const logger_1 = require("./logger");
9
9
  const router_1 = require("@eggjs/router");
10
10
  const util_1 = require("util");
11
+ const lifecycle_1 = require("./framework/lifecycle");
12
+ const web_1 = require("./framework/web");
11
13
  const ROUTER = Symbol('EggCore#router');
12
14
  const EGG_LOADER = Symbol.for('egg#loader');
13
15
  const EGG_PATH = Symbol.for('egg#eggPath');
@@ -111,6 +113,7 @@ const createAppWorkerLoader = () => {
111
113
  this.app.beforeStart(async () => {
112
114
  debug('[egg]: start "initialize framework service with lazy in app.load"');
113
115
  const applicationContext = (0, core_1.getCurrentApplicationContext)();
116
+ applicationContext.bind(lifecycle_1.MidwayWebLifeCycleService);
114
117
  /**
115
118
  * 这里 logger service 已经被 get loggers() 初始化过了,就不需要在这里初始化了
116
119
  */
@@ -121,10 +124,16 @@ const createAppWorkerLoader = () => {
121
124
  application: this.app,
122
125
  },
123
126
  ]);
124
- // lifecycle support
125
- await applicationContext.getAsync(core_1.MidwayLifeCycleService, [
126
- applicationContext,
127
- ]);
127
+ this.app.once('server', async (server) => {
128
+ this.framework.setServer(server);
129
+ // register httpServer to applicationContext
130
+ applicationContext.registerObject(core_1.HTTP_SERVER_KEY, server);
131
+ await this.lifecycleService.afterInit();
132
+ });
133
+ // 这里生命周期走到 onReady
134
+ this.lifecycleService = await applicationContext.getAsync(lifecycle_1.MidwayWebLifeCycleService, [applicationContext]);
135
+ // 执行加载框架初始化
136
+ this.framework = await applicationContext.getAsync(web_1.MidwayWebFramework);
128
137
  });
129
138
  }
130
139
  }
@@ -1,15 +1,13 @@
1
1
  import { IMidwayWebApplication } from './interface';
2
2
  import { MidwayDecoratorService } from '@midwayjs/core';
3
- import { MidwayWebFramework } from './framework/web';
4
3
  export declare class EggConfiguration {
5
4
  baseDir: any;
6
5
  appDir: any;
7
6
  app: IMidwayWebApplication;
8
7
  decoratorService: MidwayDecoratorService;
9
- framework: MidwayWebFramework;
10
8
  init(): void;
11
9
  onReady(): Promise<void>;
12
- onServerReady(container: any): Promise<void>;
10
+ onServerReady(): Promise<void>;
13
11
  onStop(): Promise<void>;
14
12
  }
15
13
  //# sourceMappingURL=configuration.d.ts.map
@@ -13,7 +13,6 @@ exports.EggConfiguration = void 0;
13
13
  const decorator_1 = require("@midwayjs/decorator");
14
14
  const core_1 = require("@midwayjs/core");
15
15
  const path_1 = require("path");
16
- const web_1 = require("./framework/web");
17
16
  let EggConfiguration = class EggConfiguration {
18
17
  init() {
19
18
  this.decoratorService.registerParameterHandler(decorator_1.WEB_ROUTER_PARAM_KEY, options => {
@@ -28,15 +27,10 @@ let EggConfiguration = class EggConfiguration {
28
27
  ? this.app.middleware.slice()
29
28
  : [];
30
29
  }
31
- async onServerReady(container) {
30
+ async onServerReady() {
32
31
  // trigger server didReady
33
- this.app.messenger.emit('egg-ready');
34
- if (process.env['EGG_CLUSTER_MODE'] === 'true') {
35
- this.app.once('server', server => {
36
- this.framework.setServer(server);
37
- // register httpServer to applicationContext
38
- container.registerObject(core_1.HTTP_SERVER_KEY, server);
39
- });
32
+ if (this.app.messenger) {
33
+ this.app.messenger.emit('egg-ready');
40
34
  }
41
35
  }
42
36
  async onStop() {
@@ -59,10 +53,6 @@ __decorate([
59
53
  (0, decorator_1.Inject)(),
60
54
  __metadata("design:type", core_1.MidwayDecoratorService)
61
55
  ], EggConfiguration.prototype, "decoratorService", void 0);
62
- __decorate([
63
- (0, decorator_1.Inject)(),
64
- __metadata("design:type", web_1.MidwayWebFramework)
65
- ], EggConfiguration.prototype, "framework", void 0);
66
56
  __decorate([
67
57
  (0, decorator_1.Init)(),
68
58
  __metadata("design:type", Function),
@@ -0,0 +1,14 @@
1
+ import { IMidwayContainer, MidwayConfigService, MidwayFrameworkService } from '@midwayjs/core';
2
+ export declare class MidwayWebLifeCycleService {
3
+ readonly applicationContext: IMidwayContainer;
4
+ protected frameworkService: MidwayFrameworkService;
5
+ protected configService: MidwayConfigService;
6
+ private lifecycleInstanceList;
7
+ constructor(applicationContext: IMidwayContainer);
8
+ protected init(): Promise<void>;
9
+ afterInit(): Promise<void>;
10
+ stop(): Promise<void>;
11
+ private runContainerLifeCycle;
12
+ private runObjectLifeCycle;
13
+ }
14
+ //# sourceMappingURL=lifecycle.d.ts.map
@@ -0,0 +1,143 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.MidwayWebLifeCycleService = void 0;
13
+ const core_1 = require("@midwayjs/core");
14
+ const decorator_1 = require("@midwayjs/decorator");
15
+ const configuration_1 = require("@midwayjs/core/dist/functional/configuration");
16
+ const util_1 = require("util");
17
+ const debug = (0, util_1.debuglog)('midway:debug');
18
+ let MidwayWebLifeCycleService = class MidwayWebLifeCycleService {
19
+ constructor(applicationContext) {
20
+ this.applicationContext = applicationContext;
21
+ this.lifecycleInstanceList = [];
22
+ }
23
+ async init() {
24
+ // run lifecycle
25
+ const cycles = (0, decorator_1.listModule)(decorator_1.CONFIGURATION_KEY);
26
+ debug(`[core]: Found Configuration length = ${cycles.length}`);
27
+ for (const cycle of cycles) {
28
+ if (cycle.target instanceof configuration_1.FunctionalConfiguration) {
29
+ // 函数式写法
30
+ cycle.instance = cycle.target;
31
+ }
32
+ else {
33
+ // 普通类写法
34
+ debug(`[core]: Lifecycle run ${cycle.target.name} init`);
35
+ cycle.instance = await this.applicationContext.getAsync(cycle.target);
36
+ }
37
+ if (cycle.instance) {
38
+ this.lifecycleInstanceList.push(cycle);
39
+ }
40
+ }
41
+ // bind object lifecycle
42
+ await Promise.all([
43
+ this.runObjectLifeCycle(this.lifecycleInstanceList, 'onBeforeObjectCreated'),
44
+ this.runObjectLifeCycle(this.lifecycleInstanceList, 'onObjectCreated'),
45
+ this.runObjectLifeCycle(this.lifecycleInstanceList, 'onObjectInit'),
46
+ this.runObjectLifeCycle(this.lifecycleInstanceList, 'onBeforeObjectDestroy'),
47
+ ]);
48
+ // bind framework lifecycle
49
+ // onAppError
50
+ // exec onConfigLoad()
51
+ await this.runContainerLifeCycle(this.lifecycleInstanceList, 'onConfigLoad', configData => {
52
+ if (configData) {
53
+ this.configService.addObject(configData);
54
+ }
55
+ });
56
+ // exec onReady()
57
+ await this.runContainerLifeCycle(this.lifecycleInstanceList, 'onReady');
58
+ }
59
+ async afterInit() {
60
+ // exec framework.run()
61
+ await this.frameworkService.runFramework();
62
+ // exec onServerReady()
63
+ await this.runContainerLifeCycle(this.lifecycleInstanceList, 'onServerReady');
64
+ // clear config merge cache
65
+ if (!this.configService.getConfiguration('debug.recordConfigMergeOrder')) {
66
+ this.configService.clearConfigMergeOrder();
67
+ }
68
+ // some preload module init
69
+ const modules = (0, decorator_1.listPreloadModule)();
70
+ for (const module of modules) {
71
+ // preload init context
72
+ await this.applicationContext.getAsync(module);
73
+ }
74
+ }
75
+ async stop() {
76
+ // stop lifecycle
77
+ const cycles = (0, decorator_1.listModule)(decorator_1.CONFIGURATION_KEY);
78
+ for (const cycle of cycles) {
79
+ let inst;
80
+ if (cycle.target instanceof configuration_1.FunctionalConfiguration) {
81
+ // 函数式写法
82
+ inst = cycle.target;
83
+ }
84
+ else {
85
+ inst = await this.applicationContext.getAsync(cycle.target);
86
+ }
87
+ await this.runContainerLifeCycle(inst, 'onStop');
88
+ }
89
+ // stop framework
90
+ await this.frameworkService.stopFramework();
91
+ }
92
+ async runContainerLifeCycle(lifecycleInstanceOrList, lifecycle, resultHandler) {
93
+ if (Array.isArray(lifecycleInstanceOrList)) {
94
+ for (const cycle of lifecycleInstanceOrList) {
95
+ if (typeof cycle.instance[lifecycle] === 'function') {
96
+ debug(`[core]: Lifecycle run ${cycle.instance.constructor.name} ${lifecycle}`);
97
+ const result = await cycle.instance[lifecycle](this.applicationContext, this.frameworkService.getMainApp());
98
+ if (resultHandler) {
99
+ resultHandler(result);
100
+ }
101
+ }
102
+ }
103
+ }
104
+ else {
105
+ if (typeof lifecycleInstanceOrList[lifecycle] === 'function') {
106
+ debug(`[core]: Lifecycle run ${lifecycleInstanceOrList.constructor.name} ${lifecycle}`);
107
+ const result = await lifecycleInstanceOrList[lifecycle](this.applicationContext, this.frameworkService.getMainApp());
108
+ if (resultHandler) {
109
+ resultHandler(result);
110
+ }
111
+ }
112
+ }
113
+ }
114
+ async runObjectLifeCycle(lifecycleInstanceList, lifecycle) {
115
+ for (const cycle of lifecycleInstanceList) {
116
+ if (typeof cycle.instance[lifecycle] === 'function') {
117
+ debug(`[core]: Lifecycle run ${cycle.instance.constructor.name} ${lifecycle}`);
118
+ return this.applicationContext[lifecycle](cycle.instance[lifecycle].bind(cycle.instance));
119
+ }
120
+ }
121
+ }
122
+ };
123
+ __decorate([
124
+ (0, decorator_1.Inject)(),
125
+ __metadata("design:type", core_1.MidwayFrameworkService)
126
+ ], MidwayWebLifeCycleService.prototype, "frameworkService", void 0);
127
+ __decorate([
128
+ (0, decorator_1.Inject)(),
129
+ __metadata("design:type", core_1.MidwayConfigService)
130
+ ], MidwayWebLifeCycleService.prototype, "configService", void 0);
131
+ __decorate([
132
+ (0, decorator_1.Init)(),
133
+ __metadata("design:type", Function),
134
+ __metadata("design:paramtypes", []),
135
+ __metadata("design:returntype", Promise)
136
+ ], MidwayWebLifeCycleService.prototype, "init", null);
137
+ MidwayWebLifeCycleService = __decorate([
138
+ (0, decorator_1.Provide)(),
139
+ (0, decorator_1.Scope)(decorator_1.ScopeEnum.Singleton),
140
+ __metadata("design:paramtypes", [Object])
141
+ ], MidwayWebLifeCycleService);
142
+ exports.MidwayWebLifeCycleService = MidwayWebLifeCycleService;
143
+ //# sourceMappingURL=lifecycle.js.map
@@ -147,26 +147,27 @@ let MidwayWebFramework = class MidwayWebFramework extends core_1.BaseFramework {
147
147
  this.setContextLoggerClass();
148
148
  }
149
149
  async loadMidwayController() {
150
+ // move egg router to last
151
+ this.app.getMiddleware().findAndInsertLast('eggRouterMiddleware');
150
152
  await this.generator.loadMidwayController(this.configurationOptions.globalPrefix, newRouter => {
151
153
  var _a;
152
154
  const dispatchFn = newRouter.middleware();
153
155
  dispatchFn._name = `midwayController(${((_a = newRouter === null || newRouter === void 0 ? void 0 : newRouter.opts) === null || _a === void 0 ? void 0 : _a.prefix) || '/'})`;
154
156
  this.app.useMiddleware(dispatchFn);
155
157
  });
158
+ // restore use method
159
+ this.app.use = this.app.originUse;
160
+ debug(`[egg]: current middleware = ${this.middlewareManager.getNames()}`);
156
161
  }
157
162
  getFrameworkType() {
158
163
  return decorator_1.MidwayFrameworkType.WEB;
159
164
  }
160
165
  async run() {
161
166
  var _a;
162
- // move egg router to last
163
- this.app.getMiddleware().findAndInsertLast('eggRouterMiddleware');
164
- // load controller
165
- await this.loadMidwayController();
166
- // restore use method
167
- this.app.use = this.app.originUse;
168
- debug(`[egg]: current middleware = ${this.middlewareManager.getNames()}`);
167
+ // cluster 模式加载路由需在 run 之前,因为 run 需要在拿到 server 之后执行
169
168
  if (!this.isClusterMode) {
169
+ // load controller
170
+ await this.loadMidwayController();
170
171
  // https config
171
172
  if (this.configurationOptions.key && this.configurationOptions.cert) {
172
173
  this.configurationOptions.key = core_1.PathFileUtil.getFileContentSync(this.configurationOptions.key);
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -86,7 +86,7 @@ export interface IWebMiddleware {
86
86
  resolve(): MidwayWebMiddleware;
87
87
  }
88
88
  declare module '@midwayjs/core/dist/interface' {
89
- interface MidwayConfig extends EggAppConfig {
89
+ interface MidwayConfig extends Partial<EggAppConfig> {
90
90
  egg?: IMidwayWebConfigurationOptions;
91
91
  }
92
92
  }
package/dist/logger.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ILogger } from '@midwayjs/logger';
1
+ import { ILogger, LoggerOptions } from '@midwayjs/logger';
2
2
  import { Application } from 'egg';
3
3
  import { MidwayLoggerService } from '@midwayjs/core';
4
4
  declare class MidwayLoggers extends Map<string, ILogger> {
@@ -28,7 +28,7 @@ declare class MidwayLoggers extends Map<string, ILogger> {
28
28
  createLogger(options: any, loggerKey: string): ILogger;
29
29
  disableConsole(): void;
30
30
  reload(): void;
31
- transformEggLogger(eggCustomLogger: any): {
31
+ transformEggLogger(eggCustomLogger: any, midwayLoggerConfig: LoggerOptions): {
32
32
  midwayLogger: {
33
33
  clients: {};
34
34
  };
package/dist/logger.js CHANGED
@@ -101,7 +101,7 @@ class MidwayLoggers extends Map {
101
101
  const configService = (0, core_1.getCurrentApplicationContext)().get(core_1.MidwayConfigService);
102
102
  // 先把 egg 的日志配置转为 midway logger 配置
103
103
  if (configService.getConfiguration('customLogger')) {
104
- const eggLoggerConfig = this.transformEggLogger(configService.getConfiguration('customLogger'));
104
+ const eggLoggerConfig = this.transformEggLogger(configService.getConfiguration('customLogger'), configService.getConfiguration('midwayLogger.default'));
105
105
  if (eggLoggerConfig) {
106
106
  configService.addObject(eggLoggerConfig);
107
107
  }
@@ -139,10 +139,9 @@ class MidwayLoggers extends Map {
139
139
  return logger;
140
140
  }
141
141
  disableConsole() {
142
- var _a, _b;
143
142
  for (const value of this.values()) {
144
- if ((_a = value) === null || _a === void 0 ? void 0 : _a.disableConsole) {
145
- (_b = value) === null || _b === void 0 ? void 0 : _b.disableConsole();
143
+ if (value === null || value === void 0 ? void 0 : value.disableConsole) {
144
+ value === null || value === void 0 ? void 0 : value.disableConsole();
146
145
  }
147
146
  else if (value.disable) {
148
147
  value.disable('console');
@@ -157,18 +156,38 @@ class MidwayLoggers extends Map {
157
156
  }
158
157
  }
159
158
  }
160
- transformEggLogger(eggCustomLogger) {
161
- var _a, _b, _c;
159
+ transformEggLogger(eggCustomLogger, midwayLoggerConfig) {
160
+ var _a, _b, _c, _d;
162
161
  const transformLoggerConfig = {
163
162
  midwayLogger: {
164
163
  clients: {},
165
164
  },
166
165
  };
167
166
  for (const name in eggCustomLogger) {
167
+ const file = (_a = eggCustomLogger[name]) === null || _a === void 0 ? void 0 : _a.file;
168
+ if (!file) {
169
+ continue;
170
+ }
171
+ const options = {};
172
+ if ((0, path_1.isAbsolute)(file)) {
173
+ // 绝对路径,单独处理
174
+ options.dir = (0, path_1.dirname)(file);
175
+ options.fileLogName = (0, path_1.basename)(file);
176
+ options.auditFileDir =
177
+ midwayLoggerConfig.auditFileDir === '.audit'
178
+ ? (0, path_1.join)(midwayLoggerConfig.dir, '.audit')
179
+ : midwayLoggerConfig.auditFileDir;
180
+ options.errorDir =
181
+ (_b = midwayLoggerConfig.errorDir) !== null && _b !== void 0 ? _b : midwayLoggerConfig.dir;
182
+ }
183
+ else {
184
+ // 相对路径,使用默认的 dir 即可
185
+ options.fileLogName = file;
186
+ }
168
187
  transformLoggerConfig.midwayLogger.clients[name] = {
169
- fileLogName: (_a = eggCustomLogger[name]) === null || _a === void 0 ? void 0 : _a.file,
170
- level: levelTransform((_b = eggCustomLogger[name]) === null || _b === void 0 ? void 0 : _b.level),
171
- consoleLevel: levelTransform((_c = eggCustomLogger[name]) === null || _c === void 0 ? void 0 : _c.consoleLevel),
188
+ level: levelTransform((_c = eggCustomLogger[name]) === null || _c === void 0 ? void 0 : _c.level),
189
+ consoleLevel: levelTransform((_d = eggCustomLogger[name]) === null || _d === void 0 ? void 0 : _d.consoleLevel),
190
+ ...options,
172
191
  };
173
192
  cleanUndefinedProperty(transformLoggerConfig.midwayLogger.clients[name]);
174
193
  }
package/dist/utils.js CHANGED
@@ -108,6 +108,8 @@ async function initializeAgentApplicationContext(agent) {
108
108
  }
109
109
  const applicationContext = (0, core_1.getCurrentApplicationContext)();
110
110
  const agentFramework = new web_1.MidwayWebFramework(applicationContext);
111
+ agentFramework['logger'] = agent.logger;
112
+ agentFramework['appLogger'] = agent.coreLogger;
111
113
  agentFramework.app = agent;
112
114
  agentFramework.configService = applicationContext.get(core_1.MidwayConfigService);
113
115
  agentFramework.overwriteApplication('agent');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/web",
3
- "version": "3.0.14-beta.1",
3
+ "version": "3.1.1",
4
4
  "description": "Midway Web Framework for Egg.js",
5
5
  "main": "dist/index",
6
6
  "typings": "dist/index.d.ts",
@@ -29,12 +29,12 @@
29
29
  "devDependencies": {
30
30
  "@midwayjs/decorator": "^3.0.10",
31
31
  "@midwayjs/logger": "^2.15.0",
32
- "@midwayjs/mock": "^3.0.13",
32
+ "@midwayjs/mock": "^3.1.1",
33
33
  "axios": "0.26.0",
34
34
  "dayjs": "1.10.8",
35
35
  "egg-logger": "2.7.1",
36
36
  "egg-mock": "4.2.0",
37
- "egg-scripts": "2.15.2",
37
+ "egg-scripts": "2.15.3",
38
38
  "egg-socket.io": "4.1.6",
39
39
  "egg-view-nunjucks": "2.3.0",
40
40
  "fake-egg": "1.0.0",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@eggjs/router": "^2.0.0",
49
- "@midwayjs/core": "^3.0.13",
49
+ "@midwayjs/core": "^3.1.1",
50
50
  "egg": "^2.28.0",
51
51
  "egg-cluster": "^1.27.1",
52
52
  "find-up": "5.0.0",
@@ -60,5 +60,5 @@
60
60
  "engines": {
61
61
  "node": ">=12"
62
62
  },
63
- "gitHead": "a603d2348d6141f8f723901498f03a162a037708"
63
+ "gitHead": "b7a5c817d2316b93967367c34cff20a98b1ce4b7"
64
64
  }