@midwayjs/web 3.1.1 → 3.1.2

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/utils.js +6 -4
  2. package/package.json +5 -5
package/dist/utils.js CHANGED
@@ -72,21 +72,23 @@ async function initializeAgentApplicationContext(agent) {
72
72
  const aspectService = (0, core_1.getCurrentApplicationContext)().get(core_1.MidwayAspectService);
73
73
  // init decorator service
74
74
  const decoratorService = (0, core_1.getCurrentApplicationContext)().get(core_1.MidwayDecoratorService);
75
+ const configService = (0, core_1.getCurrentApplicationContext)().get(core_1.MidwayConfigService);
76
+ const loggerService = (0, core_1.getCurrentApplicationContext)().get(core_1.MidwayLoggerService);
75
77
  // framework/config/plugin/logger/app decorator support
76
78
  // register base config hook
77
79
  decoratorService.registerPropertyHandler(decorator_1.CONFIG_KEY, (propertyName, meta) => {
78
80
  var _a;
79
81
  if (meta.identifier === decorator_1.ALL) {
80
- return this.configService.getConfiguration();
82
+ return configService.getConfiguration();
81
83
  }
82
84
  else {
83
- return this.configService.getConfiguration((_a = meta.identifier) !== null && _a !== void 0 ? _a : propertyName);
85
+ return configService.getConfiguration((_a = meta.identifier) !== null && _a !== void 0 ? _a : propertyName);
84
86
  }
85
87
  });
86
88
  // register @Logger decorator handler
87
89
  decoratorService.registerPropertyHandler(decorator_1.LOGGER_KEY, (propertyName, meta) => {
88
90
  var _a;
89
- return this.loggerService.getLogger((_a = meta.identifier) !== null && _a !== void 0 ? _a : propertyName);
91
+ return loggerService.getLogger((_a = meta.identifier) !== null && _a !== void 0 ? _a : propertyName);
90
92
  });
91
93
  decoratorService.registerPropertyHandler(decorator_1.PIPELINE_IDENTIFIER, (key, meta, instance) => {
92
94
  var _a, _b;
@@ -97,7 +99,7 @@ async function initializeAgentApplicationContext(agent) {
97
99
  return agent;
98
100
  });
99
101
  decoratorService.registerPropertyHandler(decorator_1.PLUGIN_KEY, (key, target) => {
100
- return this.agent[key];
102
+ return agent[key];
101
103
  });
102
104
  // init aspect module
103
105
  await aspectService.loadAspect();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/web",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "Midway Web Framework for Egg.js",
5
5
  "main": "dist/index",
6
6
  "typings": "dist/index.d.ts",
@@ -29,8 +29,8 @@
29
29
  "devDependencies": {
30
30
  "@midwayjs/decorator": "^3.0.10",
31
31
  "@midwayjs/logger": "^2.15.0",
32
- "@midwayjs/mock": "^3.1.1",
33
- "axios": "0.26.0",
32
+ "@midwayjs/mock": "^3.1.2",
33
+ "axios": "0.26.1",
34
34
  "dayjs": "1.10.8",
35
35
  "egg-logger": "2.7.1",
36
36
  "egg-mock": "4.2.0",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@eggjs/router": "^2.0.0",
49
- "@midwayjs/core": "^3.1.1",
49
+ "@midwayjs/core": "^3.1.2",
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": "b7a5c817d2316b93967367c34cff20a98b1ce4b7"
63
+ "gitHead": "4ff3aa892b76d016f0ea123c7f9520d054d5c96b"
64
64
  }