From 9098fc05a95ea14f1f0042f63e5cebee22f60fb6 Mon Sep 17 00:00:00 2001 From: "DESKTOP-EA3UTGO\\ujjwal" Date: Fri, 16 Nov 2018 08:49:51 +0530 Subject: [PATCH] v 0.5.0 release --- dist/fort.commonjs2.js | 4 +++- dist/fort.commonjs2.js.map | 2 +- dist/ts/global.d.ts | 1 + dist/ts/types/app_option.d.ts | 10 ++++++++++ package.json | 2 +- 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/dist/fort.commonjs2.js b/dist/fort.commonjs2.js index ac8d23a6..335ec8f5 100644 --- a/dist/fort.commonjs2.js +++ b/dist/fort.commonjs2.js @@ -1,5 +1,5 @@ /*! - * @license :fortjs - V0.4.0 - 16/11/2018 + * @license :fortjs - V0.5.0 - 16/11/2018 * https://github.com/ujjwalguptaofficial/fort * Copyright (c) 2018 @Ujjwal Gupta; Licensed MIT */ @@ -758,6 +758,7 @@ function create(option) { _global__WEBPACK_IMPORTED_MODULE_1__["Global"].foldersAllowed = _util__WEBPACK_IMPORTED_MODULE_2__["Util"].isNull(option.foldersAllowed) ? [] : option.foldersAllowed; _global__WEBPACK_IMPORTED_MODULE_1__["Global"].errorHandler = _util__WEBPACK_IMPORTED_MODULE_2__["Util"].isNull(option.errorHandler) ? _model__WEBPACK_IMPORTED_MODULE_5__["ErrorHandler"] : option.errorHandler; _global__WEBPACK_IMPORTED_MODULE_1__["Global"].defaultPath = _util__WEBPACK_IMPORTED_MODULE_2__["Util"].isNull(option.defaultPath) === true ? "" : "/" + option.defaultPath.toLowerCase(); + _global__WEBPACK_IMPORTED_MODULE_1__["Global"].connectonKeepAliveTimeout = option.connectonKeepAliveTimeout == null ? 5000 : option.connectonKeepAliveTimeout; } else { _global__WEBPACK_IMPORTED_MODULE_1__["Global"].port = 4000; @@ -779,6 +780,7 @@ function create(option) { throw err; } }); + app.keepAliveTimeout = _global__WEBPACK_IMPORTED_MODULE_1__["Global"].connectonKeepAliveTimeout; } diff --git a/dist/fort.commonjs2.js.map b/dist/fort.commonjs2.js.map index ebdecd29..05ef62d8 100644 --- a/dist/fort.commonjs2.js.map +++ b/dist/fort.commonjs2.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://Infinity/webpack/bootstrap","webpack://Infinity/./src/code/index.ts","webpack://Infinity/./src/code/abstracts/index.ts","webpack://Infinity/./src/code/abstracts/controller.ts","webpack://Infinity/./src/code/abstracts/shield.ts","webpack://Infinity/./src/code/abstracts/session_provider.ts","webpack://Infinity/./src/code/helpers/promise.ts","webpack://Infinity/./src/code/constant.ts","webpack://Infinity/external \"uniqid\"","webpack://Infinity/./src/code/global.ts","webpack://Infinity/./src/code/abstracts/guard.ts","webpack://Infinity/./src/code/abstracts/view_engine.ts","webpack://Infinity/./src/code/decorators/index.ts","webpack://Infinity/./src/code/decorators/declare_as_controller.ts","webpack://Infinity/./src/code/helpers/log_helper.ts","webpack://Infinity/./src/code/enums/error_type.ts","webpack://Infinity/./src/code/route_handler.ts","webpack://Infinity/./src/code/decorators/action.ts","webpack://Infinity/./src/code/decorators/shields.ts","webpack://Infinity/./src/code/decorators/guards.ts","webpack://Infinity/./src/code/decorators/route.ts","webpack://Infinity/./src/code/decorators/default_action.ts","webpack://Infinity/./src/code/create.ts","webpack://Infinity/external \"http\"","webpack://Infinity/./src/code/util.ts","webpack://Infinity/./src/code/request_handler.ts","webpack://Infinity/external \"url\"","webpack://Infinity/external \"querystring\"","webpack://Infinity/./src/code/helpers/parse_cookie.ts","webpack://Infinity/./src/code/model/cookie_manager.ts","webpack://Infinity/./src/code/helpers/parse_match_route.ts","webpack://Infinity/./src/code/enums/file_extension.ts","webpack://Infinity/external \"path\"","webpack://Infinity/./src/code/file_handler.ts","webpack://Infinity/./src/code/helpers/file_helper.ts","webpack://Infinity/external \"fs\"","webpack://Infinity/./src/code/enums/http_status_code.ts","webpack://Infinity/./src/code/request_handler_helper.ts","webpack://Infinity/./src/code/enums/mime_type.ts","webpack://Infinity/external \"negotiator\"","webpack://Infinity/./src/code/helpers/get_mime_type_from_extension.ts","webpack://Infinity/./src/code/enums/index.ts","webpack://Infinity/./src/code/enums/http_method.ts","webpack://Infinity/external \"jsontoxml\"","webpack://Infinity/./src/code/memory_session_provider.ts","webpack://Infinity/./src/code/model/index.ts","webpack://Infinity/./src/code/model/error_handler.ts","webpack://Infinity/./src/code/helpers/index.ts","webpack://Infinity/./src/code/helpers/json_result.ts","webpack://Infinity/./src/code/helpers/text_result.ts","webpack://Infinity/./src/code/helpers/html_result.ts","webpack://Infinity/./src/code/helpers/render_view.ts","webpack://Infinity/./src/code/helpers/download_result.ts","webpack://Infinity/./src/code/helpers/file_result.ts","webpack://Infinity/./src/code/destroy.ts"],"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;;;;;;;;AClFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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B;KACU,CAAC;AACpB,CAAC;;;;;;;;ACbD;AAAA;AAAA;AAA6D;AAGtD,SAAS,UAAU,CAAC,QAAgB,EAAE,IAAe;IACxD,OAAO;QACH,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,wEAAgB,CAAC,EAAE;QAC/B,IAAI,EAAE;YACF,QAAQ,EAAE,QAAQ;SACrB;KACU,CAAC;AACpB,CAAC;;;;;;;;ACbD;AAAA;AAAA;AAA+B;AAExB,SAAS,OAAO,CAAC,QAAmB;IACvC,2CAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AACxB,CAAC","file":"fort.commonjs2.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 = 0);\n","export * from './abstracts/index';\r\nexport * from './decorators/index';\r\nexport * from './create';\r\nexport * from './interfaces/index';\r\nexport * from './enums';\r\nexport * from './helpers/index';\r\nexport * from './model/index';\r\nexport * from './destroy';\r\nexport * from './types/index';","export * from './controller';\r\nexport * from './shield';\r\nexport * from './session_provider';\r\nexport * from './guard';\r\nexport * from './view_engine';","import { IHttpRequest } from \"../interfaces/http_request\";\r\nimport { IHttpResponse } from \"../interfaces/http_response\";\r\nimport { SessionProvider } from \"./session_provider\";\r\nimport { CookieManager } from \"../model/cookie_manager\";\r\nexport abstract class Controller {\r\n request: IHttpRequest;\r\n response: IHttpResponse;\r\n query: { [key: string]: any };\r\n body: { [key: string]: any };\r\n session: SessionProvider;\r\n cookies: CookieManager;\r\n params: { [key: string]: any };\r\n data: { [key: string]: any };\r\n}","import { Controller } from \"./controller\";\r\nimport { IHttpRequest } from \"../interfaces/http_request\";\r\nimport { IHttpResponse } from \"../interfaces/http_response\";\r\nimport { SessionProvider } from \"./session_provider\";\r\nimport { CookieManager } from \"../model/cookie_manager\";\r\n\r\nexport abstract class Shield implements Controller {\r\n request: IHttpRequest;\r\n response: IHttpResponse;\r\n query: { [key: string]: any };\r\n body: { [key: string]: any };\r\n session: SessionProvider;\r\n cookies: CookieManager;\r\n params: { [key: string]: any };\r\n data: { [key: string]: any };\r\n abstract protect(): Promise;\r\n}\r\n\r\n","import { ISessionValue } from \"../interfaces/session_value\";\r\nimport { CookieManager } from \"../model/cookie_manager\";\r\nimport { promise } from \"../helpers/promise\";\r\nimport { App__Session__Identifier } from \"../constant\";\r\nimport * as getUniqId from \"uniqid\";\r\nimport { Global } from \"../global\";\r\n\r\nexport abstract class SessionProvider {\r\n\r\n protected sessionId: string;\r\n protected cookies: CookieManager;\r\n\r\n abstract get(key: string): Promise;\r\n abstract isExist(key: string): Promise;\r\n abstract getAll(): Promise;\r\n abstract set(key: string, val: any): Promise;\r\n abstract setMany(values: ISessionValue[]): Promise;\r\n abstract remove(key: string): Promise;\r\n\r\n protected createSession(): Promise {\r\n return promise((resolve, reject) => {\r\n const now = new Date();\r\n this.sessionId = getUniqId();\r\n this.cookies.addCookie({\r\n name: App__Session__Identifier,\r\n value: this.sessionId,\r\n httpOnly: true,\r\n path: \"/\",\r\n expires: new Date(now.setMinutes(now.getMinutes() + Global.sessionTimeOut))\r\n });\r\n resolve();\r\n });\r\n }\r\n}\r\n\r\n","export function promise(callBack: (resolve, reject) => void) {\r\n return new Promise(callBack);\r\n}","export const Content__Type = \"content-type\";\r\nexport const App__Name = \"infinity\";\r\nexport const App__Session__Identifier = \"infinity_session_id\";\r\nexport const Cookie = \"cookie\";\r\nexport const Set__Cookie = 'set-cookie';\r\nexport const Current__Directory = process.cwd();","module.exports = require(\"uniqid\");","import * as http from \"http\";\r\nimport { GenericSessionProvider } from \"./model/generic_session_provider\";\r\nimport { GenericWall } from \"./model/generic_wall\";\r\nimport { ViewEngine } from \"./abstracts/view_engine\";\r\nimport { ErrorHandler } from \"./model/error_handler\";\r\n\r\nexport class Global {\r\n static request: http.IncomingMessage;\r\n static response: http.ServerResponse;\r\n static port: number;\r\n static viewPath: string;\r\n static shouldParseCookie: boolean;\r\n static shouldParsePost: boolean;\r\n static sessionProvider: typeof GenericSessionProvider;\r\n static sessionTimeOut?: number;\r\n static viewEngine: ViewEngine;\r\n static foldersAllowed: string[];\r\n static walls: typeof GenericWall[] = [];\r\n static errorHandler: typeof ErrorHandler;\r\n static defaultPath?: string;\r\n}","import { IHttpRequest } from \"../interfaces/http_request\";\r\nimport { IHttpResponse } from \"../interfaces/http_response\";\r\nimport { SessionProvider } from \"./session_provider\";\r\nimport { CookieManager } from \"../model/cookie_manager\";\r\nimport { Controller } from \"./controller\";\r\n\r\nexport abstract class Guard implements Controller {\r\n request: IHttpRequest;\r\n response: IHttpResponse;\r\n query: { [key: string]: any };\r\n body: { [key: string]: any };\r\n session: SessionProvider;\r\n cookies: CookieManager;\r\n params: { [key: string]: any };\r\n data: { [key: string]: any };\r\n abstract check(): Promise;\r\n}","import { IViewValue } from \"../interfaces/view_option\";\r\n\r\n\r\nexport abstract class ViewEngine {\r\n abstract render(value: IViewValue): Promise\r\n}","export * from \"./declare_as_controller\";\r\nexport * from './action';\r\nexport * from './shields';\r\nexport * from './guards';\r\nexport * from './route';\r\nexport * from './default_action';","import { LogHelper } from \"../helpers/log_helper\";\r\nimport { RouteHandler } from \"../route_handler\";\r\nimport { GenericController } from \"../model/generic_controller\";\r\nimport { ERROR_TYPE } from \"../enums/error_type\";\r\n\r\nexport function declareAsController(path?: string): ClassDecorator {\r\n return (target: any) => {\r\n const className = target.name;\r\n const classNameLower = className.toLowerCase();\r\n if (path == null) {\r\n if (classNameLower.endsWith('controller') === true) {\r\n path = classNameLower.substr(0, classNameLower.length - 10);\r\n }\r\n else {\r\n new LogHelper(ERROR_TYPE.InvalidControllerName, className).throw();\r\n }\r\n }\r\n else {\r\n path = path.toLowerCase();\r\n }\r\n RouteHandler.addToRouterCollection({\r\n controller: target as typeof GenericController,\r\n controllerName: className,\r\n alias: path,\r\n actions: [],\r\n shields: []\r\n })\r\n };\r\n}","import { IError } from \"../interfaces/error\";\r\nimport { ERROR_TYPE } from \"../enums/error_type\";\r\n\r\n\r\n\r\nexport class LogHelper implements IError {\r\n type: ERROR_TYPE;\r\n message: string;\r\n private info_: any;\r\n\r\n constructor(type: ERROR_TYPE, info?: any) {\r\n this.type = type;\r\n this.info_ = info;\r\n this.message = this.getMsg_();\r\n }\r\n\r\n throw() {\r\n const errMsg = this.get();\r\n throw JSON.stringify(errMsg);\r\n\r\n }\r\n\r\n static log(msg) {\r\n console.log(msg);\r\n }\r\n\r\n logError() {\r\n console.error(this.get());\r\n }\r\n\r\n logWarning() {\r\n console.warn(this.get());\r\n }\r\n\r\n get() {\r\n return {\r\n message: this.message,\r\n type: this.type\r\n } as IError;\r\n }\r\n\r\n private getMsg_() {\r\n let errMsg: string;\r\n switch (this.type) {\r\n case ERROR_TYPE.InvalidControllerName:\r\n errMsg = `Invalid controller name - '${this.info_}'. Controller name must contain 'controller'.`\r\n break;\r\n case ERROR_TYPE.InvalidContentType:\r\n errMsg = `Content type - '${this.info_}' is not valid. Please create an issue if you think this is valid type.`\r\n break;\r\n default:\r\n errMsg = this.message;\r\n break;\r\n }\r\n return errMsg;\r\n }\r\n}","export enum ERROR_TYPE {\r\n InvalidControllerName = \"invalid_controller_name\",\r\n InvalidContentType = \"invalid_content_type\",\r\n PortInUse = \"port_in_use\"\r\n}","import { IRouteInfo } from \"./interfaces/route_info\";\r\nimport { GenericShield } from \"./model/generic_shield\";\r\nimport { IRouteActionInfo } from \"./interfaces/route_action_info\";\r\nimport { GenericGuard } from \"./model/generic_guard\";\r\n\r\nconst routerCollection: IRouteInfo[] = [];\r\nexport class RouteHandler {\r\n\r\n static get routerCollection() {\r\n return routerCollection;\r\n }\r\n\r\n static addToRouterCollection(value: IRouteInfo) {\r\n const route = routerCollection.find(x => x.controllerName === value.controllerName);\r\n if (route == null) {\r\n routerCollection.push(value);\r\n }\r\n else {\r\n route.controller = value.controller;\r\n route.alias = value.alias;\r\n route.actions.forEach(actionInfo => {\r\n if (actionInfo.pattern.indexOf(value.alias) < 0) {\r\n actionInfo.pattern = `/${value.alias}/${actionInfo.pattern}`;\r\n }\r\n })\r\n }\r\n\r\n }\r\n\r\n static addShields(shields: typeof GenericShield[], className: string) {\r\n const index = routerCollection.findIndex(x => x.controllerName === className);\r\n if (index < 0) {\r\n routerCollection.push({\r\n actions: [],\r\n controller: null,\r\n controllerName: className,\r\n shields: shields,\r\n alias: null\r\n });\r\n }\r\n else {\r\n routerCollection[index].shields = shields;\r\n }\r\n }\r\n\r\n static addAction(newAction: IRouteActionInfo, className: string, isDefault?: boolean) {\r\n const router = routerCollection.find(x => x.controllerName === className);\r\n if (router == null) {\r\n routerCollection.push({\r\n actions: [newAction],\r\n controller: null,\r\n controllerName: className,\r\n shields: [],\r\n alias: null,\r\n defaultAction: isDefault === true ? newAction.action : \"\"\r\n });\r\n }\r\n else {\r\n if (isDefault === true) {\r\n router.defaultAction = newAction.action\r\n }\r\n const savedAction = router.actions.find(val => val.action === newAction.action);\r\n if (savedAction == null) {\r\n newAction.pattern = router.alias == null ? newAction.pattern : `/${router.alias}/${newAction.pattern}`;\r\n router.actions.push(newAction);\r\n }\r\n else {\r\n savedAction.methodsAllowed = newAction.methodsAllowed;\r\n savedAction.pattern = router.alias == null ? savedAction.pattern : `/${router.alias}/${savedAction.pattern}`;;\r\n }\r\n }\r\n }\r\n\r\n static addGuards(guards: typeof GenericGuard[], className: string, actionName: string) {\r\n const index = routerCollection.findIndex(x => x.controllerName === className);\r\n const pattern = actionName.toLowerCase();\r\n if (index < 0) {\r\n routerCollection.push({\r\n actions: [{\r\n action: actionName,\r\n guards: guards,\r\n methodsAllowed: null,\r\n pattern: pattern\r\n }],\r\n controller: null,\r\n controllerName: className,\r\n shields: [],\r\n alias: null\r\n });\r\n }\r\n else {\r\n const savedAction = routerCollection[index].actions.find(val => val.action === actionName);\r\n if (savedAction == null) {\r\n routerCollection[index].actions.push({\r\n action: actionName,\r\n guards: guards,\r\n methodsAllowed: null,\r\n pattern: pattern\r\n });\r\n }\r\n else {\r\n savedAction.guards = guards;\r\n }\r\n }\r\n }\r\n\r\n static addPattern(pattern: string, className: string, actionName: string) {\r\n const router = routerCollection.find(x => x.controllerName === className);\r\n if (router == null) {\r\n routerCollection.push({\r\n actions: [{\r\n action: actionName,\r\n guards: [],\r\n methodsAllowed: null,\r\n pattern: pattern\r\n }],\r\n controller: null,\r\n controllerName: className,\r\n shields: [],\r\n alias: null\r\n });\r\n }\r\n else {\r\n const savedAction = router.actions.find(val => val.action === actionName);\r\n pattern = router.alias == null ? pattern : `/${router.alias}/${pattern}`;\r\n if (savedAction == null) {\r\n router.actions.push({\r\n action: actionName,\r\n guards: [],\r\n methodsAllowed: null,\r\n pattern: pattern\r\n });\r\n }\r\n else {\r\n savedAction.pattern = pattern;\r\n }\r\n }\r\n }\r\n}","import { HTTP_METHOD } from \"../enums\";\r\nimport { RouteHandler } from \"../route_handler\";\r\nimport { IRouteActionInfo } from \"../interfaces/route_action_info\";\r\n\r\nexport function action(allowedMethods?: HTTP_METHOD[]): MethodDecorator {\r\n return function (target: any, methodName: string, descriptor: PropertyDescriptor) {\r\n const className = (target.constructor.name as string);\r\n const actionInfo: IRouteActionInfo = {\r\n action: methodName,\r\n methodsAllowed: allowedMethods,\r\n guards: [],\r\n pattern: methodName.toLowerCase()\r\n };\r\n RouteHandler.addAction(actionInfo, className);\r\n }\r\n}\r\n","import { Shield } from \"../abstracts\";\r\nimport { RouteHandler } from \"../route_handler\";\r\nimport { GenericShield } from \"../model/generic_shield\";\r\n\r\nexport function shields(shields: typeof Shield[]): ClassDecorator {\r\n return (target: any) => {\r\n const className = target.name;\r\n RouteHandler.addShields(shields as typeof GenericShield[], className);\r\n };\r\n}","import { RouteHandler } from \"../route_handler\";\r\nimport { GenericGuard } from \"../model/generic_guard\";\r\nimport { Guard } from \"../abstracts/guard\";\r\n\r\nexport function guards(guards: typeof Guard[]): MethodDecorator {\r\n return (function (target: any, methodName: string, descriptor: PropertyDescriptor) {\r\n const className = (target.constructor.name as string);\r\n RouteHandler.addGuards(guards as typeof GenericGuard[], className, methodName);\r\n })\r\n}","import { RouteHandler } from \"../route_handler\";\r\n\r\nexport function route(format: string): MethodDecorator {\r\n return (function (target: any, methodName: string, descriptor: PropertyDescriptor) {\r\n const className = (target.constructor.name as string);\r\n RouteHandler.addPattern(format,className,methodName);\r\n })\r\n}","import { RouteHandler } from \"../route_handler\";\r\nimport { HTTP_METHOD } from \"../enums/http_method\";\r\nimport { IRouteActionInfo } from \"../interfaces/route_action_info\";\r\n\r\nexport function defaultAction(allowedMethods?: HTTP_METHOD[]): MethodDecorator {\r\n return function (target: any, methodName: string, descriptor: PropertyDescriptor) {\r\n const className = (target.constructor.name as string);\r\n const actionInfo: IRouteActionInfo = {\r\n action: methodName,\r\n methodsAllowed: allowedMethods,\r\n guards: [],\r\n pattern: methodName.toLowerCase()\r\n };\r\n RouteHandler.addAction(actionInfo, className, true);\r\n }\r\n}\r\n","import * as http from \"http\";\r\nimport { Global } from \"./global\";\r\nimport { Util } from \"./util\";\r\nimport { RequestHandler } from \"./request_handler\";\r\nimport { MemorySessionProvider } from \"./memory_session_provider\";\r\nimport { GenericSessionProvider } from \"./model/generic_session_provider\";\r\nimport { GenericWall } from \"./model/generic_wall\";\r\nimport { ErrorHandler } from \"./model\";\r\nimport { AppOption } from \"./types/app_option\";\r\nimport { LogHelper } from \"./helpers/log_helper\";\r\nimport { ERROR_TYPE } from \"./enums/error_type\";\r\n\r\nexport let app: http.Server;\r\nexport function create(option: AppOption) {\r\n if (!Util.isNull(option)) {\r\n Global.port = Util.isNull(option.port) ? 4000 : option.port;\r\n Global.viewEngine = new (option.viewEngine as any)();\r\n Global.shouldParseCookie = Util.isNull(option.shouldParseCookie) ? true : option.shouldParseCookie;\r\n Global.shouldParsePost = Util.isNull(option.shouldParsePost) ? true : option.shouldParsePost;\r\n Global.sessionProvider = Util.isNull(option.sessionProvider) ? MemorySessionProvider as any : option.sessionProvider as typeof GenericSessionProvider;\r\n Global.sessionTimeOut = Util.isNull(option.sessionTimeOut) ? 60 : option.sessionTimeOut;\r\n Global.foldersAllowed = Util.isNull(option.foldersAllowed) ? [] : option.foldersAllowed;\r\n Global.errorHandler = Util.isNull(option.errorHandler) ? ErrorHandler : option.errorHandler;\r\n Global.defaultPath = Util.isNull(option.defaultPath) === true ? \"\" : \"/\" + option.defaultPath.toLowerCase();\r\n }\r\n else {\r\n Global.port = 4000;\r\n Global.shouldParseCookie = true;\r\n Global.shouldParsePost = true;\r\n Global.sessionProvider = MemorySessionProvider as any;\r\n Global.sessionTimeOut = 60;\r\n Global.foldersAllowed = [];\r\n Global.walls = [];\r\n Global.errorHandler = ErrorHandler;\r\n }\r\n app = http.createServer((req, res) => {\r\n new RequestHandler(req, res).handle();\r\n }).listen(Global.port).once(\"error\", (err) => {\r\n if ((err as any).code === 'EADDRINUSE') {\r\n throw new LogHelper(ERROR_TYPE.PortInUse).get();\r\n }\r\n else {\r\n throw err;\r\n }\r\n });\r\n}\r\n\r\n","module.exports = require(\"http\");","export class Util {\r\n static isNull(value) {\r\n return value == null;\r\n }\r\n\r\n static isNullOrEmpty(value: string) {\r\n return value == null || value.length === 0;\r\n }\r\n\r\n static isUnDefined(value) {\r\n return typeof value === \"undefined\";\r\n }\r\n}","import * as http from \"http\";\r\nimport * as url from 'url';\r\nimport { Controller } from \"./abstracts/controller\";\r\nimport { Content__Type, App__Name, Cookie, App__Session__Identifier, Set__Cookie } from \"./constant\";\r\nimport * as qs from 'querystring';\r\nimport { Global } from \"./global\";\r\nimport { IHttpRequest } from \"./interfaces/http_request\";\r\nimport { parseCookie } from \"./helpers/parse_cookie\";\r\nimport { CookieManager } from \"./model/cookie_manager\";\r\nimport { IHttpResponse } from \"./interfaces/http_response\";\r\nimport { GenericSessionProvider } from \"./model/generic_session_provider\";\r\nimport { GenericGuard } from \"./model/generic_guard\";\r\nimport { parseAndMatchRoute } from \"./helpers/parse_match_route\";\r\nimport { IRouteMatch } from \"./interfaces/route_match\";\r\nimport * as path from 'path';\r\nimport { Util } from \"./util\";\r\nimport { FileHandler } from \"./file_handler\";\r\nimport { MIME_TYPE } from \"./enums/mime_type\";\r\nimport { HTTP_METHOD } from \"./enums/http_method\";\r\nimport { HttpResult } from \"./types/http_result\";\r\nimport { HTTP_STATUS_CODE } from \"./enums/http_status_code\";\r\nimport * as jsontoxml from \"jsontoxml\";\r\nimport { Wall } from \"./abstracts/wall\";\r\n\r\nexport class RequestHandler extends FileHandler {\r\n private body_: any;\r\n private cookieManager_: CookieManager;\r\n private session_: GenericSessionProvider;\r\n private query_: any;\r\n private data_ = {};\r\n private routeMatchInfo_: IRouteMatch;\r\n\r\n private wallInstances_: Wall[];\r\n\r\n constructor(request: http.IncomingMessage, response: http.ServerResponse) {\r\n super();\r\n this.request = request;\r\n this.response = response;\r\n this.registerEvents();\r\n }\r\n\r\n private registerEvents() {\r\n this.request.on('error', this.onBadRequest);\r\n this.response.on('error', this.onErrorOccured.bind(this));\r\n }\r\n\r\n private handlePostData_() {\r\n const body = [];\r\n let postData;\r\n return new Promise((resolve, reject) => {\r\n this.request.on('data', (chunk) => {\r\n body.push(chunk);\r\n }).on('end', () => {\r\n const bodyBuffer = Buffer.concat(body);\r\n try {\r\n const contentType = this.request.headers[Content__Type];\r\n switch (contentType) {\r\n case MIME_TYPE.Json:\r\n try {\r\n postData = JSON.parse(bodyBuffer.toString());\r\n }\r\n catch (ex) {\r\n reject(\"Post data is invalid\");\r\n return;\r\n }\r\n break;\r\n case MIME_TYPE.Text:\r\n case MIME_TYPE.Html:\r\n postData = bodyBuffer.toString(); break;\r\n case MIME_TYPE.Form_Url_Encoded:\r\n postData = qs.parse(bodyBuffer.toString()); break;\r\n\r\n }\r\n resolve(postData);\r\n }\r\n catch (ex) {\r\n reject(ex);\r\n }\r\n });\r\n });\r\n }\r\n\r\n private runWallOutgoing_() {\r\n const wallsPromise = [];\r\n this.wallInstances_.forEach(wallObj => {\r\n wallsPromise.push(wallObj.onOutgoing());\r\n });\r\n return Promise.all(wallsPromise);\r\n }\r\n\r\n private runWallIncoming_() {\r\n const wallsPromise = this.wallInstances_ = [];\r\n Global.walls.forEach(wall => {\r\n var wallObj = new wall();\r\n wallObj.body = this.body_;\r\n wallObj.cookies = this.cookieManager_;\r\n wallObj.query = this.query_;\r\n wallObj.session = this.session_;\r\n wallObj.request = this.request as IHttpRequest;\r\n wallObj.response = this.response as IHttpResponse;\r\n wallObj.data = this.data_;\r\n this.wallInstances_.push(wallObj);\r\n wallsPromise.push(wallObj.onIncoming());\r\n });\r\n return Promise.all(wallsPromise);\r\n }\r\n\r\n private runController_() {\r\n\r\n const controllerObj: Controller = new this.routeMatchInfo_.controller();\r\n controllerObj.request = this.request as IHttpRequest;\r\n controllerObj.response = this.response;\r\n controllerObj.query = this.query_;\r\n controllerObj.body = this.body_;\r\n controllerObj.session = this.session_;\r\n controllerObj.cookies = this.cookieManager_;\r\n controllerObj.params = this.routeMatchInfo_.params;\r\n controllerObj.data = this.data_;\r\n controllerObj[this.routeMatchInfo_.actionInfo.action]().then((result: HttpResult) => {\r\n const getData = () => {\r\n switch (negotiatedMiMeType) {\r\n case MIME_TYPE.Json:\r\n if (typeof result.responseData === 'object') {\r\n return JSON.stringify(result.responseData);\r\n }\r\n return result.responseData;\r\n case MIME_TYPE.Xml:\r\n if (typeof result.responseData === 'object') {\r\n return jsontoxml(result.responseData);\r\n }\r\n return result.responseData;\r\n default:\r\n return result.responseData;\r\n\r\n }\r\n }\r\n if (this.cookieManager_ != null) {\r\n ((this.cookieManager_ as any).responseCookie_ as string[]).forEach(value => {\r\n this.response.setHeader(Set__Cookie, value);\r\n });\r\n }\r\n const contentType = result.contentType || MIME_TYPE.Text;\r\n const negotiatedMiMeType = this.getContentTypeFromNegotiation(contentType);\r\n if (negotiatedMiMeType != null) {\r\n if (result.file == null) {\r\n if (result.responseFormat == null) {\r\n this.response.writeHead(result.statusCode || HTTP_STATUS_CODE.Ok,\r\n { [Content__Type]: negotiatedMiMeType });\r\n this.response.end(getData());\r\n }\r\n else {\r\n const key = Object.keys(result.responseFormat).find(qry => qry === negotiatedMiMeType);\r\n if (key != null) {\r\n this.response.writeHead(result.statusCode || HTTP_STATUS_CODE.Ok,\r\n { [Content__Type]: negotiatedMiMeType });\r\n this.response.end(result.responseFormat[key]());\r\n }\r\n else {\r\n this.onNotAcceptableRequest();\r\n }\r\n }\r\n }\r\n else {\r\n if (result.file.shouldDownload === true) {\r\n const parsedPath = path.parse(result.file.filePath);\r\n const fileName = result.file.alias == null ? parsedPath.name : result.file.alias;\r\n this.response.setHeader(\r\n \"Content-Disposition\",\r\n `attachment;filename=${fileName}.${parsedPath.ext}`\r\n )\r\n }\r\n this.handleFileRequest(result.file.filePath, negotiatedMiMeType);\r\n }\r\n }\r\n else {\r\n this.onNotAcceptableRequest();\r\n }\r\n\r\n }).catch(this.onErrorOccured.bind(this))\r\n }\r\n\r\n private executeShieldsProtection_() {\r\n const shieldsPromise = [];\r\n this.routeMatchInfo_.shields.forEach(shield => {\r\n var shieldObj = new shield();\r\n shieldObj.body = this.body_;\r\n shieldObj.cookies = this.cookieManager_;\r\n shieldObj.query = this.query_;\r\n shieldObj.session = this.session_;\r\n shieldObj.request = this.request as IHttpRequest;\r\n shieldObj.response = this.response as IHttpResponse;\r\n shieldObj.data = this.data_;\r\n shieldsPromise.push(shieldObj.protect());\r\n });\r\n return Promise.all(shieldsPromise);\r\n }\r\n\r\n private executeGuardsCheck_(guards: typeof GenericGuard[]) {\r\n const guardPromise = [];\r\n guards.forEach(guard => {\r\n const guardObj = new guard();\r\n guardObj.body = this.body_;\r\n guardObj.cookies = this.cookieManager_;\r\n guardObj.query = this.query_;\r\n guardObj.session = this.session_;\r\n guardObj.request = this.request as IHttpRequest;\r\n guardObj.response = this.response as IHttpResponse;\r\n guardObj.data = this.data_;\r\n guardPromise.push(guardObj.check());\r\n });\r\n return Promise.all(guardPromise);\r\n }\r\n\r\n private execute_() {\r\n try {\r\n this.response.setHeader('X-Powered-By', App__Name);\r\n this.runWallIncoming_().then(wallProtectionResult => {\r\n const isRejectedByWall = wallProtectionResult.indexOf(false) >= 0;\r\n if (isRejectedByWall === false) {\r\n const urlDetail = url.parse(this.request.url, true);\r\n let pathUrl = urlDetail.pathname.toLowerCase();\r\n const extension = path.parse(pathUrl).ext;\r\n if (!Util.isNullOrEmpty(extension)) {\r\n this.handleFileRequest(pathUrl, extension);\r\n }\r\n else {\r\n this.routeMatchInfo_ = parseAndMatchRoute(pathUrl);\r\n if (this.routeMatchInfo_ == null) {\r\n this.onNotFound();\r\n }\r\n else {\r\n const requestType = this.request.method as HTTP_METHOD;\r\n const actionInfo = this.routeMatchInfo_.actionInfo;\r\n if (actionInfo.methodsAllowed != null && actionInfo.methodsAllowed.indexOf(requestType) < 0) {\r\n this.onMethodNotAllowed(actionInfo.methodsAllowed);\r\n }\r\n else {\r\n this.query_ = urlDetail.query;\r\n if (Global.shouldParseCookie === true) {\r\n const rawCookie = this.request.headers[Cookie] as string;\r\n const parsedCookies = parseCookie(rawCookie);\r\n this.session_ = new Global.sessionProvider();\r\n this.cookieManager_ = new CookieManager(parsedCookies);\r\n this.session_.sessionId = parsedCookies[App__Session__Identifier];\r\n this.session_.cookies = this.cookieManager_;\r\n }\r\n this.executeShieldsProtection_().then((shieldProtectionResult: Boolean[]) => {\r\n const isRejectedByShield = shieldProtectionResult.indexOf(false) >= 0;\r\n if (isRejectedByShield === false) {\r\n this.executeGuardsCheck_(actionInfo.guards).then(guardsCheckResult => {\r\n const isRejectedByGuard = guardsCheckResult.indexOf(false) >= 0;\r\n if (isRejectedByGuard === false) {\r\n this.runController_();\r\n }\r\n else {\r\n this.onForbiddenRequest();\r\n }\r\n }).catch(this.onErrorOccured.bind(this));\r\n }\r\n else {\r\n this.onForbiddenRequest();\r\n }\r\n }).catch(this.onErrorOccured.bind(this));\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n this.onForbiddenRequest();\r\n }\r\n }).catch(this.onErrorOccured.bind(this));\r\n }\r\n catch (ex) {\r\n this.onErrorOccured(ex);\r\n }\r\n }\r\n\r\n handle() {\r\n if (this.request.method === HTTP_METHOD.Get) {\r\n this.execute_();\r\n }\r\n else if (Global.shouldParsePost === true) {\r\n this.handlePostData_().then(body => {\r\n this.body_ = body;\r\n this.execute_();\r\n }).catch((err) => {\r\n this.onBadRequest(err);\r\n })\r\n }\r\n }\r\n}","module.exports = require(\"url\");","module.exports = require(\"querystring\");","import { Util } from \"../util\";\r\n\r\n\r\nexport function parseCookie(cookie: string): object {\r\n const value = {};\r\n if (!Util.isNullOrEmpty(cookie)) {\r\n cookie.split(';').forEach(function (val) {\r\n var parts = val.split('=');\r\n value[parts.shift().trim()] = decodeURI(parts.join('='));\r\n });\r\n }\r\n return value;\r\n}","import { HttpCookie } from \"./http_cookie\";\r\nimport { IHttpCookie } from \"../interfaces/http_cookie\";\r\n\r\nexport class CookieManager {\r\n private responseCookie_: string[] = [];\r\n private cookieCollection_: object;\r\n\r\n constructor(parsedValue: object) {\r\n this.cookieCollection_ = parsedValue;\r\n }\r\n\r\n /**\r\n * return cookie by name\r\n *\r\n * @param {string} name\r\n * @returns\r\n * @memberof CookieManager\r\n */\r\n getCookie(name: string): HttpCookie {\r\n return {\r\n name: name,\r\n value: this.cookieCollection_[name]\r\n } as IHttpCookie;\r\n }\r\n\r\n /**\r\n * add cookie\r\n *\r\n * @param {HttpCookie} cookie\r\n * @memberof CookieManager\r\n */\r\n addCookie(cookie: HttpCookie) {\r\n this.cookieCollection_[cookie.name] = cookie.value;\r\n this.responseCookie_.push(this.getCookieStringFromCookie_(cookie));\r\n }\r\n\r\n /**\r\n * remove cookie\r\n *\r\n * @param {string} name\r\n * @memberof CookieManager\r\n */\r\n removeCookie(name: string) {\r\n this.cookieCollection_[name] = null;\r\n const now = new Date();\r\n this.responseCookie_.push(this.getCookieStringFromCookie_({\r\n name: name,\r\n value: null,\r\n expires: new Date(now.setMinutes(now.getMinutes() - 100))\r\n }));\r\n }\r\n\r\n /**\r\n * collection of http cookie\r\n *\r\n * @readonly\r\n * @memberof CookieManager\r\n */\r\n get cookieCollection() {\r\n return this.cookieCollection_;\r\n }\r\n\r\n /**\r\n * determine whether value exist or not\r\n *\r\n * @param {string} name\r\n * @returns\r\n * @memberof CookieManager\r\n */\r\n isExist(name: string) {\r\n return this.cookieCollection_[name] != null;\r\n }\r\n\r\n private getCookieStringFromCookie_(cookie: HttpCookie) {\r\n let cookieString = `${cookie.name}=${cookie.value};`\r\n if (cookie.expires) {\r\n cookieString += ` Expires =${cookie.expires.toUTCString()};`\r\n }\r\n if (cookie.httpOnly === true) {\r\n cookieString += \" HttpOnly;\"\r\n }\r\n if (cookie.maxAge != null) {\r\n cookieString += ` Max-Age=${cookie.maxAge}`;\r\n }\r\n if (cookie.path) {\r\n cookieString += ` Path=${cookie.path};`\r\n }\r\n if (cookie.domain) {\r\n cookieString += ` Domain=${cookie.path};`\r\n }\r\n return cookieString;\r\n }\r\n}","import { RouteHandler } from \"../route_handler\";\r\nimport { IRouteMatch } from \"../interfaces/route_match\";\r\nimport { FILE_EXTENSION } from \"../enums/file_extension\";\r\nimport { Util } from \"../util\";\r\nimport { Global } from \"../global\";\r\n\r\nfunction isRequestFileType(urlParts: string[]) {\r\n const splitByDotValues = urlParts[urlParts.length - 1].split(\".\");\r\n const fileExtension = splitByDotValues[splitByDotValues.length - 1];\r\n return FILE_EXTENSION[fileExtension] == null ? false : true;\r\n}\r\n\r\nexport function parseAndMatchRoute(url: string) {\r\n let isMatched: boolean = false;\r\n const urlLength = url.length;\r\n // removing / from url;\r\n if (url[urlLength - 1] === \"/\") {\r\n url = url.substr(0, urlLength - 1);\r\n }\r\n // add default path if url is /\r\n url += url === \"\" ? Global.defaultPath : \"\";\r\n const urlParts = url.split(\"/\");\r\n let matchedRoute: IRouteMatch = {\r\n } as IRouteMatch;\r\n const firstPart = urlParts[1];\r\n const route = RouteHandler.routerCollection.find(qry => qry.alias === firstPart);\r\n if (route != null) {\r\n matchedRoute.controller = route.controller;\r\n const urlPartLength = urlParts.length;\r\n if (urlPartLength === 2) {\r\n if (!Util.isNullOrEmpty(route.defaultAction)) {\r\n const routeAction = route.actions.find(qry => qry.action === route.defaultAction);\r\n matchedRoute.actionInfo = routeAction;\r\n matchedRoute.params = {};\r\n matchedRoute.shields = route.shields;\r\n return matchedRoute;\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n isMatched = true;\r\n route.actions.every(routeActionInfo => {\r\n const patternSplit = routeActionInfo.pattern.split(\"/\");\r\n if (urlPartLength === patternSplit.length) {\r\n isMatched = true;\r\n const params = {};\r\n urlParts.every((urlPart, i) => {\r\n const regMatch = patternSplit[i].match(/{(.*)}/);\r\n if (regMatch != null) {\r\n params[regMatch[1]] = urlPart;\r\n }\r\n else if (urlPart !== patternSplit[i]) {\r\n isMatched = false;\r\n return false;\r\n }\r\n return true;\r\n });\r\n if (isMatched === true) {\r\n matchedRoute.actionInfo = routeActionInfo;\r\n matchedRoute.params = params;\r\n matchedRoute.shields = route.shields;\r\n return false;\r\n }\r\n }\r\n else {\r\n isMatched = false;\r\n }\r\n return true;\r\n });\r\n return isMatched ? matchedRoute : null;\r\n }\r\n return null;\r\n}","export enum FILE_EXTENSION {\r\n Ico = \".ico\",\r\n Html = \".html\",\r\n Js = \".js\",\r\n Json = \".json\",\r\n Css = \".css\",\r\n Png = \".png\",\r\n Jpg = \".jpg\",\r\n Wav = \".wav\",\r\n Mp3 = \".mp3\",\r\n Svg = \".svg\",\r\n Pdf = \".pdf\",\r\n Doc = \".doc\",\r\n Eot = \".eot\",\r\n Ttf = \".ttf\"\r\n}","module.exports = require(\"path\");","import { FileHelper } from \"./helpers/file_helper\";\r\nimport { HTTP_STATUS_CODE } from \"./enums/http_status_code\";\r\nimport { Global } from \"./global\";\r\nimport * as path from \"path\";\r\nimport { Current__Directory, Content__Type } from \"./constant\";\r\nimport { RequestHandlerHelper } from \"./request_handler_helper\";\r\nimport * as Fs from \"fs\";\r\nimport { getMimeTypeFromExtension } from \"./helpers/get_mime_type_from_extension\";\r\nexport class FileHandler extends RequestHandlerHelper {\r\n\r\n private getRequiredFolder_(path: string) {\r\n const splittedValue = path.split(\"/\");\r\n if (splittedValue.length > 2) {\r\n return splittedValue[1];\r\n }\r\n return \"/\";\r\n }\r\n\r\n\r\n protected handleFileRequest(filePath: string, fileType: string) {\r\n const folderRequired = this.getRequiredFolder_(filePath);\r\n if (Global.foldersAllowed.findIndex(qry => qry === folderRequired) >= 0) {\r\n let absolutePath = path.join(Current__Directory, filePath);\r\n FileHelper.isPathExist(absolutePath).then(isExist => {\r\n if (isExist === true) {\r\n FileHelper.isDirectory(absolutePath).then(isDirectory => {\r\n if (isDirectory === true) {\r\n absolutePath += '/index.html';\r\n FileHelper.isPathExist(absolutePath).then(isFileExist => {\r\n if (isFileExist === true) {\r\n this.sendFile_(absolutePath, fileType);\r\n }\r\n else {\r\n this.onNotFound();\r\n }\r\n });\r\n }\r\n else {\r\n this.sendFile_(absolutePath, fileType);\r\n }\r\n }).catch(this.onErrorOccured.bind(this));\r\n }\r\n else {\r\n this.onNotFound();\r\n }\r\n\r\n }).catch(this.onErrorOccured.bind(this));\r\n }\r\n else {\r\n this.onNotFound();\r\n }\r\n }\r\n\r\n private sendFile_(path: string, fileType: string) {\r\n const readStream = Fs.createReadStream(path);\r\n // Handle non-existent file\r\n readStream.on('error', this.onErrorOccured.bind(this));\r\n this.response.statusCode = HTTP_STATUS_CODE.Ok;\r\n let mimeType;\r\n if (fileType[0] === '.') { // its extension\r\n mimeType = getMimeTypeFromExtension(fileType);\r\n }\r\n else { // mime type\r\n mimeType = fileType;\r\n }\r\n this.response.setHeader(Content__Type, mimeType);\r\n readStream.pipe(this.response);\r\n }\r\n}","import * as fs from \"fs\";\r\nimport { promise } from \"./promise\";\r\n\r\nexport class FileHelper {\r\n\r\n static isPathExist(path: string): Promise {\r\n return promise((resolve, reject) => {\r\n try {\r\n fs.exists(path, (isExist) => {\r\n resolve(isExist);\r\n })\r\n }\r\n catch (ex) {\r\n reject(ex);\r\n }\r\n })\r\n }\r\n\r\n static isDirectory(path: string): Promise {\r\n return promise((resolve, reject) => {\r\n try {\r\n fs.lstat(path, (err, status) => {\r\n if (err) {\r\n reject(err);\r\n }\r\n else {\r\n resolve(status.isDirectory());\r\n }\r\n })\r\n }\r\n catch (ex) {\r\n reject(ex);\r\n }\r\n })\r\n }\r\n\r\n static readFile(path: string): Promise {\r\n return promise((resolve, reject) => {\r\n try {\r\n fs.readFile(path, (err, data) => {\r\n if (err) {\r\n reject(err);\r\n }\r\n else {\r\n resolve(data);\r\n }\r\n })\r\n }\r\n catch (ex) {\r\n reject(ex);\r\n }\r\n })\r\n }\r\n}\r\n","module.exports = require(\"fs\");","export enum HTTP_STATUS_CODE {\r\n Not_Found = 404,\r\n Ok = 200,\r\n Internal_Server_Error = 500,\r\n Bad_Request = 400,\r\n MethodNotAllowed = 405,\r\n Forbidden = 403,\r\n Not_Acceptable = 406\r\n}","import { HTTP_STATUS_CODE } from \"./enums/http_status_code\";\r\nimport * as http from \"http\";\r\nimport { Content__Type } from \"./constant\";\r\nimport { MIME_TYPE } from \"./enums/mime_type\";\r\nimport { HTTP_METHOD } from \"./enums/http_method\";\r\nimport { Global } from \"./global\";\r\nimport * as Negotiator from \"negotiator\";\r\nexport class RequestHandlerHelper {\r\n protected response: http.ServerResponse;\r\n\r\n protected request: http.IncomingMessage;\r\n\r\n protected getContentTypeFromNegotiation(type: MIME_TYPE) {\r\n const negotiator = new Negotiator(this.request);\r\n let availableTypes: MIME_TYPE[] = this.getAvailableTypes_(type);\r\n if (availableTypes == null) {\r\n availableTypes = [type];\r\n }\r\n return negotiator.mediaType(availableTypes);\r\n }\r\n\r\n private getAvailableTypes_(type: MIME_TYPE) {\r\n switch (type) {\r\n case MIME_TYPE.Json:\r\n case MIME_TYPE.Xml:\r\n return [MIME_TYPE.Json, MIME_TYPE.Xml];\r\n case MIME_TYPE.Html:\r\n case MIME_TYPE.Css:\r\n case MIME_TYPE.Csv:\r\n case MIME_TYPE.Js:\r\n case MIME_TYPE.Rtf:\r\n case MIME_TYPE.Text:\r\n return [MIME_TYPE.Text, MIME_TYPE.Html, MIME_TYPE.Js,\r\n MIME_TYPE.Css, MIME_TYPE.Rtf, MIME_TYPE.Csv];\r\n }\r\n return null;\r\n }\r\n\r\n protected onBadRequest(error) {\r\n\r\n new Global.errorHandler().onBadRequest(error).then(errMessage => {\r\n this.response.writeHead(HTTP_STATUS_CODE.Bad_Request, { [Content__Type]: MIME_TYPE.Html });\r\n this.response.end(errMessage);\r\n }).catch(err => {\r\n this.response.end(JSON.stringify(err));\r\n })\r\n }\r\n\r\n protected onForbiddenRequest() {\r\n this.response.writeHead(HTTP_STATUS_CODE.Forbidden, { [Content__Type]: MIME_TYPE.Html });\r\n new Global.errorHandler().onForbiddenRequest().then(errMessage => {\r\n this.response.end(errMessage);\r\n }).catch(err => {\r\n this.response.end(JSON.stringify(err));\r\n })\r\n }\r\n\r\n protected onNotAcceptableRequest() {\r\n this.response.writeHead(HTTP_STATUS_CODE.Not_Acceptable, { [Content__Type]: MIME_TYPE.Html });\r\n new Global.errorHandler().onNotAcceptableRequest().then(errMessage => {\r\n this.response.end(errMessage);\r\n }).catch(err => {\r\n this.response.end(JSON.stringify(err));\r\n })\r\n }\r\n\r\n protected onNotFound() {\r\n\r\n new Global.errorHandler().onNotFound(this.request.url).then(result => {\r\n this.response.writeHead(HTTP_STATUS_CODE.Not_Found, { [Content__Type]: MIME_TYPE.Html });\r\n this.response.end(result);\r\n }).catch(err => {\r\n this.response.end(JSON.stringify(err));\r\n })\r\n }\r\n\r\n protected onMethodNotAllowed(allowedMethods: HTTP_METHOD[]) {\r\n new Global.errorHandler().onMethodNotAllowed().then(result => {\r\n this.response.setHeader(\"Allow\", allowedMethods.join(\",\"));\r\n this.response.writeHead(HTTP_STATUS_CODE.MethodNotAllowed, { [Content__Type]: MIME_TYPE.Html });\r\n this.response.end(result);\r\n }).catch(err => {\r\n this.response.end(JSON.stringify(err));\r\n })\r\n }\r\n\r\n protected onErrorOccured(error) {\r\n new Global.errorHandler().onServerError(error).then(result => {\r\n this.response.writeHead(HTTP_STATUS_CODE.Internal_Server_Error, { [Content__Type]: MIME_TYPE.Html });\r\n this.response.end(result);\r\n }).catch(err => {\r\n this.response.end(JSON.stringify(err));\r\n })\r\n }\r\n}","export enum MIME_TYPE {\r\n Text = \"text/plain\",\r\n Json = \"application/json\",\r\n Html = \"text/html\",\r\n Form_Url_Encoded = \"application/x-www-form-urlencoded\",\r\n Css = \"text/css\",\r\n Csv = \"text/csv\",\r\n Js = \"application/javascript\",\r\n Jpeg = \"image/jpeg\",\r\n Png = \"image/png\",\r\n Pdf = \"application/pdf\",\r\n Rtf = \"application/rtf\",\r\n Xml = \"application/xml\",\r\n Xls = \"application/vnd.ms-excel\",\r\n Xlsx = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\r\n Ttf = \"font/ttf\",\r\n Woff = \"font/woff\",\r\n Woff2 = \"font/woff2\",\r\n Svg = \"image/svg+xml\",\r\n Swf = \"application/x-shockwave-flash\"\r\n}","module.exports = require(\"negotiator\");","import { MIME_TYPE } from \"../enums\";\r\n\r\nexport function getMimeTypeFromExtension(ext: string): MIME_TYPE {\r\n switch (ext) {\r\n case \".txt\":\r\n return MIME_TYPE.Text;\r\n case \".png\":\r\n return MIME_TYPE.Png;\r\n case \".css\":\r\n return MIME_TYPE.Css;\r\n case \".js\":\r\n return MIME_TYPE.Js;\r\n case \".json\":\r\n return MIME_TYPE.Json;\r\n \r\n }\r\n}","export * from './mime_type';\r\nexport * from './http_method';","export enum HTTP_METHOD {\r\n Get = \"GET\",\r\n POST = \"POST\",\r\n PUT = \"PUT\",\r\n PATCH = \"PATCH\"\r\n}","module.exports = require(\"jsontoxml\");","import { SessionProvider } from \"./abstracts\";\r\nimport { ISessionValue } from \"./interfaces/session_value\";\r\nimport { promise } from \"./helpers/promise\";\r\n\r\ninterface ISessionValueFormat {\r\n identifier: string;\r\n datas: ISessionValue[]\r\n}\r\n\r\nconst sessionValues: ISessionValueFormat[] = [];\r\n\r\nexport class MemorySessionProvider extends SessionProvider {\r\n\r\n get(key: string): Promise {\r\n return promise((resolve, reject) => {\r\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\r\n if (savedValue == null) {\r\n resolve(false);\r\n }\r\n else {\r\n const value = savedValue.datas.find(qry => qry.key === key);\r\n resolve(value);\r\n }\r\n });\r\n }\r\n\r\n isExist(key: string): Promise {\r\n return promise((resolve, reject) => {\r\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\r\n if (savedValue == null) {\r\n resolve(false);\r\n }\r\n else {\r\n const index = savedValue.datas.findIndex(qry => qry.key === key);\r\n resolve(index >= 0);\r\n }\r\n });\r\n }\r\n\r\n getAll(): Promise {\r\n return promise((resolve, reject) => {\r\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\r\n resolve(savedValue == null ? [] : savedValue.datas);\r\n });\r\n }\r\n\r\n set(key: string, val: any): Promise {\r\n return promise((resolve, reject) => {\r\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\r\n if (savedValue == null) {\r\n this.createSession().then(() => {\r\n sessionValues.push({\r\n identifier: this.sessionId,\r\n datas: [{\r\n key: key,\r\n value: val\r\n }]\r\n })\r\n });\r\n }\r\n else {\r\n savedValue.datas.push({\r\n key: key,\r\n value: val\r\n })\r\n }\r\n // this.createSession().then(sessionId => {\r\n // if (sessionId == null) { // session already created\r\n // const index = sessionValues.findIndex(q => q.identifier === this.sessionId);\r\n // if (index >= 0) {\r\n // const savedValue = sessionValues[index];\r\n // savedValue.datas.push({\r\n // key: key,\r\n // value: val\r\n // })\r\n // }\r\n // resolve(null);\r\n // }\r\n // else { // session created\r\n\r\n // this.sessionId = sessionId;\r\n // sessionValues.push({\r\n // identifier: this.sessionId,\r\n // datas: [{\r\n // key: key,\r\n // value: val\r\n // }]\r\n // })\r\n // }\r\n // });\r\n });\r\n }\r\n\r\n setMany(values: ISessionValue[]) {\r\n return promise((resolve, reject) => {\r\n const promises: Promise[] = [];\r\n values.forEach(value => {\r\n promises.push(this.set(value.key, value.value));\r\n })\r\n Promise.all(promises).then(results => {\r\n resolve();\r\n }).catch(reject);\r\n });\r\n }\r\n\r\n remove(key: string): Promise {\r\n return promise((resolve, reject) => {\r\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\r\n if (savedValue != null) {\r\n const index = savedValue.datas.findIndex(q => q.key === key);\r\n savedValue.datas.splice(index, 1);\r\n }\r\n resolve(null);\r\n });\r\n }\r\n}","export * from './error_handler';","import { IException } from \"../interfaces/exception\";\r\nimport { promise } from \"../helpers/promise\";\r\n\r\nexport class ErrorHandler {\r\n onServerError(ex: IException): Promise {\r\n return promise((resolve, reject) => {\r\n let errMessage = `

