chyz 1.2.5-rc.2 → 2.0.0-rc.12
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 +63 -0
- package/BaseChyz.d.ts.map +1 -0
- package/BaseChyz.js +128 -80
- package/base/ActionFilter.d.ts +33 -0
- package/base/ActionFilter.d.ts.map +1 -0
- package/base/ActionFilter.js +21 -20
- package/base/BaseError.d.ts +11 -0
- package/base/BaseError.d.ts.map +1 -0
- package/base/BaseError.js +2 -6
- package/base/Behavior.d.ts +4 -0
- package/base/Behavior.d.ts.map +1 -0
- package/base/Behavior.js +2 -3
- package/base/CBaseObject.d.ts +5 -0
- package/base/CBaseObject.d.ts.map +1 -0
- package/base/CBaseObject.js +16 -0
- package/base/CRequest.d.ts +2 -0
- package/base/CRequest.d.ts.map +1 -0
- package/base/CRequest.js +10 -0
- package/base/CWebController.d.ts +44 -0
- package/base/CWebController.d.ts.map +1 -0
- package/base/CWebController.js +0 -1
- package/base/Component.d.ts +21 -0
- package/base/Component.d.ts.map +1 -0
- package/base/Component.js +7 -11
- package/base/Configurable.d.ts +3 -0
- package/base/Configurable.d.ts.map +1 -0
- package/base/Configurable.js +0 -1
- package/base/DataErrorDbException.d.ts +6 -0
- package/base/DataErrorDbException.d.ts.map +1 -0
- package/base/DataErrorDbException.js +0 -1
- package/base/DbConnection.d.ts +13 -0
- package/base/DbConnection.d.ts.map +1 -0
- package/base/DbConnection.js +1 -2
- package/base/ForbiddenHttpException.d.ts +5 -0
- package/base/ForbiddenHttpException.d.ts.map +1 -0
- package/base/ForbiddenHttpException.js +0 -1
- package/base/InvalidArgumentException.d.ts +6 -0
- package/base/InvalidArgumentException.d.ts.map +1 -0
- package/base/InvalidArgumentException.js +0 -1
- package/base/InvalidConfigException.d.ts +6 -0
- package/base/InvalidConfigException.d.ts.map +1 -0
- package/base/InvalidConfigException.js +0 -1
- package/base/Logs.d.ts +22 -0
- package/base/Logs.d.ts.map +1 -0
- package/base/Logs.js +57 -0
- package/base/Model.d.ts +299 -0
- package/base/Model.d.ts.map +1 -0
- package/base/Model.js +4 -5
- package/base/ModelManager.d.ts +2 -0
- package/base/ModelManager.d.ts.map +1 -0
- package/base/ModelManager.js +11 -1
- package/base/NotFoundHttpException.d.ts +6 -0
- package/base/NotFoundHttpException.d.ts.map +1 -0
- package/base/NotFoundHttpException.js +0 -1
- package/base/RestClient.d.ts +7 -0
- package/base/RestClient.d.ts.map +1 -0
- package/base/RestClient.js +0 -2
- package/base/UnauthorizedHttpException.d.ts +6 -0
- package/base/UnauthorizedHttpException.d.ts.map +1 -0
- package/base/UnauthorizedHttpException.js +0 -1
- package/base/ValidationHttpException.d.ts +6 -0
- package/base/ValidationHttpException.d.ts.map +1 -0
- package/base/ValidationHttpException.js +0 -1
- package/base/db/Exception.d.ts +7 -0
- package/base/db/Exception.d.ts.map +1 -0
- package/base/db/Exception.js +0 -1
- package/base/index.d.ts +19 -0
- package/base/index.d.ts.map +1 -0
- package/base/index.js +5 -6
- package/decorator/Middleware.d.ts +4 -0
- package/decorator/Middleware.d.ts.map +1 -0
- package/decorator/Middleware.js +0 -1
- package/decorator/controller.d.ts +3 -0
- package/decorator/controller.d.ts.map +1 -0
- package/decorator/controller.js +0 -1
- package/decorator/enums/ControllerDecoratorParams.d.ts +6 -0
- package/decorator/enums/ControllerDecoratorParams.d.ts.map +1 -0
- package/decorator/enums/ControllerDecoratorParams.js +0 -1
- package/decorator/get.d.ts +3 -0
- package/decorator/get.d.ts.map +1 -0
- package/decorator/get.js +0 -1
- package/decorator/index.d.ts +4 -0
- package/decorator/index.d.ts.map +1 -0
- package/decorator/index.js +0 -1
- package/decorator/post.d.ts +3 -0
- package/decorator/post.d.ts.map +1 -0
- package/decorator/post.js +0 -1
- package/filters/AccessControl.d.ts +13 -0
- package/filters/AccessControl.d.ts.map +1 -0
- package/filters/AccessControl.js +6 -10
- package/filters/AccessRule.d.ts +83 -0
- package/filters/AccessRule.d.ts.map +1 -0
- package/filters/AccessRule.js +9 -12
- package/filters/auth/AuthInterface.d.ts +26 -0
- package/filters/auth/AuthInterface.d.ts.map +1 -0
- package/filters/auth/AuthInterface.js +0 -1
- package/filters/auth/AuthMethod.d.ts +38 -0
- package/filters/auth/AuthMethod.d.ts.map +1 -0
- package/filters/auth/AuthMethod.js +12 -1
- package/filters/auth/HttpBasicAuth.d.ts +23 -0
- package/filters/auth/HttpBasicAuth.d.ts.map +1 -0
- package/filters/auth/HttpBasicAuth.js +0 -1
- package/filters/auth/HttpBearerAuth.d.ts +18 -0
- package/filters/auth/HttpBearerAuth.d.ts.map +1 -0
- package/filters/auth/HttpBearerAuth.js +0 -1
- package/filters/auth/HttpHeaderAuth.d.ts +15 -0
- package/filters/auth/HttpHeaderAuth.d.ts.map +1 -0
- package/filters/auth/HttpHeaderAuth.js +2 -6
- package/filters/auth/JwtHttpBearerAuth.d.ts +21 -0
- package/filters/auth/JwtHttpBearerAuth.d.ts.map +1 -0
- package/filters/auth/JwtHttpBearerAuth.js +0 -1
- package/filters/auth/KeyCloakHttpBearerAuth.d.ts +23 -0
- package/filters/auth/KeyCloakHttpBearerAuth.d.ts.map +1 -0
- package/filters/auth/KeyCloakHttpBearerAuth.js +0 -1
- package/filters/auth/index.d.ts +5 -0
- package/filters/auth/index.d.ts.map +1 -0
- package/filters/auth/index.js +0 -1
- package/filters/index.d.ts +3 -0
- package/filters/index.d.ts.map +1 -0
- package/filters/index.js +0 -1
- package/index.d.ts +22 -0
- package/index.d.ts.map +1 -0
- package/index.js +24 -31
- package/model/RouteDefinition.d.ts +7 -0
- package/model/RouteDefinition.d.ts.map +1 -0
- package/model/RouteDefinition.js +0 -1
- package/package.json +10 -10
- package/rbac/AuthAssignment.d.ts +19 -0
- package/rbac/AuthAssignment.d.ts.map +1 -0
- package/rbac/AuthAssignment.js +0 -1
- package/rbac/AuthItem.d.ts +27 -0
- package/rbac/AuthItem.d.ts.map +1 -0
- package/rbac/AuthItem.js +0 -1
- package/rbac/AuthItemChild.d.ts +19 -0
- package/rbac/AuthItemChild.d.ts.map +1 -0
- package/rbac/AuthItemChild.js +0 -1
- package/rbac/AuthManager.d.ts +112 -0
- package/rbac/AuthManager.d.ts.map +1 -0
- package/rbac/AuthManager.js +9 -13
- package/requiments/Glob.d.ts +3 -0
- package/requiments/Glob.d.ts.map +1 -0
- package/requiments/Glob.js +0 -1
- package/requiments/ReflectUtil.d.ts +1 -0
- package/requiments/ReflectUtil.d.ts.map +1 -0
- package/requiments/ReflectUtil.js +0 -1
- package/requiments/Utils.d.ts +9 -0
- package/requiments/Utils.d.ts.map +1 -0
- package/requiments/Utils.js +11 -3
- package/validators/BooleanValidator.d.ts +1 -0
- package/validators/BooleanValidator.d.ts.map +1 -0
- package/validators/BooleanValidator.js +0 -1
- package/validators/CompareValidator.d.ts +1 -0
- package/validators/CompareValidator.d.ts.map +1 -0
- package/validators/CompareValidator.js +0 -1
- package/validators/DateValidator.d.ts +1 -0
- package/validators/DateValidator.d.ts.map +1 -0
- package/validators/DateValidator.js +0 -1
- package/validators/EmailValidator.d.ts +1 -0
- package/validators/EmailValidator.d.ts.map +1 -0
- package/validators/EmailValidator.js +0 -1
- package/validators/Validator.d.ts +18 -0
- package/validators/Validator.d.ts.map +1 -0
- package/validators/Validator.js +0 -1
- package/web/IdentityInterface.d.ts +55 -0
- package/web/IdentityInterface.d.ts.map +1 -0
- package/web/IdentityInterface.js +0 -1
- package/web/WebUser.d.ts +72 -0
- package/web/WebUser.d.ts.map +1 -0
- package/web/WebUser.js +2 -3
- package/BaseChyz.js.map +0 -1
- package/Chyz.js +0 -15
- package/Chyz.js.map +0 -1
- package/base/ActionFilter.js.map +0 -1
- package/base/BaseError.js.map +0 -1
- package/base/BaseObject.js +0 -20
- package/base/BaseObject.js.map +0 -1
- package/base/Behavior.js.map +0 -1
- package/base/CWebController.js.map +0 -1
- package/base/Component.js.map +0 -1
- package/base/Configurable.js.map +0 -1
- package/base/DataErrorDbException.js.map +0 -1
- package/base/DbConnection.js.map +0 -1
- package/base/ForbiddenHttpException.js.map +0 -1
- package/base/InvalidArgumentException.js.map +0 -1
- package/base/InvalidConfigException.js.map +0 -1
- package/base/Model.js.map +0 -1
- package/base/ModelManager.js.map +0 -1
- package/base/NotFoundHttpException.js.map +0 -1
- package/base/RestClient.js.map +0 -1
- package/base/UnauthorizedHttpException.js.map +0 -1
- package/base/ValidationHttpException.js.map +0 -1
- package/base/db/Exception.js.map +0 -1
- package/base/index.js.map +0 -1
- package/decorator/Middleware.js.map +0 -1
- package/decorator/controller.js.map +0 -1
- package/decorator/enums/ControllerDecoratorParams.js.map +0 -1
- package/decorator/get.js.map +0 -1
- package/decorator/index.js.map +0 -1
- package/decorator/post.js.map +0 -1
- package/filters/AccessControl.js.map +0 -1
- package/filters/AccessRule.js.map +0 -1
- package/filters/auth/AuthInterface.js.map +0 -1
- package/filters/auth/AuthMethod.js.map +0 -1
- package/filters/auth/HttpBasicAuth.js.map +0 -1
- package/filters/auth/HttpBearerAuth.js.map +0 -1
- package/filters/auth/HttpHeaderAuth.js.map +0 -1
- package/filters/auth/JwtHttpBearerAuth.js.map +0 -1
- package/filters/auth/KeyCloakHttpBearerAuth.js.map +0 -1
- package/filters/auth/index.js.map +0 -1
- package/filters/index.js.map +0 -1
- package/index.js.map +0 -1
- package/model/RouteDefinition.js.map +0 -1
- package/rbac/AuthAssignment.js.map +0 -1
- package/rbac/AuthItem.js.map +0 -1
- package/rbac/AuthItemChild.js.map +0 -1
- package/rbac/AuthManager.js.map +0 -1
- package/requiments/Glob.js.map +0 -1
- package/requiments/ReflectUtil.js.map +0 -1
- package/requiments/Utils.js.map +0 -1
- package/validators/BooleanValidator.js.map +0 -1
- package/validators/CompareValidator.js.map +0 -1
- package/validators/DateValidator.js.map +0 -1
- package/validators/EmailValidator.js.map +0 -1
- package/validators/Validator.js.map +0 -1
- package/web/IdentityInterface.js.map +0 -1
- package/web/WebUser.js.map +0 -1
package/BaseChyz.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Logs } from "./base/Logs";
|
|
2
|
+
export default class BaseChyz {
|
|
3
|
+
private config;
|
|
4
|
+
static app: string;
|
|
5
|
+
static httpServer: any;
|
|
6
|
+
static express: any;
|
|
7
|
+
private _port;
|
|
8
|
+
static db: any;
|
|
9
|
+
static routes: any;
|
|
10
|
+
static logs: Logs;
|
|
11
|
+
private static _validate;
|
|
12
|
+
private _controllerpath;
|
|
13
|
+
private static controllers;
|
|
14
|
+
static components: any;
|
|
15
|
+
static middlewares: any;
|
|
16
|
+
private static _EventEmitter;
|
|
17
|
+
static get EventEmitter(): any;
|
|
18
|
+
static set EventEmitter(value: any);
|
|
19
|
+
get controllerpath(): string;
|
|
20
|
+
set controllerpath(value: string);
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
init(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Listen port number
|
|
27
|
+
* Server port number get
|
|
28
|
+
*/
|
|
29
|
+
get port(): number;
|
|
30
|
+
/**
|
|
31
|
+
* Listen port number
|
|
32
|
+
* Server port number setting
|
|
33
|
+
* @param value
|
|
34
|
+
*/
|
|
35
|
+
set port(value: number);
|
|
36
|
+
static get validate(): any;
|
|
37
|
+
static set validate(value: any);
|
|
38
|
+
app(config?: any): BaseChyz;
|
|
39
|
+
static trace(...args: any[]): void;
|
|
40
|
+
static debug(...args: any[]): void;
|
|
41
|
+
static info(...args: any[]): void;
|
|
42
|
+
static warn(...args: any[]): void;
|
|
43
|
+
static error(...args: any[]): void;
|
|
44
|
+
static fatal(...args: any[]): void;
|
|
45
|
+
static warning(...args: any[]): void;
|
|
46
|
+
static t(text: string): string;
|
|
47
|
+
errorLogger(error: any, req: any, res: any, next: any): void;
|
|
48
|
+
errorResponder(error: any, req: any, res: any, next: any): void;
|
|
49
|
+
errorHandler(err: any, req: any, res: any, next: any): any;
|
|
50
|
+
static getComponent(key: any): any;
|
|
51
|
+
static getMiddlewares(key: any): any;
|
|
52
|
+
/**
|
|
53
|
+
* load model
|
|
54
|
+
*/
|
|
55
|
+
loadModels(): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* load contoller
|
|
58
|
+
*/
|
|
59
|
+
loadController(): Promise<void>;
|
|
60
|
+
middleware(): void;
|
|
61
|
+
Start(): this;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=BaseChyz.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseChyz.d.ts","sourceRoot":"","sources":["../src/BaseChyz.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAgFjC,MAAM,CAAC,OAAO,OAAO,QAAQ;IACzB,OAAO,CAAC,MAAM,CAAuB;IACrC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,UAAU,EAAE,GAAG,CAAC;IACvB,MAAM,CAAC,OAAO,MAAS;IACvB,OAAO,CAAC,KAAK,CAAgB;IAC7B,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC;IACf,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IACnB,MAAM,CAAC,IAAI,EAAE,IAAI,CAAc;IAC/B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAiB;IACzC,OAAO,CAAC,eAAe,CAAwB;IAC/C,OAAO,CAAC,MAAM,CAAC,WAAW,CAA4B;IACtD,OAAc,UAAU,EAAE,GAAG,CAAK;IAClC,OAAc,WAAW,EAAE,GAAG,CAAK;IACnC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAU;IAGtC,MAAM,KAAK,YAAY,IAAI,GAAG,CAE7B;IAED,MAAM,KAAK,YAAY,CAAC,KAAK,EAAE,GAAG,EAEjC;IAED,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED,IAAI,cAAc,CAAC,KAAK,EAAE,MAAM,EAE/B;IAED;;OAEG;IACH,IAAI;IAmCJ;;;OAGG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;OAIG;IACH,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;IAGD,MAAM,KAAK,QAAQ,IAAI,GAAG,CAEzB;IAED,MAAM,KAAK,QAAQ,CAAC,KAAK,EAAE,GAAG,EAE7B;IAED,GAAG,CAAC,MAAM,GAAE,GAAQ,GAAG,QAAQ;WAiDjB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;WAIpB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;WAIpB,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;WAInB,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;WAInB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;WAIpB,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;WAKpB,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;WAItB,CAAC,CAAC,IAAI,EAAE,MAAM;IAKrB,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG;IAKrD,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG;IAUxD,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG;WAQ7C,YAAY,CAAC,GAAG,EAAE,GAAG;WAKrB,cAAc,CAAC,GAAG,EAAE,GAAG;IAIrC;;OAEG;IACG,UAAU;IAyBhB;;OAEG;IACG,cAAc;IA4Eb,UAAU;IAsDV,KAAK;CAwBf"}
|
package/BaseChyz.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
26
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
27
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,17 +31,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
31
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
32
|
});
|
|
10
33
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
require("reflect-metadata");
|
|
16
|
-
const Utils_1 = __importDefault(require("./requiments/Utils"));
|
|
17
35
|
const base_1 = require("./base");
|
|
36
|
+
const Utils_1 = __importStar(require("./requiments/Utils"));
|
|
37
|
+
const Logs_1 = require("./base/Logs");
|
|
18
38
|
const https = require('https');
|
|
19
39
|
const express = require("express");
|
|
20
40
|
const compression = require('compression');
|
|
21
|
-
const log4js = require("log4js");
|
|
22
41
|
const fs = require('fs');
|
|
23
42
|
const validate = require('validate.js');
|
|
24
43
|
/**
|
|
@@ -43,7 +62,7 @@ validate.validators.array = (arrayItems, itemConstraints) => {
|
|
|
43
62
|
errors[index] = { error: error };
|
|
44
63
|
return errors;
|
|
45
64
|
}, {});
|
|
46
|
-
return Utils_1.
|
|
65
|
+
return Utils_1.Utils.isEmpty(arrayItemErrors) ? null : { errors: arrayItemErrors };
|
|
47
66
|
};
|
|
48
67
|
validate.validators.tokenString = (items, itemConstraints) => {
|
|
49
68
|
let arrayItems = items.split(",");
|
|
@@ -53,23 +72,43 @@ validate.validators.tokenString = (items, itemConstraints) => {
|
|
|
53
72
|
errors[index] = { error: error };
|
|
54
73
|
return errors;
|
|
55
74
|
}, {});
|
|
56
|
-
return Utils_1.
|
|
75
|
+
return Utils_1.Utils.isEmpty(arrayItemErrors) ? null : { errors: arrayItemErrors };
|
|
57
76
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
77
|
+
const ip = require('ip');
|
|
78
|
+
const bodyParser = require('body-parser');
|
|
79
|
+
const methodOverride = require('method-override');
|
|
80
|
+
const Server = express();
|
|
81
|
+
const cors = require('cors');
|
|
82
|
+
const emitter = require('events').EventEmitter;
|
|
83
|
+
const em = new emitter();
|
|
84
|
+
/**
|
|
85
|
+
* set request id
|
|
86
|
+
*/
|
|
87
|
+
Object.defineProperty(Server.request, 'reqId', {
|
|
88
|
+
configurable: true,
|
|
89
|
+
enumerable: true,
|
|
90
|
+
writable: true
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(Server.request, 'user', {
|
|
93
|
+
configurable: true,
|
|
94
|
+
enumerable: true,
|
|
95
|
+
writable: true
|
|
96
|
+
});
|
|
97
|
+
Object.defineProperty(Server.request, 'identity', {
|
|
98
|
+
configurable: true,
|
|
99
|
+
enumerable: true,
|
|
100
|
+
writable: true
|
|
101
|
+
});
|
|
61
102
|
class BaseChyz {
|
|
62
103
|
constructor() {
|
|
63
|
-
var _a;
|
|
64
104
|
this._port = 3001;
|
|
65
|
-
this._logConfig = (_a = require('./log/config/log4js.json')) !== null && _a !== void 0 ? _a : {};
|
|
66
105
|
this._controllerpath = "Controllers";
|
|
67
106
|
}
|
|
68
|
-
get
|
|
69
|
-
return this.
|
|
107
|
+
static get EventEmitter() {
|
|
108
|
+
return this._EventEmitter;
|
|
70
109
|
}
|
|
71
|
-
set
|
|
72
|
-
this.
|
|
110
|
+
static set EventEmitter(value) {
|
|
111
|
+
this._EventEmitter = value;
|
|
73
112
|
}
|
|
74
113
|
get controllerpath() {
|
|
75
114
|
return this._controllerpath;
|
|
@@ -77,25 +116,10 @@ class BaseChyz {
|
|
|
77
116
|
set controllerpath(value) {
|
|
78
117
|
this._controllerpath = value;
|
|
79
118
|
}
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
*/
|
|
80
122
|
init() {
|
|
81
|
-
/**
|
|
82
|
-
* set request id
|
|
83
|
-
*/
|
|
84
|
-
Object.defineProperty(BaseChyz.express.request, 'reqId', {
|
|
85
|
-
configurable: true,
|
|
86
|
-
enumerable: true,
|
|
87
|
-
writable: true
|
|
88
|
-
});
|
|
89
|
-
Object.defineProperty(BaseChyz.express.request, 'user', {
|
|
90
|
-
configurable: true,
|
|
91
|
-
enumerable: true,
|
|
92
|
-
writable: true
|
|
93
|
-
});
|
|
94
|
-
Object.defineProperty(BaseChyz.express.request, 'identity', {
|
|
95
|
-
configurable: true,
|
|
96
|
-
enumerable: true,
|
|
97
|
-
writable: true
|
|
98
|
-
});
|
|
99
123
|
/**
|
|
100
124
|
* server port setting
|
|
101
125
|
*/
|
|
@@ -147,16 +171,19 @@ class BaseChyz {
|
|
|
147
171
|
* Config set
|
|
148
172
|
*/
|
|
149
173
|
this.config = config;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
174
|
+
/**
|
|
175
|
+
* log setting
|
|
176
|
+
*/
|
|
177
|
+
if (this.config.logs instanceof Logs_1.Logs) {
|
|
178
|
+
BaseChyz.logs = this.config.logs;
|
|
179
|
+
}
|
|
180
|
+
let components = Utils_1.Utils.findKeyValue(config, "components");
|
|
154
181
|
if (components) {
|
|
155
182
|
for (const componentsKey in components) {
|
|
156
183
|
let comp = components[componentsKey];
|
|
157
184
|
BaseChyz.debug("Create Component ", componentsKey);
|
|
158
185
|
try {
|
|
159
|
-
BaseChyz.components[componentsKey] = Utils_1.
|
|
186
|
+
BaseChyz.components[componentsKey] = Utils_1.Utils.createObject(new comp.class, comp);
|
|
160
187
|
(_a = BaseChyz.components[componentsKey]) === null || _a === void 0 ? void 0 : _a.init();
|
|
161
188
|
}
|
|
162
189
|
catch (e) {
|
|
@@ -164,11 +191,11 @@ class BaseChyz {
|
|
|
164
191
|
}
|
|
165
192
|
}
|
|
166
193
|
}
|
|
167
|
-
let middlewares = Utils_1.
|
|
194
|
+
let middlewares = Utils_1.Utils.findKeyValue(config, "middlewares");
|
|
168
195
|
if (middlewares) {
|
|
169
196
|
for (const middlewareKey in middlewares) {
|
|
170
197
|
let middleware1 = middlewares[middlewareKey];
|
|
171
|
-
BaseChyz.
|
|
198
|
+
BaseChyz.debug("Create middlewares ", middlewareKey);
|
|
172
199
|
BaseChyz.middlewares[middlewareKey] = middleware1;
|
|
173
200
|
// BaseChyz.middlewares[middlewareKey] = Utils.createObject(new middleware1.class, middleware1);
|
|
174
201
|
}
|
|
@@ -176,35 +203,26 @@ class BaseChyz {
|
|
|
176
203
|
this.init();
|
|
177
204
|
return this;
|
|
178
205
|
}
|
|
179
|
-
logProvider() {
|
|
180
|
-
return log4js;
|
|
181
|
-
}
|
|
182
|
-
getLogger() {
|
|
183
|
-
return this.logProvider().getLogger(this.constructor.name);
|
|
184
|
-
}
|
|
185
|
-
static logs(...args) {
|
|
186
|
-
return log4js.getLogger(this.name);
|
|
187
|
-
}
|
|
188
206
|
static trace(...args) {
|
|
189
|
-
BaseChyz.logs
|
|
207
|
+
BaseChyz.logs.fatal(...arguments);
|
|
190
208
|
}
|
|
191
209
|
static debug(...args) {
|
|
192
|
-
BaseChyz.logs
|
|
210
|
+
BaseChyz.logs.debug(...arguments);
|
|
193
211
|
}
|
|
194
212
|
static info(...args) {
|
|
195
|
-
BaseChyz.logs
|
|
213
|
+
BaseChyz.logs.info(...arguments);
|
|
196
214
|
}
|
|
197
215
|
static warn(...args) {
|
|
198
|
-
BaseChyz.logs
|
|
216
|
+
BaseChyz.logs.warn(...arguments);
|
|
199
217
|
}
|
|
200
218
|
static error(...args) {
|
|
201
|
-
BaseChyz.logs
|
|
219
|
+
BaseChyz.logs.error(...arguments);
|
|
202
220
|
}
|
|
203
221
|
static fatal(...args) {
|
|
204
|
-
BaseChyz.logs
|
|
222
|
+
BaseChyz.logs.fatal(...arguments);
|
|
205
223
|
}
|
|
206
224
|
static warning(...args) {
|
|
207
|
-
BaseChyz.logs
|
|
225
|
+
BaseChyz.logs.warn(...arguments);
|
|
208
226
|
}
|
|
209
227
|
static t(text) {
|
|
210
228
|
return text;
|
|
@@ -251,6 +269,9 @@ class BaseChyz {
|
|
|
251
269
|
models[className.replace("Class", "")] = new model[className];
|
|
252
270
|
}
|
|
253
271
|
});
|
|
272
|
+
/**
|
|
273
|
+
*
|
|
274
|
+
*/
|
|
254
275
|
base_1.ModelManager._register(models);
|
|
255
276
|
for (const key of Object.keys(base_1.ModelManager)) {
|
|
256
277
|
if (key != "_register") {
|
|
@@ -264,9 +285,19 @@ class BaseChyz {
|
|
|
264
285
|
*/
|
|
265
286
|
loadController() {
|
|
266
287
|
return __awaiter(this, void 0, void 0, function* () {
|
|
267
|
-
let articlesEndpoints = [];
|
|
268
|
-
fs.readdirSync(`${this._controllerpath}/`)
|
|
269
|
-
let controller = require(`${this._controllerpath}/${file}`);
|
|
288
|
+
// let articlesEndpoints: string[] = [];
|
|
289
|
+
for (const file of fs.readdirSync(`${this._controllerpath}/`)) {
|
|
290
|
+
// let controller = require(`${this._controllerpath}/${file}`);
|
|
291
|
+
let controller = (yield Promise.resolve().then(() => __importStar(require(`${this._controllerpath}/${file}`))));
|
|
292
|
+
if (controller[file.replace(".ts", "")]) {
|
|
293
|
+
controller = controller[file.replace(".ts", "")];
|
|
294
|
+
}
|
|
295
|
+
else if (controller.default) {
|
|
296
|
+
controller = controller.default;
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
throw new base_1.InvalidConfigException((0, Utils_1.default)("Invalid Controller"));
|
|
300
|
+
}
|
|
270
301
|
// This is our instantiated class
|
|
271
302
|
const instance = new controller();
|
|
272
303
|
BaseChyz.controllers.push(instance);
|
|
@@ -276,12 +307,12 @@ class BaseChyz {
|
|
|
276
307
|
// Our `routes` array containing all our routes for this controller
|
|
277
308
|
// @ts-ignore
|
|
278
309
|
const routes = Reflect.getMetadata('routes', controller);
|
|
279
|
-
BaseChyz.
|
|
310
|
+
BaseChyz.debug("Controller load ", controller.name, `(${prefix})`);
|
|
280
311
|
if (routes) {
|
|
281
312
|
routes.forEach(route => {
|
|
282
313
|
let actionId = route.path == "/" || route.path == "" ? instance.defaultAction : route.path;
|
|
283
314
|
route.id = actionId;
|
|
284
|
-
BaseChyz.
|
|
315
|
+
BaseChyz.debug("Controller route Path", prefix + (route.path.startsWith("/") ? route.path : `/${route.path}`));
|
|
285
316
|
BaseChyz.express[route.requestMethod](prefix + (route.path.startsWith("/") ? route.path : `/${route.path}`), (req, res, next) => __awaiter(this, void 0, void 0, function* () {
|
|
286
317
|
try {
|
|
287
318
|
BaseChyz.debug(`Call Request id ${instance.id}`);
|
|
@@ -317,30 +348,46 @@ class BaseChyz {
|
|
|
317
348
|
}));
|
|
318
349
|
});
|
|
319
350
|
}
|
|
320
|
-
}
|
|
351
|
+
}
|
|
321
352
|
});
|
|
322
353
|
}
|
|
323
354
|
middleware() {
|
|
324
355
|
BaseChyz.express.use(bodyParser.json({ limit: '1mb' }));
|
|
325
356
|
BaseChyz.express.use(bodyParser.urlencoded({ limit: '1mb', extended: true })); // support encoded bodies
|
|
326
357
|
BaseChyz.express.use(methodOverride());
|
|
327
|
-
BaseChyz.express.use(
|
|
328
|
-
//
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
358
|
+
BaseChyz.express.use(cors());
|
|
359
|
+
//
|
|
360
|
+
// // CORS
|
|
361
|
+
// BaseChyz.express.use(function (req: any, res: Response, next: any) {
|
|
362
|
+
// // @ts-ignore
|
|
363
|
+
// req.reqId = Utils.uniqueId("chyzzzz_")
|
|
364
|
+
// res.setHeader('Content-Type', 'application/json');
|
|
365
|
+
// res.setHeader("Access-Control-Allow-Origin", "*");
|
|
366
|
+
// res.setHeader("Access-Control-Allow-Credentials", "true");
|
|
367
|
+
// res.setHeader("Access-Control-Allow-Methods", "GET,HEAD,OPTIONS,POST,PUT");
|
|
368
|
+
// res.setHeader("Access-Control-Allow-Headers", "Access-Control-Allow-Origin,Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers,Authorization");
|
|
369
|
+
// next();
|
|
370
|
+
// });
|
|
371
|
+
//
|
|
339
372
|
// compress all responses
|
|
340
|
-
|
|
373
|
+
const shouldCompress = (req, res) => {
|
|
374
|
+
// don't compress responses explicitly asking not
|
|
375
|
+
if (req.headers["x-no-compression"] || res.getHeader('Content-Type') === 'text/event-stream') {
|
|
376
|
+
return false;
|
|
377
|
+
}
|
|
378
|
+
// use compression filter function
|
|
379
|
+
return compression.filter(req, res);
|
|
380
|
+
};
|
|
381
|
+
BaseChyz.express.use(compression({ filter: shouldCompress }));
|
|
382
|
+
//
|
|
383
|
+
// //static file path
|
|
384
|
+
if (this.config.staticFilePath) {
|
|
385
|
+
BaseChyz.info('Static file path', this.config.staticFilePath);
|
|
386
|
+
BaseChyz.express.use(express.static(this.config.staticFilePath));
|
|
387
|
+
}
|
|
341
388
|
//Middlewares
|
|
342
389
|
for (const middleware1 of Object.keys(BaseChyz.middlewares)) {
|
|
343
|
-
if (!Utils_1.
|
|
390
|
+
if (!Utils_1.Utils.isFunction(middleware1)) {
|
|
344
391
|
let keycloak = BaseChyz.middlewares[middleware1].keycloak;
|
|
345
392
|
BaseChyz.express.use(keycloak.middleware(BaseChyz.middlewares[middleware1].config));
|
|
346
393
|
}
|
|
@@ -375,9 +422,10 @@ class BaseChyz {
|
|
|
375
422
|
}
|
|
376
423
|
}
|
|
377
424
|
exports.default = BaseChyz;
|
|
378
|
-
BaseChyz.express =
|
|
425
|
+
BaseChyz.express = Server;
|
|
426
|
+
BaseChyz.logs = new Logs_1.Logs();
|
|
379
427
|
BaseChyz._validate = validate;
|
|
380
428
|
BaseChyz.controllers = [];
|
|
381
429
|
BaseChyz.components = {};
|
|
382
430
|
BaseChyz.middlewares = {};
|
|
383
|
-
|
|
431
|
+
BaseChyz._EventEmitter = em;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/// <reference types="express" />
|
|
2
|
+
import { Request, Response } from "../index";
|
|
3
|
+
import { CBaseObject } from "./CBaseObject";
|
|
4
|
+
export declare class ActionFilter extends CBaseObject {
|
|
5
|
+
only: any;
|
|
6
|
+
/**
|
|
7
|
+
* @var array list of action IDs that this filter should not apply to.
|
|
8
|
+
* @see only
|
|
9
|
+
*/
|
|
10
|
+
except: never[];
|
|
11
|
+
init(): void;
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @param route
|
|
15
|
+
* @param req
|
|
16
|
+
* @param res
|
|
17
|
+
*/
|
|
18
|
+
beforeFilter(route: any, req: Request, res: Response): Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* This method is invoked right before an action is to be executed (after all possible filters.)
|
|
21
|
+
* You may override this method to do last-minute preparation for the action.
|
|
22
|
+
* @param Action $action the action to be executed.
|
|
23
|
+
* @return bool whether the action should continue to be executed.
|
|
24
|
+
*/
|
|
25
|
+
beforeAction(route: any, req: Request, res: Response): Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @param action
|
|
29
|
+
* @protected
|
|
30
|
+
*/
|
|
31
|
+
protected isActive(action: any): boolean;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=ActionFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionFilter.d.ts","sourceRoot":"","sources":["../../src/base/ActionFilter.ts"],"names":[],"mappings":";AAMA,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,UAAU,CAAC;AAE3C,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AAEzC,qBAAa,YAAa,SAAQ,WAAW;IAElC,IAAI,EAAE,GAAG,CAAC;IAEjB;;;OAGG;IACI,MAAM,UAAM;IAGZ,IAAI;IAIX;;;;;OAKG;IACU,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ;IAQjE;;;;;OAKG;IACU,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ;IAIjE;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,GAAG;CA0BjC"}
|
package/base/ActionFilter.js
CHANGED
|
@@ -8,14 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.ActionFilter = void 0;
|
|
16
|
-
const Utils_1 =
|
|
17
|
-
const
|
|
18
|
-
class ActionFilter extends
|
|
13
|
+
const Utils_1 = require("../requiments/Utils");
|
|
14
|
+
const CBaseObject_1 = require("./CBaseObject");
|
|
15
|
+
class ActionFilter extends CBaseObject_1.CBaseObject {
|
|
19
16
|
constructor() {
|
|
20
17
|
super(...arguments);
|
|
21
18
|
/**
|
|
@@ -40,17 +37,33 @@ class ActionFilter extends Behavior_1.Behavior {
|
|
|
40
37
|
yield this.beforeAction(route, req, res);
|
|
41
38
|
});
|
|
42
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* This method is invoked right before an action is to be executed (after all possible filters.)
|
|
42
|
+
* You may override this method to do last-minute preparation for the action.
|
|
43
|
+
* @param Action $action the action to be executed.
|
|
44
|
+
* @return bool whether the action should continue to be executed.
|
|
45
|
+
*/
|
|
46
|
+
beforeAction(route, req, res) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
return true;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @param action
|
|
54
|
+
* @protected
|
|
55
|
+
*/
|
|
43
56
|
isActive(action) {
|
|
44
57
|
let id = action.id;
|
|
45
58
|
let onlyMatch = false;
|
|
46
59
|
let exceptMatch = false;
|
|
47
|
-
if (Utils_1.
|
|
60
|
+
if (Utils_1.Utils.isEmpty(this.only)) {
|
|
48
61
|
onlyMatch = true;
|
|
49
62
|
}
|
|
50
63
|
else {
|
|
51
64
|
onlyMatch = false;
|
|
52
65
|
for (const onlyKey of this.only) {
|
|
53
|
-
if (Utils_1.
|
|
66
|
+
if (Utils_1.Utils.matchWildcard(action.id, onlyKey)) {
|
|
54
67
|
onlyMatch = true;
|
|
55
68
|
break;
|
|
56
69
|
}
|
|
@@ -65,17 +78,5 @@ class ActionFilter extends Behavior_1.Behavior {
|
|
|
65
78
|
}
|
|
66
79
|
return !exceptMatch && onlyMatch;
|
|
67
80
|
}
|
|
68
|
-
/**
|
|
69
|
-
* This method is invoked right before an action is to be executed (after all possible filters.)
|
|
70
|
-
* You may override this method to do last-minute preparation for the action.
|
|
71
|
-
* @param Action $action the action to be executed.
|
|
72
|
-
* @return bool whether the action should continue to be executed.
|
|
73
|
-
*/
|
|
74
|
-
beforeAction(route, req, res) {
|
|
75
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
return true;
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
81
|
}
|
|
80
82
|
exports.ActionFilter = ActionFilter;
|
|
81
|
-
//# sourceMappingURL=ActionFilter.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class BaseError extends Error {
|
|
2
|
+
private statusCode;
|
|
3
|
+
constructor(message: string, statusCode?: number);
|
|
4
|
+
toString(): string;
|
|
5
|
+
toJSON(): {
|
|
6
|
+
code: number | undefined;
|
|
7
|
+
name: string;
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=BaseError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseError.d.ts","sourceRoot":"","sources":["../../src/base/BaseError.ts"],"names":[],"mappings":"AASA,qBAAa,SAAU,SAAQ,KAAK;IAChC,OAAO,CAAC,UAAU,CAAS;gBAEf,OAAO,EAAE,MAAM,EAAC,UAAU,SAAI;IAQ1C,QAAQ;IAGR,MAAM;;;;;CAGT"}
|
package/base/BaseError.js
CHANGED
|
@@ -5,16 +5,13 @@
|
|
|
5
5
|
* E-mail: cihan@chy.com.tr
|
|
6
6
|
* Github:https://github.com/cihan53/
|
|
7
7
|
*/
|
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
9
|
exports.BaseError = void 0;
|
|
13
|
-
const Utils_1 =
|
|
10
|
+
const Utils_1 = require("../requiments/Utils");
|
|
14
11
|
class BaseError extends Error {
|
|
15
12
|
constructor(message, statusCode = 500) {
|
|
16
13
|
super(message);
|
|
17
|
-
this.message = Utils_1.
|
|
14
|
+
this.message = Utils_1.Utils.isString(message) ? message : JSON.stringify(message);
|
|
18
15
|
this.name = this.constructor.name; // good practice
|
|
19
16
|
this.statusCode = statusCode; // error code for responding to client
|
|
20
17
|
//Error.captureStackTrace(this)
|
|
@@ -27,4 +24,3 @@ class BaseError extends Error {
|
|
|
27
24
|
}
|
|
28
25
|
}
|
|
29
26
|
exports.BaseError = BaseError;
|
|
30
|
-
//# sourceMappingURL=BaseError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Behavior.d.ts","sourceRoot":"","sources":["../../src/base/Behavior.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,qBAAa,QAAS,SAAQ,WAAW;CAGxC"}
|
package/base/Behavior.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Behavior = void 0;
|
|
4
|
-
const
|
|
5
|
-
class Behavior extends
|
|
4
|
+
const CBaseObject_1 = require("./CBaseObject");
|
|
5
|
+
class Behavior extends CBaseObject_1.CBaseObject {
|
|
6
6
|
}
|
|
7
7
|
exports.Behavior = Behavior;
|
|
8
|
-
//# sourceMappingURL=Behavior.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CBaseObject.d.ts","sourceRoot":"","sources":["../../src/base/CBaseObject.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAG5C,qBAAa,WAAY,YAAW,YAAY;IAErC,IAAI;CAGd"}
|
|
@@ -0,0 +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.CBaseObject = void 0;
|
|
10
|
+
const index_1 = require("../index");
|
|
11
|
+
class CBaseObject {
|
|
12
|
+
init() {
|
|
13
|
+
index_1.BaseChyz.debug("BaseObject init.....");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.CBaseObject = CBaseObject;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CRequest.d.ts","sourceRoot":"","sources":["../../src/base/CRequest.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAC,MAAM,SAAS,CAAC"}
|
package/base/CRequest.js
ADDED