From 17873786e86091275f456f324cc6ffc62c45390e Mon Sep 17 00:00:00 2001 From: Ujjwal Gupta Date: Wed, 30 Oct 2019 09:45:26 +0530 Subject: [PATCH] added test for assign decorator for multiple strings value --- dist/fort.js | 10 ++++++-- dist/fort.js.map | 2 +- src/handlers/injector_handler.ts | 12 +++++++-- tests/general/controllers/home_controller.ts | 1 - .../controllers/injection_controller.ts | 10 ++++++++ tests/general/routes.ts | 4 +++ tests/general/test/home.js | 25 +++++++++++++++++++ tests/general/test/index.js | 2 +- tests/general/test/injection.js | 17 +++++++++++++ tests/general/test/wall.js | 2 +- 10 files changed, 77 insertions(+), 8 deletions(-) create mode 100644 tests/general/controllers/injection_controller.ts create mode 100644 tests/general/test/injection.js diff --git a/dist/fort.js b/dist/fort.js index 1fc4df74..e876cd20 100644 --- a/dist/fort.js +++ b/dist/fort.js @@ -1982,8 +1982,14 @@ var InjectorHandler = /** @class */ (function () { InjectorHandler.addWorkerValue = function (className, methodName, paramIndex, paramValue, shouldFindIndex) { var _a; if (shouldFindIndex === void 0) { shouldFindIndex = true; } - if (shouldFindIndex === true && injectorValues.indexOf(paramValue) < 0) { - paramValue = injectorValues.push(paramValue) - 1; + if (shouldFindIndex === true) { + var paramValueIndex = injectorValues.indexOf(paramValue); + if (paramValueIndex < 0) { + paramValue = injectorValues.push(paramValue) - 1; + } + else { + paramValue = paramValueIndex; + } } var savedValue = injectorStoreInfos.find(function (x) { return x.className === className; }); var value = { diff --git a/dist/fort.js.map b/dist/fort.js.map index 2d1a64a7..06558def 100644 --- a/dist/fort.js.map +++ b/dist/fort.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://FortJs/webpack/bootstrap","webpack://FortJs/./src/abstracts/controller.ts","webpack://FortJs/./src/abstracts/guard.ts","webpack://FortJs/./src/abstracts/index.ts","webpack://FortJs/./src/abstracts/session_provider.ts","webpack://FortJs/./src/abstracts/shield.ts","webpack://FortJs/./src/abstracts/view_engine.ts","webpack://FortJs/./src/abstracts/wall.ts","webpack://FortJs/./src/abstracts/xml_parser.ts","webpack://FortJs/./src/constant.ts","webpack://FortJs/./src/decorators/assign.ts","webpack://FortJs/./src/decorators/default_worker.ts","webpack://FortJs/./src/decorators/guards.ts","webpack://FortJs/./src/decorators/index.ts","webpack://FortJs/./src/decorators/route.ts","webpack://FortJs/./src/decorators/shields.ts","webpack://FortJs/./src/decorators/singleton.ts","webpack://FortJs/./src/decorators/worker.ts","webpack://FortJs/./src/enums/data_type.ts","webpack://FortJs/./src/enums/error_type.ts","webpack://FortJs/./src/enums/etag_type.ts","webpack://FortJs/./src/enums/http_method.ts","webpack://FortJs/./src/enums/http_status_code.ts","webpack://FortJs/./src/enums/index.ts","webpack://FortJs/./src/enums/mime_type.ts","webpack://FortJs/./src/extra/index.ts","webpack://FortJs/./src/extra/memory_session_provider.ts","webpack://FortJs/./src/extra/mustache_view_engine.ts","webpack://FortJs/./src/generics/generic_controller.ts","webpack://FortJs/./src/generics/generic_guard.ts","webpack://FortJs/./src/generics/generic_session_provider.ts","webpack://FortJs/./src/generics/generic_shield.ts","webpack://FortJs/./src/generics/generic_wall.ts","webpack://FortJs/./src/generics/generic_xml_parser.ts","webpack://FortJs/./src/generics/index.ts","webpack://FortJs/./src/global.ts","webpack://FortJs/./src/handlers/controller_result_handler.ts","webpack://FortJs/./src/handlers/file_handler.ts","webpack://FortJs/./src/handlers/index.ts","webpack://FortJs/./src/handlers/injector_handler.ts","webpack://FortJs/./src/handlers/post_handler.ts","webpack://FortJs/./src/handlers/request_handler.ts","webpack://FortJs/./src/handlers/request_handler_helper.ts","webpack://FortJs/./src/handlers/route_handler.ts","webpack://FortJs/./src/helpers/download_result.ts","webpack://FortJs/./src/helpers/file_result.ts","webpack://FortJs/./src/helpers/get_data_type.ts","webpack://FortJs/./src/helpers/get_mime_type_from_extension.ts","webpack://FortJs/./src/helpers/get_view_from_file.ts","webpack://FortJs/./src/helpers/html_result.ts","webpack://FortJs/./src/helpers/index.ts","webpack://FortJs/./src/helpers/is_env_dev.ts","webpack://FortJs/./src/helpers/is_env_production.ts","webpack://FortJs/./src/helpers/json_helper.ts","webpack://FortJs/./src/helpers/json_result.ts","webpack://FortJs/./src/helpers/log_helper.ts","webpack://FortJs/./src/helpers/parse_cookie.ts","webpack://FortJs/./src/helpers/parse_match_route.ts","webpack://FortJs/./src/helpers/promise.ts","webpack://FortJs/./src/helpers/redirect_result.ts","webpack://FortJs/./src/helpers/remove_first_slash.ts","webpack://FortJs/./src/helpers/remove_last_slash.ts","webpack://FortJs/./src/helpers/render_view.ts","webpack://FortJs/./src/helpers/reverse_loop.ts","webpack://FortJs/./src/helpers/text_result.ts","webpack://FortJs/./src/helpers/view_result.ts","webpack://FortJs/./src/helpers/xml_helper.ts","webpack://FortJs/./src/index.ts","webpack://FortJs/./src/models/cookie_manager.ts","webpack://FortJs/./src/models/error_handler.ts","webpack://FortJs/./src/models/file_manager.ts","webpack://FortJs/./src/models/fort.ts","webpack://FortJs/./src/models/http_cookie.ts","webpack://FortJs/./src/models/http_file.ts","webpack://FortJs/./src/models/index.ts","webpack://FortJs/./src/models/router.ts","webpack://FortJs/./src/test_helpers/http_request_stub.ts","webpack://FortJs/./src/test_helpers/http_response_stub.ts","webpack://FortJs/./src/test_helpers/index.ts","webpack://FortJs/./src/test_helpers/init_controller.ts","webpack://FortJs/./src/test_helpers/init_guard.ts","webpack://FortJs/./src/test_helpers/init_shield.ts","webpack://FortJs/./src/test_helpers/init_wall.ts","webpack://FortJs/./src/utils/index.ts","webpack://FortJs/./src/utils/is_array.ts","webpack://FortJs/./src/utils/is_null.ts","webpack://FortJs/./src/utils/is_null_or_empty.ts","webpack://FortJs/external \"content-type\"","webpack://FortJs/external \"etag\"","webpack://FortJs/external \"fresh\"","webpack://FortJs/external \"fs\"","webpack://FortJs/external \"fs-extra\"","webpack://FortJs/external \"http\"","webpack://FortJs/external \"jsontoxml\"","webpack://FortJs/external \"multiparty\"","webpack://FortJs/external \"mustache\"","webpack://FortJs/external \"negotiator\"","webpack://FortJs/external \"path\"","webpack://FortJs/external \"querystring\"","webpack://FortJs/external \"uniqid\"","webpack://FortJs/external \"url\""],"names":[],"mappings":";;;;;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;AC/EA;AAAA;AAAA;AAAiD;AAGjD;IAYI;QAAY,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;IAEnB,CAAC;IAED,+BAAU,GAAV,UAAW,IAAyB;QAChC,oEAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/B,CAAC;IACL,iBAAC;AAAD,CAAC;;;;;;;;;;;;;;ACrBD;AAAA;AAAA;AAA2D;AAG3D;IAYI;QAAY,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;IAEnB,CAAC;IAED,0BAAU,GAAV,UAAW,IAAoB;QAC3B,OAAO,+DAAS,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;IACL,YAAC;AAAD,CAAC;;;;;;;;;;;;;;AC1BD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.ts\");\n","import { HttpRequest, HttpResponse, ControllerTestData } from \"../types\";\nimport { CookieManager, FileManager } from \"../models\";\nimport { SessionProvider } from \".\";\nimport { initController } from \"../test_helpers\";\n\n\nexport abstract class Controller {\n request: HttpRequest;\n response: HttpResponse;\n query: { [key: string]: string };\n body?: { [key: string]: any };\n session: SessionProvider;\n cookie: CookieManager;\n param?: { [key: string]: string };\n data: { [key: string]: any };\n\n file?: FileManager;\n\n constructor(...args) {\n\n }\n\n initialize(data?: ControllerTestData) {\n initController(this, data);\n }\n}","import { HttpRequest, HttpResponse, HttpResult } from \"../types\";\nimport { CookieManager, FileManager } from \"../models\";\nimport { Controller } from \"./controller\";\nimport { SessionProvider } from \"./session_provider\";\nimport { GuardTestData, initGuard } from \"../test_helpers\";\n\n\nexport abstract class Guard implements Controller {\n request: HttpRequest;\n response: HttpResponse;\n query: { [key: string]: string };\n body: { [key: string]: any };\n session: SessionProvider;\n cookie: CookieManager;\n param?: { [key: string]: string };\n data: { [key: string]: any };\n file: FileManager;\n abstract check(...args): Promise;\n\n constructor(...args) {\n\n }\n\n initialize(data?: GuardTestData) {\n return initGuard(this, data);\n }\n}","export * from './controller';\nexport * from './shield';\nexport * from './session_provider';\nexport * from './guard';\nexport * from './view_engine';\nexport * from './wall';\nexport * from \"./xml_parser\";","import { CookieManager } from \"../models\";\nimport * as getUniqId from \"uniqid\";\nimport { Global } from \"../global\";\nimport { SessionValue } from \"../types\";\n\nexport abstract class SessionProvider {\n\n sessionId: string;\n protected cookie: CookieManager;\n\n abstract get(key: string): Promise;\n abstract isExist(key: string): Promise;\n abstract getAll(): Promise;\n abstract set(key: string, val: any): Promise;\n abstract setMany(values: SessionValue[]): Promise;\n abstract remove(key: string): Promise;\n\n abstract clear(): Promise;\n\n protected createSession() {\n const now = new Date();\n this.sessionId = getUniqId();\n this.cookie.addCookie({\n name: Global.appSessionIdentifier,\n value: this.sessionId,\n httpOnly: true,\n path: \"/\",\n expires: new Date(now.setMinutes(now.getMinutes() + Global.sessionTimeOut)),\n maxAge: Global.sessionTimeOut * 60\n });\n }\n\n protected destroySession() {\n const cookie = this.cookie.getCookie(Global.appSessionIdentifier);\n cookie.httpOnly = true;\n cookie.path = \"/\";\n this.cookie.removeCookie(cookie);\n }\n}\n\n","import { HttpRequest, HttpResponse, HttpResult } from \"../types\";\nimport { CookieManager } from \"../models\";\nimport { SessionProvider, Controller } from \".\";\nimport { ShieldTestData, initShield } from \"../test_helpers\";\n\n\nexport abstract class Shield implements Controller {\n workerName: string;\n request: HttpRequest;\n response: HttpResponse;\n query: { [key: string]: string };\n\n session: SessionProvider;\n cookie: CookieManager;\n\n data: { [key: string]: any };\n\n abstract protect(...args): Promise;\n\n constructor(...args) {\n\n }\n\n initialize(data?: ShieldTestData) {\n return initShield(this, data);\n }\n}\n\n","import { ViewEngineData } from \"../types\";\n\nexport abstract class ViewEngine {\n abstract render(value: ViewEngineData): Promise;\n}","import { HttpRequest, HttpResponse, HttpResult } from \"../types\";\nimport { CookieManager } from \"../models\";\nimport { Controller } from \"./controller\";\nimport { SessionProvider } from \"./session_provider\";\nimport { WallTestData, initWall } from \"../test_helpers\";\n\n\nexport abstract class Wall implements Controller {\n request: HttpRequest;\n response: HttpResponse;\n query: { [key: string]: string };\n session: SessionProvider;\n cookie: CookieManager;\n\n data: { [key: string]: any };\n\n abstract onIncoming(...args): Promise;\n async onOutgoing(...args) {\n return null;\n }\n\n constructor(...args) {\n\n }\n\n initialize(data?: WallTestData) {\n return initWall(this, data);\n }\n}","export abstract class XmlParser {\n abstract async parse(xml: string): Promise;\n}","import { Global } from \"./global\";\n/* tslint:disable */\nexport const __ContentType = \"Content-Type\";\nexport const __AppName = \"fort\";\nexport const __Cookie = \"Cookie\";\nexport const __SetCookie = 'Set-Cookie';\nexport const __CurrentPath = process.cwd();\nexport const __ContentLength = \"Content-Length\";\nexport const __Constructor = \"const_constructor\";","import { InjectorHandler } from \"../handlers\";\nimport { __Constructor } from \"../constant\";\n\n// tslint:disable-next-line\nexport const Assign = (value): ParameterDecorator => {\n return (target: any, methodName: string, paramIndex: number) => {\n const className: string = target.name || target.constructor.name;\n if (methodName == null) {\n methodName = __Constructor;\n }\n InjectorHandler.addWorkerValue(className, methodName, paramIndex, value);\n };\n};","import { RouteHandler } from \"../handlers\";\nimport { HTTP_METHOD } from \"../enums\";\nimport { WorkerInfo } from \"../types\";\n\n// tslint:disable-next-line\nexport const DefaultWorker = (allowedMethods?: HTTP_METHOD[]): MethodDecorator => {\n return (target: any, methodName: string, descriptor: PropertyDescriptor) => {\n const className = (target.constructor.name as string);\n const actionInfo: WorkerInfo = {\n workerName: methodName,\n methodsAllowed: allowedMethods == null ? [HTTP_METHOD.Get] : allowedMethods,\n guards: [],\n pattern: \"/\",\n values: []\n };\n RouteHandler.addWorker(actionInfo, className);\n };\n};\n","import { RouteHandler } from \"../handlers\";\nimport { GenericGuard } from \"../generics\";\nimport { Guard } from \"../abstracts/guard\";\n\n// tslint:disable-next-line\nexport const Guards = (value: Array): MethodDecorator => {\n return ((target: any, methodName: string, descriptor: PropertyDescriptor) => {\n const className = (target.constructor.name as string);\n RouteHandler.addGuards(value as Array, className, methodName);\n });\n};","export * from './worker';\nexport * from './shields';\nexport * from './guards';\nexport * from './route';\nexport * from './default_worker';\nexport * from './assign';\nexport * from './singleton';","import { RouteHandler } from \"../handlers\";\nimport { removeLastSlash } from \"../helpers\";\n\n// tslint:disable-next-line\nexport const Route = (format: string): MethodDecorator => {\n return ((target: any, methodName: string, descriptor: PropertyDescriptor) => {\n const className = (target.constructor.name as string);\n // remove / from route\n if (format != null && format !== '/') {\n format = removeLastSlash(format);\n }\n RouteHandler.addPattern(format, className, methodName);\n });\n};","import { Shield } from \"../abstracts\";\nimport { RouteHandler } from \"../handlers\";\nimport { GenericShield } from \"../generics\";\n \n// tslint:disable-next-line\nexport const Shields = (shieldsValue: Array): ClassDecorator => {\n return (target: any) => {\n const className = target.name;\n RouteHandler.addShields(shieldsValue as Array, className);\n };\n};","import { InjectorHandler } from \"../handlers\";\nimport { __Constructor } from \"../constant\";\n\n// tslint:disable-next-line\nexport const Singleton = (value): ParameterDecorator => {\n return (target: any, methodName: string, paramIndex: number) => {\n const className: string = target.name || target.constructor.name;\n if (methodName == null || methodName === 'constructor') {\n methodName = __Constructor;\n }\n InjectorHandler.addSingleton(className, methodName, paramIndex, value);\n };\n};","import { HTTP_METHOD } from \"../enums\";\nimport { RouteHandler } from \"../handlers\";\nimport { WorkerInfo } from \"../types\";\n\n// tslint:disable-next-line\nexport const Worker = (allowedMethods?: HTTP_METHOD[]): MethodDecorator => {\n return (target: any, methodName: string, descriptor: PropertyDescriptor) => {\n const className = (target.constructor.name as string);\n const actionInfo: WorkerInfo = {\n workerName: methodName,\n methodsAllowed: allowedMethods == null ? [\n HTTP_METHOD.Delete, HTTP_METHOD.Get, HTTP_METHOD.Post, HTTP_METHOD.Patch, HTTP_METHOD.Put\n ] : allowedMethods,\n guards: [],\n pattern: `/${methodName.toLowerCase()}`,\n values: []\n };\n RouteHandler.addWorker(actionInfo, className);\n };\n};\n","export enum DATA_TYPE {\n String = \"string\",\n Number = \"number\",\n Array = \"array\",\n Object = \"object\",\n Function = \"function\"\n}","export enum ERROR_TYPE {\n InvalidControllerName = \"invalid_controller_name\",\n InvalidContentType = \"invalid_content_type\",\n PortInUse = \"port_in_use\",\n UndefinedViewEngine = \"undefined_view_engine\"\n}","export enum ETag_Type {\n Strong = \"strong\",\n Weak = \"weak\"\n}","export enum HTTP_METHOD {\n Get = \"GET\",\n Post = \"POST\",\n Put = \"PUT\",\n Patch = \"PATCH\",\n Delete = \"DELETE\",\n Options = \"OPTIONS\",\n Head = \"HEAD\"\n}","export enum HTTP_STATUS_CODE {\n BadRequest = 400,\n Unauthorized = 401,\n Forbidden = 403,\n NotFound = 404,\n Ok = 200,\n Created = 201,\n NoContent = 204,\n Redirect = 302,\n NotModified = 304,\n MethodNotAllowed = 405,\n NotAcceptable = 406,\n InternalServerError = 500,\n}","export * from './mime_type';\nexport * from './http_method';\nexport * from './http_status_code';\nexport * from \"./etag_type\";\nexport * from \"./error_type\";","export enum MIME_TYPE {\n Text = \"text/plain\",\n Json = \"application/json\",\n Html = \"text/html\",\n FormUrlEncoded = \"application/x-www-form-urlencoded\",\n Css = \"text/css\",\n Csv = \"text/csv\",\n Js = \"application/javascript\",\n Bmp = \"image/bmp\",\n Jpeg = \"image/jpeg\",\n Gif = \"image/gif\",\n Ico = \"image/x-icon\",\n Png = \"image/png\",\n Pdf = \"application/pdf\",\n Svg = \"image/svg+xml\",\n Rtf = \"application/rtf\",\n Xml = \"application/xml\",\n Xls = \"application/vnd.ms-excel\",\n Xlsx = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n Ttf = \"font/ttf\",\n Woff = \"font/woff\",\n Woff2 = \"font/woff2\",\n Eot = \"application/vnd.ms-fontobject\",\n Otf = \"font/otf\",\n Swf = \"application/x-shockwave-flash\",\n Avi = \"video/avi\",\n FormMultiPart = \"multipart/form-data\"\n\n}","export * from './mustache_view_engine';\nexport * from \"./memory_session_provider\";","\nimport { SessionProvider } from \"../abstracts/session_provider\";\nimport { SessionValue } from \"../types/session_value\";\n\n\ninterface ISessionValueFormat {\n identifier: string;\n datas: SessionValue[];\n}\n\nconst sessionValues: ISessionValueFormat[] = [];\n\nexport class MemorySessionProvider extends SessionProvider {\n\n async get(key: string) {\n const savedSession = sessionValues.find(q => q.identifier === this.sessionId);\n if (savedSession != null) {\n const session = savedSession.datas.find(qry => qry.key === key);\n return session.value;\n }\n return null;\n }\n\n async isExist(key: string) {\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\n if (savedValue == null) {\n return false;\n }\n else {\n const index = savedValue.datas.findIndex(qry => qry.key === key);\n return index >= 0;\n }\n }\n\n async getAll() {\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\n return savedValue == null ? [] : savedValue.datas;\n }\n\n async set(key: string, val: any) {\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\n if (savedValue == null) {\n this.createSession();\n sessionValues.push({\n identifier: this.sessionId,\n datas: [{\n key: key,\n value: val\n }]\n });\n }\n else {\n const savedSessionData = savedValue.datas.find(q => q.key === key);\n if (savedSessionData == null) {\n savedValue.datas.push({\n key: key,\n value: val\n });\n }\n else {\n savedSessionData.value = val;\n }\n }\n }\n\n setMany(values: SessionValue[]) {\n return Promise.all(\n values.map(async (value) => {\n return await this.set(value.key, value.value);\n })\n );\n }\n\n async remove(key: string) {\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\n if (savedValue != null) {\n const index = savedValue.datas.findIndex(q => q.key === key);\n savedValue.datas.splice(index, 1);\n }\n }\n\n async clear() {\n // remove session values\n const index = sessionValues.findIndex(q => q.identifier === this.sessionId);\n if (index >= 0) {\n sessionValues.splice(index, 1);\n }\n // expire cookie in browser\n this.destroySession();\n }\n}","import * as Mustache from \"mustache\";\nimport { ViewEngineData } from \"../types\";\nimport { getViewFromFile } from \"../helpers\";\nimport { ViewEngine } from \"../abstracts\";\n\nexport class MustacheViewEngine implements ViewEngine {\n\n async render(value: ViewEngineData) {\n const viewData = await getViewFromFile(value.view);\n return Mustache.render(viewData, value.model);\n }\n}","import { Controller } from \"../abstracts\";\n\nexport class GenericController extends Controller {\n constructor(...args) {\n super();\n }\n}","import { Guard } from \"../abstracts\";\nimport { HttpResult } from \"../types\";\n\nexport class GenericGuard extends Guard {\n\n constructor(...args) {\n super();\n }\n\n check(...args): Promise {\n return null;\n }\n}","import { SessionProvider } from \"../abstracts\";\nimport { SessionValue } from \"../types\";\nimport { CookieManager } from \"../models\";\n\n\nexport class GenericSessionProvider extends SessionProvider {\n sessionId: string;\n\n cookie: CookieManager;\n get() {\n return null;\n }\n\n getAll() {\n return null;\n }\n\n set(key, value) {\n return null;\n }\n\n isExist(key) {\n return null;\n }\n\n remove(key) {\n return null;\n }\n\n setMany(values: SessionValue[]): Promise {\n return null;\n }\n\n async clear() {\n\n }\n}","import { Shield } from \"../abstracts\";\nimport { HttpResult } from \"../types\";\n\nexport class GenericShield extends Shield {\n constructor(...args) {\n super();\n }\n \n protect(...args): Promise {\n return null;\n }\n}","import { Wall } from \"../abstracts\";\nimport { HttpResult } from \"../types\";\n\nexport class GenericWall extends Wall {\n constructor(...args) {\n super();\n }\n onIncoming(...args): Promise {\n return null;\n }\n}","import { XmlParser } from \"../abstracts\";\nimport { IException } from \"../interfaces\";\n\nexport class GenericXmlParser implements XmlParser {\n async parse(xml: string): Promise {\n // tslint:disable-next-line\n throw {\n message: \"no xml parser configured\"\n } as IException;\n }\n}","export * from './generic_guard';\nexport * from './generic_shield';\nexport * from './generic_session_provider';\nexport * from \"./generic_wall\";\nexport * from \"./generic_controller\";\nexport * from './generic_xml_parser';","import * as http from \"http\";\nimport { ErrorHandler } from \"./models\";\nimport { ViewEngine, XmlParser } from \"./abstracts\";\nimport { EtagOption, FolderMap } from \"./types\";\nimport { GenericSessionProvider, GenericWall } from \"./generics\";\n\nexport class Global {\n static request: http.IncomingMessage;\n static response: http.ServerResponse;\n static port: number;\n static viewPath: string;\n static shouldParseCookie: boolean;\n static shouldParsePost: boolean;\n static sessionProvider: typeof GenericSessionProvider;\n static sessionTimeOut?: number;\n static viewEngine: ViewEngine;\n static walls: Array = [];\n static errorHandler: typeof ErrorHandler;\n static connectonKeepAliveTimeout?: number;\n\n static appName?: string;\n\n static eTag?: EtagOption;\n\n static folders?: FolderMap[];\n static appSessionIdentifier: string;\n static xmlParser: typeof XmlParser;\n}","\nimport { HttpResult, HttpFormatResult } from \"../types\";\nimport { __SetCookie, __ContentType } from \"../constant\";\nimport { MIME_TYPE, HTTP_STATUS_CODE } from \"../enums\";\nimport { FileHandler } from \"./file_handler\";\nimport * as path from 'path';\nimport { XmlHelper, textResult } from \"../helpers\";\n\nexport class ControllerResultHandler extends FileHandler {\n private controllerResult_: HttpResult;\n\n private getDataBasedOnMimeType_(mimeType: MIME_TYPE) {\n switch (mimeType) {\n case MIME_TYPE.Json:\n case MIME_TYPE.Text:\n case MIME_TYPE.Html:\n if (typeof this.controllerResult_.responseData === 'object') {\n return JSON.stringify(this.controllerResult_.responseData);\n }\n break;\n case MIME_TYPE.Xml:\n if (typeof this.controllerResult_.responseData === 'object') {\n return XmlHelper.fromJsToXml(this.controllerResult_.responseData);\n }\n break;\n }\n return this.controllerResult_.responseData;\n }\n\n private endResponse_(negotiateMimeType: MIME_TYPE) {\n let data;\n try {\n data = this.getDataBasedOnMimeType_(negotiateMimeType);\n }\n catch (ex) {\n this.onErrorOccured(ex);\n return;\n }\n\n this.response.writeHead(this.controllerResult_.statusCode || HTTP_STATUS_CODE.Ok,\n { [__ContentType]: negotiateMimeType });\n this.response.end(data);\n }\n\n private handleRedirectResult_() {\n this.response.setHeader('Location', this.controllerResult_.responseData);\n this.response.writeHead(this.controllerResult_.statusCode || HTTP_STATUS_CODE.Ok,\n { 'Location': this.controllerResult_.responseData });\n this.response.end();\n }\n\n private handleFormatResult_() {\n const negotiateMimeType = this.getContentTypeFromNegotiationHavingMultipleTypes(Object.keys((this.controllerResult_ as HttpFormatResult).responseFormat) as MIME_TYPE[]);\n const key = Object.keys((this.controllerResult_ as HttpFormatResult).responseFormat).find(qry => qry === negotiateMimeType);\n if (key != null) {\n this.controllerResult_.responseData = (this.controllerResult_ as HttpFormatResult).responseFormat[key]();\n this.endResponse_(negotiateMimeType);\n }\n else {\n this.onNotAcceptableRequest();\n }\n }\n\n private handleFileResult_() {\n const result = this.controllerResult_;\n const parsedPath = path.parse(result.file.filePath);\n if (result.file.shouldDownload === true) {\n const fileName = result.file.alias == null ? parsedPath.name : result.file.alias;\n this.response.setHeader(\n \"Content-Disposition\",\n `attachment;filename=${fileName}${parsedPath.ext}`\n );\n }\n this.handleFileRequestFromAbsolutePath(result.file.filePath, parsedPath.ext);\n }\n\n onTerminationFromWall(result: HttpResult | HttpFormatResult) {\n this.handleFinalResult_(result);\n }\n\n private handleFinalResult_(result: HttpResult | HttpFormatResult) {\n result = result || textResult(\"\");\n this.controllerResult_ = result as HttpResult;\n\n ((this.cookieManager as any).responseCookie_ as string[]).forEach(value => {\n this.response.setHeader(__SetCookie, value);\n });\n\n if ((result as HttpResult).shouldRedirect == null || (result as HttpResult).shouldRedirect === false) {\n if ((result as HttpFormatResult).responseFormat == null) {\n if ((result as HttpResult).file == null) {\n const contentType = (result as HttpResult).contentType || MIME_TYPE.Text;\n const negotiateMimeType = this.getContentTypeFromNegotiation(contentType) as MIME_TYPE;\n if (negotiateMimeType != null) {\n this.endResponse_(negotiateMimeType);\n }\n else {\n this.onNotAcceptableRequest();\n }\n }\n else {\n this.handleFileResult_();\n }\n }\n else {\n this.handleFormatResult_();\n }\n }\n else {\n this.handleRedirectResult_();\n }\n }\n\n async onResultFromController(result: HttpResult | HttpFormatResult) {\n try {\n await this.runWallOutgoing();\n } catch (ex) {\n this.onErrorOccured(ex);\n return;\n }\n this.handleFinalResult_(result);\n }\n}","import { HTTP_STATUS_CODE, MIME_TYPE, ETag_Type } from \"../enums\";\nimport { Global } from \"../global\";\nimport * as path from \"path\";\nimport { __ContentType } from \"../constant\";\nimport { RequestHandlerHelper } from \"./request_handler_helper\";\nimport * as Fs from \"fs\";\nimport { getMimeTypeFromExtension, promise } from \"../helpers\";\nimport * as etag from \"etag\";\nimport * as fresh from \"fresh\";\nimport { isNullOrEmpty } from \"../utils\";\n\ntype FileInfo = {\n folder: string,\n file: string;\n};\nexport class FileHandler extends RequestHandlerHelper {\n\n private getFileInfoFromUrl_(urlPath: string) {\n const splittedValue = urlPath.split(\"/\");\n const fileInfo = {\n file: \"\"\n } as FileInfo;\n if (splittedValue.length > 2 || !isNullOrEmpty(path.parse(urlPath).ext)) {\n fileInfo.folder = splittedValue[1];\n fileInfo.file = splittedValue.splice(2).join(\"/\");\n return fileInfo;\n }\n fileInfo.folder = splittedValue[1];\n return fileInfo;\n\n }\n\n private getFileStats_(filePath) {\n return promise((res, rej) => {\n Fs.lstat(filePath, (err, status) => {\n if (err) {\n if (err.code === 'ENOENT') {\n res(null);\n }\n else {\n rej(err);\n }\n }\n else {\n res(status);\n }\n });\n });\n }\n\n protected handleFileRequestFromAbsolutePath(absolutePath: string, fileType: string) {\n this.getFileStats_(absolutePath).then(fileInfo => {\n if (fileInfo != null) {\n if (fileInfo.isDirectory() === true) {\n this.handleFileRequestForPath_(absolutePath);\n }\n else {\n this.sendFile_(absolutePath, fileType, fileInfo);\n }\n }\n else {\n this.onNotFound();\n }\n }).catch(ex => {\n this.onErrorOccured(ex);\n });\n }\n\n private checkForFolderAllowAndReturnPath_(urlPath: string) {\n const fileInfo = this.getFileInfoFromUrl_(urlPath);\n const getAbsPath = function () {\n const folder = Global.folders.find(qry => qry.alias === fileInfo.folder);\n if (folder != null) {\n return path.join(folder.path, fileInfo.file);\n }\n return null;\n };\n let absPath = getAbsPath();\n if (absPath == null) {\n fileInfo.folder = \"/\";\n fileInfo.file = urlPath;\n absPath = getAbsPath();\n }\n return absPath;\n }\n\n protected handleFileRequest(urlPath: string) {\n const extension = path.parse(urlPath).ext;\n const absFilePath = this.checkForFolderAllowAndReturnPath_(urlPath);\n if (absFilePath != null) {\n this.handleFileRequestFromAbsolutePath(absFilePath, extension);\n }\n else {\n this.onNotFound();\n }\n }\n\n /**\n * process folders handling asuuming path is folder.\n * Please check whether the file is folder before calling this function\n *\n * @private\n * @param {string} filePath\n * @param {Fs.Stats} fileInfo\n * @returns\n * @memberof FileHandler\n */\n private handleFileRequestForPath_(absolutePath: string) {\n\n absolutePath = path.join(absolutePath, \"index.html\");\n this.getFileStats_(absolutePath).then(fileInfo => {\n if (fileInfo != null) {\n const fileType = MIME_TYPE.Html;\n this.sendFile_(absolutePath, fileType, fileInfo);\n }\n else {\n this.onNotFound();\n }\n }).catch(ex => {\n this.onErrorOccured(ex);\n });\n }\n\n private isClientHasFreshFile_(lastModified: string, etagValue: string) {\n return fresh(this.request.headers, {\n 'etag': etagValue,\n 'last-modified': lastModified\n });\n }\n\n private sendFile_(filePath: string, fileType: string, fileInfo: Fs.Stats) {\n this.runWallOutgoing().then(() => {\n let mimeType;\n if (fileType[0] === '.') { // its extension\n mimeType = getMimeTypeFromExtension(fileType);\n }\n else { // mime type\n mimeType = fileType;\n }\n const negotiateMimeType = this.getContentTypeFromNegotiation(mimeType) as MIME_TYPE;\n if (negotiateMimeType != null) {\n const lastModified = fileInfo.mtime.toUTCString();\n const eTagValue = etag(fileInfo, {\n weak: Global.eTag.type === ETag_Type.Weak\n });\n if (this.isClientHasFreshFile_(lastModified, eTagValue)) { // client has fresh file\n this.response.statusCode = HTTP_STATUS_CODE.NotModified;\n this.response.end();\n }\n else {\n this.response.writeHead(HTTP_STATUS_CODE.Ok, {\n [__ContentType]: mimeType,\n 'Etag': eTagValue,\n 'Last-Modified': lastModified\n });\n const readStream = Fs.createReadStream(filePath);\n // Handle non-existent file\n readStream.on('error', this.onErrorOccured.bind(this));\n readStream.pipe(this.response);\n }\n }\n else {\n this.onNotAcceptableRequest();\n }\n }).catch(ex => {\n this.onErrorOccured(ex);\n });\n }\n}","export * from \"./route_handler\";\nexport * from \"./request_handler\";\nexport * from \"./file_handler\";\nexport * from \"./request_handler_helper\";\nexport * from \"./controller_result_handler\";\nexport * from \"./post_handler\";\nexport * from './injector_handler';","import { __Constructor } from \"../constant\";\n\ntype InjectorStoreInfo = {\n className: string;\n methods: {\n [methodName: string]: any[]\n }\n};\n// this stores information of injector values that are available per class & worker\nconst injectorStoreInfos: InjectorStoreInfo[] = [];\n// this stores injector values\nconst injectorValues: any[] = [];\n// this stores the singletons name & their respective index in injector values\nconst singletons: {\n [className: string]: number\n} = {};\nexport class InjectorHandler {\n\n static addWorkerValue(className: string, methodName: string, paramIndex, paramValue, shouldFindIndex = true): number {\n if (shouldFindIndex === true && injectorValues.indexOf(paramValue) < 0) {\n paramValue = injectorValues.push(paramValue) - 1;\n }\n\n const savedValue = injectorStoreInfos.find(x => x.className === className);\n const value: InjectorStoreInfo = {\n className: className,\n methods: {\n [methodName]: []\n }\n };\n if (savedValue == null) {\n value.methods[methodName][paramIndex] = paramValue;\n injectorStoreInfos.push(value);\n }\n else {\n // const savedMethod = savedValue.methods[methodName];\n if (savedValue.methods[methodName] == null) {\n savedValue.methods[methodName] = [];\n }\n savedValue.methods[methodName][paramIndex] = paramValue;\n }\n\n return paramValue;\n }\n\n static getConstructorValues(className: string) {\n return this.getMethodValues(className, __Constructor);\n }\n\n static getMethodValues(className: string, methodName: string) {\n const savedValue = injectorStoreInfos.find(qry => qry.className === className);\n if (savedValue != null) {\n const methodArgs = savedValue.methods[methodName];\n if (methodArgs != null) {\n return methodArgs.map(injectorValueIndex => {\n return injectorValues[injectorValueIndex];\n });\n }\n }\n return [];\n }\n\n static addSingleton(className: string, methodName: string, paramIndex, paramValue) {\n const singletonClassName = paramValue.name;\n if (singletonClassName) {\n if (singletons[singletonClassName] == null) {\n singletons[singletonClassName] = InjectorHandler.addWorkerValue(className, methodName, paramIndex, new paramValue());\n }\n else {\n InjectorHandler.addWorkerValue(className, methodName, paramIndex, singletons[singletonClassName], false);\n }\n }\n }\n}","import { ControllerResultHandler } from \"./controller_result_handler\";\nimport { promise, JsonHelper } from \"../helpers\";\nimport { __ContentType } from \"../constant\";\nimport { MIME_TYPE } from \"../enums\";\nimport * as ContentType from \"content-type\";\nimport * as QueryString from 'querystring';\nimport * as Multiparty from \"multiparty\";\nimport { MultiPartParseResult } from \"../types\";\nimport { FileManager } from \"../models\";\nimport { Global } from \"../global\";\n\n\nexport class PostHandler extends ControllerResultHandler {\n protected body: any;\n protected file: FileManager;\n\n private getPostRawData_(): Promise {\n const body = [];\n return promise((res, rej) => {\n this.request.on('data', (chunk) => {\n body.push(chunk);\n }).on('end', () => {\n const bodyBuffer = Buffer.concat(body);\n res(bodyBuffer.toString());\n }).on(\"error\", function (err) {\n rej(err);\n });\n });\n }\n\n private parseMultiPartData_(): Promise {\n return promise((res, rej) => {\n new Multiparty.Form().parse(this.request, (err, fields, files) => {\n if (err) {\n rej(err);\n }\n else {\n const result: MultiPartParseResult = {\n field: {},\n file: {}\n };\n for (const field in fields) {\n result.field[field] = fields[field].length === 1 ? fields[field][0] : fields[field];\n }\n for (const file in files) {\n result.file[file] = files[file].length === 1 ? files[file][0] : files[file];\n }\n res(result);\n }\n });\n });\n }\n\n protected async parsePostData() {\n\n let postData;\n\n let contentType = this.request.headers[__ContentType] || this.request.headers[\"content-type\"];\n if (contentType != null) {\n contentType = ContentType.parse(contentType as string).type;\n }\n if (contentType === MIME_TYPE.FormMultiPart) {\n const result = await this.parseMultiPartData_();\n postData = result.field;\n this.file = new FileManager(result.file);\n }\n else {\n this.file = new FileManager({});\n const bodyDataAsString = await this.getPostRawData_();\n switch (contentType) {\n case MIME_TYPE.Json:\n postData = JsonHelper.parse(bodyDataAsString);\n break;\n case MIME_TYPE.Text:\n case MIME_TYPE.Html:\n postData = bodyDataAsString; break;\n case MIME_TYPE.FormUrlEncoded:\n postData = QueryString.parse(bodyDataAsString); break;\n case MIME_TYPE.Xml:\n postData = new (Global as any).xmlParser().parse(bodyDataAsString);\n break;\n default:\n postData = {};\n }\n }\n\n return postData;\n\n }\n}","import * as http from \"http\";\nimport * as url from 'url';\nimport { Controller } from \"../abstracts\";\nimport { __ContentType, __AppName, __Cookie, __SetCookie } from \"../constant\";\nimport { Global } from \"../global\";\nimport { parseCookie, parseAndMatchRoute, promise } from \"../helpers\";\nimport { CookieManager, FileManager } from \"../models\";\nimport { GenericSessionProvider, GenericGuard } from \"../generics\";\nimport { RouteMatch, HttpRequest, HttpResponse } from \"../types\";\nimport { HTTP_METHOD } from \"../enums\";\nimport { PostHandler } from \"./post_handler\";\nimport { InjectorHandler } from \"./injector_handler\";\n\n\nexport class RequestHandler extends PostHandler {\n\n private session_: GenericSessionProvider;\n private query_: any;\n private data_ = {};\n private routeMatchInfo_: RouteMatch;\n\n\n constructor(request: http.IncomingMessage, response: http.ServerResponse) {\n super();\n this.request = request;\n this.response = response;\n this.registerEvents_();\n }\n\n private registerEvents_() {\n this.request.on('error', this.onBadRequest.bind(this));\n this.response.on('error', this.onErrorOccured.bind(this));\n }\n\n private executeWallIncoming_(): Promise {\n return promise((res) => {\n let index = 0;\n const wallLength = Global.walls.length;\n const executeWallIncomingByIndex = async () => {\n if (wallLength > index) {\n const wall = Global.walls[index++];\n const constructorArgsValues = InjectorHandler.getConstructorValues(wall.name);\n const wallObj = new wall(...constructorArgsValues);\n wallObj.cookie = this.cookieManager;\n wallObj.session = this.session_;\n wallObj.request = this.request as HttpRequest;\n wallObj.response = this.response as HttpResponse;\n wallObj.data = this.data_;\n wallObj.query = this.query_;\n this.wallInstances.push(wallObj);\n const methodArgsValues = InjectorHandler.getMethodValues(wall.name, 'onIncoming');\n try {\n const result = await wallObj.onIncoming(...methodArgsValues);\n if (result == null) {\n executeWallIncomingByIndex();\n }\n else {\n res(false);\n this.onTerminationFromWall(result);\n }\n } catch (ex) {\n this.onErrorOccured(ex);\n res(false);\n }\n }\n else {\n res(true);\n }\n };\n executeWallIncomingByIndex();\n });\n }\n\n private runController_() {\n const constructorValues = InjectorHandler.getConstructorValues(this.routeMatchInfo_.controller.name);\n const controllerObj: Controller = new this.routeMatchInfo_.controller(...constructorValues);\n controllerObj.request = this.request as HttpRequest;\n controllerObj.response = this.response;\n controllerObj.query = this.query_;\n controllerObj.body = this.body;\n controllerObj.session = this.session_;\n controllerObj.cookie = this.cookieManager;\n controllerObj.param = this.routeMatchInfo_.params;\n controllerObj.data = this.data_;\n controllerObj.file = this.file;\n const methodArgsValues = InjectorHandler.getMethodValues(this.routeMatchInfo_.controller.name, this.routeMatchInfo_.workerInfo.workerName);\n controllerObj[this.routeMatchInfo_.workerInfo.workerName](...methodArgsValues).then(\n this.onResultFromController.bind(this)\n ).catch(this.onErrorOccured.bind(this));\n }\n\n private executeShieldsProtection_(): Promise {\n return promise((res) => {\n let index = 0;\n const shieldLength = this.routeMatchInfo_.shields.length;\n const executeShieldByIndex = async () => {\n if (shieldLength > index) {\n const shield = this.routeMatchInfo_.shields[index++];\n const constructorArgsValues = InjectorHandler.getConstructorValues(shield.name);\n const shieldObj = new shield(...constructorArgsValues);\n shieldObj.cookie = this.cookieManager;\n shieldObj.query = this.query_;\n shieldObj.session = this.session_;\n shieldObj.request = this.request as HttpRequest;\n shieldObj.response = this.response as HttpResponse;\n shieldObj.data = this.data_;\n shieldObj.workerName = this.routeMatchInfo_.workerInfo.workerName;\n const methodArgsValues = InjectorHandler.getMethodValues(shield.name, 'protect');\n\n try {\n const result = await shieldObj.protect(...methodArgsValues);\n if (result == null) {\n executeShieldByIndex();\n }\n else {\n res(false);\n this.onResultFromController(result);\n }\n } catch (ex) {\n this.onErrorOccured(ex);\n res(false);\n }\n }\n else {\n res(true);\n }\n };\n executeShieldByIndex();\n });\n }\n\n private executeGuardsCheck_(guards: Array): Promise {\n return promise((res) => {\n let index = 0;\n const shieldLength = guards.length;\n const executeGuardByIndex = async () => {\n if (shieldLength > index) {\n const guard = guards[index++];\n const constructorArgsValues = InjectorHandler.getConstructorValues(guard.name);\n const guardObj = new guard(...constructorArgsValues);\n guardObj.body = this.body;\n guardObj.cookie = this.cookieManager;\n guardObj.query = this.query_;\n guardObj.session = this.session_;\n guardObj.request = this.request as HttpRequest;\n guardObj.response = this.response as HttpResponse;\n guardObj.data = this.data_;\n guardObj.file = this.file;\n guardObj.param = this.routeMatchInfo_.params;\n const methodArgsValues = InjectorHandler.getMethodValues(guard.name, 'check');\n try {\n const result = await guardObj.check(...methodArgsValues);\n if (result == null) {\n executeGuardByIndex();\n }\n else {\n res(false);\n this.onResultFromController(result);\n }\n } catch (ex) {\n this.onErrorOccured(ex);\n res(false);\n }\n }\n else {\n res(true);\n }\n };\n executeGuardByIndex();\n });\n }\n\n private parseCookieFromRequest_() {\n if (Global.shouldParseCookie === true) {\n const rawCookie = (this.request.headers[__Cookie] || this.request.headers[\"cookie\"]) as string;\n let parsedCookies;\n try {\n parsedCookies = parseCookie(rawCookie);\n } catch (ex) {\n this.onErrorOccured(ex);\n return false;\n }\n this.session_ = new Global.sessionProvider();\n this.session_.cookie = this.cookieManager = new CookieManager(parsedCookies);\n this.session_.sessionId = parsedCookies[Global.appSessionIdentifier];\n }\n else {\n this.cookieManager = new CookieManager({});\n }\n return true;\n }\n\n private setPreHeader_() {\n this.response.setHeader('X-Powered-By', Global.appName);\n this.response.setHeader('Vary', 'Accept-Encoding');\n this.response.sendDate = true;\n }\n\n private async onRouteMatched_() {\n const actionInfo = this.routeMatchInfo_.workerInfo;\n if (actionInfo == null) {\n if (this.request.method === HTTP_METHOD.Options) {\n this.onRequestOptions(this.routeMatchInfo_.allowedHttpMethod);\n }\n else {\n this.onMethodNotAllowed(this.routeMatchInfo_.allowedHttpMethod);\n }\n }\n else {\n let shouldExecuteNextComponent = await this.executeShieldsProtection_();\n if (shouldExecuteNextComponent === true) {\n shouldExecuteNextComponent = await this.handlePostData();\n if (shouldExecuteNextComponent === true) {\n shouldExecuteNextComponent = await this.executeGuardsCheck_(actionInfo.guards);\n if (shouldExecuteNextComponent === true) {\n this.runController_();\n }\n }\n }\n }\n }\n\n private async execute_() {\n const urlDetail = url.parse(this.request.url, true);\n this.query_ = urlDetail.query;\n let shouldExecuteNextProcess = this.parseCookieFromRequest_();\n if (shouldExecuteNextProcess === true) {\n shouldExecuteNextProcess = await this.executeWallIncoming_();\n if (shouldExecuteNextProcess === true) {\n const pathUrl = urlDetail.pathname;\n const requestMethod = this.request.method as HTTP_METHOD;\n try {\n this.routeMatchInfo_ = parseAndMatchRoute(pathUrl.toLowerCase(), requestMethod);\n }\n catch (ex) {\n this.onErrorOccured(ex);\n return;\n }\n if (this.routeMatchInfo_ == null) { // no route matched\n // it may be a file or folder then\n this.handleFileRequest(pathUrl);\n }\n else {\n this.onRouteMatched_();\n }\n }\n }\n }\n\n async handlePostData() {\n if (this.request.method === HTTP_METHOD.Get) {\n this.body = {};\n this.file = new FileManager({});\n }\n else if (Global.shouldParsePost === true) {\n try {\n this.body = await this.parsePostData();\n } catch (ex) {\n this.onBadRequest(ex);\n return false;\n }\n }\n return true;\n }\n\n async handle() {\n this.setPreHeader_();\n this.execute_();\n }\n}","import { HTTP_STATUS_CODE, MIME_TYPE, HTTP_METHOD } from \"../enums\";\nimport * as http from \"http\";\nimport { __ContentType } from \"../constant\";\nimport { Global } from \"../global\";\nimport * as Negotiator from \"negotiator\";\nimport { CookieManager } from \"../models\";\nimport { Wall } from \"../abstracts\";\nimport { IException } from \"../interfaces\";\nimport { JsonHelper, reverseLoop } from \"../helpers\";\nimport { isNull } from \"../utils\";\nimport { InjectorHandler } from \"./injector_handler\";\n\n\nexport class RequestHandlerHelper {\n protected cookieManager: CookieManager;\n protected response: http.ServerResponse;\n protected request: http.IncomingMessage;\n\n protected wallInstances: Wall[] = [];\n\n protected runWallOutgoing() {\n const outgoingResults: Array> = [];\n reverseLoop(this.wallInstances, (value: Wall) => {\n const methodArgsValues = InjectorHandler.getMethodValues(value.constructor.name, 'onOutgoing');\n outgoingResults.push(value.onOutgoing(methodArgsValues));\n });\n return Promise.all(outgoingResults);\n }\n\n protected getContentTypeFromNegotiation(type: MIME_TYPE) {\n const negotiator = new Negotiator(this.request);\n let availableTypes: MIME_TYPE[] = this.getAvailableTypes_(type);\n if (availableTypes == null) {\n availableTypes = [type];\n }\n return negotiator.mediaType(availableTypes) as MIME_TYPE;\n }\n\n protected getContentTypeFromNegotiationHavingMultipleTypes(types: MIME_TYPE[]) {\n const negotiator = new Negotiator(this.request);\n return negotiator.mediaType(types) as MIME_TYPE;\n }\n\n private getAvailableTypes_(type: MIME_TYPE) {\n switch (type) {\n case MIME_TYPE.Json:\n case MIME_TYPE.Xml:\n return [MIME_TYPE.Json, MIME_TYPE.Xml];\n case MIME_TYPE.Html:\n case MIME_TYPE.Css:\n case MIME_TYPE.Csv:\n case MIME_TYPE.Js:\n case MIME_TYPE.Rtf:\n case MIME_TYPE.Text:\n return [MIME_TYPE.Text, MIME_TYPE.Html, MIME_TYPE.Js,\n MIME_TYPE.Css, MIME_TYPE.Rtf, MIME_TYPE.Csv];\n }\n return null;\n }\n\n protected async onBadRequest(error) {\n let errMessage;\n try {\n await this.runWallOutgoing();\n errMessage = await new Global.errorHandler().onBadRequest(error);\n }\n catch (ex) {\n return this.onErrorOccured(ex);\n }\n this.response.writeHead(HTTP_STATUS_CODE.BadRequest, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(errMessage);\n }\n\n protected async onForbiddenRequest() {\n let errMessage;\n try {\n await this.runWallOutgoing();\n errMessage = await new Global.errorHandler().onForbiddenRequest();\n }\n catch (ex) {\n return this.onErrorOccured(ex);\n }\n this.response.writeHead(HTTP_STATUS_CODE.Forbidden, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(errMessage);\n }\n\n protected async onNotAcceptableRequest() {\n let errMessage;\n try {\n await this.runWallOutgoing();\n errMessage = await new Global.errorHandler().onNotAcceptableRequest();\n }\n catch (ex) {\n return this.onErrorOccured(ex);\n }\n this.response.writeHead(HTTP_STATUS_CODE.NotAcceptable, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(errMessage);\n }\n\n protected async onNotFound() {\n let errMessage;\n try {\n await this.runWallOutgoing();\n errMessage = await new Global.errorHandler().onNotFound(this.request.url);\n }\n catch (ex) {\n return this.onErrorOccured(ex);\n }\n this.response.writeHead(HTTP_STATUS_CODE.NotFound, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(errMessage);\n }\n\n protected async onMethodNotAllowed(allowedMethods: HTTP_METHOD[]) {\n let errMessage;\n try {\n await this.runWallOutgoing();\n errMessage = await new Global.errorHandler().onMethodNotAllowed();\n }\n catch (ex) {\n return this.onErrorOccured(ex);\n }\n this.response.setHeader(\"Allow\", allowedMethods.join(\",\"));\n this.response.writeHead(HTTP_STATUS_CODE.MethodNotAllowed, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(errMessage);\n }\n\n protected async onErrorOccured(error) {\n if (typeof error === 'string') {\n error = {\n message: error\n } as IException;\n }\n let errMessage;\n try {\n await this.runWallOutgoing();\n errMessage = await new Global.errorHandler().onServerError(error);\n }\n catch (ex) {\n this.response.writeHead(HTTP_STATUS_CODE.InternalServerError, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(JsonHelper.stringify(ex));\n return;\n }\n this.response.writeHead(HTTP_STATUS_CODE.InternalServerError, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(errMessage);\n }\n\n protected async onRequestOptions(allowedMethods: HTTP_METHOD[]) {\n try {\n await this.runWallOutgoing();\n }\n catch (ex) {\n return this.onErrorOccured(ex);\n }\n this.response.setHeader(\"Allow\", allowedMethods.join(\",\"));\n this.response.writeHead(HTTP_STATUS_CODE.Ok, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(\"\");\n }\n}","import { RouteInfo, WorkerInfo, ParentRoute } from \"../types\";\nimport { GenericShield, GenericGuard } from \"../generics\";\nimport { isNull } from \"../utils\";\n\nconst routerCollection: RouteInfo[] = [];\n\nconst getActionPattern = (parentRoute: ParentRoute, pattern: string) => {\n return (isNull(parentRoute.path) || parentRoute.path === \"*\") ? pattern : `/${parentRoute.path}${pattern}`;\n};\n\nexport class RouteHandler {\n\n static get routerCollection() {\n return routerCollection;\n }\n\n static addToRouterCollection(value: ParentRoute) {\n const route = routerCollection.find(x => x.controllerName === value.controller.name);\n if (route == null) {\n routerCollection.push({\n workers: [],\n controller: value.controller as any,\n controllerName: value.controller.name,\n path: value.path,\n shields: [],\n values: []\n });\n }\n else {\n route.controller = value.controller as any;\n route.path = value.path;\n // change pattern value since we have controller name now.\n route.workers.forEach(actionInfo => {\n actionInfo.pattern = getActionPattern(value, actionInfo.pattern);\n });\n }\n } \n\n static addShields(shields: Array, className: string) {\n const index = routerCollection.findIndex(x => x.controllerName === className);\n if (index < 0) {\n routerCollection.push({\n workers: [],\n controller: null,\n controllerName: className,\n shields: shields,\n path: null,\n values: []\n });\n }\n else {\n routerCollection[index].shields = shields;\n }\n }\n\n static addWorker(newAction: WorkerInfo, className: string) {\n const router = routerCollection.find(x => x.controllerName === className);\n if (router == null) {\n routerCollection.push({\n workers: [newAction],\n controller: null,\n controllerName: className,\n shields: [],\n path: null,\n values: []\n });\n }\n else {\n const savedAction = router.workers.find(val => val.workerName === newAction.workerName);\n if (savedAction == null) {\n newAction.pattern = getActionPattern(router, newAction.pattern);\n router.workers.push(newAction);\n }\n else {\n savedAction.methodsAllowed = newAction.methodsAllowed;\n savedAction.pattern = router.path == null ? savedAction.pattern : `/${router.path}${savedAction.pattern}`;\n }\n }\n }\n\n static addGuards(guards: Array, className: string, actionName: string) {\n const index = routerCollection.findIndex(x => x.controllerName === className);\n const pattern = actionName.toLowerCase();\n if (index < 0) {\n routerCollection.push({\n workers: [{\n workerName: actionName,\n guards: guards,\n methodsAllowed: null,\n pattern: pattern,\n values: []\n }],\n controller: null,\n controllerName: className,\n shields: [],\n path: null,\n values: []\n });\n }\n else {\n const savedAction = routerCollection[index].workers.find(val => val.workerName === actionName);\n if (savedAction == null) {\n routerCollection[index].workers.push({\n workerName: actionName,\n guards: guards,\n methodsAllowed: null,\n pattern: pattern,\n values: []\n });\n }\n else {\n savedAction.guards = guards;\n }\n }\n }\n\n static addPattern(pattern: string, className: string, actionName: string) {\n const router = routerCollection.find(x => x.controllerName === className);\n if (router == null) {\n routerCollection.push({\n workers: [{\n workerName: actionName,\n guards: [],\n methodsAllowed: null,\n pattern: pattern,\n values: []\n }],\n controller: null,\n controllerName: className,\n shields: [],\n path: null,\n values: []\n });\n }\n else {\n const savedAction = router.workers.find(val => val.workerName === actionName);\n pattern = getActionPattern(router, pattern);\n if (savedAction == null) {\n router.workers.push({\n workerName: actionName,\n guards: [],\n methodsAllowed: null,\n pattern: pattern,\n values: []\n });\n }\n else {\n savedAction.pattern = pattern;\n }\n }\n }\n}","\nimport { MIME_TYPE } from \"../enums\";\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\nimport { HttpResult } from \"../types/http_result\";\n\nexport const downloadResult = (filePath: string, downloadFileName?: string) => {\n return {\n statusCode: HTTP_STATUS_CODE.Ok,\n file: {\n filePath: filePath,\n shouldDownload: true,\n alias: downloadFileName\n }\n } as HttpResult;\n};","\nimport { MIME_TYPE } from \"../enums\";\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\nimport { HttpResult } from \"../types/http_result\";\n\nexport const fileResult = (filePath: string) => {\n return {\n statusCode: HTTP_STATUS_CODE.Ok,\n file: {\n filePath: filePath\n }\n } as HttpResult;\n};","import { DATA_TYPE } from \"../enums/data_type\";\n\nexport const getDataType = (value) => {\n const type = typeof value;\n switch (type) {\n case 'object':\n if (Array.isArray(value)) {\n return DATA_TYPE.Array;\n }\n default:\n return type;\n }\n};","import { MIME_TYPE } from \"../enums\";\n\nexport const getMimeTypeFromExtension = (ext: string): MIME_TYPE => {\n switch (ext) {\n case \".htm\":\n case \".html\":\n return MIME_TYPE.Html;\n case \".css\":\n return MIME_TYPE.Css;\n case \".js\":\n return MIME_TYPE.Js;\n case \".png\":\n return MIME_TYPE.Png;\n case \".woff\":\n return MIME_TYPE.Woff;\n case \".woff2\":\n return MIME_TYPE.Woff2;\n case \".json\":\n return MIME_TYPE.Json;\n case \".txt\":\n return MIME_TYPE.Text;\n case \".jpg\":\n case \".jpeg\":\n return MIME_TYPE.Jpeg;\n case \".rtf\":\n return MIME_TYPE.Rtf;\n case \".ttf\":\n return MIME_TYPE.Ttf;\n case \".eot\":\n return MIME_TYPE.Eot;\n case '.otf':\n return MIME_TYPE.Otf;\n case \".swf\":\n return MIME_TYPE.Swf;\n case \".avi\":\n return MIME_TYPE.Avi;\n case \".Svg\":\n return MIME_TYPE.Svg;\n case \".pdf\":\n return MIME_TYPE.Pdf;\n case \".xml\":\n return MIME_TYPE.Xml;\n case \".csv\":\n return MIME_TYPE.Csv;\n case \".xls\":\n return MIME_TYPE.Xls;\n case \".xlsx\":\n return MIME_TYPE.Xlsx;\n case \".bmp\":\n return MIME_TYPE.Bmp;\n case \".gif\":\n return MIME_TYPE.Gif;\n default:\n return \"application/octet-stream\" as MIME_TYPE;\n }\n};","import { readFile } from \"fs-extra\";\nimport { isEnvProduction } from \"./is_env_production\";\nimport * as path from \"path\";\nimport { Global } from \"../global\";\nimport { __CurrentPath } from \"../constant\";\n\nconst viewCache = {\n\n};\nexport const getViewFromFile = async function (fileLocation: string): Promise {\n const readView = function () {\n const pathOfView = path.join(__CurrentPath, `${Global.viewPath}/${fileLocation}`);\n return readFile(pathOfView, {\n encoding: 'utf8'\n });\n };\n\n if (isEnvProduction()) {\n if (viewCache[fileLocation] == null) {\n viewCache[fileLocation] = await readView();\n }\n return viewCache[fileLocation];\n\n }\n return await readView();\n};","import { MIME_TYPE } from \"../enums\";\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\nimport { HttpResult } from \"../types/http_result\";\n\nexport const htmlResult = (html: string, statusCode?: HTTP_STATUS_CODE) => {\n return {\n contentType: MIME_TYPE.Html,\n responseData: html,\n statusCode: statusCode || HTTP_STATUS_CODE.Ok\n } as HttpResult;\n};","export * from './json_result';\nexport * from './text_result';\nexport * from './html_result';\nexport * from './render_view';\nexport * from './download_result';\nexport * from './file_result';\nexport * from './redirect_result';\nexport * from './view_result';\nexport * from './get_view_from_file';\nexport * from \"./promise\";\nexport * from './log_helper';\nexport * from './xml_helper';\nexport * from \"./get_mime_type_from_extension\";\nexport * from \"./parse_match_route\";\nexport * from \"./parse_cookie\";\nexport * from './json_helper';\nexport * from './remove_last_slash';\nexport * from './remove_first_slash';\nexport * from './reverse_loop';","export const isEnvDev = () => {\n return process.env.NODE_ENV === 'development';\n};","export const isEnvProduction = () => {\n return process.env.NODE_ENV === \"production\";\n};","import { IException } from \"../interfaces\";\n\nexport class JsonHelper {\n static parse(value: string) {\n try {\n return JSON.parse(value);\n }\n catch (ex) {\n // tslint:disable-next-line\n throw {\n message: \"Post data is invalid\"\n } as IException;\n }\n }\n\n static stringify(value) {\n return JSON.stringify(value);\n }\n}","\nimport { MIME_TYPE } from \"../enums\";\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\nimport { HttpResult } from \"../types/http_result\";\n\nexport const jsonResult = (value: any, statusCode?: HTTP_STATUS_CODE) => {\n return {\n contentType: MIME_TYPE.Json,\n responseData: value,\n statusCode: statusCode || HTTP_STATUS_CODE.Ok\n } as HttpResult;\n};","import { IError } from \"../interfaces/error\";\nimport { ERROR_TYPE } from \"../enums/error_type\";\n\nexport class LogHelper implements IError {\n type: ERROR_TYPE;\n message: string;\n private info_: any;\n\n constructor(type: ERROR_TYPE, info?: any) {\n this.type = type;\n this.info_ = info;\n this.message = this.getMsg_();\n }\n\n throw() {\n const errMsg = this.get();\n throw JSON.stringify(errMsg);\n }\n\n static log(msg) {\n console.log(msg);\n }\n\n logError() {\n console.error(this.get());\n }\n\n logWarning() {\n console.warn(this.get());\n }\n\n get() {\n return {\n message: this.message,\n type: this.type\n } as IError;\n }\n\n private getMsg_() {\n let errMsg: string;\n switch (this.type) {\n case ERROR_TYPE.InvalidControllerName:\n errMsg = `Invalid controller name - '${this.info_}'. Controller name must contain 'controller'.`;\n break;\n case ERROR_TYPE.InvalidContentType:\n errMsg = `Content type - '${this.info_}' is not valid. Please create an issue if you think this is valid type.`;\n break;\n case ERROR_TYPE.PortInUse:\n errMsg = `Port ${this.info_} is being used by another process.`;\n break;\n case ERROR_TYPE.UndefinedViewEngine:\n errMsg = `View engine is not initiated.Initiate the view engine where fort is created.`;\n break;\n default:\n errMsg = this.message;\n break;\n }\n return errMsg;\n }\n}","import { isNullOrEmpty } from \"../utils\";\n\n \n\n\nexport const parseCookie = (cookie: string): { [key: string]: string } => {\n const value = {};\n if (!isNullOrEmpty(cookie)) {\n cookie.split(';').forEach((val) => {\n const parts = val.split('=');\n value[parts.shift().trim()] = decodeURI(parts.join('='));\n });\n }\n return value;\n};","import { RouteHandler } from \"../handlers/route_handler\";\nimport { RouteMatch } from \"../types/route_match\";\nimport { HTTP_METHOD } from \"../enums\";\nimport { removeLastSlash } from \".\";\nimport { RouteInfo } from \"../types\";\n\nconst checkRouteInWorkerForDefaultRoute = (route: RouteInfo, httpMethod: HTTP_METHOD, urlParts: string[]) => {\n\n const matchedRoute: RouteMatch = {\n allowedHttpMethod: []\n } as RouteMatch;\n matchedRoute.controller = route.controller;\n const urlPartLength = urlParts.length;\n\n const regex1 = /{(.*)}(?!.)/;\n const regex2 = /{(.*)}\\.(\\w+)(?!.)/;\n route.workers.every(routeActionInfo => {\n const patternSplit = routeActionInfo.pattern.split(\"/\");\n if (urlPartLength === patternSplit.length) {\n let isMatched = true;\n const params = {};\n urlParts.every((urlPart, i) => {\n const regMatch1 = patternSplit[i].match(regex1);\n const regMatch2 = patternSplit[i].match(regex2);\n if (regMatch1 != null) {\n params[regMatch1[1]] = urlPart;\n }\n else if (regMatch2 != null) {\n const splitByDot = urlPart.split(\".\");\n if (splitByDot[1] === regMatch2[2]) {\n params[regMatch2[1]] = splitByDot[0];\n }\n else {\n isMatched = false;\n return false;\n }\n }\n else if (urlPart !== patternSplit[i]) {\n isMatched = false;\n return false;\n }\n return true;\n });\n if (isMatched === true) {\n if (routeActionInfo.methodsAllowed.indexOf(httpMethod) >= 0) {\n matchedRoute.workerInfo = routeActionInfo;\n matchedRoute.params = params;\n matchedRoute.shields = route.shields;\n return false;\n }\n else {\n matchedRoute.allowedHttpMethod = [...matchedRoute.allowedHttpMethod, ...routeActionInfo.methodsAllowed];\n }\n }\n }\n return true;\n });\n if (matchedRoute.workerInfo == null && matchedRoute.allowedHttpMethod.length === 0) {\n return null;\n }\n return matchedRoute;\n\n};\n\n\nconst checkRouteInWorker = (route: RouteInfo, httpMethod: HTTP_METHOD, urlParts: string[]) => {\n const matchedRoute: RouteMatch = {\n allowedHttpMethod: []\n } as RouteMatch;\n matchedRoute.controller = route.controller;\n const urlPartLength = urlParts.length;\n if (urlPartLength === 2) { // url does not have action path\n const pattern = `/${route.path}/`;\n route.workers.every(action => {\n if (action.pattern === pattern) {\n if (action.methodsAllowed.indexOf(httpMethod) >= 0) {\n matchedRoute.workerInfo = action;\n matchedRoute.params = {};\n matchedRoute.shields = route.shields;\n return false;\n }\n else {\n matchedRoute.allowedHttpMethod = [...matchedRoute.allowedHttpMethod, ...action.methodsAllowed];\n }\n }\n return true;\n });\n }\n else {\n const regex1 = /{(.*)}(?!.)/;\n const regex2 = /{(.*)}\\.(\\w+)(?!.)/;\n route.workers.every(routeActionInfo => {\n const patternSplit = routeActionInfo.pattern.split(\"/\");\n if (urlPartLength === patternSplit.length) {\n let isMatched = true;\n const params = {};\n urlParts.every((urlPart, i) => {\n const regMatch1 = patternSplit[i].match(regex1);\n const regMatch2 = patternSplit[i].match(regex2);\n if (regMatch1 != null) {\n params[regMatch1[1]] = urlPart;\n }\n else if (regMatch2 != null) {\n const splitByDot = urlPart.split(\".\");\n if (splitByDot[1] === regMatch2[2]) {\n params[regMatch2[1]] = splitByDot[0];\n }\n else {\n isMatched = false;\n return false;\n }\n }\n else if (urlPart !== patternSplit[i]) {\n isMatched = false;\n return false;\n }\n return true;\n });\n if (isMatched === true) {\n if (routeActionInfo.methodsAllowed.indexOf(httpMethod) >= 0) {\n matchedRoute.workerInfo = routeActionInfo;\n matchedRoute.params = params;\n matchedRoute.shields = route.shields;\n return false;\n }\n else {\n matchedRoute.allowedHttpMethod = [...matchedRoute.allowedHttpMethod, ...routeActionInfo.methodsAllowed];\n }\n }\n }\n return true;\n });\n }\n if (matchedRoute.workerInfo == null && matchedRoute.allowedHttpMethod.length === 0) {\n return null;\n }\n return matchedRoute;\n\n};\n\nexport const parseAndMatchRoute = (url: string, httpMethod: HTTP_METHOD) => {\n if (url !== \"/\") {\n url = removeLastSlash(url);\n }\n\n const urlParts = url.split(\"/\");\n const firstPart = urlParts[1];\n let route = RouteHandler.routerCollection.find(qry => qry.path === firstPart);\n\n if (route == null) {\n route = RouteHandler.routerCollection.find(qry => qry.path === \"*\");\n return checkRouteInWorkerForDefaultRoute(route, httpMethod, urlParts);\n }\n else {\n return checkRouteInWorker(route, httpMethod, urlParts);\n }\n};","export const promise = (callBack: (resolve, reject) => void) => {\n return new Promise(callBack);\n};","import { MIME_TYPE } from \"../enums\";\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\nimport { HttpResult } from \"../types/http_result\";\n\nexport const redirectResult = (url: string) => {\n return {\n contentType: MIME_TYPE.Text,\n responseData: url,\n statusCode: HTTP_STATUS_CODE.Redirect,\n shouldRedirect: true\n } as HttpResult;\n};","export const removeFirstSlash = function (value: string) {\n // remove / from string at 0th index\n if (value[0] === \"/\") {\n return value.substr(1);\n }\n return value;\n};","export const removeLastSlash = (url: string) => {\n const urlLength = url.length;\n // removing / from url;\n if (url[urlLength - 1] === \"/\") {\n return url.substr(0, urlLength - 1);\n }\n return url;\n};","import { Global } from \"../global\";\nimport { isEnvDev } from \"./is_env_dev\";\nimport { LogHelper } from \"./log_helper\";\nimport { ERROR_TYPE } from \"../enums/error_type\";\n\nexport const renderView = (viewName: string, model?: any) => {\n if (isEnvDev()) {\n if (Global.viewEngine == null) {\n new LogHelper(ERROR_TYPE.UndefinedViewEngine).throw();\n }\n }\n return Global.viewEngine.render({\n view: viewName,\n model: model\n });\n};","export const reverseLoop = function (values: any[], cb: (value, index: number) => void) {\n for (let length = values.length, i = length - 1; i >= 0; i--) {\n cb(values[i], i);\n }\n};","import { MIME_TYPE } from \"../enums\";\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\nimport { HttpResult } from \"../types/http_result\";\n\nexport const textResult = (text: string, statusCode?: HTTP_STATUS_CODE) => {\n return {\n contentType: MIME_TYPE.Text,\n responseData: text,\n statusCode: statusCode || HTTP_STATUS_CODE.Ok\n } as HttpResult;\n};","import { renderView } from \"./render_view\";\nimport { HttpResult } from \"../types\";\nimport { MIME_TYPE, HTTP_STATUS_CODE } from \"../enums\";\n\n\nexport const viewResult = async (viewName: string, model?: any) => {\n const viewData = await renderView(viewName, model);\n return {\n contentType: MIME_TYPE.Html,\n responseData: viewData,\n statusCode: HTTP_STATUS_CODE.Ok\n } as HttpResult;\n};","import { getDataType } from \"./get_data_type\";\nimport { DATA_TYPE } from \"../enums/data_type\";\nimport * as jsontoxml from \"jsontoxml\";\n\nexport class XmlHelper {\n\n static fromJsToXml(value) {\n const addKeyToObjectIfNeeded = (key: string, obj) => {\n const type = getDataType(obj);\n if (type === DATA_TYPE.Object) {\n const keys = Object.keys(obj);\n if (keys.length !== 1) {\n obj = {\n [key]: obj\n };\n }\n }\n return obj;\n };\n const dataType = getDataType(value);\n switch (dataType) {\n case DATA_TYPE.Array:\n (value as []).forEach((val, index) => {\n value[index] = addKeyToObjectIfNeeded(\"item\", val);\n });\n value = {\n root: value\n };\n break;\n case DATA_TYPE.Object:\n value = addKeyToObjectIfNeeded(\"root\", value);\n\n }\n return jsontoxml(value, {\n xmlHeader: true\n });\n }\n}","export * from './models';\nexport * from './abstracts';\nexport * from './decorators';\nexport * from './enums';\nexport * from './helpers';\nexport * from './types';\nexport * from './extra';","import { HttpCookie } from \"./http_cookie\";\nimport { IHttpCookie } from \"../interfaces\";\n\nexport class CookieManager {\n private responseCookie_: string[] = [];\n private cookieCollection_: { [key: string]: string };\n\n constructor(parsedValue: { [key: string]: string }) {\n this.cookieCollection_ = parsedValue;\n }\n\n /**\n * return cookie by name\n *\n * @param {string} name\n * @returns\n * @memberof CookieManager\n */\n getCookie(name: string): HttpCookie {\n return {\n name: name,\n value: this.cookieCollection_[name]\n } as IHttpCookie;\n }\n\n /**\n * add cookie\n *\n * @param {HttpCookie} cookie\n * @memberof CookieManager\n */\n addCookie(cookie: HttpCookie) {\n this.cookieCollection_[cookie.name] = cookie.value;\n this.responseCookie_.push(this.getCookieStringFromCookie_(cookie));\n }\n\n /**\n * remove cookie\n *\n * @param {HttpCookie} cookie\n * @memberof CookieManager\n */\n removeCookie(cookie: HttpCookie) {\n this.cookieCollection_[cookie.name] = null;\n cookie.expires = new Date('Thu, 01 Jan 1970 00:00:00 GMT');\n cookie.maxAge = -1;\n this.responseCookie_.push(this.getCookieStringFromCookie_(cookie));\n }\n\n /**\n * collection of http cookie\n *\n * @readonly\n * @memberof CookieManager\n */\n get cookieCollection() {\n return this.cookieCollection_;\n }\n\n /**\n * determine whether value exist or not\n *\n * @param {string} name\n * @returns\n * @memberof CookieManager\n */\n isExist(name: string) {\n return this.cookieCollection_[name] != null;\n }\n\n private getCookieStringFromCookie_(cookie: HttpCookie) {\n const cookies = [];\n cookies.push(`${cookie.name}=${cookie.value}`);\n if (cookie.expires) {\n cookies.push(`Expires=${cookie.expires.toUTCString()}`);\n }\n if (cookie.httpOnly === true) {\n cookies.push(\"HttpOnly\");\n }\n if (cookie.maxAge != null) {\n cookies.push(`Max-Age=${cookie.maxAge}`);\n }\n if (cookie.path) {\n cookies.push(`Path=${cookie.path}`);\n }\n if (cookie.domain) {\n cookies.push(`Domain=${cookie.domain}`);\n }\n return cookies.join('; ');\n }\n}","import { IException } from \"../interfaces\";\nimport { promise } from \"../helpers\";\n\nexport class ErrorHandler {\n onServerError(ex: IException): Promise {\n return promise((resolve, reject) => {\n let errMessage = `

internal server error

\n

message : ${ex.message}

`;\n if (ex.stack) {\n errMessage += `

stacktrace: ${ex.stack}

`;\n }\n if (ex.type) {\n errMessage += `

type: ${ex.type}

`;\n }\n resolve(errMessage);\n });\n }\n\n onBadRequest(ex: IException): Promise {\n return promise((resolve, reject) => {\n let errMessage = `

Bad Request

`;\n if (ex.message) {\n errMessage += `

message : ${ex.message}

`;\n }\n if (ex.stack) {\n errMessage += `

stacktrace: ${ex.stack}

`;\n }\n if (ex.type) {\n errMessage += `

type: ${ex.type}

`;\n }\n resolve(errMessage);\n });\n }\n\n onForbiddenRequest(): Promise {\n return promise((resolve, reject) => {\n const errMessage = `

Forbidden

`;\n resolve(errMessage);\n });\n }\n\n onNotAcceptableRequest(): Promise {\n return promise((resolve, reject) => {\n const errMessage = `

Not Acceptable

`;\n resolve(errMessage);\n });\n }\n\n onMethodNotAllowed(): Promise {\n return promise((resolve, reject) => {\n const errMessage = `

Method Not allowed.

`;\n resolve(errMessage);\n });\n }\n\n onNotFound(url: string): Promise {\n return promise((resolve, reject) => {\n const errMessage = `

The requested resource ${url} was not found.

`;\n resolve(errMessage);\n });\n }\n}","import { HttpFile } from \"./http_file\";\nimport * as Fs from \"fs-extra\";\n\nexport class FileManager {\n\n private files_: { [fieldName: string]: HttpFile };\n\n constructor(value) {\n this.files_ = value as any;\n }\n\n /**\n * get total no of files\n *\n * @returns - number\n * @memberof FileManager\n */\n get count() {\n return Object.keys(this.files_).length;\n }\n\n get files() {\n\n return Object.keys(this.files_).map(fileId => {\n return this.files_[fileId];\n });\n }\n\n /**\n * check for existance of file\n *\n * @param {string} fieldName\n * @returns\n * @memberof FileManager\n */\n isExist(fieldName: string) {\n return this.files_[fieldName] != null;\n }\n\n /**\n * return the file\n *\n * @param {string} fieldName\n * @returns\n * @memberof FileManager\n */\n getFile(fieldName: string) {\n return this.files_[fieldName];\n }\n\n /**\n * saves file to supplied path\n *\n * @param {string} fieldName\n * @param {string} pathToSave\n * @returns\n * @memberof FileManager\n */\n saveTo(fieldName: string, pathToSave: string) {\n return Fs.copy(this.files_[fieldName].path, pathToSave);\n }\n}","import { ParentRoute, AppOption, EtagOption } from \"../types\";\nimport { Wall, ViewEngine, SessionProvider, XmlParser } from \"../abstracts\";\nimport { RouteHandler, RequestHandler } from \"../handlers\";\nimport { Global } from \"../global\";\nimport { MemorySessionProvider, MustacheViewEngine } from \"../extra\";\nimport { ErrorHandler } from \".\";\nimport { __AppName } from \"../constant\";\nimport * as http from \"http\";\nimport { ETag_Type, ERROR_TYPE } from \"../enums\";\nimport { LogHelper, promise, removeLastSlash, removeFirstSlash } from \"../helpers\";\nimport { GenericSessionProvider, GenericXmlParser, GenericController } from \"../generics\";\nimport { isNull, isNullOrEmpty, isArray } from \"../utils\";\n\nexport class Fort {\n routes: ParentRoute[] = [];\n walls: Array = [];\n httpServer: http.Server;\n\n /**\n * view engine use to render the view\n *\n * @type {typeof ViewEngine}\n * @memberof Fort\n */\n viewEngine?: typeof ViewEngine;\n\n /**\n * sessionProvider class, default - MemorySessionProvider\n *\n * @type {typeof SessionProvider}\n */\n sessionProvider?: typeof SessionProvider;\n\n /**\n * Custom error handler class\n *\n * @type {typeof ErrorHandler}\n */\n errorHandler?: typeof ErrorHandler;\n\n /**\n * XmlParser class - used to parse the xml \n *\n * @type {typeof XmlParser}\n * @memberof Fort\n */\n xmlParser?: typeof XmlParser;\n\n private saveAppOption_(option: AppOption) {\n const defaultEtagConfig = {\n type: ETag_Type.Weak\n } as EtagOption;\n\n Global.port = option.port == null ? 4000 : option.port;\n Global.shouldParseCookie = option.shouldParseCookie == null ? true : option.shouldParseCookie;\n Global.shouldParsePost = isNull(option.shouldParsePost) ? true : option.shouldParsePost;\n Global.sessionTimeOut = isNull(option.sessionTimeOut) ? 60 : option.sessionTimeOut;\n Global.folders = option.folders == null ? [] : option.folders;\n if (isArray(Global.folders) === false) {\n throw new Error(`Option folders should be an array`);\n }\n Global.appName = isNullOrEmpty(option.appName) === true ? __AppName : option.appName;\n Global.appSessionIdentifier = `${Global.appName}_session_id`;\n Global.eTag = isNull(option.eTag) ? defaultEtagConfig : option.eTag;\n Global.walls = this.walls as any;\n Global.viewEngine = isNull(this.viewEngine) ? new MustacheViewEngine() : new (this.viewEngine as any)();\n Global.sessionProvider = isNull(this.sessionProvider) ? MemorySessionProvider as any :\n this.sessionProvider as typeof GenericSessionProvider;\n Global.errorHandler = isNull(this.errorHandler) ? ErrorHandler : this.errorHandler;\n Global.xmlParser = isNull(this.xmlParser) ? GenericXmlParser : this.xmlParser;\n Global.viewPath = isNull(option.viewPath) ? \"views\" : option.viewPath;\n }\n\n create(option?: AppOption): Promise {\n if (option == null) {\n option = {\n\n };\n }\n\n if (this.routes == null) {\n this.routes = [];\n }\n let isDefaultRouteExist = false;\n // removing / from routes\n this.routes.forEach(route => {\n route.path = removeFirstSlash(route.path);\n route.path = removeLastSlash(route.path);\n if (route.path === \"*\") {\n isDefaultRouteExist = true;\n }\n RouteHandler.addToRouterCollection(route);\n });\n if (isDefaultRouteExist === false) {\n RouteHandler.addToRouterCollection({\n controller: GenericController,\n path: \"*\"\n });\n }\n if (option.folders != null) {\n // remove / from files routes\n option.folders.forEach(folder => {\n const length = folder.alias.length;\n if (length > 1) {\n folder.alias = removeFirstSlash(folder.alias);\n folder.alias = removeLastSlash(folder.alias);\n }\n\n });\n }\n\n this.saveAppOption_(option);\n return promise((res, rej) => {\n this.httpServer = http.createServer((request, response) => {\n new RequestHandler(request, response).handle();\n }).once(\"error\", (err) => {\n if ((err as any).code === 'EADDRINUSE') {\n const error = new LogHelper(ERROR_TYPE.PortInUse, Global.port).get();\n rej(error);\n }\n else {\n rej(err);\n }\n }).once('listening', () => {\n res();\n }).listen(Global.port);\n });\n }\n\n destroy(): Promise {\n return promise((res, rej) => {\n this.httpServer.close(res);\n });\n }\n\n}\n","import { IHttpCookie } from \"../interfaces\";\n\nexport class HttpCookie implements IHttpCookie {\n name: string;\n value: string;\n maxAge?: number;\n expires?: Date;\n domain?: string;\n httpOnly?: boolean;\n secure?: boolean;\n path?: string;\n\n constructor(name: string, value: string) {\n this.name = name;\n this.value = value;\n }\n}","import { IncomingHttpHeaders } from \"http2\";\n\n \nexport class HttpFile {\n\n /**\n * same as name - the field name for this file\n */\n fieldName: string;\n\n /**\n * the filename that the user reports for the file\n */\n originalFilename: string;\n\n /**\n * the absolute path of the uploaded file on disk\n */\n path: string;\n\n /**\n * the HTTP headers that were sent along with this file\n */\n headers?: IncomingHttpHeaders;\n\n /**\n * size of the file in bytes\n */\n size?: number;\n\n}\n","export * from './error_handler';\nexport * from './http_cookie';\nexport * from './fort';\nexport * from './router';\nexport * from './cookie_manager';\nexport * from \"./file_manager\";\nexport * from \"./http_file\";","import { RouteInfo } from \"../types\";\nimport { RouteHandler } from \"../handlers\";\n\nexport class Router {\n routes: RouteInfo[] = RouteHandler.routerCollection;\n}","import { HttpRequest } from \"../types\";\n\nexport class HttpRequestStub implements HttpRequest {\n headers;\n\n constructor(headers) {\n this.headers = headers;\n }\n}","import { HttpResponse } from \"../types\";\n\nexport class HttpResponseStub implements HttpResponse {\n private headers_;\n constructor(headers) {\n this.headers_ = headers;\n }\n\n getHeader(name: string) {\n return this.headers_[name];\n }\n\n\n hasHeader(name: string) {\n return this.headers_[name] != null;\n }\n\n setHeader(name: string, value: number | string | string[]) {\n this.headers_[name] = value;\n }\n\n getHeaders() {\n return this.headers_;\n }\n\n getHeaderNames(): string[] {\n return Object.keys[this.headers_];\n }\n\n removeHeader(name: string) {\n delete this.headers_[name];\n }\n}","export * from './init_controller';\nexport * from './init_guard';\nexport * from './init_shield';\nexport * from './init_wall';","\nimport { CookieManager, FileManager } from \"../models\";\nimport { Global } from \"../global\";\nimport { ControllerTestData } from \"../types\";\nimport { HttpResponseStub } from \"./http_response_stub\";\nimport { HttpRequestStub } from \"./http_request_stub\";\nimport { Controller } from \"../abstracts\";\n\n\n\nexport const initController = (controllerInstance: Controller, data?: ControllerTestData) => {\n data = data || {};\n const parsedCookies = data.cookieValue || {};\n const headers = (data.request && data.request.headers) || {};\n controllerInstance.request = new HttpRequestStub(headers);\n controllerInstance.response = new HttpResponseStub(headers);\n controllerInstance.query = data.query || {};\n controllerInstance.body = data.body || {};\n controllerInstance.cookie = new CookieManager(parsedCookies);\n const session = new Global.sessionProvider();\n session.cookie = controllerInstance.cookie;\n session.sessionId = parsedCookies[Global.appSessionIdentifier];\n controllerInstance.session = session;\n controllerInstance.param = data.param || {};\n controllerInstance.data = data.data || {};\n controllerInstance.file = new FileManager(data.file || {});\n return controllerInstance;\n};","\nimport { initController } from \"./init_controller\";\nimport { ControllerTestData } from \"../types\";\n\nexport type GuardTestData = ControllerTestData;\n\nexport const initGuard = (guardInstance, data?: GuardTestData) => {\n return initController(guardInstance, data);\n};","\nimport { initController } from \"./init_controller\";\nimport { ControllerTestData } from \"../types\";\n\nexport type ShieldTestData = ControllerTestData & {\n workerName?: string;\n};\n\nexport const initShield = (shieldInstance, data?: ShieldTestData) => {\n const value: ShieldTestData = initController(shieldInstance, data) as any;\n value.workerName = data && data.workerName;\n return value;\n};","\nimport { initController } from \"./init_controller\";\nimport { ControllerTestData } from \"../types\";\n\nexport type WallTestData = ControllerTestData;\n\nexport const initWall = (wallInstance, data?: WallTestData) => {\n return initController(wallInstance, data);\n};","export * from './is_null_or_empty';\nexport * from './is_null';\nexport * from './is_array';","export const isArray = (value) => {\n return Array.isArray(value);\n};","export const isNull = (value) => {\n return value == null;\n};","export const isNullOrEmpty = (value: string) => {\n return value == null || value.length === 0;\n};","module.exports = require(\"content-type\");","module.exports = require(\"etag\");","module.exports = require(\"fresh\");","module.exports = require(\"fs\");","module.exports = require(\"fs-extra\");","module.exports = require(\"http\");","module.exports = require(\"jsontoxml\");","module.exports = require(\"multiparty\");","module.exports = require(\"mustache\");","module.exports = require(\"negotiator\");","module.exports = require(\"path\");","module.exports = require(\"querystring\");","module.exports = require(\"uniqid\");","module.exports = require(\"url\");"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://FortJs/webpack/bootstrap","webpack://FortJs/./src/abstracts/controller.ts","webpack://FortJs/./src/abstracts/guard.ts","webpack://FortJs/./src/abstracts/index.ts","webpack://FortJs/./src/abstracts/session_provider.ts","webpack://FortJs/./src/abstracts/shield.ts","webpack://FortJs/./src/abstracts/view_engine.ts","webpack://FortJs/./src/abstracts/wall.ts","webpack://FortJs/./src/abstracts/xml_parser.ts","webpack://FortJs/./src/constant.ts","webpack://FortJs/./src/decorators/assign.ts","webpack://FortJs/./src/decorators/default_worker.ts","webpack://FortJs/./src/decorators/guards.ts","webpack://FortJs/./src/decorators/index.ts","webpack://FortJs/./src/decorators/route.ts","webpack://FortJs/./src/decorators/shields.ts","webpack://FortJs/./src/decorators/singleton.ts","webpack://FortJs/./src/decorators/worker.ts","webpack://FortJs/./src/enums/data_type.ts","webpack://FortJs/./src/enums/error_type.ts","webpack://FortJs/./src/enums/etag_type.ts","webpack://FortJs/./src/enums/http_method.ts","webpack://FortJs/./src/enums/http_status_code.ts","webpack://FortJs/./src/enums/index.ts","webpack://FortJs/./src/enums/mime_type.ts","webpack://FortJs/./src/extra/index.ts","webpack://FortJs/./src/extra/memory_session_provider.ts","webpack://FortJs/./src/extra/mustache_view_engine.ts","webpack://FortJs/./src/generics/generic_controller.ts","webpack://FortJs/./src/generics/generic_guard.ts","webpack://FortJs/./src/generics/generic_session_provider.ts","webpack://FortJs/./src/generics/generic_shield.ts","webpack://FortJs/./src/generics/generic_wall.ts","webpack://FortJs/./src/generics/generic_xml_parser.ts","webpack://FortJs/./src/generics/index.ts","webpack://FortJs/./src/global.ts","webpack://FortJs/./src/handlers/controller_result_handler.ts","webpack://FortJs/./src/handlers/file_handler.ts","webpack://FortJs/./src/handlers/index.ts","webpack://FortJs/./src/handlers/injector_handler.ts","webpack://FortJs/./src/handlers/post_handler.ts","webpack://FortJs/./src/handlers/request_handler.ts","webpack://FortJs/./src/handlers/request_handler_helper.ts","webpack://FortJs/./src/handlers/route_handler.ts","webpack://FortJs/./src/helpers/download_result.ts","webpack://FortJs/./src/helpers/file_result.ts","webpack://FortJs/./src/helpers/get_data_type.ts","webpack://FortJs/./src/helpers/get_mime_type_from_extension.ts","webpack://FortJs/./src/helpers/get_view_from_file.ts","webpack://FortJs/./src/helpers/html_result.ts","webpack://FortJs/./src/helpers/index.ts","webpack://FortJs/./src/helpers/is_env_dev.ts","webpack://FortJs/./src/helpers/is_env_production.ts","webpack://FortJs/./src/helpers/json_helper.ts","webpack://FortJs/./src/helpers/json_result.ts","webpack://FortJs/./src/helpers/log_helper.ts","webpack://FortJs/./src/helpers/parse_cookie.ts","webpack://FortJs/./src/helpers/parse_match_route.ts","webpack://FortJs/./src/helpers/promise.ts","webpack://FortJs/./src/helpers/redirect_result.ts","webpack://FortJs/./src/helpers/remove_first_slash.ts","webpack://FortJs/./src/helpers/remove_last_slash.ts","webpack://FortJs/./src/helpers/render_view.ts","webpack://FortJs/./src/helpers/reverse_loop.ts","webpack://FortJs/./src/helpers/text_result.ts","webpack://FortJs/./src/helpers/view_result.ts","webpack://FortJs/./src/helpers/xml_helper.ts","webpack://FortJs/./src/index.ts","webpack://FortJs/./src/models/cookie_manager.ts","webpack://FortJs/./src/models/error_handler.ts","webpack://FortJs/./src/models/file_manager.ts","webpack://FortJs/./src/models/fort.ts","webpack://FortJs/./src/models/http_cookie.ts","webpack://FortJs/./src/models/http_file.ts","webpack://FortJs/./src/models/index.ts","webpack://FortJs/./src/models/router.ts","webpack://FortJs/./src/test_helpers/http_request_stub.ts","webpack://FortJs/./src/test_helpers/http_response_stub.ts","webpack://FortJs/./src/test_helpers/index.ts","webpack://FortJs/./src/test_helpers/init_controller.ts","webpack://FortJs/./src/test_helpers/init_guard.ts","webpack://FortJs/./src/test_helpers/init_shield.ts","webpack://FortJs/./src/test_helpers/init_wall.ts","webpack://FortJs/./src/utils/index.ts","webpack://FortJs/./src/utils/is_array.ts","webpack://FortJs/./src/utils/is_null.ts","webpack://FortJs/./src/utils/is_null_or_empty.ts","webpack://FortJs/external \"content-type\"","webpack://FortJs/external \"etag\"","webpack://FortJs/external \"fresh\"","webpack://FortJs/external \"fs\"","webpack://FortJs/external \"fs-extra\"","webpack://FortJs/external \"http\"","webpack://FortJs/external \"jsontoxml\"","webpack://FortJs/external \"multiparty\"","webpack://FortJs/external \"mustache\"","webpack://FortJs/external \"negotiator\"","webpack://FortJs/external \"path\"","webpack://FortJs/external \"querystring\"","webpack://FortJs/external \"uniqid\"","webpack://FortJs/external \"url\""],"names":[],"mappings":";;;;;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;A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AC;IAC1E,KAAK,CAAC,UAAU,GAAG,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC;IAC3C,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;;;;;;;;;;;;;ACXF;AAAA;AAAA;AAAmD;AAK5C,IAAM,QAAQ,GAAG,UAAC,YAAY,EAAE,IAAmB;IACtD,OAAO,uEAAc,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAC9C,CAAC,CAAC;;;;;;;;;;;;;ACRF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmC;AACT;AACC;;;;;;;;;;;;;ACF3B;AAAA;AAAO,IAAM,OAAO,GAAG,UAAC,KAAK;IACzB,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC,CAAC;;;;;;;;;;;;;ACFF;AAAA;AAAO,IAAM,MAAM,GAAG,UAAC,KAAK;IACxB,OAAO,KAAK,IAAI,IAAI,CAAC;AACzB,CAAC,CAAC;;;;;;;;;;;;;ACFF;AAAA;AAAO,IAAM,aAAa,GAAG,UAAC,KAAa;IACvC,OAAO,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC;AAC/C,CAAC,CAAC;;;;;;;;;;;;ACFF,yC;;;;;;;;;;;ACAA,iC;;;;;;;;;;;ACAA,kC;;;;;;;;;;;ACAA,+B;;;;;;;;;;;ACAA,qC;;;;;;;;;;;ACAA,iC;;;;;;;;;;;ACAA,sC;;;;;;;;;;;ACAA,uC;;;;;;;;;;;ACAA,qC;;;;;;;;;;;ACAA,uC;;;;;;;;;;;ACAA,iC;;;;;;;;;;;ACAA,wC;;;;;;;;;;;ACAA,mC;;;;;;;;;;;ACAA,gC","file":"fort.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/index.ts\");\n","import { HttpRequest, HttpResponse, ControllerTestData } from \"../types\";\nimport { CookieManager, FileManager } from \"../models\";\nimport { SessionProvider } from \".\";\nimport { initController } from \"../test_helpers\";\n\n\nexport abstract class Controller {\n request: HttpRequest;\n response: HttpResponse;\n query: { [key: string]: string };\n body?: { [key: string]: any };\n session: SessionProvider;\n cookie: CookieManager;\n param?: { [key: string]: string };\n data: { [key: string]: any };\n\n file?: FileManager;\n\n constructor(...args) {\n\n }\n\n initialize(data?: ControllerTestData) {\n initController(this, data);\n }\n}","import { HttpRequest, HttpResponse, HttpResult } from \"../types\";\nimport { CookieManager, FileManager } from \"../models\";\nimport { Controller } from \"./controller\";\nimport { SessionProvider } from \"./session_provider\";\nimport { GuardTestData, initGuard } from \"../test_helpers\";\n\n\nexport abstract class Guard implements Controller {\n request: HttpRequest;\n response: HttpResponse;\n query: { [key: string]: string };\n body: { [key: string]: any };\n session: SessionProvider;\n cookie: CookieManager;\n param?: { [key: string]: string };\n data: { [key: string]: any };\n file: FileManager;\n abstract check(...args): Promise;\n\n constructor(...args) {\n\n }\n\n initialize(data?: GuardTestData) {\n return initGuard(this, data);\n }\n}","export * from './controller';\nexport * from './shield';\nexport * from './session_provider';\nexport * from './guard';\nexport * from './view_engine';\nexport * from './wall';\nexport * from \"./xml_parser\";","import { CookieManager } from \"../models\";\nimport * as getUniqId from \"uniqid\";\nimport { Global } from \"../global\";\nimport { SessionValue } from \"../types\";\n\nexport abstract class SessionProvider {\n\n sessionId: string;\n protected cookie: CookieManager;\n\n abstract get(key: string): Promise;\n abstract isExist(key: string): Promise;\n abstract getAll(): Promise;\n abstract set(key: string, val: any): Promise;\n abstract setMany(values: SessionValue[]): Promise;\n abstract remove(key: string): Promise;\n\n abstract clear(): Promise;\n\n protected createSession() {\n const now = new Date();\n this.sessionId = getUniqId();\n this.cookie.addCookie({\n name: Global.appSessionIdentifier,\n value: this.sessionId,\n httpOnly: true,\n path: \"/\",\n expires: new Date(now.setMinutes(now.getMinutes() + Global.sessionTimeOut)),\n maxAge: Global.sessionTimeOut * 60\n });\n }\n\n protected destroySession() {\n const cookie = this.cookie.getCookie(Global.appSessionIdentifier);\n cookie.httpOnly = true;\n cookie.path = \"/\";\n this.cookie.removeCookie(cookie);\n }\n}\n\n","import { HttpRequest, HttpResponse, HttpResult } from \"../types\";\nimport { CookieManager } from \"../models\";\nimport { SessionProvider, Controller } from \".\";\nimport { ShieldTestData, initShield } from \"../test_helpers\";\n\n\nexport abstract class Shield implements Controller {\n workerName: string;\n request: HttpRequest;\n response: HttpResponse;\n query: { [key: string]: string };\n\n session: SessionProvider;\n cookie: CookieManager;\n\n data: { [key: string]: any };\n\n abstract protect(...args): Promise;\n\n constructor(...args) {\n\n }\n\n initialize(data?: ShieldTestData) {\n return initShield(this, data);\n }\n}\n\n","import { ViewEngineData } from \"../types\";\n\nexport abstract class ViewEngine {\n abstract render(value: ViewEngineData): Promise;\n}","import { HttpRequest, HttpResponse, HttpResult } from \"../types\";\nimport { CookieManager } from \"../models\";\nimport { Controller } from \"./controller\";\nimport { SessionProvider } from \"./session_provider\";\nimport { WallTestData, initWall } from \"../test_helpers\";\n\n\nexport abstract class Wall implements Controller {\n request: HttpRequest;\n response: HttpResponse;\n query: { [key: string]: string };\n session: SessionProvider;\n cookie: CookieManager;\n\n data: { [key: string]: any };\n\n abstract onIncoming(...args): Promise;\n async onOutgoing(...args) {\n return null;\n }\n\n constructor(...args) {\n\n }\n\n initialize(data?: WallTestData) {\n return initWall(this, data);\n }\n}","export abstract class XmlParser {\n abstract async parse(xml: string): Promise;\n}","import { Global } from \"./global\";\n/* tslint:disable */\nexport const __ContentType = \"Content-Type\";\nexport const __AppName = \"fort\";\nexport const __Cookie = \"Cookie\";\nexport const __SetCookie = 'Set-Cookie';\nexport const __CurrentPath = process.cwd();\nexport const __ContentLength = \"Content-Length\";\nexport const __Constructor = \"const_constructor\";","import { InjectorHandler } from \"../handlers\";\nimport { __Constructor } from \"../constant\";\n\n// tslint:disable-next-line\nexport const Assign = (value): ParameterDecorator => {\n return (target: any, methodName: string, paramIndex: number) => {\n const className: string = target.name || target.constructor.name;\n if (methodName == null) {\n methodName = __Constructor;\n }\n InjectorHandler.addWorkerValue(className, methodName, paramIndex, value);\n };\n};","import { RouteHandler } from \"../handlers\";\nimport { HTTP_METHOD } from \"../enums\";\nimport { WorkerInfo } from \"../types\";\n\n// tslint:disable-next-line\nexport const DefaultWorker = (allowedMethods?: HTTP_METHOD[]): MethodDecorator => {\n return (target: any, methodName: string, descriptor: PropertyDescriptor) => {\n const className = (target.constructor.name as string);\n const actionInfo: WorkerInfo = {\n workerName: methodName,\n methodsAllowed: allowedMethods == null ? [HTTP_METHOD.Get] : allowedMethods,\n guards: [],\n pattern: \"/\",\n values: []\n };\n RouteHandler.addWorker(actionInfo, className);\n };\n};\n","import { RouteHandler } from \"../handlers\";\nimport { GenericGuard } from \"../generics\";\nimport { Guard } from \"../abstracts/guard\";\n\n// tslint:disable-next-line\nexport const Guards = (value: Array): MethodDecorator => {\n return ((target: any, methodName: string, descriptor: PropertyDescriptor) => {\n const className = (target.constructor.name as string);\n RouteHandler.addGuards(value as Array, className, methodName);\n });\n};","export * from './worker';\nexport * from './shields';\nexport * from './guards';\nexport * from './route';\nexport * from './default_worker';\nexport * from './assign';\nexport * from './singleton';","import { RouteHandler } from \"../handlers\";\nimport { removeLastSlash } from \"../helpers\";\n\n// tslint:disable-next-line\nexport const Route = (format: string): MethodDecorator => {\n return ((target: any, methodName: string, descriptor: PropertyDescriptor) => {\n const className = (target.constructor.name as string);\n // remove / from route\n if (format != null && format !== '/') {\n format = removeLastSlash(format);\n }\n RouteHandler.addPattern(format, className, methodName);\n });\n};","import { Shield } from \"../abstracts\";\nimport { RouteHandler } from \"../handlers\";\nimport { GenericShield } from \"../generics\";\n \n// tslint:disable-next-line\nexport const Shields = (shieldsValue: Array): ClassDecorator => {\n return (target: any) => {\n const className = target.name;\n RouteHandler.addShields(shieldsValue as Array, className);\n };\n};","import { InjectorHandler } from \"../handlers\";\nimport { __Constructor } from \"../constant\";\n\n// tslint:disable-next-line\nexport const Singleton = (value): ParameterDecorator => {\n return (target: any, methodName: string, paramIndex: number) => {\n const className: string = target.name || target.constructor.name;\n if (methodName == null || methodName === 'constructor') {\n methodName = __Constructor;\n }\n InjectorHandler.addSingleton(className, methodName, paramIndex, value);\n };\n};","import { HTTP_METHOD } from \"../enums\";\nimport { RouteHandler } from \"../handlers\";\nimport { WorkerInfo } from \"../types\";\n\n// tslint:disable-next-line\nexport const Worker = (allowedMethods?: HTTP_METHOD[]): MethodDecorator => {\n return (target: any, methodName: string, descriptor: PropertyDescriptor) => {\n const className = (target.constructor.name as string);\n const actionInfo: WorkerInfo = {\n workerName: methodName,\n methodsAllowed: allowedMethods == null ? [\n HTTP_METHOD.Delete, HTTP_METHOD.Get, HTTP_METHOD.Post, HTTP_METHOD.Patch, HTTP_METHOD.Put\n ] : allowedMethods,\n guards: [],\n pattern: `/${methodName.toLowerCase()}`,\n values: []\n };\n RouteHandler.addWorker(actionInfo, className);\n };\n};\n","export enum DATA_TYPE {\n String = \"string\",\n Number = \"number\",\n Array = \"array\",\n Object = \"object\",\n Function = \"function\"\n}","export enum ERROR_TYPE {\n InvalidControllerName = \"invalid_controller_name\",\n InvalidContentType = \"invalid_content_type\",\n PortInUse = \"port_in_use\",\n UndefinedViewEngine = \"undefined_view_engine\"\n}","export enum ETag_Type {\n Strong = \"strong\",\n Weak = \"weak\"\n}","export enum HTTP_METHOD {\n Get = \"GET\",\n Post = \"POST\",\n Put = \"PUT\",\n Patch = \"PATCH\",\n Delete = \"DELETE\",\n Options = \"OPTIONS\",\n Head = \"HEAD\"\n}","export enum HTTP_STATUS_CODE {\n BadRequest = 400,\n Unauthorized = 401,\n Forbidden = 403,\n NotFound = 404,\n Ok = 200,\n Created = 201,\n NoContent = 204,\n Redirect = 302,\n NotModified = 304,\n MethodNotAllowed = 405,\n NotAcceptable = 406,\n InternalServerError = 500,\n}","export * from './mime_type';\nexport * from './http_method';\nexport * from './http_status_code';\nexport * from \"./etag_type\";\nexport * from \"./error_type\";","export enum MIME_TYPE {\n Text = \"text/plain\",\n Json = \"application/json\",\n Html = \"text/html\",\n FormUrlEncoded = \"application/x-www-form-urlencoded\",\n Css = \"text/css\",\n Csv = \"text/csv\",\n Js = \"application/javascript\",\n Bmp = \"image/bmp\",\n Jpeg = \"image/jpeg\",\n Gif = \"image/gif\",\n Ico = \"image/x-icon\",\n Png = \"image/png\",\n Pdf = \"application/pdf\",\n Svg = \"image/svg+xml\",\n Rtf = \"application/rtf\",\n Xml = \"application/xml\",\n Xls = \"application/vnd.ms-excel\",\n Xlsx = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\n Ttf = \"font/ttf\",\n Woff = \"font/woff\",\n Woff2 = \"font/woff2\",\n Eot = \"application/vnd.ms-fontobject\",\n Otf = \"font/otf\",\n Swf = \"application/x-shockwave-flash\",\n Avi = \"video/avi\",\n FormMultiPart = \"multipart/form-data\"\n\n}","export * from './mustache_view_engine';\nexport * from \"./memory_session_provider\";","\nimport { SessionProvider } from \"../abstracts/session_provider\";\nimport { SessionValue } from \"../types/session_value\";\n\n\ninterface ISessionValueFormat {\n identifier: string;\n datas: SessionValue[];\n}\n\nconst sessionValues: ISessionValueFormat[] = [];\n\nexport class MemorySessionProvider extends SessionProvider {\n\n async get(key: string) {\n const savedSession = sessionValues.find(q => q.identifier === this.sessionId);\n if (savedSession != null) {\n const session = savedSession.datas.find(qry => qry.key === key);\n return session.value;\n }\n return null;\n }\n\n async isExist(key: string) {\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\n if (savedValue == null) {\n return false;\n }\n else {\n const index = savedValue.datas.findIndex(qry => qry.key === key);\n return index >= 0;\n }\n }\n\n async getAll() {\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\n return savedValue == null ? [] : savedValue.datas;\n }\n\n async set(key: string, val: any) {\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\n if (savedValue == null) {\n this.createSession();\n sessionValues.push({\n identifier: this.sessionId,\n datas: [{\n key: key,\n value: val\n }]\n });\n }\n else {\n const savedSessionData = savedValue.datas.find(q => q.key === key);\n if (savedSessionData == null) {\n savedValue.datas.push({\n key: key,\n value: val\n });\n }\n else {\n savedSessionData.value = val;\n }\n }\n }\n\n setMany(values: SessionValue[]) {\n return Promise.all(\n values.map(async (value) => {\n return await this.set(value.key, value.value);\n })\n );\n }\n\n async remove(key: string) {\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\n if (savedValue != null) {\n const index = savedValue.datas.findIndex(q => q.key === key);\n savedValue.datas.splice(index, 1);\n }\n }\n\n async clear() {\n // remove session values\n const index = sessionValues.findIndex(q => q.identifier === this.sessionId);\n if (index >= 0) {\n sessionValues.splice(index, 1);\n }\n // expire cookie in browser\n this.destroySession();\n }\n}","import * as Mustache from \"mustache\";\nimport { ViewEngineData } from \"../types\";\nimport { getViewFromFile } from \"../helpers\";\nimport { ViewEngine } from \"../abstracts\";\n\nexport class MustacheViewEngine implements ViewEngine {\n\n async render(value: ViewEngineData) {\n const viewData = await getViewFromFile(value.view);\n return Mustache.render(viewData, value.model);\n }\n}","import { Controller } from \"../abstracts\";\n\nexport class GenericController extends Controller {\n constructor(...args) {\n super();\n }\n}","import { Guard } from \"../abstracts\";\nimport { HttpResult } from \"../types\";\n\nexport class GenericGuard extends Guard {\n\n constructor(...args) {\n super();\n }\n\n check(...args): Promise {\n return null;\n }\n}","import { SessionProvider } from \"../abstracts\";\nimport { SessionValue } from \"../types\";\nimport { CookieManager } from \"../models\";\n\n\nexport class GenericSessionProvider extends SessionProvider {\n sessionId: string;\n\n cookie: CookieManager;\n get() {\n return null;\n }\n\n getAll() {\n return null;\n }\n\n set(key, value) {\n return null;\n }\n\n isExist(key) {\n return null;\n }\n\n remove(key) {\n return null;\n }\n\n setMany(values: SessionValue[]): Promise {\n return null;\n }\n\n async clear() {\n\n }\n}","import { Shield } from \"../abstracts\";\nimport { HttpResult } from \"../types\";\n\nexport class GenericShield extends Shield {\n constructor(...args) {\n super();\n }\n \n protect(...args): Promise {\n return null;\n }\n}","import { Wall } from \"../abstracts\";\nimport { HttpResult } from \"../types\";\n\nexport class GenericWall extends Wall {\n constructor(...args) {\n super();\n }\n onIncoming(...args): Promise {\n return null;\n }\n}","import { XmlParser } from \"../abstracts\";\nimport { IException } from \"../interfaces\";\n\nexport class GenericXmlParser implements XmlParser {\n async parse(xml: string): Promise {\n // tslint:disable-next-line\n throw {\n message: \"no xml parser configured\"\n } as IException;\n }\n}","export * from './generic_guard';\nexport * from './generic_shield';\nexport * from './generic_session_provider';\nexport * from \"./generic_wall\";\nexport * from \"./generic_controller\";\nexport * from './generic_xml_parser';","import * as http from \"http\";\nimport { ErrorHandler } from \"./models\";\nimport { ViewEngine, XmlParser } from \"./abstracts\";\nimport { EtagOption, FolderMap } from \"./types\";\nimport { GenericSessionProvider, GenericWall } from \"./generics\";\n\nexport class Global {\n static request: http.IncomingMessage;\n static response: http.ServerResponse;\n static port: number;\n static viewPath: string;\n static shouldParseCookie: boolean;\n static shouldParsePost: boolean;\n static sessionProvider: typeof GenericSessionProvider;\n static sessionTimeOut?: number;\n static viewEngine: ViewEngine;\n static walls: Array = [];\n static errorHandler: typeof ErrorHandler;\n static connectonKeepAliveTimeout?: number;\n\n static appName?: string;\n\n static eTag?: EtagOption;\n\n static folders?: FolderMap[];\n static appSessionIdentifier: string;\n static xmlParser: typeof XmlParser;\n}","\nimport { HttpResult, HttpFormatResult } from \"../types\";\nimport { __SetCookie, __ContentType } from \"../constant\";\nimport { MIME_TYPE, HTTP_STATUS_CODE } from \"../enums\";\nimport { FileHandler } from \"./file_handler\";\nimport * as path from 'path';\nimport { XmlHelper, textResult } from \"../helpers\";\n\nexport class ControllerResultHandler extends FileHandler {\n private controllerResult_: HttpResult;\n\n private getDataBasedOnMimeType_(mimeType: MIME_TYPE) {\n switch (mimeType) {\n case MIME_TYPE.Json:\n case MIME_TYPE.Text:\n case MIME_TYPE.Html:\n if (typeof this.controllerResult_.responseData === 'object') {\n return JSON.stringify(this.controllerResult_.responseData);\n }\n break;\n case MIME_TYPE.Xml:\n if (typeof this.controllerResult_.responseData === 'object') {\n return XmlHelper.fromJsToXml(this.controllerResult_.responseData);\n }\n break;\n }\n return this.controllerResult_.responseData;\n }\n\n private endResponse_(negotiateMimeType: MIME_TYPE) {\n let data;\n try {\n data = this.getDataBasedOnMimeType_(negotiateMimeType);\n }\n catch (ex) {\n this.onErrorOccured(ex);\n return;\n }\n\n this.response.writeHead(this.controllerResult_.statusCode || HTTP_STATUS_CODE.Ok,\n { [__ContentType]: negotiateMimeType });\n this.response.end(data);\n }\n\n private handleRedirectResult_() {\n this.response.setHeader('Location', this.controllerResult_.responseData);\n this.response.writeHead(this.controllerResult_.statusCode || HTTP_STATUS_CODE.Ok,\n { 'Location': this.controllerResult_.responseData });\n this.response.end();\n }\n\n private handleFormatResult_() {\n const negotiateMimeType = this.getContentTypeFromNegotiationHavingMultipleTypes(Object.keys((this.controllerResult_ as HttpFormatResult).responseFormat) as MIME_TYPE[]);\n const key = Object.keys((this.controllerResult_ as HttpFormatResult).responseFormat).find(qry => qry === negotiateMimeType);\n if (key != null) {\n this.controllerResult_.responseData = (this.controllerResult_ as HttpFormatResult).responseFormat[key]();\n this.endResponse_(negotiateMimeType);\n }\n else {\n this.onNotAcceptableRequest();\n }\n }\n\n private handleFileResult_() {\n const result = this.controllerResult_;\n const parsedPath = path.parse(result.file.filePath);\n if (result.file.shouldDownload === true) {\n const fileName = result.file.alias == null ? parsedPath.name : result.file.alias;\n this.response.setHeader(\n \"Content-Disposition\",\n `attachment;filename=${fileName}${parsedPath.ext}`\n );\n }\n this.handleFileRequestFromAbsolutePath(result.file.filePath, parsedPath.ext);\n }\n\n onTerminationFromWall(result: HttpResult | HttpFormatResult) {\n this.handleFinalResult_(result);\n }\n\n private handleFinalResult_(result: HttpResult | HttpFormatResult) {\n result = result || textResult(\"\");\n this.controllerResult_ = result as HttpResult;\n\n ((this.cookieManager as any).responseCookie_ as string[]).forEach(value => {\n this.response.setHeader(__SetCookie, value);\n });\n\n if ((result as HttpResult).shouldRedirect == null || (result as HttpResult).shouldRedirect === false) {\n if ((result as HttpFormatResult).responseFormat == null) {\n if ((result as HttpResult).file == null) {\n const contentType = (result as HttpResult).contentType || MIME_TYPE.Text;\n const negotiateMimeType = this.getContentTypeFromNegotiation(contentType) as MIME_TYPE;\n if (negotiateMimeType != null) {\n this.endResponse_(negotiateMimeType);\n }\n else {\n this.onNotAcceptableRequest();\n }\n }\n else {\n this.handleFileResult_();\n }\n }\n else {\n this.handleFormatResult_();\n }\n }\n else {\n this.handleRedirectResult_();\n }\n }\n\n async onResultFromController(result: HttpResult | HttpFormatResult) {\n try {\n await this.runWallOutgoing();\n } catch (ex) {\n this.onErrorOccured(ex);\n return;\n }\n this.handleFinalResult_(result);\n }\n}","import { HTTP_STATUS_CODE, MIME_TYPE, ETag_Type } from \"../enums\";\nimport { Global } from \"../global\";\nimport * as path from \"path\";\nimport { __ContentType } from \"../constant\";\nimport { RequestHandlerHelper } from \"./request_handler_helper\";\nimport * as Fs from \"fs\";\nimport { getMimeTypeFromExtension, promise } from \"../helpers\";\nimport * as etag from \"etag\";\nimport * as fresh from \"fresh\";\nimport { isNullOrEmpty } from \"../utils\";\n\ntype FileInfo = {\n folder: string,\n file: string;\n};\nexport class FileHandler extends RequestHandlerHelper {\n\n private getFileInfoFromUrl_(urlPath: string) {\n const splittedValue = urlPath.split(\"/\");\n const fileInfo = {\n file: \"\"\n } as FileInfo;\n if (splittedValue.length > 2 || !isNullOrEmpty(path.parse(urlPath).ext)) {\n fileInfo.folder = splittedValue[1];\n fileInfo.file = splittedValue.splice(2).join(\"/\");\n return fileInfo;\n }\n fileInfo.folder = splittedValue[1];\n return fileInfo;\n\n }\n\n private getFileStats_(filePath) {\n return promise((res, rej) => {\n Fs.lstat(filePath, (err, status) => {\n if (err) {\n if (err.code === 'ENOENT') {\n res(null);\n }\n else {\n rej(err);\n }\n }\n else {\n res(status);\n }\n });\n });\n }\n\n protected handleFileRequestFromAbsolutePath(absolutePath: string, fileType: string) {\n this.getFileStats_(absolutePath).then(fileInfo => {\n if (fileInfo != null) {\n if (fileInfo.isDirectory() === true) {\n this.handleFileRequestForPath_(absolutePath);\n }\n else {\n this.sendFile_(absolutePath, fileType, fileInfo);\n }\n }\n else {\n this.onNotFound();\n }\n }).catch(ex => {\n this.onErrorOccured(ex);\n });\n }\n\n private checkForFolderAllowAndReturnPath_(urlPath: string) {\n const fileInfo = this.getFileInfoFromUrl_(urlPath);\n const getAbsPath = function () {\n const folder = Global.folders.find(qry => qry.alias === fileInfo.folder);\n if (folder != null) {\n return path.join(folder.path, fileInfo.file);\n }\n return null;\n };\n let absPath = getAbsPath();\n if (absPath == null) {\n fileInfo.folder = \"/\";\n fileInfo.file = urlPath;\n absPath = getAbsPath();\n }\n return absPath;\n }\n\n protected handleFileRequest(urlPath: string) {\n const extension = path.parse(urlPath).ext;\n const absFilePath = this.checkForFolderAllowAndReturnPath_(urlPath);\n if (absFilePath != null) {\n this.handleFileRequestFromAbsolutePath(absFilePath, extension);\n }\n else {\n this.onNotFound();\n }\n }\n\n /**\n * process folders handling asuuming path is folder.\n * Please check whether the file is folder before calling this function\n *\n * @private\n * @param {string} filePath\n * @param {Fs.Stats} fileInfo\n * @returns\n * @memberof FileHandler\n */\n private handleFileRequestForPath_(absolutePath: string) {\n\n absolutePath = path.join(absolutePath, \"index.html\");\n this.getFileStats_(absolutePath).then(fileInfo => {\n if (fileInfo != null) {\n const fileType = MIME_TYPE.Html;\n this.sendFile_(absolutePath, fileType, fileInfo);\n }\n else {\n this.onNotFound();\n }\n }).catch(ex => {\n this.onErrorOccured(ex);\n });\n }\n\n private isClientHasFreshFile_(lastModified: string, etagValue: string) {\n return fresh(this.request.headers, {\n 'etag': etagValue,\n 'last-modified': lastModified\n });\n }\n\n private sendFile_(filePath: string, fileType: string, fileInfo: Fs.Stats) {\n this.runWallOutgoing().then(() => {\n let mimeType;\n if (fileType[0] === '.') { // its extension\n mimeType = getMimeTypeFromExtension(fileType);\n }\n else { // mime type\n mimeType = fileType;\n }\n const negotiateMimeType = this.getContentTypeFromNegotiation(mimeType) as MIME_TYPE;\n if (negotiateMimeType != null) {\n const lastModified = fileInfo.mtime.toUTCString();\n const eTagValue = etag(fileInfo, {\n weak: Global.eTag.type === ETag_Type.Weak\n });\n if (this.isClientHasFreshFile_(lastModified, eTagValue)) { // client has fresh file\n this.response.statusCode = HTTP_STATUS_CODE.NotModified;\n this.response.end();\n }\n else {\n this.response.writeHead(HTTP_STATUS_CODE.Ok, {\n [__ContentType]: mimeType,\n 'Etag': eTagValue,\n 'Last-Modified': lastModified\n });\n const readStream = Fs.createReadStream(filePath);\n // Handle non-existent file\n readStream.on('error', this.onErrorOccured.bind(this));\n readStream.pipe(this.response);\n }\n }\n else {\n this.onNotAcceptableRequest();\n }\n }).catch(ex => {\n this.onErrorOccured(ex);\n });\n }\n}","export * from \"./route_handler\";\nexport * from \"./request_handler\";\nexport * from \"./file_handler\";\nexport * from \"./request_handler_helper\";\nexport * from \"./controller_result_handler\";\nexport * from \"./post_handler\";\nexport * from './injector_handler';","import { __Constructor } from \"../constant\";\n\ntype InjectorStoreInfo = {\n className: string;\n methods: {\n [methodName: string]: any[]\n }\n};\n// this stores information of injector values that are available per class & worker\nconst injectorStoreInfos: InjectorStoreInfo[] = [];\n// this stores injector values\nconst injectorValues: any[] = [];\n// this stores the singletons name & their respective index in injector values\nconst singletons: {\n [className: string]: number\n} = {};\nexport class InjectorHandler {\n\n static addWorkerValue(className: string, methodName: string, paramIndex, paramValue, shouldFindIndex = true): number {\n\n if (shouldFindIndex === true) {\n const paramValueIndex = injectorValues.indexOf(paramValue);\n if (paramValueIndex < 0) {\n paramValue = injectorValues.push(paramValue) - 1;\n }\n else {\n paramValue = paramValueIndex;\n }\n }\n \n\n const savedValue = injectorStoreInfos.find(x => x.className === className);\n const value: InjectorStoreInfo = {\n className: className,\n methods: {\n [methodName]: []\n }\n };\n if (savedValue == null) {\n value.methods[methodName][paramIndex] = paramValue;\n injectorStoreInfos.push(value);\n }\n else {\n // const savedMethod = savedValue.methods[methodName];\n if (savedValue.methods[methodName] == null) {\n savedValue.methods[methodName] = [];\n }\n savedValue.methods[methodName][paramIndex] = paramValue;\n }\n\n return paramValue;\n }\n\n static getConstructorValues(className: string) {\n return this.getMethodValues(className, __Constructor);\n }\n\n static getMethodValues(className: string, methodName: string) {\n const savedValue = injectorStoreInfos.find(qry => qry.className === className);\n if (savedValue != null) {\n const methodArgs = savedValue.methods[methodName];\n if (methodArgs != null) {\n return methodArgs.map(injectorValueIndex => {\n return injectorValues[injectorValueIndex];\n });\n }\n }\n return [];\n }\n\n static addSingleton(className: string, methodName: string, paramIndex, paramValue) {\n const singletonClassName = paramValue.name;\n if (singletonClassName) {\n if (singletons[singletonClassName] == null) {\n singletons[singletonClassName] = InjectorHandler.addWorkerValue(className, methodName, paramIndex, new paramValue());\n }\n else {\n InjectorHandler.addWorkerValue(className, methodName, paramIndex, singletons[singletonClassName], false);\n }\n }\n }\n}","import { ControllerResultHandler } from \"./controller_result_handler\";\nimport { promise, JsonHelper } from \"../helpers\";\nimport { __ContentType } from \"../constant\";\nimport { MIME_TYPE } from \"../enums\";\nimport * as ContentType from \"content-type\";\nimport * as QueryString from 'querystring';\nimport * as Multiparty from \"multiparty\";\nimport { MultiPartParseResult } from \"../types\";\nimport { FileManager } from \"../models\";\nimport { Global } from \"../global\";\n\n\nexport class PostHandler extends ControllerResultHandler {\n protected body: any;\n protected file: FileManager;\n\n private getPostRawData_(): Promise {\n const body = [];\n return promise((res, rej) => {\n this.request.on('data', (chunk) => {\n body.push(chunk);\n }).on('end', () => {\n const bodyBuffer = Buffer.concat(body);\n res(bodyBuffer.toString());\n }).on(\"error\", function (err) {\n rej(err);\n });\n });\n }\n\n private parseMultiPartData_(): Promise {\n return promise((res, rej) => {\n new Multiparty.Form().parse(this.request, (err, fields, files) => {\n if (err) {\n rej(err);\n }\n else {\n const result: MultiPartParseResult = {\n field: {},\n file: {}\n };\n for (const field in fields) {\n result.field[field] = fields[field].length === 1 ? fields[field][0] : fields[field];\n }\n for (const file in files) {\n result.file[file] = files[file].length === 1 ? files[file][0] : files[file];\n }\n res(result);\n }\n });\n });\n }\n\n protected async parsePostData() {\n\n let postData;\n\n let contentType = this.request.headers[__ContentType] || this.request.headers[\"content-type\"];\n if (contentType != null) {\n contentType = ContentType.parse(contentType as string).type;\n }\n if (contentType === MIME_TYPE.FormMultiPart) {\n const result = await this.parseMultiPartData_();\n postData = result.field;\n this.file = new FileManager(result.file);\n }\n else {\n this.file = new FileManager({});\n const bodyDataAsString = await this.getPostRawData_();\n switch (contentType) {\n case MIME_TYPE.Json:\n postData = JsonHelper.parse(bodyDataAsString);\n break;\n case MIME_TYPE.Text:\n case MIME_TYPE.Html:\n postData = bodyDataAsString; break;\n case MIME_TYPE.FormUrlEncoded:\n postData = QueryString.parse(bodyDataAsString); break;\n case MIME_TYPE.Xml:\n postData = new (Global as any).xmlParser().parse(bodyDataAsString);\n break;\n default:\n postData = {};\n }\n }\n\n return postData;\n\n }\n}","import * as http from \"http\";\nimport * as url from 'url';\nimport { Controller } from \"../abstracts\";\nimport { __ContentType, __AppName, __Cookie, __SetCookie } from \"../constant\";\nimport { Global } from \"../global\";\nimport { parseCookie, parseAndMatchRoute, promise } from \"../helpers\";\nimport { CookieManager, FileManager } from \"../models\";\nimport { GenericSessionProvider, GenericGuard } from \"../generics\";\nimport { RouteMatch, HttpRequest, HttpResponse } from \"../types\";\nimport { HTTP_METHOD } from \"../enums\";\nimport { PostHandler } from \"./post_handler\";\nimport { InjectorHandler } from \"./injector_handler\";\n\n\nexport class RequestHandler extends PostHandler {\n\n private session_: GenericSessionProvider;\n private query_: any;\n private data_ = {};\n private routeMatchInfo_: RouteMatch;\n\n\n constructor(request: http.IncomingMessage, response: http.ServerResponse) {\n super();\n this.request = request;\n this.response = response;\n this.registerEvents_();\n }\n\n private registerEvents_() {\n this.request.on('error', this.onBadRequest.bind(this));\n this.response.on('error', this.onErrorOccured.bind(this));\n }\n\n private executeWallIncoming_(): Promise {\n return promise((res) => {\n let index = 0;\n const wallLength = Global.walls.length;\n const executeWallIncomingByIndex = async () => {\n if (wallLength > index) {\n const wall = Global.walls[index++];\n const constructorArgsValues = InjectorHandler.getConstructorValues(wall.name);\n const wallObj = new wall(...constructorArgsValues);\n wallObj.cookie = this.cookieManager;\n wallObj.session = this.session_;\n wallObj.request = this.request as HttpRequest;\n wallObj.response = this.response as HttpResponse;\n wallObj.data = this.data_;\n wallObj.query = this.query_;\n this.wallInstances.push(wallObj);\n const methodArgsValues = InjectorHandler.getMethodValues(wall.name, 'onIncoming');\n try {\n const result = await wallObj.onIncoming(...methodArgsValues);\n if (result == null) {\n executeWallIncomingByIndex();\n }\n else {\n res(false);\n this.onTerminationFromWall(result);\n }\n } catch (ex) {\n this.onErrorOccured(ex);\n res(false);\n }\n }\n else {\n res(true);\n }\n };\n executeWallIncomingByIndex();\n });\n }\n\n private runController_() {\n const constructorValues = InjectorHandler.getConstructorValues(this.routeMatchInfo_.controller.name);\n const controllerObj: Controller = new this.routeMatchInfo_.controller(...constructorValues);\n controllerObj.request = this.request as HttpRequest;\n controllerObj.response = this.response;\n controllerObj.query = this.query_;\n controllerObj.body = this.body;\n controllerObj.session = this.session_;\n controllerObj.cookie = this.cookieManager;\n controllerObj.param = this.routeMatchInfo_.params;\n controllerObj.data = this.data_;\n controllerObj.file = this.file;\n const methodArgsValues = InjectorHandler.getMethodValues(this.routeMatchInfo_.controller.name, this.routeMatchInfo_.workerInfo.workerName);\n controllerObj[this.routeMatchInfo_.workerInfo.workerName](...methodArgsValues).then(\n this.onResultFromController.bind(this)\n ).catch(this.onErrorOccured.bind(this));\n }\n\n private executeShieldsProtection_(): Promise {\n return promise((res) => {\n let index = 0;\n const shieldLength = this.routeMatchInfo_.shields.length;\n const executeShieldByIndex = async () => {\n if (shieldLength > index) {\n const shield = this.routeMatchInfo_.shields[index++];\n const constructorArgsValues = InjectorHandler.getConstructorValues(shield.name);\n const shieldObj = new shield(...constructorArgsValues);\n shieldObj.cookie = this.cookieManager;\n shieldObj.query = this.query_;\n shieldObj.session = this.session_;\n shieldObj.request = this.request as HttpRequest;\n shieldObj.response = this.response as HttpResponse;\n shieldObj.data = this.data_;\n shieldObj.workerName = this.routeMatchInfo_.workerInfo.workerName;\n const methodArgsValues = InjectorHandler.getMethodValues(shield.name, 'protect');\n\n try {\n const result = await shieldObj.protect(...methodArgsValues);\n if (result == null) {\n executeShieldByIndex();\n }\n else {\n res(false);\n this.onResultFromController(result);\n }\n } catch (ex) {\n this.onErrorOccured(ex);\n res(false);\n }\n }\n else {\n res(true);\n }\n };\n executeShieldByIndex();\n });\n }\n\n private executeGuardsCheck_(guards: Array): Promise {\n return promise((res) => {\n let index = 0;\n const shieldLength = guards.length;\n const executeGuardByIndex = async () => {\n if (shieldLength > index) {\n const guard = guards[index++];\n const constructorArgsValues = InjectorHandler.getConstructorValues(guard.name);\n const guardObj = new guard(...constructorArgsValues);\n guardObj.body = this.body;\n guardObj.cookie = this.cookieManager;\n guardObj.query = this.query_;\n guardObj.session = this.session_;\n guardObj.request = this.request as HttpRequest;\n guardObj.response = this.response as HttpResponse;\n guardObj.data = this.data_;\n guardObj.file = this.file;\n guardObj.param = this.routeMatchInfo_.params;\n const methodArgsValues = InjectorHandler.getMethodValues(guard.name, 'check');\n try {\n const result = await guardObj.check(...methodArgsValues);\n if (result == null) {\n executeGuardByIndex();\n }\n else {\n res(false);\n this.onResultFromController(result);\n }\n } catch (ex) {\n this.onErrorOccured(ex);\n res(false);\n }\n }\n else {\n res(true);\n }\n };\n executeGuardByIndex();\n });\n }\n\n private parseCookieFromRequest_() {\n if (Global.shouldParseCookie === true) {\n const rawCookie = (this.request.headers[__Cookie] || this.request.headers[\"cookie\"]) as string;\n let parsedCookies;\n try {\n parsedCookies = parseCookie(rawCookie);\n } catch (ex) {\n this.onErrorOccured(ex);\n return false;\n }\n this.session_ = new Global.sessionProvider();\n this.session_.cookie = this.cookieManager = new CookieManager(parsedCookies);\n this.session_.sessionId = parsedCookies[Global.appSessionIdentifier];\n }\n else {\n this.cookieManager = new CookieManager({});\n }\n return true;\n }\n\n private setPreHeader_() {\n this.response.setHeader('X-Powered-By', Global.appName);\n this.response.setHeader('Vary', 'Accept-Encoding');\n this.response.sendDate = true;\n }\n\n private async onRouteMatched_() {\n const actionInfo = this.routeMatchInfo_.workerInfo;\n if (actionInfo == null) {\n if (this.request.method === HTTP_METHOD.Options) {\n this.onRequestOptions(this.routeMatchInfo_.allowedHttpMethod);\n }\n else {\n this.onMethodNotAllowed(this.routeMatchInfo_.allowedHttpMethod);\n }\n }\n else {\n let shouldExecuteNextComponent = await this.executeShieldsProtection_();\n if (shouldExecuteNextComponent === true) {\n shouldExecuteNextComponent = await this.handlePostData();\n if (shouldExecuteNextComponent === true) {\n shouldExecuteNextComponent = await this.executeGuardsCheck_(actionInfo.guards);\n if (shouldExecuteNextComponent === true) {\n this.runController_();\n }\n }\n }\n }\n }\n\n private async execute_() {\n const urlDetail = url.parse(this.request.url, true);\n this.query_ = urlDetail.query;\n let shouldExecuteNextProcess = this.parseCookieFromRequest_();\n if (shouldExecuteNextProcess === true) {\n shouldExecuteNextProcess = await this.executeWallIncoming_();\n if (shouldExecuteNextProcess === true) {\n const pathUrl = urlDetail.pathname;\n const requestMethod = this.request.method as HTTP_METHOD;\n try {\n this.routeMatchInfo_ = parseAndMatchRoute(pathUrl.toLowerCase(), requestMethod);\n }\n catch (ex) {\n this.onErrorOccured(ex);\n return;\n }\n if (this.routeMatchInfo_ == null) { // no route matched\n // it may be a file or folder then\n this.handleFileRequest(pathUrl);\n }\n else {\n this.onRouteMatched_();\n }\n }\n }\n }\n\n async handlePostData() {\n if (this.request.method === HTTP_METHOD.Get) {\n this.body = {};\n this.file = new FileManager({});\n }\n else if (Global.shouldParsePost === true) {\n try {\n this.body = await this.parsePostData();\n } catch (ex) {\n this.onBadRequest(ex);\n return false;\n }\n }\n return true;\n }\n\n async handle() {\n this.setPreHeader_();\n this.execute_();\n }\n}","import { HTTP_STATUS_CODE, MIME_TYPE, HTTP_METHOD } from \"../enums\";\nimport * as http from \"http\";\nimport { __ContentType } from \"../constant\";\nimport { Global } from \"../global\";\nimport * as Negotiator from \"negotiator\";\nimport { CookieManager } from \"../models\";\nimport { Wall } from \"../abstracts\";\nimport { IException } from \"../interfaces\";\nimport { JsonHelper, reverseLoop } from \"../helpers\";\nimport { isNull } from \"../utils\";\nimport { InjectorHandler } from \"./injector_handler\";\n\n\nexport class RequestHandlerHelper {\n protected cookieManager: CookieManager;\n protected response: http.ServerResponse;\n protected request: http.IncomingMessage;\n\n protected wallInstances: Wall[] = [];\n\n protected runWallOutgoing() {\n const outgoingResults: Array> = [];\n reverseLoop(this.wallInstances, (value: Wall) => {\n const methodArgsValues = InjectorHandler.getMethodValues(value.constructor.name, 'onOutgoing');\n outgoingResults.push(value.onOutgoing(methodArgsValues));\n });\n return Promise.all(outgoingResults);\n }\n\n protected getContentTypeFromNegotiation(type: MIME_TYPE) {\n const negotiator = new Negotiator(this.request);\n let availableTypes: MIME_TYPE[] = this.getAvailableTypes_(type);\n if (availableTypes == null) {\n availableTypes = [type];\n }\n return negotiator.mediaType(availableTypes) as MIME_TYPE;\n }\n\n protected getContentTypeFromNegotiationHavingMultipleTypes(types: MIME_TYPE[]) {\n const negotiator = new Negotiator(this.request);\n return negotiator.mediaType(types) as MIME_TYPE;\n }\n\n private getAvailableTypes_(type: MIME_TYPE) {\n switch (type) {\n case MIME_TYPE.Json:\n case MIME_TYPE.Xml:\n return [MIME_TYPE.Json, MIME_TYPE.Xml];\n case MIME_TYPE.Html:\n case MIME_TYPE.Css:\n case MIME_TYPE.Csv:\n case MIME_TYPE.Js:\n case MIME_TYPE.Rtf:\n case MIME_TYPE.Text:\n return [MIME_TYPE.Text, MIME_TYPE.Html, MIME_TYPE.Js,\n MIME_TYPE.Css, MIME_TYPE.Rtf, MIME_TYPE.Csv];\n }\n return null;\n }\n\n protected async onBadRequest(error) {\n let errMessage;\n try {\n await this.runWallOutgoing();\n errMessage = await new Global.errorHandler().onBadRequest(error);\n }\n catch (ex) {\n return this.onErrorOccured(ex);\n }\n this.response.writeHead(HTTP_STATUS_CODE.BadRequest, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(errMessage);\n }\n\n protected async onForbiddenRequest() {\n let errMessage;\n try {\n await this.runWallOutgoing();\n errMessage = await new Global.errorHandler().onForbiddenRequest();\n }\n catch (ex) {\n return this.onErrorOccured(ex);\n }\n this.response.writeHead(HTTP_STATUS_CODE.Forbidden, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(errMessage);\n }\n\n protected async onNotAcceptableRequest() {\n let errMessage;\n try {\n await this.runWallOutgoing();\n errMessage = await new Global.errorHandler().onNotAcceptableRequest();\n }\n catch (ex) {\n return this.onErrorOccured(ex);\n }\n this.response.writeHead(HTTP_STATUS_CODE.NotAcceptable, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(errMessage);\n }\n\n protected async onNotFound() {\n let errMessage;\n try {\n await this.runWallOutgoing();\n errMessage = await new Global.errorHandler().onNotFound(this.request.url);\n }\n catch (ex) {\n return this.onErrorOccured(ex);\n }\n this.response.writeHead(HTTP_STATUS_CODE.NotFound, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(errMessage);\n }\n\n protected async onMethodNotAllowed(allowedMethods: HTTP_METHOD[]) {\n let errMessage;\n try {\n await this.runWallOutgoing();\n errMessage = await new Global.errorHandler().onMethodNotAllowed();\n }\n catch (ex) {\n return this.onErrorOccured(ex);\n }\n this.response.setHeader(\"Allow\", allowedMethods.join(\",\"));\n this.response.writeHead(HTTP_STATUS_CODE.MethodNotAllowed, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(errMessage);\n }\n\n protected async onErrorOccured(error) {\n if (typeof error === 'string') {\n error = {\n message: error\n } as IException;\n }\n let errMessage;\n try {\n await this.runWallOutgoing();\n errMessage = await new Global.errorHandler().onServerError(error);\n }\n catch (ex) {\n this.response.writeHead(HTTP_STATUS_CODE.InternalServerError, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(JsonHelper.stringify(ex));\n return;\n }\n this.response.writeHead(HTTP_STATUS_CODE.InternalServerError, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(errMessage);\n }\n\n protected async onRequestOptions(allowedMethods: HTTP_METHOD[]) {\n try {\n await this.runWallOutgoing();\n }\n catch (ex) {\n return this.onErrorOccured(ex);\n }\n this.response.setHeader(\"Allow\", allowedMethods.join(\",\"));\n this.response.writeHead(HTTP_STATUS_CODE.Ok, { [__ContentType]: MIME_TYPE.Html });\n this.response.end(\"\");\n }\n}","import { RouteInfo, WorkerInfo, ParentRoute } from \"../types\";\nimport { GenericShield, GenericGuard } from \"../generics\";\nimport { isNull } from \"../utils\";\n\nconst routerCollection: RouteInfo[] = [];\n\nconst getActionPattern = (parentRoute: ParentRoute, pattern: string) => {\n return (isNull(parentRoute.path) || parentRoute.path === \"*\") ? pattern : `/${parentRoute.path}${pattern}`;\n};\n\nexport class RouteHandler {\n\n static get routerCollection() {\n return routerCollection;\n }\n\n static addToRouterCollection(value: ParentRoute) {\n const route = routerCollection.find(x => x.controllerName === value.controller.name);\n if (route == null) {\n routerCollection.push({\n workers: [],\n controller: value.controller as any,\n controllerName: value.controller.name,\n path: value.path,\n shields: [],\n values: []\n });\n }\n else {\n route.controller = value.controller as any;\n route.path = value.path;\n // change pattern value since we have controller name now.\n route.workers.forEach(actionInfo => {\n actionInfo.pattern = getActionPattern(value, actionInfo.pattern);\n });\n }\n } \n\n static addShields(shields: Array, className: string) {\n const index = routerCollection.findIndex(x => x.controllerName === className);\n if (index < 0) {\n routerCollection.push({\n workers: [],\n controller: null,\n controllerName: className,\n shields: shields,\n path: null,\n values: []\n });\n }\n else {\n routerCollection[index].shields = shields;\n }\n }\n\n static addWorker(newAction: WorkerInfo, className: string) {\n const router = routerCollection.find(x => x.controllerName === className);\n if (router == null) {\n routerCollection.push({\n workers: [newAction],\n controller: null,\n controllerName: className,\n shields: [],\n path: null,\n values: []\n });\n }\n else {\n const savedAction = router.workers.find(val => val.workerName === newAction.workerName);\n if (savedAction == null) {\n newAction.pattern = getActionPattern(router, newAction.pattern);\n router.workers.push(newAction);\n }\n else {\n savedAction.methodsAllowed = newAction.methodsAllowed;\n savedAction.pattern = router.path == null ? savedAction.pattern : `/${router.path}${savedAction.pattern}`;\n }\n }\n }\n\n static addGuards(guards: Array, className: string, actionName: string) {\n const index = routerCollection.findIndex(x => x.controllerName === className);\n const pattern = actionName.toLowerCase();\n if (index < 0) {\n routerCollection.push({\n workers: [{\n workerName: actionName,\n guards: guards,\n methodsAllowed: null,\n pattern: pattern,\n values: []\n }],\n controller: null,\n controllerName: className,\n shields: [],\n path: null,\n values: []\n });\n }\n else {\n const savedAction = routerCollection[index].workers.find(val => val.workerName === actionName);\n if (savedAction == null) {\n routerCollection[index].workers.push({\n workerName: actionName,\n guards: guards,\n methodsAllowed: null,\n pattern: pattern,\n values: []\n });\n }\n else {\n savedAction.guards = guards;\n }\n }\n }\n\n static addPattern(pattern: string, className: string, actionName: string) {\n const router = routerCollection.find(x => x.controllerName === className);\n if (router == null) {\n routerCollection.push({\n workers: [{\n workerName: actionName,\n guards: [],\n methodsAllowed: null,\n pattern: pattern,\n values: []\n }],\n controller: null,\n controllerName: className,\n shields: [],\n path: null,\n values: []\n });\n }\n else {\n const savedAction = router.workers.find(val => val.workerName === actionName);\n pattern = getActionPattern(router, pattern);\n if (savedAction == null) {\n router.workers.push({\n workerName: actionName,\n guards: [],\n methodsAllowed: null,\n pattern: pattern,\n values: []\n });\n }\n else {\n savedAction.pattern = pattern;\n }\n }\n }\n}","\nimport { MIME_TYPE } from \"../enums\";\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\nimport { HttpResult } from \"../types/http_result\";\n\nexport const downloadResult = (filePath: string, downloadFileName?: string) => {\n return {\n statusCode: HTTP_STATUS_CODE.Ok,\n file: {\n filePath: filePath,\n shouldDownload: true,\n alias: downloadFileName\n }\n } as HttpResult;\n};","\nimport { MIME_TYPE } from \"../enums\";\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\nimport { HttpResult } from \"../types/http_result\";\n\nexport const fileResult = (filePath: string) => {\n return {\n statusCode: HTTP_STATUS_CODE.Ok,\n file: {\n filePath: filePath\n }\n } as HttpResult;\n};","import { DATA_TYPE } from \"../enums/data_type\";\n\nexport const getDataType = (value) => {\n const type = typeof value;\n switch (type) {\n case 'object':\n if (Array.isArray(value)) {\n return DATA_TYPE.Array;\n }\n default:\n return type;\n }\n};","import { MIME_TYPE } from \"../enums\";\n\nexport const getMimeTypeFromExtension = (ext: string): MIME_TYPE => {\n switch (ext) {\n case \".htm\":\n case \".html\":\n return MIME_TYPE.Html;\n case \".css\":\n return MIME_TYPE.Css;\n case \".js\":\n return MIME_TYPE.Js;\n case \".png\":\n return MIME_TYPE.Png;\n case \".woff\":\n return MIME_TYPE.Woff;\n case \".woff2\":\n return MIME_TYPE.Woff2;\n case \".json\":\n return MIME_TYPE.Json;\n case \".txt\":\n return MIME_TYPE.Text;\n case \".jpg\":\n case \".jpeg\":\n return MIME_TYPE.Jpeg;\n case \".rtf\":\n return MIME_TYPE.Rtf;\n case \".ttf\":\n return MIME_TYPE.Ttf;\n case \".eot\":\n return MIME_TYPE.Eot;\n case '.otf':\n return MIME_TYPE.Otf;\n case \".swf\":\n return MIME_TYPE.Swf;\n case \".avi\":\n return MIME_TYPE.Avi;\n case \".Svg\":\n return MIME_TYPE.Svg;\n case \".pdf\":\n return MIME_TYPE.Pdf;\n case \".xml\":\n return MIME_TYPE.Xml;\n case \".csv\":\n return MIME_TYPE.Csv;\n case \".xls\":\n return MIME_TYPE.Xls;\n case \".xlsx\":\n return MIME_TYPE.Xlsx;\n case \".bmp\":\n return MIME_TYPE.Bmp;\n case \".gif\":\n return MIME_TYPE.Gif;\n default:\n return \"application/octet-stream\" as MIME_TYPE;\n }\n};","import { readFile } from \"fs-extra\";\nimport { isEnvProduction } from \"./is_env_production\";\nimport * as path from \"path\";\nimport { Global } from \"../global\";\nimport { __CurrentPath } from \"../constant\";\n\nconst viewCache = {\n\n};\nexport const getViewFromFile = async function (fileLocation: string): Promise {\n const readView = function () {\n const pathOfView = path.join(__CurrentPath, `${Global.viewPath}/${fileLocation}`);\n return readFile(pathOfView, {\n encoding: 'utf8'\n });\n };\n\n if (isEnvProduction()) {\n if (viewCache[fileLocation] == null) {\n viewCache[fileLocation] = await readView();\n }\n return viewCache[fileLocation];\n\n }\n return await readView();\n};","import { MIME_TYPE } from \"../enums\";\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\nimport { HttpResult } from \"../types/http_result\";\n\nexport const htmlResult = (html: string, statusCode?: HTTP_STATUS_CODE) => {\n return {\n contentType: MIME_TYPE.Html,\n responseData: html,\n statusCode: statusCode || HTTP_STATUS_CODE.Ok\n } as HttpResult;\n};","export * from './json_result';\nexport * from './text_result';\nexport * from './html_result';\nexport * from './render_view';\nexport * from './download_result';\nexport * from './file_result';\nexport * from './redirect_result';\nexport * from './view_result';\nexport * from './get_view_from_file';\nexport * from \"./promise\";\nexport * from './log_helper';\nexport * from './xml_helper';\nexport * from \"./get_mime_type_from_extension\";\nexport * from \"./parse_match_route\";\nexport * from \"./parse_cookie\";\nexport * from './json_helper';\nexport * from './remove_last_slash';\nexport * from './remove_first_slash';\nexport * from './reverse_loop';","export const isEnvDev = () => {\n return process.env.NODE_ENV === 'development';\n};","export const isEnvProduction = () => {\n return process.env.NODE_ENV === \"production\";\n};","import { IException } from \"../interfaces\";\n\nexport class JsonHelper {\n static parse(value: string) {\n try {\n return JSON.parse(value);\n }\n catch (ex) {\n // tslint:disable-next-line\n throw {\n message: \"Post data is invalid\"\n } as IException;\n }\n }\n\n static stringify(value) {\n return JSON.stringify(value);\n }\n}","\nimport { MIME_TYPE } from \"../enums\";\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\nimport { HttpResult } from \"../types/http_result\";\n\nexport const jsonResult = (value: any, statusCode?: HTTP_STATUS_CODE) => {\n return {\n contentType: MIME_TYPE.Json,\n responseData: value,\n statusCode: statusCode || HTTP_STATUS_CODE.Ok\n } as HttpResult;\n};","import { IError } from \"../interfaces/error\";\nimport { ERROR_TYPE } from \"../enums/error_type\";\n\nexport class LogHelper implements IError {\n type: ERROR_TYPE;\n message: string;\n private info_: any;\n\n constructor(type: ERROR_TYPE, info?: any) {\n this.type = type;\n this.info_ = info;\n this.message = this.getMsg_();\n }\n\n throw() {\n const errMsg = this.get();\n throw JSON.stringify(errMsg);\n }\n\n static log(msg) {\n console.log(msg);\n }\n\n logError() {\n console.error(this.get());\n }\n\n logWarning() {\n console.warn(this.get());\n }\n\n get() {\n return {\n message: this.message,\n type: this.type\n } as IError;\n }\n\n private getMsg_() {\n let errMsg: string;\n switch (this.type) {\n case ERROR_TYPE.InvalidControllerName:\n errMsg = `Invalid controller name - '${this.info_}'. Controller name must contain 'controller'.`;\n break;\n case ERROR_TYPE.InvalidContentType:\n errMsg = `Content type - '${this.info_}' is not valid. Please create an issue if you think this is valid type.`;\n break;\n case ERROR_TYPE.PortInUse:\n errMsg = `Port ${this.info_} is being used by another process.`;\n break;\n case ERROR_TYPE.UndefinedViewEngine:\n errMsg = `View engine is not initiated.Initiate the view engine where fort is created.`;\n break;\n default:\n errMsg = this.message;\n break;\n }\n return errMsg;\n }\n}","import { isNullOrEmpty } from \"../utils\";\n\n \n\n\nexport const parseCookie = (cookie: string): { [key: string]: string } => {\n const value = {};\n if (!isNullOrEmpty(cookie)) {\n cookie.split(';').forEach((val) => {\n const parts = val.split('=');\n value[parts.shift().trim()] = decodeURI(parts.join('='));\n });\n }\n return value;\n};","import { RouteHandler } from \"../handlers/route_handler\";\nimport { RouteMatch } from \"../types/route_match\";\nimport { HTTP_METHOD } from \"../enums\";\nimport { removeLastSlash } from \".\";\nimport { RouteInfo } from \"../types\";\n\nconst checkRouteInWorkerForDefaultRoute = (route: RouteInfo, httpMethod: HTTP_METHOD, urlParts: string[]) => {\n\n const matchedRoute: RouteMatch = {\n allowedHttpMethod: []\n } as RouteMatch;\n matchedRoute.controller = route.controller;\n const urlPartLength = urlParts.length;\n\n const regex1 = /{(.*)}(?!.)/;\n const regex2 = /{(.*)}\\.(\\w+)(?!.)/;\n route.workers.every(routeActionInfo => {\n const patternSplit = routeActionInfo.pattern.split(\"/\");\n if (urlPartLength === patternSplit.length) {\n let isMatched = true;\n const params = {};\n urlParts.every((urlPart, i) => {\n const regMatch1 = patternSplit[i].match(regex1);\n const regMatch2 = patternSplit[i].match(regex2);\n if (regMatch1 != null) {\n params[regMatch1[1]] = urlPart;\n }\n else if (regMatch2 != null) {\n const splitByDot = urlPart.split(\".\");\n if (splitByDot[1] === regMatch2[2]) {\n params[regMatch2[1]] = splitByDot[0];\n }\n else {\n isMatched = false;\n return false;\n }\n }\n else if (urlPart !== patternSplit[i]) {\n isMatched = false;\n return false;\n }\n return true;\n });\n if (isMatched === true) {\n if (routeActionInfo.methodsAllowed.indexOf(httpMethod) >= 0) {\n matchedRoute.workerInfo = routeActionInfo;\n matchedRoute.params = params;\n matchedRoute.shields = route.shields;\n return false;\n }\n else {\n matchedRoute.allowedHttpMethod = [...matchedRoute.allowedHttpMethod, ...routeActionInfo.methodsAllowed];\n }\n }\n }\n return true;\n });\n if (matchedRoute.workerInfo == null && matchedRoute.allowedHttpMethod.length === 0) {\n return null;\n }\n return matchedRoute;\n\n};\n\n\nconst checkRouteInWorker = (route: RouteInfo, httpMethod: HTTP_METHOD, urlParts: string[]) => {\n const matchedRoute: RouteMatch = {\n allowedHttpMethod: []\n } as RouteMatch;\n matchedRoute.controller = route.controller;\n const urlPartLength = urlParts.length;\n if (urlPartLength === 2) { // url does not have action path\n const pattern = `/${route.path}/`;\n route.workers.every(action => {\n if (action.pattern === pattern) {\n if (action.methodsAllowed.indexOf(httpMethod) >= 0) {\n matchedRoute.workerInfo = action;\n matchedRoute.params = {};\n matchedRoute.shields = route.shields;\n return false;\n }\n else {\n matchedRoute.allowedHttpMethod = [...matchedRoute.allowedHttpMethod, ...action.methodsAllowed];\n }\n }\n return true;\n });\n }\n else {\n const regex1 = /{(.*)}(?!.)/;\n const regex2 = /{(.*)}\\.(\\w+)(?!.)/;\n route.workers.every(routeActionInfo => {\n const patternSplit = routeActionInfo.pattern.split(\"/\");\n if (urlPartLength === patternSplit.length) {\n let isMatched = true;\n const params = {};\n urlParts.every((urlPart, i) => {\n const regMatch1 = patternSplit[i].match(regex1);\n const regMatch2 = patternSplit[i].match(regex2);\n if (regMatch1 != null) {\n params[regMatch1[1]] = urlPart;\n }\n else if (regMatch2 != null) {\n const splitByDot = urlPart.split(\".\");\n if (splitByDot[1] === regMatch2[2]) {\n params[regMatch2[1]] = splitByDot[0];\n }\n else {\n isMatched = false;\n return false;\n }\n }\n else if (urlPart !== patternSplit[i]) {\n isMatched = false;\n return false;\n }\n return true;\n });\n if (isMatched === true) {\n if (routeActionInfo.methodsAllowed.indexOf(httpMethod) >= 0) {\n matchedRoute.workerInfo = routeActionInfo;\n matchedRoute.params = params;\n matchedRoute.shields = route.shields;\n return false;\n }\n else {\n matchedRoute.allowedHttpMethod = [...matchedRoute.allowedHttpMethod, ...routeActionInfo.methodsAllowed];\n }\n }\n }\n return true;\n });\n }\n if (matchedRoute.workerInfo == null && matchedRoute.allowedHttpMethod.length === 0) {\n return null;\n }\n return matchedRoute;\n\n};\n\nexport const parseAndMatchRoute = (url: string, httpMethod: HTTP_METHOD) => {\n if (url !== \"/\") {\n url = removeLastSlash(url);\n }\n\n const urlParts = url.split(\"/\");\n const firstPart = urlParts[1];\n let route = RouteHandler.routerCollection.find(qry => qry.path === firstPart);\n\n if (route == null) {\n route = RouteHandler.routerCollection.find(qry => qry.path === \"*\");\n return checkRouteInWorkerForDefaultRoute(route, httpMethod, urlParts);\n }\n else {\n return checkRouteInWorker(route, httpMethod, urlParts);\n }\n};","export const promise = (callBack: (resolve, reject) => void) => {\n return new Promise(callBack);\n};","import { MIME_TYPE } from \"../enums\";\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\nimport { HttpResult } from \"../types/http_result\";\n\nexport const redirectResult = (url: string) => {\n return {\n contentType: MIME_TYPE.Text,\n responseData: url,\n statusCode: HTTP_STATUS_CODE.Redirect,\n shouldRedirect: true\n } as HttpResult;\n};","export const removeFirstSlash = function (value: string) {\n // remove / from string at 0th index\n if (value[0] === \"/\") {\n return value.substr(1);\n }\n return value;\n};","export const removeLastSlash = (url: string) => {\n const urlLength = url.length;\n // removing / from url;\n if (url[urlLength - 1] === \"/\") {\n return url.substr(0, urlLength - 1);\n }\n return url;\n};","import { Global } from \"../global\";\nimport { isEnvDev } from \"./is_env_dev\";\nimport { LogHelper } from \"./log_helper\";\nimport { ERROR_TYPE } from \"../enums/error_type\";\n\nexport const renderView = (viewName: string, model?: any) => {\n if (isEnvDev()) {\n if (Global.viewEngine == null) {\n new LogHelper(ERROR_TYPE.UndefinedViewEngine).throw();\n }\n }\n return Global.viewEngine.render({\n view: viewName,\n model: model\n });\n};","export const reverseLoop = function (values: any[], cb: (value, index: number) => void) {\n for (let length = values.length, i = length - 1; i >= 0; i--) {\n cb(values[i], i);\n }\n};","import { MIME_TYPE } from \"../enums\";\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\nimport { HttpResult } from \"../types/http_result\";\n\nexport const textResult = (text: string, statusCode?: HTTP_STATUS_CODE) => {\n return {\n contentType: MIME_TYPE.Text,\n responseData: text,\n statusCode: statusCode || HTTP_STATUS_CODE.Ok\n } as HttpResult;\n};","import { renderView } from \"./render_view\";\nimport { HttpResult } from \"../types\";\nimport { MIME_TYPE, HTTP_STATUS_CODE } from \"../enums\";\n\n\nexport const viewResult = async (viewName: string, model?: any) => {\n const viewData = await renderView(viewName, model);\n return {\n contentType: MIME_TYPE.Html,\n responseData: viewData,\n statusCode: HTTP_STATUS_CODE.Ok\n } as HttpResult;\n};","import { getDataType } from \"./get_data_type\";\nimport { DATA_TYPE } from \"../enums/data_type\";\nimport * as jsontoxml from \"jsontoxml\";\n\nexport class XmlHelper {\n\n static fromJsToXml(value) {\n const addKeyToObjectIfNeeded = (key: string, obj) => {\n const type = getDataType(obj);\n if (type === DATA_TYPE.Object) {\n const keys = Object.keys(obj);\n if (keys.length !== 1) {\n obj = {\n [key]: obj\n };\n }\n }\n return obj;\n };\n const dataType = getDataType(value);\n switch (dataType) {\n case DATA_TYPE.Array:\n (value as []).forEach((val, index) => {\n value[index] = addKeyToObjectIfNeeded(\"item\", val);\n });\n value = {\n root: value\n };\n break;\n case DATA_TYPE.Object:\n value = addKeyToObjectIfNeeded(\"root\", value);\n\n }\n return jsontoxml(value, {\n xmlHeader: true\n });\n }\n}","export * from './models';\nexport * from './abstracts';\nexport * from './decorators';\nexport * from './enums';\nexport * from './helpers';\nexport * from './types';\nexport * from './extra';","import { HttpCookie } from \"./http_cookie\";\nimport { IHttpCookie } from \"../interfaces\";\n\nexport class CookieManager {\n private responseCookie_: string[] = [];\n private cookieCollection_: { [key: string]: string };\n\n constructor(parsedValue: { [key: string]: string }) {\n this.cookieCollection_ = parsedValue;\n }\n\n /**\n * return cookie by name\n *\n * @param {string} name\n * @returns\n * @memberof CookieManager\n */\n getCookie(name: string): HttpCookie {\n return {\n name: name,\n value: this.cookieCollection_[name]\n } as IHttpCookie;\n }\n\n /**\n * add cookie\n *\n * @param {HttpCookie} cookie\n * @memberof CookieManager\n */\n addCookie(cookie: HttpCookie) {\n this.cookieCollection_[cookie.name] = cookie.value;\n this.responseCookie_.push(this.getCookieStringFromCookie_(cookie));\n }\n\n /**\n * remove cookie\n *\n * @param {HttpCookie} cookie\n * @memberof CookieManager\n */\n removeCookie(cookie: HttpCookie) {\n this.cookieCollection_[cookie.name] = null;\n cookie.expires = new Date('Thu, 01 Jan 1970 00:00:00 GMT');\n cookie.maxAge = -1;\n this.responseCookie_.push(this.getCookieStringFromCookie_(cookie));\n }\n\n /**\n * collection of http cookie\n *\n * @readonly\n * @memberof CookieManager\n */\n get cookieCollection() {\n return this.cookieCollection_;\n }\n\n /**\n * determine whether value exist or not\n *\n * @param {string} name\n * @returns\n * @memberof CookieManager\n */\n isExist(name: string) {\n return this.cookieCollection_[name] != null;\n }\n\n private getCookieStringFromCookie_(cookie: HttpCookie) {\n const cookies = [];\n cookies.push(`${cookie.name}=${cookie.value}`);\n if (cookie.expires) {\n cookies.push(`Expires=${cookie.expires.toUTCString()}`);\n }\n if (cookie.httpOnly === true) {\n cookies.push(\"HttpOnly\");\n }\n if (cookie.maxAge != null) {\n cookies.push(`Max-Age=${cookie.maxAge}`);\n }\n if (cookie.path) {\n cookies.push(`Path=${cookie.path}`);\n }\n if (cookie.domain) {\n cookies.push(`Domain=${cookie.domain}`);\n }\n return cookies.join('; ');\n }\n}","import { IException } from \"../interfaces\";\nimport { promise } from \"../helpers\";\n\nexport class ErrorHandler {\n onServerError(ex: IException): Promise {\n return promise((resolve, reject) => {\n let errMessage = `

internal server error

\n

message : ${ex.message}

`;\n if (ex.stack) {\n errMessage += `

stacktrace: ${ex.stack}

`;\n }\n if (ex.type) {\n errMessage += `

type: ${ex.type}

`;\n }\n resolve(errMessage);\n });\n }\n\n onBadRequest(ex: IException): Promise {\n return promise((resolve, reject) => {\n let errMessage = `

Bad Request

`;\n if (ex.message) {\n errMessage += `

message : ${ex.message}

`;\n }\n if (ex.stack) {\n errMessage += `

stacktrace: ${ex.stack}

`;\n }\n if (ex.type) {\n errMessage += `

type: ${ex.type}

`;\n }\n resolve(errMessage);\n });\n }\n\n onForbiddenRequest(): Promise {\n return promise((resolve, reject) => {\n const errMessage = `

Forbidden

`;\n resolve(errMessage);\n });\n }\n\n onNotAcceptableRequest(): Promise {\n return promise((resolve, reject) => {\n const errMessage = `

Not Acceptable

`;\n resolve(errMessage);\n });\n }\n\n onMethodNotAllowed(): Promise {\n return promise((resolve, reject) => {\n const errMessage = `

Method Not allowed.

`;\n resolve(errMessage);\n });\n }\n\n onNotFound(url: string): Promise {\n return promise((resolve, reject) => {\n const errMessage = `

The requested resource ${url} was not found.

`;\n resolve(errMessage);\n });\n }\n}","import { HttpFile } from \"./http_file\";\nimport * as Fs from \"fs-extra\";\n\nexport class FileManager {\n\n private files_: { [fieldName: string]: HttpFile };\n\n constructor(value) {\n this.files_ = value as any;\n }\n\n /**\n * get total no of files\n *\n * @returns - number\n * @memberof FileManager\n */\n get count() {\n return Object.keys(this.files_).length;\n }\n\n get files() {\n\n return Object.keys(this.files_).map(fileId => {\n return this.files_[fileId];\n });\n }\n\n /**\n * check for existance of file\n *\n * @param {string} fieldName\n * @returns\n * @memberof FileManager\n */\n isExist(fieldName: string) {\n return this.files_[fieldName] != null;\n }\n\n /**\n * return the file\n *\n * @param {string} fieldName\n * @returns\n * @memberof FileManager\n */\n getFile(fieldName: string) {\n return this.files_[fieldName];\n }\n\n /**\n * saves file to supplied path\n *\n * @param {string} fieldName\n * @param {string} pathToSave\n * @returns\n * @memberof FileManager\n */\n saveTo(fieldName: string, pathToSave: string) {\n return Fs.copy(this.files_[fieldName].path, pathToSave);\n }\n}","import { ParentRoute, AppOption, EtagOption } from \"../types\";\nimport { Wall, ViewEngine, SessionProvider, XmlParser } from \"../abstracts\";\nimport { RouteHandler, RequestHandler } from \"../handlers\";\nimport { Global } from \"../global\";\nimport { MemorySessionProvider, MustacheViewEngine } from \"../extra\";\nimport { ErrorHandler } from \".\";\nimport { __AppName } from \"../constant\";\nimport * as http from \"http\";\nimport { ETag_Type, ERROR_TYPE } from \"../enums\";\nimport { LogHelper, promise, removeLastSlash, removeFirstSlash } from \"../helpers\";\nimport { GenericSessionProvider, GenericXmlParser, GenericController } from \"../generics\";\nimport { isNull, isNullOrEmpty, isArray } from \"../utils\";\n\nexport class Fort {\n routes: ParentRoute[] = [];\n walls: Array = [];\n httpServer: http.Server;\n\n /**\n * view engine use to render the view\n *\n * @type {typeof ViewEngine}\n * @memberof Fort\n */\n viewEngine?: typeof ViewEngine;\n\n /**\n * sessionProvider class, default - MemorySessionProvider\n *\n * @type {typeof SessionProvider}\n */\n sessionProvider?: typeof SessionProvider;\n\n /**\n * Custom error handler class\n *\n * @type {typeof ErrorHandler}\n */\n errorHandler?: typeof ErrorHandler;\n\n /**\n * XmlParser class - used to parse the xml \n *\n * @type {typeof XmlParser}\n * @memberof Fort\n */\n xmlParser?: typeof XmlParser;\n\n private saveAppOption_(option: AppOption) {\n const defaultEtagConfig = {\n type: ETag_Type.Weak\n } as EtagOption;\n\n Global.port = option.port == null ? 4000 : option.port;\n Global.shouldParseCookie = option.shouldParseCookie == null ? true : option.shouldParseCookie;\n Global.shouldParsePost = isNull(option.shouldParsePost) ? true : option.shouldParsePost;\n Global.sessionTimeOut = isNull(option.sessionTimeOut) ? 60 : option.sessionTimeOut;\n Global.folders = option.folders == null ? [] : option.folders;\n if (isArray(Global.folders) === false) {\n throw new Error(`Option folders should be an array`);\n }\n Global.appName = isNullOrEmpty(option.appName) === true ? __AppName : option.appName;\n Global.appSessionIdentifier = `${Global.appName}_session_id`;\n Global.eTag = isNull(option.eTag) ? defaultEtagConfig : option.eTag;\n Global.walls = this.walls as any;\n Global.viewEngine = isNull(this.viewEngine) ? new MustacheViewEngine() : new (this.viewEngine as any)();\n Global.sessionProvider = isNull(this.sessionProvider) ? MemorySessionProvider as any :\n this.sessionProvider as typeof GenericSessionProvider;\n Global.errorHandler = isNull(this.errorHandler) ? ErrorHandler : this.errorHandler;\n Global.xmlParser = isNull(this.xmlParser) ? GenericXmlParser : this.xmlParser;\n Global.viewPath = isNull(option.viewPath) ? \"views\" : option.viewPath;\n }\n\n create(option?: AppOption): Promise {\n if (option == null) {\n option = {\n\n };\n }\n\n if (this.routes == null) {\n this.routes = [];\n }\n let isDefaultRouteExist = false;\n // removing / from routes\n this.routes.forEach(route => {\n route.path = removeFirstSlash(route.path);\n route.path = removeLastSlash(route.path);\n if (route.path === \"*\") {\n isDefaultRouteExist = true;\n }\n RouteHandler.addToRouterCollection(route);\n });\n if (isDefaultRouteExist === false) {\n RouteHandler.addToRouterCollection({\n controller: GenericController,\n path: \"*\"\n });\n }\n if (option.folders != null) {\n // remove / from files routes\n option.folders.forEach(folder => {\n const length = folder.alias.length;\n if (length > 1) {\n folder.alias = removeFirstSlash(folder.alias);\n folder.alias = removeLastSlash(folder.alias);\n }\n\n });\n }\n\n this.saveAppOption_(option);\n return promise((res, rej) => {\n this.httpServer = http.createServer((request, response) => {\n new RequestHandler(request, response).handle();\n }).once(\"error\", (err) => {\n if ((err as any).code === 'EADDRINUSE') {\n const error = new LogHelper(ERROR_TYPE.PortInUse, Global.port).get();\n rej(error);\n }\n else {\n rej(err);\n }\n }).once('listening', () => {\n res();\n }).listen(Global.port);\n });\n }\n\n destroy(): Promise {\n return promise((res, rej) => {\n this.httpServer.close(res);\n });\n }\n\n}\n","import { IHttpCookie } from \"../interfaces\";\n\nexport class HttpCookie implements IHttpCookie {\n name: string;\n value: string;\n maxAge?: number;\n expires?: Date;\n domain?: string;\n httpOnly?: boolean;\n secure?: boolean;\n path?: string;\n\n constructor(name: string, value: string) {\n this.name = name;\n this.value = value;\n }\n}","import { IncomingHttpHeaders } from \"http2\";\n\n \nexport class HttpFile {\n\n /**\n * same as name - the field name for this file\n */\n fieldName: string;\n\n /**\n * the filename that the user reports for the file\n */\n originalFilename: string;\n\n /**\n * the absolute path of the uploaded file on disk\n */\n path: string;\n\n /**\n * the HTTP headers that were sent along with this file\n */\n headers?: IncomingHttpHeaders;\n\n /**\n * size of the file in bytes\n */\n size?: number;\n\n}\n","export * from './error_handler';\nexport * from './http_cookie';\nexport * from './fort';\nexport * from './router';\nexport * from './cookie_manager';\nexport * from \"./file_manager\";\nexport * from \"./http_file\";","import { RouteInfo } from \"../types\";\nimport { RouteHandler } from \"../handlers\";\n\nexport class Router {\n routes: RouteInfo[] = RouteHandler.routerCollection;\n}","import { HttpRequest } from \"../types\";\n\nexport class HttpRequestStub implements HttpRequest {\n headers;\n\n constructor(headers) {\n this.headers = headers;\n }\n}","import { HttpResponse } from \"../types\";\n\nexport class HttpResponseStub implements HttpResponse {\n private headers_;\n constructor(headers) {\n this.headers_ = headers;\n }\n\n getHeader(name: string) {\n return this.headers_[name];\n }\n\n\n hasHeader(name: string) {\n return this.headers_[name] != null;\n }\n\n setHeader(name: string, value: number | string | string[]) {\n this.headers_[name] = value;\n }\n\n getHeaders() {\n return this.headers_;\n }\n\n getHeaderNames(): string[] {\n return Object.keys[this.headers_];\n }\n\n removeHeader(name: string) {\n delete this.headers_[name];\n }\n}","export * from './init_controller';\nexport * from './init_guard';\nexport * from './init_shield';\nexport * from './init_wall';","\nimport { CookieManager, FileManager } from \"../models\";\nimport { Global } from \"../global\";\nimport { ControllerTestData } from \"../types\";\nimport { HttpResponseStub } from \"./http_response_stub\";\nimport { HttpRequestStub } from \"./http_request_stub\";\nimport { Controller } from \"../abstracts\";\n\n\n\nexport const initController = (controllerInstance: Controller, data?: ControllerTestData) => {\n data = data || {};\n const parsedCookies = data.cookieValue || {};\n const headers = (data.request && data.request.headers) || {};\n controllerInstance.request = new HttpRequestStub(headers);\n controllerInstance.response = new HttpResponseStub(headers);\n controllerInstance.query = data.query || {};\n controllerInstance.body = data.body || {};\n controllerInstance.cookie = new CookieManager(parsedCookies);\n const session = new Global.sessionProvider();\n session.cookie = controllerInstance.cookie;\n session.sessionId = parsedCookies[Global.appSessionIdentifier];\n controllerInstance.session = session;\n controllerInstance.param = data.param || {};\n controllerInstance.data = data.data || {};\n controllerInstance.file = new FileManager(data.file || {});\n return controllerInstance;\n};","\nimport { initController } from \"./init_controller\";\nimport { ControllerTestData } from \"../types\";\n\nexport type GuardTestData = ControllerTestData;\n\nexport const initGuard = (guardInstance, data?: GuardTestData) => {\n return initController(guardInstance, data);\n};","\nimport { initController } from \"./init_controller\";\nimport { ControllerTestData } from \"../types\";\n\nexport type ShieldTestData = ControllerTestData & {\n workerName?: string;\n};\n\nexport const initShield = (shieldInstance, data?: ShieldTestData) => {\n const value: ShieldTestData = initController(shieldInstance, data) as any;\n value.workerName = data && data.workerName;\n return value;\n};","\nimport { initController } from \"./init_controller\";\nimport { ControllerTestData } from \"../types\";\n\nexport type WallTestData = ControllerTestData;\n\nexport const initWall = (wallInstance, data?: WallTestData) => {\n return initController(wallInstance, data);\n};","export * from './is_null_or_empty';\nexport * from './is_null';\nexport * from './is_array';","export const isArray = (value) => {\n return Array.isArray(value);\n};","export const isNull = (value) => {\n return value == null;\n};","export const isNullOrEmpty = (value: string) => {\n return value == null || value.length === 0;\n};","module.exports = require(\"content-type\");","module.exports = require(\"etag\");","module.exports = require(\"fresh\");","module.exports = require(\"fs\");","module.exports = require(\"fs-extra\");","module.exports = require(\"http\");","module.exports = require(\"jsontoxml\");","module.exports = require(\"multiparty\");","module.exports = require(\"mustache\");","module.exports = require(\"negotiator\");","module.exports = require(\"path\");","module.exports = require(\"querystring\");","module.exports = require(\"uniqid\");","module.exports = require(\"url\");"],"sourceRoot":""} \ No newline at end of file diff --git a/src/handlers/injector_handler.ts b/src/handlers/injector_handler.ts index 7de64cfd..650007ba 100644 --- a/src/handlers/injector_handler.ts +++ b/src/handlers/injector_handler.ts @@ -17,9 +17,17 @@ const singletons: { export class InjectorHandler { static addWorkerValue(className: string, methodName: string, paramIndex, paramValue, shouldFindIndex = true): number { - if (shouldFindIndex === true && injectorValues.indexOf(paramValue) < 0) { - paramValue = injectorValues.push(paramValue) - 1; + + if (shouldFindIndex === true) { + const paramValueIndex = injectorValues.indexOf(paramValue); + if (paramValueIndex < 0) { + paramValue = injectorValues.push(paramValue) - 1; + } + else { + paramValue = paramValueIndex; + } } + const savedValue = injectorStoreInfos.find(x => x.className === className); const value: InjectorStoreInfo = { diff --git a/tests/general/controllers/home_controller.ts b/tests/general/controllers/home_controller.ts index eb81fb3f..2077d2c9 100644 --- a/tests/general/controllers/home_controller.ts +++ b/tests/general/controllers/home_controller.ts @@ -121,6 +121,5 @@ export class HomeController extends Controller { @Singleton(EmployeeService) employeeService) { return jsonResult([...studentService.getAll(), ...employeeService.getAll(), ...userService.getUsers()]); - } } \ No newline at end of file diff --git a/tests/general/controllers/injection_controller.ts b/tests/general/controllers/injection_controller.ts new file mode 100644 index 00000000..1a2ee321 --- /dev/null +++ b/tests/general/controllers/injection_controller.ts @@ -0,0 +1,10 @@ +import { Controller, viewResult, Worker, Route, jsonResult, HTTP_METHOD, DefaultWorker, Assign, Singleton, textResult } from "fortjs"; + +export class InjectionController extends Controller { + + @Worker() + async getMultipleStringInjection(@Assign('Welcome to fort') title, @Assign('Hello World') helloWorld, @Assign('ujjwal') firstName, @Assign('Gupta') lastName) { + return jsonResult({ value: [title, helloWorld, firstName, lastName] }); + } + +} \ No newline at end of file diff --git a/tests/general/routes.ts b/tests/general/routes.ts index d086c417..c91ace82 100644 --- a/tests/general/routes.ts +++ b/tests/general/routes.ts @@ -5,6 +5,7 @@ import { CookieController } from "./controllers/cookie_controller"; import { SessionController } from "./controllers/session_controller"; import { ParentRoute } from "fortjs"; import { DefaultController } from "./controllers/default_controller"; +import { InjectionController } from "./controllers/injection_controller"; export const routes: ParentRoute[] = [{ controller: DefaultController, @@ -24,4 +25,7 @@ export const routes: ParentRoute[] = [{ }, { controller: SessionController, path: "/session" +}, { + controller: InjectionController, + path: "/injection" }]; \ No newline at end of file diff --git a/tests/general/test/home.js b/tests/general/test/home.js index 837174d3..6dab2b09 100644 --- a/tests/general/test/home.js +++ b/tests/general/test/home.js @@ -256,4 +256,29 @@ describe("/home", () => { done(); }); }); + + it('/getAllFromServices', (done) => { + request.get('/home/getAllFromServices').end((err, res) => { + expect(err).to.be.null; + expect(res).to.have.status(200); + const data = [{ + id: 1, + name: 'ujjwal', + type: 'student' + }, { + id: 1, + name: 'ujjwal', + type: 'employee' + }, { + id: 1, + name: 'ujjwal', + address: 'bhubaneswar india', + emailId: 'ujjwal@mg.com', + gender: 'male', + password: 'admin' + }] + expect(res.body).to.be.eql(data); + done(); + }); + }); }); \ No newline at end of file diff --git a/tests/general/test/index.js b/tests/general/test/index.js index 7fb8e972..16569e38 100644 --- a/tests/general/test/index.js +++ b/tests/general/test/index.js @@ -20,7 +20,7 @@ require('./file_test'); require('./random'); require('./user'); require('./session'); - +require('./injection'); require('./wall'); // process.exit(0); diff --git a/tests/general/test/injection.js b/tests/general/test/injection.js new file mode 100644 index 00000000..17665287 --- /dev/null +++ b/tests/general/test/injection.js @@ -0,0 +1,17 @@ +let { + request, + expect +} = require('./common'); + +describe("Injection", () => { + it("/getMultipleStringInjection", (done) => { + + request.get('/Injection/getMultipleStringInjection').end((err, res) => { + expect(err).to.be.null; + expect(res).to.have.status(200); + const data = {"value":["Welcome to fort","Hello World","ujjwal","Gupta"]}; + expect(res.body).to.be.eql(data); + done(); + }) + }) +}) \ No newline at end of file diff --git a/tests/general/test/wall.js b/tests/general/test/wall.js index b1dd0e70..6ff96509 100644 --- a/tests/general/test/wall.js +++ b/tests/general/test/wall.js @@ -52,7 +52,7 @@ describe("wall test", () => { expect(res).to.have.header('custom-header-from-incoming-wall', '*'); expect(res).to.have.header('injection-result', 'wall constructor onIncoming called on outgoing called'); expect(res).to.have.header('wall-without-outgoing-wall', '*'); - expect(res.body).haveOwnProperty('reqCount').equal(84); + expect(res.body).haveOwnProperty('reqCount').equal(86); done(); }) })