@fastcar/core 0.2.53 → 0.2.55
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/annotation.d.ts +3 -0
- package/db.d.ts +2 -0
- package/package.json +1 -1
- package/src/FastCarApplication.ts +1 -0
- package/src/annotation/data/Table.ts +4 -3
- package/src/annotation/valid/CustomType.ts +9 -0
- package/src/annotation.ts +2 -0
- package/src/constant/FastCarMetaData.ts +1 -0
- package/target/FastCarApplication.js +1 -0
- package/target/annotation/data/Table.js +3 -2
- package/target/annotation/valid/CustomType.js +11 -0
- package/target/annotation.js +4 -1
- package/target/constant/FastCarMetaData.js +1 -0
- package/test/example/logs/fastcar-server.sys.log +3 -15
- package/test/example/logs/other-server.sys.log +0 -25
- package/test/example/logs/other-server.sys1.log +0 -12
- package/test/example/logs/other-server.sys2.log +0 -15
- package/test/example/logs/other-server.sys3.log +6 -0
- package/test/example/logs/other-server.sys6.log +2 -0
- package/test/example/resource/hello.yml +1 -1
- package/test/example/simple/app.ts +10 -0
- package/test/example/simple/config/HotConfig.ts +10 -0
- package/test/example/logs/fastcar-server.logger.log +0 -9
- package/test/example/logs/fastcar-server.logger1.log +0 -9
- package/test/example/logs/fastcar-server.sys1.log +0 -15
- package/test/example/logs/fastcar-server.sys2.log +0 -2
- package/test/example/logs/fastcar-server.sys3.log +0 -9
- package/test/example/logs/fastcar-server.sys4.log +0 -1
- package/test/example/logs/other-server.logger.log +0 -3
- package/test/example/logs/sys1.log +0 -0
- package/test/example/logs/sys10.log +0 -0
- package/test/example/logs/sys11.log +0 -0
- package/test/example/logs/sys2.log +0 -0
- package/test/example/logs/sys3.log +0 -0
- package/test/example/logs/sys4.log +0 -0
- package/test/example/logs/sys5.log +0 -0
- package/test/example/logs/sys6.log +0 -0
- package/test/example/logs/sys7.log +0 -0
- package/test/example/logs/sys8.log +0 -0
- package/test/example/logs/sys9.log +0 -0
- /package/test/example/logs/{fastcar-server.app.log → other-server.sys4.log} +0 -0
- /package/test/example/logs/{sys.log → other-server.sys5.log} +0 -0
package/annotation.d.ts
CHANGED
package/db.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -5,23 +5,24 @@ import { MapperType } from "../../type/MapperType";
|
|
|
5
5
|
|
|
6
6
|
//表名称 不缺省
|
|
7
7
|
export default function Table(name: string) {
|
|
8
|
-
return function(target: any) {
|
|
8
|
+
return function (target: any) {
|
|
9
9
|
const proto = target.prototype;
|
|
10
10
|
let fields: Set<string> = Reflect.getOwnMetadata(DesignMeta.fieldMap, proto);
|
|
11
11
|
let mappingMap = new Map<string, MapperType>();
|
|
12
12
|
let dbFields = new Map<string, string>();
|
|
13
13
|
|
|
14
|
-
fields.forEach(c => {
|
|
14
|
+
fields.forEach((c) => {
|
|
15
15
|
let tsType = Reflect.getOwnMetadata(FastCarMetaData.designType, proto, c);
|
|
16
16
|
let field = Reflect.getOwnMetadata(DesignMeta.field, proto, c) || c;
|
|
17
17
|
let dbType = Reflect.getOwnMetadata(DesignMeta.dbType, proto, c) || "varchar";
|
|
18
18
|
let primaryKey = !!Reflect.getOwnMetadata(DesignMeta.primaryKey, proto, c);
|
|
19
19
|
|
|
20
20
|
let tsName: string = tsType.name;
|
|
21
|
+
let customeType = Reflect.getOwnMetadata(FastCarMetaData.CustomType, proto, c);
|
|
21
22
|
|
|
22
23
|
const m: MapperType = {
|
|
23
24
|
name: c, //变量名称
|
|
24
|
-
type: tsName.toLowerCase(), //ts类型
|
|
25
|
+
type: customeType || tsName.toLowerCase(), //ts类型
|
|
25
26
|
field, //数据库列名
|
|
26
27
|
dbType: dbType, //数据类型
|
|
27
28
|
primaryKey, //是否为主键 默认为false
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "reflect-metadata";
|
|
2
|
+
import { FastCarMetaData } from "../../constant/FastCarMetaData";
|
|
3
|
+
|
|
4
|
+
//自定义类型
|
|
5
|
+
export default function CustomType(name: string) {
|
|
6
|
+
return function (target: any, propertyKey: string) {
|
|
7
|
+
Reflect.defineMetadata(FastCarMetaData.CustomType, name, target, propertyKey);
|
|
8
|
+
};
|
|
9
|
+
}
|
package/src/annotation.ts
CHANGED
|
@@ -48,6 +48,7 @@ import ApplicationSetting from "./annotation/env/ApplicationSetting";
|
|
|
48
48
|
import AliasInjection from "./annotation/bind/AliasInjection";
|
|
49
49
|
import ResourcePath from "./annotation/env/ResourcePath";
|
|
50
50
|
import BaseName from "./annotation/env/BaseName";
|
|
51
|
+
import CustomType from "./annotation/valid/CustomType";
|
|
51
52
|
|
|
52
53
|
//注解暴露出去
|
|
53
54
|
export {
|
|
@@ -87,6 +88,7 @@ export {
|
|
|
87
88
|
ValidForm,
|
|
88
89
|
Rule,
|
|
89
90
|
ResourcePath,
|
|
91
|
+
CustomType,
|
|
90
92
|
};
|
|
91
93
|
|
|
92
94
|
export {
|
|
@@ -10,15 +10,16 @@ function Table(name) {
|
|
|
10
10
|
let fields = Reflect.getOwnMetadata(DesignMeta_1.DesignMeta.fieldMap, proto);
|
|
11
11
|
let mappingMap = new Map();
|
|
12
12
|
let dbFields = new Map();
|
|
13
|
-
fields.forEach(c => {
|
|
13
|
+
fields.forEach((c) => {
|
|
14
14
|
let tsType = Reflect.getOwnMetadata(FastCarMetaData_1.FastCarMetaData.designType, proto, c);
|
|
15
15
|
let field = Reflect.getOwnMetadata(DesignMeta_1.DesignMeta.field, proto, c) || c;
|
|
16
16
|
let dbType = Reflect.getOwnMetadata(DesignMeta_1.DesignMeta.dbType, proto, c) || "varchar";
|
|
17
17
|
let primaryKey = !!Reflect.getOwnMetadata(DesignMeta_1.DesignMeta.primaryKey, proto, c);
|
|
18
18
|
let tsName = tsType.name;
|
|
19
|
+
let customeType = Reflect.getOwnMetadata(FastCarMetaData_1.FastCarMetaData.CustomType, proto, c);
|
|
19
20
|
const m = {
|
|
20
21
|
name: c,
|
|
21
|
-
type: tsName.toLowerCase(),
|
|
22
|
+
type: customeType || tsName.toLowerCase(),
|
|
22
23
|
field,
|
|
23
24
|
dbType: dbType,
|
|
24
25
|
primaryKey, //是否为主键 默认为false
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
require("reflect-metadata");
|
|
4
|
+
const FastCarMetaData_1 = require("../../constant/FastCarMetaData");
|
|
5
|
+
//自定义类型
|
|
6
|
+
function CustomType(name) {
|
|
7
|
+
return function (target, propertyKey) {
|
|
8
|
+
Reflect.defineMetadata(FastCarMetaData_1.FastCarMetaData.CustomType, name, target, propertyKey);
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
exports.default = CustomType;
|
package/target/annotation.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.BaseName = exports.BasePath = exports.BaseFilePath = exports.ENV = exports.Transactional = exports.SqlSession = exports.Entity = exports.Table = exports.PrimaryKey = exports.Field = exports.DBType = exports.DSIndex = exports.DS = exports.CustomType = exports.ResourcePath = exports.Rule = exports.ValidForm = exports.ValidCustom = exports.Type = exports.Size = exports.NotNull = exports.DefaultVal = exports.AddChildValid = exports.AddRequireModule = exports.Log = exports.Readonly = exports.Override = exports.NotImplemented = exports.Deprecate = exports.ExceptionMonitor = exports.AliasInjection = exports.CallDependency = exports.Autowired = exports.Application = exports.Injection = exports.Repository = exports.Service = exports.Controller = exports.Configure = exports.BeanName = exports.Hotter = exports.ComponentInjection = exports.Component = exports.ComponentScanExclusion = exports.ComponentScan = exports.ApplicationDestory = exports.ApplicationInit = exports.ApplicationRunner = exports.ApplicationStop = exports.ApplicationStart = void 0;
|
|
4
|
+
exports.ApplicationSetting = void 0;
|
|
4
5
|
const Application_1 = require("./annotation/Application");
|
|
5
6
|
exports.Application = Application_1.default;
|
|
6
7
|
const Autowired_1 = require("./annotation/bind/Autowired");
|
|
@@ -101,3 +102,5 @@ const ResourcePath_1 = require("./annotation/env/ResourcePath");
|
|
|
101
102
|
exports.ResourcePath = ResourcePath_1.default;
|
|
102
103
|
const BaseName_1 = require("./annotation/env/BaseName");
|
|
103
104
|
exports.BaseName = BaseName_1.default;
|
|
105
|
+
const CustomType_1 = require("./annotation/valid/CustomType");
|
|
106
|
+
exports.CustomType = CustomType_1.default;
|
|
@@ -26,4 +26,5 @@ var FastCarMetaData;
|
|
|
26
26
|
FastCarMetaData["Alias"] = "alias";
|
|
27
27
|
FastCarMetaData["LoggerModule"] = "LoggerModule";
|
|
28
28
|
FastCarMetaData["HotterSysConfig"] = "hotterSysConfig";
|
|
29
|
+
FastCarMetaData["CustomType"] = "custom:type";
|
|
29
30
|
})(FastCarMetaData = exports.FastCarMetaData || (exports.FastCarMetaData = {}));
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
{"timestamp":"2023-
|
|
2
|
-
{"timestamp":"2023-
|
|
3
|
-
{"timestamp":"2023-
|
|
4
|
-
{"timestamp":"2023-07-24 16:49:39.912","level":"INFO","label":"fastcar-server.sys","message":"start server app is run"}
|
|
5
|
-
{"timestamp":"2023-07-24 16:49:40.384","level":"INFO","label":"fastcar-server.sys","message":"version 1.0.0"}
|
|
6
|
-
{"timestamp":"2023-07-24 16:49:45.679","level":"INFO","label":"fastcar-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
7
|
-
{"timestamp":"2023-07-24 16:49:45.680","level":"INFO","label":"fastcar-server.sys","message":"Call the method before the application stops"}
|
|
8
|
-
{"timestamp":"2023-07-24 16:49:50.692","level":"INFO","label":"fastcar-server.sys","message":"application stop"}
|
|
9
|
-
{"timestamp":"2023-10-11 09:56:00.162","level":"INFO","label":"fastcar-server.sys","message":"Start scanning component"}
|
|
10
|
-
{"timestamp":"2023-10-11 09:56:00.285","level":"INFO","label":"fastcar-server.sys","message":"Complete component scan"}
|
|
11
|
-
{"timestamp":"2023-10-11 09:56:00.287","level":"INFO","label":"fastcar-server.sys","message":"Call application initialization method"}
|
|
12
|
-
{"timestamp":"2023-10-11 09:56:00.290","level":"INFO","label":"fastcar-server.sys","message":"start server app is run"}
|
|
13
|
-
{"timestamp":"2023-10-11 09:56:00.290","level":"INFO","label":"fastcar-server.sys","message":"version 1.0.0"}
|
|
14
|
-
{"timestamp":"2023-10-11 09:56:02.325","level":"INFO","label":"fastcar-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
15
|
-
{"timestamp":"2023-10-11 09:56:02.326","level":"INFO","label":"fastcar-server.sys","message":"Call the method before the application stops"}
|
|
1
|
+
{"timestamp":"2023-12-12 17:19:09.403","level":"INFO","label":"fastcar-server.sys","message":"Start scanning component"}
|
|
2
|
+
{"timestamp":"2023-12-12 17:27:52.139","level":"INFO","label":"fastcar-server.sys","message":"Start scanning component"}
|
|
3
|
+
{"timestamp":"2023-12-12 17:30:11.153","level":"INFO","label":"fastcar-server.sys","message":"Start scanning component"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{"timestamp":"2023-10-25 14:35:59.689","level":"INFO","label":"other-server.sys","message":"Start scanning component"}
|
|
2
|
-
{"timestamp":"2023-10-25 14:36:26.34","level":"INFO","label":"other-server.sys","message":"Start scanning component"}
|
|
3
|
-
{"timestamp":"2023-10-25 14:36:33.799","level":"INFO","label":"other-server.sys","message":"Start scanning component"}
|
|
4
|
-
{"timestamp":"2023-10-25 14:36:34.84","level":"INFO","label":"other-server.sys","message":"Complete component scan"}
|
|
5
|
-
{"timestamp":"2023-10-25 14:36:34.86","level":"INFO","label":"other-server.sys","message":"Call application initialization method"}
|
|
6
|
-
{"timestamp":"2023-10-25 14:36:34.89","level":"INFO","label":"other-server.sys","message":"start server app is run"}
|
|
7
|
-
{"timestamp":"2023-10-25 14:36:34.90","level":"INFO","label":"other-server.sys","message":"version 1.0.0"}
|
|
8
|
-
{"timestamp":"2023-10-25 14:36:34.105","level":"INFO","label":"other-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
9
|
-
{"timestamp":"2023-10-25 14:36:34.106","level":"INFO","label":"other-server.sys","message":"Call the method before the application stops"}
|
|
10
|
-
{"timestamp":"2023-10-25 14:36:39.118","level":"INFO","label":"other-server.sys","message":"application stop"}
|
|
11
|
-
{"timestamp":"2023-10-25 14:41:43.901","level":"INFO","label":"other-server.sys","message":"Start scanning component"}
|
|
12
|
-
{"timestamp":"2023-10-25 14:41:44.189","level":"INFO","label":"other-server.sys","message":"Complete component scan"}
|
|
13
|
-
{"timestamp":"2023-10-25 14:41:44.191","level":"INFO","label":"other-server.sys","message":"Call application initialization method"}
|
|
14
|
-
{"timestamp":"2023-10-25 14:41:44.193","level":"INFO","label":"other-server.sys","message":"start server app is run"}
|
|
15
|
-
{"timestamp":"2023-10-25 14:41:44.194","level":"INFO","label":"other-server.sys","message":"version 1.0.0"}
|
|
16
|
-
{"timestamp":"2023-10-25 14:41:44.199","level":"INFO","label":"other-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
17
|
-
{"timestamp":"2023-10-25 14:41:44.199","level":"INFO","label":"other-server.sys","message":"Call the method before the application stops"}
|
|
18
|
-
{"timestamp":"2023-10-25 14:41:49.209","level":"INFO","label":"other-server.sys","message":"application stop"}
|
|
19
|
-
{"timestamp":"2023-10-25 14:42:25.346","level":"INFO","label":"other-server.sys","message":"Start scanning component"}
|
|
20
|
-
{"timestamp":"2023-10-25 14:42:25.643","level":"INFO","label":"other-server.sys","message":"Complete component scan"}
|
|
21
|
-
{"timestamp":"2023-10-25 14:42:25.645","level":"INFO","label":"other-server.sys","message":"Call application initialization method"}
|
|
22
|
-
{"timestamp":"2023-10-25 14:42:25.647","level":"INFO","label":"other-server.sys","message":"start server app is run"}
|
|
23
|
-
{"timestamp":"2023-10-25 14:42:25.648","level":"INFO","label":"other-server.sys","message":"version 1.0.0"}
|
|
24
|
-
{"timestamp":"2023-10-25 14:42:25.684","level":"INFO","label":"other-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
25
|
-
{"timestamp":"2023-10-25 14:42:25.685","level":"INFO","label":"other-server.sys","message":"Call the method before the application stops"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{"timestamp":"2023-10-25 14:35:31.960","level":"INFO","label":"other-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
2
|
-
{"timestamp":"2023-10-25 14:35:31.961","level":"INFO","label":"other-server.sys","message":"Call the method before the application stops"}
|
|
3
|
-
{"timestamp":"2023-10-25 14:35:31.961","level":"INFO","label":"other-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
4
|
-
{"timestamp":"2023-10-25 14:35:31.962","level":"INFO","label":"other-server.sys","message":"Call the method before the application stops"}
|
|
5
|
-
{"timestamp":"2023-10-25 14:41:29.283","level":"INFO","label":"other-server.sys","message":"Start scanning component"}
|
|
6
|
-
{"timestamp":"2023-10-25 14:41:29.625","level":"INFO","label":"other-server.sys","message":"Complete component scan"}
|
|
7
|
-
{"timestamp":"2023-10-25 14:41:29.626","level":"INFO","label":"other-server.sys","message":"Call application initialization method"}
|
|
8
|
-
{"timestamp":"2023-10-25 14:41:29.629","level":"INFO","label":"other-server.sys","message":"start server app is run"}
|
|
9
|
-
{"timestamp":"2023-10-25 14:41:29.630","level":"INFO","label":"other-server.sys","message":"version 1.0.0"}
|
|
10
|
-
{"timestamp":"2023-10-25 14:41:29.647","level":"INFO","label":"other-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
11
|
-
{"timestamp":"2023-10-25 14:41:29.648","level":"INFO","label":"other-server.sys","message":"Call the method before the application stops"}
|
|
12
|
-
{"timestamp":"2023-10-25 14:41:34.666","level":"INFO","label":"other-server.sys","message":"application stop"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{"timestamp":"2023-10-25 14:46:34.128","level":"INFO","label":"other-server.sys","message":"Start scanning component"}
|
|
2
|
-
{"timestamp":"2023-10-25 14:46:34.462","level":"INFO","label":"other-server.sys","message":"Complete component scan"}
|
|
3
|
-
{"timestamp":"2023-10-25 14:46:34.463","level":"INFO","label":"other-server.sys","message":"Call application initialization method"}
|
|
4
|
-
{"timestamp":"2023-10-25 14:46:34.466","level":"INFO","label":"other-server.sys","message":"start server app is run"}
|
|
5
|
-
{"timestamp":"2023-10-25 14:46:34.467","level":"INFO","label":"other-server.sys","message":"version 1.0.0"}
|
|
6
|
-
{"timestamp":"2023-10-25 14:46:34.471","level":"INFO","label":"other-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
7
|
-
{"timestamp":"2023-10-25 14:46:34.472","level":"INFO","label":"other-server.sys","message":"Call the method before the application stops"}
|
|
8
|
-
{"timestamp":"2023-10-25 14:46:39.478","level":"INFO","label":"other-server.sys","message":"application stop"}
|
|
9
|
-
{"timestamp":"2023-10-25 14:46:55.210","level":"INFO","label":"other-server.sys","message":"Start scanning component"}
|
|
10
|
-
{"timestamp":"2023-10-25 14:46:55.494","level":"INFO","label":"other-server.sys","message":"Complete component scan"}
|
|
11
|
-
{"timestamp":"2023-10-25 14:46:55.497","level":"INFO","label":"other-server.sys","message":"Call application initialization method"}
|
|
12
|
-
{"timestamp":"2023-10-25 14:46:55.500","level":"INFO","label":"other-server.sys","message":"start server app is run"}
|
|
13
|
-
{"timestamp":"2023-10-25 14:46:55.501","level":"INFO","label":"other-server.sys","message":"version 1.0.0"}
|
|
14
|
-
{"timestamp":"2023-10-25 14:46:55.507","level":"INFO","label":"other-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
15
|
-
{"timestamp":"2023-10-25 14:46:55.508","level":"INFO","label":"other-server.sys","message":"Call the method before the application stops"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{"timestamp":"2023-12-12 17:28:02.565","level":"INFO","label":"other-server.sys","message":"hot update---D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\config\\HotConfig.ts"}
|
|
2
|
+
{"timestamp":"2023-12-12 17:28:02.568","level":"INFO","label":"other-server.sys","message":"hot update---D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\config\\HotConfig.ts"}
|
|
3
|
+
{"timestamp":"2023-12-12 17:28:15.591","level":"INFO","label":"other-server.sys","message":"hot update---D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\config\\HotConfig.ts"}
|
|
4
|
+
{"timestamp":"2023-12-12 17:28:15.595","level":"INFO","label":"other-server.sys","message":"hot update---D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\config\\HotConfig.ts"}
|
|
5
|
+
{"timestamp":"2023-12-12 17:29:27.969","level":"INFO","label":"other-server.sys","message":"hot update---D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\config\\HotConfig.ts"}
|
|
6
|
+
{"timestamp":"2023-12-12 17:29:50.728","level":"INFO","label":"other-server.sys","message":"hot update---D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\config\\HotConfig.ts"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
{"timestamp":"2023-12-12 17:30:21.379","level":"INFO","label":"other-server.sys","message":"hot update---D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\config\\HotConfig.ts"}
|
|
2
|
+
{"timestamp":"2023-12-12 17:30:21.382","level":"INFO","label":"other-server.sys","message":"hot update---D:\\code\\fast-car\\fast-car\\fastcar-core\\test\\example\\simple\\config\\HotConfig.ts"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
hello: "
|
|
1
|
+
hello: "worlds"
|
|
@@ -50,6 +50,8 @@ let appInsatcne = new APP();
|
|
|
50
50
|
import EnvConfig from "./config/EnvConfig";
|
|
51
51
|
import CallService from "./service/CallService";
|
|
52
52
|
import NotFoundController from "./controller/NotFoundController";
|
|
53
|
+
import HotConfig from "./config/HotConfig";
|
|
54
|
+
import HelloConfig from "./config/HelloConfig";
|
|
53
55
|
|
|
54
56
|
describe("程序应用测试", () => {
|
|
55
57
|
it("获取配置", () => {
|
|
@@ -99,4 +101,12 @@ describe("程序应用测试", () => {
|
|
|
99
101
|
appInsatcne.app.getLogger().error(e);
|
|
100
102
|
}
|
|
101
103
|
});
|
|
104
|
+
it("热更新配置解析", () => {
|
|
105
|
+
setInterval(() => {
|
|
106
|
+
let hotConfig: HotConfig = appInsatcne.app.getComponentByTarget(HotConfig);
|
|
107
|
+
let helloConfig: HelloConfig = appInsatcne.app.getComponentByTarget(HelloConfig);
|
|
108
|
+
console.log("热更新配置", hotConfig.hello);
|
|
109
|
+
console.log("不变的配置", helloConfig.hello);
|
|
110
|
+
}, 1000);
|
|
111
|
+
});
|
|
102
112
|
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{"timestamp":"2023-07-24 16:49:43.665","level":"INFO","label":"fastcar-server.logger","message":"自定义的日志输出"}
|
|
2
|
-
{"timestamp":"2023-07-24 16:49:43.666","level":"WARN","label":"fastcar-server.logger","message":"自定义警告"}
|
|
3
|
-
{"timestamp":"2023-07-24 16:49:43.667","level":"ERROR","label":"fastcar-server.logger","message":"自定义报错"}
|
|
4
|
-
{"timestamp":"2023-10-11 09:56:00.302","level":"INFO","label":"fastcar-server.logger","message":"自定义的日志输出"}
|
|
5
|
-
{"timestamp":"2023-10-11 09:56:00.304","level":"WARN","label":"fastcar-server.logger","message":"自定义警告"}
|
|
6
|
-
{"timestamp":"2023-10-11 09:56:00.305","level":"ERROR","label":"fastcar-server.logger","message":"自定义报错"}
|
|
7
|
-
{"timestamp":"2023-10-25 14:34:00.264","level":"INFO","label":"fastcar-server.logger","message":"自定义的日志输出"}
|
|
8
|
-
{"timestamp":"2023-10-25 14:34:00.265","level":"WARN","label":"fastcar-server.logger","message":"自定义警告"}
|
|
9
|
-
{"timestamp":"2023-10-25 14:34:00.267","level":"ERROR","label":"fastcar-server.logger","message":"自定义报错"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{"timestamp":"2023-10-25 14:35:19.238","level":"INFO","label":"fastcar-server.logger","message":"自定义的日志输出"}
|
|
2
|
-
{"timestamp":"2023-10-25 14:35:19.239","level":"WARN","label":"fastcar-server.logger","message":"自定义警告"}
|
|
3
|
-
{"timestamp":"2023-10-25 14:35:19.240","level":"ERROR","label":"fastcar-server.logger","message":"自定义报错"}
|
|
4
|
-
{"timestamp":"2023-10-25 14:35:59.908","level":"INFO","label":"fastcar-server.logger","message":"自定义的日志输出"}
|
|
5
|
-
{"timestamp":"2023-10-25 14:35:59.909","level":"WARN","label":"fastcar-server.logger","message":"自定义警告"}
|
|
6
|
-
{"timestamp":"2023-10-25 14:35:59.910","level":"ERROR","label":"fastcar-server.logger","message":"自定义报错"}
|
|
7
|
-
{"timestamp":"2023-10-25 14:36:26.263","level":"INFO","label":"fastcar-server.logger","message":"自定义的日志输出"}
|
|
8
|
-
{"timestamp":"2023-10-25 14:36:26.264","level":"WARN","label":"fastcar-server.logger","message":"自定义警告"}
|
|
9
|
-
{"timestamp":"2023-10-25 14:36:26.265","level":"ERROR","label":"fastcar-server.logger","message":"自定义报错"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{"timestamp":"2023-10-11 09:56:07.330","level":"INFO","label":"fastcar-server.sys","message":"application stop"}
|
|
2
|
-
{"timestamp":"2023-10-25 14:34:00.90","level":"INFO","label":"fastcar-server.sys","message":"Start scanning component"}
|
|
3
|
-
{"timestamp":"2023-10-25 14:34:00.248","level":"INFO","label":"fastcar-server.sys","message":"Complete component scan"}
|
|
4
|
-
{"timestamp":"2023-10-25 14:34:00.250","level":"INFO","label":"fastcar-server.sys","message":"Call application initialization method"}
|
|
5
|
-
{"timestamp":"2023-10-25 14:34:00.252","level":"INFO","label":"fastcar-server.sys","message":"start server app is run"}
|
|
6
|
-
{"timestamp":"2023-10-25 14:34:00.253","level":"INFO","label":"fastcar-server.sys","message":"version 1.0.0"}
|
|
7
|
-
{"timestamp":"2023-10-25 14:34:02.279","level":"INFO","label":"fastcar-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
8
|
-
{"timestamp":"2023-10-25 14:34:02.280","level":"INFO","label":"fastcar-server.sys","message":"Call the method before the application stops"}
|
|
9
|
-
{"timestamp":"2023-10-25 14:35:19.73","level":"INFO","label":"fastcar-server.sys","message":"Start scanning component"}
|
|
10
|
-
{"timestamp":"2023-10-25 14:35:19.226","level":"INFO","label":"fastcar-server.sys","message":"Complete component scan"}
|
|
11
|
-
{"timestamp":"2023-10-25 14:35:19.228","level":"INFO","label":"fastcar-server.sys","message":"Call application initialization method"}
|
|
12
|
-
{"timestamp":"2023-10-25 14:35:19.230","level":"INFO","label":"fastcar-server.sys","message":"start server app is run"}
|
|
13
|
-
{"timestamp":"2023-10-25 14:35:19.231","level":"INFO","label":"fastcar-server.sys","message":"version 1.0.0"}
|
|
14
|
-
{"timestamp":"2023-10-25 14:35:21.260","level":"INFO","label":"fastcar-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
15
|
-
{"timestamp":"2023-10-25 14:35:21.262","level":"INFO","label":"fastcar-server.sys","message":"Call the method before the application stops"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{"timestamp":"2023-10-25 14:36:01.919","level":"INFO","label":"fastcar-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
2
|
-
{"timestamp":"2023-10-25 14:36:01.920","level":"INFO","label":"fastcar-server.sys","message":"Call the method before the application stops"}
|
|
3
|
-
{"timestamp":"2023-10-25 14:36:01.920","level":"INFO","label":"fastcar-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
4
|
-
{"timestamp":"2023-10-25 14:36:01.921","level":"INFO","label":"fastcar-server.sys","message":"Call the method before the application stops"}
|
|
5
|
-
{"timestamp":"2023-10-25 14:36:06.933","level":"INFO","label":"fastcar-server.sys","message":"application stop"}
|
|
6
|
-
{"timestamp":"2023-10-25 14:36:28.275","level":"INFO","label":"fastcar-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
7
|
-
{"timestamp":"2023-10-25 14:36:28.275","level":"INFO","label":"fastcar-server.sys","message":"Call the method before the application stops"}
|
|
8
|
-
{"timestamp":"2023-10-25 14:36:28.276","level":"INFO","label":"fastcar-server.sys","message":"exit reason","splat":"[\"beforeExit exit\"]"}
|
|
9
|
-
{"timestamp":"2023-10-25 14:36:28.277","level":"INFO","label":"fastcar-server.sys","message":"Call the method before the application stops"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"timestamp":"2023-10-25 14:36:33.280","level":"INFO","label":"fastcar-server.sys","message":"application stop"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
{"timestamp":"2023-10-25 14:35:29.943","level":"INFO","label":"other-server.logger","message":"自定义的日志输出"}
|
|
2
|
-
{"timestamp":"2023-10-25 14:35:29.944","level":"WARN","label":"other-server.logger","message":"自定义警告"}
|
|
3
|
-
{"timestamp":"2023-10-25 14:35:29.945","level":"ERROR","label":"other-server.logger","message":"自定义报错"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|