CrazyDoctor 4 days ago
parent
commit
80c37d5759
100 changed files with 5 additions and 888 deletions
  1. 3 1
      .eslintrc
  2. 2 1
      .gitignore
  3. 0 4
      dist/base/exceptions/IncorrectMethodException.d.ts
  4. 0 11
      dist/base/exceptions/IncorrectMethodException.js
  5. 0 1
      dist/base/exceptions/IncorrectMethodException.js.map
  6. 0 4
      dist/base/exceptions/InvalidMiddlewareException.d.ts
  7. 0 11
      dist/base/exceptions/InvalidMiddlewareException.js
  8. 0 1
      dist/base/exceptions/InvalidMiddlewareException.js.map
  9. 0 4
      dist/base/exceptions/InvalidRouteException.d.ts
  10. 0 11
      dist/base/exceptions/InvalidRouteException.js
  11. 0 1
      dist/base/exceptions/InvalidRouteException.js.map
  12. 0 4
      dist/base/exceptions/RouteNotSetException.d.ts
  13. 0 11
      dist/base/exceptions/RouteNotSetException.js
  14. 0 1
      dist/base/exceptions/RouteNotSetException.js.map
  15. 0 4
      dist/base/exceptions/ServerNotInitializedException.d.ts
  16. 0 11
      dist/base/exceptions/ServerNotInitializedException.js
  17. 0 1
      dist/base/exceptions/ServerNotInitializedException.js.map
  18. 0 5
      dist/base/exceptions/index.d.ts
  19. 0 14
      dist/base/exceptions/index.js
  20. 0 1
      dist/base/exceptions/index.js.map
  21. 0 13
      dist/base/http/HttpHandler.d.ts
  22. 0 26
      dist/base/http/HttpHandler.js
  23. 0 1
      dist/base/http/HttpHandler.js.map
  24. 0 5
      dist/base/http/HttpMethod.d.ts
  25. 0 9
      dist/base/http/HttpMethod.js
  26. 0 1
      dist/base/http/HttpMethod.js.map
  27. 0 5
      dist/base/http/Middleware.d.ts
  28. 0 8
      dist/base/http/Middleware.js
  29. 0 1
      dist/base/http/Middleware.js.map
  30. 0 4
      dist/base/http/NextFunction.d.ts
  31. 0 4
      dist/base/http/NextFunction.js
  32. 0 1
      dist/base/http/NextFunction.js.map
  33. 0 4
      dist/base/http/Request.d.ts
  34. 0 4
      dist/base/http/Request.js
  35. 0 1
      dist/base/http/Request.js.map
  36. 0 4
      dist/base/http/Response.d.ts
  37. 0 4
      dist/base/http/Response.js
  38. 0 1
      dist/base/http/Response.js.map
  39. 0 12
      dist/base/http/Route.d.ts
  40. 0 17
      dist/base/http/Route.js
  41. 0 1
      dist/base/http/Route.js.map
  42. 0 43
      dist/base/http/StatusCodes.d.ts
  43. 0 47
      dist/base/http/StatusCodes.js
  44. 0 1
      dist/base/http/StatusCodes.js.map
  45. 0 8
      dist/base/http/index.d.ts
  46. 0 14
      dist/base/http/index.js
  47. 0 1
      dist/base/http/index.js.map
  48. 0 4
      dist/base/i18n/KeyParams.d.ts
  49. 0 3
      dist/base/i18n/KeyParams.js
  50. 0 1
      dist/base/i18n/KeyParams.js.map
  51. 0 16
      dist/base/i18n/i18n.d.ts
  52. 0 73
      dist/base/i18n/i18n.js
  53. 0 0
      dist/base/i18n/i18n.js.map
  54. 0 6
      dist/base/i18n/i18nMap.d.ts
  55. 0 3
      dist/base/i18n/i18nMap.js
  56. 0 1
      dist/base/i18n/i18nMap.js.map
  57. 0 3
      dist/base/i18n/index.d.ts
  58. 0 18
      dist/base/i18n/index.js
  59. 0 1
      dist/base/i18n/index.js.map
  60. 0 10
      dist/base/logger/Logger.d.ts
  61. 0 40
      dist/base/logger/Logger.js
  62. 0 1
      dist/base/logger/Logger.js.map
  63. 0 6
      dist/base/logger/Message.d.ts
  64. 0 3
      dist/base/logger/Message.js
  65. 0 1
      dist/base/logger/Message.js.map
  66. 0 6
      dist/base/logger/MessageTypes.d.ts
  67. 0 10
      dist/base/logger/MessageTypes.js
  68. 0 1
      dist/base/logger/MessageTypes.js.map
  69. 0 3
      dist/base/logger/index.d.ts
  70. 0 8
      dist/base/logger/index.js
  71. 0 1
      dist/base/logger/index.js.map
  72. 0 28
      dist/base/swagger/SwaggerDoc.d.ts
  73. 0 140
      dist/base/swagger/SwaggerDoc.js
  74. 0 0
      dist/base/swagger/SwaggerDoc.js.map
  75. 0 9
      dist/base/swagger/SwaggerParameterInType.d.ts
  76. 0 14
      dist/base/swagger/SwaggerParameterInType.js
  77. 0 1
      dist/base/swagger/SwaggerParameterInType.js.map
  78. 0 10
      dist/base/swagger/SwaggerParameterType.d.ts
  79. 0 3
      dist/base/swagger/SwaggerParameterType.js
  80. 0 1
      dist/base/swagger/SwaggerParameterType.js.map
  81. 0 6
      dist/base/swagger/SwaggerRequestBodyContentType.d.ts
  82. 0 3
      dist/base/swagger/SwaggerRequestBodyContentType.js
  83. 0 1
      dist/base/swagger/SwaggerRequestBodyContentType.js.map
  84. 0 7
      dist/base/swagger/SwaggerRequestBodyType.d.ts
  85. 0 3
      dist/base/swagger/SwaggerRequestBodyType.js
  86. 0 1
      dist/base/swagger/SwaggerRequestBodyType.js.map
  87. 0 6
      dist/base/swagger/SwaggerResponseContentType.d.ts
  88. 0 3
      dist/base/swagger/SwaggerResponseContentType.js
  89. 0 1
      dist/base/swagger/SwaggerResponseContentType.js.map
  90. 0 7
      dist/base/swagger/SwaggerResponseType.d.ts
  91. 0 3
      dist/base/swagger/SwaggerResponseType.js
  92. 0 1
      dist/base/swagger/SwaggerResponseType.js.map
  93. 0 10
      dist/base/swagger/SwaggerSchemaType.d.ts
  94. 0 3
      dist/base/swagger/SwaggerSchemaType.js
  95. 0 1
      dist/base/swagger/SwaggerSchemaType.js.map
  96. 0 8
      dist/base/swagger/index.d.ts
  97. 0 8
      dist/base/swagger/index.js
  98. 0 1
      dist/base/swagger/index.js.map
  99. 0 4
      dist/base/util/Guid.d.ts
  100. 0 44
      dist/base/util/Guid.js

+ 3 - 1
.eslintrc