internal server error

\r\n

message : ${ex.message}

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

stacktrace: ${ex.stack}

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

type: ${ex.type}

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

Bad Request

\r\n

message : ${ex.message}

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

stacktrace: ${ex.stack}

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

type: ${ex.type}

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

Forbidden

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

Not Acceptable

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

Not allowed.

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

The requested resource ${url} was not found.

`;\r\n resolve(errMessage);\r\n });\r\n }\r\n}","export * from './json_result';\r\nexport * from './text_result';\r\nexport * from './html_result';\r\nexport * from './render_view';\r\nexport * from './download_result';\r\nexport * from './file_result';","\r\nimport { MIME_TYPE } from \"../enums\";\r\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\r\nimport { HttpResult } from \"../types/http_result\";\r\n\r\nexport function jsonResult(value: any) {\r\n return {\r\n contentType: MIME_TYPE.Json,\r\n responseData: value,\r\n statusCode: HTTP_STATUS_CODE.Ok\r\n } as HttpResult;\r\n}","import { MIME_TYPE } from \"../enums\";\r\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\r\nimport { HttpResult } from \"../types/http_result\";\r\n\r\nexport function textResult(text: string) {\r\n return {\r\n contentType: MIME_TYPE.Text,\r\n responseData: text,\r\n statusCode: HTTP_STATUS_CODE.Ok\r\n } as HttpResult;\r\n}","import { MIME_TYPE } from \"../enums\";\r\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\r\nimport { HttpResult } from \"../types/http_result\";\r\n\r\nexport function htmlResult(html: string) {\r\n return {\r\n contentType: MIME_TYPE.Html,\r\n responseData: html,\r\n statusCode: HTTP_STATUS_CODE.Ok\r\n } as HttpResult;\r\n}","import { Global } from \"../global\";\r\n\r\nexport function renderView(vieWname: string, model: any) {\r\n return Global.viewEngine.render({\r\n view: vieWname,\r\n model: model\r\n });\r\n}","\r\nimport { MIME_TYPE } from \"../enums\";\r\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\r\nimport { HttpResult } from \"../types/http_result\";\r\n\r\nexport function downloadResult(filePath: string, type: MIME_TYPE, downloadFileName?: string) {\r\n return {\r\n contentType: type,\r\n statusCode: HTTP_STATUS_CODE.Ok,\r\n file: {\r\n filePath: filePath,\r\n shouldDownload: true,\r\n alias: downloadFileName\r\n }\r\n } as HttpResult;\r\n}","\r\nimport { MIME_TYPE } from \"../enums\";\r\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\r\nimport { HttpResult } from \"../types/http_result\";\r\n\r\nexport function fileResult(filePath: string, type: MIME_TYPE) {\r\n return {\r\n contentType: type,\r\n statusCode: HTTP_STATUS_CODE.Ok,\r\n file: {\r\n filePath: filePath\r\n }\r\n } as HttpResult;\r\n}","import { app } from \"./create\";\r\n\r\nexport function destroy(callback?: Function) {\r\n app.close(callback);\r\n}"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://Infinity/webpack/bootstrap","webpack://Infinity/./src/code/index.ts","webpack://Infinity/./src/code/abstracts/index.ts","webpack://Infinity/./src/code/abstracts/controller.ts","webpack://Infinity/./src/code/abstracts/shield.ts","webpack://Infinity/./src/code/abstracts/session_provider.ts","webpack://Infinity/./src/code/helpers/promise.ts","webpack://Infinity/./src/code/constant.ts","webpack://Infinity/external \"uniqid\"","webpack://Infinity/./src/code/global.ts","webpack://Infinity/./src/code/abstracts/guard.ts","webpack://Infinity/./src/code/abstracts/view_engine.ts","webpack://Infinity/./src/code/decorators/index.ts","webpack://Infinity/./src/code/decorators/declare_as_controller.ts","webpack://Infinity/./src/code/helpers/log_helper.ts","webpack://Infinity/./src/code/enums/error_type.ts","webpack://Infinity/./src/code/route_handler.ts","webpack://Infinity/./src/code/decorators/action.ts","webpack://Infinity/./src/code/decorators/shields.ts","webpack://Infinity/./src/code/decorators/guards.ts","webpack://Infinity/./src/code/decorators/route.ts","webpack://Infinity/./src/code/decorators/default_action.ts","webpack://Infinity/./src/code/create.ts","webpack://Infinity/external \"http\"","webpack://Infinity/./src/code/util.ts","webpack://Infinity/./src/code/request_handler.ts","webpack://Infinity/external \"url\"","webpack://Infinity/external \"querystring\"","webpack://Infinity/./src/code/helpers/parse_cookie.ts","webpack://Infinity/./src/code/model/cookie_manager.ts","webpack://Infinity/./src/code/helpers/parse_match_route.ts","webpack://Infinity/./src/code/enums/file_extension.ts","webpack://Infinity/external \"path\"","webpack://Infinity/./src/code/file_handler.ts","webpack://Infinity/./src/code/helpers/file_helper.ts","webpack://Infinity/external \"fs\"","webpack://Infinity/./src/code/enums/http_status_code.ts","webpack://Infinity/./src/code/request_handler_helper.ts","webpack://Infinity/./src/code/enums/mime_type.ts","webpack://Infinity/external \"negotiator\"","webpack://Infinity/./src/code/helpers/get_mime_type_from_extension.ts","webpack://Infinity/./src/code/enums/index.ts","webpack://Infinity/./src/code/enums/http_method.ts","webpack://Infinity/external \"jsontoxml\"","webpack://Infinity/./src/code/memory_session_provider.ts","webpack://Infinity/./src/code/model/index.ts","webpack://Infinity/./src/code/model/error_handler.ts","webpack://Infinity/./src/code/helpers/index.ts","webpack://Infinity/./src/code/helpers/json_result.ts","webpack://Infinity/./src/code/helpers/text_result.ts","webpack://Infinity/./src/code/helpers/html_result.ts","webpack://Infinity/./src/code/helpers/render_view.ts","webpack://Infinity/./src/code/helpers/download_result.ts","webpack://Infinity/./src/code/helpers/file_result.ts","webpack://Infinity/./src/code/destroy.ts"],"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,0B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DAAS,CAAC,IAAI;QAC3B,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,wEAAgB,CAAC,EAAE;KACpB,CAAC;AACpB,CAAC;;;;;;;;ACVD;AAAA;AAAA;AAAmC;AAE5B,SAAS,UAAU,CAAC,QAAgB,EAAE,KAAU;IACnD,OAAO,8CAAM,CAAC,UAAU,CAAC,MAAM,CAAC;QAC5B,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,KAAK;KACf,CAAC,CAAC;AACP,CAAC;;;;;;;;ACLD;AAAA;AAAA;AAA6D;AAGtD,SAAS,cAAc,CAAC,QAAgB,EAAE,IAAe,EAAE,gBAAyB;IACvF,OAAO;QACH,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,wEAAgB,CAAC,EAAE;QAC/B,IAAI,EAAE;YACF,QAAQ,EAAE,QAAQ;YAClB,cAAc,EAAE,IAAI;YACpB,KAAK,EAAE,gBAAgB;SAC1B;KACU,CAAC;AACpB,CAAC;;;;;;;;ACbD;AAAA;AAAA;AAA6D;AAGtD,SAAS,UAAU,CAAC,QAAgB,EAAE,IAAe;IACxD,OAAO;QACH,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,wEAAgB,CAAC,EAAE;QAC/B,IAAI,EAAE;YACF,QAAQ,EAAE,QAAQ;SACrB;KACU,CAAC;AACpB,CAAC;;;;;;;;ACbD;AAAA;AAAA;AAA+B;AAExB,SAAS,OAAO,CAAC,QAAmB;IACvC,2CAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AACxB,CAAC","file":"fort.commonjs2.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 = 0);\n","export * from './abstracts/index';\r\nexport * from './decorators/index';\r\nexport * from './create';\r\nexport * from './interfaces/index';\r\nexport * from './enums';\r\nexport * from './helpers/index';\r\nexport * from './model/index';\r\nexport * from './destroy';\r\nexport * from './types/index';","export * from './controller';\r\nexport * from './shield';\r\nexport * from './session_provider';\r\nexport * from './guard';\r\nexport * from './view_engine';","import { IHttpRequest } from \"../interfaces/http_request\";\r\nimport { IHttpResponse } from \"../interfaces/http_response\";\r\nimport { SessionProvider } from \"./session_provider\";\r\nimport { CookieManager } from \"../model/cookie_manager\";\r\nexport abstract class Controller {\r\n request: IHttpRequest;\r\n response: IHttpResponse;\r\n query: { [key: string]: any };\r\n body: { [key: string]: any };\r\n session: SessionProvider;\r\n cookies: CookieManager;\r\n params: { [key: string]: any };\r\n data: { [key: string]: any };\r\n}","import { Controller } from \"./controller\";\r\nimport { IHttpRequest } from \"../interfaces/http_request\";\r\nimport { IHttpResponse } from \"../interfaces/http_response\";\r\nimport { SessionProvider } from \"./session_provider\";\r\nimport { CookieManager } from \"../model/cookie_manager\";\r\n\r\nexport abstract class Shield implements Controller {\r\n request: IHttpRequest;\r\n response: IHttpResponse;\r\n query: { [key: string]: any };\r\n body: { [key: string]: any };\r\n session: SessionProvider;\r\n cookies: CookieManager;\r\n params: { [key: string]: any };\r\n data: { [key: string]: any };\r\n abstract protect(): Promise;\r\n}\r\n\r\n","import { ISessionValue } from \"../interfaces/session_value\";\r\nimport { CookieManager } from \"../model/cookie_manager\";\r\nimport { promise } from \"../helpers/promise\";\r\nimport { App__Session__Identifier } from \"../constant\";\r\nimport * as getUniqId from \"uniqid\";\r\nimport { Global } from \"../global\";\r\n\r\nexport abstract class SessionProvider {\r\n\r\n protected sessionId: string;\r\n protected cookies: CookieManager;\r\n\r\n abstract get(key: string): Promise;\r\n abstract isExist(key: string): Promise;\r\n abstract getAll(): Promise;\r\n abstract set(key: string, val: any): Promise;\r\n abstract setMany(values: ISessionValue[]): Promise;\r\n abstract remove(key: string): Promise;\r\n\r\n protected createSession(): Promise {\r\n return promise((resolve, reject) => {\r\n const now = new Date();\r\n this.sessionId = getUniqId();\r\n this.cookies.addCookie({\r\n name: App__Session__Identifier,\r\n value: this.sessionId,\r\n httpOnly: true,\r\n path: \"/\",\r\n expires: new Date(now.setMinutes(now.getMinutes() + Global.sessionTimeOut))\r\n });\r\n resolve();\r\n });\r\n }\r\n}\r\n\r\n","export function promise(callBack: (resolve, reject) => void) {\r\n return new Promise(callBack);\r\n}","export const Content__Type = \"content-type\";\r\nexport const App__Name = \"infinity\";\r\nexport const App__Session__Identifier = \"infinity_session_id\";\r\nexport const Cookie = \"cookie\";\r\nexport const Set__Cookie = 'set-cookie';\r\nexport const Current__Directory = process.cwd();","module.exports = require(\"uniqid\");","import * as http from \"http\";\r\nimport { GenericSessionProvider } from \"./model/generic_session_provider\";\r\nimport { GenericWall } from \"./model/generic_wall\";\r\nimport { ViewEngine } from \"./abstracts/view_engine\";\r\nimport { ErrorHandler } from \"./model/error_handler\";\r\n\r\nexport class Global {\r\n static request: http.IncomingMessage;\r\n static response: http.ServerResponse;\r\n static port: number;\r\n static viewPath: string;\r\n static shouldParseCookie: boolean;\r\n static shouldParsePost: boolean;\r\n static sessionProvider: typeof GenericSessionProvider;\r\n static sessionTimeOut?: number;\r\n static viewEngine: ViewEngine;\r\n static foldersAllowed: string[];\r\n static walls: typeof GenericWall[] = [];\r\n static errorHandler: typeof ErrorHandler;\r\n static defaultPath?: string;\r\n static connectonKeepAliveTimeout?: number\r\n}","import { IHttpRequest } from \"../interfaces/http_request\";\r\nimport { IHttpResponse } from \"../interfaces/http_response\";\r\nimport { SessionProvider } from \"./session_provider\";\r\nimport { CookieManager } from \"../model/cookie_manager\";\r\nimport { Controller } from \"./controller\";\r\n\r\nexport abstract class Guard implements Controller {\r\n request: IHttpRequest;\r\n response: IHttpResponse;\r\n query: { [key: string]: any };\r\n body: { [key: string]: any };\r\n session: SessionProvider;\r\n cookies: CookieManager;\r\n params: { [key: string]: any };\r\n data: { [key: string]: any };\r\n abstract check(): Promise;\r\n}","import { IViewValue } from \"../interfaces/view_option\";\r\n\r\n\r\nexport abstract class ViewEngine {\r\n abstract render(value: IViewValue): Promise\r\n}","export * from \"./declare_as_controller\";\r\nexport * from './action';\r\nexport * from './shields';\r\nexport * from './guards';\r\nexport * from './route';\r\nexport * from './default_action';","import { LogHelper } from \"../helpers/log_helper\";\r\nimport { RouteHandler } from \"../route_handler\";\r\nimport { GenericController } from \"../model/generic_controller\";\r\nimport { ERROR_TYPE } from \"../enums/error_type\";\r\n\r\nexport function declareAsController(path?: string): ClassDecorator {\r\n return (target: any) => {\r\n const className = target.name;\r\n const classNameLower = className.toLowerCase();\r\n if (path == null) {\r\n if (classNameLower.endsWith('controller') === true) {\r\n path = classNameLower.substr(0, classNameLower.length - 10);\r\n }\r\n else {\r\n new LogHelper(ERROR_TYPE.InvalidControllerName, className).throw();\r\n }\r\n }\r\n else {\r\n path = path.toLowerCase();\r\n }\r\n RouteHandler.addToRouterCollection({\r\n controller: target as typeof GenericController,\r\n controllerName: className,\r\n alias: path,\r\n actions: [],\r\n shields: []\r\n })\r\n };\r\n}","import { IError } from \"../interfaces/error\";\r\nimport { ERROR_TYPE } from \"../enums/error_type\";\r\n\r\n\r\n\r\nexport class LogHelper implements IError {\r\n type: ERROR_TYPE;\r\n message: string;\r\n private info_: any;\r\n\r\n constructor(type: ERROR_TYPE, info?: any) {\r\n this.type = type;\r\n this.info_ = info;\r\n this.message = this.getMsg_();\r\n }\r\n\r\n throw() {\r\n const errMsg = this.get();\r\n throw JSON.stringify(errMsg);\r\n\r\n }\r\n\r\n static log(msg) {\r\n console.log(msg);\r\n }\r\n\r\n logError() {\r\n console.error(this.get());\r\n }\r\n\r\n logWarning() {\r\n console.warn(this.get());\r\n }\r\n\r\n get() {\r\n return {\r\n message: this.message,\r\n type: this.type\r\n } as IError;\r\n }\r\n\r\n private getMsg_() {\r\n let errMsg: string;\r\n switch (this.type) {\r\n case ERROR_TYPE.InvalidControllerName:\r\n errMsg = `Invalid controller name - '${this.info_}'. Controller name must contain 'controller'.`\r\n break;\r\n case ERROR_TYPE.InvalidContentType:\r\n errMsg = `Content type - '${this.info_}' is not valid. Please create an issue if you think this is valid type.`\r\n break;\r\n default:\r\n errMsg = this.message;\r\n break;\r\n }\r\n return errMsg;\r\n }\r\n}","export enum ERROR_TYPE {\r\n InvalidControllerName = \"invalid_controller_name\",\r\n InvalidContentType = \"invalid_content_type\",\r\n PortInUse = \"port_in_use\"\r\n}","import { IRouteInfo } from \"./interfaces/route_info\";\r\nimport { GenericShield } from \"./model/generic_shield\";\r\nimport { IRouteActionInfo } from \"./interfaces/route_action_info\";\r\nimport { GenericGuard } from \"./model/generic_guard\";\r\n\r\nconst routerCollection: IRouteInfo[] = [];\r\nexport class RouteHandler {\r\n\r\n static get routerCollection() {\r\n return routerCollection;\r\n }\r\n\r\n static addToRouterCollection(value: IRouteInfo) {\r\n const route = routerCollection.find(x => x.controllerName === value.controllerName);\r\n if (route == null) {\r\n routerCollection.push(value);\r\n }\r\n else {\r\n route.controller = value.controller;\r\n route.alias = value.alias;\r\n route.actions.forEach(actionInfo => {\r\n if (actionInfo.pattern.indexOf(value.alias) < 0) {\r\n actionInfo.pattern = `/${value.alias}/${actionInfo.pattern}`;\r\n }\r\n })\r\n }\r\n\r\n }\r\n\r\n static addShields(shields: typeof GenericShield[], className: string) {\r\n const index = routerCollection.findIndex(x => x.controllerName === className);\r\n if (index < 0) {\r\n routerCollection.push({\r\n actions: [],\r\n controller: null,\r\n controllerName: className,\r\n shields: shields,\r\n alias: null\r\n });\r\n }\r\n else {\r\n routerCollection[index].shields = shields;\r\n }\r\n }\r\n\r\n static addAction(newAction: IRouteActionInfo, className: string, isDefault?: boolean) {\r\n const router = routerCollection.find(x => x.controllerName === className);\r\n if (router == null) {\r\n routerCollection.push({\r\n actions: [newAction],\r\n controller: null,\r\n controllerName: className,\r\n shields: [],\r\n alias: null,\r\n defaultAction: isDefault === true ? newAction.action : \"\"\r\n });\r\n }\r\n else {\r\n if (isDefault === true) {\r\n router.defaultAction = newAction.action\r\n }\r\n const savedAction = router.actions.find(val => val.action === newAction.action);\r\n if (savedAction == null) {\r\n newAction.pattern = router.alias == null ? newAction.pattern : `/${router.alias}/${newAction.pattern}`;\r\n router.actions.push(newAction);\r\n }\r\n else {\r\n savedAction.methodsAllowed = newAction.methodsAllowed;\r\n savedAction.pattern = router.alias == null ? savedAction.pattern : `/${router.alias}/${savedAction.pattern}`;;\r\n }\r\n }\r\n }\r\n\r\n static addGuards(guards: typeof GenericGuard[], className: string, actionName: string) {\r\n const index = routerCollection.findIndex(x => x.controllerName === className);\r\n const pattern = actionName.toLowerCase();\r\n if (index < 0) {\r\n routerCollection.push({\r\n actions: [{\r\n action: actionName,\r\n guards: guards,\r\n methodsAllowed: null,\r\n pattern: pattern\r\n }],\r\n controller: null,\r\n controllerName: className,\r\n shields: [],\r\n alias: null\r\n });\r\n }\r\n else {\r\n const savedAction = routerCollection[index].actions.find(val => val.action === actionName);\r\n if (savedAction == null) {\r\n routerCollection[index].actions.push({\r\n action: actionName,\r\n guards: guards,\r\n methodsAllowed: null,\r\n pattern: pattern\r\n });\r\n }\r\n else {\r\n savedAction.guards = guards;\r\n }\r\n }\r\n }\r\n\r\n static addPattern(pattern: string, className: string, actionName: string) {\r\n const router = routerCollection.find(x => x.controllerName === className);\r\n if (router == null) {\r\n routerCollection.push({\r\n actions: [{\r\n action: actionName,\r\n guards: [],\r\n methodsAllowed: null,\r\n pattern: pattern\r\n }],\r\n controller: null,\r\n controllerName: className,\r\n shields: [],\r\n alias: null\r\n });\r\n }\r\n else {\r\n const savedAction = router.actions.find(val => val.action === actionName);\r\n pattern = router.alias == null ? pattern : `/${router.alias}/${pattern}`;\r\n if (savedAction == null) {\r\n router.actions.push({\r\n action: actionName,\r\n guards: [],\r\n methodsAllowed: null,\r\n pattern: pattern\r\n });\r\n }\r\n else {\r\n savedAction.pattern = pattern;\r\n }\r\n }\r\n }\r\n}","import { HTTP_METHOD } from \"../enums\";\r\nimport { RouteHandler } from \"../route_handler\";\r\nimport { IRouteActionInfo } from \"../interfaces/route_action_info\";\r\n\r\nexport function action(allowedMethods?: HTTP_METHOD[]): MethodDecorator {\r\n return function (target: any, methodName: string, descriptor: PropertyDescriptor) {\r\n const className = (target.constructor.name as string);\r\n const actionInfo: IRouteActionInfo = {\r\n action: methodName,\r\n methodsAllowed: allowedMethods,\r\n guards: [],\r\n pattern: methodName.toLowerCase()\r\n };\r\n RouteHandler.addAction(actionInfo, className);\r\n }\r\n}\r\n","import { Shield } from \"../abstracts\";\r\nimport { RouteHandler } from \"../route_handler\";\r\nimport { GenericShield } from \"../model/generic_shield\";\r\n\r\nexport function shields(shields: typeof Shield[]): ClassDecorator {\r\n return (target: any) => {\r\n const className = target.name;\r\n RouteHandler.addShields(shields as typeof GenericShield[], className);\r\n };\r\n}","import { RouteHandler } from \"../route_handler\";\r\nimport { GenericGuard } from \"../model/generic_guard\";\r\nimport { Guard } from \"../abstracts/guard\";\r\n\r\nexport function guards(guards: typeof Guard[]): MethodDecorator {\r\n return (function (target: any, methodName: string, descriptor: PropertyDescriptor) {\r\n const className = (target.constructor.name as string);\r\n RouteHandler.addGuards(guards as typeof GenericGuard[], className, methodName);\r\n })\r\n}","import { RouteHandler } from \"../route_handler\";\r\n\r\nexport function route(format: string): MethodDecorator {\r\n return (function (target: any, methodName: string, descriptor: PropertyDescriptor) {\r\n const className = (target.constructor.name as string);\r\n RouteHandler.addPattern(format,className,methodName);\r\n })\r\n}","import { RouteHandler } from \"../route_handler\";\r\nimport { HTTP_METHOD } from \"../enums/http_method\";\r\nimport { IRouteActionInfo } from \"../interfaces/route_action_info\";\r\n\r\nexport function defaultAction(allowedMethods?: HTTP_METHOD[]): MethodDecorator {\r\n return function (target: any, methodName: string, descriptor: PropertyDescriptor) {\r\n const className = (target.constructor.name as string);\r\n const actionInfo: IRouteActionInfo = {\r\n action: methodName,\r\n methodsAllowed: allowedMethods,\r\n guards: [],\r\n pattern: methodName.toLowerCase()\r\n };\r\n RouteHandler.addAction(actionInfo, className, true);\r\n }\r\n}\r\n","import * as http from \"http\";\r\nimport { Global } from \"./global\";\r\nimport { Util } from \"./util\";\r\nimport { RequestHandler } from \"./request_handler\";\r\nimport { MemorySessionProvider } from \"./memory_session_provider\";\r\nimport { GenericSessionProvider } from \"./model/generic_session_provider\";\r\nimport { GenericWall } from \"./model/generic_wall\";\r\nimport { ErrorHandler } from \"./model\";\r\nimport { AppOption } from \"./types/app_option\";\r\nimport { LogHelper } from \"./helpers/log_helper\";\r\nimport { ERROR_TYPE } from \"./enums/error_type\";\r\n\r\nexport let app: http.Server;\r\nexport function create(option: AppOption) {\r\n if (!Util.isNull(option)) {\r\n Global.port = Util.isNull(option.port) ? 4000 : option.port;\r\n Global.viewEngine = new (option.viewEngine as any)();\r\n Global.shouldParseCookie = Util.isNull(option.shouldParseCookie) ? true : option.shouldParseCookie;\r\n Global.shouldParsePost = Util.isNull(option.shouldParsePost) ? true : option.shouldParsePost;\r\n Global.sessionProvider = Util.isNull(option.sessionProvider) ? MemorySessionProvider as any : option.sessionProvider as typeof GenericSessionProvider;\r\n Global.sessionTimeOut = Util.isNull(option.sessionTimeOut) ? 60 : option.sessionTimeOut;\r\n Global.foldersAllowed = Util.isNull(option.foldersAllowed) ? [] : option.foldersAllowed;\r\n Global.errorHandler = Util.isNull(option.errorHandler) ? ErrorHandler : option.errorHandler;\r\n Global.defaultPath = Util.isNull(option.defaultPath) === true ? \"\" : \"/\" + option.defaultPath.toLowerCase();\r\n Global.connectonKeepAliveTimeout = option.connectonKeepAliveTimeout == null ? 5000 : option.connectonKeepAliveTimeout;\r\n\r\n }\r\n else {\r\n Global.port = 4000;\r\n Global.shouldParseCookie = true;\r\n Global.shouldParsePost = true;\r\n Global.sessionProvider = MemorySessionProvider as any;\r\n Global.sessionTimeOut = 60;\r\n Global.foldersAllowed = [];\r\n Global.walls = [];\r\n Global.errorHandler = ErrorHandler;\r\n }\r\n app = http.createServer((req, res) => {\r\n new RequestHandler(req, res).handle();\r\n }).listen(Global.port).once(\"error\", (err) => {\r\n if ((err as any).code === 'EADDRINUSE') {\r\n throw new LogHelper(ERROR_TYPE.PortInUse).get();\r\n }\r\n else {\r\n throw err;\r\n }\r\n });\r\n app.keepAliveTimeout = Global.connectonKeepAliveTimeout;\r\n}\r\n\r\n","module.exports = require(\"http\");","export class Util {\r\n static isNull(value) {\r\n return value == null;\r\n }\r\n\r\n static isNullOrEmpty(value: string) {\r\n return value == null || value.length === 0;\r\n }\r\n\r\n static isUnDefined(value) {\r\n return typeof value === \"undefined\";\r\n }\r\n}","import * as http from \"http\";\r\nimport * as url from 'url';\r\nimport { Controller } from \"./abstracts/controller\";\r\nimport { Content__Type, App__Name, Cookie, App__Session__Identifier, Set__Cookie } from \"./constant\";\r\nimport * as qs from 'querystring';\r\nimport { Global } from \"./global\";\r\nimport { IHttpRequest } from \"./interfaces/http_request\";\r\nimport { parseCookie } from \"./helpers/parse_cookie\";\r\nimport { CookieManager } from \"./model/cookie_manager\";\r\nimport { IHttpResponse } from \"./interfaces/http_response\";\r\nimport { GenericSessionProvider } from \"./model/generic_session_provider\";\r\nimport { GenericGuard } from \"./model/generic_guard\";\r\nimport { parseAndMatchRoute } from \"./helpers/parse_match_route\";\r\nimport { IRouteMatch } from \"./interfaces/route_match\";\r\nimport * as path from 'path';\r\nimport { Util } from \"./util\";\r\nimport { FileHandler } from \"./file_handler\";\r\nimport { MIME_TYPE } from \"./enums/mime_type\";\r\nimport { HTTP_METHOD } from \"./enums/http_method\";\r\nimport { HttpResult } from \"./types/http_result\";\r\nimport { HTTP_STATUS_CODE } from \"./enums/http_status_code\";\r\nimport * as jsontoxml from \"jsontoxml\";\r\nimport { Wall } from \"./abstracts/wall\";\r\n\r\nexport class RequestHandler extends FileHandler {\r\n private body_: any;\r\n private cookieManager_: CookieManager;\r\n private session_: GenericSessionProvider;\r\n private query_: any;\r\n private data_ = {};\r\n private routeMatchInfo_: IRouteMatch;\r\n\r\n private wallInstances_: Wall[];\r\n\r\n constructor(request: http.IncomingMessage, response: http.ServerResponse) {\r\n super();\r\n this.request = request;\r\n this.response = response;\r\n this.registerEvents();\r\n }\r\n\r\n private registerEvents() {\r\n this.request.on('error', this.onBadRequest);\r\n this.response.on('error', this.onErrorOccured.bind(this));\r\n }\r\n\r\n private handlePostData_() {\r\n const body = [];\r\n let postData;\r\n return new Promise((resolve, reject) => {\r\n this.request.on('data', (chunk) => {\r\n body.push(chunk);\r\n }).on('end', () => {\r\n const bodyBuffer = Buffer.concat(body);\r\n try {\r\n const contentType = this.request.headers[Content__Type];\r\n switch (contentType) {\r\n case MIME_TYPE.Json:\r\n try {\r\n postData = JSON.parse(bodyBuffer.toString());\r\n }\r\n catch (ex) {\r\n reject(\"Post data is invalid\");\r\n return;\r\n }\r\n break;\r\n case MIME_TYPE.Text:\r\n case MIME_TYPE.Html:\r\n postData = bodyBuffer.toString(); break;\r\n case MIME_TYPE.Form_Url_Encoded:\r\n postData = qs.parse(bodyBuffer.toString()); break;\r\n\r\n }\r\n resolve(postData);\r\n }\r\n catch (ex) {\r\n reject(ex);\r\n }\r\n });\r\n });\r\n }\r\n\r\n private runWallOutgoing_() {\r\n const wallsPromise = [];\r\n this.wallInstances_.forEach(wallObj => {\r\n wallsPromise.push(wallObj.onOutgoing());\r\n });\r\n return Promise.all(wallsPromise);\r\n }\r\n\r\n private runWallIncoming_() {\r\n const wallsPromise = this.wallInstances_ = [];\r\n Global.walls.forEach(wall => {\r\n var wallObj = new wall();\r\n wallObj.body = this.body_;\r\n wallObj.cookies = this.cookieManager_;\r\n wallObj.query = this.query_;\r\n wallObj.session = this.session_;\r\n wallObj.request = this.request as IHttpRequest;\r\n wallObj.response = this.response as IHttpResponse;\r\n wallObj.data = this.data_;\r\n this.wallInstances_.push(wallObj);\r\n wallsPromise.push(wallObj.onIncoming());\r\n });\r\n return Promise.all(wallsPromise);\r\n }\r\n\r\n private runController_() {\r\n\r\n const controllerObj: Controller = new this.routeMatchInfo_.controller();\r\n controllerObj.request = this.request as IHttpRequest;\r\n controllerObj.response = this.response;\r\n controllerObj.query = this.query_;\r\n controllerObj.body = this.body_;\r\n controllerObj.session = this.session_;\r\n controllerObj.cookies = this.cookieManager_;\r\n controllerObj.params = this.routeMatchInfo_.params;\r\n controllerObj.data = this.data_;\r\n controllerObj[this.routeMatchInfo_.actionInfo.action]().then((result: HttpResult) => {\r\n const getData = () => {\r\n switch (negotiatedMiMeType) {\r\n case MIME_TYPE.Json:\r\n if (typeof result.responseData === 'object') {\r\n return JSON.stringify(result.responseData);\r\n }\r\n return result.responseData;\r\n case MIME_TYPE.Xml:\r\n if (typeof result.responseData === 'object') {\r\n return jsontoxml(result.responseData);\r\n }\r\n return result.responseData;\r\n default:\r\n return result.responseData;\r\n\r\n }\r\n }\r\n if (this.cookieManager_ != null) {\r\n ((this.cookieManager_ as any).responseCookie_ as string[]).forEach(value => {\r\n this.response.setHeader(Set__Cookie, value);\r\n });\r\n }\r\n const contentType = result.contentType || MIME_TYPE.Text;\r\n const negotiatedMiMeType = this.getContentTypeFromNegotiation(contentType);\r\n if (negotiatedMiMeType != null) {\r\n if (result.file == null) {\r\n if (result.responseFormat == null) {\r\n this.response.writeHead(result.statusCode || HTTP_STATUS_CODE.Ok,\r\n { [Content__Type]: negotiatedMiMeType });\r\n this.response.end(getData());\r\n }\r\n else {\r\n const key = Object.keys(result.responseFormat).find(qry => qry === negotiatedMiMeType);\r\n if (key != null) {\r\n this.response.writeHead(result.statusCode || HTTP_STATUS_CODE.Ok,\r\n { [Content__Type]: negotiatedMiMeType });\r\n this.response.end(result.responseFormat[key]());\r\n }\r\n else {\r\n this.onNotAcceptableRequest();\r\n }\r\n }\r\n }\r\n else {\r\n if (result.file.shouldDownload === true) {\r\n const parsedPath = path.parse(result.file.filePath);\r\n const fileName = result.file.alias == null ? parsedPath.name : result.file.alias;\r\n this.response.setHeader(\r\n \"Content-Disposition\",\r\n `attachment;filename=${fileName}.${parsedPath.ext}`\r\n )\r\n }\r\n this.handleFileRequest(result.file.filePath, negotiatedMiMeType);\r\n }\r\n }\r\n else {\r\n this.onNotAcceptableRequest();\r\n }\r\n\r\n }).catch(this.onErrorOccured.bind(this))\r\n }\r\n\r\n private executeShieldsProtection_() {\r\n const shieldsPromise = [];\r\n this.routeMatchInfo_.shields.forEach(shield => {\r\n var shieldObj = new shield();\r\n shieldObj.body = this.body_;\r\n shieldObj.cookies = this.cookieManager_;\r\n shieldObj.query = this.query_;\r\n shieldObj.session = this.session_;\r\n shieldObj.request = this.request as IHttpRequest;\r\n shieldObj.response = this.response as IHttpResponse;\r\n shieldObj.data = this.data_;\r\n shieldsPromise.push(shieldObj.protect());\r\n });\r\n return Promise.all(shieldsPromise);\r\n }\r\n\r\n private executeGuardsCheck_(guards: typeof GenericGuard[]) {\r\n const guardPromise = [];\r\n guards.forEach(guard => {\r\n const guardObj = new guard();\r\n guardObj.body = this.body_;\r\n guardObj.cookies = this.cookieManager_;\r\n guardObj.query = this.query_;\r\n guardObj.session = this.session_;\r\n guardObj.request = this.request as IHttpRequest;\r\n guardObj.response = this.response as IHttpResponse;\r\n guardObj.data = this.data_;\r\n guardPromise.push(guardObj.check());\r\n });\r\n return Promise.all(guardPromise);\r\n }\r\n\r\n private execute_() {\r\n try {\r\n this.response.setHeader('X-Powered-By', App__Name);\r\n this.runWallIncoming_().then(wallProtectionResult => {\r\n const isRejectedByWall = wallProtectionResult.indexOf(false) >= 0;\r\n if (isRejectedByWall === false) {\r\n const urlDetail = url.parse(this.request.url, true);\r\n let pathUrl = urlDetail.pathname.toLowerCase();\r\n const extension = path.parse(pathUrl).ext;\r\n if (!Util.isNullOrEmpty(extension)) {\r\n this.handleFileRequest(pathUrl, extension);\r\n }\r\n else {\r\n this.routeMatchInfo_ = parseAndMatchRoute(pathUrl);\r\n if (this.routeMatchInfo_ == null) {\r\n this.onNotFound();\r\n }\r\n else {\r\n const requestType = this.request.method as HTTP_METHOD;\r\n const actionInfo = this.routeMatchInfo_.actionInfo;\r\n if (actionInfo.methodsAllowed != null && actionInfo.methodsAllowed.indexOf(requestType) < 0) {\r\n this.onMethodNotAllowed(actionInfo.methodsAllowed);\r\n }\r\n else {\r\n this.query_ = urlDetail.query;\r\n if (Global.shouldParseCookie === true) {\r\n const rawCookie = this.request.headers[Cookie] as string;\r\n const parsedCookies = parseCookie(rawCookie);\r\n this.session_ = new Global.sessionProvider();\r\n this.cookieManager_ = new CookieManager(parsedCookies);\r\n this.session_.sessionId = parsedCookies[App__Session__Identifier];\r\n this.session_.cookies = this.cookieManager_;\r\n }\r\n this.executeShieldsProtection_().then((shieldProtectionResult: Boolean[]) => {\r\n const isRejectedByShield = shieldProtectionResult.indexOf(false) >= 0;\r\n if (isRejectedByShield === false) {\r\n this.executeGuardsCheck_(actionInfo.guards).then(guardsCheckResult => {\r\n const isRejectedByGuard = guardsCheckResult.indexOf(false) >= 0;\r\n if (isRejectedByGuard === false) {\r\n this.runController_();\r\n }\r\n else {\r\n this.onForbiddenRequest();\r\n }\r\n }).catch(this.onErrorOccured.bind(this));\r\n }\r\n else {\r\n this.onForbiddenRequest();\r\n }\r\n }).catch(this.onErrorOccured.bind(this));\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n this.onForbiddenRequest();\r\n }\r\n }).catch(this.onErrorOccured.bind(this));\r\n }\r\n catch (ex) {\r\n this.onErrorOccured(ex);\r\n }\r\n }\r\n\r\n handle() {\r\n if (this.request.method === HTTP_METHOD.Get) {\r\n this.execute_();\r\n }\r\n else if (Global.shouldParsePost === true) {\r\n this.handlePostData_().then(body => {\r\n this.body_ = body;\r\n this.execute_();\r\n }).catch((err) => {\r\n this.onBadRequest(err);\r\n })\r\n }\r\n }\r\n}","module.exports = require(\"url\");","module.exports = require(\"querystring\");","import { Util } from \"../util\";\r\n\r\n\r\nexport function parseCookie(cookie: string): object {\r\n const value = {};\r\n if (!Util.isNullOrEmpty(cookie)) {\r\n cookie.split(';').forEach(function (val) {\r\n var parts = val.split('=');\r\n value[parts.shift().trim()] = decodeURI(parts.join('='));\r\n });\r\n }\r\n return value;\r\n}","import { HttpCookie } from \"./http_cookie\";\r\nimport { IHttpCookie } from \"../interfaces/http_cookie\";\r\n\r\nexport class CookieManager {\r\n private responseCookie_: string[] = [];\r\n private cookieCollection_: object;\r\n\r\n constructor(parsedValue: object) {\r\n this.cookieCollection_ = parsedValue;\r\n }\r\n\r\n /**\r\n * return cookie by name\r\n *\r\n * @param {string} name\r\n * @returns\r\n * @memberof CookieManager\r\n */\r\n getCookie(name: string): HttpCookie {\r\n return {\r\n name: name,\r\n value: this.cookieCollection_[name]\r\n } as IHttpCookie;\r\n }\r\n\r\n /**\r\n * add cookie\r\n *\r\n * @param {HttpCookie} cookie\r\n * @memberof CookieManager\r\n */\r\n addCookie(cookie: HttpCookie) {\r\n this.cookieCollection_[cookie.name] = cookie.value;\r\n this.responseCookie_.push(this.getCookieStringFromCookie_(cookie));\r\n }\r\n\r\n /**\r\n * remove cookie\r\n *\r\n * @param {string} name\r\n * @memberof CookieManager\r\n */\r\n removeCookie(name: string) {\r\n this.cookieCollection_[name] = null;\r\n const now = new Date();\r\n this.responseCookie_.push(this.getCookieStringFromCookie_({\r\n name: name,\r\n value: null,\r\n expires: new Date(now.setMinutes(now.getMinutes() - 100))\r\n }));\r\n }\r\n\r\n /**\r\n * collection of http cookie\r\n *\r\n * @readonly\r\n * @memberof CookieManager\r\n */\r\n get cookieCollection() {\r\n return this.cookieCollection_;\r\n }\r\n\r\n /**\r\n * determine whether value exist or not\r\n *\r\n * @param {string} name\r\n * @returns\r\n * @memberof CookieManager\r\n */\r\n isExist(name: string) {\r\n return this.cookieCollection_[name] != null;\r\n }\r\n\r\n private getCookieStringFromCookie_(cookie: HttpCookie) {\r\n let cookieString = `${cookie.name}=${cookie.value};`\r\n if (cookie.expires) {\r\n cookieString += ` Expires =${cookie.expires.toUTCString()};`\r\n }\r\n if (cookie.httpOnly === true) {\r\n cookieString += \" HttpOnly;\"\r\n }\r\n if (cookie.maxAge != null) {\r\n cookieString += ` Max-Age=${cookie.maxAge}`;\r\n }\r\n if (cookie.path) {\r\n cookieString += ` Path=${cookie.path};`\r\n }\r\n if (cookie.domain) {\r\n cookieString += ` Domain=${cookie.path};`\r\n }\r\n return cookieString;\r\n }\r\n}","import { RouteHandler } from \"../route_handler\";\r\nimport { IRouteMatch } from \"../interfaces/route_match\";\r\nimport { FILE_EXTENSION } from \"../enums/file_extension\";\r\nimport { Util } from \"../util\";\r\nimport { Global } from \"../global\";\r\n\r\nfunction isRequestFileType(urlParts: string[]) {\r\n const splitByDotValues = urlParts[urlParts.length - 1].split(\".\");\r\n const fileExtension = splitByDotValues[splitByDotValues.length - 1];\r\n return FILE_EXTENSION[fileExtension] == null ? false : true;\r\n}\r\n\r\nexport function parseAndMatchRoute(url: string) {\r\n let isMatched: boolean = false;\r\n const urlLength = url.length;\r\n // removing / from url;\r\n if (url[urlLength - 1] === \"/\") {\r\n url = url.substr(0, urlLength - 1);\r\n }\r\n // add default path if url is /\r\n url += url === \"\" ? Global.defaultPath : \"\";\r\n const urlParts = url.split(\"/\");\r\n let matchedRoute: IRouteMatch = {\r\n } as IRouteMatch;\r\n const firstPart = urlParts[1];\r\n const route = RouteHandler.routerCollection.find(qry => qry.alias === firstPart);\r\n if (route != null) {\r\n matchedRoute.controller = route.controller;\r\n const urlPartLength = urlParts.length;\r\n if (urlPartLength === 2) {\r\n if (!Util.isNullOrEmpty(route.defaultAction)) {\r\n const routeAction = route.actions.find(qry => qry.action === route.defaultAction);\r\n matchedRoute.actionInfo = routeAction;\r\n matchedRoute.params = {};\r\n matchedRoute.shields = route.shields;\r\n return matchedRoute;\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n isMatched = true;\r\n route.actions.every(routeActionInfo => {\r\n const patternSplit = routeActionInfo.pattern.split(\"/\");\r\n if (urlPartLength === patternSplit.length) {\r\n isMatched = true;\r\n const params = {};\r\n urlParts.every((urlPart, i) => {\r\n const regMatch = patternSplit[i].match(/{(.*)}/);\r\n if (regMatch != null) {\r\n params[regMatch[1]] = urlPart;\r\n }\r\n else if (urlPart !== patternSplit[i]) {\r\n isMatched = false;\r\n return false;\r\n }\r\n return true;\r\n });\r\n if (isMatched === true) {\r\n matchedRoute.actionInfo = routeActionInfo;\r\n matchedRoute.params = params;\r\n matchedRoute.shields = route.shields;\r\n return false;\r\n }\r\n }\r\n else {\r\n isMatched = false;\r\n }\r\n return true;\r\n });\r\n return isMatched ? matchedRoute : null;\r\n }\r\n return null;\r\n}","export enum FILE_EXTENSION {\r\n Ico = \".ico\",\r\n Html = \".html\",\r\n Js = \".js\",\r\n Json = \".json\",\r\n Css = \".css\",\r\n Png = \".png\",\r\n Jpg = \".jpg\",\r\n Wav = \".wav\",\r\n Mp3 = \".mp3\",\r\n Svg = \".svg\",\r\n Pdf = \".pdf\",\r\n Doc = \".doc\",\r\n Eot = \".eot\",\r\n Ttf = \".ttf\"\r\n}","module.exports = require(\"path\");","import { FileHelper } from \"./helpers/file_helper\";\r\nimport { HTTP_STATUS_CODE } from \"./enums/http_status_code\";\r\nimport { Global } from \"./global\";\r\nimport * as path from \"path\";\r\nimport { Current__Directory, Content__Type } from \"./constant\";\r\nimport { RequestHandlerHelper } from \"./request_handler_helper\";\r\nimport * as Fs from \"fs\";\r\nimport { getMimeTypeFromExtension } from \"./helpers/get_mime_type_from_extension\";\r\nexport class FileHandler extends RequestHandlerHelper {\r\n\r\n private getRequiredFolder_(path: string) {\r\n const splittedValue = path.split(\"/\");\r\n if (splittedValue.length > 2) {\r\n return splittedValue[1];\r\n }\r\n return \"/\";\r\n }\r\n\r\n\r\n protected handleFileRequest(filePath: string, fileType: string) {\r\n const folderRequired = this.getRequiredFolder_(filePath);\r\n if (Global.foldersAllowed.findIndex(qry => qry === folderRequired) >= 0) {\r\n let absolutePath = path.join(Current__Directory, filePath);\r\n FileHelper.isPathExist(absolutePath).then(isExist => {\r\n if (isExist === true) {\r\n FileHelper.isDirectory(absolutePath).then(isDirectory => {\r\n if (isDirectory === true) {\r\n absolutePath += '/index.html';\r\n FileHelper.isPathExist(absolutePath).then(isFileExist => {\r\n if (isFileExist === true) {\r\n this.sendFile_(absolutePath, fileType);\r\n }\r\n else {\r\n this.onNotFound();\r\n }\r\n });\r\n }\r\n else {\r\n this.sendFile_(absolutePath, fileType);\r\n }\r\n }).catch(this.onErrorOccured.bind(this));\r\n }\r\n else {\r\n this.onNotFound();\r\n }\r\n\r\n }).catch(this.onErrorOccured.bind(this));\r\n }\r\n else {\r\n this.onNotFound();\r\n }\r\n }\r\n\r\n private sendFile_(path: string, fileType: string) {\r\n const readStream = Fs.createReadStream(path);\r\n // Handle non-existent file\r\n readStream.on('error', this.onErrorOccured.bind(this));\r\n this.response.statusCode = HTTP_STATUS_CODE.Ok;\r\n let mimeType;\r\n if (fileType[0] === '.') { // its extension\r\n mimeType = getMimeTypeFromExtension(fileType);\r\n }\r\n else { // mime type\r\n mimeType = fileType;\r\n }\r\n this.response.setHeader(Content__Type, mimeType);\r\n readStream.pipe(this.response);\r\n }\r\n}","import * as fs from \"fs\";\r\nimport { promise } from \"./promise\";\r\n\r\nexport class FileHelper {\r\n\r\n static isPathExist(path: string): Promise {\r\n return promise((resolve, reject) => {\r\n try {\r\n fs.exists(path, (isExist) => {\r\n resolve(isExist);\r\n })\r\n }\r\n catch (ex) {\r\n reject(ex);\r\n }\r\n })\r\n }\r\n\r\n static isDirectory(path: string): Promise {\r\n return promise((resolve, reject) => {\r\n try {\r\n fs.lstat(path, (err, status) => {\r\n if (err) {\r\n reject(err);\r\n }\r\n else {\r\n resolve(status.isDirectory());\r\n }\r\n })\r\n }\r\n catch (ex) {\r\n reject(ex);\r\n }\r\n })\r\n }\r\n\r\n static readFile(path: string): Promise {\r\n return promise((resolve, reject) => {\r\n try {\r\n fs.readFile(path, (err, data) => {\r\n if (err) {\r\n reject(err);\r\n }\r\n else {\r\n resolve(data);\r\n }\r\n })\r\n }\r\n catch (ex) {\r\n reject(ex);\r\n }\r\n })\r\n }\r\n}\r\n","module.exports = require(\"fs\");","export enum HTTP_STATUS_CODE {\r\n Not_Found = 404,\r\n Ok = 200,\r\n Internal_Server_Error = 500,\r\n Bad_Request = 400,\r\n MethodNotAllowed = 405,\r\n Forbidden = 403,\r\n Not_Acceptable = 406\r\n}","import { HTTP_STATUS_CODE } from \"./enums/http_status_code\";\r\nimport * as http from \"http\";\r\nimport { Content__Type } from \"./constant\";\r\nimport { MIME_TYPE } from \"./enums/mime_type\";\r\nimport { HTTP_METHOD } from \"./enums/http_method\";\r\nimport { Global } from \"./global\";\r\nimport * as Negotiator from \"negotiator\";\r\nexport class RequestHandlerHelper {\r\n protected response: http.ServerResponse;\r\n\r\n protected request: http.IncomingMessage;\r\n\r\n protected getContentTypeFromNegotiation(type: MIME_TYPE) {\r\n const negotiator = new Negotiator(this.request);\r\n let availableTypes: MIME_TYPE[] = this.getAvailableTypes_(type);\r\n if (availableTypes == null) {\r\n availableTypes = [type];\r\n }\r\n return negotiator.mediaType(availableTypes);\r\n }\r\n\r\n private getAvailableTypes_(type: MIME_TYPE) {\r\n switch (type) {\r\n case MIME_TYPE.Json:\r\n case MIME_TYPE.Xml:\r\n return [MIME_TYPE.Json, MIME_TYPE.Xml];\r\n case MIME_TYPE.Html:\r\n case MIME_TYPE.Css:\r\n case MIME_TYPE.Csv:\r\n case MIME_TYPE.Js:\r\n case MIME_TYPE.Rtf:\r\n case MIME_TYPE.Text:\r\n return [MIME_TYPE.Text, MIME_TYPE.Html, MIME_TYPE.Js,\r\n MIME_TYPE.Css, MIME_TYPE.Rtf, MIME_TYPE.Csv];\r\n }\r\n return null;\r\n }\r\n\r\n protected onBadRequest(error) {\r\n\r\n new Global.errorHandler().onBadRequest(error).then(errMessage => {\r\n this.response.writeHead(HTTP_STATUS_CODE.Bad_Request, { [Content__Type]: MIME_TYPE.Html });\r\n this.response.end(errMessage);\r\n }).catch(err => {\r\n this.response.end(JSON.stringify(err));\r\n })\r\n }\r\n\r\n protected onForbiddenRequest() {\r\n this.response.writeHead(HTTP_STATUS_CODE.Forbidden, { [Content__Type]: MIME_TYPE.Html });\r\n new Global.errorHandler().onForbiddenRequest().then(errMessage => {\r\n this.response.end(errMessage);\r\n }).catch(err => {\r\n this.response.end(JSON.stringify(err));\r\n })\r\n }\r\n\r\n protected onNotAcceptableRequest() {\r\n this.response.writeHead(HTTP_STATUS_CODE.Not_Acceptable, { [Content__Type]: MIME_TYPE.Html });\r\n new Global.errorHandler().onNotAcceptableRequest().then(errMessage => {\r\n this.response.end(errMessage);\r\n }).catch(err => {\r\n this.response.end(JSON.stringify(err));\r\n })\r\n }\r\n\r\n protected onNotFound() {\r\n\r\n new Global.errorHandler().onNotFound(this.request.url).then(result => {\r\n this.response.writeHead(HTTP_STATUS_CODE.Not_Found, { [Content__Type]: MIME_TYPE.Html });\r\n this.response.end(result);\r\n }).catch(err => {\r\n this.response.end(JSON.stringify(err));\r\n })\r\n }\r\n\r\n protected onMethodNotAllowed(allowedMethods: HTTP_METHOD[]) {\r\n new Global.errorHandler().onMethodNotAllowed().then(result => {\r\n this.response.setHeader(\"Allow\", allowedMethods.join(\",\"));\r\n this.response.writeHead(HTTP_STATUS_CODE.MethodNotAllowed, { [Content__Type]: MIME_TYPE.Html });\r\n this.response.end(result);\r\n }).catch(err => {\r\n this.response.end(JSON.stringify(err));\r\n })\r\n }\r\n\r\n protected onErrorOccured(error) {\r\n new Global.errorHandler().onServerError(error).then(result => {\r\n this.response.writeHead(HTTP_STATUS_CODE.Internal_Server_Error, { [Content__Type]: MIME_TYPE.Html });\r\n this.response.end(result);\r\n }).catch(err => {\r\n this.response.end(JSON.stringify(err));\r\n })\r\n }\r\n}","export enum MIME_TYPE {\r\n Text = \"text/plain\",\r\n Json = \"application/json\",\r\n Html = \"text/html\",\r\n Form_Url_Encoded = \"application/x-www-form-urlencoded\",\r\n Css = \"text/css\",\r\n Csv = \"text/csv\",\r\n Js = \"application/javascript\",\r\n Jpeg = \"image/jpeg\",\r\n Png = \"image/png\",\r\n Pdf = \"application/pdf\",\r\n Rtf = \"application/rtf\",\r\n Xml = \"application/xml\",\r\n Xls = \"application/vnd.ms-excel\",\r\n Xlsx = \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\r\n Ttf = \"font/ttf\",\r\n Woff = \"font/woff\",\r\n Woff2 = \"font/woff2\",\r\n Svg = \"image/svg+xml\",\r\n Swf = \"application/x-shockwave-flash\"\r\n}","module.exports = require(\"negotiator\");","import { MIME_TYPE } from \"../enums\";\r\n\r\nexport function getMimeTypeFromExtension(ext: string): MIME_TYPE {\r\n switch (ext) {\r\n case \".txt\":\r\n return MIME_TYPE.Text;\r\n case \".png\":\r\n return MIME_TYPE.Png;\r\n case \".css\":\r\n return MIME_TYPE.Css;\r\n case \".js\":\r\n return MIME_TYPE.Js;\r\n case \".json\":\r\n return MIME_TYPE.Json;\r\n \r\n }\r\n}","export * from './mime_type';\r\nexport * from './http_method';","export enum HTTP_METHOD {\r\n Get = \"GET\",\r\n POST = \"POST\",\r\n PUT = \"PUT\",\r\n PATCH = \"PATCH\"\r\n}","module.exports = require(\"jsontoxml\");","import { SessionProvider } from \"./abstracts\";\r\nimport { ISessionValue } from \"./interfaces/session_value\";\r\nimport { promise } from \"./helpers/promise\";\r\n\r\ninterface ISessionValueFormat {\r\n identifier: string;\r\n datas: ISessionValue[]\r\n}\r\n\r\nconst sessionValues: ISessionValueFormat[] = [];\r\n\r\nexport class MemorySessionProvider extends SessionProvider {\r\n\r\n get(key: string): Promise {\r\n return promise((resolve, reject) => {\r\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\r\n if (savedValue == null) {\r\n resolve(false);\r\n }\r\n else {\r\n const value = savedValue.datas.find(qry => qry.key === key);\r\n resolve(value);\r\n }\r\n });\r\n }\r\n\r\n isExist(key: string): Promise {\r\n return promise((resolve, reject) => {\r\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\r\n if (savedValue == null) {\r\n resolve(false);\r\n }\r\n else {\r\n const index = savedValue.datas.findIndex(qry => qry.key === key);\r\n resolve(index >= 0);\r\n }\r\n });\r\n }\r\n\r\n getAll(): Promise {\r\n return promise((resolve, reject) => {\r\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\r\n resolve(savedValue == null ? [] : savedValue.datas);\r\n });\r\n }\r\n\r\n set(key: string, val: any): Promise {\r\n return promise((resolve, reject) => {\r\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\r\n if (savedValue == null) {\r\n this.createSession().then(() => {\r\n sessionValues.push({\r\n identifier: this.sessionId,\r\n datas: [{\r\n key: key,\r\n value: val\r\n }]\r\n })\r\n });\r\n }\r\n else {\r\n savedValue.datas.push({\r\n key: key,\r\n value: val\r\n })\r\n }\r\n // this.createSession().then(sessionId => {\r\n // if (sessionId == null) { // session already created\r\n // const index = sessionValues.findIndex(q => q.identifier === this.sessionId);\r\n // if (index >= 0) {\r\n // const savedValue = sessionValues[index];\r\n // savedValue.datas.push({\r\n // key: key,\r\n // value: val\r\n // })\r\n // }\r\n // resolve(null);\r\n // }\r\n // else { // session created\r\n\r\n // this.sessionId = sessionId;\r\n // sessionValues.push({\r\n // identifier: this.sessionId,\r\n // datas: [{\r\n // key: key,\r\n // value: val\r\n // }]\r\n // })\r\n // }\r\n // });\r\n });\r\n }\r\n\r\n setMany(values: ISessionValue[]) {\r\n return promise((resolve, reject) => {\r\n const promises: Promise[] = [];\r\n values.forEach(value => {\r\n promises.push(this.set(value.key, value.value));\r\n })\r\n Promise.all(promises).then(results => {\r\n resolve();\r\n }).catch(reject);\r\n });\r\n }\r\n\r\n remove(key: string): Promise {\r\n return promise((resolve, reject) => {\r\n const savedValue = sessionValues.find(q => q.identifier === this.sessionId);\r\n if (savedValue != null) {\r\n const index = savedValue.datas.findIndex(q => q.key === key);\r\n savedValue.datas.splice(index, 1);\r\n }\r\n resolve(null);\r\n });\r\n }\r\n}","export * from './error_handler';","import { IException } from \"../interfaces/exception\";\r\nimport { promise } from \"../helpers/promise\";\r\n\r\nexport class ErrorHandler {\r\n onServerError(ex: IException): Promise {\r\n return promise((resolve, reject) => {\r\n let errMessage = `

