chyz 2.0.0-rc.29 → 2.0.0-rc.30

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 (116) hide show
  1. package/BaseChyz.d.ts +62 -62
  2. package/BaseChyz.js +488 -489
  3. package/base/ActionFilter.d.ts +32 -32
  4. package/base/ActionFilter.js +82 -82
  5. package/base/BadRequestHttpException.d.ts +5 -5
  6. package/base/BadRequestHttpException.js +17 -17
  7. package/base/BaseError.d.ts +31 -31
  8. package/base/BaseError.js +47 -47
  9. package/base/Behavior.d.ts +3 -3
  10. package/base/Behavior.js +7 -7
  11. package/base/CBaseObject.d.ts +4 -4
  12. package/base/CBaseObject.js +16 -16
  13. package/base/CEvents.d.ts +12 -12
  14. package/base/CEvents.js +24 -24
  15. package/base/CRequest.d.ts +1 -1
  16. package/base/CRequest.js +10 -10
  17. package/base/CWebController.d.ts +43 -43
  18. package/base/CWebController.js +81 -81
  19. package/base/Component.d.ts +20 -20
  20. package/base/Component.js +57 -57
  21. package/base/Configurable.d.ts +2 -2
  22. package/base/Configurable.js +8 -8
  23. package/base/DataErrorDbException.d.ts +5 -5
  24. package/base/DataErrorDbException.js +17 -17
  25. package/base/DbConnection.d.ts +12 -12
  26. package/base/DbConnection.js +53 -53
  27. package/base/ForbiddenHttpException.d.ts +4 -4
  28. package/base/ForbiddenHttpException.js +16 -16
  29. package/base/InvalidArgumentException.d.ts +5 -5
  30. package/base/InvalidArgumentException.js +17 -17
  31. package/base/InvalidConfigException.d.ts +5 -5
  32. package/base/InvalidConfigException.js +17 -17
  33. package/base/Logs.d.ts +21 -21
  34. package/base/Logs.js +57 -57
  35. package/base/Model.d.ts +298 -298
  36. package/base/Model.js +509 -509
  37. package/base/ModelManager.d.ts +1 -1
  38. package/base/ModelManager.js +19 -19
  39. package/base/NotFoundHttpException.d.ts +5 -5
  40. package/base/NotFoundHttpException.js +17 -17
  41. package/base/RestClient.d.ts +6 -6
  42. package/base/RestClient.js +25 -25
  43. package/base/UnauthorizedHttpException.d.ts +5 -5
  44. package/base/UnauthorizedHttpException.js +17 -17
  45. package/base/ValidationHttpException.d.ts +5 -5
  46. package/base/ValidationHttpException.js +17 -17
  47. package/base/db/Exception.d.ts +6 -6
  48. package/base/db/Exception.js +15 -15
  49. package/base/index.d.ts +19 -19
  50. package/base/index.js +41 -41
  51. package/decorator/Middleware.d.ts +3 -3
  52. package/decorator/Middleware.js +11 -11
  53. package/decorator/controller.d.ts +2 -2
  54. package/decorator/controller.js +24 -24
  55. package/decorator/delete.d.ts +2 -2
  56. package/decorator/delete.js +36 -36
  57. package/decorator/enums/ControllerDecoratorParams.d.ts +5 -5
  58. package/decorator/enums/ControllerDecoratorParams.js +9 -9
  59. package/decorator/get.d.ts +2 -2
  60. package/decorator/get.js +36 -36
  61. package/decorator/index.d.ts +5 -5
  62. package/decorator/index.js +13 -13
  63. package/decorator/post.d.ts +2 -2
  64. package/decorator/post.js +36 -36
  65. package/decorator/put.d.ts +2 -2
  66. package/decorator/put.js +36 -36
  67. package/filters/AccessControl.d.ts +12 -12
  68. package/filters/AccessControl.js +83 -83
  69. package/filters/AccessRule.d.ts +82 -82
  70. package/filters/AccessRule.js +136 -136
  71. package/filters/auth/AuthInterface.d.ts +25 -25
  72. package/filters/auth/AuthInterface.js +2 -2
  73. package/filters/auth/AuthMethod.d.ts +37 -37
  74. package/filters/auth/AuthMethod.js +82 -82
  75. package/filters/auth/HttpBasicAuth.d.ts +22 -22
  76. package/filters/auth/HttpBasicAuth.js +72 -72
  77. package/filters/auth/HttpBearerAuth.d.ts +17 -17
  78. package/filters/auth/HttpBearerAuth.js +32 -32
  79. package/filters/auth/HttpHeaderAuth.d.ts +14 -14
  80. package/filters/auth/HttpHeaderAuth.js +57 -57
  81. package/filters/auth/JwtHttpBearerAuth.d.ts +20 -20
  82. package/filters/auth/JwtHttpBearerAuth.js +87 -87
  83. package/filters/auth/KeyCloakHttpBearerAuth.d.ts +22 -22
  84. package/filters/auth/KeyCloakHttpBearerAuth.js +116 -116
  85. package/filters/auth/index.d.ts +4 -4
  86. package/filters/auth/index.js +11 -11
  87. package/filters/index.d.ts +2 -2
  88. package/filters/index.js +7 -7
  89. package/index.d.ts +21 -21
  90. package/index.js +61 -61
  91. package/model/RouteDefinition.d.ts +6 -6
  92. package/model/RouteDefinition.js +8 -8
  93. package/package.json +9 -11
  94. package/rbac/AuthAssignment.d.ts +18 -18
  95. package/rbac/AuthAssignment.js +44 -44
  96. package/rbac/AuthItem.d.ts +26 -26
  97. package/rbac/AuthItem.js +51 -51
  98. package/rbac/AuthItemChild.d.ts +18 -18
  99. package/rbac/AuthItemChild.js +43 -43
  100. package/rbac/AuthManager.d.ts +111 -111
  101. package/rbac/AuthManager.js +357 -357
  102. package/requiments/Glob.d.ts +2 -2
  103. package/requiments/Glob.js +10 -10
  104. package/requiments/ReflectUtil.js +24 -24
  105. package/requiments/Utils.d.ts +8 -8
  106. package/requiments/Utils.js +125 -125
  107. package/validators/BooleanValidator.js +1 -1
  108. package/validators/CompareValidator.js +1 -1
  109. package/validators/DateValidator.js +1 -1
  110. package/validators/EmailValidator.js +1 -1
  111. package/validators/Validator.d.ts +17 -17
  112. package/validators/Validator.js +27 -27
  113. package/web/IdentityInterface.d.ts +54 -54
  114. package/web/IdentityInterface.js +8 -8
  115. package/web/WebUser.d.ts +71 -71
  116. package/web/WebUser.js +165 -165
