@midwayjs/info 3.5.3 → 3.7.0
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/configuration.js
CHANGED
|
@@ -10,9 +10,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.InfoConfiguration = void 0;
|
|
13
|
-
const decorator_1 = require("@midwayjs/decorator");
|
|
14
|
-
const info_middleware_1 = require("./middleware/info.middleware");
|
|
15
13
|
const core_1 = require("@midwayjs/core");
|
|
14
|
+
const info_middleware_1 = require("./middleware/info.middleware");
|
|
16
15
|
const DefaultConfig = require("./config.default");
|
|
17
16
|
let InfoConfiguration = class InfoConfiguration {
|
|
18
17
|
async onReady() {
|
|
@@ -24,11 +23,11 @@ let InfoConfiguration = class InfoConfiguration {
|
|
|
24
23
|
}
|
|
25
24
|
};
|
|
26
25
|
__decorate([
|
|
27
|
-
(0,
|
|
26
|
+
(0, core_1.Inject)(),
|
|
28
27
|
__metadata("design:type", core_1.MidwayApplicationManager)
|
|
29
28
|
], InfoConfiguration.prototype, "applicationManager", void 0);
|
|
30
29
|
InfoConfiguration = __decorate([
|
|
31
|
-
(0,
|
|
30
|
+
(0, core_1.Configuration)({
|
|
32
31
|
namespace: 'info',
|
|
33
32
|
importConfigs: [
|
|
34
33
|
{
|
package/dist/infoService.js
CHANGED
|
@@ -10,8 +10,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.InfoService = void 0;
|
|
13
|
-
const decorator_1 = require("@midwayjs/decorator");
|
|
14
13
|
const core_1 = require("@midwayjs/core");
|
|
14
|
+
const core_2 = require("@midwayjs/core");
|
|
15
15
|
const utils_1 = require("./utils");
|
|
16
16
|
const os_1 = require("os");
|
|
17
17
|
const path_1 = require("path");
|
|
@@ -254,38 +254,38 @@ let InfoService = class InfoService {
|
|
|
254
254
|
}
|
|
255
255
|
};
|
|
256
256
|
__decorate([
|
|
257
|
-
(0,
|
|
258
|
-
__metadata("design:type",
|
|
257
|
+
(0, core_1.Inject)(),
|
|
258
|
+
__metadata("design:type", core_2.MidwayInformationService)
|
|
259
259
|
], InfoService.prototype, "midwayInformationService", void 0);
|
|
260
260
|
__decorate([
|
|
261
|
-
(0,
|
|
262
|
-
__metadata("design:type",
|
|
261
|
+
(0, core_1.Inject)(),
|
|
262
|
+
__metadata("design:type", core_2.MidwayConfigService)
|
|
263
263
|
], InfoService.prototype, "configService", void 0);
|
|
264
264
|
__decorate([
|
|
265
|
-
(0,
|
|
266
|
-
__metadata("design:type",
|
|
265
|
+
(0, core_1.Inject)(),
|
|
266
|
+
__metadata("design:type", core_2.MidwayEnvironmentService)
|
|
267
267
|
], InfoService.prototype, "environment", void 0);
|
|
268
268
|
__decorate([
|
|
269
|
-
(0,
|
|
269
|
+
(0, core_1.Config)('info.title'),
|
|
270
270
|
__metadata("design:type", Object)
|
|
271
271
|
], InfoService.prototype, "titleConfig", void 0);
|
|
272
272
|
__decorate([
|
|
273
|
-
(0,
|
|
273
|
+
(0, core_1.Config)('info.hiddenKey'),
|
|
274
274
|
__metadata("design:type", Array)
|
|
275
275
|
], InfoService.prototype, "defaultHiddenKey", void 0);
|
|
276
276
|
__decorate([
|
|
277
|
-
(0,
|
|
277
|
+
(0, core_1.ApplicationContext)(),
|
|
278
278
|
__metadata("design:type", Object)
|
|
279
279
|
], InfoService.prototype, "container", void 0);
|
|
280
280
|
__decorate([
|
|
281
|
-
(0,
|
|
281
|
+
(0, core_1.Init)(),
|
|
282
282
|
__metadata("design:type", Function),
|
|
283
283
|
__metadata("design:paramtypes", []),
|
|
284
284
|
__metadata("design:returntype", Promise)
|
|
285
285
|
], InfoService.prototype, "init", null);
|
|
286
286
|
InfoService = __decorate([
|
|
287
|
-
(0,
|
|
288
|
-
(0,
|
|
287
|
+
(0, core_1.Provide)(),
|
|
288
|
+
(0, core_1.Scope)(core_1.ScopeEnum.Singleton)
|
|
289
289
|
], InfoService);
|
|
290
290
|
exports.InfoService = InfoService;
|
|
291
291
|
//# sourceMappingURL=infoService.js.map
|
|
@@ -10,11 +10,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.InfoMiddleware = void 0;
|
|
13
|
-
const
|
|
13
|
+
const core_1 = require("@midwayjs/core");
|
|
14
14
|
const infoService_1 = require("../infoService");
|
|
15
15
|
let InfoMiddleware = class InfoMiddleware {
|
|
16
16
|
resolve(app) {
|
|
17
|
-
if (app.getFrameworkType() ===
|
|
17
|
+
if (app.getFrameworkType() === core_1.MidwayFrameworkType.WEB_EXPRESS) {
|
|
18
18
|
return async (req, res, next) => {
|
|
19
19
|
if (req.path === this.infoPath) {
|
|
20
20
|
// return html
|
|
@@ -41,15 +41,15 @@ let InfoMiddleware = class InfoMiddleware {
|
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
__decorate([
|
|
44
|
-
(0,
|
|
44
|
+
(0, core_1.Config)('info.infoPath'),
|
|
45
45
|
__metadata("design:type", Object)
|
|
46
46
|
], InfoMiddleware.prototype, "infoPath", void 0);
|
|
47
47
|
__decorate([
|
|
48
|
-
(0,
|
|
48
|
+
(0, core_1.Inject)(),
|
|
49
49
|
__metadata("design:type", infoService_1.InfoService)
|
|
50
50
|
], InfoMiddleware.prototype, "infoService", void 0);
|
|
51
51
|
InfoMiddleware = __decorate([
|
|
52
|
-
(0,
|
|
52
|
+
(0, core_1.Middleware)()
|
|
53
53
|
], InfoMiddleware);
|
|
54
54
|
exports.InfoMiddleware = InfoMiddleware;
|
|
55
55
|
//# sourceMappingURL=info.middleware.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/info",
|
|
3
3
|
"description": "midway info",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.7.0",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -13,13 +13,12 @@
|
|
|
13
13
|
"picomatch": "2.3.1"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@midwayjs/core": "^3.
|
|
17
|
-
"@midwayjs/
|
|
18
|
-
"@midwayjs/
|
|
19
|
-
"@midwayjs/
|
|
20
|
-
"@midwayjs/
|
|
21
|
-
"@midwayjs/serverless-
|
|
22
|
-
"@midwayjs/serverless-scf-starter": "^3.5.3"
|
|
16
|
+
"@midwayjs/core": "^3.7.0",
|
|
17
|
+
"@midwayjs/express": "^3.7.0",
|
|
18
|
+
"@midwayjs/koa": "^3.7.0",
|
|
19
|
+
"@midwayjs/mock": "^3.7.0",
|
|
20
|
+
"@midwayjs/serverless-fc-starter": "^3.7.0",
|
|
21
|
+
"@midwayjs/serverless-scf-starter": "^3.7.0"
|
|
23
22
|
},
|
|
24
23
|
"keywords": [
|
|
25
24
|
"midway"
|
|
@@ -40,5 +39,5 @@
|
|
|
40
39
|
"type": "git",
|
|
41
40
|
"url": "https://github.com/midwayjs/midway.git"
|
|
42
41
|
},
|
|
43
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "99386083ee26b386fd508b9c892091c914e77535"
|
|
44
43
|
}
|