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.
Files changed (153) hide show
  1. package/BaseChyz.d.ts +73 -56
  2. package/BaseChyz.d.ts.map +1 -1
  3. package/BaseChyz.js +569 -404
  4. package/README.md +1 -1
  5. package/base/ActionFilter.d.ts +32 -32
  6. package/base/ActionFilter.d.ts.map +1 -1
  7. package/base/ActionFilter.js +82 -82
  8. package/base/BadRequestHttpException.d.ts +6 -0
  9. package/base/BadRequestHttpException.d.ts.map +1 -0
  10. package/base/BadRequestHttpException.js +17 -0
  11. package/base/BaseError.d.ts +43 -10
  12. package/base/BaseError.d.ts.map +1 -1
  13. package/base/BaseError.js +58 -26
  14. package/base/Behavior.d.ts +3 -3
  15. package/base/Behavior.js +7 -7
  16. package/base/CBaseObject.d.ts +4 -4
  17. package/base/CBaseObject.d.ts.map +1 -1
  18. package/base/CBaseObject.js +16 -16
  19. package/base/CEvents.d.ts +13 -0
  20. package/base/CEvents.d.ts.map +1 -0
  21. package/base/CEvents.js +24 -0
  22. package/base/CRequest.d.ts +1 -1
  23. package/base/CRequest.js +10 -10
  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 -57
  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.d.ts.map +1 -1
  34. package/base/DataErrorDbException.js +17 -17
  35. package/base/DbConnection.d.ts +12 -12
  36. package/base/DbConnection.js +53 -53
  37. package/base/ForbiddenHttpException.d.ts +4 -4
  38. package/base/ForbiddenHttpException.d.ts.map +1 -1
  39. package/base/ForbiddenHttpException.js +16 -16
  40. package/base/InvalidArgumentException.d.ts +5 -5
  41. package/base/InvalidArgumentException.d.ts.map +1 -1
  42. package/base/InvalidArgumentException.js +17 -17
  43. package/base/InvalidConfigException.d.ts +5 -5
  44. package/base/InvalidConfigException.d.ts.map +1 -1
  45. package/base/InvalidConfigException.js +17 -17
  46. package/base/Logs.d.ts +21 -21
  47. package/base/Logs.d.ts.map +1 -1
  48. package/base/Logs.js +57 -57
  49. package/base/Model.d.ts +301 -298
  50. package/base/Model.d.ts.map +1 -1
  51. package/base/Model.js +545 -507
  52. package/base/ModelManager.d.ts +1 -1
  53. package/base/ModelManager.js +19 -19
  54. package/base/NotFoundHttpException.d.ts +5 -5
  55. package/base/NotFoundHttpException.d.ts.map +1 -1
  56. package/base/NotFoundHttpException.js +17 -17
  57. package/base/RestClient.d.ts +6 -6
  58. package/base/RestClient.d.ts.map +1 -1
  59. package/base/RestClient.js +25 -25
  60. package/base/UnauthorizedHttpException.d.ts +5 -5
  61. package/base/UnauthorizedHttpException.d.ts.map +1 -1
  62. package/base/UnauthorizedHttpException.js +17 -17
  63. package/base/ValidationHttpException.d.ts +5 -5
  64. package/base/ValidationHttpException.d.ts.map +1 -1
  65. package/base/ValidationHttpException.js +17 -17
  66. package/base/db/Exception.d.ts +6 -6
  67. package/base/db/Exception.js +15 -15
  68. package/base/index.d.ts +19 -18
  69. package/base/index.d.ts.map +1 -1
  70. package/base/index.js +41 -39
  71. package/decorator/Middleware.d.ts +3 -3
  72. package/decorator/Middleware.js +11 -11
  73. package/decorator/controller.d.ts +2 -2
  74. package/decorator/controller.js +24 -24
  75. package/decorator/delete.d.ts +3 -0
  76. package/decorator/delete.d.ts.map +1 -0
  77. package/decorator/delete.js +36 -0
  78. package/decorator/enums/ControllerDecoratorParams.d.ts +5 -5
  79. package/decorator/enums/ControllerDecoratorParams.js +9 -9
  80. package/decorator/get.d.ts +2 -2
  81. package/decorator/get.js +36 -36
  82. package/decorator/index.d.ts +5 -3
  83. package/decorator/index.d.ts.map +1 -1
  84. package/decorator/index.js +13 -9
  85. package/decorator/post.d.ts +2 -2
  86. package/decorator/post.js +36 -36
  87. package/decorator/put.d.ts +3 -0
  88. package/decorator/put.d.ts.map +1 -0
  89. package/decorator/put.js +36 -0
  90. package/filters/AccessControl.d.ts +12 -12
  91. package/filters/AccessControl.d.ts.map +1 -1
  92. package/filters/AccessControl.js +83 -83
  93. package/filters/AccessRule.d.ts +82 -82
  94. package/filters/AccessRule.d.ts.map +1 -1
  95. package/filters/AccessRule.js +136 -137
  96. package/filters/auth/AuthInterface.d.ts +25 -25
  97. package/filters/auth/AuthInterface.js +2 -2
  98. package/filters/auth/AuthMethod.d.ts +37 -37
  99. package/filters/auth/AuthMethod.d.ts.map +1 -1
  100. package/filters/auth/AuthMethod.js +82 -82
  101. package/filters/auth/HttpBasicAuth.d.ts +23 -22
  102. package/filters/auth/HttpBasicAuth.d.ts.map +1 -1
  103. package/filters/auth/HttpBasicAuth.js +78 -72
  104. package/filters/auth/HttpBearerAuth.d.ts +17 -17
  105. package/filters/auth/HttpBearerAuth.d.ts.map +1 -1
  106. package/filters/auth/HttpBearerAuth.js +33 -32
  107. package/filters/auth/HttpHeaderAuth.d.ts +18 -14
  108. package/filters/auth/HttpHeaderAuth.d.ts.map +1 -1
  109. package/filters/auth/HttpHeaderAuth.js +64 -57
  110. package/filters/auth/JwtHttpBearerAuth.d.ts +20 -20
  111. package/filters/auth/JwtHttpBearerAuth.d.ts.map +1 -1
  112. package/filters/auth/JwtHttpBearerAuth.js +87 -81
  113. package/filters/auth/KeyCloakHttpBearerAuth.d.ts +22 -22
  114. package/filters/auth/KeyCloakHttpBearerAuth.js +116 -116
  115. package/filters/auth/index.d.ts +4 -4
  116. package/filters/auth/index.js +11 -11
  117. package/filters/index.d.ts +2 -2
  118. package/filters/index.js +7 -7
  119. package/index.d.ts +28 -21
  120. package/index.d.ts.map +1 -1
  121. package/index.js +71 -60
  122. package/model/RouteDefinition.d.ts +6 -6
  123. package/model/RouteDefinition.js +8 -8
  124. package/package.json +22 -24
  125. package/rbac/AuthAssignment.d.ts +18 -18
  126. package/rbac/AuthAssignment.js +44 -44
  127. package/rbac/AuthItem.d.ts +26 -26
  128. package/rbac/AuthItem.js +51 -51
  129. package/rbac/AuthItemChild.d.ts +18 -18
  130. package/rbac/AuthItemChild.js +43 -43
  131. package/rbac/AuthManager.d.ts +111 -111
  132. package/rbac/AuthManager.d.ts.map +1 -1
  133. package/rbac/AuthManager.js +356 -355
  134. package/rbac/index.d.ts +5 -0
  135. package/rbac/index.d.ts.map +1 -0
  136. package/rbac/index.js +28 -0
  137. package/requiments/Glob.d.ts +2 -2
  138. package/requiments/Glob.js +10 -10
  139. package/requiments/ReflectUtil.js +24 -24
  140. package/requiments/Utils.d.ts +1 -8
  141. package/requiments/Utils.d.ts.map +1 -1
  142. package/requiments/Utils.js +115 -112
  143. package/validators/BooleanValidator.js +1 -1
  144. package/validators/CompareValidator.js +1 -1
  145. package/validators/DateValidator.js +1 -1
  146. package/validators/EmailValidator.js +1 -1
  147. package/validators/Validator.d.ts +17 -17
  148. package/validators/Validator.js +27 -27
  149. package/web/IdentityInterface.d.ts +55 -54
  150. package/web/IdentityInterface.d.ts.map +1 -1
  151. package/web/IdentityInterface.js +8 -8
  152. package/web/WebUser.d.ts +71 -71
  153. package/web/WebUser.js +165 -165