@@ -1,116 +1,116 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.KeyCloakHttpBearerAuth = void 0;
16
- /*
17
- * Copyright (c) 2021. Chy Bilgisayar Bilisim
18
- * Author: Cihan Ozturk
19
- * E-mail: cihan@chy.com.tr
20
- * Github:https://github.com/cihan53/
21
- */
22
- const BaseChyz_1 = __importDefault(require("../../BaseChyz"));
23
- const HttpBearerAuth_1 = require("./HttpBearerAuth");
24
- const InvalidConfigException_1 = require("../../base/InvalidConfigException");
25
- const JsonWebToken = require("jsonwebtoken");
26
- class KeyCloakHttpBearerAuth extends HttpBearerAuth_1.HttpBearerAuth {
27
- constructor() {
28
- super(...arguments);
29
- /**
30
- * @var string|array<string, mixed>|Jwt application component ID of the JWT handler, configuration array, or JWT handler object
31
- * itself. By default it's assumes that component of ID "jwt" has been configured.
32
- */
33
- this.jwt = 'jwt';
34
- this.auth = null;
35
- this.keycloak = null;
36
- }
37
- /**
38
- * @throws InvalidConfigException
39
- */
40
- init() {
41
- var _a, _b;
42
- super.init();
43
- if (!this.pattern) {
44
- throw new InvalidConfigException_1.InvalidConfigException('You must provide pattern to use to extract the HTTP authentication value!');
45
- }
46
- this.keycloak = (_a = BaseChyz_1.default.getMiddlewares("keycloak").keycloak) !== null && _a !== void 0 ? _a : null;
47
- this.user = (_b = BaseChyz_1.default.getComponent("user")) !== null && _b !== void 0 ? _b : null;
48
- this.auth = this.KeyCloakCheck;
49
- }
50
- KeyCloakCheck(token, request, response) {
51
- return __awaiter(this, void 0, void 0, function* () {
52
- if (this.keycloak == null)
53
- return false;
54
- // return await this.keycloak.protect('realm:user')(request, response, () => true /*next*/)
55
- return yield this.keycloak.protect()(request, response, () => true /*next*/);
56
- });
57
- }
58
- authenticate(user, request, response) {
59
- return __awaiter(this, void 0, void 0, function* () {
60
- let identity = null;
61
- let token = null;
62
- let autHeader = this.getHeaderByKey(request.headers, this.header);
63
- if (autHeader == null || (autHeader = this.patternCheck(autHeader, this.pattern)) == null) {
64
- return null;
65
- }
66
- token = JsonWebToken.decode(autHeader[1], { complete: true });
67
- if (!token) {
68
- BaseChyz_1.default.warning("Your request was made with invalid or expired JSON Web Token.");
69
- this.fail(response);
70
- }
71
- if (token !== null) {
72
- identity = yield this.KeyCloakCheck(autHeader[1], request, response);
73
- BaseChyz_1.default.debug("KeyCloakCheck Result:", identity);
74
- }
75
- if (identity == null || identity == false)
76
- this.fail(response);
77
- return identity;
78
- /* let autHeader = this.getHeaderByKey(request.headers, this.header)
79
- if (autHeader == null || (autHeader = this.patternCheck(autHeader, this.pattern)) == null) {
80
- return null;
81
- }
82
-
83
- BaseChyz.debug("JSON Web Token.",autHeader);
84
- let identity = null;
85
- let token = null;
86
-
87
- token = JsonWebToken.decode(autHeader[1], {complete: true})
88
- if (!token) {
89
- BaseChyz.warning("Your request was made with invalid or expired JSON Web Token.");
90
- this.fail(response);
91
- }
92
-
93
- if (token !== null) {
94
- if (this.auth != null) {
95
- identity = await this.auth(autHeader[1])
96
- } else {
97
- identity = await user.loginByAccessToken(autHeader[1], "JwtHttpBearerAuth")
98
- }
99
- }
100
-
101
- if (identity == null) this.fail(response)
102
-
103
-
104
-
105
- return identity;*/
106
- });
107
- }
108
- /**
109
- * @throws UnauthorizedHttpException
110
- */
111
- fail(response) {
112
- // this.challenge(response)
113
- // this.handleFailure(response);
114
- }
115
- }
116
- exports.KeyCloakHttpBearerAuth = KeyCloakHttpBearerAuth;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.KeyCloakHttpBearerAuth = void 0;
16
+ /*
17
+ * Copyright (c) 2021. Chy Bilgisayar Bilisim
18
+ * Author: Cihan Ozturk
19
+ * E-mail: cihan@chy.com.tr
20
+ * Github:https://github.com/cihan53/
21
+ */
22
+ const BaseChyz_1 = __importDefault(require("../../BaseChyz"));
23
+ const HttpBearerAuth_1 = require("./HttpBearerAuth");
24
+ const InvalidConfigException_1 = require("../../base/InvalidConfigException");
25
+ const JsonWebToken = require("jsonwebtoken");
26
+ class KeyCloakHttpBearerAuth extends HttpBearerAuth_1.HttpBearerAuth {
27
+ constructor() {
28
+ super(...arguments);
29
+ /**
30
+ * @var string|array<string, mixed>|Jwt application component ID of the JWT handler, configuration array, or JWT handler object
31
+ * itself. By default it's assumes that component of ID "jwt" has been configured.
32
+ */
33
+ this.jwt = 'jwt';
34
+ this.auth = null;
35
+ this.keycloak = null;
36
+ }
37
+ /**
38
+ * @throws InvalidConfigException
39
+ */
40
+ init() {
41
+ var _a, _b;
42
+ super.init();
43
+ if (!this.pattern) {
44
+ throw new InvalidConfigException_1.InvalidConfigException('You must provide pattern to use to extract the HTTP authentication value!');
45
+ }
46
+ this.keycloak = (_a = BaseChyz_1.default.getMiddlewares("keycloak").keycloak) !== null && _a !== void 0 ? _a : null;
47
+ this.user = (_b = BaseChyz_1.default.getComponent("user")) !== null && _b !== void 0 ? _b : null;
48
+ this.auth = this.KeyCloakCheck;
49
+ }
50
+ KeyCloakCheck(token, request, response) {
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ if (this.keycloak == null)
53
+ return false;
54
+ // return await this.keycloak.protect('realm:user')(request, response, () => true /*next*/)
55
+ return yield this.keycloak.protect()(request, response, () => true /*next*/);
56
+ });
57
+ }
58
+ authenticate(user, request, response) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ let identity = null;
61
+ let token = null;
62
+ let autHeader = this.getHeaderByKey(request.headers, this.header);
63
+ if (autHeader == null || (autHeader = this.patternCheck(autHeader, this.pattern)) == null) {
64
+ return null;
65
+ }
66
+ token = JsonWebToken.decode(autHeader[1], { complete: true });
67
+ if (!token) {
68
+ BaseChyz_1.default.warning("Your request was made with invalid or expired JSON Web Token.");
69
+ this.fail(response);
70
+ }
71
+ if (token !== null) {
72
+ identity = yield this.KeyCloakCheck(autHeader[1], request, response);
73
+ BaseChyz_1.default.debug("KeyCloakCheck Result:", identity);
74
+ }
75
+ if (identity == null || identity == false)
76
+ this.fail(response);
77
+ return identity;
78
+ /* let autHeader = this.getHeaderByKey(request.headers, this.header)
79
+ if (autHeader == null || (autHeader = this.patternCheck(autHeader, this.pattern)) == null) {
80
+ return null;
81
+ }
82
+
83
+ BaseChyz.debug("JSON Web Token.",autHeader);
84
+ let identity = null;
85
+ let token = null;
86
+
87
+ token = JsonWebToken.decode(autHeader[1], {complete: true})
88
+ if (!token) {
89
+ BaseChyz.warning("Your request was made with invalid or expired JSON Web Token.");
90
+ this.fail(response);
91
+ }
92
+
93
+ if (token !== null) {
94
+ if (this.auth != null) {
95
+ identity = await this.auth(autHeader[1])
96
+ } else {
97
+ identity = await user.loginByAccessToken(autHeader[1], "JwtHttpBearerAuth")
98
+ }
99
+ }
100
+
101
+ if (identity == null) this.fail(response)
102
+
103
+
104
+
105
+ return identity;*/
106
+ });
107
+ }
108
+ /**
109
+ * @throws UnauthorizedHttpException
110
+ */
111
+ fail(response) {
112
+ // this.challenge(response)
113
+ // this.handleFailure(response);
114
+ }
115
+ }
116
+ exports.KeyCloakHttpBearerAuth = KeyCloakHttpBearerAuth;
@@ -1,5 +1,5 @@
1
- export { JwtHttpBearerAuth } from "./JwtHttpBearerAuth";
2
- export { HttpBearerAuth } from "./HttpBearerAuth";
3
- export { HttpHeaderAuth } from "./HttpHeaderAuth";
4
- export { HttpBasicAuth } from "./HttpBasicAuth";
1
+ export { JwtHttpBearerAuth } from "./JwtHttpBearerAuth";
2
+ export { HttpBearerAuth } from "./HttpBearerAuth";
3
+ export { HttpHeaderAuth } from "./HttpHeaderAuth";
4
+ export { HttpBasicAuth } from "./HttpBasicAuth";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,11 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HttpBasicAuth = exports.HttpHeaderAuth = exports.HttpBearerAuth = exports.JwtHttpBearerAuth = void 0;
4
- var JwtHttpBearerAuth_1 = require("./JwtHttpBearerAuth");
5
- Object.defineProperty(exports, "JwtHttpBearerAuth", { enumerable: true, get: function () { return JwtHttpBearerAuth_1.JwtHttpBearerAuth; } });
6
- var HttpBearerAuth_1 = require("./HttpBearerAuth");
7
- Object.defineProperty(exports, "HttpBearerAuth", { enumerable: true, get: function () { return HttpBearerAuth_1.HttpBearerAuth; } });
8
- var HttpHeaderAuth_1 = require("./HttpHeaderAuth");
9
- Object.defineProperty(exports, "HttpHeaderAuth", { enumerable: true, get: function () { return HttpHeaderAuth_1.HttpHeaderAuth; } });
10
- var HttpBasicAuth_1 = require("./HttpBasicAuth");
11
- Object.defineProperty(exports, "HttpBasicAuth", { enumerable: true, get: function () { return HttpBasicAuth_1.HttpBasicAuth; } });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpBasicAuth = exports.HttpHeaderAuth = exports.HttpBearerAuth = exports.JwtHttpBearerAuth = void 0;
4
+ var JwtHttpBearerAuth_1 = require("./JwtHttpBearerAuth");
5
+ Object.defineProperty(exports, "JwtHttpBearerAuth", { enumerable: true, get: function () { return JwtHttpBearerAuth_1.JwtHttpBearerAuth; } });
6
+ var HttpBearerAuth_1 = require("./HttpBearerAuth");
7
+ Object.defineProperty(exports, "HttpBearerAuth", { enumerable: true, get: function () { return HttpBearerAuth_1.HttpBearerAuth; } });
8
+ var HttpHeaderAuth_1 = require("./HttpHeaderAuth");
9
+ Object.defineProperty(exports, "HttpHeaderAuth", { enumerable: true, get: function () { return HttpHeaderAuth_1.HttpHeaderAuth; } });
10
+ var HttpBasicAuth_1 = require("./HttpBasicAuth");
11
+ Object.defineProperty(exports, "HttpBasicAuth", { enumerable: true, get: function () { return HttpBasicAuth_1.HttpBasicAuth; } });
@@ -1,3 +1,3 @@
1
- export { AccessControl } from "./AccessControl";
2
- export { AccessRule } from "./AccessRule";
1
+ export { AccessControl } from "./AccessControl";
2
+ export { AccessRule } from "./AccessRule";
3
3
  //# sourceMappingURL=index.d.ts.map