@@ -8,9 +8,11 @@
   "rules": {
   "rules": {
     "indent": ["error", "tab"],
     "indent": ["error", "tab"],
     "semi": ["error", "always"],
     "semi": ["error", "always"],
+    "quotes": ["error", "single"],
     "@typescript-eslint/no-explicit-any": "off",
     "@typescript-eslint/no-explicit-any": "off",
     "@typescript-eslint/no-unused-vars": "off",
     "@typescript-eslint/no-unused-vars": "off",
-    "quotes": ["error", "single"],
+	"@typescript-eslint/no-empty-object-type": "off",
+	"@typescript-eslint/no-unused-expressions": "off",
     "@typescript-eslint/explicit-member-accessibility": "error",
     "@typescript-eslint/explicit-member-accessibility": "error",
     "@typescript-eslint/explicit-function-return-type": "error"
     "@typescript-eslint/explicit-function-return-type": "error"
   },
   },

+ 2 - 1
.gitignore

@@ -1,4 +1,5 @@
 .idea/
 .idea/
 node_modules/
 node_modules/
 *.iml
 *.iml
-test/
+test/
+types/

+ 0 - 4
dist/base/exceptions/IncorrectMethodException.d.ts

@@ -1,4 +0,0 @@
-declare class IncorrectMethodException extends Error {
-    constructor();
-}
-export { IncorrectMethodException };

+ 0 - 11
dist/base/exceptions/IncorrectMethodException.js

@@ -1,11 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.IncorrectMethodException = void 0;
-class IncorrectMethodException extends Error {
-    constructor() {
-        super('Incorrect method');
-        this.name = 'IncorrectMethod';
-    }
-}
-exports.IncorrectMethodException = IncorrectMethodException;
-//# sourceMappingURL=IncorrectMethodException.js.map

+ 0 - 1
dist/base/exceptions/IncorrectMethodException.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"IncorrectMethodException.js","sourceRoot":"","sources":["../../../lib/base/exceptions/IncorrectMethodException.ts"],"names":[],"mappings":";;;AAAA,MAAM,wBAAyB,SAAQ,KAAK;IAC3C;QACC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAC/B,CAAC;CACD;AAEQ,4DAAwB"}

+ 0 - 4
dist/base/exceptions/InvalidMiddlewareException.d.ts

@@ -1,4 +0,0 @@
-declare class InvalidMiddlewareException extends Error {
-    constructor(file: string);
-}
-export { InvalidMiddlewareException };

+ 0 - 11
dist/base/exceptions/InvalidMiddlewareException.js

@@ -1,11 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.InvalidMiddlewareException = void 0;
-class InvalidMiddlewareException extends Error {
-    constructor(file) {
-        super(`Invalid middleware: ${file}`);
-        this.name = 'InvalidMiddleware';
-    }
-}
-exports.InvalidMiddlewareException = InvalidMiddlewareException;
-//# sourceMappingURL=InvalidMiddlewareException.js.map

+ 0 - 1
dist/base/exceptions/InvalidMiddlewareException.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"InvalidMiddlewareException.js","sourceRoot":"","sources":["../../../lib/base/exceptions/InvalidMiddlewareException.ts"],"names":[],"mappings":";;;AAAA,MAAM,0BAA2B,SAAQ,KAAK;IAC7C,YAAmB,IAAY;QAC9B,KAAK,CAAC,uBAAuB,IAAI,EAAE,CAAC,CAAC;QACrC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IACjC,CAAC;CACD;AAEQ,gEAA0B"}

+ 0 - 4
dist/base/exceptions/InvalidRouteException.d.ts

@@ -1,4 +0,0 @@
-declare class InvalidRouteException extends Error {
-    constructor(file: string);
-}
-export { InvalidRouteException };

+ 0 - 11
dist/base/exceptions/InvalidRouteException.js

@@ -1,11 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.InvalidRouteException = void 0;
-class InvalidRouteException extends Error {
-    constructor(file) {
-        super(`Invalid route: ${file}`);
-        this.name = 'InvalidRoute';
-    }
-}
-exports.InvalidRouteException = InvalidRouteException;
-//# sourceMappingURL=InvalidRouteException.js.map

+ 0 - 1
dist/base/exceptions/InvalidRouteException.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"InvalidRouteException.js","sourceRoot":"","sources":["../../../lib/base/exceptions/InvalidRouteException.ts"],"names":[],"mappings":";;;AAAA,MAAM,qBAAsB,SAAQ,KAAK;IACxC,YAAmB,IAAY;QAC9B,KAAK,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC5B,CAAC;CACD;AAEQ,sDAAqB"}

+ 0 - 4
dist/base/exceptions/RouteNotSetException.d.ts

@@ -1,4 +0,0 @@
-declare class RouteNotSetException extends Error {
-    constructor();
-}
-export { RouteNotSetException };

+ 0 - 11
dist/base/exceptions/RouteNotSetException.js

@@ -1,11 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.RouteNotSetException = void 0;
-class RouteNotSetException extends Error {
-    constructor() {
-        super('Route was not set.');
-        this.name = 'RouteNotSet';
-    }
-}
-exports.RouteNotSetException = RouteNotSetException;
-//# sourceMappingURL=RouteNotSetException.js.map

+ 0 - 1
dist/base/exceptions/RouteNotSetException.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"RouteNotSetException.js","sourceRoot":"","sources":["../../../lib/base/exceptions/RouteNotSetException.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAqB,SAAQ,KAAK;IACvC;QACC,KAAK,CAAC,oBAAoB,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC;IAC3B,CAAC;CACD;AAEQ,oDAAoB"}

+ 0 - 4
dist/base/exceptions/ServerNotInitializedException.d.ts

@@ -1,4 +0,0 @@
-declare class ServerNotInitializedException extends Error {
-    constructor();
-}
-export { ServerNotInitializedException };

+ 0 - 11
dist/base/exceptions/ServerNotInitializedException.js

@@ -1,11 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.ServerNotInitializedException = void 0;
-class ServerNotInitializedException extends Error {
-    constructor() {
-        super('Server not initialized');
-        this.name = 'ServerNotInitialized';
-    }
-}
-exports.ServerNotInitializedException = ServerNotInitializedException;
-//# sourceMappingURL=ServerNotInitializedException.js.map

+ 0 - 1
dist/base/exceptions/ServerNotInitializedException.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"ServerNotInitializedException.js","sourceRoot":"","sources":["../../../lib/base/exceptions/ServerNotInitializedException.ts"],"names":[],"mappings":";;;AAAA,MAAM,6BAA8B,SAAQ,KAAK;IAChD;QACC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACpC,CAAC;CACD;AAEQ,sEAA6B"}

+ 0 - 5
dist/base/exceptions/index.d.ts

@@ -1,5 +0,0 @@
-export { IncorrectMethodException } from './IncorrectMethodException';
-export { InvalidMiddlewareException } from './InvalidMiddlewareException';
-export { InvalidRouteException } from './InvalidRouteException';
-export { RouteNotSetException } from './RouteNotSetException';
-export { ServerNotInitializedException } from './ServerNotInitializedException';

+ 0 - 14
dist/base/exceptions/index.js