@@ -1,2 +1,2 @@
1
- export declare const ModelManager: any;
1
+ export declare const ModelManager: any;
2
2
  //# sourceMappingURL=ModelManager.d.ts.map
@@ -1,19 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ModelManager = void 0;
4
- /*
5
- *
6
- * Copyright (c) 2021.. Chy Bilgisayar Bilisim
7
- * Author: Cihan Ozturk
8
- * E-mail: cihan@chy.com.tr
9
- * Github:https://github.com/cihan53/
10
- *
11
- */
12
- // interface ObjectConstructor {
13
- // _register(o: Model): void;
14
- // }
15
- exports.ModelManager = {
16
- _register(map) {
17
- Object.assign(this, map);
18
- }
19
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModelManager = void 0;
4
+ /*
5
+ *
6
+ * Copyright (c) 2021.. Chy Bilgisayar Bilisim
7
+ * Author: Cihan Ozturk
8
+ * E-mail: cihan@chy.com.tr
9
+ * Github:https://github.com/cihan53/
10
+ *
11
+ */
12
+ // interface ObjectConstructor {
13
+ // _register(o: Model): void;
14
+ // }
15
+ exports.ModelManager = {
16
+ _register(map) {
17
+ Object.assign(this, map);
18
+ }
19
+ };
@@ -1,6 +1,6 @@
1
- import { BaseError } from "./BaseError";
2
- export declare class NotFoundHttpException extends BaseError {
3
- message: string;
4
- constructor(message: string);
5
- }
1
+ import { BaseError } from "./BaseError";
2
+ export declare class NotFoundHttpException extends BaseError {
3
+ message: any;
4
+ constructor(message: any);
5
+ }
6
6
  //# sourceMappingURL=NotFoundHttpException.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NotFoundHttpException.d.ts","sourceRoot":"","sources":["../../src/base/NotFoundHttpException.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,qBAAsB,SAAQ,SAAS;IAC3B,OAAO,EAAE,MAAM;gBAAf,OAAO,EAAE,MAAM;CAGvC"}
1
+ {"version":3,"file":"NotFoundHttpException.d.ts","sourceRoot":"","sources":["../../src/base/NotFoundHttpException.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,qBAAsB,SAAQ,SAAS;IAC3B,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.NotFoundHttpException = void 0;
10
- const BaseError_1 = require("./BaseError");
11
- class NotFoundHttpException extends BaseError_1.BaseError {
12
- constructor(message) {
13
- super(message, 404);
14
- this.message = message;
15
- }
16
- }
17
- exports.NotFoundHttpException = NotFoundHttpException;
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.NotFoundHttpException = void 0;
10
+ const BaseError_1 = require("./BaseError");
11
+ class NotFoundHttpException extends BaseError_1.BaseError {
12
+ constructor(message) {
13
+ super(message, 404);
14
+ this.message = message;
15
+ }
16
+ }
17
+ exports.NotFoundHttpException = NotFoundHttpException;
@@ -1,7 +1,7 @@
1
- import { Component } from "./Component";
2
- export declare class RestClient extends Component {
3
- post(url: string, args: any[], headers?: any): any;
4
- get(url: string, args: any[], headers?: any): any;
5
- Rest(params: any): any;
6
- }
1
+ import { Component } from "./Component";
2
+ export declare class RestClient extends Component {
3
+ post(url: string, args?: any, headers?: any): any;
4
+ get(url: string, args?: any, headers?: any): any;
5
+ Rest(params: any): any;
6
+ }
7
7
  //# sourceMappingURL=RestClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RestClient.d.ts","sourceRoot":"","sources":["../../src/base/RestClient.ts"],"names":[],"mappings":"AAUA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAItC,qBAAa,UAAW,SAAQ,SAAS;IAC9B,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAC,OAAO,GAAC,GAAM;IAI5C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAC,OAAO,GAAC,GAAM;IAI3C,IAAI,CAAC,MAAM,EAAE,GAAG;CAG1B"}
1
+ {"version":3,"file":"RestClient.d.ts","sourceRoot":"","sources":["../../src/base/RestClient.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAItC,qBAAa,UAAW,SAAQ,SAAS;IAC9B,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAC,OAAO,CAAC,EAAC,GAAG;IAIzC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAC,OAAO,CAAC,EAAC,GAAG;IAIxC,IAAI,CAAC,MAAM,EAAE,GAAG;CAG1B"}
@@ -1,25 +1,25 @@
1
- "use strict";
2
- /*
3
- *
4
- * Copyright (c) 2021.. 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.RestClient = void 0;
12
- const Component_1 = require("./Component");
13
- const axios = require('axios');
14
- class RestClient extends Component_1.Component {
15
- post(url, args, headers = {}) {
16
- return axios.post(url, args, headers);
17
- }
18
- get(url, args, headers = {}) {
19
- return axios.get(url, args, headers);
20
- }
21
- Rest(params) {
22
- return axios(params);
23
- }
24
- }
25
- exports.RestClient = RestClient;
1
+ "use strict";
2
+ /*
3
+ *
4
+ * Copyright (c) 2021.. 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.RestClient = void 0;
12
+ const Component_1 = require("./Component");
13
+ const axios = require('axios');
14
+ class RestClient extends Component_1.Component {
15
+ post(url, args, headers) {
16
+ return axios.post(url, args, headers);
17
+ }
18
+ get(url, args, headers) {
19
+ return axios.get(url, args, headers);
20
+ }
21
+ Rest(params) {
22
+ return axios(params);
23
+ }
24
+ }
25
+ exports.RestClient = RestClient;
@@ -1,6 +1,6 @@
1
- import { BaseError } from "./BaseError";
2
- export declare class UnauthorizedHttpException extends BaseError {
3
- message: string;
4
- constructor(message: string);
5
- }
1
+ import { BaseError } from "./BaseError";
2
+ export declare class UnauthorizedHttpException extends BaseError {
3
+ message: any;
4
+ constructor(message: any);
5
+ }
6
6
  //# sourceMappingURL=UnauthorizedHttpException.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UnauthorizedHttpException.d.ts","sourceRoot":"","sources":["../../src/base/UnauthorizedHttpException.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,yBAA0B,SAAQ,SAAS;IAC/B,OAAO,EAAE,MAAM;gBAAf,OAAO,EAAE,MAAM;CAIvC"}
1
+ {"version":3,"file":"UnauthorizedHttpException.d.ts","sourceRoot":"","sources":["../../src/base/UnauthorizedHttpException.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,yBAA0B,SAAQ,SAAS;IAC/B,OAAO,EAAE,GAAG;gBAAZ,OAAO,EAAE,GAAG;CAIpC"}
@@ -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.UnauthorizedHttpException = void 0;
10
- const BaseError_1 = require("./BaseError");
11
- class UnauthorizedHttpException extends BaseError_1.BaseError {
12
- constructor(message) {
13
- super(message, 401);
14
- this.message = message;
15
- }
16
- }
17
- exports.UnauthorizedHttpException = UnauthorizedHttpException;
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.UnauthorizedHttpException = void 0;
10
+ const BaseError_1 = require("./BaseError");
11
+ class UnauthorizedHttpException extends BaseError_1.BaseError {
12
+ constructor(message) {
13
+ super(message, 401);
14
+ this.message = message;
15
+ }
16
+ }
17
+ exports.UnauthorizedHttpException = UnauthorizedHttpException;
@@ -1,6 +1,6 @@
1
- import { BaseError } from "./BaseError";
2
- export declare class ValidationHttpException extends BaseError {
3
- message: string;
4
- constructor(message: string);
5
- }
1
+ import { BaseError } from "./BaseError";
2
+ export declare class ValidationHttpException extends BaseError {
3
+ message: any;
4
+ constructor(message: any);
5
+ }
6
6
  //# sourceMappingURL=ValidationHttpException.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ValidationHttpException.d.ts","sourceRoot":"","sources":["../../src/base/ValidationHttpException.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,uBAAwB,SAAQ,SAAS;IAC7B,OAAO,EAAE,MAAM;gBAAf,OAAO,EAAE,MAAM;CAGvC"}
1
+ {"version":3,"file":"ValidationHttpException.d.ts","sourceRoot":"","sources":["../../src/base/ValidationHttpException.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAC;AAEtC,qBAAa,uBAAwB,SAAQ,SAAS;IAC7B,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.ValidationHttpException = void 0;
10
- const BaseError_1 = require("./BaseError");
11
- class ValidationHttpException extends BaseError_1.BaseError {
12
- constructor(message) {
13
- super(message, 403);
14
- this.message = message;
15
- }
16
- }
17
- exports.ValidationHttpException = ValidationHttpException;
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.ValidationHttpException = void 0;
10
+ const BaseError_1 = require("./BaseError");
11
+ class ValidationHttpException extends BaseError_1.BaseError {
12
+ constructor(message) {
13
+ super(message, 400);
14
+ this.message = message;
15
+ }
16
+ }
17
+ exports.ValidationHttpException = ValidationHttpException;
@@ -1,7 +1,7 @@
1
- import { BaseError } from "../BaseError";
2
- export declare class Exception extends BaseError {
3
- errorInfo: never[];
4
- protected code: string;
5
- constructor(message: string, errorInfo?: any, code?: string, previous?: null);
6
- }
1
+ import { BaseError } from "../BaseError";
2
+ export declare class Exception extends BaseError {
3
+ errorInfo: never[];
4
+ protected code: string;
5
+ constructor(message: string, errorInfo?: any, code?: string, previous?: null);
6
+ }
7
7
  //# sourceMappingURL=Exception.d.ts.map
@@ -1,15 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Exception = void 0;
4
- const BaseError_1 = require("../BaseError");
5
- class Exception extends BaseError_1.BaseError {
6
- constructor(message, errorInfo = [], code = '', previous = null) {
7
- super(message);
8
- this.errorInfo = [];
9
- this.errorInfo = errorInfo;
10
- this.name = 'Database Exception'; // good practice
11
- this.code = code; // error code for responding to client
12
- Error.captureStackTrace(this);
13
- }
14
- }
15
- exports.Exception = Exception;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Exception = void 0;
4
+ const BaseError_1 = require("../BaseError");
5
+ class Exception extends BaseError_1.BaseError {
6
+ constructor(message, errorInfo = [], code = '', previous = null) {
7
+ super(message);
8
+ this.errorInfo = [];
9
+ this.errorInfo = errorInfo;
10
+ this.name = 'Database Exception'; // good practice
11
+ this.code = code; // error code for responding to client
12
+ Error.captureStackTrace(this);
13
+ }
14
+ }
15
+ exports.Exception = Exception;
package/base/index.d.ts CHANGED
@@ -1,19 +1,20 @@
1
- export { Logs } from "./Logs";
2
- export { BaseError } from "./BaseError";
3
- export { ActionFilter } from "./ActionFilter";
4
- export { Behavior } from "./Behavior";
5
- export { Component } from "./Component";
6
- export { Configurable } from "./Configurable";
7
- export { CWebController } from "./CWebController";
8
- export { DbConnection } from "./DbConnection";
9
- export { ForbiddenHttpException } from "./ForbiddenHttpException";
10
- export { InvalidConfigException } from "./InvalidConfigException";
11
- export { InvalidArgumentException } from "./InvalidArgumentException";
12
- export { NotFoundHttpException } from "./NotFoundHttpException";
13
- export { UnauthorizedHttpException } from "./UnauthorizedHttpException";
14
- export { DataErrorDbException } from "./DataErrorDbException";
15
- export { ValidationHttpException } from "./ValidationHttpException";
16
- export { Model, Relation, DataTypes, NOW } from "./Model";
17
- export { RestClient } from "./RestClient";
18
- export { ModelManager } from "./ModelManager";
1
+ export { Logs } from "./Logs";
2
+ export { BaseError } from "./BaseError";
3
+ export { ActionFilter } from "./ActionFilter";
4
+ export { Behavior } from "./Behavior";
5
+ export { Component } from "./Component";
6
+ export { Configurable } from "./Configurable";
7
+ export { CWebController } from "./CWebController";
8
+ export { DbConnection } from "./DbConnection";
9
+ export { ForbiddenHttpException } from "./ForbiddenHttpException";
10
+ export { InvalidConfigException } from "./InvalidConfigException";
11
+ export { InvalidArgumentException } from "./InvalidArgumentException";
12
+ export { NotFoundHttpException } from "./NotFoundHttpException";
13
+ export { UnauthorizedHttpException } from "./UnauthorizedHttpException";
14
+ export { DataErrorDbException } from "./DataErrorDbException";
15
+ export { ValidationHttpException } from "./ValidationHttpException";
16
+ export { Model, Relation, DataTypes, NOW } from "./Model";
17
+ export { RestClient } from "./RestClient";
18
+ export { ModelManager } from "./ModelManager";
19
+ export { CEvents } from "./CEvents";
19
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAA;AAC3B,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AACrC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAA;AACnC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AACrC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAC,yBAAyB,EAAC,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAC,uBAAuB,EAAC,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAC,KAAK,EAAC,QAAQ,EAAC,SAAS,EAAE,GAAG,EAAC,MAAM,SAAS,CAAA;AACrD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,QAAQ,CAAA;AAC3B,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AACrC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAA;AACnC,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AACrC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAC,sBAAsB,EAAC,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAC,yBAAyB,EAAC,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAA;AAC3D,OAAO,EAAC,uBAAuB,EAAC,MAAM,2BAA2B,CAAA;AACjE,OAAO,EAAC,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,EAAC,MAAM,SAAS,CAAA;AACvD,OAAO,EAAC,UAAU,EAAC,MAAM,cAAc,CAAA;AACvC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA"}
package/base/index.js CHANGED
@@ -1,39 +1,41 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ModelManager = exports.RestClient = exports.NOW = exports.DataTypes = exports.Model = exports.ValidationHttpException = exports.DataErrorDbException = exports.UnauthorizedHttpException = exports.NotFoundHttpException = exports.InvalidArgumentException = exports.InvalidConfigException = exports.ForbiddenHttpException = exports.DbConnection = exports.CWebController = exports.Component = exports.Behavior = exports.ActionFilter = exports.BaseError = exports.Logs = void 0;
4
- var Logs_1 = require("./Logs");
5
- Object.defineProperty(exports, "Logs", { enumerable: true, get: function () { return Logs_1.Logs; } });
6
- var BaseError_1 = require("./BaseError");
7
- Object.defineProperty(exports, "BaseError", { enumerable: true, get: function () { return BaseError_1.BaseError; } });
8
- var ActionFilter_1 = require("./ActionFilter");
9
- Object.defineProperty(exports, "ActionFilter", { enumerable: true, get: function () { return ActionFilter_1.ActionFilter; } });
10
- var Behavior_1 = require("./Behavior");
11
- Object.defineProperty(exports, "Behavior", { enumerable: true, get: function () { return Behavior_1.Behavior; } });
12
- var Component_1 = require("./Component");
13
- Object.defineProperty(exports, "Component", { enumerable: true, get: function () { return Component_1.Component; } });
14
- var CWebController_1 = require("./CWebController");
15
- Object.defineProperty(exports, "CWebController", { enumerable: true, get: function () { return CWebController_1.CWebController; } });
16
- var DbConnection_1 = require("./DbConnection");
17
- Object.defineProperty(exports, "DbConnection", { enumerable: true, get: function () { return DbConnection_1.DbConnection; } });
18
- var ForbiddenHttpException_1 = require("./ForbiddenHttpException");
19
- Object.defineProperty(exports, "ForbiddenHttpException", { enumerable: true, get: function () { return ForbiddenHttpException_1.ForbiddenHttpException; } });
20
- var InvalidConfigException_1 = require("./InvalidConfigException");
21
- Object.defineProperty(exports, "InvalidConfigException", { enumerable: true, get: function () { return InvalidConfigException_1.InvalidConfigException; } });
22
- var InvalidArgumentException_1 = require("./InvalidArgumentException");
23
- Object.defineProperty(exports, "InvalidArgumentException", { enumerable: true, get: function () { return InvalidArgumentException_1.InvalidArgumentException; } });
24
- var NotFoundHttpException_1 = require("./NotFoundHttpException");
25
- Object.defineProperty(exports, "NotFoundHttpException", { enumerable: true, get: function () { return NotFoundHttpException_1.NotFoundHttpException; } });
26
- var UnauthorizedHttpException_1 = require("./UnauthorizedHttpException");
27
- Object.defineProperty(exports, "UnauthorizedHttpException", { enumerable: true, get: function () { return UnauthorizedHttpException_1.UnauthorizedHttpException; } });
28
- var DataErrorDbException_1 = require("./DataErrorDbException");
29
- Object.defineProperty(exports, "DataErrorDbException", { enumerable: true, get: function () { return DataErrorDbException_1.DataErrorDbException; } });
30
- var ValidationHttpException_1 = require("./ValidationHttpException");
31
- Object.defineProperty(exports, "ValidationHttpException", { enumerable: true, get: function () { return ValidationHttpException_1.ValidationHttpException; } });
32
- var Model_1 = require("./Model");
33
- Object.defineProperty(exports, "Model", { enumerable: true, get: function () { return Model_1.Model; } });
34
- Object.defineProperty(exports, "DataTypes", { enumerable: true, get: function () { return Model_1.DataTypes; } });
35
- Object.defineProperty(exports, "NOW", { enumerable: true, get: function () { return Model_1.NOW; } });
36
- var RestClient_1 = require("./RestClient");
37
- Object.defineProperty(exports, "RestClient", { enumerable: true, get: function () { return RestClient_1.RestClient; } });
38
- var ModelManager_1 = require("./ModelManager");
39
- Object.defineProperty(exports, "ModelManager", { enumerable: true, get: function () { return ModelManager_1.ModelManager; } });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CEvents = exports.ModelManager = exports.RestClient = exports.NOW = exports.DataTypes = exports.Model = exports.ValidationHttpException = exports.DataErrorDbException = exports.UnauthorizedHttpException = exports.NotFoundHttpException = exports.InvalidArgumentException = exports.InvalidConfigException = exports.ForbiddenHttpException = exports.DbConnection = exports.CWebController = exports.Component = exports.Behavior = exports.ActionFilter = exports.BaseError = exports.Logs = void 0;
4
+ var Logs_1 = require("./Logs");
5
+ Object.defineProperty(exports, "Logs", { enumerable: true, get: function () { return Logs_1.Logs; } });
6
+ var BaseError_1 = require("./BaseError");
7
+ Object.defineProperty(exports, "BaseError", { enumerable: true, get: function () { return BaseError_1.BaseError; } });
8
+ var ActionFilter_1 = require("./ActionFilter");
9
+ Object.defineProperty(exports, "ActionFilter", { enumerable: true, get: function () { return ActionFilter_1.ActionFilter; } });
10
+ var Behavior_1 = require("./Behavior");
11
+ Object.defineProperty(exports, "Behavior", { enumerable: true, get: function () { return Behavior_1.Behavior; } });
12
+ var Component_1 = require("./Component");
13
+ Object.defineProperty(exports, "Component", { enumerable: true, get: function () { return Component_1.Component; } });
14
+ var CWebController_1 = require("./CWebController");
15
+ Object.defineProperty(exports, "CWebController", { enumerable: true, get: function () { return CWebController_1.CWebController; } });
16
+ var DbConnection_1 = require("./DbConnection");
17
+ Object.defineProperty(exports, "DbConnection", { enumerable: true, get: function () { return DbConnection_1.DbConnection; } });
18
+ var ForbiddenHttpException_1 = require("./ForbiddenHttpException");
19
+ Object.defineProperty(exports, "ForbiddenHttpException", { enumerable: true, get: function () { return ForbiddenHttpException_1.ForbiddenHttpException; } });
20
+ var InvalidConfigException_1 = require("./InvalidConfigException");
21
+ Object.defineProperty(exports, "InvalidConfigException", { enumerable: true, get: function () { return InvalidConfigException_1.InvalidConfigException; } });
22
+ var InvalidArgumentException_1 = require("./InvalidArgumentException");
23
+ Object.defineProperty(exports, "InvalidArgumentException", { enumerable: true, get: function () { return InvalidArgumentException_1.InvalidArgumentException; } });
24
+ var NotFoundHttpException_1 = require("./NotFoundHttpException");
25
+ Object.defineProperty(exports, "NotFoundHttpException", { enumerable: true, get: function () { return NotFoundHttpException_1.NotFoundHttpException; } });
26
+ var UnauthorizedHttpException_1 = require("./UnauthorizedHttpException");
27
+ Object.defineProperty(exports, "UnauthorizedHttpException", { enumerable: true, get: function () { return UnauthorizedHttpException_1.UnauthorizedHttpException; } });
28
+ var DataErrorDbException_1 = require("./DataErrorDbException");
29
+ Object.defineProperty(exports, "DataErrorDbException", { enumerable: true, get: function () { return DataErrorDbException_1.DataErrorDbException; } });
30
+ var ValidationHttpException_1 = require("./ValidationHttpException");
31
+ Object.defineProperty(exports, "ValidationHttpException", { enumerable: true, get: function () { return ValidationHttpException_1.ValidationHttpException; } });
32
+ var Model_1 = require("./Model");
33
+ Object.defineProperty(exports, "Model", { enumerable: true, get: function () { return Model_1.Model; } });
34
+ Object.defineProperty(exports, "DataTypes", { enumerable: true, get: function () { return Model_1.DataTypes; } });
35
+ Object.defineProperty(exports, "NOW", { enumerable: true, get: function () { return Model_1.NOW; } });
36
+ var RestClient_1 = require("./RestClient");
37
+ Object.defineProperty(exports, "RestClient", { enumerable: true, get: function () { return RestClient_1.RestClient; } });
38
+ var ModelManager_1 = require("./ModelManager");
39
+ Object.defineProperty(exports, "ModelManager", { enumerable: true, get: function () { return ModelManager_1.ModelManager; } });
40
+ var CEvents_1 = require("./CEvents");
41
+ Object.defineProperty(exports, "CEvents", { enumerable: true, get: function () { return CEvents_1.CEvents; } });
@@ -1,4 +1,4 @@
1
- import "reflect-metadata";
2
- import { RequestHandler } from "express";
3
- export declare function Middleware(middlewares: RequestHandler[]): Function;
1
+ import "reflect-metadata";
2
+ import { RequestHandler } from "express";
3
+ export declare function Middleware(middlewares: RequestHandler[]): Function;
4
4
  //# sourceMappingURL=Middleware.d.ts.map
@@ -1,11 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Middleware = void 0;
4
- require("reflect-metadata");
5
- const ControllerDecoratorParams_1 = require("./enums/ControllerDecoratorParams");
6
- function Middleware(middlewares) {
7
- return function (target, propertyKey) {
8
- Reflect.defineMetadata(ControllerDecoratorParams_1.ControllerDecoratorParams.Middleware, middlewares, target, propertyKey);
9
- };
10
- }
11
- exports.Middleware = Middleware;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Middleware = void 0;
4
+ require("reflect-metadata");
5
+ const ControllerDecoratorParams_1 = require("./enums/ControllerDecoratorParams");
6
+ function Middleware(middlewares) {
7
+ return function (target, propertyKey) {
8
+ Reflect.defineMetadata(ControllerDecoratorParams_1.ControllerDecoratorParams.Middleware, middlewares, target, propertyKey);
9
+ };
10
+ }
11
+ exports.Middleware = Middleware;
@@ -1,3 +1,3 @@
1
- import "reflect-metadata";
2
- export declare const controller: (prefix?: string) => ClassDecorator;
1
+ import "reflect-metadata";
2
+ export declare const controller: (prefix?: string) => ClassDecorator;
3
3
  //# sourceMappingURL=controller.d.ts.map
@@ -1,24 +1,24 @@
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.controller = void 0;
10
- // @ts-ignore
11
- require("reflect-metadata");
12
- const controller = (prefix = '') => {
13
- return (target) => {
14
- // @ts-ignore
15
- Reflect.defineMetadata('prefix', prefix, target);
16
- // Since routes are set by our methods this should almost never be true (except the controller has no methods)
17
- // @ts-ignore
18
- if (!Reflect.hasMetadata('routes', target)) {
19
- // @ts-ignore
20
- Reflect.defineMetadata('routes', [], target);
21
- }
22
- };
23
- };
24
- exports.controller = controller;
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.controller = void 0;
10
+ // @ts-ignore
11
+ require("reflect-metadata");
12
+ const controller = (prefix = '') => {
13
+ return (target) => {
14
+ // @ts-ignore
15
+ Reflect.defineMetadata('prefix', prefix, target);
16
+ // Since routes are set by our methods this should almost never be true (except the controller has no methods)
17
+ // @ts-ignore
18
+ if (!Reflect.hasMetadata('routes', target)) {
19
+ // @ts-ignore
20
+ Reflect.defineMetadata('routes', [], target);
21
+ }
22
+ };
23
+ };
24
+ exports.controller = controller;
@@ -0,0 +1,3 @@
1
+ import "reflect-metadata";
2
+ export declare const del: (path: string) => MethodDecorator;
3
+ //# sourceMappingURL=delete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../src/decorator/delete.ts"],"names":[],"mappings":"AAOA,OAAQ,kBAAkB,CAAC;AAG3B,eAAO,MAAM,GAAG,SAAU,MAAM,KAAG,eAyBlC,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.del = void 0;
4
+ /*
5
+ * Copyright (c) 2021. Chy Bilgisayar Bilisim
6
+ * Author: Cihan Ozturk
7
+ * E-mail: cihan@chy.com.tr
8
+ * Github:https://github.com/cihan53/
9
+ */
10
+ // @ts-ignore
11
+ require("reflect-metadata");
12
+ const del = (path) => {
13
+ // `target` equals our class, `propertyKey` equals our decorated method name
14
+ // @ts-ignore
15
+ return (target, propertyKey) => {
16
+ // In case this is the first route to be registered the `routes` metadata is likely to be undefined at this point.
17
+ // To prevent any further validation simply set it to an empty array here.
18
+ // @ts-ignore
19
+ if (!Reflect.hasMetadata('routes', target.constructor)) {
20
+ // @ts-ignore
21
+ Reflect.defineMetadata('routes', [], target.constructor);
22
+ }
23
+ // Get the routes stored so far, extend it by the new route and re-set the metadata.
24
+ // @ts-ignore
25
+ const routes = Reflect.getMetadata('routes', target.constructor);
26
+ routes.push({
27
+ id: "",
28
+ requestMethod: 'delete',
29
+ path,
30
+ methodName: propertyKey
31
+ });
32
+ // @ts-ignore
33
+ Reflect.defineMetadata('routes', routes, target.constructor);
34
+ };
35
+ };
36
+ exports.del = del;
@@ -1,6 +1,6 @@
1
- export declare enum ControllerDecoratorParams {
2
- Path = "path",
3
- Method = "method",
4
- Middleware = "middleware"
5
- }
1
+ export declare enum ControllerDecoratorParams {
2
+ Path = "path",
3
+ Method = "method",
4
+ Middleware = "middleware"
5
+ }
6
6
  //# sourceMappingURL=ControllerDecoratorParams.d.ts.map
@@ -1,9 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ControllerDecoratorParams = void 0;
4
- var ControllerDecoratorParams;
5
- (function (ControllerDecoratorParams) {
6
- ControllerDecoratorParams["Path"] = "path";
7
- ControllerDecoratorParams["Method"] = "method";
8
- ControllerDecoratorParams["Middleware"] = "middleware";
9
- })(ControllerDecoratorParams = exports.ControllerDecoratorParams || (exports.ControllerDecoratorParams = {}));
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ControllerDecoratorParams = void 0;
4
+ var ControllerDecoratorParams;
5
+ (function (ControllerDecoratorParams) {
6
+ ControllerDecoratorParams["Path"] = "path";
7
+ ControllerDecoratorParams["Method"] = "method";
8
+ ControllerDecoratorParams["Middleware"] = "middleware";
9
+ })(ControllerDecoratorParams = exports.ControllerDecoratorParams || (exports.ControllerDecoratorParams = {}));