@expressots/core 1.0.0 → 1.1.0
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/README.md +33 -122
- package/lib/CHANGELOG.md +101 -0
- package/lib/README.md +64 -0
- package/lib/cjs/application/app-container.js +28 -0
- package/{application → lib/cjs/application}/application.js +17 -6
- package/lib/cjs/console/console.js +77 -0
- package/{container-module → lib/cjs/container-module}/container-module.js +11 -3
- package/lib/cjs/controller/base-controller.js +56 -0
- package/{environment → lib/cjs/environment}/env-validator.js +13 -5
- package/lib/cjs/error/application-error.js +26 -0
- package/lib/cjs/error/report.js +20 -0
- package/lib/cjs/index.js +23 -0
- package/{logger → lib/cjs/logger}/general-logger.js +15 -4
- package/{application → lib/cjs/types/application}/app-container.d.ts +1 -0
- package/lib/cjs/types/application/app-container.d.ts.map +1 -0
- package/{application → lib/cjs/types/application}/application.d.ts +1 -0
- package/lib/cjs/types/application/application.d.ts.map +1 -0
- package/lib/cjs/types/application/index.d.ts +3 -0
- package/lib/cjs/types/application/index.d.ts.map +1 -0
- package/{console → lib/cjs/types/console}/console.d.ts +1 -0
- package/lib/cjs/types/console/console.d.ts.map +1 -0
- package/{console → lib/cjs/types/console}/index.d.ts +1 -0
- package/lib/cjs/types/console/index.d.ts.map +1 -0
- package/{container-module → lib/cjs/types/container-module}/container-module.d.ts +1 -0
- package/lib/cjs/types/container-module/container-module.d.ts.map +1 -0
- package/lib/cjs/types/container-module/index.d.ts +2 -0
- package/lib/cjs/types/container-module/index.d.ts.map +1 -0
- package/{controller → lib/cjs/types/controller}/base-controller.d.ts +1 -0
- package/lib/cjs/types/controller/base-controller.d.ts.map +1 -0
- package/lib/cjs/types/controller/index.d.ts +2 -0
- package/lib/cjs/types/controller/index.d.ts.map +1 -0
- package/{environment → lib/cjs/types/environment}/env-validator.d.ts +1 -0
- package/lib/cjs/types/environment/env-validator.d.ts.map +1 -0
- package/lib/cjs/types/environment/index.d.ts +2 -0
- package/lib/cjs/types/environment/index.d.ts.map +1 -0
- package/{error → lib/cjs/types/error}/application-error.d.ts +1 -0
- package/lib/cjs/types/error/application-error.d.ts.map +1 -0
- package/{error → lib/cjs/types/error}/error-handler-middleware.d.ts +1 -0
- package/lib/cjs/types/error/error-handler-middleware.d.ts.map +1 -0
- package/lib/cjs/types/error/index.d.ts +4 -0
- package/lib/cjs/types/error/index.d.ts.map +1 -0
- package/{error → lib/cjs/types/error}/report.d.ts +1 -0
- package/lib/cjs/types/error/report.d.ts.map +1 -0
- package/{error → lib/cjs/types/error}/status-code.d.ts +1 -0
- package/lib/cjs/types/error/status-code.d.ts.map +1 -0
- package/lib/cjs/types/index.d.ts +8 -0
- package/lib/cjs/types/index.d.ts.map +1 -0
- package/{logger → lib/cjs/types/logger}/general-logger.d.ts +2 -1
- package/lib/cjs/types/logger/general-logger.d.ts.map +1 -0
- package/lib/cjs/types/logger/index.d.ts +2 -0
- package/lib/cjs/types/logger/index.d.ts.map +1 -0
- package/lib/esm/application/app-container.js +26 -0
- package/lib/esm/application/application.js +68 -0
- package/{console → lib/esm/console}/console.js +17 -15
- package/lib/esm/console/index.js +1 -0
- package/lib/esm/container-module/container-module.js +39 -0
- package/lib/esm/controller/base-controller.js +43 -0
- package/lib/esm/environment/env-validator.js +65 -0
- package/lib/esm/error/application-error.js +25 -0
- package/lib/esm/error/error-handler-middleware.js +7 -0
- package/lib/esm/error/report.js +17 -0
- package/lib/esm/error/status-code.js +80 -0
- package/lib/esm/logger/general-logger.js +96 -0
- package/lib/esm/types/application/app-container.d.ts +8 -0
- package/lib/esm/types/application/app-container.d.ts.map +1 -0
- package/lib/esm/types/application/application.d.ts +22 -0
- package/lib/esm/types/application/application.d.ts.map +1 -0
- package/lib/esm/types/application/index.d.ts +3 -0
- package/lib/esm/types/application/index.d.ts.map +1 -0
- package/lib/esm/types/console/console.d.ts +10 -0
- package/lib/esm/types/console/console.d.ts.map +1 -0
- package/lib/esm/types/console/index.d.ts +2 -0
- package/lib/esm/types/console/index.d.ts.map +1 -0
- package/lib/esm/types/container-module/container-module.d.ts +9 -0
- package/lib/esm/types/container-module/container-module.d.ts.map +1 -0
- package/lib/esm/types/container-module/index.d.ts +2 -0
- package/lib/esm/types/container-module/index.d.ts.map +1 -0
- package/lib/esm/types/controller/base-controller.d.ts +9 -0
- package/lib/esm/types/controller/base-controller.d.ts.map +1 -0
- package/lib/esm/types/controller/index.d.ts +2 -0
- package/lib/esm/types/controller/index.d.ts.map +1 -0
- package/lib/esm/types/environment/env-validator.d.ts +13 -0
- package/lib/esm/types/environment/env-validator.d.ts.map +1 -0
- package/lib/esm/types/environment/index.d.ts +2 -0
- package/lib/esm/types/environment/index.d.ts.map +1 -0
- package/lib/esm/types/error/application-error.d.ts +7 -0
- package/lib/esm/types/error/application-error.d.ts.map +1 -0
- package/lib/esm/types/error/error-handler-middleware.d.ts +5 -0
- package/lib/esm/types/error/error-handler-middleware.d.ts.map +1 -0
- package/lib/esm/types/error/index.d.ts +4 -0
- package/lib/esm/types/error/index.d.ts.map +1 -0
- package/lib/esm/types/error/report.d.ts +6 -0
- package/lib/esm/types/error/report.d.ts.map +1 -0
- package/lib/esm/types/error/status-code.d.ts +137 -0
- package/lib/esm/types/error/status-code.d.ts.map +1 -0
- package/lib/esm/types/index.d.ts +8 -0
- package/lib/esm/types/index.d.ts.map +1 -0
- package/lib/esm/types/logger/general-logger.d.ts +17 -0
- package/lib/esm/types/logger/general-logger.d.ts.map +1 -0
- package/lib/esm/types/logger/index.d.ts +2 -0
- package/lib/esm/types/logger/index.d.ts.map +1 -0
- package/lib/package.json +146 -0
- package/package.json +109 -13
- package/application/app-container.js +0 -20
- package/controller/base-controller.js +0 -37
- package/error/application-error.js +0 -18
- package/error/report.js +0 -15
- package/index.js +0 -10
- /package/{application → lib/cjs/application}/index.js +0 -0
- /package/{console → lib/cjs/console}/index.js +0 -0
- /package/{container-module → lib/cjs/container-module}/index.js +0 -0
- /package/{controller → lib/cjs/controller}/index.js +0 -0
- /package/{environment → lib/cjs/environment}/index.js +0 -0
- /package/{error → lib/cjs/error}/error-handler-middleware.js +0 -0
- /package/{error → lib/cjs/error}/index.js +0 -0
- /package/{error → lib/cjs/error}/status-code.js +0 -0
- /package/{logger → lib/cjs/logger}/index.js +0 -0
- /package/{application/index.d.ts → lib/esm/application/index.js} +0 -0
- /package/{container-module/index.d.ts → lib/esm/container-module/index.js} +0 -0
- /package/{controller/index.d.ts → lib/esm/controller/index.js} +0 -0
- /package/{environment/index.d.ts → lib/esm/environment/index.js} +0 -0
- /package/{error/index.d.ts → lib/esm/error/index.js} +0 -0
- /package/{index.d.ts → lib/esm/index.mjs} +0 -0
- /package/{logger/index.d.ts → lib/esm/logger/index.js} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var Report_1;
|
|
8
|
+
import { provide } from "inversify-binding-decorators";
|
|
9
|
+
let Report = Report_1 = class Report {
|
|
10
|
+
static Error(error) {
|
|
11
|
+
throw error;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
Report = Report_1 = __decorate([
|
|
15
|
+
provide(Report_1)
|
|
16
|
+
], Report);
|
|
17
|
+
export { Report };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/* Http Error Code Response */
|
|
2
|
+
var InformationResponse;
|
|
3
|
+
(function (InformationResponse) {
|
|
4
|
+
InformationResponse[InformationResponse["Continue"] = 100] = "Continue";
|
|
5
|
+
InformationResponse[InformationResponse["SwitchingProtocols"] = 101] = "SwitchingProtocols";
|
|
6
|
+
InformationResponse[InformationResponse["Processing"] = 102] = "Processing";
|
|
7
|
+
InformationResponse[InformationResponse["eEarlyHints"] = 103] = "eEarlyHints";
|
|
8
|
+
})(InformationResponse || (InformationResponse = {}));
|
|
9
|
+
var SuccessfulResponse;
|
|
10
|
+
(function (SuccessfulResponse) {
|
|
11
|
+
SuccessfulResponse[SuccessfulResponse["OK"] = 200] = "OK";
|
|
12
|
+
SuccessfulResponse[SuccessfulResponse["Created"] = 201] = "Created";
|
|
13
|
+
SuccessfulResponse[SuccessfulResponse["Accepted"] = 202] = "Accepted";
|
|
14
|
+
SuccessfulResponse[SuccessfulResponse["NonAuthoritativeInformation"] = 203] = "NonAuthoritativeInformation";
|
|
15
|
+
SuccessfulResponse[SuccessfulResponse["NoContent"] = 204] = "NoContent";
|
|
16
|
+
SuccessfulResponse[SuccessfulResponse["ResetContent"] = 205] = "ResetContent";
|
|
17
|
+
SuccessfulResponse[SuccessfulResponse["PartialContent"] = 206] = "PartialContent";
|
|
18
|
+
SuccessfulResponse[SuccessfulResponse["MultiStatus"] = 207] = "MultiStatus";
|
|
19
|
+
SuccessfulResponse[SuccessfulResponse["AlreadyReported"] = 208] = "AlreadyReported";
|
|
20
|
+
SuccessfulResponse[SuccessfulResponse["IMUsed"] = 226] = "IMUsed";
|
|
21
|
+
})(SuccessfulResponse || (SuccessfulResponse = {}));
|
|
22
|
+
var RedirectionMessage;
|
|
23
|
+
(function (RedirectionMessage) {
|
|
24
|
+
RedirectionMessage[RedirectionMessage["MultipleChoices"] = 300] = "MultipleChoices";
|
|
25
|
+
RedirectionMessage[RedirectionMessage["MovedPermanently"] = 301] = "MovedPermanently";
|
|
26
|
+
RedirectionMessage[RedirectionMessage["Found"] = 302] = "Found";
|
|
27
|
+
RedirectionMessage[RedirectionMessage["SeeOther"] = 303] = "SeeOther";
|
|
28
|
+
RedirectionMessage[RedirectionMessage["NotModified"] = 304] = "NotModified";
|
|
29
|
+
RedirectionMessage[RedirectionMessage["TemporaryRedirect"] = 307] = "TemporaryRedirect";
|
|
30
|
+
RedirectionMessage[RedirectionMessage["PermanentRedirect"] = 308] = "PermanentRedirect";
|
|
31
|
+
})(RedirectionMessage || (RedirectionMessage = {}));
|
|
32
|
+
var ClientErrorResponse;
|
|
33
|
+
(function (ClientErrorResponse) {
|
|
34
|
+
ClientErrorResponse[ClientErrorResponse["BadRequest"] = 400] = "BadRequest";
|
|
35
|
+
ClientErrorResponse[ClientErrorResponse["Unauthorized"] = 401] = "Unauthorized";
|
|
36
|
+
ClientErrorResponse[ClientErrorResponse["PaymentRequired"] = 402] = "PaymentRequired";
|
|
37
|
+
ClientErrorResponse[ClientErrorResponse["Forbidden"] = 403] = "Forbidden";
|
|
38
|
+
ClientErrorResponse[ClientErrorResponse["NotFound"] = 404] = "NotFound";
|
|
39
|
+
ClientErrorResponse[ClientErrorResponse["MethodNotAllowed"] = 405] = "MethodNotAllowed";
|
|
40
|
+
ClientErrorResponse[ClientErrorResponse["NotAcceptable"] = 406] = "NotAcceptable";
|
|
41
|
+
ClientErrorResponse[ClientErrorResponse["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
|
|
42
|
+
ClientErrorResponse[ClientErrorResponse["RequestTimeout"] = 408] = "RequestTimeout";
|
|
43
|
+
ClientErrorResponse[ClientErrorResponse["Conflict"] = 409] = "Conflict";
|
|
44
|
+
ClientErrorResponse[ClientErrorResponse["Gone"] = 410] = "Gone";
|
|
45
|
+
ClientErrorResponse[ClientErrorResponse["LengthRequired"] = 411] = "LengthRequired";
|
|
46
|
+
ClientErrorResponse[ClientErrorResponse["PreconditionFailed"] = 412] = "PreconditionFailed";
|
|
47
|
+
ClientErrorResponse[ClientErrorResponse["PayloadTooLarge"] = 413] = "PayloadTooLarge";
|
|
48
|
+
ClientErrorResponse[ClientErrorResponse["URITooLong"] = 414] = "URITooLong";
|
|
49
|
+
ClientErrorResponse[ClientErrorResponse["UnsupportedMediaType"] = 415] = "UnsupportedMediaType";
|
|
50
|
+
ClientErrorResponse[ClientErrorResponse["RangeNotSatisfiable"] = 416] = "RangeNotSatisfiable";
|
|
51
|
+
ClientErrorResponse[ClientErrorResponse["ExpectationFailed"] = 417] = "ExpectationFailed";
|
|
52
|
+
ClientErrorResponse[ClientErrorResponse["ImATeapot"] = 418] = "ImATeapot";
|
|
53
|
+
ClientErrorResponse[ClientErrorResponse["MisdirectedRequest"] = 421] = "MisdirectedRequest";
|
|
54
|
+
ClientErrorResponse[ClientErrorResponse["UnprocessableEntity"] = 422] = "UnprocessableEntity";
|
|
55
|
+
ClientErrorResponse[ClientErrorResponse["Locked"] = 423] = "Locked";
|
|
56
|
+
ClientErrorResponse[ClientErrorResponse["FailedDependency"] = 424] = "FailedDependency";
|
|
57
|
+
ClientErrorResponse[ClientErrorResponse["TooEarly"] = 425] = "TooEarly";
|
|
58
|
+
ClientErrorResponse[ClientErrorResponse["UpgradeRequired"] = 426] = "UpgradeRequired";
|
|
59
|
+
ClientErrorResponse[ClientErrorResponse["PreconditionRequired"] = 428] = "PreconditionRequired";
|
|
60
|
+
ClientErrorResponse[ClientErrorResponse["TooManyRequests"] = 429] = "TooManyRequests";
|
|
61
|
+
ClientErrorResponse[ClientErrorResponse["RequestHeaderFieldsTooLarge"] = 431] = "RequestHeaderFieldsTooLarge";
|
|
62
|
+
ClientErrorResponse[ClientErrorResponse["UnavailableForLegalReasons"] = 451] = "UnavailableForLegalReasons";
|
|
63
|
+
})(ClientErrorResponse || (ClientErrorResponse = {}));
|
|
64
|
+
var ServerErrorResponse;
|
|
65
|
+
(function (ServerErrorResponse) {
|
|
66
|
+
ServerErrorResponse[ServerErrorResponse["InternalServerError"] = 500] = "InternalServerError";
|
|
67
|
+
ServerErrorResponse[ServerErrorResponse["NotImplemented"] = 501] = "NotImplemented";
|
|
68
|
+
ServerErrorResponse[ServerErrorResponse["BadGateway"] = 502] = "BadGateway";
|
|
69
|
+
ServerErrorResponse[ServerErrorResponse["ServiceUnavailable"] = 503] = "ServiceUnavailable";
|
|
70
|
+
ServerErrorResponse[ServerErrorResponse["GatewayTimeout"] = 504] = "GatewayTimeout";
|
|
71
|
+
ServerErrorResponse[ServerErrorResponse["HTTPVersionNotSupported"] = 505] = "HTTPVersionNotSupported";
|
|
72
|
+
ServerErrorResponse[ServerErrorResponse["VariantAlsoNegotiates"] = 506] = "VariantAlsoNegotiates";
|
|
73
|
+
ServerErrorResponse[ServerErrorResponse["InsufficientStorage"] = 507] = "InsufficientStorage";
|
|
74
|
+
ServerErrorResponse[ServerErrorResponse["LoopDetected"] = 508] = "LoopDetected";
|
|
75
|
+
ServerErrorResponse[ServerErrorResponse["NotExtended"] = 510] = "NotExtended";
|
|
76
|
+
ServerErrorResponse[ServerErrorResponse["NetworkAuthenticationRequired"] = 511] = "NetworkAuthenticationRequired";
|
|
77
|
+
})(ServerErrorResponse || (ServerErrorResponse = {}));
|
|
78
|
+
const HttpStatusErrorCode = { ...InformationResponse, ...SuccessfulResponse, ...RedirectionMessage, ...ClientErrorResponse, ...ServerErrorResponse };
|
|
79
|
+
const StatusCode = { ...HttpStatusErrorCode };
|
|
80
|
+
export { StatusCode };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var GeneralLogger_1;
|
|
11
|
+
import { format, transports, createLogger } from "winston";
|
|
12
|
+
import DailyRotateFile from "winston-daily-rotate-file";
|
|
13
|
+
import { provide } from "inversify-binding-decorators";
|
|
14
|
+
var LogLevel;
|
|
15
|
+
(function (LogLevel) {
|
|
16
|
+
LogLevel[LogLevel["Debug"] = 0] = "Debug";
|
|
17
|
+
LogLevel[LogLevel["Error"] = 1] = "Error";
|
|
18
|
+
LogLevel[LogLevel["Info"] = 2] = "Info";
|
|
19
|
+
})(LogLevel || (LogLevel = {}));
|
|
20
|
+
let GeneralLogger = GeneralLogger_1 = class GeneralLogger {
|
|
21
|
+
logger;
|
|
22
|
+
constructor() {
|
|
23
|
+
this.logger = createLogger(this.createLoggerOptions());
|
|
24
|
+
}
|
|
25
|
+
createConsoleTransport() {
|
|
26
|
+
const consoleTransport = new transports.Console({
|
|
27
|
+
level: "debug",
|
|
28
|
+
handleExceptions: true,
|
|
29
|
+
handleRejections: true
|
|
30
|
+
});
|
|
31
|
+
return consoleTransport;
|
|
32
|
+
}
|
|
33
|
+
createRotationalFileTransport() {
|
|
34
|
+
const rotationalFileTransport = new DailyRotateFile({
|
|
35
|
+
level: "error",
|
|
36
|
+
filename: "logs/general-%DATE%.log",
|
|
37
|
+
datePattern: "YYYY-MM-DD",
|
|
38
|
+
zippedArchive: true,
|
|
39
|
+
maxSize: "20m",
|
|
40
|
+
maxFiles: "7d",
|
|
41
|
+
silent: false
|
|
42
|
+
});
|
|
43
|
+
return rotationalFileTransport;
|
|
44
|
+
}
|
|
45
|
+
createLoggerOptions() {
|
|
46
|
+
const loggerOptions = {
|
|
47
|
+
transports: [
|
|
48
|
+
this.createConsoleTransport(),
|
|
49
|
+
this.createRotationalFileTransport()
|
|
50
|
+
],
|
|
51
|
+
defaultMeta: { service: "service-unknown" },
|
|
52
|
+
format: format.combine(format.splat(), format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }), format.label({ label: "core-api" }), format.printf(({ timestamp, level, message, service, label }) => {
|
|
53
|
+
return `[${timestamp}] [${label}] [${service}] ${level}: ${message}`;
|
|
54
|
+
}))
|
|
55
|
+
};
|
|
56
|
+
return loggerOptions;
|
|
57
|
+
}
|
|
58
|
+
getPathAndLine(error) {
|
|
59
|
+
let pathLine = "";
|
|
60
|
+
if (error.stack) {
|
|
61
|
+
let callerLine = error.stack.split("\n")[1];
|
|
62
|
+
let index = callerLine.indexOf("at ");
|
|
63
|
+
pathLine = callerLine.substring(index + +2, callerLine.length);
|
|
64
|
+
}
|
|
65
|
+
return pathLine;
|
|
66
|
+
}
|
|
67
|
+
log(logLevel, content, service) {
|
|
68
|
+
let pathLine = "";
|
|
69
|
+
let logMessageFormat = "";
|
|
70
|
+
if (typeof content === "object") {
|
|
71
|
+
pathLine = this.getPathAndLine(content);
|
|
72
|
+
logMessageFormat = `${content.message} - (${content.name}) [file: %s]`;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
logMessageFormat = content;
|
|
76
|
+
}
|
|
77
|
+
switch (logLevel) {
|
|
78
|
+
case LogLevel.Debug:
|
|
79
|
+
console.log(logMessageFormat, pathLine, { service });
|
|
80
|
+
break;
|
|
81
|
+
case LogLevel.Error:
|
|
82
|
+
this.logger.error(logMessageFormat, pathLine, { service });
|
|
83
|
+
break;
|
|
84
|
+
case LogLevel.Info:
|
|
85
|
+
this.logger.info(content, { service });
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
GeneralLogger = GeneralLogger_1 = __decorate([
|
|
91
|
+
provide(GeneralLogger_1),
|
|
92
|
+
__metadata("design:paramtypes", [])
|
|
93
|
+
], GeneralLogger);
|
|
94
|
+
const Log = new GeneralLogger();
|
|
95
|
+
const log = Log.log.bind(Log);
|
|
96
|
+
export { LogLevel, GeneralLogger, log };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-container.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/application/app-container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGvD,cACM,YAAY;IAEd,OAAO,CAAC,SAAS,CAAY;;IAItB,MAAM,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,SAAS;CAKvD;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import express from "express";
|
|
2
|
+
import { Container } from "inversify";
|
|
3
|
+
import { IApplicationMessageToConsole } from "../console/console";
|
|
4
|
+
declare enum ServerEnvironment {
|
|
5
|
+
Development = "development",
|
|
6
|
+
Staging = "staging",
|
|
7
|
+
Production = "production"
|
|
8
|
+
}
|
|
9
|
+
declare class Application {
|
|
10
|
+
private app;
|
|
11
|
+
private port;
|
|
12
|
+
private environment;
|
|
13
|
+
constructor();
|
|
14
|
+
protected configureServices(): void;
|
|
15
|
+
protected postServerInitialization(): void;
|
|
16
|
+
protected serverShutdown(): void;
|
|
17
|
+
create(container: Container, middlewares?: express.RequestHandler[]): Application;
|
|
18
|
+
listen(port: number, environment: ServerEnvironment, consoleMessage?: IApplicationMessageToConsole): void;
|
|
19
|
+
}
|
|
20
|
+
declare const appServerInstance: Application;
|
|
21
|
+
export { appServerInstance as AppInstance, Application, ServerEnvironment };
|
|
22
|
+
//# sourceMappingURL=application.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/application/application.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAItC,OAAO,EAAW,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAG3E,aAAK,iBAAiB;IAClB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,UAAU,eAAe;CAC5B;AAED,cACM,WAAW;IAEb,OAAO,CAAC,GAAG,CAAsB;IACjC,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,WAAW,CAAoB;;IAKvC,SAAS,CAAC,iBAAiB,IAAI,IAAI;IAGnC,SAAS,CAAC,wBAAwB,IAAI,IAAI;IAG1C,SAAS,CAAC,cAAc,IAAI,IAAI;IAIzB,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,GAAE,OAAO,CAAC,cAAc,EAAO,GAAG,WAAW;IA2BrF,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,iBAAiB,EAAE,cAAc,CAAC,EAAE,4BAA4B,GAAG,IAAI;CAanH;AAED,QAAA,MAAM,iBAAiB,EAAE,WAA+B,CAAC;AAEzD,OAAO,EAAE,iBAAiB,IAAI,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/application/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface IApplicationMessageToConsole {
|
|
2
|
+
appName: string;
|
|
3
|
+
appVersion: string;
|
|
4
|
+
}
|
|
5
|
+
declare class Console {
|
|
6
|
+
private printColor;
|
|
7
|
+
messageServer(port: any, environment: string, consoleMessage?: IApplicationMessageToConsole): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export { Console, IApplicationMessageToConsole };
|
|
10
|
+
//# sourceMappingURL=console.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/console/console.ts"],"names":[],"mappings":"AAWA,UAAU,4BAA4B;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,cACM,OAAO;YAEK,UAAU;IAcX,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC;CA+B3H;AAED,OAAO,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/console/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ContainerModule } from "inversify";
|
|
2
|
+
declare class BaseModule {
|
|
3
|
+
constructor();
|
|
4
|
+
private static createSymbols;
|
|
5
|
+
static createContainerModule(controllers: any[]): ContainerModule;
|
|
6
|
+
}
|
|
7
|
+
declare const CreateModule: typeof BaseModule.createContainerModule;
|
|
8
|
+
export { CreateModule };
|
|
9
|
+
//# sourceMappingURL=container-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container-module.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/container-module/container-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAK5C,cACM,UAAU;;IAIZ,OAAO,CAAC,MAAM,CAAC,aAAa;WAad,qBAAqB,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,eAAe;CAY3E;AAED,QAAA,MAAM,YAAY,yCAAmC,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/container-module/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { interfaces } from 'inversify-express-utils';
|
|
2
|
+
declare abstract class BaseController implements interfaces.Controller {
|
|
3
|
+
private serviceName;
|
|
4
|
+
constructor(serviceName: string);
|
|
5
|
+
protected callUseCaseAsync(useCase: Promise<any>, res: any, successStatusCode: number): Promise<any>;
|
|
6
|
+
protected callUseCase(useCase: any, res: any, successStatusCode: number): any;
|
|
7
|
+
}
|
|
8
|
+
export { BaseController };
|
|
9
|
+
//# sourceMappingURL=base-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-controller.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/controller/base-controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,uBACe,cAAe,YAAW,UAAU,CAAC,UAAU;IAE1D,OAAO,CAAC,WAAW,CAAS;gBAEhB,WAAW,EAAE,MAAM;cAIf,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM;IAa3F,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM;CAc1E;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/controller/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare class EnvValidatorProvider {
|
|
2
|
+
static get(key: string, defaultValue?: any): any;
|
|
3
|
+
static checkAll(): void;
|
|
4
|
+
}
|
|
5
|
+
declare global {
|
|
6
|
+
interface String {
|
|
7
|
+
AsBoolean(): boolean | undefined;
|
|
8
|
+
AsNumber(): number | undefined;
|
|
9
|
+
AsString(): string | undefined;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export { EnvValidatorProvider as Environments };
|
|
13
|
+
//# sourceMappingURL=env-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-validator.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/environment/env-validator.ts"],"names":[],"mappings":"AAOA,cACM,oBAAoB;WAER,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,GAAE,GAAe,GAAG,GAAG;WAIpD,QAAQ,IAAI,IAAI;CA+BjC;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,SAAS,IAAI,OAAO,GAAG,SAAS,CAAC;QACjC,QAAQ,IAAI,MAAM,GAAG,SAAS,CAAC;QAC/B,QAAQ,IAAI,MAAM,GAAG,SAAS,CAAC;KAClC;CACJ;AAyBD,OAAO,EAAE,oBAAoB,IAAI,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/environment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-error.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/error/application-error.ts"],"names":[],"mappings":"AAEA,cACM,QAAS,SAAQ,KAAK;IAEjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;gBAEX,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;CAMpE;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NextFunction, Request, Response } from "express";
|
|
2
|
+
import { AppError } from "./application-error";
|
|
3
|
+
declare function errorHandler(error: AppError, req: Request, res: Response, next: NextFunction): void;
|
|
4
|
+
export default errorHandler;
|
|
5
|
+
//# sourceMappingURL=error-handler-middleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-handler-middleware.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/error/error-handler-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI/C,iBAAS,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAI5F;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/error/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/error/report.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,cACM,MAAM;WAEM,KAAK,CAAC,KAAK,EAAE,QAAQ;CAItC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
declare enum InformationResponse {
|
|
2
|
+
Continue = 100,
|
|
3
|
+
SwitchingProtocols = 101,
|
|
4
|
+
Processing = 102,
|
|
5
|
+
eEarlyHints = 103
|
|
6
|
+
}
|
|
7
|
+
declare enum SuccessfulResponse {
|
|
8
|
+
OK = 200,
|
|
9
|
+
Created = 201,
|
|
10
|
+
Accepted = 202,
|
|
11
|
+
NonAuthoritativeInformation = 203,
|
|
12
|
+
NoContent = 204,
|
|
13
|
+
ResetContent = 205,
|
|
14
|
+
PartialContent = 206,
|
|
15
|
+
MultiStatus = 207,
|
|
16
|
+
AlreadyReported = 208,
|
|
17
|
+
IMUsed = 226
|
|
18
|
+
}
|
|
19
|
+
declare enum RedirectionMessage {
|
|
20
|
+
MultipleChoices = 300,
|
|
21
|
+
MovedPermanently = 301,
|
|
22
|
+
Found = 302,
|
|
23
|
+
SeeOther = 303,
|
|
24
|
+
NotModified = 304,
|
|
25
|
+
TemporaryRedirect = 307,
|
|
26
|
+
PermanentRedirect = 308
|
|
27
|
+
}
|
|
28
|
+
declare enum ClientErrorResponse {
|
|
29
|
+
BadRequest = 400,
|
|
30
|
+
Unauthorized = 401,
|
|
31
|
+
PaymentRequired = 402,
|
|
32
|
+
Forbidden = 403,
|
|
33
|
+
NotFound = 404,
|
|
34
|
+
MethodNotAllowed = 405,
|
|
35
|
+
NotAcceptable = 406,
|
|
36
|
+
ProxyAuthenticationRequired = 407,
|
|
37
|
+
RequestTimeout = 408,
|
|
38
|
+
Conflict = 409,
|
|
39
|
+
Gone = 410,
|
|
40
|
+
LengthRequired = 411,
|
|
41
|
+
PreconditionFailed = 412,
|
|
42
|
+
PayloadTooLarge = 413,
|
|
43
|
+
URITooLong = 414,
|
|
44
|
+
UnsupportedMediaType = 415,
|
|
45
|
+
RangeNotSatisfiable = 416,
|
|
46
|
+
ExpectationFailed = 417,
|
|
47
|
+
ImATeapot = 418,
|
|
48
|
+
MisdirectedRequest = 421,
|
|
49
|
+
UnprocessableEntity = 422,
|
|
50
|
+
Locked = 423,
|
|
51
|
+
FailedDependency = 424,
|
|
52
|
+
TooEarly = 425,
|
|
53
|
+
UpgradeRequired = 426,
|
|
54
|
+
PreconditionRequired = 428,
|
|
55
|
+
TooManyRequests = 429,
|
|
56
|
+
RequestHeaderFieldsTooLarge = 431,
|
|
57
|
+
UnavailableForLegalReasons = 451
|
|
58
|
+
}
|
|
59
|
+
declare enum ServerErrorResponse {
|
|
60
|
+
InternalServerError = 500,
|
|
61
|
+
NotImplemented = 501,
|
|
62
|
+
BadGateway = 502,
|
|
63
|
+
ServiceUnavailable = 503,
|
|
64
|
+
GatewayTimeout = 504,
|
|
65
|
+
HTTPVersionNotSupported = 505,
|
|
66
|
+
VariantAlsoNegotiates = 506,
|
|
67
|
+
InsufficientStorage = 507,
|
|
68
|
+
LoopDetected = 508,
|
|
69
|
+
NotExtended = 510,
|
|
70
|
+
NetworkAuthenticationRequired = 511
|
|
71
|
+
}
|
|
72
|
+
declare const StatusCode: {
|
|
73
|
+
[x: number]: string;
|
|
74
|
+
InternalServerError: ServerErrorResponse.InternalServerError;
|
|
75
|
+
NotImplemented: ServerErrorResponse.NotImplemented;
|
|
76
|
+
BadGateway: ServerErrorResponse.BadGateway;
|
|
77
|
+
ServiceUnavailable: ServerErrorResponse.ServiceUnavailable;
|
|
78
|
+
GatewayTimeout: ServerErrorResponse.GatewayTimeout;
|
|
79
|
+
HTTPVersionNotSupported: ServerErrorResponse.HTTPVersionNotSupported;
|
|
80
|
+
VariantAlsoNegotiates: ServerErrorResponse.VariantAlsoNegotiates;
|
|
81
|
+
InsufficientStorage: ServerErrorResponse.InsufficientStorage;
|
|
82
|
+
LoopDetected: ServerErrorResponse.LoopDetected;
|
|
83
|
+
NotExtended: ServerErrorResponse.NotExtended;
|
|
84
|
+
NetworkAuthenticationRequired: ServerErrorResponse.NetworkAuthenticationRequired;
|
|
85
|
+
BadRequest: ClientErrorResponse.BadRequest;
|
|
86
|
+
Unauthorized: ClientErrorResponse.Unauthorized;
|
|
87
|
+
PaymentRequired: ClientErrorResponse.PaymentRequired;
|
|
88
|
+
Forbidden: ClientErrorResponse.Forbidden;
|
|
89
|
+
NotFound: ClientErrorResponse.NotFound;
|
|
90
|
+
MethodNotAllowed: ClientErrorResponse.MethodNotAllowed;
|
|
91
|
+
NotAcceptable: ClientErrorResponse.NotAcceptable;
|
|
92
|
+
ProxyAuthenticationRequired: ClientErrorResponse.ProxyAuthenticationRequired;
|
|
93
|
+
RequestTimeout: ClientErrorResponse.RequestTimeout;
|
|
94
|
+
Conflict: ClientErrorResponse.Conflict;
|
|
95
|
+
Gone: ClientErrorResponse.Gone;
|
|
96
|
+
LengthRequired: ClientErrorResponse.LengthRequired;
|
|
97
|
+
PreconditionFailed: ClientErrorResponse.PreconditionFailed;
|
|
98
|
+
PayloadTooLarge: ClientErrorResponse.PayloadTooLarge;
|
|
99
|
+
URITooLong: ClientErrorResponse.URITooLong;
|
|
100
|
+
UnsupportedMediaType: ClientErrorResponse.UnsupportedMediaType;
|
|
101
|
+
RangeNotSatisfiable: ClientErrorResponse.RangeNotSatisfiable;
|
|
102
|
+
ExpectationFailed: ClientErrorResponse.ExpectationFailed;
|
|
103
|
+
ImATeapot: ClientErrorResponse.ImATeapot;
|
|
104
|
+
MisdirectedRequest: ClientErrorResponse.MisdirectedRequest;
|
|
105
|
+
UnprocessableEntity: ClientErrorResponse.UnprocessableEntity;
|
|
106
|
+
Locked: ClientErrorResponse.Locked;
|
|
107
|
+
FailedDependency: ClientErrorResponse.FailedDependency;
|
|
108
|
+
TooEarly: ClientErrorResponse.TooEarly;
|
|
109
|
+
UpgradeRequired: ClientErrorResponse.UpgradeRequired;
|
|
110
|
+
PreconditionRequired: ClientErrorResponse.PreconditionRequired;
|
|
111
|
+
TooManyRequests: ClientErrorResponse.TooManyRequests;
|
|
112
|
+
RequestHeaderFieldsTooLarge: ClientErrorResponse.RequestHeaderFieldsTooLarge;
|
|
113
|
+
UnavailableForLegalReasons: ClientErrorResponse.UnavailableForLegalReasons;
|
|
114
|
+
MultipleChoices: RedirectionMessage.MultipleChoices;
|
|
115
|
+
MovedPermanently: RedirectionMessage.MovedPermanently;
|
|
116
|
+
Found: RedirectionMessage.Found;
|
|
117
|
+
SeeOther: RedirectionMessage.SeeOther;
|
|
118
|
+
NotModified: RedirectionMessage.NotModified;
|
|
119
|
+
TemporaryRedirect: RedirectionMessage.TemporaryRedirect;
|
|
120
|
+
PermanentRedirect: RedirectionMessage.PermanentRedirect;
|
|
121
|
+
OK: SuccessfulResponse.OK;
|
|
122
|
+
Created: SuccessfulResponse.Created;
|
|
123
|
+
Accepted: SuccessfulResponse.Accepted;
|
|
124
|
+
NonAuthoritativeInformation: SuccessfulResponse.NonAuthoritativeInformation;
|
|
125
|
+
NoContent: SuccessfulResponse.NoContent;
|
|
126
|
+
ResetContent: SuccessfulResponse.ResetContent;
|
|
127
|
+
PartialContent: SuccessfulResponse.PartialContent;
|
|
128
|
+
MultiStatus: SuccessfulResponse.MultiStatus;
|
|
129
|
+
AlreadyReported: SuccessfulResponse.AlreadyReported;
|
|
130
|
+
IMUsed: SuccessfulResponse.IMUsed;
|
|
131
|
+
Continue: InformationResponse.Continue;
|
|
132
|
+
SwitchingProtocols: InformationResponse.SwitchingProtocols;
|
|
133
|
+
Processing: InformationResponse.Processing;
|
|
134
|
+
eEarlyHints: InformationResponse.eEarlyHints;
|
|
135
|
+
};
|
|
136
|
+
export { StatusCode };
|
|
137
|
+
//# sourceMappingURL=status-code.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-code.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/error/status-code.ts"],"names":[],"mappings":"AAGA,aAAK,mBAAmB;IACpB,QAAQ,MAAM;IACd,kBAAkB,MAAM;IACxB,UAAU,MAAM;IAChB,WAAW,MAAM;CACpB;AAED,aAAK,kBAAkB;IACnB,EAAE,MAAM;IACR,OAAO,MAAM;IACb,QAAQ,MAAM;IACd,2BAA2B,MAAM;IACjC,SAAS,MAAM;IACf,YAAY,MAAM;IAClB,cAAc,MAAM;IACpB,WAAW,MAAM;IACjB,eAAe,MAAM;IACrB,MAAM,MAAM;CACf;AAED,aAAK,kBAAkB;IACnB,eAAe,MAAM;IACrB,gBAAgB,MAAM;IACtB,KAAK,MAAM;IACX,QAAQ,MAAM;IACd,WAAW,MAAM;IACjB,iBAAiB,MAAM;IACvB,iBAAiB,MAAM;CAC1B;AAED,aAAK,mBAAmB;IACpB,UAAU,MAAM;IAChB,YAAY,MAAM;IAClB,eAAe,MAAM;IACrB,SAAS,MAAM;IACf,QAAQ,MAAM;IACd,gBAAgB,MAAM;IACtB,aAAa,MAAM;IACnB,2BAA2B,MAAM;IACjC,cAAc,MAAM;IACpB,QAAQ,MAAM;IACd,IAAI,MAAM;IACV,cAAc,MAAM;IACpB,kBAAkB,MAAM;IACxB,eAAe,MAAM;IACrB,UAAU,MAAM;IAChB,oBAAoB,MAAM;IAC1B,mBAAmB,MAAM;IACzB,iBAAiB,MAAM;IACvB,SAAS,MAAM;IACf,kBAAkB,MAAM;IACxB,mBAAmB,MAAM;IACzB,MAAM,MAAM;IACZ,gBAAgB,MAAM;IACtB,QAAQ,MAAM;IACd,eAAe,MAAM;IACrB,oBAAoB,MAAM;IAC1B,eAAe,MAAM;IACrB,2BAA2B,MAAM;IACjC,0BAA0B,MAAM;CACnC;AAED,aAAK,mBAAmB;IACpB,mBAAmB,MAAM;IACzB,cAAc,MAAM;IACpB,UAAU,MAAM;IAChB,kBAAkB,MAAM;IACxB,cAAc,MAAM;IACpB,uBAAuB,MAAM;IAC7B,qBAAqB,MAAM;IAC3B,mBAAmB,MAAM;IACzB,YAAY,MAAM;IAClB,WAAW,MAAM;IACjB,6BAA6B,MAAM;CACtC;AAGD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA6B,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/core/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare enum LogLevel {
|
|
2
|
+
Debug = 0,
|
|
3
|
+
Error = 1,
|
|
4
|
+
Info = 2
|
|
5
|
+
}
|
|
6
|
+
declare class GeneralLogger {
|
|
7
|
+
private logger;
|
|
8
|
+
constructor();
|
|
9
|
+
private createConsoleTransport;
|
|
10
|
+
private createRotationalFileTransport;
|
|
11
|
+
private createLoggerOptions;
|
|
12
|
+
private getPathAndLine;
|
|
13
|
+
log(logLevel: LogLevel, content: Error | string, service?: string): void;
|
|
14
|
+
}
|
|
15
|
+
declare const log: (logLevel: LogLevel, content: Error | string, service?: string) => void;
|
|
16
|
+
export { LogLevel, GeneralLogger, log };
|
|
17
|
+
//# sourceMappingURL=general-logger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"general-logger.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/logger/general-logger.ts"],"names":[],"mappings":"AAIA,aAAK,QAAQ;IACT,KAAK,IAAA;IACL,KAAK,IAAA;IACL,IAAI,IAAA;CACP;AAED,cACM,aAAa;IAEf,OAAO,CAAC,MAAM,CAAS;;IAMvB,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,6BAA6B;IAerC,OAAO,CAAC,mBAAmB;IAqB3B,OAAO,CAAC,cAAc;IAYf,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,GAAG,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM;CAwB3E;AAGD,QAAA,MAAM,GAAG,aA3BgB,QAAQ,WAAW,KAAK,GAAG,MAAM,YAAY,MAAM,SA2B9C,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/core/src/logger/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC"}
|