@@ -1,14 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.ServerNotInitializedException = exports.RouteNotSetException = exports.InvalidRouteException = exports.InvalidMiddlewareException = exports.IncorrectMethodException = void 0;
-var IncorrectMethodException_1 = require("./IncorrectMethodException");
-Object.defineProperty(exports, "IncorrectMethodException", { enumerable: true, get: function () { return IncorrectMethodException_1.IncorrectMethodException; } });
-var InvalidMiddlewareException_1 = require("./InvalidMiddlewareException");
-Object.defineProperty(exports, "InvalidMiddlewareException", { enumerable: true, get: function () { return InvalidMiddlewareException_1.InvalidMiddlewareException; } });
-var InvalidRouteException_1 = require("./InvalidRouteException");
-Object.defineProperty(exports, "InvalidRouteException", { enumerable: true, get: function () { return InvalidRouteException_1.InvalidRouteException; } });
-var RouteNotSetException_1 = require("./RouteNotSetException");
-Object.defineProperty(exports, "RouteNotSetException", { enumerable: true, get: function () { return RouteNotSetException_1.RouteNotSetException; } });
-var ServerNotInitializedException_1 = require("./ServerNotInitializedException");
-Object.defineProperty(exports, "ServerNotInitializedException", { enumerable: true, get: function () { return ServerNotInitializedException_1.ServerNotInitializedException; } });
-//# sourceMappingURL=index.js.map

+ 0 - 1
dist/base/exceptions/index.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/base/exceptions/index.ts"],"names":[],"mappings":";;;AAAA,uEAAsE;AAA7D,oIAAA,wBAAwB,OAAA;AACjC,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA;AACnC,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,iFAAgF;AAAvE,8IAAA,6BAA6B,OAAA"}

+ 0 - 13
dist/base/http/HttpHandler.d.ts

@@ -1,13 +0,0 @@
-declare abstract class HttpHandler {
-    protected abstract order: number;
-    protected abstract route: string | null;
-    protected abstract action: (...any: any[]) => any;
-    protected context: any;
-    constructor(context: Record<string, any>);
-    setContext(context: Record<string, any>): HttpHandler;
-    getContext(): Record<string, any>;
-    getRoute(): string | null;
-    getAction(): (...any: any[]) => any;
-    getOrder(): number;
-}
-export { HttpHandler };

+ 0 - 26
dist/base/http/HttpHandler.js

@@ -1,26 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.HttpHandler = void 0;
-class HttpHandler {
-    constructor(context) {
-        this.context = context !== null && context !== void 0 ? context : null;
-    }
-    setContext(context) {
-        this.context = context;
-        return this;
-    }
-    getContext() {
-        return this.context;
-    }
-    getRoute() {
-        return this.route;
-    }
-    getAction() {
-        return this.action;
-    }
-    getOrder() {
-        return this.order;
-    }
-}
-exports.HttpHandler = HttpHandler;
-//# sourceMappingURL=HttpHandler.js.map

+ 0 - 1
dist/base/http/HttpHandler.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"HttpHandler.js","sourceRoot":"","sources":["../../../lib/base/http/HttpHandler.ts"],"names":[],"mappings":";;;AAAA,MAAe,WAAW;IAMzB,YAAmB,OAA4B;QAC9C,IAAI,CAAC,OAAO,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,IAAI,CAAC;IAChC,CAAC;IAEM,UAAU,CAAC,OAA4B;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,UAAU;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAEM,QAAQ;QACd,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAEM,SAAS;QACf,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAEM,QAAQ;QACd,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;CACD;AAEQ,kCAAW"}

+ 0 - 5
dist/base/http/HttpMethod.d.ts

@@ -1,5 +0,0 @@
-declare enum HttpMethod {
-    GET = 0,
-    POST = 1
-}
-export { HttpMethod };

+ 0 - 9
dist/base/http/HttpMethod.js

@@ -1,9 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.HttpMethod = void 0;
-var HttpMethod;
-(function (HttpMethod) {
-    HttpMethod[HttpMethod["GET"] = 0] = "GET";
-    HttpMethod[HttpMethod["POST"] = 1] = "POST";
-})(HttpMethod || (exports.HttpMethod = HttpMethod = {}));
-//# sourceMappingURL=HttpMethod.js.map

+ 0 - 1
dist/base/http/HttpMethod.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"HttpMethod.js","sourceRoot":"","sources":["../../../lib/base/http/HttpMethod.ts"],"names":[],"mappings":";;;AAAA,IAAK,UAGJ;AAHD,WAAK,UAAU;IACX,yCAAG,CAAA;IACH,2CAAI,CAAA;AACR,CAAC,EAHI,UAAU,0BAAV,UAAU,QAGd"}

+ 0 - 5
dist/base/http/Middleware.d.ts

@@ -1,5 +0,0 @@
-import { HttpHandler } from './HttpHandler';
-declare abstract class Middleware extends HttpHandler {
-    protected abstract action: (...any: any[]) => any;
-}
-export { Middleware };

+ 0 - 8
dist/base/http/Middleware.js

@@ -1,8 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.Middleware = void 0;
-const HttpHandler_1 = require("./HttpHandler");
-class Middleware extends HttpHandler_1.HttpHandler {
-}
-exports.Middleware = Middleware;
-//# sourceMappingURL=Middleware.js.map

+ 0 - 1
dist/base/http/Middleware.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"Middleware.js","sourceRoot":"","sources":["../../../lib/base/http/Middleware.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAE5C,MAAe,UAAW,SAAQ,yBAAW;CAE5C;AAEQ,gCAAU"}

+ 0 - 4
dist/base/http/NextFunction.d.ts

@@ -1,4 +0,0 @@
-import { NextFunction as ExpressNextFunction } from 'express';
-interface NextFunction extends ExpressNextFunction {
-}
-export { NextFunction };

+ 0 - 4
dist/base/http/NextFunction.js

@@ -1,4 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-;
-//# sourceMappingURL=NextFunction.js.map

+ 0 - 1
dist/base/http/NextFunction.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"NextFunction.js","sourceRoot":"","sources":["../../../lib/base/http/NextFunction.ts"],"names":[],"mappings":";;AAEqD,CAAC"}

+ 0 - 4
dist/base/http/Request.d.ts

@@ -1,4 +0,0 @@
-import { Request as ExpressRequest } from 'express';
-interface Request extends ExpressRequest {
-}
-export { Request };

+ 0 - 4
dist/base/http/Request.js

@@ -1,4 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-;
-//# sourceMappingURL=Request.js.map

+ 0 - 1
dist/base/http/Request.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"Request.js","sourceRoot":"","sources":["../../../lib/base/http/Request.ts"],"names":[],"mappings":";;AAE2C,CAAC"}

+ 0 - 4
dist/base/http/Response.d.ts

@@ -1,4 +0,0 @@
-import { Response as ExpressResponse } from 'express';
-interface Response extends ExpressResponse {
-}
-export { Response };

+ 0 - 4
dist/base/http/Response.js

@@ -1,4 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-;
-//# sourceMappingURL=Response.js.map

+ 0 - 1
dist/base/http/Response.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../lib/base/http/Response.ts"],"names":[],"mappings":";;AAE6C,CAAC"}

+ 0 - 12
dist/base/http/Route.d.ts

@@ -1,12 +0,0 @@
-import { HttpMethod } from './HttpMethod';
-import { HttpHandler } from './HttpHandler';
-import { Request } from './Request';
-import { Response } from './Response';
-declare abstract class Route extends HttpHandler {
-    protected abstract method: HttpMethod;
-    protected abstract action: (req: Request, res: Response) => any;
-    protected get documentation(): string;
-    getMethod(): HttpMethod;
-    getDocumentation(): string;
-}
-export { Route };

+ 0 - 17
dist/base/http/Route.js

@@ -1,17 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.Route = void 0;
-const HttpHandler_1 = require("./HttpHandler");
-class Route extends HttpHandler_1.HttpHandler {
-    get documentation() {
-        return '';
-    }
-    getMethod() {
-        return this.method;
-    }
-    getDocumentation() {
-        return this.documentation;
-    }
-}
-exports.Route = Route;
-//# sourceMappingURL=Route.js.map

