chyz 2.0.0-rc.3 → 2.0.0-rc.31

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.
Files changed (142) hide show
  1. package/BaseChyz.d.ts +62 -60
  2. package/BaseChyz.d.ts.map +1 -1
  3. package/BaseChyz.js +476 -379
  4. package/base/ActionFilter.d.ts +32 -32
  5. package/base/ActionFilter.d.ts.map +1 -1
  6. package/base/ActionFilter.js +82 -85
  7. package/base/BadRequestHttpException.d.ts +6 -0
  8. package/base/BadRequestHttpException.d.ts.map +1 -0
  9. package/base/BadRequestHttpException.js +17 -0
  10. package/base/BaseError.d.ts +31 -10
  11. package/base/BaseError.d.ts.map +1 -1
  12. package/base/BaseError.js +47 -29
  13. package/base/Behavior.d.ts +3 -3
  14. package/base/Behavior.js +7 -7
  15. package/base/CBaseObject.d.ts +4 -4
  16. package/base/CBaseObject.d.ts.map +1 -1
  17. package/base/CBaseObject.js +16 -16
  18. package/base/CEvents.d.ts +13 -0
  19. package/base/CEvents.d.ts.map +1 -0
  20. package/base/CEvents.js +24 -0
  21. package/base/CRequest.d.ts +2 -0
  22. package/base/CRequest.d.ts.map +1 -0
  23. package/base/CRequest.js +10 -0
  24. package/base/CWebController.d.ts +43 -43
  25. package/base/CWebController.d.ts.map +1 -1
  26. package/base/CWebController.js +81 -74
  27. package/base/Component.d.ts +20 -20
  28. package/base/Component.d.ts.map +1 -1
  29. package/base/Component.js +57 -60
  30. package/base/Configurable.d.ts +2 -2
  31. package/base/Configurable.js +8 -8
  32. package/base/DataErrorDbException.d.ts +5 -5
  33. package/base/DataErrorDbException.js +17 -17
  34. package/base/DbConnection.d.ts +12 -12
  35. package/base/DbConnection.js +53 -53
  36. package/base/ForbiddenHttpException.d.ts +4 -4
  37. package/base/ForbiddenHttpException.js +16 -16
  38. package/base/InvalidArgumentException.d.ts +5 -5
  39. package/base/InvalidArgumentException.js +17 -17
  40. package/base/InvalidConfigException.d.ts +5 -5
  41. package/base/InvalidConfigException.js +17 -17
  42. package/base/Logs.d.ts +22 -0
  43. package/base/Logs.d.ts.map +1 -0
  44. package/base/Logs.js +57 -0
  45. package/base/Model.d.ts +298 -298
  46. package/base/Model.d.ts.map +1 -1
  47. package/base/Model.js +509 -507
  48. package/base/ModelManager.d.ts +1 -1
  49. package/base/ModelManager.js +19 -19
  50. package/base/NotFoundHttpException.d.ts +5 -5
  51. package/base/NotFoundHttpException.js +17 -17
  52. package/base/RestClient.d.ts +6 -8
  53. package/base/RestClient.d.ts.map +1 -1
  54. package/base/RestClient.js +25 -26
  55. package/base/UnauthorizedHttpException.d.ts +5 -5
  56. package/base/UnauthorizedHttpException.js +17 -17
  57. package/base/ValidationHttpException.d.ts +5 -5
  58. package/base/ValidationHttpException.js +17 -17
  59. package/base/db/Exception.d.ts +6 -6
  60. package/base/db/Exception.js +15 -15
  61. package/base/index.d.ts +19 -17
  62. package/base/index.d.ts.map +1 -1
  63. package/base/index.js +41 -37
  64. package/decorator/Middleware.d.ts +3 -3
  65. package/decorator/Middleware.js +11 -11
  66. package/decorator/controller.d.ts +2 -2
  67. package/decorator/controller.js +24 -24
  68. package/decorator/delete.d.ts +3 -0
  69. package/decorator/delete.d.ts.map +1 -0
  70. package/decorator/delete.js +36 -0
  71. package/decorator/enums/ControllerDecoratorParams.d.ts +5 -5
  72. package/decorator/enums/ControllerDecoratorParams.js +9 -9
  73. package/decorator/get.d.ts +2 -2
  74. package/decorator/get.js +36 -36
  75. package/decorator/index.d.ts +5 -3
  76. package/decorator/index.d.ts.map +1 -1
  77. package/decorator/index.js +13 -9
  78. package/decorator/post.d.ts +2 -2
  79. package/decorator/post.js +36 -36
  80. package/decorator/put.d.ts +3 -0
  81. package/decorator/put.d.ts.map +1 -0
  82. package/decorator/put.js +36 -0
  83. package/filters/AccessControl.d.ts +12 -12
  84. package/filters/AccessControl.d.ts.map +1 -1
  85. package/filters/AccessControl.js +83 -86
  86. package/filters/AccessRule.d.ts +82 -82
  87. package/filters/AccessRule.d.ts.map +1 -1
  88. package/filters/AccessRule.js +136 -140
  89. package/filters/auth/AuthInterface.d.ts +25 -25
  90. package/filters/auth/AuthInterface.js +2 -2
  91. package/filters/auth/AuthMethod.d.ts +37 -37
  92. package/filters/auth/AuthMethod.js +82 -82
  93. package/filters/auth/HttpBasicAuth.d.ts +22 -22
  94. package/filters/auth/HttpBasicAuth.js +72 -72
  95. package/filters/auth/HttpBearerAuth.d.ts +17 -17
  96. package/filters/auth/HttpBearerAuth.js +32 -32
  97. package/filters/auth/HttpHeaderAuth.d.ts +14 -14
  98. package/filters/auth/HttpHeaderAuth.js +57 -60
  99. package/filters/auth/JwtHttpBearerAuth.d.ts +20 -20
  100. package/filters/auth/JwtHttpBearerAuth.d.ts.map +1 -1
  101. package/filters/auth/JwtHttpBearerAuth.js +87 -81
  102. package/filters/auth/KeyCloakHttpBearerAuth.d.ts +22 -22
  103. package/filters/auth/KeyCloakHttpBearerAuth.js +116 -116
  104. package/filters/auth/index.d.ts +4 -4
  105. package/filters/auth/index.js +11 -11
  106. package/filters/index.d.ts +2 -2
  107. package/filters/index.js +7 -7
  108. package/index.d.ts +21 -16
  109. package/index.d.ts.map +1 -1
  110. package/index.js +61 -71
  111. package/model/RouteDefinition.d.ts +6 -6
  112. package/model/RouteDefinition.js +8 -8
  113. package/package.json +22 -26
  114. package/rbac/AuthAssignment.d.ts +18 -18
  115. package/rbac/AuthAssignment.js +44 -44
  116. package/rbac/AuthItem.d.ts +26 -26
  117. package/rbac/AuthItem.js +51 -51
  118. package/rbac/AuthItemChild.d.ts +18 -18
  119. package/rbac/AuthItemChild.js +43 -43
  120. package/rbac/AuthManager.d.ts +111 -111
  121. package/rbac/AuthManager.d.ts.map +1 -1
  122. package/rbac/AuthManager.js +357 -358
  123. package/requiments/Glob.d.ts +2 -2
  124. package/requiments/Glob.js +10 -10
  125. package/requiments/ReflectUtil.js +24 -24
  126. package/requiments/Utils.d.ts +8 -2
  127. package/requiments/Utils.d.ts.map +1 -1
  128. package/requiments/Utils.js +125 -110
  129. package/validators/BooleanValidator.js +1 -1
  130. package/validators/CompareValidator.js +1 -1
  131. package/validators/DateValidator.js +1 -1
  132. package/validators/EmailValidator.js +1 -1
  133. package/validators/Validator.d.ts +17 -17
  134. package/validators/Validator.js +27 -27
  135. package/web/IdentityInterface.d.ts +54 -54
  136. package/web/IdentityInterface.d.ts.map +1 -1
  137. package/web/IdentityInterface.js +8 -8
  138. package/web/WebUser.d.ts +71 -71
  139. package/web/WebUser.js +165 -165
  140. package/base/Logger.d.ts +0 -18
  141. package/base/Logger.d.ts.map +0 -1
  142. package/base/Logger.js +0 -49
@@ -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 ADDED
@@ -0,0 +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;
22
+ //# sourceMappingURL=Logs.d.ts.map
@@ -0,0 +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;IAKJ;;;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 ADDED
@@ -0,0 +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(...arguments);
39
+ }
40
+ info(...args) {
41
+ this.logs().info(...arguments);
42
+ }
43
+ warn(...args) {
44
+ this.logs().warn(...arguments);
45
+ }
46
+ error(...args) {
47
+ this.logs().error(...arguments);
48
+ }
49
+ fatal(...args) {
50
+ this.logs().fatal(...arguments);
51
+ }
52
+ warning(...args) {
53
+ this.logs().warn(...arguments);
54
+ }
55
+ }
56
+ exports.Logs = Logs;
57
+ exports.default = new Logs();