@midwayjs/info 3.0.0-beta.9 → 3.0.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/README.md +6 -27
- package/dist/config.default.d.ts +3 -0
- package/dist/config.default.js +10 -0
- package/dist/config.default.js.map +1 -0
- package/dist/configuration.d.ts +3 -0
- package/dist/configuration.js +18 -3
- package/dist/configuration.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/infoService.d.ts +9 -2
- package/dist/infoService.js +81 -9
- package/dist/infoService.js.map +1 -0
- package/dist/interface.d.ts +7 -4
- package/dist/interface.js +2 -6
- package/dist/interface.js.map +1 -0
- package/dist/middleware/info.middleware.d.ts +8 -0
- package/dist/middleware/info.middleware.js +55 -0
- package/dist/middleware/info.middleware.js.map +1 -0
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +19 -31
- package/dist/utils.js.map +1 -0
- package/package.json +16 -10
- package/CHANGELOG.md +0 -75
package/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Midway Information Component
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Show your project info in router or other way, like phpInfo.
|
|
4
|
+
|
|
5
|
+

|
|
4
6
|
|
|
5
|
-

|
|
6
7
|
## Usage
|
|
7
8
|
|
|
8
|
-
in
|
|
9
|
+
import info component in `configuration.ts` file
|
|
9
10
|
|
|
10
11
|
```ts
|
|
11
12
|
import * as info from '@midwayjs/info';
|
|
@@ -24,29 +25,7 @@ export class ContainerConfiguration {
|
|
|
24
25
|
|
|
25
26
|
```
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```ts
|
|
30
|
-
// model/user.ts
|
|
31
|
-
import { Provider, Controller, Get } from '@midwayjs/decorator';
|
|
32
|
-
import { InfoService, InfoValueType } from '@midwayjs/info';
|
|
33
|
-
|
|
34
|
-
@Provider()
|
|
35
|
-
@Controller('/')
|
|
36
|
-
export class Photo {
|
|
37
|
-
|
|
38
|
-
@Inject()
|
|
39
|
-
infoService: InfoService;
|
|
40
|
-
|
|
41
|
-
@Get('/info')
|
|
42
|
-
getMidwayInfo() {
|
|
43
|
-
// return json
|
|
44
|
-
return this.infoService.info();
|
|
45
|
-
// return html
|
|
46
|
-
return this.infoService.info(InfoValueType.HTML);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
```
|
|
28
|
+
Your can curl `/_info` to show it.
|
|
50
29
|
|
|
51
30
|
## License
|
|
52
31
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.info = void 0;
|
|
4
|
+
const interface_1 = require("./interface");
|
|
5
|
+
exports.info = {
|
|
6
|
+
title: 'Midway Info',
|
|
7
|
+
infoPath: '/_info',
|
|
8
|
+
hiddenKey: interface_1.DefaultHiddenKey,
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=config.default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.default.js","sourceRoot":"","sources":["../src/config.default.ts"],"names":[],"mappings":";;;AAAA,2CAAkE;AAErD,QAAA,IAAI,GAAG;IAClB,KAAK,EAAE,aAAa;IACpB,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,4BAAgB;CACP,CAAC","sourcesContent":["import { DefaultHiddenKey, InfoConfigOptions } from './interface';\n\nexport const info = {\n title: 'Midway Info',\n infoPath: '/_info',\n hiddenKey: DefaultHiddenKey,\n} as InfoConfigOptions;\n"]}
|
package/dist/configuration.d.ts
CHANGED
package/dist/configuration.js
CHANGED
|
@@ -5,19 +5,34 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
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
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
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
|
+
};
|
|
8
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
12
|
exports.InfoConfiguration = void 0;
|
|
10
13
|
const decorator_1 = require("@midwayjs/decorator");
|
|
14
|
+
const info_middleware_1 = require("./middleware/info.middleware");
|
|
15
|
+
const core_1 = require("@midwayjs/core");
|
|
16
|
+
const DefaultConfig = require("./config.default");
|
|
11
17
|
let InfoConfiguration = class InfoConfiguration {
|
|
18
|
+
async onReady() {
|
|
19
|
+
this.applicationManager
|
|
20
|
+
.getApplications(['koa', 'faas', 'express', 'egg'])
|
|
21
|
+
.forEach(app => {
|
|
22
|
+
app.useMiddleware(info_middleware_1.InfoMiddleware);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
12
25
|
};
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, decorator_1.Inject)(),
|
|
28
|
+
__metadata("design:type", core_1.MidwayApplicationManager)
|
|
29
|
+
], InfoConfiguration.prototype, "applicationManager", void 0);
|
|
13
30
|
InfoConfiguration = __decorate([
|
|
14
31
|
(0, decorator_1.Configuration)({
|
|
15
32
|
namespace: 'info',
|
|
16
33
|
importConfigs: [
|
|
17
34
|
{
|
|
18
|
-
default:
|
|
19
|
-
info: {},
|
|
20
|
-
},
|
|
35
|
+
default: DefaultConfig,
|
|
21
36
|
},
|
|
22
37
|
],
|
|
23
38
|
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../src/configuration.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAA4D;AAC5D,kEAA8D;AAC9D,yCAA0D;AAC1D,kDAAkD;AAUlD,IAAa,iBAAiB,GAA9B,MAAa,iBAAiB;IAI5B,KAAK,CAAC,OAAO;QACX,IAAI,CAAC,kBAAkB;aACpB,eAAe,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;aAClD,OAAO,CAAC,GAAG,CAAC,EAAE;YACb,GAAG,CAAC,aAAa,CAAC,gCAAc,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACP,CAAC;CACF,CAAA;AATC;IADC,IAAA,kBAAM,GAAE;8BACW,+BAAwB;6DAAC;AAFlC,iBAAiB;IAR7B,IAAA,yBAAa,EAAC;QACb,SAAS,EAAE,MAAM;QACjB,aAAa,EAAE;YACb;gBACE,OAAO,EAAE,aAAa;aACvB;SACF;KACF,CAAC;GACW,iBAAiB,CAW7B;AAXY,8CAAiB","sourcesContent":["import { Configuration, Inject } from '@midwayjs/decorator';\nimport { InfoMiddleware } from './middleware/info.middleware';\nimport { MidwayApplicationManager } from '@midwayjs/core';\nimport * as DefaultConfig from './config.default';\n\n@Configuration({\n namespace: 'info',\n importConfigs: [\n {\n default: DefaultConfig,\n },\n ],\n})\nexport class InfoConfiguration {\n @Inject()\n applicationManager: MidwayApplicationManager;\n\n async onReady() {\n this.applicationManager\n .getApplications(['koa', 'faas', 'express', 'egg'])\n .forEach(app => {\n app.useMiddleware(InfoMiddleware);\n });\n }\n}\n"]}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,5 +14,6 @@ exports.Configuration = void 0;
|
|
|
14
14
|
var configuration_1 = require("./configuration");
|
|
15
15
|
Object.defineProperty(exports, "Configuration", { enumerable: true, get: function () { return configuration_1.InfoConfiguration; } });
|
|
16
16
|
__exportStar(require("./infoService"), exports);
|
|
17
|
+
__exportStar(require("./middleware/info.middleware"), exports);
|
|
17
18
|
__exportStar(require("./interface"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,iDAAqE;AAA5D,8GAAA,iBAAiB,OAAiB;AAC3C,gDAA8B;AAC9B,+DAA6C;AAC7C,8CAA4B","sourcesContent":["export { InfoConfiguration as Configuration } from './configuration';\nexport * from './infoService';\nexport * from './middleware/info.middleware';\nexport * from './interface';\n"]}
|
package/dist/infoService.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { MidwayInformationService, IMidwayContainer } from '@midwayjs/core';
|
|
1
|
+
import { MidwayInformationService, IMidwayContainer, MidwayConfigService, MidwayEnvironmentService } from '@midwayjs/core';
|
|
2
2
|
import { InfoValueType, TypeInfo } from './interface';
|
|
3
3
|
export declare class InfoService {
|
|
4
4
|
midwayInformationService: MidwayInformationService;
|
|
5
|
-
|
|
5
|
+
configService: MidwayConfigService;
|
|
6
|
+
environment: MidwayEnvironmentService;
|
|
7
|
+
titleConfig: any;
|
|
8
|
+
defaultHiddenKey: string[];
|
|
9
|
+
secretMatchList: Array<any>;
|
|
6
10
|
container: IMidwayContainer;
|
|
11
|
+
init(): Promise<void>;
|
|
7
12
|
info(infoValueType?: InfoValueType): string | TypeInfo[];
|
|
8
13
|
projectInfo(): TypeInfo;
|
|
9
14
|
systemInfo(): TypeInfo;
|
|
@@ -21,5 +26,7 @@ export declare class InfoService {
|
|
|
21
26
|
type: string;
|
|
22
27
|
info: {};
|
|
23
28
|
};
|
|
29
|
+
protected filterSecretContent(key: any, value: any): any;
|
|
30
|
+
protected safeJson(value: any): string;
|
|
24
31
|
}
|
|
25
32
|
//# sourceMappingURL=infoService.d.ts.map
|
package/dist/infoService.js
CHANGED
|
@@ -12,11 +12,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.InfoService = void 0;
|
|
13
13
|
const decorator_1 = require("@midwayjs/decorator");
|
|
14
14
|
const core_1 = require("@midwayjs/core");
|
|
15
|
-
const interface_1 = require("./interface");
|
|
16
15
|
const utils_1 = require("./utils");
|
|
17
16
|
const os_1 = require("os");
|
|
18
17
|
const path_1 = require("path");
|
|
18
|
+
const pm = require("picomatch");
|
|
19
19
|
let InfoService = class InfoService {
|
|
20
|
+
async init() {
|
|
21
|
+
this.secretMatchList = Array.from(new Set(this.defaultHiddenKey)).map(pattern => {
|
|
22
|
+
return pm(pattern);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
20
25
|
info(infoValueType) {
|
|
21
26
|
const info = [];
|
|
22
27
|
info.push(this.projectInfo());
|
|
@@ -29,8 +34,8 @@ let InfoService = class InfoService {
|
|
|
29
34
|
info.push(this.envInfo());
|
|
30
35
|
info.push(this.dependenciesInfo());
|
|
31
36
|
info.push(this.networkInfo());
|
|
32
|
-
if (infoValueType ===
|
|
33
|
-
return (0, utils_1.renderToHtml)(info);
|
|
37
|
+
if (infoValueType === 'html') {
|
|
38
|
+
return (0, utils_1.renderToHtml)(info, this.titleConfig);
|
|
34
39
|
}
|
|
35
40
|
return info;
|
|
36
41
|
}
|
|
@@ -42,7 +47,7 @@ let InfoService = class InfoService {
|
|
|
42
47
|
AppDir: this.midwayInformationService.getAppDir(),
|
|
43
48
|
BaseDir: this.midwayInformationService.getBaseDir(),
|
|
44
49
|
Root: this.midwayInformationService.getRoot(),
|
|
45
|
-
Env: this.
|
|
50
|
+
Env: this.environment.getCurrentEnvironment(),
|
|
46
51
|
},
|
|
47
52
|
};
|
|
48
53
|
}
|
|
@@ -110,9 +115,13 @@ let InfoService = class InfoService {
|
|
|
110
115
|
};
|
|
111
116
|
}
|
|
112
117
|
envInfo() {
|
|
118
|
+
const env = {};
|
|
119
|
+
Object.keys(process.env).forEach(envName => {
|
|
120
|
+
env[envName] = this.filterSecretContent(envName, process.env[envName]);
|
|
121
|
+
});
|
|
113
122
|
return {
|
|
114
123
|
type: 'Environment Variable',
|
|
115
|
-
info:
|
|
124
|
+
info: env,
|
|
116
125
|
};
|
|
117
126
|
}
|
|
118
127
|
timeInfo() {
|
|
@@ -189,28 +198,91 @@ let InfoService = class InfoService {
|
|
|
189
198
|
}
|
|
190
199
|
midwayConfig() {
|
|
191
200
|
const info = {};
|
|
192
|
-
const config = this.
|
|
201
|
+
const config = this.configService.getConfiguration() || {};
|
|
193
202
|
Object.keys(config).forEach(key => {
|
|
194
|
-
info[key] = (
|
|
203
|
+
info[key] = this.safeJson(this.filterSecretContent(key, config[key]));
|
|
195
204
|
});
|
|
196
205
|
return {
|
|
197
206
|
type: 'Midway Config',
|
|
198
207
|
info,
|
|
199
208
|
};
|
|
200
209
|
}
|
|
210
|
+
filterSecretContent(key, value) {
|
|
211
|
+
if (typeof value === 'string') {
|
|
212
|
+
const find = this.secretMatchList.some(isMatch => {
|
|
213
|
+
return isMatch(key.toLowerCase());
|
|
214
|
+
});
|
|
215
|
+
if (find) {
|
|
216
|
+
return (0, utils_1.safeContent)(value);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
else if (Array.isArray(value)) {
|
|
220
|
+
return value.map(item => {
|
|
221
|
+
return this.filterSecretContent(key, item);
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
return value;
|
|
225
|
+
}
|
|
226
|
+
safeJson(value) {
|
|
227
|
+
switch (typeof value) {
|
|
228
|
+
case 'string':
|
|
229
|
+
return `"${value}"`;
|
|
230
|
+
case 'number':
|
|
231
|
+
return `${value}`;
|
|
232
|
+
case 'boolean':
|
|
233
|
+
return String(value);
|
|
234
|
+
case 'object':
|
|
235
|
+
if (!value) {
|
|
236
|
+
return 'null';
|
|
237
|
+
}
|
|
238
|
+
if (Array.isArray(value)) {
|
|
239
|
+
return `[${value.map(item => this.safeJson(item)).join(',')}]`;
|
|
240
|
+
}
|
|
241
|
+
if (value instanceof RegExp) {
|
|
242
|
+
return `"${value.toString()}"`;
|
|
243
|
+
}
|
|
244
|
+
// eslint-disable-next-line no-case-declarations
|
|
245
|
+
const props = [];
|
|
246
|
+
for (const key in value) {
|
|
247
|
+
props.push(`"${key}":${this.safeJson(this.filterSecretContent(key, value[key]))}`);
|
|
248
|
+
}
|
|
249
|
+
return `{${props.join(',')}}`;
|
|
250
|
+
case 'function':
|
|
251
|
+
return `function ${value.name}(${value.length} args)`;
|
|
252
|
+
}
|
|
253
|
+
return '';
|
|
254
|
+
}
|
|
201
255
|
};
|
|
202
256
|
__decorate([
|
|
203
257
|
(0, decorator_1.Inject)(),
|
|
204
258
|
__metadata("design:type", core_1.MidwayInformationService)
|
|
205
259
|
], InfoService.prototype, "midwayInformationService", void 0);
|
|
206
260
|
__decorate([
|
|
207
|
-
(0, decorator_1.
|
|
261
|
+
(0, decorator_1.Inject)(),
|
|
262
|
+
__metadata("design:type", core_1.MidwayConfigService)
|
|
263
|
+
], InfoService.prototype, "configService", void 0);
|
|
264
|
+
__decorate([
|
|
265
|
+
(0, decorator_1.Inject)(),
|
|
266
|
+
__metadata("design:type", core_1.MidwayEnvironmentService)
|
|
267
|
+
], InfoService.prototype, "environment", void 0);
|
|
268
|
+
__decorate([
|
|
269
|
+
(0, decorator_1.Config)('info.title'),
|
|
208
270
|
__metadata("design:type", Object)
|
|
209
|
-
], InfoService.prototype, "
|
|
271
|
+
], InfoService.prototype, "titleConfig", void 0);
|
|
272
|
+
__decorate([
|
|
273
|
+
(0, decorator_1.Config)('info.hiddenKey'),
|
|
274
|
+
__metadata("design:type", Array)
|
|
275
|
+
], InfoService.prototype, "defaultHiddenKey", void 0);
|
|
210
276
|
__decorate([
|
|
211
277
|
(0, decorator_1.ApplicationContext)(),
|
|
212
278
|
__metadata("design:type", Object)
|
|
213
279
|
], InfoService.prototype, "container", void 0);
|
|
280
|
+
__decorate([
|
|
281
|
+
(0, decorator_1.Init)(),
|
|
282
|
+
__metadata("design:type", Function),
|
|
283
|
+
__metadata("design:paramtypes", []),
|
|
284
|
+
__metadata("design:returntype", Promise)
|
|
285
|
+
], InfoService.prototype, "init", null);
|
|
214
286
|
InfoService = __decorate([
|
|
215
287
|
(0, decorator_1.Provide)(),
|
|
216
288
|
(0, decorator_1.Scope)(decorator_1.ScopeEnum.Singleton)
|
|
@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BAAK,EAAC,qBAAS,CAAC,SAAS,CAAC;GACd,WAAW,CAgSvB;AAhSY,kCAAW","sourcesContent":["import {\n Provide,\n Scope,\n ScopeEnum,\n Inject,\n ApplicationContext,\n Config,\n Init,\n} from '@midwayjs/decorator';\nimport {\n MidwayInformationService,\n IMidwayContainer,\n MidwayConfigService,\n MidwayEnvironmentService,\n} from '@midwayjs/core';\nimport { InfoValueType, TypeInfo } from './interface';\nimport { bitToMB, renderToHtml, safeContent, safeRequire } from './utils';\nimport {\n hostname,\n homedir,\n cpus,\n networkInterfaces,\n uptime,\n totalmem,\n} from 'os';\nimport { join } from 'path';\nimport * as pm from 'picomatch';\n\n@Provide()\n@Scope(ScopeEnum.Singleton)\nexport class InfoService {\n @Inject()\n midwayInformationService: MidwayInformationService;\n\n @Inject()\n configService: MidwayConfigService;\n\n @Inject()\n environment: MidwayEnvironmentService;\n\n @Config('info.title')\n titleConfig;\n\n @Config('info.hiddenKey')\n defaultHiddenKey: string[];\n\n secretMatchList: Array<any>;\n\n @ApplicationContext()\n container: IMidwayContainer;\n\n @Init()\n async init() {\n this.secretMatchList = Array.from(new Set(this.defaultHiddenKey)).map(\n pattern => {\n return pm(pattern);\n }\n );\n }\n\n info(infoValueType?: InfoValueType) {\n const info: TypeInfo[] = [];\n info.push(this.projectInfo());\n info.push(this.systemInfo());\n info.push(this.resourceOccupationInfo());\n info.push(this.softwareInfo());\n info.push(this.midwayConfig());\n info.push(this.midwayService());\n info.push(this.timeInfo());\n info.push(this.envInfo());\n info.push(this.dependenciesInfo());\n info.push(this.networkInfo());\n\n if (infoValueType === 'html') {\n return renderToHtml(info, this.titleConfig);\n }\n return info;\n }\n\n projectInfo(): TypeInfo {\n return {\n type: 'Project',\n info: {\n Project: this.midwayInformationService.getProjectName(),\n AppDir: this.midwayInformationService.getAppDir(),\n BaseDir: this.midwayInformationService.getBaseDir(),\n Root: this.midwayInformationService.getRoot(),\n Env: this.environment.getCurrentEnvironment(),\n },\n };\n }\n\n systemInfo(): TypeInfo {\n const _platform = process.platform;\n return {\n type: 'System',\n info: {\n Platform: _platform === 'win32' ? 'Windows' : _platform,\n Node: process.versions.node,\n V8: process.versions.v8,\n ProcessId: process.pid,\n Arch: process.arch,\n Hostname: hostname(),\n HomeDir: homedir(),\n CWD: process.cwd(),\n ExecCommand: [].concat(process.argv, process.execArgv).join(' '),\n },\n };\n }\n\n resourceOccupationInfo(): TypeInfo {\n const memory = process.memoryUsage();\n const cpu = cpus();\n return {\n type: 'Memory & CPU',\n info: {\n 'Memory Total Occupy': bitToMB(memory.rss),\n 'Heap Total Occupy': bitToMB(memory.heapTotal),\n 'Heap Used': bitToMB(memory.heapUsed),\n 'V8 C++ Object Memory': bitToMB(memory.external),\n 'System Total Memory': bitToMB(totalmem()),\n CPU: `${cpu[0] ? `${cpu[0].model} ${cpu[0].speed}MHz` : ''} ${\n cpu.length\n } core `,\n 'CPU Usage': cpu\n .map(cpuInfo => {\n const times = cpuInfo.times;\n return (\n (\n (1 -\n times.idle /\n (times.idle +\n times.user +\n times.nice +\n times.sys +\n times.irq)) *\n 100\n ).toFixed(2) + '%'\n );\n })\n .join(' / '),\n },\n };\n }\n\n softwareInfo(): TypeInfo {\n const npmModuleList = [\n '@midwayjs/core',\n '@midwayjs/decorator',\n '@midwayjs/faas',\n ];\n const info = {};\n for (const modName of npmModuleList) {\n const modulePkg = safeRequire(join(modName, 'package.json'));\n if (modulePkg) {\n info[modName] = modulePkg.version;\n }\n }\n return {\n type: 'Software',\n info,\n };\n }\n\n envInfo(): TypeInfo {\n const env = {};\n Object.keys(process.env).forEach(envName => {\n env[envName] = this.filterSecretContent(envName, process.env[envName]);\n });\n return {\n type: 'Environment Variable',\n info: env,\n };\n }\n\n timeInfo(): TypeInfo {\n const t = new Date().toString().split(' ');\n return {\n type: 'Time',\n info: {\n Current: Date.now(),\n Uptime: uptime(),\n Timezone: t.length >= 7 ? t[5] : '',\n TimezoneName:\n t.length >= 7\n ? t.slice(6).join(' ').replace(/\\(/g, '').replace(/\\)/g, '')\n : '',\n },\n };\n }\n\n networkInfo(): TypeInfo {\n const net = networkInterfaces();\n const info = {};\n Object.keys(net).forEach(type => {\n const netItemList = net[type];\n let newType = type;\n if (type[type.length - 1] === '0') {\n newType = type.slice(0, -1);\n }\n // ignore localhost\n if (newType === 'lo') {\n return;\n }\n info[newType] = netItemList\n .sort(item => {\n if (item.family === 'IPv4') {\n return -1;\n }\n return 1;\n })\n .map(netItem => {\n return `${netItem.family} ${netItem.address}`;\n })\n .join(' / ');\n });\n return {\n type: 'Network',\n info,\n };\n }\n\n dependenciesInfo(): TypeInfo {\n const pkg = this.midwayInformationService.getPkg();\n const dependencies = pkg.dependencies || {};\n const info = {};\n Object.keys(dependencies).forEach(modName => {\n const modInfo = safeRequire(join(modName, 'package.json'), {});\n info[modName] = `${modInfo.version || 'Not Found'}(${\n dependencies[modName]\n })`;\n });\n return {\n type: 'Dependencies',\n info,\n };\n }\n\n midwayService() {\n const info = {};\n if (this.container?.registry) {\n for (const item of (this.container as any).registry) {\n const [key, value] = item;\n const name = value ? value?.name || value : typeof value;\n info[key] = `${value?.namespace ? `${value?.namespace}:` : ''}${name}${\n value?.scope ? ` [${value?.scope}]` : ''\n }`;\n }\n }\n\n return {\n type: 'Midway Service',\n info,\n };\n }\n\n midwayConfig() {\n const info = {};\n const config = this.configService.getConfiguration() || {};\n Object.keys(config).forEach(key => {\n info[key] = this.safeJson(this.filterSecretContent(key, config[key]));\n });\n return {\n type: 'Midway Config',\n info,\n };\n }\n\n protected filterSecretContent(key, value) {\n if (typeof value === 'string') {\n const find = this.secretMatchList.some(isMatch => {\n return isMatch(key.toLowerCase());\n });\n if (find) {\n return safeContent(value);\n }\n } else if (Array.isArray(value)) {\n return value.map(item => {\n return this.filterSecretContent(key, item);\n });\n }\n\n return value;\n }\n\n protected safeJson(value: any): string {\n switch (typeof value) {\n case 'string':\n return `\"${value}\"`;\n case 'number':\n return `${value}`;\n case 'boolean':\n return String(value);\n case 'object':\n if (!value) {\n return 'null';\n }\n if (Array.isArray(value)) {\n return `[${value.map(item => this.safeJson(item)).join(',')}]`;\n }\n if (value instanceof RegExp) {\n return `\"${value.toString()}\"`;\n }\n // eslint-disable-next-line no-case-declarations\n const props = [];\n for (const key in value) {\n props.push(\n `\"${key}\":${this.safeJson(\n this.filterSecretContent(key, value[key])\n )}`\n );\n }\n return `{${props.join(',')}}`;\n case 'function':\n return `function ${value.name}(${value.length} args)`;\n }\n return '';\n }\n}\n"]}
|
package/dist/interface.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
JSON = "json"
|
|
4
|
-
}
|
|
1
|
+
export declare type InfoValueType = 'html' | 'json';
|
|
2
|
+
export declare const DefaultHiddenKey: string[];
|
|
5
3
|
export interface TypeInfo {
|
|
6
4
|
type: string;
|
|
7
5
|
info: {
|
|
8
6
|
[key: string]: string | number;
|
|
9
7
|
};
|
|
10
8
|
}
|
|
9
|
+
export interface InfoConfigOptions {
|
|
10
|
+
title: string;
|
|
11
|
+
infoPath: string;
|
|
12
|
+
hiddenKey: Array<string>;
|
|
13
|
+
}
|
|
11
14
|
//# sourceMappingURL=interface.d.ts.map
|
package/dist/interface.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
(function (InfoValueType) {
|
|
6
|
-
InfoValueType["HTML"] = "html";
|
|
7
|
-
InfoValueType["JSON"] = "json";
|
|
8
|
-
})(InfoValueType = exports.InfoValueType || (exports.InfoValueType = {}));
|
|
3
|
+
exports.DefaultHiddenKey = void 0;
|
|
4
|
+
exports.DefaultHiddenKey = ['keys', '*key', '*token', '*secret*', 'pass*'];
|
|
9
5
|
//# sourceMappingURL=interface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC","sourcesContent":["export type InfoValueType = 'html' | 'json';\n\nexport const DefaultHiddenKey = ['keys', '*key', '*token', '*secret*', 'pass*'];\n\nexport interface TypeInfo {\n type: string;\n info: {\n [key: string]: string | number;\n }\n}\n\nexport interface InfoConfigOptions {\n title: string;\n infoPath: string;\n hiddenKey: Array<string>;\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InfoService } from '../infoService';
|
|
2
|
+
export declare class InfoMiddleware {
|
|
3
|
+
protected infoPath: any;
|
|
4
|
+
protected infoService: InfoService;
|
|
5
|
+
resolve(app: any): ((req: any, res: any, next: any) => Promise<void>) | ((ctx: any, next: any) => Promise<any>);
|
|
6
|
+
static getName(): string;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=info.middleware.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
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.InfoMiddleware = void 0;
|
|
13
|
+
const decorator_1 = require("@midwayjs/decorator");
|
|
14
|
+
const infoService_1 = require("../infoService");
|
|
15
|
+
let InfoMiddleware = class InfoMiddleware {
|
|
16
|
+
resolve(app) {
|
|
17
|
+
if (app.getFrameworkType() === decorator_1.MidwayFrameworkType.WEB_EXPRESS) {
|
|
18
|
+
return async (req, res, next) => {
|
|
19
|
+
if (req.path === this.infoPath) {
|
|
20
|
+
// return html
|
|
21
|
+
res.type('html');
|
|
22
|
+
res.send(this.infoService.info('html'));
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
next();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return async (ctx, next) => {
|
|
31
|
+
if (ctx.path === this.infoPath) {
|
|
32
|
+
// return html
|
|
33
|
+
return this.infoService.info('html');
|
|
34
|
+
}
|
|
35
|
+
return await next();
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
static getName() {
|
|
40
|
+
return 'info';
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, decorator_1.Config)('info.infoPath'),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], InfoMiddleware.prototype, "infoPath", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, decorator_1.Inject)(),
|
|
49
|
+
__metadata("design:type", infoService_1.InfoService)
|
|
50
|
+
], InfoMiddleware.prototype, "infoService", void 0);
|
|
51
|
+
InfoMiddleware = __decorate([
|
|
52
|
+
(0, decorator_1.Middleware)()
|
|
53
|
+
], InfoMiddleware);
|
|
54
|
+
exports.InfoMiddleware = InfoMiddleware;
|
|
55
|
+
//# sourceMappingURL=info.middleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.middleware.js","sourceRoot":"","sources":["../../src/middleware/info.middleware.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mDAK6B;AAC7B,gDAA6C;AAG7C,IAAa,cAAc,GAA3B,MAAa,cAAc;IAOzB,OAAO,CAAC,GAAG;QACT,IAAI,GAAG,CAAC,gBAAgB,EAAE,KAAK,+BAAmB,CAAC,WAAW,EAAE;YAC9D,OAAO,KAAK,EAAE,GAAQ,EAAE,GAAQ,EAAE,IAAS,EAAE,EAAE;gBAC7C,IAAI,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,QAAQ,EAAE;oBAC9B,cAAc;oBACd,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;oBACjB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;iBACzC;qBAAM;oBACL,IAAI,EAAE,CAAC;iBACR;YACH,CAAC,CAAC;SACH;aAAM;YACL,OAAO,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;gBACzB,IAAI,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,QAAQ,EAAE;oBAC9B,cAAc;oBACd,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;iBACtC;gBACD,OAAO,MAAM,IAAI,EAAE,CAAC;YACtB,CAAC,CAAC;SACH;IACH,CAAC;IAED,MAAM,CAAC,OAAO;QACZ,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAA;AA9BC;IADC,IAAA,kBAAM,EAAC,eAAe,CAAC;;gDACL;AAGnB;IADC,IAAA,kBAAM,GAAE;8BACc,yBAAW;mDAAC;AALxB,cAAc;IAD1B,IAAA,sBAAU,GAAE;GACA,cAAc,CAgC1B;AAhCY,wCAAc","sourcesContent":["import {\n Config,\n Inject,\n Middleware,\n MidwayFrameworkType,\n} from '@midwayjs/decorator';\nimport { InfoService } from '../infoService';\n\n@Middleware()\nexport class InfoMiddleware {\n @Config('info.infoPath')\n protected infoPath;\n\n @Inject()\n protected infoService: InfoService;\n\n resolve(app) {\n if (app.getFrameworkType() === MidwayFrameworkType.WEB_EXPRESS) {\n return async (req: any, res: any, next: any) => {\n if (req.path === this.infoPath) {\n // return html\n res.type('html');\n res.send(this.infoService.info('html'));\n } else {\n next();\n }\n };\n } else {\n return async (ctx, next) => {\n if (ctx.path === this.infoPath) {\n // return html\n return this.infoService.info('html');\n }\n return await next();\n };\n }\n }\n\n static getName() {\n return 'info';\n }\n}\n"]}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TypeInfo } from './interface';
|
|
2
2
|
export declare function safeRequire(mod: string, defaultValue?: any): any;
|
|
3
3
|
export declare function bitToMB(bit: number): string;
|
|
4
|
-
export declare function renderToHtml(infoList: TypeInfo[]): string;
|
|
5
|
-
export declare function
|
|
4
|
+
export declare function renderToHtml(infoList: TypeInfo[], title: any): string;
|
|
5
|
+
export declare function safeContent(value?: string): string;
|
|
6
6
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.safeContent = exports.renderToHtml = exports.bitToMB = exports.safeRequire = void 0;
|
|
4
4
|
function safeRequire(mod, defaultValue) {
|
|
5
5
|
try {
|
|
6
6
|
return require(mod);
|
|
@@ -14,8 +14,8 @@ function bitToMB(bit) {
|
|
|
14
14
|
return Number((bit || 0) / 1024 / 1024).toFixed(2) + ' MB';
|
|
15
15
|
}
|
|
16
16
|
exports.bitToMB = bitToMB;
|
|
17
|
-
function renderToHtml(infoList) {
|
|
18
|
-
let html =
|
|
17
|
+
function renderToHtml(infoList, title) {
|
|
18
|
+
let html = `<div style="padding: 24px; font-size: 36px;background: #9999cb;font-weight: bold;">${title}</div>`;
|
|
19
19
|
html += infoList
|
|
20
20
|
.map(info => {
|
|
21
21
|
const infoList = Object.keys(info.info || {});
|
|
@@ -34,34 +34,22 @@ function renderToHtml(infoList) {
|
|
|
34
34
|
</style><div style="margin: 24px auto;max-width: 720px;min-width: 440px;">${html}</div>`;
|
|
35
35
|
}
|
|
36
36
|
exports.renderToHtml = renderToHtml;
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if (value instanceof RegExp) {
|
|
53
|
-
return `"${value.toString()}"`;
|
|
54
|
-
}
|
|
55
|
-
// eslint-disable-next-line no-case-declarations
|
|
56
|
-
const props = [];
|
|
57
|
-
for (const key in value) {
|
|
58
|
-
props.push(`"${key}":${safeJson(value[key])}`);
|
|
59
|
-
}
|
|
60
|
-
return `{${props.join(',')}}`;
|
|
61
|
-
case 'function':
|
|
62
|
-
return `function ${value.name}(${value.length} args)`;
|
|
37
|
+
function safeContent(value = '') {
|
|
38
|
+
if (value.length < 3) {
|
|
39
|
+
return '*'.repeat(value.length);
|
|
40
|
+
}
|
|
41
|
+
else if (value.length < 6) {
|
|
42
|
+
return value[0] + '*'.repeat(value.length - 1);
|
|
43
|
+
}
|
|
44
|
+
else if (value.length < 10) {
|
|
45
|
+
return value[0] + '*'.repeat(value.length - 2) + value[value.length - 1];
|
|
46
|
+
}
|
|
47
|
+
else if (value.length < 15) {
|
|
48
|
+
return value.slice(0, 2) + '*'.repeat(value.length - 4) + value.slice(-2);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return value.slice(0, 3) + '*'.repeat(value.length - 6) + value.slice(-3);
|
|
63
52
|
}
|
|
64
|
-
return '';
|
|
65
53
|
}
|
|
66
|
-
exports.
|
|
54
|
+
exports.safeContent = safeContent;
|
|
67
55
|
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";;;A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,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KAChD;SAAM,IAAI,KAAK,CAAC,MAAM,GAAG,EAAE,EAAE;QAC5B,OAAO,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KAC1E;SAAM,IAAI,KAAK,CAAC,MAAM,GAAG,EAAE,EAAE;QAC5B,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3E;SAAM;QACL,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3E;AACH,CAAC;AAZD,kCAYC","sourcesContent":["import { TypeInfo } from './interface';\n\nexport function safeRequire(mod: string, defaultValue?) {\n try {\n return require(mod);\n } catch (e) {\n return defaultValue;\n }\n}\n\nexport function bitToMB(bit: number): string {\n return Number((bit || 0) / 1024 / 1024).toFixed(2) + ' MB';\n}\n\nexport function renderToHtml(infoList: TypeInfo[], title): string {\n let html = `<div style=\"padding: 24px; font-size: 36px;background: #9999cb;font-weight: bold;\">${title}</div>`;\n html += infoList\n .map(info => {\n const infoList = Object.keys(info.info || {});\n return `<div class=\"infoType\">${info.type}</div>\n <table style=\"border-collapse: collapse;width: 100%;\">${infoList\n .map(infoName => {\n return `<tr style=\"border: 1px solid #666;\"><td class=\"infoName\">${infoName}</td><td class=\"infoValue\">${info.info[infoName]}</td></tr>`;\n })\n .join('')}</table>`;\n })\n .join('');\n return `<style>\n .infoType {background: #8e8dc5;margin-top: 24px;padding: 12px;font-weight: bold;font-size: 16px;}\n .infoName {font-weight:bold;vertical-align: top;background:#c2c6fc;width: 200px;word-break:break-all;padding: 12px;}\n .infoValue {vertical-align: top;background:#d8d8d8;padding: 12px;word-break:break-all;}\n </style><div style=\"margin: 24px auto;max-width: 720px;min-width: 440px;\">${html}</div>`;\n}\n\nexport function safeContent(value = '') {\n if (value.length < 3) {\n return '*'.repeat(value.length);\n } else if (value.length < 6) {\n return value[0] + '*'.repeat(value.length - 1);\n } else if (value.length < 10) {\n return value[0] + '*'.repeat(value.length - 2) + value[value.length - 1];\n } else if (value.length < 15) {\n return value.slice(0, 2) + '*'.repeat(value.length - 4) + value.slice(-2);\n } else {\n return value.slice(0, 3) + '*'.repeat(value.length - 6) + value.slice(-3);\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midwayjs/info",
|
|
3
3
|
"description": "midway info",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.3",
|
|
5
5
|
"main": "dist/index",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist/**/*.js",
|
|
9
|
-
"dist/**/*.d.ts"
|
|
9
|
+
"dist/**/*.d.ts",
|
|
10
|
+
"dist/**/*.js.map"
|
|
10
11
|
],
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"picomatch": "2.3.1"
|
|
14
|
+
},
|
|
11
15
|
"devDependencies": {
|
|
12
|
-
"@midwayjs/core": "^3.0.
|
|
13
|
-
"@midwayjs/decorator": "^3.0.
|
|
14
|
-
"@midwayjs/
|
|
15
|
-
"@midwayjs/
|
|
16
|
-
"@midwayjs/
|
|
16
|
+
"@midwayjs/core": "^3.0.2",
|
|
17
|
+
"@midwayjs/decorator": "^3.0.2",
|
|
18
|
+
"@midwayjs/express": "^3.0.2",
|
|
19
|
+
"@midwayjs/koa": "^3.0.3",
|
|
20
|
+
"@midwayjs/mock": "^3.0.2",
|
|
21
|
+
"@midwayjs/serverless-fc-starter": "^3.0.2",
|
|
22
|
+
"@midwayjs/serverless-scf-starter": "^3.0.2"
|
|
17
23
|
},
|
|
18
24
|
"keywords": [
|
|
19
25
|
"midway"
|
|
@@ -22,8 +28,8 @@
|
|
|
22
28
|
"license": "MIT",
|
|
23
29
|
"scripts": {
|
|
24
30
|
"build": "tsc",
|
|
25
|
-
"test": "node --require=ts-node/register ../../node_modules/.bin/jest",
|
|
26
|
-
"cov": "node --require=ts-node/register ../../node_modules/.bin/jest --coverage --forceExit",
|
|
31
|
+
"test": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand",
|
|
32
|
+
"cov": "node --require=ts-node/register ../../node_modules/.bin/jest --runInBand --coverage --forceExit",
|
|
27
33
|
"ci": "npm run test",
|
|
28
34
|
"lint": "mwts check"
|
|
29
35
|
},
|
|
@@ -34,5 +40,5 @@
|
|
|
34
40
|
"type": "git",
|
|
35
41
|
"url": "https://github.com/midwayjs/midway.git"
|
|
36
42
|
},
|
|
37
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "43a5971b284aa918d22d191236c5664b011f8d87"
|
|
38
44
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [3.0.0-beta.9](https://github.com/midwayjs/midway/compare/v3.0.0-beta.8...v3.0.0-beta.9) (2021-12-09)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @midwayjs/info
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# [3.0.0-beta.8](https://github.com/midwayjs/midway/compare/v3.0.0-beta.7...v3.0.0-beta.8) (2021-12-08)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @midwayjs/info
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# [3.0.0-beta.7](https://github.com/midwayjs/midway/compare/v3.0.0-beta.6...v3.0.0-beta.7) (2021-12-03)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @midwayjs/info
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
# [3.0.0-beta.6](https://github.com/midwayjs/midway/compare/v3.0.0-beta.5...v3.0.0-beta.6) (2021-11-26)
|
|
31
|
-
|
|
32
|
-
**Note:** Version bump only for package @midwayjs/info
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
# [3.0.0-beta.5](https://github.com/midwayjs/midway/compare/v3.0.0-beta.4...v3.0.0-beta.5) (2021-11-25)
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package @midwayjs/info
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
# [3.0.0-beta.4](https://github.com/midwayjs/midway/compare/v3.0.0-beta.3...v3.0.0-beta.4) (2021-11-24)
|
|
47
|
-
|
|
48
|
-
**Note:** Version bump only for package @midwayjs/info
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
# [3.0.0-beta.3](https://github.com/midwayjs/midway/compare/v3.0.0-beta.2...v3.0.0-beta.3) (2021-11-18)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
### Features
|
|
58
|
-
|
|
59
|
-
* add component and framework config definition ([#1367](https://github.com/midwayjs/midway/issues/1367)) ([b2fe615](https://github.com/midwayjs/midway/commit/b2fe6157f99659471ff1333eca0b86bb889f61a3))
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
# [3.0.0-beta.2](https://github.com/midwayjs/midway/compare/v3.0.0-beta.1...v3.0.0-beta.2) (2021-11-16)
|
|
66
|
-
|
|
67
|
-
**Note:** Version bump only for package @midwayjs/info
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
# [3.0.0-beta.1](https://github.com/midwayjs/midway/compare/v2.12.4...v3.0.0-beta.1) (2021-11-14)
|
|
74
|
-
|
|
75
|
-
**Note:** Version bump only for package @midwayjs/info
|