package/filters/index.js CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AccessRule = exports.AccessControl = void 0;
4
- var AccessControl_1 = require("./AccessControl");
5
- Object.defineProperty(exports, "AccessControl", { enumerable: true, get: function () { return AccessControl_1.AccessControl; } });
6
- var AccessRule_1 = require("./AccessRule");
7
- Object.defineProperty(exports, "AccessRule", { enumerable: true, get: function () { return AccessRule_1.AccessRule; } });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AccessRule = exports.AccessControl = void 0;
4
+ var AccessControl_1 = require("./AccessControl");
5
+ Object.defineProperty(exports, "AccessControl", { enumerable: true, get: function () { return AccessControl_1.AccessControl; } });
6
+ var AccessRule_1 = require("./AccessRule");
7
+ Object.defineProperty(exports, "AccessRule", { enumerable: true, get: function () { return AccessRule_1.AccessRule; } });
package/index.d.ts CHANGED
@@ -1,22 +1,22 @@
1
- declare module "express-serve-static-core" {
2
- interface Request {
3
- identity: any;
4
- }
5
- }
6
- import BaseChyz from "./BaseChyz";
7
- import { RestClient } from "./base";
8
- /**
9
- *
10
- */
11
- declare const Chyz: BaseChyz;
12
- export { Request, Response, NextFunction } from "./base/CRequest";
13
- export { RouteDefinition } from "./model/RouteDefinition";
14
- export { WebUser } from "./web/WebUser";
15
- export { BaseChyz, RestClient };
16
- export { Logs, ActionFilter, BaseError, Behavior, Component, Configurable, CWebController, DbConnection, ForbiddenHttpException, InvalidConfigException, InvalidArgumentException, NotFoundHttpException, UnauthorizedHttpException, DataErrorDbException, ValidationHttpException, Model, ModelManager, CEvents } from "./base";
17
- export * from "./filters";
18
- export * from "./filters/auth";
19
- export * from "./decorator";
20
- export * from "./requiments/Utils";
21
- export default Chyz;
1
+ declare module "express-serve-static-core" {
2
+ interface Request {
3
+ identity: any;
4
+ }
5
+ }
6
+ import BaseChyz from "./BaseChyz";
7
+ import { RestClient } from "./base";
8
+ /**
9
+ *
10
+ */
11
+ declare const Chyz: BaseChyz;
12
+ export { Request, Response, NextFunction } from "./base/CRequest";
13
+ export { RouteDefinition } from "./model/RouteDefinition";
14
+ export { WebUser } from "./web/WebUser";
15
+ export { BaseChyz, RestClient };
16
+ export { Logs, ActionFilter, BaseError, Behavior, Component, Configurable, CWebController, DbConnection, ForbiddenHttpException, InvalidConfigException, InvalidArgumentException, NotFoundHttpException, UnauthorizedHttpException, DataErrorDbException, ValidationHttpException, Model, ModelManager, CEvents } from "./base";
17
+ export * from "./filters";
18
+ export * from "./filters/auth";
19
+ export * from "./decorator";
20
+ export * from "./requiments/Utils";
21
+ export default Chyz;
22
22
  //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -1,61 +1,61 @@
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
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- var desc = Object.getOwnPropertyDescriptor(m, k);
13
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
- desc = { enumerable: true, get: function() { return m[k]; } };
15
- }
16
- Object.defineProperty(o, k2, desc);
17
- }) : (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- o[k2] = m[k];
20
- }));
21
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
- };
24
- var __importDefault = (this && this.__importDefault) || function (mod) {
25
- return (mod && mod.__esModule) ? mod : { "default": mod };
26
- };
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.CEvents = exports.ModelManager = 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.BaseError = exports.ActionFilter = exports.Logs = exports.RestClient = exports.BaseChyz = exports.WebUser = void 0;
29
- const BaseChyz_1 = __importDefault(require("./BaseChyz"));
30
- exports.BaseChyz = BaseChyz_1.default;
31
- const base_1 = require("./base");
32
- Object.defineProperty(exports, "RestClient", { enumerable: true, get: function () { return base_1.RestClient; } });
33
- /**
34
- *
35
- */
36
- const Chyz = new BaseChyz_1.default();
37
- var WebUser_1 = require("./web/WebUser");
38
- Object.defineProperty(exports, "WebUser", { enumerable: true, get: function () { return WebUser_1.WebUser; } });
39
- var base_2 = require("./base");
40
- Object.defineProperty(exports, "Logs", { enumerable: true, get: function () { return base_2.Logs; } });
41
- Object.defineProperty(exports, "ActionFilter", { enumerable: true, get: function () { return base_2.ActionFilter; } });
42
- Object.defineProperty(exports, "BaseError", { enumerable: true, get: function () { return base_2.BaseError; } });
43
- Object.defineProperty(exports, "Behavior", { enumerable: true, get: function () { return base_2.Behavior; } });
44
- Object.defineProperty(exports, "Component", { enumerable: true, get: function () { return base_2.Component; } });
45
- Object.defineProperty(exports, "CWebController", { enumerable: true, get: function () { return base_2.CWebController; } });
46
- Object.defineProperty(exports, "DbConnection", { enumerable: true, get: function () { return base_2.DbConnection; } });
47
- Object.defineProperty(exports, "ForbiddenHttpException", { enumerable: true, get: function () { return base_2.ForbiddenHttpException; } });
48
- Object.defineProperty(exports, "InvalidConfigException", { enumerable: true, get: function () { return base_2.InvalidConfigException; } });
49
- Object.defineProperty(exports, "InvalidArgumentException", { enumerable: true, get: function () { return base_2.InvalidArgumentException; } });
50
- Object.defineProperty(exports, "NotFoundHttpException", { enumerable: true, get: function () { return base_2.NotFoundHttpException; } });
51
- Object.defineProperty(exports, "UnauthorizedHttpException", { enumerable: true, get: function () { return base_2.UnauthorizedHttpException; } });
52
- Object.defineProperty(exports, "DataErrorDbException", { enumerable: true, get: function () { return base_2.DataErrorDbException; } });
53
- Object.defineProperty(exports, "ValidationHttpException", { enumerable: true, get: function () { return base_2.ValidationHttpException; } });
54
- Object.defineProperty(exports, "Model", { enumerable: true, get: function () { return base_2.Model; } });
55
- Object.defineProperty(exports, "ModelManager", { enumerable: true, get: function () { return base_2.ModelManager; } });
56
- Object.defineProperty(exports, "CEvents", { enumerable: true, get: function () { return base_2.CEvents; } });
57
- __exportStar(require("./filters"), exports);
58
- __exportStar(require("./filters/auth"), exports);
59
- __exportStar(require("./decorator"), exports);
60
- __exportStar(require("./requiments/Utils"), exports);
61
- exports.default = Chyz;
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
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
+ };
24
+ var __importDefault = (this && this.__importDefault) || function (mod) {
25
+ return (mod && mod.__esModule) ? mod : { "default": mod };
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.CEvents = exports.ModelManager = 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.BaseError = exports.ActionFilter = exports.Logs = exports.RestClient = exports.BaseChyz = exports.WebUser = void 0;
29
+ const BaseChyz_1 = __importDefault(require("./BaseChyz"));
30
+ exports.BaseChyz = BaseChyz_1.default;
31
+ const base_1 = require("./base");
32
+ Object.defineProperty(exports, "RestClient", { enumerable: true, get: function () { return base_1.RestClient; } });
33
+ /**
34
+ *
35
+ */
36
+ const Chyz = new BaseChyz_1.default();
37
+ var WebUser_1 = require("./web/WebUser");
38
+ Object.defineProperty(exports, "WebUser", { enumerable: true, get: function () { return WebUser_1.WebUser; } });
39
+ var base_2 = require("./base");
40
+ Object.defineProperty(exports, "Logs", { enumerable: true, get: function () { return base_2.Logs; } });
41
+ Object.defineProperty(exports, "ActionFilter", { enumerable: true, get: function () { return base_2.ActionFilter; } });
42
+ Object.defineProperty(exports, "BaseError", { enumerable: true, get: function () { return base_2.BaseError; } });
43
+ Object.defineProperty(exports, "Behavior", { enumerable: true, get: function () { return base_2.Behavior; } });
44
+ Object.defineProperty(exports, "Component", { enumerable: true, get: function () { return base_2.Component; } });
45
+ Object.defineProperty(exports, "CWebController", { enumerable: true, get: function () { return base_2.CWebController; } });
46
+ Object.defineProperty(exports, "DbConnection", { enumerable: true, get: function () { return base_2.DbConnection; } });
47
+ Object.defineProperty(exports, "ForbiddenHttpException", { enumerable: true, get: function () { return base_2.ForbiddenHttpException; } });
48
+ Object.defineProperty(exports, "InvalidConfigException", { enumerable: true, get: function () { return base_2.InvalidConfigException; } });
49
+ Object.defineProperty(exports, "InvalidArgumentException", { enumerable: true, get: function () { return base_2.InvalidArgumentException; } });
50
+ Object.defineProperty(exports, "NotFoundHttpException", { enumerable: true, get: function () { return base_2.NotFoundHttpException; } });
51
+ Object.defineProperty(exports, "UnauthorizedHttpException", { enumerable: true, get: function () { return base_2.UnauthorizedHttpException; } });
52
+ Object.defineProperty(exports, "DataErrorDbException", { enumerable: true, get: function () { return base_2.DataErrorDbException; } });
53
+ Object.defineProperty(exports, "ValidationHttpException", { enumerable: true, get: function () { return base_2.ValidationHttpException; } });
54
+ Object.defineProperty(exports, "Model", { enumerable: true, get: function () { return base_2.Model; } });
55
+ Object.defineProperty(exports, "ModelManager", { enumerable: true, get: function () { return base_2.ModelManager; } });
56
+ Object.defineProperty(exports, "CEvents", { enumerable: true, get: function () { return base_2.CEvents; } });
57
+ __exportStar(require("./filters"), exports);
58
+ __exportStar(require("./filters/auth"), exports);
59
+ __exportStar(require("./decorator"), exports);
60
+ __exportStar(require("./requiments/Utils"), exports);
61
+ exports.default = Chyz;
@@ -1,7 +1,7 @@
1
- export interface RouteDefinition {
2
- id: string;
3
- path: string;
4
- requestMethod: 'get' | 'post' | 'delete' | 'options' | 'put';
5
- methodName: string;
6
- }
1
+ export interface RouteDefinition {
2
+ id: string;
3
+ path: string;
4
+ requestMethod: 'get' | 'post' | 'delete' | 'options' | 'put';
5
+ methodName: string;
6
+ }
7
7
  //# sourceMappingURL=RouteDefinition.d.ts.map
@@ -1,8 +1,8 @@
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 });
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 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chyz",
3
- "version": "2.0.0-rc.29",
3
+ "version": "2.0.0-rc.30",
4
4
  "description": "Nodejs Micro service Framework",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",