+ 0 - 1
dist/base/http/Route.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"Route.js","sourceRoot":"","sources":["../../../lib/base/http/Route.ts"],"names":[],"mappings":";;;AACA,+CAA4C;AAI5C,MAAe,KAAM,SAAQ,yBAAW;IAIvC,IAAc,aAAa;QAC1B,OAAO,EAAE,CAAC;IACX,CAAC;IAEM,SAAS;QACf,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAEM,gBAAgB;QACtB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;CACD;AAEQ,sBAAK"}

+ 0 - 43
dist/base/http/StatusCodes.d.ts

@@ -1,43 +0,0 @@
-declare enum StatusCodes {
-    CONTINUE = 100,
-    SWITCHING_PROTOCOLS = 101,
-    OK = 200,
-    CREATED = 201,
-    ACCEPTED = 202,
-    NON_AUTHORITATIVE_INFORMATION = 203,
-    NO_CONTENT = 204,
-    RESET_CONTENT = 205,
-    PARTIAL_CONTENT = 206,
-    MULTIPLE_CHOICES = 300,
-    MOVED_PERMANENTLY = 301,
-    MOVED_TEMPORARILY = 302,
-    SEE_OTHER = 303,
-    NOT_MODIFIED = 304,
-    USE_PROXY = 305,
-    TEMPORARY_REDIRECT = 307,
-    BAD_REQUEST = 400,
-    UNAUTHORIZED = 401,
-    PAYMENT_REQUIRED = 402,
-    FORBIDDEN = 403,
-    NOT_FOUND = 404,
-    METHOD_NOT_ALLOWED = 405,
-    NOT_ACCEPTABLE = 406,
-    PROXY_AUTHENTICATION_REQUIRED = 407,
-    REQUEST_TIMEOUT = 408,
-    CONFLICT = 409,
-    GONE = 410,
-    LENGTH_REQUIRED = 411,
-    PRECONDITION_FAILED = 412,
-    REQUEST_ENTITY_TOO_LARGE = 413,
-    REQUEST_URI_TOO_LONG = 414,
-    UNSUPPORTED_MEDIA_TYPE = 415,
-    REQUESTED_RANGE_NOT_SATISFIABLE = 416,
-    EXPECTATION_FAILED = 417,
-    INTERNAL_SERVER_ERROR = 500,
-    NOT_IMPLEMENTED = 501,
-    BAD_GATEWAY = 502,
-    SERVICE_UNAVAILABLE = 503,
-    GATEWAY_TIMEOUT = 504,
-    HTTP_VERSION_NOT_SUPPORTED = 505
-}
-export { StatusCodes };

+ 0 - 47
dist/base/http/StatusCodes.js

