chyz 2.0.0-rc.8 → 2.0.1-rc.1
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/BaseChyz.d.ts +73 -56
- package/BaseChyz.d.ts.map +1 -1
- package/BaseChyz.js +569 -404
- package/README.md +1 -1
- package/base/ActionFilter.d.ts +32 -32
- package/base/ActionFilter.d.ts.map +1 -1
- package/base/ActionFilter.js +82 -82
- package/base/BadRequestHttpException.d.ts +6 -0
- package/base/BadRequestHttpException.d.ts.map +1 -0
- package/base/BadRequestHttpException.js +17 -0
- package/base/BaseError.d.ts +43 -10
- package/base/BaseError.d.ts.map +1 -1
- package/base/BaseError.js +58 -26
- package/base/Behavior.d.ts +3 -3
- package/base/Behavior.js +7 -7
- package/base/CBaseObject.d.ts +4 -4
- package/base/CBaseObject.d.ts.map +1 -1
- package/base/CBaseObject.js +16 -16
- package/base/CEvents.d.ts +13 -0
- package/base/CEvents.d.ts.map +1 -0
- package/base/CEvents.js +24 -0
- package/base/CRequest.d.ts +1 -1
- package/base/CRequest.js +10 -10
- package/base/CWebController.d.ts +43 -43
- package/base/CWebController.d.ts.map +1 -1
- package/base/CWebController.js +81 -74
- package/base/Component.d.ts +20 -20
- package/base/Component.d.ts.map +1 -1
- package/base/Component.js +57 -57
- package/base/Configurable.d.ts +2 -2
- package/base/Configurable.js +8 -8
- package/base/DataErrorDbException.d.ts +5 -5
- package/base/DataErrorDbException.d.ts.map +1 -1
- package/base/DataErrorDbException.js +17 -17
- package/base/DbConnection.d.ts +12 -12
- package/base/DbConnection.js +53 -53
- package/base/ForbiddenHttpException.d.ts +4 -4
- package/base/ForbiddenHttpException.d.ts.map +1 -1
- package/base/ForbiddenHttpException.js +16 -16
- package/base/InvalidArgumentException.d.ts +5 -5
- package/base/InvalidArgumentException.d.ts.map +1 -1
- package/base/InvalidArgumentException.js +17 -17
- package/base/InvalidConfigException.d.ts +5 -5
- package/base/InvalidConfigException.d.ts.map +1 -1
- package/base/InvalidConfigException.js +17 -17
- package/base/Logs.d.ts +21 -21
- package/base/Logs.d.ts.map +1 -1
- package/base/Logs.js +57 -57
- package/base/Model.d.ts +301 -298
- package/base/Model.d.ts.map +1 -1
- package/base/Model.js +545 -507
- package/base/ModelManager.d.ts +1 -1
- package/base/ModelManager.js +19 -19
- package/base/NotFoundHttpException.d.ts +5 -5
- package/base/NotFoundHttpException.d.ts.map +1 -1
- package/base/NotFoundHttpException.js +17 -17
- package/base/RestClient.d.ts +6 -6
- package/base/RestClient.d.ts.map +1 -1
- package/base/RestClient.js +25 -25
- package/base/UnauthorizedHttpException.d.ts +5 -5
- package/base/UnauthorizedHttpException.d.ts.map +1 -1
- package/base/UnauthorizedHttpException.js +17 -17
- package/base/ValidationHttpException.d.ts +5 -5
- package/base/ValidationHttpException.d.ts.map +1 -1
- package/base/ValidationHttpException.js +17 -17
- package/base/db/Exception.d.ts +6 -6
- package/base/db/Exception.js +15 -15
- package/base/index.d.ts +19 -18
- package/base/index.d.ts.map +1 -1
- package/base/index.js +41 -39
- package/decorator/Middleware.d.ts +3 -3
- package/decorator/Middleware.js +11 -11
- package/decorator/controller.d.ts +2 -2
- package/decorator/controller.js +24 -24
- package/decorator/delete.d.ts +3 -0
- package/decorator/delete.d.ts.map +1 -0
- package/decorator/delete.js +36 -0
- package/decorator/enums/ControllerDecoratorParams.d.ts +5 -5
- package/decorator/enums/ControllerDecoratorParams.js +9 -9
- package/decorator/get.d.ts +2 -2
- package/decorator/get.js +36 -36
- package/decorator/index.d.ts +5 -3
- package/decorator/index.d.ts.map +1 -1
- package/decorator/index.js +13 -9
- package/decorator/post.d.ts +2 -2
- package/decorator/post.js +36 -36
- package/decorator/put.d.ts +3 -0
- package/decorator/put.d.ts.map +1 -0
- package/decorator/put.js +36 -0
- package/filters/AccessControl.d.ts +12 -12
- package/filters/AccessControl.d.ts.map +1 -1
- package/filters/AccessControl.js +83 -83
- package/filters/AccessRule.d.ts +82 -82
- package/filters/AccessRule.d.ts.map +1 -1
- package/filters/AccessRule.js +136 -137
- package/filters/auth/AuthInterface.d.ts +25 -25
- package/filters/auth/AuthInterface.js +2 -2
- package/filters/auth/AuthMethod.d.ts +37 -37
- package/filters/auth/AuthMethod.d.ts.map +1 -1
- package/filters/auth/AuthMethod.js +82 -82
- package/filters/auth/HttpBasicAuth.d.ts +23 -22
- package/filters/auth/HttpBasicAuth.d.ts.map +1 -1
- package/filters/auth/HttpBasicAuth.js +78 -72
- package/filters/auth/HttpBearerAuth.d.ts +17 -17
- package/filters/auth/HttpBearerAuth.d.ts.map +1 -1
- package/filters/auth/HttpBearerAuth.js +33 -32
- package/filters/auth/HttpHeaderAuth.d.ts +18 -14
- package/filters/auth/HttpHeaderAuth.d.ts.map +1 -1
- package/filters/auth/HttpHeaderAuth.js +64 -57
- package/filters/auth/JwtHttpBearerAuth.d.ts +20 -20
- package/filters/auth/JwtHttpBearerAuth.d.ts.map +1 -1
- package/filters/auth/JwtHttpBearerAuth.js +87 -81
- package/filters/auth/KeyCloakHttpBearerAuth.d.ts +22 -22
- package/filters/auth/KeyCloakHttpBearerAuth.js +116 -116
- package/filters/auth/index.d.ts +4 -4
- package/filters/auth/index.js +11 -11
- package/filters/index.d.ts +2 -2
- package/filters/index.js +7 -7
- package/index.d.ts +28 -21
- package/index.d.ts.map +1 -1
- package/index.js +71 -60
- package/model/RouteDefinition.d.ts +6 -6
- package/model/RouteDefinition.js +8 -8
- package/package.json +22 -24
- package/rbac/AuthAssignment.d.ts +18 -18
- package/rbac/AuthAssignment.js +44 -44
- package/rbac/AuthItem.d.ts +26 -26
- package/rbac/AuthItem.js +51 -51
- package/rbac/AuthItemChild.d.ts +18 -18
- package/rbac/AuthItemChild.js +43 -43
- package/rbac/AuthManager.d.ts +111 -111
- package/rbac/AuthManager.d.ts.map +1 -1
- package/rbac/AuthManager.js +356 -355
- package/rbac/index.d.ts +5 -0
- package/rbac/index.d.ts.map +1 -0
- package/rbac/index.js +28 -0
- package/requiments/Glob.d.ts +2 -2
- package/requiments/Glob.js +10 -10
- package/requiments/ReflectUtil.js +24 -24
- package/requiments/Utils.d.ts +1 -8
- package/requiments/Utils.d.ts.map +1 -1
- package/requiments/Utils.js +115 -112
- package/validators/BooleanValidator.js +1 -1
- package/validators/CompareValidator.js +1 -1
- package/validators/DateValidator.js +1 -1
- package/validators/EmailValidator.js +1 -1
- package/validators/Validator.d.ts +17 -17
- package/validators/Validator.js +27 -27
- package/web/IdentityInterface.d.ts +55 -54
- package/web/IdentityInterface.d.ts.map +1 -1
- package/web/IdentityInterface.js +8 -8
- package/web/WebUser.d.ts +71 -71
- package/web/WebUser.js +165 -165
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021. Chy Bilgisayar Bilisim
|
|
4
|
-
* Author: Cihan Ozturk
|
|
5
|
-
* E-mail: cihan@chy.com.tr
|
|
6
|
-
* Github:https://github.com/cihan53/
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.ForbiddenHttpException = void 0;
|
|
10
|
-
const BaseError_1 = require("./BaseError");
|
|
11
|
-
class ForbiddenHttpException extends BaseError_1.BaseError {
|
|
12
|
-
constructor(message) {
|
|
13
|
-
super(message, 403);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.ForbiddenHttpException = ForbiddenHttpException;
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021. Chy Bilgisayar Bilisim
|
|
4
|
+
* Author: Cihan Ozturk
|
|
5
|
+
* E-mail: cihan@chy.com.tr
|
|
6
|
+
* Github:https://github.com/cihan53/
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ForbiddenHttpException = void 0;
|
|
10
|
+
const BaseError_1 = require("./BaseError");
|
|
11
|
+
class ForbiddenHttpException extends BaseError_1.BaseError {
|
|
12
|
+
constructor(message) {
|
|
13
|
+
super(message, 403);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.ForbiddenHttpException = ForbiddenHttpException;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseError } from "./BaseError";
|
|
2
|
-
export declare class InvalidArgumentException extends BaseError {
|
|
3
|
-
message:
|
|
4
|
-
constructor(message:
|
|
5
|
-
}
|
|
1
|
+
import { BaseError } from "./BaseError";
|
|
2
|
+
export declare class InvalidArgumentException extends BaseError {
|
|
3
|
+
message: any;
|
|
4
|
+
constructor(message: any);
|
|
5
|
+
}
|
|
6
6
|
//# sourceMappingURL=InvalidArgumentException.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvalidArgumentException.d.ts","sourceRoot":"","sources":["../../src/base/InvalidArgumentException.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,wBAAyB,SAAQ,SAAS;IAC9B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"InvalidArgumentException.d.ts","sourceRoot":"","sources":["../../src/base/InvalidArgumentException.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,wBAAyB,SAAQ,SAAS;IAC9B,OAAO,EAAE,GAAG;gBAAZ,OAAO,EAAE,GAAG;CAGpC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021. Chy Bilgisayar Bilisim
|
|
4
|
-
* Author: Cihan Ozturk
|
|
5
|
-
* E-mail: cihan@chy.com.tr
|
|
6
|
-
* Github:https://github.com/cihan53/
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.InvalidArgumentException = void 0;
|
|
10
|
-
const BaseError_1 = require("./BaseError");
|
|
11
|
-
class InvalidArgumentException extends BaseError_1.BaseError {
|
|
12
|
-
constructor(message) {
|
|
13
|
-
super(message, 500);
|
|
14
|
-
this.message = message;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.InvalidArgumentException = InvalidArgumentException;
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021. Chy Bilgisayar Bilisim
|
|
4
|
+
* Author: Cihan Ozturk
|
|
5
|
+
* E-mail: cihan@chy.com.tr
|
|
6
|
+
* Github:https://github.com/cihan53/
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.InvalidArgumentException = void 0;
|
|
10
|
+
const BaseError_1 = require("./BaseError");
|
|
11
|
+
class InvalidArgumentException extends BaseError_1.BaseError {
|
|
12
|
+
constructor(message) {
|
|
13
|
+
super(message, 500);
|
|
14
|
+
this.message = message;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.InvalidArgumentException = InvalidArgumentException;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseError } from "./BaseError";
|
|
2
|
-
export declare class InvalidConfigException extends BaseError {
|
|
3
|
-
message:
|
|
4
|
-
constructor(message:
|
|
5
|
-
}
|
|
1
|
+
import { BaseError } from "./BaseError";
|
|
2
|
+
export declare class InvalidConfigException extends BaseError {
|
|
3
|
+
message: any;
|
|
4
|
+
constructor(message: any);
|
|
5
|
+
}
|
|
6
6
|
//# sourceMappingURL=InvalidConfigException.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvalidConfigException.d.ts","sourceRoot":"","sources":["../../src/base/InvalidConfigException.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,sBAAuB,SAAQ,SAAS;IAC5B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"InvalidConfigException.d.ts","sourceRoot":"","sources":["../../src/base/InvalidConfigException.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,sBAAuB,SAAQ,SAAS;IAC5B,OAAO,EAAE,GAAG;gBAAZ,OAAO,EAAE,GAAG;CAGpC"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright (c) 2021. Chy Bilgisayar Bilisim
|
|
4
|
-
* Author: Cihan Ozturk
|
|
5
|
-
* E-mail: cihan@chy.com.tr
|
|
6
|
-
* Github:https://github.com/cihan53/
|
|
7
|
-
*/
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.InvalidConfigException = void 0;
|
|
10
|
-
const BaseError_1 = require("./BaseError");
|
|
11
|
-
class InvalidConfigException extends BaseError_1.BaseError {
|
|
12
|
-
constructor(message) {
|
|
13
|
-
super(message, 500);
|
|
14
|
-
this.message = message;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.InvalidConfigException = InvalidConfigException;
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2021. Chy Bilgisayar Bilisim
|
|
4
|
+
* Author: Cihan Ozturk
|
|
5
|
+
* E-mail: cihan@chy.com.tr
|
|
6
|
+
* Github:https://github.com/cihan53/
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.InvalidConfigException = void 0;
|
|
10
|
+
const BaseError_1 = require("./BaseError");
|
|
11
|
+
class InvalidConfigException extends BaseError_1.BaseError {
|
|
12
|
+
constructor(message) {
|
|
13
|
+
super(message, 500);
|
|
14
|
+
this.message = message;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.InvalidConfigException = InvalidConfigException;
|
package/base/Logs.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { Configurable } from "./Configurable";
|
|
2
|
-
export declare class Logs implements Configurable {
|
|
3
|
-
name: string;
|
|
4
|
-
configs: any;
|
|
5
|
-
constructor(name?: string, configs?: any);
|
|
6
|
-
init(): void;
|
|
7
|
-
/**
|
|
8
|
-
*
|
|
9
|
-
* @constructor
|
|
10
|
-
*/
|
|
11
|
-
Provider(): any;
|
|
12
|
-
logs(...args: any[]): any;
|
|
13
|
-
debug(...args: any[]): void;
|
|
14
|
-
info(...args: any[]): void;
|
|
15
|
-
warn(...args: any[]): void;
|
|
16
|
-
error(...args: any[]): void;
|
|
17
|
-
fatal(...args: any[]): void;
|
|
18
|
-
warning(...args: any[]): void;
|
|
19
|
-
}
|
|
20
|
-
declare const _default: Logs;
|
|
21
|
-
export default _default;
|
|
1
|
+
import { Configurable } from "./Configurable";
|
|
2
|
+
export declare class Logs implements Configurable {
|
|
3
|
+
name: string;
|
|
4
|
+
configs: any;
|
|
5
|
+
constructor(name?: string, configs?: any);
|
|
6
|
+
init(): void;
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @constructor
|
|
10
|
+
*/
|
|
11
|
+
Provider(): any;
|
|
12
|
+
logs(...args: any[]): any;
|
|
13
|
+
debug(...args: any[]): void;
|
|
14
|
+
info(...args: any[]): void;
|
|
15
|
+
warn(...args: any[]): void;
|
|
16
|
+
error(...args: any[]): void;
|
|
17
|
+
fatal(...args: any[]): void;
|
|
18
|
+
warning(...args: any[]): void;
|
|
19
|
+
}
|
|
20
|
+
declare const _default: Logs;
|
|
21
|
+
export default _default;
|
|
22
22
|
//# sourceMappingURL=Logs.d.ts.map
|
package/base/Logs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logs.d.ts","sourceRoot":"","sources":["../../src/base/Logs.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAI5C,qBAAa,IAAK,YAAW,YAAY;IAE9B,IAAI,SAAyB;IAC7B,OAAO,EAAE,GAAG,CAA6C;gBAGpD,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;IASxC,IAAI;
|
|
1
|
+
{"version":3,"file":"Logs.d.ts","sourceRoot":"","sources":["../../src/base/Logs.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAI5C,qBAAa,IAAK,YAAW,YAAY;IAE9B,IAAI,SAAyB;IAC7B,OAAO,EAAE,GAAG,CAA6C;gBAGpD,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;IASxC,IAAI;IAIJ;;;OAGG;IACI,QAAQ;IAIR,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAInB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIpB,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAInB,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAInB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIpB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAKpB,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;CAIhC;;AAED,wBAA0B"}
|
package/base/Logs.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2022.. Chy Bilgisayar Bilisim
|
|
5
|
-
* Author: Cihan Ozturk
|
|
6
|
-
* E-mail: cihan@chy.com.tr
|
|
7
|
-
* Github:https://github.com/cihan53/
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.Logs = void 0;
|
|
12
|
-
const log4js = require("log4js");
|
|
13
|
-
class Logs {
|
|
14
|
-
constructor(name, configs) {
|
|
15
|
-
var _a;
|
|
16
|
-
this.name = this.constructor.name;
|
|
17
|
-
this.configs = (_a = require('../log/config/log4js.json')) !== null && _a !== void 0 ? _a : {};
|
|
18
|
-
if (name)
|
|
19
|
-
this.name = name;
|
|
20
|
-
if (configs)
|
|
21
|
-
this.configs = configs;
|
|
22
|
-
this.Provider().configure(this.configs);
|
|
23
|
-
}
|
|
24
|
-
init() {
|
|
25
|
-
this.Provider().configure(this.configs);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* @constructor
|
|
30
|
-
*/
|
|
31
|
-
Provider() {
|
|
32
|
-
return log4js;
|
|
33
|
-
}
|
|
34
|
-
logs(...args) {
|
|
35
|
-
return log4js.getLogger(this.name);
|
|
36
|
-
}
|
|
37
|
-
debug(...args) {
|
|
38
|
-
this.logs().debug(...
|
|
39
|
-
}
|
|
40
|
-
info(...args) {
|
|
41
|
-
this.logs().info(...
|
|
42
|
-
}
|
|
43
|
-
warn(...args) {
|
|
44
|
-
this.logs().warn(...arguments);
|
|
45
|
-
}
|
|
46
|
-
error(...args) {
|
|
47
|
-
this.logs().error(...
|
|
48
|
-
}
|
|
49
|
-
fatal(...args) {
|
|
50
|
-
this.logs().fatal(...
|
|
51
|
-
}
|
|
52
|
-
warning(...args) {
|
|
53
|
-
this.logs().warn(...
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.Logs = Logs;
|
|
57
|
-
exports.default = new Logs();
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2022.. Chy Bilgisayar Bilisim
|
|
5
|
+
* Author: Cihan Ozturk
|
|
6
|
+
* E-mail: cihan@chy.com.tr
|
|
7
|
+
* Github:https://github.com/cihan53/
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.Logs = void 0;
|
|
12
|
+
const log4js = require("log4js");
|
|
13
|
+
class Logs {
|
|
14
|
+
constructor(name, configs) {
|
|
15
|
+
var _a;
|
|
16
|
+
this.name = this.constructor.name;
|
|
17
|
+
this.configs = (_a = require('../log/config/log4js.json')) !== null && _a !== void 0 ? _a : {};
|
|
18
|
+
if (name)
|
|
19
|
+
this.name = name;
|
|
20
|
+
if (configs)
|
|
21
|
+
this.configs = configs;
|
|
22
|
+
this.Provider().configure(this.configs);
|
|
23
|
+
}
|
|
24
|
+
init() {
|
|
25
|
+
this.Provider().configure(this.configs);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @constructor
|
|
30
|
+
*/
|
|
31
|
+
Provider() {
|
|
32
|
+
return log4js;
|
|
33
|
+
}
|
|
34
|
+
logs(...args) {
|
|
35
|
+
return log4js.getLogger(this.name);
|
|
36
|
+
}
|
|
37
|
+
debug(...args) {
|
|
38
|
+
this.logs().debug(...args);
|
|
39
|
+
}
|
|
40
|
+
info(...args) {
|
|
41
|
+
this.logs().info(...args);
|
|
42
|
+
}
|
|
43
|
+
warn(...args) {
|
|
44
|
+
this.logs().warn(...arguments);
|
|
45
|
+
}
|
|
46
|
+
error(...args) {
|
|
47
|
+
this.logs().error(...args);
|
|
48
|
+
}
|
|
49
|
+
fatal(...args) {
|
|
50
|
+
this.logs().fatal(...args);
|
|
51
|
+
}
|
|
52
|
+
warning(...args) {
|
|
53
|
+
this.logs().warn(...args);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.Logs = Logs;
|
|
57
|
+
exports.default = new Logs();
|