@@ -16,15 +16,14 @@
16
16
  "url": "https://github.com/cihan53/Chy-Nodejs-Framework/issues"
17
17
  },
18
18
  "homepage": "https://github.com/cihan53/Chy-Nodejs-Framework#readme",
19
- "resolutions": {
20
- "ts-node": "^10.2.0"
21
- },
22
19
  "dependencies": {
23
20
  "axios": "^1.3.5",
24
21
  "babel-plugin-transform-decorators-legacy": "^1.3.5",
25
22
  "body-parser": "^1.20.2",
26
23
  "compression": "^1.7.4",
27
24
  "core-js": "^3.30.1",
25
+ "cors": "^2.8.5",
26
+ "dayjs": "^1.11.7",
28
27
  "dotenv-flow": "^3.2.0",
29
28
  "express": "^4.18.2",
30
29
  "express-session": "^1.17.3",
@@ -44,14 +43,13 @@
44
43
  "validate.js": "^0.13.1"
45
44
  },
46
45
  "devDependencies": {
47
- "@types/validator": "^13.6.3",
48
- "@types/express": "^4.17.13",
49
- "@types/node": "^18.6.5",
50
- "nodemon": "^2.0.19",
46
+ "@types/express": "^4.17.17",
47
+ "@types/node": "^18.15.11",
48
+ "@types/validator": "^13.7.15",
49
+ "nodemon": "^2.0.22",
51
50
  "ts-node": "^10.9.1",
52
- "typescript": "^4.7.4"
53
- },
54
-
51
+ "typescript": "^5.0.4"
52
+ } ,
55
53
  "keywords": [
56
54
  "Framework",
57
55
  "RespAPI",
@@ -1,19 +1,19 @@
1
- import { DataTypes, Model, Relation } from "../base";
2
- export declare class AuthAssignmentClass extends Model {
3
- [x: string]: any;
4
- tableName(): string;
5
- attributes(): {
6
- item_name: {
7
- type: DataTypes.StringDataTypeConstructor;
8
- primaryKey: boolean;
9
- allowNull: boolean;
10
- };
11
- user_id: {
12
- type: DataTypes.StringDataTypeConstructor;
13
- allowNull: boolean;
14
- };
15
- };
16
- init(): void;
17
- relations(): Relation[];
18
- }
1
+ import { DataTypes, Model, Relation } from "../base";
2
+ export declare class AuthAssignmentClass extends Model {
3
+ [x: string]: any;
4
+ tableName(): string;
5
+ attributes(): {
6
+ item_name: {
7
+ type: DataTypes.StringDataTypeConstructor;
8
+ primaryKey: boolean;
9
+ allowNull: boolean;
10
+ };
11
+ user_id: {
12
+ type: DataTypes.StringDataTypeConstructor;
13
+ allowNull: boolean;
14
+ };
15
+ };
16
+ init(): void;
17
+ relations(): Relation[];
18
+ }
19
19
  //# sourceMappingURL=AuthAssignment.d.ts.map