internal server error

\r\n

message : ${ex.message}

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

stacktrace: ${ex.stack}

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

type: ${ex.type}

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

Bad Request

\r\n

message : ${ex.message}

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

stacktrace: ${ex.stack}

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

type: ${ex.type}

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

Forbidden

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

Not Acceptable

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

Not allowed.

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

The requested resource ${url} was not found.

`;\r\n resolve(errMessage);\r\n });\r\n }\r\n}","export * from './json_result';\r\nexport * from './text_result';\r\nexport * from './html_result';\r\nexport * from './render_view';\r\nexport * from './download_result';\r\nexport * from './file_result';","\r\nimport { MIME_TYPE } from \"../enums\";\r\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\r\nimport { HttpResult } from \"../types/http_result\";\r\n\r\nexport function jsonResult(value: any) {\r\n return {\r\n contentType: MIME_TYPE.Json,\r\n responseData: value,\r\n statusCode: HTTP_STATUS_CODE.Ok\r\n } as HttpResult;\r\n}","import { MIME_TYPE } from \"../enums\";\r\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\r\nimport { HttpResult } from \"../types/http_result\";\r\n\r\nexport function textResult(text: string) {\r\n return {\r\n contentType: MIME_TYPE.Text,\r\n responseData: text,\r\n statusCode: HTTP_STATUS_CODE.Ok\r\n } as HttpResult;\r\n}","import { MIME_TYPE } from \"../enums\";\r\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\r\nimport { HttpResult } from \"../types/http_result\";\r\n\r\nexport function htmlResult(html: string) {\r\n return {\r\n contentType: MIME_TYPE.Html,\r\n responseData: html,\r\n statusCode: HTTP_STATUS_CODE.Ok\r\n } as HttpResult;\r\n}","import { Global } from \"../global\";\r\n\r\nexport function renderView(vieWname: string, model: any) {\r\n return Global.viewEngine.render({\r\n view: vieWname,\r\n model: model\r\n });\r\n}","\r\nimport { MIME_TYPE } from \"../enums\";\r\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\r\nimport { HttpResult } from \"../types/http_result\";\r\n\r\nexport function downloadResult(filePath: string, type: MIME_TYPE, downloadFileName?: string) {\r\n return {\r\n contentType: type,\r\n statusCode: HTTP_STATUS_CODE.Ok,\r\n file: {\r\n filePath: filePath,\r\n shouldDownload: true,\r\n alias: downloadFileName\r\n }\r\n } as HttpResult;\r\n}","\r\nimport { MIME_TYPE } from \"../enums\";\r\nimport { HTTP_STATUS_CODE } from \"../enums/http_status_code\";\r\nimport { HttpResult } from \"../types/http_result\";\r\n\r\nexport function fileResult(filePath: string, type: MIME_TYPE) {\r\n return {\r\n contentType: type,\r\n statusCode: HTTP_STATUS_CODE.Ok,\r\n file: {\r\n filePath: filePath\r\n }\r\n } as HttpResult;\r\n}","import { app } from \"./create\";\r\n\r\nexport function destroy(callback?: Function) {\r\n app.close(callback);\r\n}"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/ts/global.d.ts b/dist/ts/global.d.ts index 6167d209..bba95baf 100644 --- a/dist/ts/global.d.ts +++ b/dist/ts/global.d.ts @@ -18,4 +18,5 @@ export declare class Global { static walls: typeof GenericWall[]; static errorHandler: typeof ErrorHandler; static defaultPath?: string; + static connectonKeepAliveTimeout?: number; } diff --git a/dist/ts/types/app_option.d.ts b/dist/ts/types/app_option.d.ts index 0648de65..d6dee001 100644 --- a/dist/ts/types/app_option.d.ts +++ b/dist/ts/types/app_option.d.ts @@ -23,4 +23,14 @@ export declare type AppOption = { * @memberof IAppOption */ defaultPath?: string; + /** + * Timeout in milliseconds. Default: 5000 (5 seconds). + * The number of milliseconds of inactivity a server needs to wait for additional incoming data, + * after it has finished writing the last response, before a socket will be destroyed. + * If the server receives new data before the keep-alive timeout has fired, + * it will reset the regular inactivity timeout + * + * @type {number} + */ + connectonKeepAliveTimeout?: number; }; diff --git a/package.json b/package.json index 1deea489..66004ac8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fortjs", - "version": "0.4.0", + "version": "0.5.0", "description": "Modern, Advanced & structured MVC web framework for nodejs targeting good code structures, modularity based on the principle of fortification.", "main": "dist/fort.commonjs2.js", "types": "dist/ts/index.d.ts",