@fastcar/core 0.2.64 → 0.3.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/README.md +5 -2
- package/annotation.d.ts +3 -0
- package/index.d.ts +57 -50
- package/package.json +4 -4
- package/src/FastCarApplication.ts +184 -123
- package/src/annotation/Application.ts +3 -1
- package/src/annotation/bind/AddInjectionService.ts +17 -0
- package/src/annotation/bind/AddRequireModule.ts +1 -1
- package/src/annotation/bind/AliasInjection.ts +8 -15
- package/src/annotation/bind/Autowired.ts +1 -1
- package/src/annotation/bind/CallDependency.ts +7 -17
- package/src/annotation/bind/DemandInjection.ts +16 -0
- package/src/annotation/stereotype/Log.ts +13 -9
- package/src/annotation/stereotype/Value.ts +5 -0
- package/src/annotation.ts +2 -0
- package/src/constant/FastCarMetaData.ts +2 -0
- package/src/model/WinstonLogger.ts +1 -1
- package/src/type/ClassConstructor.ts +5 -0
- package/src/type/ComponentDesc.ts +13 -0
- package/src/type/FileHotterDesc.ts +6 -0
- package/src/utils/ClassLoader.ts +2 -1
- package/target/FastCarApplication.js +764 -708
- package/target/annotation/Application.js +46 -45
- package/target/annotation/ExceptionMonitor.js +16 -16
- package/target/annotation/bind/AddInjectionService.js +16 -0
- package/target/annotation/bind/AddRequireModule.js +21 -21
- package/target/annotation/bind/AliasInjection.js +19 -23
- package/target/annotation/bind/Autowired.js +13 -13
- package/target/annotation/bind/CallDependency.js +16 -23
- package/target/annotation/bind/DemandInjection.js +15 -0
- package/target/annotation/data/DBType.js +11 -11
- package/target/annotation/data/DS.js +54 -54
- package/target/annotation/data/DSIndex.js +9 -9
- package/target/annotation/data/Entity.js +10 -10
- package/target/annotation/data/Field.js +18 -18
- package/target/annotation/data/PrimaryKey.js +9 -9
- package/target/annotation/data/SqlSession.js +9 -9
- package/target/annotation/data/Table.js +35 -35
- package/target/annotation/data/Transactional.js +52 -52
- package/target/annotation/env/ApplicationSetting.js +25 -25
- package/target/annotation/env/BaseFilePath.js +14 -14
- package/target/annotation/env/BaseName.js +9 -9
- package/target/annotation/env/BasePath.js +14 -14
- package/target/annotation/env/ENV.js +10 -10
- package/target/annotation/env/ResourcePath.js +9 -9
- package/target/annotation/lifeCycle/AddLifeCycleItem.js +17 -18
- package/target/annotation/lifeCycle/ApplicationDestory.js +15 -15
- package/target/annotation/lifeCycle/ApplicationInit.js +15 -15
- package/target/annotation/lifeCycle/ApplicationRunner.js +7 -7
- package/target/annotation/lifeCycle/ApplicationStart.js +24 -24
- package/target/annotation/lifeCycle/ApplicationStop.js +20 -20
- package/target/annotation/property/Deprecate.js +19 -19
- package/target/annotation/property/NotImplemented.js +8 -8
- package/target/annotation/property/Override.js +7 -7
- package/target/annotation/property/Readonly.js +16 -16
- package/target/annotation/scan/ComponentInjection.js +21 -21
- package/target/annotation/scan/ComponentScan.js +9 -9
- package/target/annotation/scan/ComponentScanExclusion.js +25 -25
- package/target/annotation/scan/ComponentScanMust.js +25 -25
- package/target/annotation/scan/Hotter.js +8 -8
- package/target/annotation/stereotype/BeanName.js +11 -11
- package/target/annotation/stereotype/Component.js +8 -8
- package/target/annotation/stereotype/Configure.js +14 -14
- package/target/annotation/stereotype/Controller.js +9 -9
- package/target/annotation/stereotype/Injection.js +12 -12
- package/target/annotation/stereotype/Log.js +19 -17
- package/target/annotation/stereotype/Repository.js +9 -9
- package/target/annotation/stereotype/Service.js +9 -9
- package/target/annotation/stereotype/Value.js +5 -0
- package/target/annotation/valid/AddChildValid.js +56 -56
- package/target/annotation/valid/CustomType.js +11 -11
- package/target/annotation/valid/DefaultVal.js +10 -10
- package/target/annotation/valid/NotNull.js +8 -8
- package/target/annotation/valid/Rule.js +99 -100
- package/target/annotation/valid/Size.js +10 -10
- package/target/annotation/valid/Type.js +10 -10
- package/target/annotation/valid/ValidCustom.js +17 -17
- package/target/annotation/valid/ValidForm.js +133 -133
- package/target/annotation.js +110 -108
- package/target/config/ApplicationConfig.js +2 -2
- package/target/config/SysConfig.js +19 -19
- package/target/constant/AppStatusEnum.js +9 -9
- package/target/constant/BootPriority.js +11 -11
- package/target/constant/CommonConstant.js +18 -18
- package/target/constant/ComponentKind.js +11 -11
- package/target/constant/DataTypes.js +19 -19
- package/target/constant/FastCarMetaData.js +33 -31
- package/target/constant/LifeCycleModule.js +9 -9
- package/target/db.js +49 -49
- package/target/index.js +21 -21
- package/target/interface/ApplicationHook.js +2 -2
- package/target/interface/ApplicationInterface.js +2 -2
- package/target/interface/ApplicationRunnerService.js +2 -2
- package/target/interface/DataSourceManager.js +2 -2
- package/target/interface/Logger.js +5 -5
- package/target/model/BaseMapper.js +103 -98
- package/target/model/DataMap.js +87 -87
- package/target/model/FormRuleModel.js +2 -2
- package/target/model/ValidError.js +5 -5
- package/target/model/WinstonLogger.js +98 -96
- package/target/type/ClassConstructor.js +2 -0
- package/target/type/ComponentDesc.js +9 -2
- package/target/type/DesignMeta.js +15 -15
- package/target/type/FileHotterDesc.js +9 -2
- package/target/type/MapperType.js +2 -2
- package/target/type/ProcessType.js +2 -2
- package/target/type/SqlError.js +5 -5
- package/target/type/WinstonLoggerType.js +9 -9
- package/target/utils/ClassLoader.js +66 -65
- package/target/utils/ClassUtils.js +35 -35
- package/target/utils/CryptoUtil.js +86 -86
- package/target/utils/DataFormat.js +88 -88
- package/target/utils/DateUtil.js +71 -71
- package/target/utils/FileUtil.js +153 -153
- package/target/utils/FormatStr.js +14 -14
- package/target/utils/IPUtils.js +34 -34
- package/target/utils/Id.js +8 -9
- package/target/utils/Mix.js +62 -62
- package/target/utils/ReflectUtil.js +22 -22
- package/target/utils/TypeUtil.js +53 -53
- package/target/utils/ValidationUtil.js +123 -123
- package/target/utils.js +25 -25
- package/test/example/logs/fastcar-server.app.log +0 -0
- package/test/example/logs/fastcar-server.sys.log +10 -0
- package/test/example/logs/fastcar-server.sys1.log +8 -0
- package/test/example/logs/fastcar-server.sys2.log +11 -0
- package/test/example/logs/fastcar-server.sys3.log +0 -0
- package/test/example/logs/other-server.app.log +0 -0
- package/test/example/logs/other-server.sys.log +5 -0
- package/test/example/logs/sys.log +0 -0
- package/test/example/logs/sys1.log +0 -0
- package/test/example/resource/application.yml +2 -0
- package/test/example/resource/hello.yml +1 -1
- package/test/example/simple/app-test.ts +2 -1
- package/test/example/simple/app.ts +16 -16
- package/test/example/simple/service/CallService.ts +2 -0
- package/test/example/simple/service/HelloService.ts +2 -0
- package/test/unit/sys2.log +6 -0
- package/test/unit/sys3.log +6 -0
- package/test/unit/sys4.log +6 -0
- package/test/unit/sys5.log +6 -0
- package/test/unit/sys6.log +6 -0
package/target/utils/TypeUtil.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const FileUtil_1 = require("./FileUtil");
|
|
4
|
-
const BasicTypes = ["boolean", "number", "string"];
|
|
5
|
-
class TypeUtil {
|
|
6
|
-
static isFunction(f) {
|
|
7
|
-
let typeName = typeof f;
|
|
8
|
-
return typeName == "function";
|
|
9
|
-
}
|
|
10
|
-
static isClass(f) {
|
|
11
|
-
if (f.prototype === undefined) {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
if (!f.prototype.constructor) {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
return TypeUtil.isFunction(f);
|
|
18
|
-
}
|
|
19
|
-
static isString(str) {
|
|
20
|
-
let typeName = typeof str;
|
|
21
|
-
return typeName == "string";
|
|
22
|
-
}
|
|
23
|
-
static isObject(f) {
|
|
24
|
-
let typeName = typeof f;
|
|
25
|
-
return typeName == "object";
|
|
26
|
-
}
|
|
27
|
-
//忽略.d.ts文件
|
|
28
|
-
static isTSORJS(fp) {
|
|
29
|
-
let suffix = FileUtil_1.default.getSuffix(fp);
|
|
30
|
-
return ["ts", "js"].includes(suffix) && !fp.endsWith(".d.ts");
|
|
31
|
-
}
|
|
32
|
-
static isPromise(f) {
|
|
33
|
-
return f.constructor.name === "AsyncFunction";
|
|
34
|
-
}
|
|
35
|
-
static isArray(value) {
|
|
36
|
-
return Array.isArray(value);
|
|
37
|
-
}
|
|
38
|
-
static isDate(value) {
|
|
39
|
-
return value instanceof Date;
|
|
40
|
-
}
|
|
41
|
-
//是否为基本类型
|
|
42
|
-
static isBasic(name) {
|
|
43
|
-
let fname = name.toLowerCase();
|
|
44
|
-
return BasicTypes.includes(fname);
|
|
45
|
-
}
|
|
46
|
-
static isMap(value) {
|
|
47
|
-
return value instanceof Map;
|
|
48
|
-
}
|
|
49
|
-
static isSet(value) {
|
|
50
|
-
return value instanceof Set;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.default = TypeUtil;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const FileUtil_1 = require("./FileUtil");
|
|
4
|
+
const BasicTypes = ["boolean", "number", "string"];
|
|
5
|
+
class TypeUtil {
|
|
6
|
+
static isFunction(f) {
|
|
7
|
+
let typeName = typeof f;
|
|
8
|
+
return typeName == "function";
|
|
9
|
+
}
|
|
10
|
+
static isClass(f) {
|
|
11
|
+
if (f.prototype === undefined) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
if (!f.prototype.constructor) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
return TypeUtil.isFunction(f);
|
|
18
|
+
}
|
|
19
|
+
static isString(str) {
|
|
20
|
+
let typeName = typeof str;
|
|
21
|
+
return typeName == "string";
|
|
22
|
+
}
|
|
23
|
+
static isObject(f) {
|
|
24
|
+
let typeName = typeof f;
|
|
25
|
+
return typeName == "object";
|
|
26
|
+
}
|
|
27
|
+
//忽略.d.ts文件
|
|
28
|
+
static isTSORJS(fp) {
|
|
29
|
+
let suffix = FileUtil_1.default.getSuffix(fp);
|
|
30
|
+
return ["ts", "js"].includes(suffix) && !fp.endsWith(".d.ts");
|
|
31
|
+
}
|
|
32
|
+
static isPromise(f) {
|
|
33
|
+
return f.constructor.name === "AsyncFunction";
|
|
34
|
+
}
|
|
35
|
+
static isArray(value) {
|
|
36
|
+
return Array.isArray(value);
|
|
37
|
+
}
|
|
38
|
+
static isDate(value) {
|
|
39
|
+
return value instanceof Date;
|
|
40
|
+
}
|
|
41
|
+
//是否为基本类型
|
|
42
|
+
static isBasic(name) {
|
|
43
|
+
let fname = name.toLowerCase();
|
|
44
|
+
return BasicTypes.includes(fname);
|
|
45
|
+
}
|
|
46
|
+
static isMap(value) {
|
|
47
|
+
return value instanceof Map;
|
|
48
|
+
}
|
|
49
|
+
static isSet(value) {
|
|
50
|
+
return value instanceof Set;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.default = TypeUtil;
|
|
@@ -1,123 +1,123 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const TypeUtil_1 = require("./TypeUtil");
|
|
4
|
-
//类型校验器
|
|
5
|
-
class ValidationUtil {
|
|
6
|
-
//是否为空
|
|
7
|
-
static isNotNull(param) {
|
|
8
|
-
if (param != undefined && param != null) {
|
|
9
|
-
if (TypeUtil_1.default.isString(param)) {
|
|
10
|
-
return param.length > 0;
|
|
11
|
-
}
|
|
12
|
-
if (TypeUtil_1.default.isObject(param)) {
|
|
13
|
-
if (TypeUtil_1.default.isDate(param) || TypeUtil_1.default.isMap(param) || TypeUtil_1.default.isSet(param)) {
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
return Reflect.ownKeys(param).length > 0;
|
|
17
|
-
}
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
static isNull(param) {
|
|
25
|
-
return !ValidationUtil.isNotNull(param);
|
|
26
|
-
}
|
|
27
|
-
//修改数字的判断方法
|
|
28
|
-
static isNumber(param) {
|
|
29
|
-
return ValidationUtil.isNotNull(param) && !isNaN(param);
|
|
30
|
-
}
|
|
31
|
-
static isString(param) {
|
|
32
|
-
return typeof param === "string";
|
|
33
|
-
}
|
|
34
|
-
static isBoolean(param) {
|
|
35
|
-
return typeof param === "boolean";
|
|
36
|
-
}
|
|
37
|
-
static isDate(param) {
|
|
38
|
-
return param instanceof Date;
|
|
39
|
-
}
|
|
40
|
-
static isObject(param) {
|
|
41
|
-
return typeof param == "object";
|
|
42
|
-
}
|
|
43
|
-
// poaram >= value
|
|
44
|
-
static isNotMinSize(param, value) {
|
|
45
|
-
if (ValidationUtil.isString(param)) {
|
|
46
|
-
return param.length >= value;
|
|
47
|
-
}
|
|
48
|
-
if (ValidationUtil.isNumber(param)) {
|
|
49
|
-
return param >= value;
|
|
50
|
-
}
|
|
51
|
-
if (ValidationUtil.isBoolean(param)) {
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
//修正数组的判断
|
|
55
|
-
if (Array.isArray(param)) {
|
|
56
|
-
return param.length >= value;
|
|
57
|
-
}
|
|
58
|
-
let v = ValidationUtil.isNotNull(param) ? param.toString() : "";
|
|
59
|
-
return v.length >= value;
|
|
60
|
-
}
|
|
61
|
-
static isNotMaxSize(param, value) {
|
|
62
|
-
return !ValidationUtil.isNotMinSize(param, value + 1);
|
|
63
|
-
}
|
|
64
|
-
static isArray(param, type) {
|
|
65
|
-
if (!Array.isArray(param)) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
//修正校验数组的错误
|
|
69
|
-
if (type.startsWith("array")) {
|
|
70
|
-
type = type.replace(/array/, "");
|
|
71
|
-
}
|
|
72
|
-
let checkFun = this.getCheckFun(type);
|
|
73
|
-
if (checkFun) {
|
|
74
|
-
return param.every((item) => {
|
|
75
|
-
return Reflect.apply(checkFun, ValidationUtil, [item]);
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
static getCheckFun(type) {
|
|
81
|
-
//判定类型
|
|
82
|
-
if (type.startsWith("array")) {
|
|
83
|
-
return ValidationUtil.isArray;
|
|
84
|
-
}
|
|
85
|
-
let formatFun = null;
|
|
86
|
-
switch (type) {
|
|
87
|
-
case "string": {
|
|
88
|
-
formatFun = ValidationUtil.isString;
|
|
89
|
-
break;
|
|
90
|
-
}
|
|
91
|
-
case "boolean": {
|
|
92
|
-
formatFun = ValidationUtil.isBoolean;
|
|
93
|
-
break;
|
|
94
|
-
}
|
|
95
|
-
case "object": {
|
|
96
|
-
formatFun = ValidationUtil.isObject;
|
|
97
|
-
break;
|
|
98
|
-
}
|
|
99
|
-
case "int":
|
|
100
|
-
case "float":
|
|
101
|
-
case "number": {
|
|
102
|
-
formatFun = ValidationUtil.isNumber;
|
|
103
|
-
break;
|
|
104
|
-
}
|
|
105
|
-
case "date": {
|
|
106
|
-
formatFun = ValidationUtil.isDate;
|
|
107
|
-
break;
|
|
108
|
-
}
|
|
109
|
-
default: {
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
return formatFun;
|
|
114
|
-
}
|
|
115
|
-
static checkType(param, type) {
|
|
116
|
-
let formatFun = ValidationUtil.getCheckFun(type);
|
|
117
|
-
if (!formatFun) {
|
|
118
|
-
return false;
|
|
119
|
-
}
|
|
120
|
-
return Reflect.apply(formatFun, ValidationUtil, [param, type]);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
exports.default = ValidationUtil;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const TypeUtil_1 = require("./TypeUtil");
|
|
4
|
+
//类型校验器
|
|
5
|
+
class ValidationUtil {
|
|
6
|
+
//是否为空
|
|
7
|
+
static isNotNull(param) {
|
|
8
|
+
if (param != undefined && param != null) {
|
|
9
|
+
if (TypeUtil_1.default.isString(param)) {
|
|
10
|
+
return param.length > 0;
|
|
11
|
+
}
|
|
12
|
+
if (TypeUtil_1.default.isObject(param)) {
|
|
13
|
+
if (TypeUtil_1.default.isDate(param) || TypeUtil_1.default.isMap(param) || TypeUtil_1.default.isSet(param)) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
return Reflect.ownKeys(param).length > 0;
|
|
17
|
+
}
|
|
18
|
+
return true;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
static isNull(param) {
|
|
25
|
+
return !ValidationUtil.isNotNull(param);
|
|
26
|
+
}
|
|
27
|
+
//修改数字的判断方法
|
|
28
|
+
static isNumber(param) {
|
|
29
|
+
return ValidationUtil.isNotNull(param) && !isNaN(param);
|
|
30
|
+
}
|
|
31
|
+
static isString(param) {
|
|
32
|
+
return typeof param === "string";
|
|
33
|
+
}
|
|
34
|
+
static isBoolean(param) {
|
|
35
|
+
return typeof param === "boolean";
|
|
36
|
+
}
|
|
37
|
+
static isDate(param) {
|
|
38
|
+
return param instanceof Date;
|
|
39
|
+
}
|
|
40
|
+
static isObject(param) {
|
|
41
|
+
return typeof param == "object";
|
|
42
|
+
}
|
|
43
|
+
// poaram >= value
|
|
44
|
+
static isNotMinSize(param, value) {
|
|
45
|
+
if (ValidationUtil.isString(param)) {
|
|
46
|
+
return param.length >= value;
|
|
47
|
+
}
|
|
48
|
+
if (ValidationUtil.isNumber(param)) {
|
|
49
|
+
return param >= value;
|
|
50
|
+
}
|
|
51
|
+
if (ValidationUtil.isBoolean(param)) {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
//修正数组的判断
|
|
55
|
+
if (Array.isArray(param)) {
|
|
56
|
+
return param.length >= value;
|
|
57
|
+
}
|
|
58
|
+
let v = ValidationUtil.isNotNull(param) ? param.toString() : "";
|
|
59
|
+
return v.length >= value;
|
|
60
|
+
}
|
|
61
|
+
static isNotMaxSize(param, value) {
|
|
62
|
+
return !ValidationUtil.isNotMinSize(param, value + 1);
|
|
63
|
+
}
|
|
64
|
+
static isArray(param, type) {
|
|
65
|
+
if (!Array.isArray(param)) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
//修正校验数组的错误
|
|
69
|
+
if (type.startsWith("array")) {
|
|
70
|
+
type = type.replace(/array/, "");
|
|
71
|
+
}
|
|
72
|
+
let checkFun = this.getCheckFun(type);
|
|
73
|
+
if (checkFun) {
|
|
74
|
+
return param.every((item) => {
|
|
75
|
+
return Reflect.apply(checkFun, ValidationUtil, [item]);
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
static getCheckFun(type) {
|
|
81
|
+
//判定类型
|
|
82
|
+
if (type.startsWith("array")) {
|
|
83
|
+
return ValidationUtil.isArray;
|
|
84
|
+
}
|
|
85
|
+
let formatFun = null;
|
|
86
|
+
switch (type) {
|
|
87
|
+
case "string": {
|
|
88
|
+
formatFun = ValidationUtil.isString;
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
case "boolean": {
|
|
92
|
+
formatFun = ValidationUtil.isBoolean;
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
case "object": {
|
|
96
|
+
formatFun = ValidationUtil.isObject;
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
case "int":
|
|
100
|
+
case "float":
|
|
101
|
+
case "number": {
|
|
102
|
+
formatFun = ValidationUtil.isNumber;
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
case "date": {
|
|
106
|
+
formatFun = ValidationUtil.isDate;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
default: {
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return formatFun;
|
|
114
|
+
}
|
|
115
|
+
static checkType(param, type) {
|
|
116
|
+
let formatFun = ValidationUtil.getCheckFun(type);
|
|
117
|
+
if (!formatFun) {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
return Reflect.apply(formatFun, ValidationUtil, [param, type]);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
exports.default = ValidationUtil;
|
package/target/utils.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IPUtils = exports.MixTool = exports.ClassLoader = exports.ClassUtils = exports.FormatStr = exports.ValidationUtil = exports.TypeUtil = exports.FileUtil = exports.CryptoUtil = exports.DataFormat = exports.DateUtil = void 0;
|
|
4
|
-
const ClassLoader_1 = require("./utils/ClassLoader");
|
|
5
|
-
exports.ClassLoader = ClassLoader_1.default;
|
|
6
|
-
const ClassUtils_1 = require("./utils/ClassUtils");
|
|
7
|
-
exports.ClassUtils = ClassUtils_1.default;
|
|
8
|
-
const CryptoUtil_1 = require("./utils/CryptoUtil");
|
|
9
|
-
exports.CryptoUtil = CryptoUtil_1.default;
|
|
10
|
-
const DataFormat_1 = require("./utils/DataFormat");
|
|
11
|
-
exports.DataFormat = DataFormat_1.default;
|
|
12
|
-
const DateUtil_1 = require("./utils/DateUtil");
|
|
13
|
-
exports.DateUtil = DateUtil_1.default;
|
|
14
|
-
const FileUtil_1 = require("./utils/FileUtil");
|
|
15
|
-
exports.FileUtil = FileUtil_1.default;
|
|
16
|
-
const FormatStr_1 = require("./utils/FormatStr");
|
|
17
|
-
exports.FormatStr = FormatStr_1.default;
|
|
18
|
-
const Mix_1 = require("./utils/Mix");
|
|
19
|
-
exports.MixTool = Mix_1.default;
|
|
20
|
-
const TypeUtil_1 = require("./utils/TypeUtil");
|
|
21
|
-
exports.TypeUtil = TypeUtil_1.default;
|
|
22
|
-
const ValidationUtil_1 = require("./utils/ValidationUtil");
|
|
23
|
-
exports.ValidationUtil = ValidationUtil_1.default;
|
|
24
|
-
const IPUtils_1 = require("./utils/IPUtils");
|
|
25
|
-
exports.IPUtils = IPUtils_1.default;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IPUtils = exports.MixTool = exports.ClassLoader = exports.ClassUtils = exports.FormatStr = exports.ValidationUtil = exports.TypeUtil = exports.FileUtil = exports.CryptoUtil = exports.DataFormat = exports.DateUtil = void 0;
|
|
4
|
+
const ClassLoader_1 = require("./utils/ClassLoader");
|
|
5
|
+
exports.ClassLoader = ClassLoader_1.default;
|
|
6
|
+
const ClassUtils_1 = require("./utils/ClassUtils");
|
|
7
|
+
exports.ClassUtils = ClassUtils_1.default;
|
|
8
|
+
const CryptoUtil_1 = require("./utils/CryptoUtil");
|
|
9
|
+
exports.CryptoUtil = CryptoUtil_1.default;
|
|
10
|
+
const DataFormat_1 = require("./utils/DataFormat");
|
|
11
|
+
exports.DataFormat = DataFormat_1.default;
|
|
12
|
+
const DateUtil_1 = require("./utils/DateUtil");
|
|
13
|
+
exports.DateUtil = DateUtil_1.default;
|
|
14
|
+
const FileUtil_1 = require("./utils/FileUtil");
|
|
15
|
+
exports.FileUtil = FileUtil_1.default;
|
|
16
|
+
const FormatStr_1 = require("./utils/FormatStr");
|
|
17
|
+
exports.FormatStr = FormatStr_1.default;
|
|
18
|
+
const Mix_1 = require("./utils/Mix");
|
|
19
|
+
exports.MixTool = Mix_1.default;
|
|
20
|
+
const TypeUtil_1 = require("./utils/TypeUtil");
|
|
21
|
+
exports.TypeUtil = TypeUtil_1.default;
|
|
22
|
+
const ValidationUtil_1 = require("./utils/ValidationUtil");
|
|
23
|
+
exports.ValidationUtil = ValidationUtil_1.default;
|
|
24
|
+
const IPUtils_1 = require("./utils/IPUtils");
|
|
25
|
+
exports.IPUtils = IPUtils_1.default;
|
|
File without changes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{"timestamp":"2024-12-03 21:04:11.499","level":"INFO","label":"fastcar-server.sys","message":"Start scanning component"}
|
|
2
|
+
{"timestamp":"2024-12-03 21:04:11.802","level":"INFO","label":"fastcar-server.sys","message":"Complete component scan"}
|
|
3
|
+
{"timestamp":"2024-12-03 21:04:11.805","level":"INFO","label":"fastcar-server.sys","message":"Call application initialization method"}
|
|
4
|
+
{"timestamp":"2024-12-03 21:04:11.808","level":"INFO","label":"fastcar-server.sys","message":"start server app is run"}
|
|
5
|
+
{"timestamp":"2024-12-03 21:04:11.809","level":"INFO","label":"fastcar-server.sys","message":"version 1.0.0"}
|
|
6
|
+
{"timestamp":"2024-12-04 10:41:41.933","level":"INFO","label":"fastcar-server.sys","message":"Start scanning component"}
|
|
7
|
+
{"timestamp":"2024-12-04 10:41:42.256","level":"INFO","label":"fastcar-server.sys","message":"Complete component scan"}
|
|
8
|
+
{"timestamp":"2024-12-04 10:41:42.258","level":"INFO","label":"fastcar-server.sys","message":"Call application initialization method"}
|
|
9
|
+
{"timestamp":"2024-12-04 10:41:42.260","level":"INFO","label":"fastcar-server.sys","message":"start server app is run"}
|
|
10
|
+
{"timestamp":"2024-12-04 10:41:42.260","level":"INFO","label":"fastcar-server.sys","message":"version 1.0.0"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{"timestamp":"2024-12-04 10:46:19.406","level":"INFO","label":"fastcar-server.sys","message":"Start scanning component"}
|
|
2
|
+
{"timestamp":"2024-12-04 10:46:19.697","level":"INFO","label":"fastcar-server.sys","message":"Complete component scan"}
|
|
3
|
+
{"timestamp":"2024-12-04 10:46:19.700","level":"INFO","label":"fastcar-server.sys","message":"Call application initialization method"}
|
|
4
|
+
{"timestamp":"2024-12-04 10:46:19.701","level":"INFO","label":"fastcar-server.sys","message":"start server app is run"}
|
|
5
|
+
{"timestamp":"2024-12-04 10:46:19.702","level":"INFO","label":"fastcar-server.sys","message":"version 1.0.0"}
|
|
6
|
+
{"timestamp":"2024-12-04 10:46:32.426","level":"INFO","label":"fastcar-server.sys","message":"hot update---D:\\code\\fast-car\\fastcar-core\\test\\example\\simple\\service\\HelloService.ts"}
|
|
7
|
+
{"timestamp":"2024-12-04 10:46:37.328","level":"INFO","label":"fastcar-server.sys","message":"hot update---D:\\code\\fast-car\\fastcar-core\\test\\example\\simple\\service\\HelloService.ts"}
|
|
8
|
+
{"timestamp":"2024-12-04 10:46:39.653","level":"INFO","label":"fastcar-server.sys","message":"hot update---D:\\code\\fast-car\\fastcar-core\\test\\example\\simple\\service\\HelloService.ts"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{"timestamp":"2024-12-04 10:49:26.216","level":"INFO","label":"fastcar-server.sys","message":"Start scanning component"}
|
|
2
|
+
{"timestamp":"2024-12-04 10:49:26.499","level":"INFO","label":"fastcar-server.sys","message":"Complete component scan"}
|
|
3
|
+
{"timestamp":"2024-12-04 10:49:26.502","level":"INFO","label":"fastcar-server.sys","message":"Call application initialization method"}
|
|
4
|
+
{"timestamp":"2024-12-04 10:49:26.505","level":"INFO","label":"fastcar-server.sys","message":"start server app is run"}
|
|
5
|
+
{"timestamp":"2024-12-04 10:49:26.506","level":"INFO","label":"fastcar-server.sys","message":"version 1.0.0"}
|
|
6
|
+
{"timestamp":"2024-12-04 10:49:32.122","level":"INFO","label":"fastcar-server.sys","message":"hot update---D:\\code\\fast-car\\fastcar-core\\test\\example\\simple\\service\\HelloService.ts"}
|
|
7
|
+
{"timestamp":"2024-12-04 10:49:36.193","level":"INFO","label":"fastcar-server.sys","message":"hot update---D:\\code\\fast-car\\fastcar-core\\test\\example\\simple\\service\\HelloService.ts"}
|
|
8
|
+
{"timestamp":"2024-12-04 10:49:40.181","level":"INFO","label":"fastcar-server.sys","message":"hot update---D:\\code\\fast-car\\fastcar-core\\test\\example\\simple\\service\\HelloService.ts"}
|
|
9
|
+
{"timestamp":"2024-12-04 10:49:43.876","level":"INFO","label":"fastcar-server.sys","message":"hot update---D:\\code\\fast-car\\fastcar-core\\test\\example\\simple\\service\\HelloService.ts"}
|
|
10
|
+
{"timestamp":"2024-12-04 10:49:46.833","level":"INFO","label":"fastcar-server.sys","message":"hot update---D:\\code\\fast-car\\fastcar-core\\test\\example\\simple\\service\\HelloService.ts"}
|
|
11
|
+
{"timestamp":"2024-12-04 10:49:52.191","level":"INFO","label":"fastcar-server.sys","message":"hot update---D:\\code\\fast-car\\fastcar-core\\test\\example\\simple\\service\\HelloService.ts"}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{"timestamp":"2024-12-03 21:04:24.672","level":"INFO","label":"other-server.sys","message":"Start scanning component"}
|
|
2
|
+
{"timestamp":"2024-12-03 21:04:25.431","level":"INFO","label":"other-server.sys","message":"Complete component scan"}
|
|
3
|
+
{"timestamp":"2024-12-03 21:04:25.433","level":"INFO","label":"other-server.sys","message":"Call application initialization method"}
|
|
4
|
+
{"timestamp":"2024-12-03 21:04:25.436","level":"INFO","label":"other-server.sys","message":"start server app is run"}
|
|
5
|
+
{"timestamp":"2024-12-03 21:04:25.437","level":"INFO","label":"other-server.sys","message":"version 1.0.0"}
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
hello: "
|
|
1
|
+
hello: "world"
|
|
@@ -10,6 +10,7 @@ import Logger from "../../../src/interface/Logger";
|
|
|
10
10
|
import ApplicationSetting from "../../../src/annotation/env/ApplicationSetting";
|
|
11
11
|
import { ComponentScanExclusion } from "../../../src/annotation";
|
|
12
12
|
import BaseName from "../../../src/annotation/env/BaseName";
|
|
13
|
+
import * as path from "path";
|
|
13
14
|
|
|
14
15
|
@Application
|
|
15
16
|
@ENV("test") //设置环境变量
|
|
@@ -19,7 +20,7 @@ import BaseName from "../../../src/annotation/env/BaseName";
|
|
|
19
20
|
appid: "other-server",
|
|
20
21
|
})
|
|
21
22
|
@BaseName("other")
|
|
22
|
-
@ComponentScanExclusion("app.ts")
|
|
23
|
+
@ComponentScanExclusion(path.join(__dirname, "app.ts"))
|
|
23
24
|
class APP implements ApplicationHook {
|
|
24
25
|
app!: FastCarApplication;
|
|
25
26
|
|
|
@@ -11,8 +11,9 @@ import Log from "../../../src/annotation/stereotype/Log";
|
|
|
11
11
|
import Logger from "../../../src/interface/Logger";
|
|
12
12
|
import ApplicationSetting from "../../../src/annotation/env/ApplicationSetting";
|
|
13
13
|
import { ComponentScanExclusion } from "../../../src/annotation";
|
|
14
|
+
import * as path from "path";
|
|
14
15
|
|
|
15
|
-
@ComponentScanExclusion("app-test.ts")
|
|
16
|
+
@ComponentScanExclusion(path.join(__dirname, "app-test.ts"))
|
|
16
17
|
@Application
|
|
17
18
|
@ENV("test") //设置环境变量
|
|
18
19
|
@BasePath(__dirname) //直接运行ts文件时可不用
|
|
@@ -56,13 +57,13 @@ import HelloConfig from "./config/HelloConfig";
|
|
|
56
57
|
describe("程序应用测试", () => {
|
|
57
58
|
it("获取配置", () => {
|
|
58
59
|
//调用相关方法
|
|
59
|
-
let helloController
|
|
60
|
-
helloController
|
|
61
|
-
helloController
|
|
62
|
-
console.log("获取到的配置--", helloController
|
|
60
|
+
let helloController = appInsatcne.app.getComponentByTarget<HelloController>(HelloController);
|
|
61
|
+
helloController?.callHello();
|
|
62
|
+
helloController?.print();
|
|
63
|
+
console.log("获取到的配置--", helloController?.getConfig());
|
|
63
64
|
});
|
|
64
65
|
it("测试别名", () => {
|
|
65
|
-
let controller1
|
|
66
|
+
let controller1 = appInsatcne.app.getComponentByName("controller1") as AliasController;
|
|
66
67
|
console.log("controller1类型和AliasController相符", controller1 instanceof AliasController);
|
|
67
68
|
});
|
|
68
69
|
it("获取完善的加载信息", () => {
|
|
@@ -77,8 +78,8 @@ describe("程序应用测试", () => {
|
|
|
77
78
|
}, 2000);
|
|
78
79
|
});
|
|
79
80
|
it("根据环境动态设置变量", () => {
|
|
80
|
-
let evnConfig
|
|
81
|
-
console.log(evnConfig
|
|
81
|
+
let evnConfig = appInsatcne.app.getComponentByTarget<EnvConfig>(EnvConfig);
|
|
82
|
+
console.log(evnConfig?.text);
|
|
82
83
|
});
|
|
83
84
|
it("测试调用时加载时机才会注入方法", () => {
|
|
84
85
|
let callServerice = new CallService();
|
|
@@ -88,25 +89,24 @@ describe("程序应用测试", () => {
|
|
|
88
89
|
console.log("配置", appInsatcne.app.getSetting("customHello"));
|
|
89
90
|
});
|
|
90
91
|
it("查找一个不存在的注入", () => {
|
|
91
|
-
let notFound
|
|
92
|
+
let notFound = appInsatcne.app.getComponentByTarget<NotFoundController>(NotFoundController);
|
|
92
93
|
try {
|
|
93
|
-
notFound
|
|
94
|
+
notFound?.getNotFound();
|
|
94
95
|
} catch (e) {
|
|
95
96
|
appInsatcne.app.getLogger().error(e);
|
|
96
97
|
}
|
|
97
|
-
|
|
98
98
|
try {
|
|
99
|
-
notFound
|
|
99
|
+
notFound?.getAutoNotFound();
|
|
100
100
|
} catch (e) {
|
|
101
101
|
appInsatcne.app.getLogger().error(e);
|
|
102
102
|
}
|
|
103
103
|
});
|
|
104
104
|
it("热更新配置解析", () => {
|
|
105
105
|
setInterval(() => {
|
|
106
|
-
let hotConfig
|
|
107
|
-
let helloConfig
|
|
108
|
-
console.log("热更新配置", hotConfig
|
|
109
|
-
console.log("不变的配置", helloConfig
|
|
106
|
+
let hotConfig = appInsatcne.app.getComponentByTarget<HotConfig>(HotConfig);
|
|
107
|
+
let helloConfig = appInsatcne.app.getComponentByTarget<HelloConfig>(HelloConfig);
|
|
108
|
+
console.log("热更新配置", hotConfig?.hello);
|
|
109
|
+
console.log("不变的配置", helloConfig?.hello);
|
|
110
110
|
}, 1000);
|
|
111
111
|
});
|
|
112
112
|
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import HelloService from "./HelloService";
|
|
2
2
|
import CallDependency from "../../../../src/annotation/bind/CallDependency";
|
|
3
|
+
import DemandInjection from "../../../../src/annotation/bind/DemandInjection";
|
|
3
4
|
|
|
5
|
+
@DemandInjection
|
|
4
6
|
export default class CallService {
|
|
5
7
|
@CallDependency
|
|
6
8
|
private hello!: HelloService;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{"timestamp":"2024-10-24 12:08:15.489","level":"INFO","label":"sys","message":{"hello":"world"}}
|
|
2
|
+
{"timestamp":"2024-10-24 12:08:15.491","level":"INFO","label":"sys","message":"1","splat":"[\"2\",\"3\"]"}
|
|
3
|
+
{"timestamp":"2024-10-24 12:08:15.491","level":"ERROR","label":"sys","message":"error ~","stack":"Error: error ~\n at Object.<anonymous> (D:\\code\\fast-car\\fastcar-core\\test\\unit\\winston-test.js:15:11)\n at Module._compile (node:internal/modules/cjs/loader:1358:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)\n at Module.load (node:internal/modules/cjs/loader:1208:32)\n at Module._load (node:internal/modules/cjs/loader:1024:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)\n at node:internal/main/run_main_module:28:49"}
|
|
4
|
+
{"timestamp":"2024-10-24 12:09:57.471","level":"INFO","label":"sys","message":{"hello":"world"}}
|
|
5
|
+
{"timestamp":"2024-10-24 12:09:57.478","level":"INFO","label":"sys","message":"1","splat":"[\"2\",\"3\"]"}
|
|
6
|
+
{"timestamp":"2024-10-24 12:09:57.480","level":"ERROR","label":"sys","message":"error ~","stack":"Error: error ~\n at Object.<anonymous> (D:\\code\\fast-car\\fastcar-core\\test\\unit\\winston-test.js:15:11)\n at Module._compile (node:internal/modules/cjs/loader:1358:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)\n at Module.load (node:internal/modules/cjs/loader:1208:32)\n at Module._load (node:internal/modules/cjs/loader:1024:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)\n at node:internal/main/run_main_module:28:49"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{"timestamp":"2024-10-24 12:21:01.540","level":"INFO","label":"sys","message":{"hello":"world"}}
|
|
2
|
+
{"timestamp":"2024-10-24 12:21:01.543","level":"INFO","label":"sys","message":"1","splat":"[\"2\",\"3\"]"}
|
|
3
|
+
{"timestamp":"2024-10-24 12:21:01.543","level":"ERROR","label":"sys","message":"error ~","stack":"Error: error ~\n at Object.<anonymous> (D:\\code\\fast-car\\fastcar-core\\test\\unit\\winston-test.js:15:11)\n at Module._compile (node:internal/modules/cjs/loader:1358:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)\n at Module.load (node:internal/modules/cjs/loader:1208:32)\n at Module._load (node:internal/modules/cjs/loader:1024:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)\n at node:internal/main/run_main_module:28:49"}
|
|
4
|
+
{"timestamp":"2024-10-24 12:21:41.837","level":"INFO","label":"sys","message":{"hello":"world"}}
|
|
5
|
+
{"timestamp":"2024-10-24 12:21:41.842","level":"INFO","label":"sys","message":"1","splat":"[\"2\",\"3\"]"}
|
|
6
|
+
{"timestamp":"2024-10-24 12:21:41.843","level":"ERROR","label":"sys","message":"error ~","stack":"Error: error ~\n at Object.<anonymous> (D:\\code\\fast-car\\fastcar-core\\test\\unit\\winston-test.js:15:11)\n at Module._compile (node:internal/modules/cjs/loader:1358:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)\n at Module.load (node:internal/modules/cjs/loader:1208:32)\n at Module._load (node:internal/modules/cjs/loader:1024:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)\n at node:internal/main/run_main_module:28:49"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{"timestamp":"2024-10-24 12:24:49.248","level":"INFO","label":"sys","message":{"hello":"world"}}
|
|
2
|
+
{"timestamp":"2024-10-24 12:24:49.251","level":"INFO","label":"sys","message":"1","splat":"[\"2\",\"3\"]"}
|
|
3
|
+
{"timestamp":"2024-10-24 12:24:49.251","level":"ERROR","label":"sys","message":"error ~","stack":"Error: error ~\n at Object.<anonymous> (D:\\code\\fast-car\\fastcar-core\\test\\unit\\winston-test.js:15:11)\n at Module._compile (node:internal/modules/cjs/loader:1358:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)\n at Module.load (node:internal/modules/cjs/loader:1208:32)\n at Module._load (node:internal/modules/cjs/loader:1024:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)\n at node:internal/main/run_main_module:28:49"}
|
|
4
|
+
{"timestamp":"2024-10-24 12:26:25.128","level":"INFO","label":"sys","message":{"hello":"world"}}
|
|
5
|
+
{"timestamp":"2024-10-24 12:26:25.131","level":"INFO","label":"sys","message":"1","splat":"[\"2\",\"3\"]"}
|
|
6
|
+
{"timestamp":"2024-10-24 12:26:25.131","level":"ERROR","label":"sys","message":"error ~","stack":"Error: error ~\n at Object.<anonymous> (D:\\code\\fast-car\\fastcar-core\\test\\unit\\winston-test.js:15:11)\n at Module._compile (node:internal/modules/cjs/loader:1358:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)\n at Module.load (node:internal/modules/cjs/loader:1208:32)\n at Module._load (node:internal/modules/cjs/loader:1024:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)\n at node:internal/main/run_main_module:28:49"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{"timestamp":"2024-10-24 12:26:43.693","level":"INFO","label":"sys","message":{"hello":"world"}}
|
|
2
|
+
{"timestamp":"2024-10-24 12:26:43.704","level":"INFO","label":"sys","message":"1","splat":"[\"2\",\"3\"]"}
|
|
3
|
+
{"timestamp":"2024-10-24 12:26:43.707","level":"ERROR","label":"sys","message":"error ~","stack":"Error: error ~\n at Object.<anonymous> (D:\\code\\fast-car\\fastcar-core\\test\\unit\\winston-test.js:15:11)\n at Module._compile (node:internal/modules/cjs/loader:1358:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)\n at Module.load (node:internal/modules/cjs/loader:1208:32)\n at Module._load (node:internal/modules/cjs/loader:1024:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)\n at node:internal/main/run_main_module:28:49"}
|
|
4
|
+
{"timestamp":"2024-10-24 12:27:17.478","level":"INFO","label":"sys","message":{"hello":"world"}}
|
|
5
|
+
{"timestamp":"2024-10-24 12:27:17.484","level":"INFO","label":"sys","message":"1","splat":"[\"2\",\"3\"]"}
|
|
6
|
+
{"timestamp":"2024-10-24 12:27:17.486","level":"ERROR","label":"sys","message":"error ~","stack":"Error: error ~\n at Object.<anonymous> (D:\\code\\fast-car\\fastcar-core\\test\\unit\\winston-test.js:15:11)\n at Module._compile (node:internal/modules/cjs/loader:1358:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)\n at Module.load (node:internal/modules/cjs/loader:1208:32)\n at Module._load (node:internal/modules/cjs/loader:1024:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)\n at node:internal/main/run_main_module:28:49"}
|