@@ -1,47 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.StatusCodes = void 0;
-var StatusCodes;
-(function (StatusCodes) {
-    StatusCodes[StatusCodes["CONTINUE"] = 100] = "CONTINUE";
-    StatusCodes[StatusCodes["SWITCHING_PROTOCOLS"] = 101] = "SWITCHING_PROTOCOLS";
-    StatusCodes[StatusCodes["OK"] = 200] = "OK";
-    StatusCodes[StatusCodes["CREATED"] = 201] = "CREATED";
-    StatusCodes[StatusCodes["ACCEPTED"] = 202] = "ACCEPTED";
-    StatusCodes[StatusCodes["NON_AUTHORITATIVE_INFORMATION"] = 203] = "NON_AUTHORITATIVE_INFORMATION";
-    StatusCodes[StatusCodes["NO_CONTENT"] = 204] = "NO_CONTENT";
-    StatusCodes[StatusCodes["RESET_CONTENT"] = 205] = "RESET_CONTENT";
-    StatusCodes[StatusCodes["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT";
-    StatusCodes[StatusCodes["MULTIPLE_CHOICES"] = 300] = "MULTIPLE_CHOICES";
-    StatusCodes[StatusCodes["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY";
-    StatusCodes[StatusCodes["MOVED_TEMPORARILY"] = 302] = "MOVED_TEMPORARILY";
-    StatusCodes[StatusCodes["SEE_OTHER"] = 303] = "SEE_OTHER";
-    StatusCodes[StatusCodes["NOT_MODIFIED"] = 304] = "NOT_MODIFIED";
-    StatusCodes[StatusCodes["USE_PROXY"] = 305] = "USE_PROXY";
-    StatusCodes[StatusCodes["TEMPORARY_REDIRECT"] = 307] = "TEMPORARY_REDIRECT";
-    StatusCodes[StatusCodes["BAD_REQUEST"] = 400] = "BAD_REQUEST";
-    StatusCodes[StatusCodes["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
-    StatusCodes[StatusCodes["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED";
-    StatusCodes[StatusCodes["FORBIDDEN"] = 403] = "FORBIDDEN";
-    StatusCodes[StatusCodes["NOT_FOUND"] = 404] = "NOT_FOUND";
-    StatusCodes[StatusCodes["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED";
-    StatusCodes[StatusCodes["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
-    StatusCodes[StatusCodes["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED";
-    StatusCodes[StatusCodes["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
-    StatusCodes[StatusCodes["CONFLICT"] = 409] = "CONFLICT";
-    StatusCodes[StatusCodes["GONE"] = 410] = "GONE";
-    StatusCodes[StatusCodes["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED";
-    StatusCodes[StatusCodes["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
-    StatusCodes[StatusCodes["REQUEST_ENTITY_TOO_LARGE"] = 413] = "REQUEST_ENTITY_TOO_LARGE";
-    StatusCodes[StatusCodes["REQUEST_URI_TOO_LONG"] = 414] = "REQUEST_URI_TOO_LONG";
-    StatusCodes[StatusCodes["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE";
-    StatusCodes[StatusCodes["REQUESTED_RANGE_NOT_SATISFIABLE"] = 416] = "REQUESTED_RANGE_NOT_SATISFIABLE";
-    StatusCodes[StatusCodes["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED";
-    StatusCodes[StatusCodes["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
-    StatusCodes[StatusCodes["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
-    StatusCodes[StatusCodes["BAD_GATEWAY"] = 502] = "BAD_GATEWAY";
-    StatusCodes[StatusCodes["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
-    StatusCodes[StatusCodes["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT";
-    StatusCodes[StatusCodes["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED";
-})(StatusCodes || (exports.StatusCodes = StatusCodes = {}));
-//# sourceMappingURL=StatusCodes.js.map

+ 0 - 1
dist/base/http/StatusCodes.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"StatusCodes.js","sourceRoot":"","sources":["../../../lib/base/http/StatusCodes.ts"],"names":[],"mappings":";;;AAAA,IAAK,WAyCJ;AAzCD,WAAK,WAAW;IACf,uDAAc,CAAA;IACd,6EAAyB,CAAA;IACzB,2CAAQ,CAAA;IACR,qDAAa,CAAA;IACb,uDAAc,CAAA;IACd,iGAAmC,CAAA;IACnC,2DAAgB,CAAA;IAChB,iEAAmB,CAAA;IACnB,qEAAqB,CAAA;IACrB,uEAAsB,CAAA;IACtB,yEAAuB,CAAA;IACvB,yEAAuB,CAAA;IACvB,yDAAe,CAAA;IACf,+DAAkB,CAAA;IAClB,yDAAe,CAAA;IACf,2EAAwB,CAAA;IACxB,6DAAiB,CAAA;IACjB,+DAAkB,CAAA;IAClB,uEAAsB,CAAA;IACtB,yDAAe,CAAA;IACf,yDAAe,CAAA;IACf,2EAAwB,CAAA;IACxB,mEAAoB,CAAA;IACpB,iGAAmC,CAAA;IACnC,qEAAqB,CAAA;IACrB,uDAAc,CAAA;IACd,+CAAU,CAAA;IACV,qEAAqB,CAAA;IACrB,6EAAyB,CAAA;IACzB,uFAA8B,CAAA;IAC9B,+EAA0B,CAAA;IAC1B,mFAA4B,CAAA;IAC5B,qGAAqC,CAAA;IACrC,2EAAwB,CAAA;IACxB,iFAA2B,CAAA;IAC3B,qEAAqB,CAAA;IACrB,6DAAiB,CAAA;IACjB,6EAAyB,CAAA;IACzB,qEAAqB,CAAA;IACrB,2FAAgC,CAAA;AACjC,CAAC,EAzCI,WAAW,2BAAX,WAAW,QAyCf"}

+ 0 - 8
dist/base/http/index.d.ts

@@ -1,8 +0,0 @@
-export { HttpHandler } from './HttpHandler';
-export { HttpMethod } from './HttpMethod';
-export { Middleware } from './Middleware';
-export { Route } from './Route';
-export { StatusCodes } from './StatusCodes';
-export { Response } from './Response';
-export { Request } from './Request';
-export { NextFunction } from './NextFunction';

+ 0 - 14
dist/base/http/index.js

@@ -1,14 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.StatusCodes = exports.Route = exports.Middleware = exports.HttpMethod = exports.HttpHandler = void 0;
-var HttpHandler_1 = require("./HttpHandler");
-Object.defineProperty(exports, "HttpHandler", { enumerable: true, get: function () { return HttpHandler_1.HttpHandler; } });
-var HttpMethod_1 = require("./HttpMethod");
-Object.defineProperty(exports, "HttpMethod", { enumerable: true, get: function () { return HttpMethod_1.HttpMethod; } });
-var Middleware_1 = require("./Middleware");
-Object.defineProperty(exports, "Middleware", { enumerable: true, get: function () { return Middleware_1.Middleware; } });
-var Route_1 = require("./Route");
-Object.defineProperty(exports, "Route", { enumerable: true, get: function () { return Route_1.Route; } });
-var StatusCodes_1 = require("./StatusCodes");
-Object.defineProperty(exports, "StatusCodes", { enumerable: true, get: function () { return StatusCodes_1.StatusCodes; } });
-//# sourceMappingURL=index.js.map

+ 0 - 1
dist/base/http/index.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/base/http/index.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AACnB,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,6CAA4C;AAAnC,0GAAA,WAAW,OAAA"}

+ 0 - 4
dist/base/i18n/KeyParams.d.ts

@@ -1,4 +0,0 @@
-type KeyParams = {
-    [key: string]: any;
-};
-export { KeyParams };

+ 0 - 3
dist/base/i18n/KeyParams.js

@@ -1,3 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-//# sourceMappingURL=KeyParams.js.map

+ 0 - 1
dist/base/i18n/KeyParams.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"KeyParams.js","sourceRoot":"","sources":["../../../lib/base/i18n/KeyParams.ts"],"names":[],"mappings":""}

+ 0 - 16
dist/base/i18n/i18n.d.ts

@@ -1,16 +0,0 @@
-import { i18nMap } from './i18nMap';
-import { KeyParams } from './KeyParams';
-declare class i18nLoader {
-    private static instance;
-    private readonly map;
-    private locale;
-    static defaultLocale: string;
-    constructor(locale: string);
-    static getInstance(locale?: string): i18nLoader;
-    setLocale(locale: string): i18nLoader;
-    load(...paths: string[]): i18nLoader;
-    loadJson(obj: i18nMap): i18nLoader;
-    get(key: string): string;
-}
-declare const $$: (key: string, params?: KeyParams) => string;
-export { i18nLoader, $$ };

+ 0 - 73
dist/base/i18n/i18n.js

@@ -1,73 +0,0 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
-    return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.$$ = exports.i18nLoader = void 0;
-const fs_1 = __importDefault(require("fs"));
-class i18nLoader {
-    constructor(locale) {
-        this.locale = locale;
-        this.map = {};
-    }
-    static getInstance(locale) {
-        if (!i18nLoader.instance)
-            i18nLoader.instance = new i18nLoader(locale !== null && locale !== void 0 ? locale : i18nLoader.defaultLocale);
-        return i18nLoader.instance;
-    }
-    setLocale(locale) {
-        this.locale = locale;
-        return this;
-    }
-    load(...paths) {
-        for (const p of paths) {
-            try {
-                const data = fs_1.default.readFileSync(p).toString('utf8');
-                try {
-                    this.loadJson(JSON.parse(data));
-                }
-                catch (err) {
-                    console.error('JSON parsing error:', err);
-                }
-            }
-            catch (error) {
-                console.error(`i18n file '${p}' not found.`, error);
-            }
-        }
-        return this;
-    }
-    loadJson(obj) {
-        for (const locale of Object.keys(obj)) {
-            if (!this.map[locale])
-                this.map[locale] = {};
-            for (const key of Object.keys(obj[locale]))
-                this.map[locale][key] = obj[locale][key];
-        }
-        return this;
-    }
-    get(key) {
-        var _a;
-        let value;
-        if (!this.map[this.locale] && !this.map[i18nLoader.defaultLocale])
-            return key;
-        if (this.map[i18nLoader.defaultLocale])
-            value = this.map[i18nLoader.defaultLocale][key];
-        if (this.map[this.locale])
-            value = (_a = this.map[this.locale][key]) !== null && _a !== void 0 ? _a : value;
-        return value !== null && value !== void 0 ? value : key;
-    }
-}
-exports.i18nLoader = i18nLoader;
-i18nLoader.defaultLocale = 'en_US';
-const $$ = (key, params) => {
-    let text = i18nLoader.getInstance().get(key);
-    if (params) {
-        for (const param of Object.keys(params)) {
-            const regex = new RegExp(`\{${param}\}`, 'g');
-            text = text.replace(regex, params[param]);
-        }
-    }
-    return text;
-};
-exports.$$ = $$;
-//# sourceMappingURL=i18n.js.map

File diff suppressed because it is too large
+ 0 - 0
dist/base/i18n/i18n.js.map


+ 0 - 6
dist/base/i18n/i18nMap.d.ts

@@ -1,6 +0,0 @@
-type i18nMap = {
-    [key: string]: {
-        [key: string]: string;
-    };
-};
-export { i18nMap };

+ 0 - 3
dist/base/i18n/i18nMap.js

@@ -1,3 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-//# sourceMappingURL=i18nMap.js.map

+ 0 - 1
dist/base/i18n/i18nMap.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"i18nMap.js","sourceRoot":"","sources":["../../../lib/base/i18n/i18nMap.ts"],"names":[],"mappings":""}

+ 0 - 3
dist/base/i18n/index.d.ts

@@ -1,3 +0,0 @@
-export * from './i18n';
-export { i18nMap } from './i18nMap';
-export { KeyParams } from './KeyParams';

+ 0 - 18
dist/base/i18n/index.js

@@ -1,18 +0,0 @@
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
-    if (k2 === undefined) k2 = k;
-    var desc = Object.getOwnPropertyDescriptor(m, k);
-    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
-      desc = { enumerable: true, get: function() { return m[k]; } };
-    }
-    Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
-    if (k2 === undefined) k2 = k;
-    o[k2] = m[k];
-}));
-var __exportStar = (this && this.__exportStar) || function(m, exports) {
-    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-__exportStar(require("./i18n"), exports);
-//# sourceMappingURL=index.js.map

+ 0 - 1
dist/base/i18n/index.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/base/i18n/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB"}

+ 0 - 10
dist/base/logger/Logger.d.ts

@@ -1,10 +0,0 @@
-import pino from 'pino';
-import { HttpLogger } from 'pino-http';
-declare class Logger {
-    private readonly logger;
-    private readonly httpLogger;
-    constructor();
-    getLogger(): pino.Logger;
-    getHttpLogger(): HttpLogger;
-}
-export { Logger };

+ 0 - 40
dist/base/logger/Logger.js

@@ -1,40 +0,0 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
-    return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.Logger = void 0;
-const pino_1 = __importDefault(require("pino"));
-const pino_http_1 = __importDefault(require("pino-http"));
-const MessageTypes_1 = require("./MessageTypes");
-const http_1 = require("../http");
-class Logger {
-    constructor() {
-        this.logger = (0, pino_1.default)({
-            transport: {
-                target: 'pino-pretty',
-                options: {
-                    translateTime: 'yyyy-mm-dd HH:MM:ss.l o',
-                }
-            }
-        });
-        this.httpLogger = (0, pino_http_1.default)({
-            logger: this.logger,
-            customLogLevel: (req, res, err) => {
-                if (res.statusCode >= http_1.StatusCodes.INTERNAL_SERVER_ERROR || err)
-                    return MessageTypes_1.MessageTypes.ERROR;
-                if (res.statusCode >= http_1.StatusCodes.BAD_REQUEST)
-                    return MessageTypes_1.MessageTypes.WARNING;
-                return MessageTypes_1.MessageTypes.INFO;
-            },
-        });
-    }
-    getLogger() {
-        return this.logger;
-    }
-    getHttpLogger() {
-        return this.httpLogger;
-    }
-}
-exports.Logger = Logger;
-//# sourceMappingURL=Logger.js.map

+ 0 - 1
dist/base/logger/Logger.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"Logger.js","sourceRoot":"","sources":["../../../lib/base/logger/Logger.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AACxB,0DAAkD;AAClD,iDAA8C;AAC9C,kCAAsC;AAEtC,MAAM,MAAM;IAIX;QACC,IAAI,CAAC,MAAM,GAAG,IAAA,cAAI,EAAC;YAClB,SAAS,EAAE;gBACV,MAAM,EAAE,aAAa;gBACrB,OAAO,EAAE;oBACR,aAAa,EAAE,yBAAyB;iBACxC;aACD;SACD,CAAC,CAAC;QACH,IAAI,CAAC,UAAU,GAAG,IAAA,mBAAW,EAAC;YAC7B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,cAAc,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;gBACjC,IAAI,GAAG,CAAC,UAAU,IAAI,kBAAW,CAAC,qBAAqB,IAAI,GAAG;oBAC7D,OAAO,2BAAY,CAAC,KAAK,CAAC;gBAC3B,IAAI,GAAG,CAAC,UAAU,IAAI,kBAAW,CAAC,WAAW;oBAC5C,OAAO,2BAAY,CAAC,OAAO,CAAC;gBAC7B,OAAO,2BAAY,CAAC,IAAI,CAAC;YAC1B,CAAC;SACD,CAAC,CAAC;IACJ,CAAC;IAEM,SAAS;QACf,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAEM,aAAa;QACnB,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;CACD;AAEQ,wBAAM"}

+ 0 - 6
dist/base/logger/Message.d.ts

@@ -1,6 +0,0 @@
-import { MessageTypes } from './MessageTypes';
-type Message = {
-    type: MessageTypes;
-    text: string;
-};
-export { Message };

+ 0 - 3
dist/base/logger/Message.js

@@ -1,3 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-//# sourceMappingURL=Message.js.map

+ 0 - 1
dist/base/logger/Message.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../lib/base/logger/Message.ts"],"names":[],"mappings":""}

+ 0 - 6
dist/base/logger/MessageTypes.d.ts

@@ -1,6 +0,0 @@
-declare enum MessageTypes {
-    INFO = "info",
-    WARNING = "warn",
-    ERROR = "error"
-}
-export { MessageTypes };

+ 0 - 10
dist/base/logger/MessageTypes.js

@@ -1,10 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.MessageTypes = void 0;
-var MessageTypes;
-(function (MessageTypes) {
-    MessageTypes["INFO"] = "info";
-    MessageTypes["WARNING"] = "warn";
-    MessageTypes["ERROR"] = "error";
-})(MessageTypes || (exports.MessageTypes = MessageTypes = {}));
-//# sourceMappingURL=MessageTypes.js.map

+ 0 - 1
dist/base/logger/MessageTypes.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"MessageTypes.js","sourceRoot":"","sources":["../../../lib/base/logger/MessageTypes.ts"],"names":[],"mappings":";;;AAAA,IAAK,YAIJ;AAJD,WAAK,YAAY;IAChB,6BAAa,CAAA;IACb,gCAAgB,CAAA;IAChB,+BAAe,CAAA;AAChB,CAAC,EAJI,YAAY,4BAAZ,YAAY,QAIhB"}

+ 0 - 3
dist/base/logger/index.d.ts

@@ -1,3 +0,0 @@
-export { Logger } from './Logger';
-export { Message } from './Message';
-export { MessageTypes } from './MessageTypes';

+ 0 - 8
dist/base/logger/index.js

@@ -1,8 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.MessageTypes = exports.Logger = void 0;
-var Logger_1 = require("./Logger");
-Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return Logger_1.Logger; } });
-var MessageTypes_1 = require("./MessageTypes");
-Object.defineProperty(exports, "MessageTypes", { enumerable: true, get: function () { return MessageTypes_1.MessageTypes; } });
-//# sourceMappingURL=index.js.map

+ 0 - 1
dist/base/logger/index.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/base/logger/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AAEf,+CAA8C;AAArC,4GAAA,YAAY,OAAA"}

+ 0 - 28
dist/base/swagger/SwaggerDoc.d.ts

@@ -1,28 +0,0 @@
-import { SwaggerParameter } from './SwaggerParameterType';
-import { SwaggerRequestBody } from './SwaggerRequestBodyType';
-import { SwaggerResponse } from './SwaggerResponseType';
-declare class SwaggerDoc {
-    private method;
-    private route?;
-    private summary?;
-    private description?;
-    private requestBody?;
-    private parameters;
-    private responses;
-    private security;
-    static get(route: string): SwaggerDoc;
-    static post(route: string): SwaggerDoc;
-    private constructor();
-    private setRoute;
-    setSummary(summary: string): SwaggerDoc;
-    setDescription(description: string): SwaggerDoc;
-    setRequestBody(requestBody: SwaggerRequestBody): SwaggerDoc;
-    addParameter(param: SwaggerParameter): SwaggerDoc;
-    addResponse(res: SwaggerResponse): SwaggerDoc;
-    addSecurityScheme(scheme: string): SwaggerDoc;
-    toAnnotation(): string;
-    private getMethod;
-    private deserializeSchema;
-    private repeatStr;
-}
-export { SwaggerDoc };

+ 0 - 140
dist/base/swagger/SwaggerDoc.js

@@ -1,140 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.SwaggerDoc = void 0;
-const http_1 = require("../http");
-class SwaggerDoc {
-    static get(route) {
-        return new SwaggerDoc(http_1.HttpMethod.GET).setRoute(route);
-    }
-    static post(route) {
-        return new SwaggerDoc(http_1.HttpMethod.POST).setRoute(route);
-    }
-    constructor(method) {
-        this.parameters = [];
-        this.responses = [];
-        this.security = [];
-        this.method = method;
-    }
-    setRoute(route) {
-        this.route = route;
-        return this;
-    }
-    setSummary(summary) {
-        this.summary = summary;
-        return this;
-    }
-    setDescription(description) {
-        this.description = description;
-        return this;
-    }
-    setRequestBody(requestBody) {
-        this.requestBody = requestBody;
-        return this;
-    }
-    addParameter(param) {
-        this.parameters.push(param);
-        return this;
-    }
-    addResponse(res) {
-        this.responses.push(res);
-        return this;
-    }
-    addSecurityScheme(scheme) {
-        this.security.push(scheme);
-        return this;
-    }
-    toAnnotation() {
-        let annotation = '/**\n';
-        annotation += ' *\t@swagger\n';
-        annotation += ` *\t${this.route}:\n`;
-        annotation += ` *\t\t${this.getMethod()}:\n`;
-        if (this.summary)
-            annotation += ` *\t\t\tsummary: ${this.summary}\n`;
-        if (this.description)
-            annotation += ` *\t\t\tdescription: ${this.description}\n`;
-        if (this.security.length > 0) {
-            annotation += ' *\t\t\tsecurity:\n';
-            for (const scheme of this.security) {
-                annotation += ` *\t\t\t\t- ${scheme}: []\n`;
-            }
-        }
-        if (this.parameters.length > 0) {
-            annotation += ' *\t\t\tparameters:\n';
-            for (const param of this.parameters) {
-                annotation += ` *\t\t\t- in: ${param.in}\n`;
-                annotation += ` *\t\t\t  name: ${param.name}\n`;
-                annotation += ` *\t\t\t  required: ${param.required}\n`;
-                annotation += ` *\t\t\t  description: ${param.description}\n`;
-                if (param.schema) {
-                    annotation += ' *\t\t\t  schema:\n';
-                    annotation += this.deserializeSchema(param.schema, 4);
-                }
-            }
-        }
-        if (this.requestBody) {
-            annotation += ' *\t\t\trequestBody:\n';
-            annotation += ` *\t\t\t\trequired: ${this.requestBody.required}\n`;
-            annotation += ` *\t\t\t\tdescription: ${this.requestBody.description}\n`;
-            annotation += ' *\t\t\t\tcontent:\n';
-            annotation += ` *\t\t\t\t\t${this.requestBody.content.mediaType}:\n`;
-            annotation += ' *\t\t\t\t\t\tschema:\n';
-            annotation += this.deserializeSchema(this.requestBody.content.schema, 6);
-        }
-        if (this.responses.length > 0) {
-            annotation += ' *\t\t\tresponses:\n';
-            for (const res of this.responses) {
-                annotation += ` *\t\t\t\t${res.code}:\n`;
-                annotation += ` *\t\t\t\t\tdescription: ${res.description}\n`;
-                if (res.content) {
-                    annotation += ' *\t\t\t\t\tcontent:\n';
-                    annotation += ` *\t\t\t\t\t\t${res.content.mediaType}:\n`;
-                    annotation += ' *\t\t\t\t\t\t\tschema:\n';
-                    annotation += this.deserializeSchema(res.content.schema, 7);
-                }
-            }
-        }
-        annotation += ' */\n';
-        return annotation.replace(/\t/g, '  ');
-    }
-    getMethod() {
-        switch (this.method) {
-            case http_1.HttpMethod.GET:
-                return 'get';
-            case http_1.HttpMethod.POST:
-                return 'post';
-            default:
-                return 'undefined';
-        }
-    }
-    deserializeSchema(schema, level) {
-        let res = '';
-        const indent = ' *' + this.repeatStr('\t', level + 1);
-        res += indent + `type: ${schema.type}\n`;
-        if (schema.description)
-            res += indent + `description: ${schema.description}\n`;
-        if (schema.example)
-            res += indent + `example: ${schema.example}\n`;
-        if (schema.items && schema.items.length > 0) {
-            res += indent + 'items:\n';
-            for (const item of schema.items) {
-                res += this.deserializeSchema(item, level + 2);
-            }
-        }
-        if (schema.properties && Object.keys(schema.properties).length > 0) {
-            res += indent + 'properties:\n';
-            for (const key of Object.keys(schema.properties)) {
-                res += indent + '\t' + `${key}:\n`;
-                res += this.deserializeSchema(schema.properties[key], level + 3);
-            }
-        }
-        return res;
-    }
-    repeatStr(str, n) {
-        let res = '';
-        for (let i = 0; i < n; i++)
-            res += str;
-        return res;
-    }
-}
-exports.SwaggerDoc = SwaggerDoc;
-//# sourceMappingURL=SwaggerDoc.js.map

File diff suppressed because it is too large
+ 0 - 0
dist/base/swagger/SwaggerDoc.js.map


+ 0 - 9
dist/base/swagger/SwaggerParameterInType.d.ts

@@ -1,9 +0,0 @@
-declare enum SwaggerParameterIn {
-    PATH = "path",
-    QUERY = "query",
-    HEADER = "header",
-    COOKIE = "cookie",
-    BODY = "body",
-    REQUEST_BODY = "requestBody"
-}
-export { SwaggerParameterIn };

+ 0 - 14
dist/base/swagger/SwaggerParameterInType.js

@@ -1,14 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.SwaggerParameterIn = void 0;
-var SwaggerParameterIn;
-(function (SwaggerParameterIn) {
-    SwaggerParameterIn["PATH"] = "path";
-    SwaggerParameterIn["QUERY"] = "query";
-    SwaggerParameterIn["HEADER"] = "header";
-    SwaggerParameterIn["COOKIE"] = "cookie";
-    SwaggerParameterIn["BODY"] = "body";
-    SwaggerParameterIn["REQUEST_BODY"] = "requestBody"; // since OpenAPI 3.0.0
-})(SwaggerParameterIn || (exports.SwaggerParameterIn = SwaggerParameterIn = {}));
-;
-//# sourceMappingURL=SwaggerParameterInType.js.map

+ 0 - 1
dist/base/swagger/SwaggerParameterInType.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"SwaggerParameterInType.js","sourceRoot":"","sources":["../../../lib/base/swagger/SwaggerParameterInType.ts"],"names":[],"mappings":";;;AAAA,IAAK,kBAOJ;AAPD,WAAK,kBAAkB;IACnB,mCAAa,CAAA;IACb,qCAAe,CAAA;IACf,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;IACjB,mCAAa,CAAA;IACb,kDAA4B,CAAA,CAAC,sBAAsB;AACvD,CAAC,EAPI,kBAAkB,kCAAlB,kBAAkB,QAOtB;AAAA,CAAC"}

+ 0 - 10
dist/base/swagger/SwaggerParameterType.d.ts

@@ -1,10 +0,0 @@
-import { SwaggerParameterIn } from './SwaggerParameterInType';
-import { SwaggerSchema } from './SwaggerSchemaType';
-type SwaggerParameter = {
-    in: SwaggerParameterIn;
-    name: string;
-    required: boolean;
-    description: string;
-    schema?: SwaggerSchema;
-};
-export { SwaggerParameter };

+ 0 - 3
dist/base/swagger/SwaggerParameterType.js

@@ -1,3 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-//# sourceMappingURL=SwaggerParameterType.js.map

+ 0 - 1
dist/base/swagger/SwaggerParameterType.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"SwaggerParameterType.js","sourceRoot":"","sources":["../../../lib/base/swagger/SwaggerParameterType.ts"],"names":[],"mappings":""}

+ 0 - 6
dist/base/swagger/SwaggerRequestBodyContentType.d.ts

@@ -1,6 +0,0 @@
-import { SwaggerSchema } from './SwaggerSchemaType';
-type SwaggerRequestBodyContent = {
-    mediaType: string;
-    schema: SwaggerSchema;
-};
-export { SwaggerRequestBodyContent };

+ 0 - 3
dist/base/swagger/SwaggerRequestBodyContentType.js

@@ -1,3 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-//# sourceMappingURL=SwaggerRequestBodyContentType.js.map

+ 0 - 1
dist/base/swagger/SwaggerRequestBodyContentType.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"SwaggerRequestBodyContentType.js","sourceRoot":"","sources":["../../../lib/base/swagger/SwaggerRequestBodyContentType.ts"],"names":[],"mappings":""}

+ 0 - 7
dist/base/swagger/SwaggerRequestBodyType.d.ts

@@ -1,7 +0,0 @@
-import { SwaggerRequestBodyContent } from './SwaggerRequestBodyContentType';
-type SwaggerRequestBody = {
-    required: boolean;
-    description: string;
-    content: SwaggerRequestBodyContent;
-};
-export { SwaggerRequestBody };

+ 0 - 3
dist/base/swagger/SwaggerRequestBodyType.js

@@ -1,3 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-//# sourceMappingURL=SwaggerRequestBodyType.js.map

+ 0 - 1
dist/base/swagger/SwaggerRequestBodyType.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"SwaggerRequestBodyType.js","sourceRoot":"","sources":["../../../lib/base/swagger/SwaggerRequestBodyType.ts"],"names":[],"mappings":""}

+ 0 - 6
dist/base/swagger/SwaggerResponseContentType.d.ts

@@ -1,6 +0,0 @@
-import { SwaggerSchema } from './SwaggerSchemaType';
-type SwaggerResponseContent = {
-    mediaType: string;
-    schema: SwaggerSchema;
-};
-export { SwaggerResponseContent };

+ 0 - 3
dist/base/swagger/SwaggerResponseContentType.js

@@ -1,3 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-//# sourceMappingURL=SwaggerResponseContentType.js.map

+ 0 - 1
dist/base/swagger/SwaggerResponseContentType.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"SwaggerResponseContentType.js","sourceRoot":"","sources":["../../../lib/base/swagger/SwaggerResponseContentType.ts"],"names":[],"mappings":""}

+ 0 - 7
dist/base/swagger/SwaggerResponseType.d.ts

@@ -1,7 +0,0 @@
-import { SwaggerResponseContent } from './SwaggerResponseContentType';
-type SwaggerResponse = {
-    code: number;
-    description: string;
-    content?: SwaggerResponseContent;
-};
-export { SwaggerResponse };

+ 0 - 3
dist/base/swagger/SwaggerResponseType.js

@@ -1,3 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-//# sourceMappingURL=SwaggerResponseType.js.map

+ 0 - 1
dist/base/swagger/SwaggerResponseType.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"SwaggerResponseType.js","sourceRoot":"","sources":["../../../lib/base/swagger/SwaggerResponseType.ts"],"names":[],"mappings":""}

+ 0 - 10
dist/base/swagger/SwaggerSchemaType.d.ts

@@ -1,10 +0,0 @@
-type SwaggerSchema = {
-    type: string;
-    description?: string;
-    example?: string;
-    items?: SwaggerSchema[];
-    properties?: {
-        [name: string]: SwaggerSchema;
-    };
-};
-export { SwaggerSchema };

+ 0 - 3
dist/base/swagger/SwaggerSchemaType.js

@@ -1,3 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-//# sourceMappingURL=SwaggerSchemaType.js.map

+ 0 - 1
dist/base/swagger/SwaggerSchemaType.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"SwaggerSchemaType.js","sourceRoot":"","sources":["../../../lib/base/swagger/SwaggerSchemaType.ts"],"names":[],"mappings":""}

+ 0 - 8
dist/base/swagger/index.d.ts

@@ -1,8 +0,0 @@
-export { SwaggerDoc } from './SwaggerDoc';
-export { SwaggerParameter } from './SwaggerParameterType';
-export { SwaggerParameterIn } from './SwaggerParameterInType';
-export { SwaggerSchema } from './SwaggerSchemaType';
-export { SwaggerResponse } from './SwaggerResponseType';
-export { SwaggerResponseContent } from './SwaggerResponseContentType';
-export { SwaggerRequestBody } from './SwaggerRequestBodyType';
-export { SwaggerRequestBodyContent } from './SwaggerRequestBodyContentType';

+ 0 - 8
dist/base/swagger/index.js

@@ -1,8 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.SwaggerParameterIn = exports.SwaggerDoc = void 0;
-var SwaggerDoc_1 = require("./SwaggerDoc");
-Object.defineProperty(exports, "SwaggerDoc", { enumerable: true, get: function () { return SwaggerDoc_1.SwaggerDoc; } });
-var SwaggerParameterInType_1 = require("./SwaggerParameterInType");
-Object.defineProperty(exports, "SwaggerParameterIn", { enumerable: true, get: function () { return SwaggerParameterInType_1.SwaggerParameterIn; } });
-//# sourceMappingURL=index.js.map

+ 0 - 1
dist/base/swagger/index.js.map

@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/base/swagger/index.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AAEnB,mEAA8D;AAArD,4HAAA,kBAAkB,OAAA"}

+ 0 - 4
dist/base/util/Guid.d.ts

@@ -1,4 +0,0 @@
-declare class Guid {
-    static new(): string;
-}
-export { Guid };

+ 0 - 44
dist/base/util/Guid.js

@@ -1,44 +0,0 @@
-"use strict";
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
-    if (k2 === undefined) k2 = k;
-    var desc = Object.getOwnPropertyDescriptor(m, k);
-    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
-      desc = { enumerable: true, get: function() { return m[k]; } };
-    }
-    Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
-    if (k2 === undefined) k2 = k;
-    o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
-    Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
-    o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
-    var ownKeys = function(o) {
-        ownKeys = Object.getOwnPropertyNames || function (o) {
-            var ar = [];
-            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
-            return ar;
-        };
-        return ownKeys(o);
-    };
-    return function (mod) {
-        if (mod && mod.__esModule) return mod;
-        var result = {};
-        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
-        __setModuleDefault(result, mod);
-        return result;
-    };
-})();
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.Guid = void 0;
-const crypto = __importStar(require("crypto"));
-class Guid {
-    static new() {
-        return crypto.randomUUID();
-    }
-}
-exports.Guid = Guid;
-//# sourceMappingURL=Guid.js.map

Some files were not shown because too many files changed in this diff