@dooboostore/simple-boot-http-server 1.0.16 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (429) hide show
  1. package/LICENSE.md +7 -0
  2. package/README.MD +6 -47
  3. package/dist/cjs/SimpleBootHttpServer.d.ts.map +1 -0
  4. package/dist/cjs/SimpleBootHttpServer.js +930 -0
  5. package/dist/cjs/SimpleBootHttpServer.js.map +7 -0
  6. package/dist/cjs/codes/HttpHeaders.d.ts.map +1 -0
  7. package/dist/cjs/codes/HttpHeaders.js +71 -0
  8. package/dist/cjs/codes/HttpHeaders.js.map +7 -0
  9. package/dist/cjs/codes/HttpMethod.d.ts.map +1 -0
  10. package/dist/cjs/codes/HttpMethod.js +41 -0
  11. package/dist/cjs/codes/HttpMethod.js.map +7 -0
  12. package/dist/cjs/codes/HttpStatus.d.ts +45 -0
  13. package/dist/cjs/codes/HttpStatus.d.ts.map +1 -0
  14. package/dist/cjs/codes/HttpStatus.js +49 -0
  15. package/dist/cjs/codes/HttpStatus.js.map +7 -0
  16. package/dist/cjs/codes/Mimes.d.ts.map +1 -0
  17. package/dist/cjs/codes/Mimes.js +57 -0
  18. package/dist/cjs/codes/Mimes.js.map +7 -0
  19. package/dist/cjs/codes/index.d.ts +5 -0
  20. package/dist/cjs/codes/index.d.ts.map +1 -0
  21. package/dist/cjs/codes/index.js +145 -0
  22. package/dist/cjs/codes/index.js.map +7 -0
  23. package/dist/cjs/decorators/MethodMapping.d.ts.map +1 -0
  24. package/dist/cjs/decorators/MethodMapping.js +265 -0
  25. package/dist/cjs/decorators/MethodMapping.js.map +7 -0
  26. package/dist/cjs/decorators/index.d.ts +2 -0
  27. package/dist/cjs/decorators/index.d.ts.map +1 -0
  28. package/dist/cjs/decorators/index.js +267 -0
  29. package/dist/cjs/decorators/index.js.map +7 -0
  30. package/dist/cjs/endpoints/CrossDomainHeaderEndPoint.d.ts.map +1 -0
  31. package/dist/cjs/endpoints/CrossDomainHeaderEndPoint.js +55 -0
  32. package/dist/cjs/endpoints/CrossDomainHeaderEndPoint.js.map +7 -0
  33. package/dist/cjs/endpoints/EndPoint.d.ts.map +1 -0
  34. package/dist/cjs/endpoints/EndPoint.js +18 -0
  35. package/dist/cjs/endpoints/EndPoint.js.map +7 -0
  36. package/dist/cjs/endpoints/HeaderEndPoint.d.ts.map +1 -0
  37. package/dist/cjs/endpoints/HeaderEndPoint.js +41 -0
  38. package/dist/cjs/endpoints/HeaderEndPoint.js.map +7 -0
  39. package/dist/cjs/endpoints/index.d.ts +4 -0
  40. package/dist/cjs/endpoints/index.d.ts.map +1 -0
  41. package/dist/cjs/endpoints/index.js +73 -0
  42. package/dist/cjs/endpoints/index.js.map +7 -0
  43. package/dist/cjs/errors/BadRequestError.d.ts.map +1 -0
  44. package/dist/cjs/errors/BadRequestError.js +45 -0
  45. package/dist/cjs/errors/BadRequestError.js.map +7 -0
  46. package/dist/cjs/errors/ForbiddenError.d.ts.map +1 -0
  47. package/dist/cjs/errors/ForbiddenError.js +45 -0
  48. package/dist/cjs/errors/ForbiddenError.js.map +7 -0
  49. package/dist/cjs/errors/HttpError.d.ts.map +1 -0
  50. package/dist/cjs/errors/HttpError.js +36 -0
  51. package/dist/cjs/errors/HttpError.js.map +7 -0
  52. package/dist/cjs/errors/InternalServerError.d.ts.map +1 -0
  53. package/dist/cjs/errors/InternalServerError.js +45 -0
  54. package/dist/cjs/errors/InternalServerError.js.map +7 -0
  55. package/dist/cjs/errors/NotFoundError.d.ts.map +1 -0
  56. package/dist/cjs/errors/NotFoundError.js +45 -0
  57. package/dist/cjs/errors/NotFoundError.js.map +7 -0
  58. package/dist/cjs/errors/UnauthorizedError.d.ts.map +1 -0
  59. package/dist/cjs/errors/UnauthorizedError.js +45 -0
  60. package/dist/cjs/errors/UnauthorizedError.js.map +7 -0
  61. package/dist/cjs/errors/index.d.ts +7 -0
  62. package/dist/cjs/errors/index.d.ts.map +1 -0
  63. package/dist/cjs/errors/index.js +83 -0
  64. package/dist/cjs/errors/index.js.map +7 -0
  65. package/dist/cjs/filters/CacheFilter.d.ts.map +1 -0
  66. package/dist/cjs/filters/CacheFilter.js +153 -0
  67. package/dist/cjs/filters/CacheFilter.js.map +7 -0
  68. package/dist/cjs/filters/Filter.d.ts.map +1 -0
  69. package/dist/cjs/filters/Filter.js +18 -0
  70. package/dist/cjs/filters/Filter.js.map +7 -0
  71. package/dist/cjs/filters/HttpStatusFilter.d.ts.map +1 -0
  72. package/dist/cjs/filters/HttpStatusFilter.js +44 -0
  73. package/dist/cjs/filters/HttpStatusFilter.js.map +7 -0
  74. package/dist/cjs/filters/OpenApi3Filter.d.ts.map +1 -0
  75. package/dist/cjs/filters/OpenApi3Filter.js +83 -0
  76. package/dist/cjs/filters/OpenApi3Filter.js.map +7 -0
  77. package/dist/cjs/filters/ResourceFilter.d.ts.map +1 -0
  78. package/dist/cjs/filters/ResourceFilter.js +91 -0
  79. package/dist/cjs/filters/ResourceFilter.js.map +7 -0
  80. package/dist/cjs/filters/ThrowFilter.d.ts.map +1 -0
  81. package/dist/cjs/filters/ThrowFilter.js +47 -0
  82. package/dist/cjs/filters/ThrowFilter.js.map +7 -0
  83. package/dist/cjs/filters/index.d.ts +7 -0
  84. package/dist/cjs/filters/index.d.ts.map +1 -0
  85. package/dist/cjs/filters/index.js +318 -0
  86. package/dist/cjs/filters/index.js.map +7 -0
  87. package/dist/cjs/index.d.ts +13 -0
  88. package/dist/cjs/index.d.ts.map +1 -0
  89. package/dist/cjs/index.js +1756 -0
  90. package/dist/cjs/index.js.map +7 -0
  91. package/dist/cjs/inject/InjectSituationType.d.ts.map +1 -0
  92. package/dist/cjs/inject/InjectSituationType.js +33 -0
  93. package/dist/cjs/inject/InjectSituationType.js.map +7 -0
  94. package/dist/cjs/inject/index.d.ts +2 -0
  95. package/dist/cjs/inject/index.d.ts.map +1 -0
  96. package/dist/cjs/inject/index.js +35 -0
  97. package/dist/cjs/inject/index.js.map +7 -0
  98. package/dist/cjs/lifecycle/OnInit.d.ts.map +1 -0
  99. package/dist/cjs/lifecycle/OnInit.js +18 -0
  100. package/dist/cjs/lifecycle/OnInit.js.map +7 -0
  101. package/dist/cjs/lifecycle/index.d.ts +2 -0
  102. package/dist/cjs/lifecycle/index.d.ts.map +1 -0
  103. package/dist/cjs/lifecycle/index.js +18 -0
  104. package/dist/cjs/lifecycle/index.js.map +7 -0
  105. package/{models → dist/cjs/models}/RequestResponse.d.ts +1 -3
  106. package/dist/cjs/models/RequestResponse.d.ts.map +1 -0
  107. package/dist/cjs/models/RequestResponse.js +500 -0
  108. package/dist/cjs/models/RequestResponse.js.map +7 -0
  109. package/dist/cjs/models/datas/HeaderData.d.ts.map +1 -0
  110. package/dist/cjs/models/datas/HeaderData.js +35 -0
  111. package/dist/cjs/models/datas/HeaderData.js.map +7 -0
  112. package/dist/cjs/models/datas/MultipartData.d.ts.map +1 -0
  113. package/dist/cjs/models/datas/MultipartData.js +18 -0
  114. package/dist/cjs/models/datas/MultipartData.js.map +7 -0
  115. package/dist/cjs/models/datas/ReqHeader.d.ts.map +1 -0
  116. package/dist/cjs/models/datas/ReqHeader.js +31 -0
  117. package/dist/cjs/models/datas/ReqHeader.js.map +7 -0
  118. package/dist/cjs/models/datas/Resource.d.ts.map +1 -0
  119. package/dist/cjs/models/datas/Resource.js +550 -0
  120. package/dist/cjs/models/datas/Resource.js.map +7 -0
  121. package/dist/cjs/models/datas/body/ReqFormUrlBody.d.ts.map +1 -0
  122. package/dist/cjs/models/datas/body/ReqFormUrlBody.js +31 -0
  123. package/dist/cjs/models/datas/body/ReqFormUrlBody.js.map +7 -0
  124. package/dist/cjs/models/datas/body/ReqJsonBody.d.ts.map +1 -0
  125. package/dist/cjs/models/datas/body/ReqJsonBody.js +31 -0
  126. package/dist/cjs/models/datas/body/ReqJsonBody.js.map +7 -0
  127. package/dist/cjs/models/datas/body/ReqMultipartFormBody.d.ts.map +1 -0
  128. package/dist/cjs/models/datas/body/ReqMultipartFormBody.js +34 -0
  129. package/dist/cjs/models/datas/body/ReqMultipartFormBody.js.map +7 -0
  130. package/dist/cjs/models/index.d.ts +10 -0
  131. package/dist/cjs/models/index.d.ts.map +1 -0
  132. package/dist/cjs/models/index.js +593 -0
  133. package/dist/cjs/models/index.js.map +7 -0
  134. package/dist/cjs/models/method/patch/PatchJson.d.ts.map +1 -0
  135. package/dist/cjs/models/method/patch/PatchJson.js +49 -0
  136. package/dist/cjs/models/method/patch/PatchJson.js.map +7 -0
  137. package/dist/cjs/option/HttpServerOption.d.ts.map +1 -0
  138. package/dist/cjs/option/HttpServerOption.js +67 -0
  139. package/dist/cjs/option/HttpServerOption.js.map +7 -0
  140. package/dist/cjs/option/index.d.ts +2 -0
  141. package/dist/cjs/option/index.d.ts.map +1 -0
  142. package/dist/cjs/option/index.js +69 -0
  143. package/dist/cjs/option/index.js.map +7 -0
  144. package/dist/cjs/package.json +3 -0
  145. package/dist/cjs/resolvers/Resolver.d.ts.map +1 -0
  146. package/dist/cjs/resolvers/Resolver.js +18 -0
  147. package/dist/cjs/resolvers/Resolver.js.map +7 -0
  148. package/{resolvers/ResourceResorver.d.ts → dist/cjs/resolvers/ResourceResolver.d.ts} +2 -2
  149. package/dist/cjs/resolvers/ResourceResolver.d.ts.map +1 -0
  150. package/dist/cjs/resolvers/ResourceResolver.js +571 -0
  151. package/dist/cjs/resolvers/ResourceResolver.js.map +7 -0
  152. package/dist/cjs/resolvers/index.d.ts +3 -0
  153. package/dist/cjs/resolvers/index.d.ts.map +1 -0
  154. package/dist/cjs/resolvers/index.js +571 -0
  155. package/dist/cjs/resolvers/index.js.map +7 -0
  156. package/dist/cjs/session/SessionManager.d.ts.map +1 -0
  157. package/dist/cjs/session/SessionManager.js +577 -0
  158. package/dist/cjs/session/SessionManager.js.map +7 -0
  159. package/dist/cjs/session/index.d.ts +2 -0
  160. package/dist/cjs/session/index.d.ts.map +1 -0
  161. package/dist/cjs/session/index.js +579 -0
  162. package/dist/cjs/session/index.js.map +7 -0
  163. package/dist/esm/SimpleBootHttpServer.d.ts +14 -0
  164. package/dist/esm/SimpleBootHttpServer.d.ts.map +1 -0
  165. package/dist/esm/SimpleBootHttpServer.js +906 -0
  166. package/dist/esm/SimpleBootHttpServer.js.map +7 -0
  167. package/dist/esm/codes/HttpHeaders.d.ts +42 -0
  168. package/dist/esm/codes/HttpHeaders.d.ts.map +1 -0
  169. package/dist/esm/codes/HttpHeaders.js +47 -0
  170. package/dist/esm/codes/HttpHeaders.js.map +7 -0
  171. package/dist/esm/codes/HttpMethod.d.ts +12 -0
  172. package/dist/esm/codes/HttpMethod.d.ts.map +1 -0
  173. package/dist/esm/codes/HttpMethod.js +17 -0
  174. package/dist/esm/codes/HttpMethod.js.map +7 -0
  175. package/dist/esm/codes/HttpStatus.d.ts +45 -0
  176. package/dist/esm/codes/HttpStatus.d.ts.map +1 -0
  177. package/dist/esm/codes/HttpStatus.js +25 -0
  178. package/dist/esm/codes/HttpStatus.js.map +7 -0
  179. package/dist/esm/codes/Mimes.d.ts +28 -0
  180. package/dist/esm/codes/Mimes.d.ts.map +1 -0
  181. package/dist/esm/codes/Mimes.js +33 -0
  182. package/dist/esm/codes/Mimes.js.map +7 -0
  183. package/dist/esm/codes/index.d.ts +5 -0
  184. package/dist/esm/codes/index.d.ts.map +1 -0
  185. package/dist/esm/codes/index.js +116 -0
  186. package/dist/esm/codes/index.js.map +7 -0
  187. package/dist/esm/decorators/MethodMapping.d.ts +74 -0
  188. package/dist/esm/decorators/MethodMapping.d.ts.map +1 -0
  189. package/dist/esm/decorators/MethodMapping.js +211 -0
  190. package/dist/esm/decorators/MethodMapping.js.map +7 -0
  191. package/dist/esm/decorators/index.d.ts +2 -0
  192. package/dist/esm/decorators/index.d.ts.map +1 -0
  193. package/dist/esm/decorators/index.js +211 -0
  194. package/dist/esm/decorators/index.js.map +7 -0
  195. package/dist/esm/endpoints/CrossDomainHeaderEndPoint.d.ts +16 -0
  196. package/dist/esm/endpoints/CrossDomainHeaderEndPoint.d.ts.map +1 -0
  197. package/dist/esm/endpoints/CrossDomainHeaderEndPoint.js +31 -0
  198. package/dist/esm/endpoints/CrossDomainHeaderEndPoint.js.map +7 -0
  199. package/dist/esm/endpoints/EndPoint.d.ts +7 -0
  200. package/dist/esm/endpoints/EndPoint.d.ts.map +1 -0
  201. package/dist/esm/endpoints/EndPoint.js +1 -0
  202. package/dist/esm/endpoints/EndPoint.js.map +7 -0
  203. package/dist/esm/endpoints/HeaderEndPoint.d.ts +12 -0
  204. package/dist/esm/endpoints/HeaderEndPoint.d.ts.map +1 -0
  205. package/dist/esm/endpoints/HeaderEndPoint.js +17 -0
  206. package/dist/esm/endpoints/HeaderEndPoint.js.map +7 -0
  207. package/dist/esm/endpoints/index.d.ts +4 -0
  208. package/dist/esm/endpoints/index.d.ts.map +1 -0
  209. package/dist/esm/endpoints/index.js +46 -0
  210. package/dist/esm/endpoints/index.js.map +7 -0
  211. package/dist/esm/errors/BadRequestError.d.ts +8 -0
  212. package/dist/esm/errors/BadRequestError.d.ts.map +1 -0
  213. package/dist/esm/errors/BadRequestError.js +19 -0
  214. package/dist/esm/errors/BadRequestError.js.map +7 -0
  215. package/dist/esm/errors/ForbiddenError.d.ts +8 -0
  216. package/dist/esm/errors/ForbiddenError.d.ts.map +1 -0
  217. package/dist/esm/errors/ForbiddenError.js +19 -0
  218. package/dist/esm/errors/ForbiddenError.js.map +7 -0
  219. package/dist/esm/errors/HttpError.d.ts +12 -0
  220. package/dist/esm/errors/HttpError.d.ts.map +1 -0
  221. package/dist/esm/errors/HttpError.js +12 -0
  222. package/dist/esm/errors/HttpError.js.map +7 -0
  223. package/dist/esm/errors/InternalServerError.d.ts +8 -0
  224. package/dist/esm/errors/InternalServerError.d.ts.map +1 -0
  225. package/dist/esm/errors/InternalServerError.js +19 -0
  226. package/dist/esm/errors/InternalServerError.js.map +7 -0
  227. package/dist/esm/errors/NotFoundError.d.ts +8 -0
  228. package/dist/esm/errors/NotFoundError.d.ts.map +1 -0
  229. package/dist/esm/errors/NotFoundError.js +19 -0
  230. package/dist/esm/errors/NotFoundError.js.map +7 -0
  231. package/dist/esm/errors/UnauthorizedError.d.ts +8 -0
  232. package/dist/esm/errors/UnauthorizedError.d.ts.map +1 -0
  233. package/dist/esm/errors/UnauthorizedError.js +19 -0
  234. package/dist/esm/errors/UnauthorizedError.js.map +7 -0
  235. package/dist/esm/errors/index.d.ts +7 -0
  236. package/dist/esm/errors/index.d.ts.map +1 -0
  237. package/dist/esm/errors/index.js +52 -0
  238. package/dist/esm/errors/index.js.map +7 -0
  239. package/dist/esm/filters/CacheFilter.d.ts +45 -0
  240. package/dist/esm/filters/CacheFilter.d.ts.map +1 -0
  241. package/dist/esm/filters/CacheFilter.js +129 -0
  242. package/dist/esm/filters/CacheFilter.js.map +7 -0
  243. package/dist/esm/filters/Filter.d.ts +17 -0
  244. package/dist/esm/filters/Filter.d.ts.map +1 -0
  245. package/dist/esm/filters/Filter.js +1 -0
  246. package/dist/esm/filters/Filter.js.map +7 -0
  247. package/dist/esm/filters/HttpStatusFilter.d.ts +20 -0
  248. package/dist/esm/filters/HttpStatusFilter.d.ts.map +1 -0
  249. package/dist/esm/filters/HttpStatusFilter.js +20 -0
  250. package/dist/esm/filters/HttpStatusFilter.js.map +7 -0
  251. package/dist/esm/filters/OpenApi3Filter.d.ts +142 -0
  252. package/dist/esm/filters/OpenApi3Filter.d.ts.map +1 -0
  253. package/dist/esm/filters/OpenApi3Filter.js +57 -0
  254. package/dist/esm/filters/OpenApi3Filter.js.map +7 -0
  255. package/dist/esm/filters/ResourceFilter.d.ts +24 -0
  256. package/dist/esm/filters/ResourceFilter.d.ts.map +1 -0
  257. package/dist/esm/filters/ResourceFilter.js +57 -0
  258. package/dist/esm/filters/ResourceFilter.js.map +7 -0
  259. package/dist/esm/filters/ThrowFilter.d.ts +19 -0
  260. package/dist/esm/filters/ThrowFilter.d.ts.map +1 -0
  261. package/dist/esm/filters/ThrowFilter.js +23 -0
  262. package/dist/esm/filters/ThrowFilter.js.map +7 -0
  263. package/dist/esm/filters/index.d.ts +7 -0
  264. package/dist/esm/filters/index.d.ts.map +1 -0
  265. package/dist/esm/filters/index.js +278 -0
  266. package/dist/esm/filters/index.js.map +7 -0
  267. package/dist/esm/index.d.ts +13 -0
  268. package/dist/esm/index.d.ts.map +1 -0
  269. package/dist/esm/index.js +1662 -0
  270. package/dist/esm/index.js.map +7 -0
  271. package/dist/esm/inject/InjectSituationType.d.ts +4 -0
  272. package/dist/esm/inject/InjectSituationType.d.ts.map +1 -0
  273. package/dist/esm/inject/InjectSituationType.js +9 -0
  274. package/dist/esm/inject/InjectSituationType.js.map +7 -0
  275. package/dist/esm/inject/index.d.ts +2 -0
  276. package/dist/esm/inject/index.d.ts.map +1 -0
  277. package/dist/esm/inject/index.js +9 -0
  278. package/dist/esm/inject/index.js.map +7 -0
  279. package/dist/esm/lifecycle/OnInit.d.ts +5 -0
  280. package/dist/esm/lifecycle/OnInit.d.ts.map +1 -0
  281. package/dist/esm/lifecycle/OnInit.js +1 -0
  282. package/dist/esm/lifecycle/OnInit.js.map +7 -0
  283. package/dist/esm/lifecycle/index.d.ts +2 -0
  284. package/dist/esm/lifecycle/index.d.ts.map +1 -0
  285. package/dist/esm/lifecycle/index.js +1 -0
  286. package/dist/esm/lifecycle/index.js.map +7 -0
  287. package/dist/esm/models/RequestResponse.d.ts +100 -0
  288. package/dist/esm/models/RequestResponse.d.ts.map +1 -0
  289. package/dist/esm/models/RequestResponse.js +475 -0
  290. package/dist/esm/models/RequestResponse.js.map +7 -0
  291. package/dist/esm/models/datas/HeaderData.d.ts +10 -0
  292. package/dist/esm/models/datas/HeaderData.d.ts.map +1 -0
  293. package/dist/esm/models/datas/HeaderData.js +11 -0
  294. package/dist/esm/models/datas/HeaderData.js.map +7 -0
  295. package/dist/esm/models/datas/MultipartData.d.ts +12 -0
  296. package/dist/esm/models/datas/MultipartData.d.ts.map +1 -0
  297. package/dist/esm/models/datas/MultipartData.js +1 -0
  298. package/dist/esm/models/datas/MultipartData.js.map +7 -0
  299. package/dist/esm/models/datas/ReqHeader.d.ts +68 -0
  300. package/dist/esm/models/datas/ReqHeader.d.ts.map +1 -0
  301. package/dist/esm/models/datas/ReqHeader.js +7 -0
  302. package/dist/esm/models/datas/ReqHeader.js.map +7 -0
  303. package/dist/esm/models/datas/Resource.d.ts +11 -0
  304. package/dist/esm/models/datas/Resource.d.ts.map +1 -0
  305. package/dist/esm/models/datas/Resource.js +516 -0
  306. package/dist/esm/models/datas/Resource.js.map +7 -0
  307. package/dist/esm/models/datas/body/ReqFormUrlBody.d.ts +4 -0
  308. package/dist/esm/models/datas/body/ReqFormUrlBody.d.ts.map +1 -0
  309. package/dist/esm/models/datas/body/ReqFormUrlBody.js +7 -0
  310. package/dist/esm/models/datas/body/ReqFormUrlBody.js.map +7 -0
  311. package/dist/esm/models/datas/body/ReqJsonBody.d.ts +4 -0
  312. package/dist/esm/models/datas/body/ReqJsonBody.d.ts.map +1 -0
  313. package/dist/esm/models/datas/body/ReqJsonBody.js +7 -0
  314. package/dist/esm/models/datas/body/ReqJsonBody.js.map +7 -0
  315. package/dist/esm/models/datas/body/ReqMultipartFormBody.d.ts +6 -0
  316. package/dist/esm/models/datas/body/ReqMultipartFormBody.d.ts.map +1 -0
  317. package/dist/esm/models/datas/body/ReqMultipartFormBody.js +10 -0
  318. package/dist/esm/models/datas/body/ReqMultipartFormBody.js.map +7 -0
  319. package/dist/esm/models/index.d.ts +10 -0
  320. package/dist/esm/models/index.d.ts.map +1 -0
  321. package/dist/esm/models/index.js +549 -0
  322. package/dist/esm/models/index.js.map +7 -0
  323. package/dist/esm/models/method/patch/PatchJson.d.ts +8 -0
  324. package/dist/esm/models/method/patch/PatchJson.d.ts.map +1 -0
  325. package/dist/esm/models/method/patch/PatchJson.js +15 -0
  326. package/dist/esm/models/method/patch/PatchJson.js.map +7 -0
  327. package/dist/esm/option/HttpServerOption.d.ts +83 -0
  328. package/dist/esm/option/HttpServerOption.d.ts.map +1 -0
  329. package/dist/esm/option/HttpServerOption.js +43 -0
  330. package/dist/esm/option/HttpServerOption.js.map +7 -0
  331. package/dist/esm/option/index.d.ts +2 -0
  332. package/dist/esm/option/index.d.ts.map +1 -0
  333. package/dist/esm/option/index.js +43 -0
  334. package/dist/esm/option/index.js.map +7 -0
  335. package/dist/esm/resolvers/Resolver.d.ts +5 -0
  336. package/dist/esm/resolvers/Resolver.d.ts.map +1 -0
  337. package/dist/esm/resolvers/Resolver.js +1 -0
  338. package/dist/esm/resolvers/Resolver.js.map +7 -0
  339. package/dist/esm/resolvers/ResourceResolver.d.ts +6 -0
  340. package/dist/esm/resolvers/ResourceResolver.d.ts.map +1 -0
  341. package/dist/esm/resolvers/ResourceResolver.js +538 -0
  342. package/dist/esm/resolvers/ResourceResolver.js.map +7 -0
  343. package/dist/esm/resolvers/index.d.ts +3 -0
  344. package/dist/esm/resolvers/index.d.ts.map +1 -0
  345. package/dist/esm/resolvers/index.js +538 -0
  346. package/dist/esm/resolvers/index.js.map +7 -0
  347. package/dist/esm/session/SessionManager.d.ts +57 -0
  348. package/dist/esm/session/SessionManager.d.ts.map +1 -0
  349. package/dist/esm/session/SessionManager.js +553 -0
  350. package/dist/esm/session/SessionManager.js.map +7 -0
  351. package/dist/esm/session/index.d.ts +2 -0
  352. package/dist/esm/session/index.d.ts.map +1 -0
  353. package/dist/esm/session/index.js +553 -0
  354. package/dist/esm/session/index.js.map +7 -0
  355. package/dist/esm-bundle/dooboostore-simple-boot-http-server.esm.js +1662 -0
  356. package/dist/esm-bundle/dooboostore-simple-boot-http-server.esm.js.map +7 -0
  357. package/dist/umd-bundle/dooboostore-simple-boot-http-server.umd.js +1699 -0
  358. package/dist/umd-bundle/dooboostore-simple-boot-http-server.umd.js.map +7 -0
  359. package/package.json +65 -46
  360. package/SimpleBootHttpServer.js +0 -313
  361. package/codes/HttpHeaders.js +0 -43
  362. package/codes/HttpMethod.js +0 -13
  363. package/codes/HttpStatus.d.ts +0 -20
  364. package/codes/HttpStatus.js +0 -21
  365. package/codes/Mimes.js +0 -29
  366. package/decorators/MethodMapping.js +0 -198
  367. package/endpoints/CrossDomainHeaderEndPoint.js +0 -37
  368. package/endpoints/EndPoint.js +0 -2
  369. package/endpoints/HeaderEndPoint.js +0 -26
  370. package/errors/BadRequestError.js +0 -8
  371. package/errors/ForbiddenError.js +0 -8
  372. package/errors/HttpError.js +0 -8
  373. package/errors/InternalServerError.js +0 -8
  374. package/errors/NotFoundError.js +0 -8
  375. package/errors/UnauthorizedError.js +0 -8
  376. package/filters/CacheFilter.js +0 -145
  377. package/filters/Filter.js +0 -2
  378. package/filters/HttpStatusFilter.js +0 -31
  379. package/filters/OpenApi3Filter.js +0 -57
  380. package/filters/ResourceFilter.js +0 -72
  381. package/filters/ThrowFilter.js +0 -34
  382. package/inject/InjectSituationType.js +0 -5
  383. package/lifecycle/OnInit.js +0 -2
  384. package/models/RequestResponse.js +0 -467
  385. package/models/datas/HeaderData.js +0 -7
  386. package/models/datas/MultipartData.js +0 -2
  387. package/models/datas/ReqHeader.js +0 -3
  388. package/models/datas/Resource.js +0 -55
  389. package/models/datas/body/ReqFormUrlBody.js +0 -3
  390. package/models/datas/body/ReqJsonBody.js +0 -3
  391. package/models/datas/body/ReqMultipartFormBody.js +0 -6
  392. package/models/method/patch/PatchJson.js +0 -11
  393. package/option/HttpServerOption.js +0 -35
  394. package/resolvers/Resolver.js +0 -2
  395. package/resolvers/ResourceResorver.js +0 -18
  396. package/session/SessionManager.js +0 -108
  397. /package/{SimpleBootHttpServer.d.ts → dist/cjs/SimpleBootHttpServer.d.ts} +0 -0
  398. /package/{codes → dist/cjs/codes}/HttpHeaders.d.ts +0 -0
  399. /package/{codes → dist/cjs/codes}/HttpMethod.d.ts +0 -0
  400. /package/{codes → dist/cjs/codes}/Mimes.d.ts +0 -0
  401. /package/{decorators → dist/cjs/decorators}/MethodMapping.d.ts +0 -0
  402. /package/{endpoints → dist/cjs/endpoints}/CrossDomainHeaderEndPoint.d.ts +0 -0
  403. /package/{endpoints → dist/cjs/endpoints}/EndPoint.d.ts +0 -0
  404. /package/{endpoints → dist/cjs/endpoints}/HeaderEndPoint.d.ts +0 -0
  405. /package/{errors → dist/cjs/errors}/BadRequestError.d.ts +0 -0
  406. /package/{errors → dist/cjs/errors}/ForbiddenError.d.ts +0 -0
  407. /package/{errors → dist/cjs/errors}/HttpError.d.ts +0 -0
  408. /package/{errors → dist/cjs/errors}/InternalServerError.d.ts +0 -0
  409. /package/{errors → dist/cjs/errors}/NotFoundError.d.ts +0 -0
  410. /package/{errors → dist/cjs/errors}/UnauthorizedError.d.ts +0 -0
  411. /package/{filters → dist/cjs/filters}/CacheFilter.d.ts +0 -0
  412. /package/{filters → dist/cjs/filters}/Filter.d.ts +0 -0
  413. /package/{filters → dist/cjs/filters}/HttpStatusFilter.d.ts +0 -0
  414. /package/{filters → dist/cjs/filters}/OpenApi3Filter.d.ts +0 -0
  415. /package/{filters → dist/cjs/filters}/ResourceFilter.d.ts +0 -0
  416. /package/{filters → dist/cjs/filters}/ThrowFilter.d.ts +0 -0
  417. /package/{inject → dist/cjs/inject}/InjectSituationType.d.ts +0 -0
  418. /package/{lifecycle → dist/cjs/lifecycle}/OnInit.d.ts +0 -0
  419. /package/{models → dist/cjs/models}/datas/HeaderData.d.ts +0 -0
  420. /package/{models → dist/cjs/models}/datas/MultipartData.d.ts +0 -0
  421. /package/{models → dist/cjs/models}/datas/ReqHeader.d.ts +0 -0
  422. /package/{models → dist/cjs/models}/datas/Resource.d.ts +0 -0
  423. /package/{models → dist/cjs/models}/datas/body/ReqFormUrlBody.d.ts +0 -0
  424. /package/{models → dist/cjs/models}/datas/body/ReqJsonBody.d.ts +0 -0
  425. /package/{models → dist/cjs/models}/datas/body/ReqMultipartFormBody.d.ts +0 -0
  426. /package/{models → dist/cjs/models}/method/patch/PatchJson.d.ts +0 -0
  427. /package/{option → dist/cjs/option}/HttpServerOption.d.ts +0 -0
  428. /package/{resolvers → dist/cjs/resolvers}/Resolver.d.ts +0 -0
  429. /package/{session → dist/cjs/session}/SessionManager.d.ts +0 -0
@@ -0,0 +1,906 @@
1
+ // src/SimpleBootHttpServer.ts
2
+ import { SimpleApplication } from "@dooboostore/simple-boot/SimpleApplication";
3
+
4
+ // src/option/HttpServerOption.ts
5
+ import { SimOption } from "@dooboostore/simple-boot/SimOption";
6
+ var HttpServerOption = class _HttpServerOption extends SimOption {
7
+ static {
8
+ this.DEFAULT_PORT = 8081;
9
+ }
10
+ static {
11
+ this.DEFAULT_HOSTNAME = "127.0.0.1";
12
+ }
13
+ constructor({ serverOption, listen, filters, requestEndPoints, closeEndPoints, errorEndPoints, sessionOption, globalAdvice, fileUploadTempPath, noSuchRouteEndPointMappingThrow, transactionManagerFactory } = {}, initSimOption) {
14
+ super(initSimOption);
15
+ this.serverOption = serverOption;
16
+ this.listen = Object.assign({ port: _HttpServerOption.DEFAULT_PORT, hostname: _HttpServerOption.DEFAULT_HOSTNAME }, listen);
17
+ this.filters = filters;
18
+ this.requestEndPoints = requestEndPoints;
19
+ this.closeEndPoints = closeEndPoints;
20
+ this.errorEndPoints = errorEndPoints;
21
+ this.sessionOption = Object.assign({ key: "SBSESSIONID", expiredTime: 1e3 * 60 * 30 }, sessionOption);
22
+ this.globalAdvice = globalAdvice;
23
+ this.fileUploadTempPath = fileUploadTempPath;
24
+ this.noSuchRouteEndPointMappingThrow = noSuchRouteEndPointMappingThrow;
25
+ this.transactionManagerFactory = transactionManagerFactory;
26
+ }
27
+ get hostname() {
28
+ return this.listen.hostname;
29
+ }
30
+ get port() {
31
+ return this.listen.port;
32
+ }
33
+ get protocol() {
34
+ return this.isSecure ? "https" : "http";
35
+ }
36
+ get address() {
37
+ return `${this.protocol}://${this.hostname}:${this.port}`;
38
+ }
39
+ get isSecure() {
40
+ return this.serverOption && "key" in this.serverOption && "cert" in this.serverOption;
41
+ }
42
+ };
43
+
44
+ // src/SimpleBootHttpServer.ts
45
+ import { IncomingMessage, Server as HttpServer, ServerResponse } from "http";
46
+ import { Server as HttpsServer } from "https";
47
+
48
+ // src/models/RequestResponse.ts
49
+ import { Intent } from "@dooboostore/simple-boot/intent/Intent";
50
+ import { URL, URLSearchParams } from "url";
51
+ import { Buffer } from "buffer";
52
+
53
+ // src/models/datas/body/ReqFormUrlBody.ts
54
+ var ReqFormUrlBody = class {
55
+ };
56
+
57
+ // src/models/datas/body/ReqJsonBody.ts
58
+ var ReqJsonBody = class {
59
+ };
60
+
61
+ // src/models/datas/ReqHeader.ts
62
+ var ReqHeader = class {
63
+ };
64
+
65
+ // src/models/RequestResponse.ts
66
+ import { gzip } from "node-gzip";
67
+ import { FileUtils } from "@dooboostore/core-node/file/FileUtils";
68
+ import { ConvertUtils as CoreConvertUtils } from "@dooboostore/core/convert/ConvertUtils";
69
+ import { ConvertUtils } from "@dooboostore/core-node/convert/ConvertUtils";
70
+ var RequestResponse = class _RequestResponse {
71
+ // protected sessionManager?: SessionManager;
72
+ // constructor(req: IncomingMessage, res: ServerResponse);
73
+ // constructor(req: RequestResponse);
74
+ // constructor(req: IncomingMessage, res: ServerResponse, sessionManager?: SessionManager);
75
+ // constructor(req: IncomingMessage | RequestResponse, res?: ServerResponse, sessionManager?: SessionManager) {
76
+ // // this.req = req;
77
+ // // this.res = res;
78
+ // if (req instanceof RequestResponse) {
79
+ // this.req = req.req;
80
+ // this.res = req.res;
81
+ // this.sessionManager = req.sessionManager;
82
+ // } else {
83
+ // this.req = req;
84
+ // this.res = res!;
85
+ // this.sessionManager = sessionManager;
86
+ // }
87
+ // }
88
+ constructor(req, res, config) {
89
+ if (req instanceof _RequestResponse) {
90
+ this.req = req.req;
91
+ this.res = req.res;
92
+ this.config = config;
93
+ } else {
94
+ this.req = req;
95
+ this.res = res;
96
+ this.config = config;
97
+ }
98
+ }
99
+ get reqSocket() {
100
+ return this.req.socket;
101
+ }
102
+ get reqCookieMap() {
103
+ let cookies = this.reqHeader("Cookie" /* Cookie */) ?? "";
104
+ if (Array.isArray(cookies)) {
105
+ cookies = cookies.join(";");
106
+ }
107
+ const map = /* @__PURE__ */ new Map();
108
+ cookies.split(";").map((it) => it.trim().split("=")).forEach((it) => {
109
+ map.set(it[0], it[1]);
110
+ });
111
+ return map;
112
+ }
113
+ reqCookieGet(key) {
114
+ return this.reqCookieMap.get(key);
115
+ }
116
+ get reqRemoteAddress() {
117
+ const ipHeader = this.req.headers["x-forwarded-for"];
118
+ let ip = this.req.socket.remoteAddress;
119
+ if (Array.isArray(ipHeader)) {
120
+ ip = ipHeader.join(",").split(",").shift();
121
+ } else if (typeof ipHeader === "string") {
122
+ ip = ipHeader.split(",").shift();
123
+ }
124
+ return ip;
125
+ }
126
+ get reqUrlObject() {
127
+ return new URL(this.reqUrl, `${this.reqSocket ? "https://" : "http"}${this.reqHost ?? "localhost"}`);
128
+ }
129
+ get reqUrlPathName() {
130
+ return this.reqUrlObj().pathname ?? "";
131
+ }
132
+ get reqUrl() {
133
+ return this.req.url ?? "";
134
+ }
135
+ reqUrlObj(config) {
136
+ return new URL(`${config?.scheme ?? "http"}://${config?.host ? config?.host : this.reqHeaderFirst("Host" /* Host */) ?? "localhost"}${this.req.url ?? ""}`);
137
+ }
138
+ get reqUrlSearchParamTuples() {
139
+ return Array.from(this.reqUrlObj().searchParams);
140
+ }
141
+ get reqUrlSearchParams() {
142
+ return this.reqUrlObj().searchParams;
143
+ }
144
+ get reqUrlSearchParamsObj() {
145
+ const entries = this.reqUrlObj().searchParams;
146
+ return CoreConvertUtils.toObject(entries);
147
+ }
148
+ get reqPathSearchParamUrl() {
149
+ const reqUrlObj = this.reqUrlObj();
150
+ return reqUrlObj.pathname + (reqUrlObj.searchParams.toString() ? "?" + reqUrlObj.searchParams.toString() : "");
151
+ }
152
+ get reqReadable() {
153
+ return this.req.readable;
154
+ }
155
+ get reqIntent() {
156
+ return new Intent(this.reqPathSearchParamUrl);
157
+ }
158
+ reqHasContentTypeHeader(mime) {
159
+ return (this.reqHeaderFirst("Content-Type" /* ContentType */) ?? "").toLowerCase().indexOf(mime.toLocaleLowerCase()) > -1;
160
+ }
161
+ reqHasAcceptHeader(mime) {
162
+ return (this.reqHeaderFirst("Accept" /* Accept */) ?? "").toLowerCase().indexOf(mime.toLocaleLowerCase()) > -1;
163
+ }
164
+ reqBodyData() {
165
+ return new Promise((resolve, reject) => {
166
+ if (this.reqReadable) {
167
+ const data = [];
168
+ this.req.on("data", (chunk) => data.push(chunk));
169
+ this.req.on("error", (err) => reject(err));
170
+ this.req.on("end", () => {
171
+ this.reqBodyChunk = Buffer.concat(data);
172
+ resolve(this.reqBodyChunk);
173
+ });
174
+ } else {
175
+ resolve(this.reqBodyChunk ?? Buffer.alloc(0));
176
+ }
177
+ });
178
+ }
179
+ resBodyData() {
180
+ return this.resWriteChunk;
181
+ }
182
+ async reqBodyMultipartFormDataObject() {
183
+ const m = await this.reqBodyMultipartFormData();
184
+ const formData = {};
185
+ for (const it of m) {
186
+ if (it.isFile) {
187
+ formData[it.name] = await FileUtils.writeFile(it.value, { originalName: it.filename });
188
+ } else {
189
+ const target = formData[it.name];
190
+ if (Array.isArray(target)) {
191
+ target.push(it.value);
192
+ } else if (typeof target === "string") {
193
+ formData[it.name] = [target, it.value];
194
+ } else {
195
+ formData[it.name] = it.value;
196
+ }
197
+ }
198
+ }
199
+ ;
200
+ return formData;
201
+ }
202
+ reqBodyMultipartFormData() {
203
+ return new Promise((resolve, reject) => {
204
+ const contentTypeHeader = this.req.headers["content-type"];
205
+ if (!contentTypeHeader || !contentTypeHeader.startsWith("multipart/form-data")) {
206
+ return reject(new Error("Invalid Content-Type. Expected multipart/form-data."));
207
+ }
208
+ const boundaryMatch = contentTypeHeader.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
209
+ if (!boundaryMatch) {
210
+ return reject(new Error("Boundary not found in Content-Type header."));
211
+ }
212
+ const boundary = boundaryMatch[1] || boundaryMatch[2];
213
+ if (!boundary) {
214
+ return reject(new Error("Failed to extract boundary."));
215
+ }
216
+ const boundaryBuffer = Buffer.from(`--${boundary}`);
217
+ const crlfBuffer = Buffer.from("\r\n");
218
+ const doubleCrlfBuffer = Buffer.from("\r\n\r\n");
219
+ const chunks = [];
220
+ let totalLength = 0;
221
+ this.req.on("data", (chunk) => {
222
+ chunks.push(chunk);
223
+ totalLength += chunk.length;
224
+ });
225
+ this.req.on("error", (err) => {
226
+ reject(err);
227
+ });
228
+ this.req.on("end", () => {
229
+ if (totalLength === 0) {
230
+ return resolve([]);
231
+ }
232
+ const fullBuffer = Buffer.concat(chunks, totalLength);
233
+ const parsedParts = [];
234
+ let currentPosition = 0;
235
+ let boundaryStartIndex = fullBuffer.indexOf(boundaryBuffer, currentPosition);
236
+ if (boundaryStartIndex === -1) {
237
+ return reject(new Error("Initial boundary not found."));
238
+ }
239
+ currentPosition = boundaryStartIndex + boundaryBuffer.length;
240
+ if (fullBuffer.slice(currentPosition, currentPosition + crlfBuffer.length).equals(crlfBuffer)) {
241
+ currentPosition += crlfBuffer.length;
242
+ }
243
+ while (currentPosition < fullBuffer.length) {
244
+ const nextBoundaryIndex = fullBuffer.indexOf(boundaryBuffer, currentPosition);
245
+ if (nextBoundaryIndex === -1) {
246
+ break;
247
+ }
248
+ let partEndIndex = nextBoundaryIndex;
249
+ if (partEndIndex > crlfBuffer.length && fullBuffer.slice(partEndIndex - crlfBuffer.length, partEndIndex).equals(crlfBuffer)) {
250
+ partEndIndex -= crlfBuffer.length;
251
+ }
252
+ const partBuffer = fullBuffer.slice(currentPosition, partEndIndex);
253
+ const headerBodySeparatorIndex = partBuffer.indexOf(doubleCrlfBuffer);
254
+ if (headerBodySeparatorIndex === -1) {
255
+ console.warn("Skipping malformed part: no header/body separator found.");
256
+ currentPosition = nextBoundaryIndex + boundaryBuffer.length;
257
+ if (fullBuffer.slice(currentPosition, currentPosition + crlfBuffer.length).equals(crlfBuffer)) {
258
+ currentPosition += crlfBuffer.length;
259
+ }
260
+ if (fullBuffer.slice(currentPosition, currentPosition + 2).toString() === "--") break;
261
+ continue;
262
+ }
263
+ const headerBuffer = partBuffer.slice(0, headerBodySeparatorIndex);
264
+ const bodyBuffer = partBuffer.slice(headerBodySeparatorIndex + doubleCrlfBuffer.length);
265
+ const headersStr = headerBuffer.toString("utf-8");
266
+ const headers = {};
267
+ headersStr.split("\r\n").forEach((line) => {
268
+ const colonIndex = line.indexOf(":");
269
+ if (colonIndex > 0) {
270
+ const key = line.substring(0, colonIndex).trim().toLowerCase();
271
+ const value = line.substring(colonIndex + 1).trim();
272
+ headers[key] = value;
273
+ }
274
+ });
275
+ const contentDisposition = headers["content-disposition"];
276
+ if (!contentDisposition) {
277
+ console.warn("Skipping part: no Content-Disposition header.");
278
+ currentPosition = nextBoundaryIndex + boundaryBuffer.length;
279
+ if (fullBuffer.slice(currentPosition, currentPosition + crlfBuffer.length).equals(crlfBuffer)) {
280
+ currentPosition += crlfBuffer.length;
281
+ }
282
+ if (fullBuffer.slice(currentPosition, currentPosition + 2).toString() === "--") break;
283
+ continue;
284
+ }
285
+ const nameMatch = contentDisposition.match(/name="([^"]+)"/i);
286
+ const filenameMatch = contentDisposition.match(/filename="([^"]+)"/i);
287
+ const name = nameMatch ? nameMatch[1] : null;
288
+ const filename = filenameMatch ? filenameMatch[1] : null;
289
+ const contentType = headers["content-type"] || null;
290
+ if (name) {
291
+ const isFile = !!filename;
292
+ const multipartData = {
293
+ name,
294
+ isFile,
295
+ // filename이 있으면 파일로 간주
296
+ filename,
297
+ contentType,
298
+ value: isFile ? bodyBuffer : bodyBuffer.toString("utf-8")
299
+ };
300
+ parsedParts.push(multipartData);
301
+ } else {
302
+ console.warn("Skipping part: 'name' not found in Content-Disposition.");
303
+ }
304
+ currentPosition = nextBoundaryIndex + boundaryBuffer.length;
305
+ if (fullBuffer.slice(currentPosition, currentPosition + crlfBuffer.length).equals(crlfBuffer)) {
306
+ currentPosition += crlfBuffer.length;
307
+ }
308
+ if (fullBuffer.slice(currentPosition, currentPosition + 2).toString() === "--") {
309
+ break;
310
+ }
311
+ }
312
+ resolve(parsedParts);
313
+ });
314
+ });
315
+ }
316
+ async reqBodyStringData() {
317
+ const data = (await this.reqBodyData()).toString();
318
+ return data;
319
+ }
320
+ async reqBodyJsonData() {
321
+ return JSON.parse(await this.reqBodyStringData());
322
+ }
323
+ async reqBodyFormUrlData() {
324
+ const data = await this.reqBodyStringData();
325
+ const formData = {};
326
+ Array.from(new URLSearchParams(data).entries()).forEach(([k, v]) => {
327
+ const target = formData[k];
328
+ if (Array.isArray(target)) {
329
+ target.push(v);
330
+ } else if (typeof target === "string") {
331
+ formData[k] = [target, v];
332
+ } else {
333
+ formData[k] = v;
334
+ }
335
+ });
336
+ return formData;
337
+ }
338
+ async reqBodyReqFormUrlBody() {
339
+ const data = await this.reqBodyFormUrlData();
340
+ return Object.assign(new ReqFormUrlBody(), data);
341
+ }
342
+ async reqBodyReqJsonBody() {
343
+ const data = await this.reqBodyStringData();
344
+ return Object.assign(new ReqJsonBody(), data ? JSON.parse(data) : {});
345
+ }
346
+ // reqBodyReqMultipartFormBody(): Promise<ReqMultipartFormBody> {
347
+ // return this.reqBodyMultipartFormData().then(it => new ReqMultipartFormBody(it))
348
+ // }
349
+ resBodyJsonData() {
350
+ const data = ConvertUtils.toString(this.resBodyData());
351
+ return data ? JSON.parse(data) : null;
352
+ }
353
+ resBodyStringData() {
354
+ return ConvertUtils.toString(this.resBodyData());
355
+ }
356
+ reqMethod() {
357
+ return this.req.method?.toUpperCase();
358
+ }
359
+ reqHeader(key) {
360
+ return this.req.headers[key.toLowerCase()];
361
+ }
362
+ get reqHost() {
363
+ return this.reqHeaderFirst("Host" /* Host */);
364
+ }
365
+ get reqHeaderObj() {
366
+ const h = new ReqHeader();
367
+ Object.entries(this.req.headers).forEach(([k, v]) => {
368
+ h[k] = v;
369
+ });
370
+ return h;
371
+ }
372
+ reqHeaderFirst(key, defaultValue) {
373
+ const header = this.req.headers[key.toLowerCase()];
374
+ if (header && Array.isArray(header)) {
375
+ return header[0] ?? defaultValue;
376
+ } else {
377
+ return header ?? defaultValue;
378
+ }
379
+ }
380
+ reqAuthorizationHeader() {
381
+ return this.reqHeaderFirst("Authorization" /* Authorization */);
382
+ }
383
+ reqRefreshTokenHeader() {
384
+ return this.reqHeaderFirst("Authorization" /* Authorization */);
385
+ }
386
+ // eslint-disable-next-line no-dupe-class-members
387
+ resStatusCode(code) {
388
+ if (code) {
389
+ this.res.statusCode = code;
390
+ return new RequestResponseChain(this.req, this.res, this.config, this.res.statusCode);
391
+ } else {
392
+ return this.res.statusCode;
393
+ }
394
+ }
395
+ resHeader(key) {
396
+ return this.res.getHeader(key.toLowerCase());
397
+ }
398
+ resHeaderFirst(key, defaultValue) {
399
+ const header = this.res.getHeader(key.toLowerCase());
400
+ if (header && Array.isArray(header)) {
401
+ return header[0] ?? defaultValue;
402
+ } else {
403
+ return header ?? defaultValue;
404
+ }
405
+ }
406
+ async reqSession() {
407
+ if (this.config.sessionManager) {
408
+ return (await this.config.sessionManager.session(this)).dataSet.data;
409
+ } else {
410
+ return Promise.reject(new Error("Not SessionManager"));
411
+ }
412
+ }
413
+ reqSessionSet(key, value) {
414
+ this.reqSession[key] = value;
415
+ }
416
+ reqSessionGet(key) {
417
+ const session = this.reqSession;
418
+ if (session) {
419
+ return session[key];
420
+ }
421
+ }
422
+ resSetStatusCode(statusCode) {
423
+ this.res.statusCode = statusCode;
424
+ return this.createRequestResponseChain(this.res.statusCode);
425
+ }
426
+ // resEnd() {
427
+ // this.res.end();
428
+ // }
429
+ // eslint-disable-next-line no-undef
430
+ resWrite(chunk, encoding = "utf8") {
431
+ this.resWriteChunk = chunk;
432
+ return this.createRequestResponseChain(this.resWriteChunk);
433
+ }
434
+ // eslint-disable-next-line no-undef
435
+ resWriteJson(chunk, encoding = "utf8") {
436
+ return this.resWrite(JSON.stringify(chunk), encoding);
437
+ }
438
+ resSetHeader(key, value) {
439
+ return this.createRequestResponseChain(this.res.setHeader(key.toLowerCase(), value));
440
+ }
441
+ resAddHeader(key, value) {
442
+ const existingValue = this.res.getHeader(key.toLowerCase());
443
+ const newValue = Array.isArray(existingValue) ? existingValue.concat(value) : existingValue ? [existingValue.toString(), ...[].concat(value)] : value;
444
+ return this.createRequestResponseChain(this.res.setHeader(key.toLowerCase(), newValue));
445
+ }
446
+ resSetHeaders(headers) {
447
+ Object.entries(headers).forEach(([key, value]) => this.resSetHeader(key, value));
448
+ return this.createRequestResponseChain();
449
+ }
450
+ resAddHeaders(headers) {
451
+ Object.entries(headers).forEach(([key, value]) => this.resAddHeader(key, value));
452
+ return this.createRequestResponseChain();
453
+ }
454
+ // 마지막 종료될때 타는거.
455
+ async resEndChunk() {
456
+ const encoding = this.reqHeaderFirst("Accept-Encoding" /* AcceptEncoding */);
457
+ let data = this.resWriteChunk;
458
+ if (encoding?.includes("gzip")) {
459
+ data = await gzip(data);
460
+ this.resSetHeader("Content-Encoding" /* ContentEncoding */, "gzip");
461
+ }
462
+ this.res.end(data);
463
+ }
464
+ async resEnd(chunk) {
465
+ this.resWriteChunk = chunk ?? this.resWriteChunk;
466
+ if (this.req.readable) {
467
+ await this.reqBodyData();
468
+ await this.resEndChunk();
469
+ } else {
470
+ await this.resEndChunk();
471
+ }
472
+ }
473
+ // writeContinue(callback?: () => void) {
474
+ // this.res.writeContinue(callback);
475
+ // return new RequestResponseChain(this.req, this.res);
476
+ // }
477
+ // reqWrite(chunk?: any) {
478
+ // this.resWriteChunk = chunk;
479
+ // // this.res.write(chunk);
480
+ // return this.createRequestResponseChain();
481
+ // }
482
+ resWriteHead(statusCode, headers) {
483
+ return this.createRequestResponseChain(this.res.writeHead(statusCode, headers));
484
+ }
485
+ resWriteHeadEnd(statusCode, headers) {
486
+ this.createRequestResponseChain(this.res.writeHead(statusCode, headers));
487
+ this.res.end();
488
+ }
489
+ resIsDone() {
490
+ return this.res.finished || this.res.writableEnded || this.res.headersSent;
491
+ }
492
+ createRequestResponseChain(data) {
493
+ const requestResponseChain = new RequestResponseChain(this.req, this.res, this.config, data);
494
+ requestResponseChain.resWriteChunk = this.resWriteChunk;
495
+ requestResponseChain.reqBodyChunk = this.reqBodyChunk;
496
+ return requestResponseChain;
497
+ }
498
+ // res.on("readable", () => {
499
+ // console.log('readable???')
500
+ // });
501
+ // res.on('complete', function (details) {
502
+ // var size = details.req.bytes;
503
+ // console.log('complete-->', size)
504
+ // });
505
+ // res.on('finish', function() {
506
+ // console.log('finish??');
507
+ // });
508
+ // res.on('end', () => {
509
+ // console.log('end--?')
510
+ // });
511
+ };
512
+ var RequestResponseChain = class extends RequestResponse {
513
+ constructor(req, res, config, result) {
514
+ super(req, res, config);
515
+ this.result = result;
516
+ }
517
+ };
518
+
519
+ // src/decorators/MethodMapping.ts
520
+ import "reflect-metadata";
521
+ import { ReflectUtils } from "@dooboostore/core/reflect/ReflectUtils";
522
+ var MappingMetadataKey = Symbol("MappingMetadataKey");
523
+ var getUrlMapping = (target, propertyKey) => {
524
+ return ReflectUtils.getMetadata(MappingMetadataKey, target, propertyKey);
525
+ };
526
+ var getUrlMappings = (target) => {
527
+ if (target !== null && void 0 !== target && typeof target === "object") {
528
+ target = target.constructor;
529
+ }
530
+ return ReflectUtils.getMetadata(MappingMetadataKey, target);
531
+ };
532
+
533
+ // src/SimpleBootHttpServer.ts
534
+ import { ExceptionHandlerSituationType, targetExceptionHandler } from "@dooboostore/simple-boot/decorators/exception/ExceptionDecorator";
535
+ import { getInject, SituationTypeContainer, SituationTypeContainers } from "@dooboostore/simple-boot/decorators/inject/Inject";
536
+ import { ReflectUtils as ReflectUtils2 } from "@dooboostore/core/reflect/ReflectUtils";
537
+ import { RouterModule } from "@dooboostore/simple-boot/route/RouterModule";
538
+
539
+ // src/models/datas/body/ReqMultipartFormBody.ts
540
+ var ReqMultipartFormBody = class {
541
+ constructor(field = []) {
542
+ this.field = field;
543
+ }
544
+ };
545
+
546
+ // src/SimpleBootHttpServer.ts
547
+ import { execValidationInValid, getValidIndex } from "@dooboostore/simple-boot/decorators/validate/Validation";
548
+ import { ValidException } from "@dooboostore/simple-boot/errors/ValidException";
549
+
550
+ // src/errors/HttpError.ts
551
+ var HttpError = class {
552
+ constructor({ status, message = "HttpError" }) {
553
+ this.name = "Error";
554
+ this.message = message;
555
+ this.status = status;
556
+ }
557
+ };
558
+
559
+ // src/SimpleBootHttpServer.ts
560
+ import { getRoute } from "@dooboostore/simple-boot/decorators/route/Router";
561
+ import { URLSearchParams as URLSearchParams2 } from "url";
562
+
563
+ // src/session/SessionManager.ts
564
+ import { RandomUtils } from "@dooboostore/core/random/RandomUtils";
565
+ var SessionManager = class {
566
+ constructor(option) {
567
+ this.option = option;
568
+ this.sessions = /* @__PURE__ */ new Map();
569
+ this.sessionOption = option.sessionOption;
570
+ setInterval(async () => {
571
+ const uuids = await this.getSessionUUIDs();
572
+ for (const uuid of uuids) {
573
+ const dataSet = await this.getSessionDataSet(uuid);
574
+ if (dataSet && this.isExpired(dataSet.access)) {
575
+ await this.deleteSession(uuid);
576
+ }
577
+ }
578
+ }, this.sessionOption.expiredTime);
579
+ }
580
+ async getSessionUUIDs() {
581
+ if (this.sessionOption.provider?.uuids) {
582
+ return this.sessionOption.provider.uuids();
583
+ } else {
584
+ return Array.from(this.sessions.keys());
585
+ }
586
+ }
587
+ async deleteSession(uuid) {
588
+ if (this.sessionOption.provider?.delete) {
589
+ this.sessionOption.provider.delete(uuid);
590
+ } else {
591
+ this.sessions.delete(uuid);
592
+ }
593
+ }
594
+ async getSessionDataSet(uuid) {
595
+ if (this.sessionOption.provider?.get) {
596
+ return this.sessionOption.provider.get(uuid);
597
+ } else {
598
+ return this.sessions.get(uuid);
599
+ }
600
+ }
601
+ async setSessionDataSet(uuid, dataSet) {
602
+ if (this.sessionOption.provider?.set) {
603
+ this.sessionOption.provider.set(uuid, dataSet);
604
+ } else {
605
+ this.sessions.set(uuid, dataSet);
606
+ }
607
+ }
608
+ isExpired(access, now = Date.now()) {
609
+ return now - access >= this.option.sessionOption.expiredTime;
610
+ }
611
+ makeUUID() {
612
+ return RandomUtils.uuid("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
613
+ }
614
+ async session(rrOrUUID) {
615
+ let uuid;
616
+ if (rrOrUUID instanceof RequestResponse) {
617
+ uuid = rrOrUUID.reqCookieGet(this.sessionOption.key) ?? this.makeUUID();
618
+ } else if (typeof rrOrUUID === "string") {
619
+ uuid = rrOrUUID;
620
+ } else {
621
+ uuid = this.makeUUID();
622
+ }
623
+ let dataSet = await this.getSessionDataSet(uuid);
624
+ const now = Date.now();
625
+ if (dataSet) {
626
+ if (this.isExpired(dataSet.access, now)) {
627
+ delete dataSet.data;
628
+ }
629
+ dataSet.access = now;
630
+ } else {
631
+ dataSet = {
632
+ access: now
633
+ };
634
+ }
635
+ await this.setSessionDataSet(uuid, dataSet);
636
+ return { uuid, dataSet };
637
+ }
638
+ };
639
+
640
+ // src/inject/InjectSituationType.ts
641
+ var InjectSituationType;
642
+ ((InjectSituationType2) => {
643
+ InjectSituationType2.TransactionManager = Symbol("TransactionManager");
644
+ })(InjectSituationType || (InjectSituationType = {}));
645
+
646
+ // src/SimpleBootHttpServer.ts
647
+ var SimpleBootHttpServer = class extends SimpleApplication {
648
+ constructor(option = new HttpServerOption()) {
649
+ super(option);
650
+ this.option = option;
651
+ this.sessionManager = new SessionManager(this.option);
652
+ }
653
+ run(otherInstanceSim) {
654
+ const simstanceManager = super.run(otherInstanceSim);
655
+ const targets = [...this.option.closeEndPoints ?? [], ...this.option.errorEndPoints ?? [], ...this.option.requestEndPoints ?? [], ...this.option.filters ?? []];
656
+ Promise.all(targets.map((it) => typeof it === "function" ? this.simstanceManager.getOrNewSim({ target: it }) : it).map((it) => it.onInit(this))).then((it) => {
657
+ this.startServer();
658
+ });
659
+ return simstanceManager;
660
+ }
661
+ startServer() {
662
+ if (this.option.serverOption && "key" in this.option.serverOption && "cert" in this.option.serverOption) {
663
+ this.server = new HttpsServer(this.option.serverOption);
664
+ const httpServer = new HttpServer();
665
+ httpServer.on("request", (req, res) => {
666
+ res.writeHead(301, { Location: `https://${req.headers.host}${req.url}` });
667
+ res.end();
668
+ });
669
+ httpServer.listen(80, this.option.listen.hostname, () => {
670
+ console.log("HTTP redirect server running on port 80");
671
+ });
672
+ } else if (this.option.serverOption) {
673
+ this.server = new HttpServer(this.option.serverOption);
674
+ } else {
675
+ this.server = new HttpServer();
676
+ }
677
+ this.server.on("request", async (req, res) => {
678
+ const transactionManager = this.option.transactionManagerFactory ? await this.option.transactionManagerFactory() : void 0;
679
+ res.on("close", async () => {
680
+ if (this.option.closeEndPoints) {
681
+ for (const it of this.option.closeEndPoints) {
682
+ try {
683
+ const execute = typeof it === "function" ? this.simstanceManager.getOrNewSim({ target: it }) : it;
684
+ const endPoint = execute?.endPoint(rr, this);
685
+ if (endPoint instanceof Promise) {
686
+ await endPoint;
687
+ }
688
+ } catch (e) {
689
+ }
690
+ }
691
+ }
692
+ if (!rr.resIsDone()) {
693
+ rr.resEnd();
694
+ }
695
+ });
696
+ res.on("error", async () => {
697
+ if (this.option.errorEndPoints) {
698
+ for (const it of this.option.errorEndPoints) {
699
+ try {
700
+ const execute = typeof it === "function" ? this.simstanceManager.getOrNewSim({ target: it }) : it;
701
+ const endPoint = execute?.endPoint(rr, this);
702
+ if (endPoint instanceof Promise) {
703
+ await endPoint;
704
+ }
705
+ } catch (e) {
706
+ }
707
+ }
708
+ }
709
+ if (!rr.resIsDone()) {
710
+ rr.resEnd();
711
+ }
712
+ });
713
+ const rr = new RequestResponse(req, res, { sessionManager: this.sessionManager, option: this.option });
714
+ rr.resSetHeader("Server" /* Server */, "simple-boot-http-server");
715
+ const cookie = rr.reqCookieGet(this.option.sessionOption.key);
716
+ if (!cookie) {
717
+ const session = await this.sessionManager.session();
718
+ rr.resSetHeader("Set-Cookie" /* SetCookie */, `${this.option.sessionOption.key}=${session.uuid}; Path=/; HttpOnly`);
719
+ }
720
+ const otherStorage = /* @__PURE__ */ new Map();
721
+ otherStorage.set(RequestResponse, rr);
722
+ otherStorage.set(IncomingMessage, req);
723
+ otherStorage.set(ServerResponse, res);
724
+ try {
725
+ transactionManager?.try();
726
+ if (this.option.requestEndPoints) {
727
+ for (const it of this.option.requestEndPoints) {
728
+ try {
729
+ const execute = typeof it === "function" ? this.simstanceManager.getOrNewSim({ target: it }) : it;
730
+ execute?.endPoint(rr, this);
731
+ } catch (e) {
732
+ }
733
+ }
734
+ }
735
+ const filter = {
736
+ carrier: /* @__PURE__ */ new Map(),
737
+ filters: []
738
+ };
739
+ for (let i = 0; this.option.filters && i < this.option.filters.length; i++) {
740
+ const it = this.option.filters[i];
741
+ const execute = typeof it === "function" ? this.simstanceManager.getOrNewSim({ target: it }) : it;
742
+ let sw = true;
743
+ if (execute?.proceedBefore) {
744
+ sw = await execute.proceedBefore({ rr, app: this, carrier: filter.carrier });
745
+ filter.filters.push({ filter: execute, sw });
746
+ }
747
+ if (!sw) {
748
+ break;
749
+ }
750
+ }
751
+ if (!rr.resIsDone()) {
752
+ const routerModule = await super.routing(rr.reqIntent);
753
+ otherStorage.set(RouterModule, routerModule);
754
+ const moduleInstance = routerModule?.getModuleInstance?.();
755
+ let methods = [];
756
+ if (routerModule && moduleInstance) {
757
+ if (routerModule.propertyKeys) {
758
+ const map = routerModule.propertyKeys?.map((it) => {
759
+ return { propertyKey: it, config: getUrlMapping(moduleInstance, it) };
760
+ });
761
+ methods.push(...map ?? []);
762
+ } else {
763
+ methods.push(...getUrlMappings(moduleInstance).filter((it) => !getRoute(moduleInstance, it.propertyKey)) ?? []);
764
+ }
765
+ if (rr.reqMethod()?.toUpperCase() === "OPTIONS" /* OPTIONS */.toUpperCase()) {
766
+ rr.resSetHeader("Allow" /* Allow */, methods.map((it) => it.config.method).join(", "));
767
+ rr.resStatusCode(200 /* Ok */);
768
+ }
769
+ methods = methods.filter((it) => it && it.propertyKey && it.config && rr.reqMethod()?.toUpperCase() === it.config.method.toUpperCase());
770
+ methods.sort((a, b) => {
771
+ return (b.config?.req?.contentType?.length ?? 0) + (b.config?.req?.accept?.length ?? 0) - ((a.config?.req?.contentType?.length ?? 0) + (a.config?.req?.accept?.length ?? 0));
772
+ });
773
+ methods = methods.filter((it) => it.config?.req?.contentType ? !!it.config?.req?.contentType?.find((sit) => rr.reqHasContentTypeHeader(sit)) : true).filter((it) => it.config?.req?.accept ? !!it.config?.req?.accept?.find((sit) => rr.reqHasAcceptHeader(sit)) : true);
774
+ if (methods[0]) {
775
+ const it = methods[0];
776
+ const paramTypes = ReflectUtils2.getParameterTypes(moduleInstance, it.propertyKey);
777
+ const injects = getInject(moduleInstance, it.propertyKey);
778
+ const validIndexs = getValidIndex(moduleInstance, it.propertyKey);
779
+ if (injects) {
780
+ const isJson = injects.find((it2) => it2.config?.situationType === "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_JSON_BODY" /* REQ_JSON_BODY */);
781
+ const isFormUrl = injects.find((it2) => it2.config?.situationType === "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_FORM_URL_BODY" /* REQ_FORM_URL_BODY */);
782
+ const isTransactionManager = injects.find((it2) => it2.config?.situationType === InjectSituationType.TransactionManager);
783
+ const siturationContainers = new SituationTypeContainers();
784
+ if (isJson) {
785
+ let data2 = await rr.reqBodyJsonData();
786
+ if (isJson.type) {
787
+ data2 = Object.assign(new isJson.type(), data2);
788
+ }
789
+ if (validIndexs.includes(isJson.index)) {
790
+ const inValid = execValidationInValid(data2);
791
+ if ((inValid?.length ?? 0) > 0) {
792
+ throw new ValidException(inValid);
793
+ }
794
+ }
795
+ siturationContainers.push(new SituationTypeContainer({
796
+ situationType: "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_JSON_BODY" /* REQ_JSON_BODY */,
797
+ data: data2
798
+ }));
799
+ }
800
+ if (isFormUrl) {
801
+ let data2 = await rr.reqBodyFormUrlData();
802
+ if (isFormUrl.type) {
803
+ data2 = Object.assign(new isFormUrl.type(), data2);
804
+ }
805
+ if (validIndexs.includes(isFormUrl.index)) {
806
+ const inValid = execValidationInValid(data2);
807
+ if ((inValid?.length ?? 0) > 0) {
808
+ throw new ValidException(inValid);
809
+ }
810
+ }
811
+ siturationContainers.push(new SituationTypeContainer({ situationType: "SIMPLE_BOOT_HTTP_SERVER://URLMAPPING/REQ_FORM_URL_BODY" /* REQ_FORM_URL_BODY */, data: data2 }));
812
+ }
813
+ if (isTransactionManager && isTransactionManager.type && transactionManager && transactionManager.hasTransaction(isTransactionManager.type)) {
814
+ let data2 = await transactionManager.getTransaction(isTransactionManager.type);
815
+ if (data2) {
816
+ data2 = await data2.try(isTransactionManager.config.argument);
817
+ siturationContainers.push(new SituationTypeContainer({ situationType: InjectSituationType.TransactionManager, data: data2, index: isTransactionManager.index }));
818
+ }
819
+ }
820
+ if (siturationContainers.length) {
821
+ otherStorage.set(SituationTypeContainers, siturationContainers);
822
+ }
823
+ }
824
+ for (const paramType of paramTypes) {
825
+ if (paramType === ReqFormUrlBody) {
826
+ otherStorage.set(ReqFormUrlBody, await rr.reqBodyReqFormUrlBody());
827
+ } else if (paramType === ReqJsonBody) {
828
+ otherStorage.set(ReqJsonBody, await rr.reqBodyReqJsonBody());
829
+ } else if (paramType === URLSearchParams2) {
830
+ otherStorage.set(URLSearchParams2, rr.reqUrlSearchParams);
831
+ } else if (paramType === ReqMultipartFormBody) {
832
+ otherStorage.set(ReqMultipartFormBody, rr.reqBodyMultipartFormData());
833
+ } else if (paramType === ReqHeader) {
834
+ otherStorage.set(ReqHeader, rr.reqHeaderObj);
835
+ }
836
+ }
837
+ let data = await this.simstanceManager.executeBindParameterSimPromise({
838
+ target: moduleInstance,
839
+ targetKey: it.propertyKey
840
+ }, otherStorage);
841
+ if (it.config?.resolver) {
842
+ const execute = typeof it.config.resolver === "function" ? this.simstanceManager.getOrNewSim({ target: it.config.resolver }) : it.config.resolver;
843
+ data = await execute?.resolve?.(data, rr);
844
+ }
845
+ const status = it.config?.res?.status ?? 200 /* Ok */;
846
+ const headers = it.config?.res?.header ?? {};
847
+ if (it.config?.res?.contentType) {
848
+ headers["Content-Type" /* ContentType */] = it.config?.res?.contentType;
849
+ }
850
+ if ((it.config?.res?.contentType?.toLowerCase().indexOf("application/json" /* ApplicationJson */.toLowerCase()) ?? -1) > -1) {
851
+ data = JSON.stringify(data);
852
+ } else if (data && typeof data === "object") {
853
+ data = JSON.stringify(data);
854
+ }
855
+ rr.resSetHeaders(headers);
856
+ rr.resSetStatusCode(status);
857
+ rr.resWrite(data);
858
+ }
859
+ }
860
+ if (this.option.noSuchRouteEndPointMappingThrow && methods.length <= 0 && rr.reqMethod()?.toUpperCase() !== "OPTIONS" /* OPTIONS */) {
861
+ throw this.option.noSuchRouteEndPointMappingThrow(rr);
862
+ }
863
+ }
864
+ for (const it of filter.filters.reverse()) {
865
+ if (it.filter?.proceedAfter && !await it.filter.proceedAfter({ rr, app: this, before: it.sw, carrier: filter.carrier })) {
866
+ break;
867
+ }
868
+ }
869
+ } catch (e) {
870
+ transactionManager?.catch(e);
871
+ rr.resStatusCode(e instanceof HttpError ? e.status : 500 /* InternalServerError */);
872
+ const execute = typeof this.option.globalAdvice === "function" ? this.simstanceManager.getOrNewSim(this.option.globalAdvice) : this.option.globalAdvice;
873
+ if (!execute) {
874
+ rr.resEnd();
875
+ return;
876
+ }
877
+ if (e && typeof e === "object") {
878
+ otherStorage.set(e.constructor, e);
879
+ otherStorage.set(SituationTypeContainer, new SituationTypeContainer({
880
+ situationType: ExceptionHandlerSituationType.ERROR_OBJECT,
881
+ data: e
882
+ }));
883
+ }
884
+ const target = targetExceptionHandler(execute, e);
885
+ if (target) {
886
+ await this.simstanceManager.executeBindParameterSimPromise({
887
+ target: execute,
888
+ targetKey: target.propertyKey
889
+ }, otherStorage);
890
+ }
891
+ } finally {
892
+ transactionManager?.finally();
893
+ }
894
+ if (!rr.resIsDone()) {
895
+ rr.resEnd();
896
+ }
897
+ });
898
+ this.server.listen(this.option.listen.port, this.option.listen.hostname, this.option.listen.backlog, () => {
899
+ this.option.listen.listeningListener?.(this, this.server);
900
+ });
901
+ }
902
+ };
903
+ export {
904
+ SimpleBootHttpServer
905
+ };
906
+ //# sourceMappingURL=SimpleBootHttpServer.js.map