jimpex 7.0.2 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (438) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/LICENSE +1 -1
  3. package/README.md +447 -435
  4. package/dist/app/index.d.mts +14 -0
  5. package/dist/app/index.d.ts +14 -0
  6. package/dist/app/index.js +23 -0
  7. package/dist/app/index.js.map +1 -0
  8. package/dist/app/jimpex.d.mts +14 -0
  9. package/dist/app/jimpex.d.ts +14 -0
  10. package/dist/app/jimpex.js +665 -0
  11. package/dist/app/jimpex.js.map +1 -0
  12. package/dist/controllers/common/config.d.mts +79 -0
  13. package/dist/controllers/common/config.d.ts +79 -0
  14. package/dist/controllers/common/config.js +107 -0
  15. package/dist/controllers/common/config.js.map +1 -0
  16. package/dist/controllers/common/health.d.mts +83 -0
  17. package/dist/controllers/common/health.d.ts +83 -0
  18. package/dist/controllers/common/health.js +115 -0
  19. package/dist/controllers/common/health.js.map +1 -0
  20. package/dist/controllers/common/index.d.mts +21 -0
  21. package/dist/controllers/common/index.d.ts +21 -0
  22. package/dist/controllers/common/index.js +27 -0
  23. package/dist/controllers/common/index.js.map +1 -0
  24. package/dist/controllers/common/statics.d.mts +215 -0
  25. package/dist/controllers/common/statics.d.ts +215 -0
  26. package/dist/controllers/common/statics.js +253 -0
  27. package/dist/controllers/common/statics.js.map +1 -0
  28. package/dist/controllers/index.d.mts +24 -0
  29. package/dist/controllers/index.d.ts +24 -0
  30. package/dist/controllers/index.js +25 -0
  31. package/dist/controllers/index.js.map +1 -0
  32. package/dist/controllers/utils/gateway.d.mts +725 -0
  33. package/dist/controllers/utils/gateway.d.ts +725 -0
  34. package/dist/controllers/utils/gateway.js +577 -0
  35. package/dist/controllers/utils/gateway.js.map +1 -0
  36. package/dist/controllers/utils/index.d.mts +17 -0
  37. package/dist/controllers/utils/index.d.ts +17 -0
  38. package/dist/controllers/utils/index.js +23 -0
  39. package/dist/controllers/utils/index.js.map +1 -0
  40. package/dist/esm/app/index.js +2 -0
  41. package/dist/esm/app/index.js.map +1 -0
  42. package/dist/esm/app/jimpex.js +636 -0
  43. package/dist/esm/app/jimpex.js.map +1 -0
  44. package/dist/esm/chunk-2B2CG5KL.js +11 -0
  45. package/dist/esm/chunk-2B2CG5KL.js.map +1 -0
  46. package/dist/esm/controllers/common/config.js +80 -0
  47. package/dist/esm/controllers/common/config.js.map +1 -0
  48. package/dist/esm/controllers/common/health.js +88 -0
  49. package/dist/esm/controllers/common/health.js.map +1 -0
  50. package/dist/esm/controllers/common/index.js +4 -0
  51. package/dist/esm/controllers/common/index.js.map +1 -0
  52. package/dist/esm/controllers/common/statics.js +220 -0
  53. package/dist/esm/controllers/common/statics.js.map +1 -0
  54. package/dist/esm/controllers/index.js +3 -0
  55. package/dist/esm/controllers/index.js.map +1 -0
  56. package/dist/esm/controllers/utils/gateway.js +556 -0
  57. package/dist/esm/controllers/utils/gateway.js.map +1 -0
  58. package/dist/esm/controllers/utils/index.js +2 -0
  59. package/dist/esm/controllers/utils/index.js.map +1 -0
  60. package/dist/esm/index.js +7 -0
  61. package/dist/esm/index.js.map +1 -0
  62. package/dist/esm/middlewares/common/errorHandler.js +116 -0
  63. package/dist/esm/middlewares/common/errorHandler.js.map +1 -0
  64. package/dist/esm/middlewares/common/forceHTTPS.js +53 -0
  65. package/dist/esm/middlewares/common/forceHTTPS.js.map +1 -0
  66. package/dist/esm/middlewares/common/hsts.js +74 -0
  67. package/dist/esm/middlewares/common/hsts.js.map +1 -0
  68. package/dist/esm/middlewares/common/index.js +4 -0
  69. package/dist/esm/middlewares/common/index.js.map +1 -0
  70. package/dist/esm/middlewares/html/fastHTML.js +158 -0
  71. package/dist/esm/middlewares/html/fastHTML.js.map +1 -0
  72. package/dist/esm/middlewares/html/index.js +3 -0
  73. package/dist/esm/middlewares/html/index.js.map +1 -0
  74. package/dist/esm/middlewares/html/showHTML.js +100 -0
  75. package/dist/esm/middlewares/html/showHTML.js.map +1 -0
  76. package/dist/esm/middlewares/index.js +4 -0
  77. package/dist/esm/middlewares/index.js.map +1 -0
  78. package/dist/esm/middlewares/utils/index.js +2 -0
  79. package/dist/esm/middlewares/utils/index.js.map +1 -0
  80. package/dist/esm/middlewares/utils/versionValidator.js +135 -0
  81. package/dist/esm/middlewares/utils/versionValidator.js.map +1 -0
  82. package/dist/esm/services/common/appError.js +98 -0
  83. package/dist/esm/services/common/appError.js.map +1 -0
  84. package/dist/esm/services/common/httpError.js +28 -0
  85. package/dist/esm/services/common/httpError.js.map +1 -0
  86. package/dist/esm/services/common/index.js +17 -0
  87. package/dist/esm/services/common/index.js.map +1 -0
  88. package/dist/esm/services/common/sendFile.js +27 -0
  89. package/dist/esm/services/common/sendFile.js.map +1 -0
  90. package/dist/esm/services/frontend/frontendFs.js +66 -0
  91. package/dist/esm/services/frontend/frontendFs.js.map +1 -0
  92. package/dist/esm/services/frontend/index.js +11 -0
  93. package/dist/esm/services/frontend/index.js.map +1 -0
  94. package/dist/esm/services/html/htmlGenerator.js +194 -0
  95. package/dist/esm/services/html/htmlGenerator.js.map +1 -0
  96. package/dist/esm/services/html/index.js +11 -0
  97. package/dist/esm/services/html/index.js.map +1 -0
  98. package/dist/esm/services/http/apiClient.js +97 -0
  99. package/dist/esm/services/http/apiClient.js.map +1 -0
  100. package/dist/esm/services/http/http.js +174 -0
  101. package/dist/esm/services/http/http.js.map +1 -0
  102. package/dist/esm/services/http/index.js +17 -0
  103. package/dist/esm/services/http/index.js.map +1 -0
  104. package/dist/esm/services/http/responsesBuilder.js +152 -0
  105. package/dist/esm/services/http/responsesBuilder.js.map +1 -0
  106. package/dist/esm/services/index.js +6 -0
  107. package/dist/esm/services/index.js.map +1 -0
  108. package/dist/esm/services/utils/ensureBearerToken.js +94 -0
  109. package/dist/esm/services/utils/ensureBearerToken.js.map +1 -0
  110. package/dist/esm/services/utils/index.js +11 -0
  111. package/dist/esm/services/utils/index.js.map +1 -0
  112. package/dist/esm/types/events.js +1 -0
  113. package/dist/esm/types/events.js.map +1 -0
  114. package/dist/esm/types/express.js +1 -0
  115. package/dist/esm/types/express.js.map +1 -0
  116. package/dist/esm/types/http.js +1 -0
  117. package/dist/esm/types/http.js.map +1 -0
  118. package/dist/esm/types/index.js +7 -0
  119. package/dist/esm/types/index.js.map +1 -0
  120. package/dist/esm/types/options.js +1 -0
  121. package/dist/esm/types/options.js.map +1 -0
  122. package/dist/esm/types/utils.js +1 -0
  123. package/dist/esm/types/utils.js.map +1 -0
  124. package/dist/esm/types/wootils.js +1 -0
  125. package/dist/esm/types/wootils.js.map +1 -0
  126. package/dist/esm/utils/fns/index.js +5 -0
  127. package/dist/esm/utils/fns/index.js.map +1 -0
  128. package/dist/esm/utils/fns/others.js +6 -0
  129. package/dist/esm/utils/fns/others.js.map +1 -0
  130. package/dist/esm/utils/fns/routes.js +25 -0
  131. package/dist/esm/utils/fns/routes.js.map +1 -0
  132. package/dist/esm/utils/fns/statuses.js +6 -0
  133. package/dist/esm/utils/fns/statuses.js.map +1 -0
  134. package/dist/esm/utils/fns/text.js +6 -0
  135. package/dist/esm/utils/fns/text.js.map +1 -0
  136. package/dist/esm/utils/index.js +3 -0
  137. package/dist/esm/utils/index.js.map +1 -0
  138. package/dist/esm/utils/wrappers.js +41 -0
  139. package/dist/esm/utils/wrappers.js.map +1 -0
  140. package/dist/index-b2a04c78.d.ts +1282 -0
  141. package/dist/index-efeb437e.d.ts +1282 -0
  142. package/dist/index.d.mts +46 -0
  143. package/dist/index.d.ts +46 -0
  144. package/dist/index.js +33 -0
  145. package/dist/index.js.map +1 -0
  146. package/dist/middlewares/common/errorHandler.d.mts +132 -0
  147. package/dist/middlewares/common/errorHandler.d.ts +132 -0
  148. package/dist/middlewares/common/errorHandler.js +143 -0
  149. package/dist/middlewares/common/errorHandler.js.map +1 -0
  150. package/dist/middlewares/common/forceHTTPS.d.mts +69 -0
  151. package/dist/middlewares/common/forceHTTPS.d.ts +69 -0
  152. package/dist/middlewares/common/forceHTTPS.js +80 -0
  153. package/dist/middlewares/common/forceHTTPS.js.map +1 -0
  154. package/dist/middlewares/common/hsts.d.mts +110 -0
  155. package/dist/middlewares/common/hsts.d.ts +110 -0
  156. package/dist/middlewares/common/hsts.js +101 -0
  157. package/dist/middlewares/common/hsts.js.map +1 -0
  158. package/dist/middlewares/common/index.d.mts +22 -0
  159. package/dist/middlewares/common/index.d.ts +22 -0
  160. package/dist/middlewares/common/index.js +27 -0
  161. package/dist/middlewares/common/index.js.map +1 -0
  162. package/dist/middlewares/html/fastHTML.d.mts +180 -0
  163. package/dist/middlewares/html/fastHTML.d.ts +180 -0
  164. package/dist/middlewares/html/fastHTML.js +185 -0
  165. package/dist/middlewares/html/fastHTML.js.map +1 -0
  166. package/dist/middlewares/html/index.d.mts +21 -0
  167. package/dist/middlewares/html/index.d.ts +21 -0
  168. package/dist/middlewares/html/index.js +25 -0
  169. package/dist/middlewares/html/index.js.map +1 -0
  170. package/dist/middlewares/html/showHTML.d.mts +127 -0
  171. package/dist/middlewares/html/showHTML.d.ts +127 -0
  172. package/dist/middlewares/html/showHTML.js +127 -0
  173. package/dist/middlewares/html/showHTML.js.map +1 -0
  174. package/dist/middlewares/index.d.mts +30 -0
  175. package/dist/middlewares/index.d.ts +30 -0
  176. package/dist/middlewares/index.js +27 -0
  177. package/dist/middlewares/index.js.map +1 -0
  178. package/dist/middlewares/utils/index.d.mts +20 -0
  179. package/dist/middlewares/utils/index.d.ts +20 -0
  180. package/dist/middlewares/utils/index.js +23 -0
  181. package/dist/middlewares/utils/index.js.map +1 -0
  182. package/dist/middlewares/utils/versionValidator.d.mts +215 -0
  183. package/dist/middlewares/utils/versionValidator.d.ts +215 -0
  184. package/dist/middlewares/utils/versionValidator.js +162 -0
  185. package/dist/middlewares/utils/versionValidator.js.map +1 -0
  186. package/dist/services/common/appError.d.mts +139 -0
  187. package/dist/services/common/appError.d.ts +139 -0
  188. package/dist/services/common/appError.js +126 -0
  189. package/dist/services/common/appError.js.map +1 -0
  190. package/dist/services/common/httpError.d.mts +80 -0
  191. package/dist/services/common/httpError.d.ts +80 -0
  192. package/dist/services/common/httpError.js +53 -0
  193. package/dist/services/common/httpError.js.map +1 -0
  194. package/dist/services/common/index.d.mts +47 -0
  195. package/dist/services/common/index.d.ts +47 -0
  196. package/dist/services/common/index.js +44 -0
  197. package/dist/services/common/index.js.map +1 -0
  198. package/dist/services/common/sendFile.d.mts +102 -0
  199. package/dist/services/common/sendFile.d.ts +102 -0
  200. package/dist/services/common/sendFile.js +51 -0
  201. package/dist/services/common/sendFile.js.map +1 -0
  202. package/dist/services/frontend/frontendFs.d.mts +96 -0
  203. package/dist/services/frontend/frontendFs.d.ts +96 -0
  204. package/dist/services/frontend/frontendFs.js +103 -0
  205. package/dist/services/frontend/frontendFs.js.map +1 -0
  206. package/dist/services/frontend/index.d.mts +40 -0
  207. package/dist/services/frontend/index.d.ts +40 -0
  208. package/dist/services/frontend/index.js +36 -0
  209. package/dist/services/frontend/index.js.map +1 -0
  210. package/dist/services/html/htmlGenerator.d.mts +237 -0
  211. package/dist/services/html/htmlGenerator.d.ts +237 -0
  212. package/dist/services/html/htmlGenerator.js +221 -0
  213. package/dist/services/html/htmlGenerator.js.map +1 -0
  214. package/dist/services/html/index.d.mts +43 -0
  215. package/dist/services/html/index.d.ts +43 -0
  216. package/dist/services/html/index.js +36 -0
  217. package/dist/services/html/index.js.map +1 -0
  218. package/dist/services/http/apiClient.d.mts +170 -0
  219. package/dist/services/http/apiClient.d.ts +170 -0
  220. package/dist/services/http/apiClient.js +122 -0
  221. package/dist/services/http/apiClient.js.map +1 -0
  222. package/dist/services/http/http.d.mts +176 -0
  223. package/dist/services/http/http.d.ts +176 -0
  224. package/dist/services/http/http.js +211 -0
  225. package/dist/services/http/http.js.map +1 -0
  226. package/dist/services/http/index.d.mts +51 -0
  227. package/dist/services/http/index.d.ts +51 -0
  228. package/dist/services/http/index.js +44 -0
  229. package/dist/services/http/index.js.map +1 -0
  230. package/dist/services/http/responsesBuilder.d.mts +179 -0
  231. package/dist/services/http/responsesBuilder.d.ts +179 -0
  232. package/dist/services/http/responsesBuilder.js +179 -0
  233. package/dist/services/http/responsesBuilder.js.map +1 -0
  234. package/dist/services/index.d.mts +33 -0
  235. package/dist/services/index.d.ts +33 -0
  236. package/dist/services/index.js +31 -0
  237. package/dist/services/index.js.map +1 -0
  238. package/dist/services/utils/ensureBearerToken.d.mts +158 -0
  239. package/dist/services/utils/ensureBearerToken.d.ts +158 -0
  240. package/dist/services/utils/ensureBearerToken.js +121 -0
  241. package/dist/services/utils/ensureBearerToken.js.map +1 -0
  242. package/dist/services/utils/index.d.mts +44 -0
  243. package/dist/services/utils/index.d.ts +44 -0
  244. package/dist/services/utils/index.js +36 -0
  245. package/dist/services/utils/index.js.map +1 -0
  246. package/dist/types/events.d.mts +14 -0
  247. package/dist/types/events.d.ts +14 -0
  248. package/dist/types/events.js +17 -0
  249. package/dist/types/events.js.map +1 -0
  250. package/dist/types/express.d.mts +10 -0
  251. package/dist/types/express.d.ts +10 -0
  252. package/dist/types/express.js +17 -0
  253. package/dist/types/express.js.map +1 -0
  254. package/dist/types/http.d.mts +79 -0
  255. package/dist/types/http.d.ts +79 -0
  256. package/dist/types/http.js +17 -0
  257. package/dist/types/http.js.map +1 -0
  258. package/dist/types/index.d.mts +14 -0
  259. package/dist/types/index.d.ts +14 -0
  260. package/dist/types/index.js +33 -0
  261. package/dist/types/index.js.map +1 -0
  262. package/dist/types/options.d.mts +14 -0
  263. package/dist/types/options.d.ts +14 -0
  264. package/dist/types/options.js +17 -0
  265. package/dist/types/options.js.map +1 -0
  266. package/dist/types/utils.d.mts +48 -0
  267. package/dist/types/utils.d.ts +48 -0
  268. package/dist/types/utils.js +17 -0
  269. package/dist/types/utils.js.map +1 -0
  270. package/dist/types/wootils.d.mts +4 -0
  271. package/dist/types/wootils.d.ts +4 -0
  272. package/dist/types/wootils.js +17 -0
  273. package/dist/types/wootils.js.map +1 -0
  274. package/dist/utils/fns/index.d.mts +5 -0
  275. package/dist/utils/fns/index.d.ts +5 -0
  276. package/dist/utils/fns/index.js +29 -0
  277. package/dist/utils/fns/index.js.map +1 -0
  278. package/dist/utils/fns/others.d.mts +17 -0
  279. package/dist/utils/fns/others.d.ts +17 -0
  280. package/dist/utils/fns/others.js +29 -0
  281. package/dist/utils/fns/others.js.map +1 -0
  282. package/dist/utils/fns/routes.d.mts +39 -0
  283. package/dist/utils/fns/routes.d.ts +39 -0
  284. package/dist/utils/fns/routes.js +51 -0
  285. package/dist/utils/fns/routes.js.map +1 -0
  286. package/dist/utils/fns/statuses.d.mts +45 -0
  287. package/dist/utils/fns/statuses.d.ts +45 -0
  288. package/dist/utils/fns/statuses.js +39 -0
  289. package/dist/utils/fns/statuses.js.map +1 -0
  290. package/dist/utils/fns/text.d.mts +9 -0
  291. package/dist/utils/fns/text.d.ts +9 -0
  292. package/dist/utils/fns/text.js +29 -0
  293. package/dist/utils/fns/text.js.map +1 -0
  294. package/dist/utils/index.d.mts +19 -0
  295. package/dist/utils/index.d.ts +19 -0
  296. package/dist/utils/index.js +25 -0
  297. package/dist/utils/index.js.map +1 -0
  298. package/dist/utils/wrappers.d.mts +14 -0
  299. package/dist/utils/wrappers.d.ts +14 -0
  300. package/dist/utils/wrappers.js +68 -0
  301. package/dist/utils/wrappers.js.map +1 -0
  302. package/examples/basic/404.html +12 -0
  303. package/examples/basic/README.md +30 -0
  304. package/examples/basic/app.ts +18 -0
  305. package/examples/basic/controller.ts +45 -0
  306. package/examples/basic/index.ts +19 -0
  307. package/examples/basic/middleware.ts +13 -0
  308. package/examples/basic/service.ts +11 -0
  309. package/package.json +60 -39
  310. package/src/app/index.ts +1 -0
  311. package/src/app/jimpex.ts +743 -0
  312. package/src/controllers/common/config.ts +115 -0
  313. package/src/controllers/common/health.ts +128 -0
  314. package/src/controllers/common/index.ts +3 -0
  315. package/src/controllers/common/statics.ts +380 -0
  316. package/src/controllers/index.ts +2 -0
  317. package/src/controllers/utils/gateway.ts +1186 -0
  318. package/src/controllers/utils/index.ts +1 -0
  319. package/src/index.ts +6 -0
  320. package/src/middlewares/common/errorHandler.ts +203 -0
  321. package/src/middlewares/common/forceHTTPS.ts +83 -0
  322. package/src/middlewares/common/hsts.ts +135 -0
  323. package/src/middlewares/common/index.ts +3 -0
  324. package/src/middlewares/html/fastHTML.ts +255 -0
  325. package/src/middlewares/html/index.ts +2 -0
  326. package/src/middlewares/html/showHTML.ts +165 -0
  327. package/src/middlewares/index.ts +3 -0
  328. package/src/middlewares/utils/index.ts +1 -0
  329. package/src/middlewares/utils/versionValidator.ts +289 -0
  330. package/src/services/common/appError.ts +158 -0
  331. package/src/services/common/httpError.ts +74 -0
  332. package/src/services/common/index.ts +29 -0
  333. package/src/services/common/sendFile.ts +106 -0
  334. package/src/services/frontend/frontendFs.ts +101 -0
  335. package/src/services/frontend/index.ts +21 -0
  336. package/src/services/html/htmlGenerator.ts +356 -0
  337. package/src/services/html/index.ts +21 -0
  338. package/src/services/http/apiClient.ts +221 -0
  339. package/src/services/http/http.ts +286 -0
  340. package/src/services/http/index.ts +29 -0
  341. package/src/services/http/responsesBuilder.ts +265 -0
  342. package/src/services/index.ts +5 -0
  343. package/src/services/utils/ensureBearerToken.ts +202 -0
  344. package/src/services/utils/index.ts +21 -0
  345. package/src/types/events.ts +303 -0
  346. package/src/types/express.ts +21 -0
  347. package/src/types/http.ts +77 -0
  348. package/src/types/index.ts +6 -0
  349. package/src/types/options.ts +248 -0
  350. package/src/types/utils.ts +52 -0
  351. package/src/types/wootils.ts +4 -0
  352. package/src/utils/fns/index.ts +4 -0
  353. package/src/utils/fns/others.ts +15 -0
  354. package/src/utils/fns/routes.ts +64 -0
  355. package/src/utils/fns/statuses.ts +44 -0
  356. package/src/utils/fns/text.ts +8 -0
  357. package/src/utils/index.ts +2 -0
  358. package/src/utils/wrappers.ts +537 -0
  359. package/tsconfig.json +5 -8
  360. package/tsup.config.ts +10 -0
  361. package/src/app/index.js +0 -692
  362. package/src/constants/eventNames.js +0 -48
  363. package/src/constants/index.js +0 -7
  364. package/src/controllers/common/configuration.js +0 -116
  365. package/src/controllers/common/health.js +0 -79
  366. package/src/controllers/common/index.js +0 -7
  367. package/src/controllers/common/statics.js +0 -336
  368. package/src/controllers/index.js +0 -9
  369. package/src/controllers/utils/gateway.js +0 -1039
  370. package/src/controllers/utils/index.js +0 -3
  371. package/src/index.js +0 -30
  372. package/src/middlewares/common/errorHandler.js +0 -185
  373. package/src/middlewares/common/forceHTTPS.js +0 -80
  374. package/src/middlewares/common/hsts.js +0 -122
  375. package/src/middlewares/common/index.js +0 -7
  376. package/src/middlewares/html/fastHTML.js +0 -298
  377. package/src/middlewares/html/index.js +0 -5
  378. package/src/middlewares/html/showHTML.js +0 -167
  379. package/src/middlewares/index.js +0 -11
  380. package/src/middlewares/utils/index.js +0 -3
  381. package/src/middlewares/utils/versionValidator.js +0 -261
  382. package/src/services/common/appError.js +0 -136
  383. package/src/services/common/httpError.js +0 -60
  384. package/src/services/common/index.js +0 -25
  385. package/src/services/common/sendFile.js +0 -68
  386. package/src/services/frontend/frontendFs.js +0 -85
  387. package/src/services/frontend/index.js +0 -17
  388. package/src/services/html/htmlGenerator.js +0 -391
  389. package/src/services/html/index.js +0 -17
  390. package/src/services/http/apiClient.js +0 -148
  391. package/src/services/http/http.js +0 -256
  392. package/src/services/http/index.js +0 -25
  393. package/src/services/http/responsesBuilder.js +0 -193
  394. package/src/services/index.js +0 -15
  395. package/src/services/utils/ensureBearerToken.js +0 -147
  396. package/src/services/utils/index.js +0 -19
  397. package/src/types.js +0 -377
  398. package/src/utils/functions.js +0 -78
  399. package/src/utils/wrappers.js +0 -131
  400. package/types/app/index.d.ts +0 -417
  401. package/types/constants/eventNames.d.ts +0 -93
  402. package/types/constants/index.d.ts +0 -2
  403. package/types/controllers/common/configuration.d.ts +0 -71
  404. package/types/controllers/common/health.d.ts +0 -55
  405. package/types/controllers/common/index.d.ts +0 -4
  406. package/types/controllers/common/statics.d.ts +0 -271
  407. package/types/controllers/index.d.ts +0 -3
  408. package/types/controllers/utils/gateway.d.ts +0 -947
  409. package/types/controllers/utils/index.d.ts +0 -2
  410. package/types/index.d.ts +0 -15
  411. package/types/middlewares/common/errorHandler.d.ts +0 -143
  412. package/types/middlewares/common/forceHTTPS.d.ts +0 -64
  413. package/types/middlewares/common/hsts.d.ts +0 -111
  414. package/types/middlewares/common/index.d.ts +0 -4
  415. package/types/middlewares/html/fastHTML.d.ts +0 -238
  416. package/types/middlewares/html/index.d.ts +0 -3
  417. package/types/middlewares/html/showHTML.d.ts +0 -128
  418. package/types/middlewares/index.d.ts +0 -4
  419. package/types/middlewares/utils/index.d.ts +0 -2
  420. package/types/middlewares/utils/versionValidator.d.ts +0 -247
  421. package/types/services/common/appError.d.ts +0 -89
  422. package/types/services/common/httpError.d.ts +0 -37
  423. package/types/services/common/index.d.ts +0 -18
  424. package/types/services/common/sendFile.d.ts +0 -56
  425. package/types/services/frontend/frontendFs.d.ts +0 -72
  426. package/types/services/frontend/index.d.ts +0 -3
  427. package/types/services/html/htmlGenerator.d.ts +0 -298
  428. package/types/services/html/index.d.ts +0 -3
  429. package/types/services/http/apiClient.d.ts +0 -141
  430. package/types/services/http/http.d.ts +0 -159
  431. package/types/services/http/index.d.ts +0 -18
  432. package/types/services/http/responsesBuilder.d.ts +0 -140
  433. package/types/services/index.d.ts +0 -6
  434. package/types/services/utils/ensureBearerToken.d.ts +0 -137
  435. package/types/services/utils/index.d.ts +0 -16
  436. package/types/types.d.ts +0 -280
  437. package/types/utils/functions.d.ts +0 -55
  438. package/types/utils/wrappers.d.ts +0 -127
@@ -0,0 +1,636 @@
1
+ import {
2
+ __publicField
3
+ } from "../chunk-2B2CG5KL.js";
4
+ import * as path from "path";
5
+ import fs from "fs/promises";
6
+ import { createServer as createHTTPSServer } from "https";
7
+ import { Jimple } from "@homer0/jimple";
8
+ import { deepAssignWithOverwrite } from "@homer0/deep-assign";
9
+ import { appLoggerProvider } from "@homer0/simple-logger";
10
+ import { envUtilsProvider } from "@homer0/env-utils";
11
+ import { packageInfoProvider } from "@homer0/package-info";
12
+ import { pathUtilsProvider } from "@homer0/path-utils";
13
+ import { rootFileProvider } from "@homer0/root-file";
14
+ import { EventsHub } from "@homer0/events-hub";
15
+ import { simpleConfigProvider } from "@homer0/simple-config";
16
+ import compression from "compression";
17
+ import bodyParser from "body-parser";
18
+ import multer from "multer";
19
+ import {
20
+ createServer as createSpdyServer
21
+ } from "spdy";
22
+ import express from "express";
23
+ import {
24
+ commonServicesProvider,
25
+ httpServicesProvider,
26
+ utilsServicesProvider
27
+ } from "../services";
28
+ import {
29
+ statuses
30
+ } from "../utils";
31
+ class Jimpex extends Jimple {
32
+ /**
33
+ * @param options Preferences to customize the application.
34
+ * @param config The default settings for the configuration service. It's a
35
+ * shortcuit for `options.config.default`
36
+ */
37
+ constructor(options = {}, config = {}) {
38
+ super();
39
+ /**
40
+ * The customization settings for the application.
41
+ */
42
+ __publicField(this, "_options");
43
+ /**
44
+ * The Express application Jimpex uses under the hood.
45
+ */
46
+ __publicField(this, "_express");
47
+ /**
48
+ * Since the configuration service has an async initialization, the class uses this flag
49
+ * internally to validate if the configuration has been initialized or not.
50
+ */
51
+ __publicField(this, "_configReady", false);
52
+ /**
53
+ * A reference to the actuall HTTP the application will use. This can vary depending on
54
+ * whether HTTPS, or HTTP2 are enabled. If HTTPS is not enabled, it will be the same as
55
+ * the `express` property; if HTTPS is enabled, it will be an `https` server; and if
56
+ * HTTP2 is enabled, it will be an `spdy` server.
57
+ */
58
+ __publicField(this, "_server");
59
+ /**
60
+ * The instance of the server that is listening for requests.
61
+ */
62
+ __publicField(this, "_instance");
63
+ /**
64
+ * A list of functions that implement controllers and middlewares. When the application
65
+ * starts, the queue will be processed and those controllers and middlewares will be
66
+ * added to the server instance. The reason they are not added directly like with a
67
+ * regular Express implementation is that services on Jimple use lazy loading, and
68
+ * adding middlewares and controllers as they come could cause errors if they depend on
69
+ * services that are not yet registered.
70
+ */
71
+ __publicField(this, "_mountQueue", []);
72
+ /**
73
+ * A list with all the top routes controlled by the application. Every time a controller
74
+ * is mounted, its route will be added here.
75
+ */
76
+ __publicField(this, "_controlledRoutes", []);
77
+ this._options = deepAssignWithOverwrite(
78
+ {
79
+ filesizeLimit: "15MB",
80
+ boot: true,
81
+ path: {
82
+ appPath: "",
83
+ useParentPath: true
84
+ },
85
+ config: {
86
+ default: options?.config?.default || config,
87
+ name: "app",
88
+ path: "config/",
89
+ hasFolder: false,
90
+ loadFromEnvironment: true,
91
+ environmentVariable: "CONFIG",
92
+ defaultConfigFilename: "[app-name].config.js",
93
+ filenameFormat: "[app-name].[config-name].config.js"
94
+ },
95
+ statics: {
96
+ enabled: true,
97
+ onHome: false,
98
+ route: "statics"
99
+ },
100
+ express: {
101
+ trustProxy: true,
102
+ disableXPoweredBy: true,
103
+ compression: true,
104
+ bodyParser: true,
105
+ multer: true
106
+ },
107
+ services: {
108
+ common: true,
109
+ http: true,
110
+ utils: true
111
+ },
112
+ healthCheck: () => Promise.resolve(true)
113
+ },
114
+ options,
115
+ this._initOptions()
116
+ );
117
+ this._express = express();
118
+ this._setupCoreServices();
119
+ this._setupExpress();
120
+ this._configurePath();
121
+ this._init();
122
+ if (this._options.boot) {
123
+ this.boot();
124
+ }
125
+ }
126
+ /**
127
+ * This is where the app would register all its specific services, middlewares and controllers.
128
+ */
129
+ boot() {
130
+ }
131
+ /**
132
+ * Disables the server TLS validation. Meant to be used for development purposes.
133
+ */
134
+ disableTLSValidation() {
135
+ process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = "0";
136
+ this.logger.warn("TLS validation has been disabled");
137
+ }
138
+ /**
139
+ * Starts the app server.
140
+ *
141
+ * @param onStart A callback function to be called when the server actually starts.
142
+ * @returns The server instance.
143
+ */
144
+ async start(onStart) {
145
+ await this._setupConfig();
146
+ const config = this.getConfig();
147
+ const port = config.get("port");
148
+ if (!port) {
149
+ throw new Error("No port configured");
150
+ }
151
+ this._emitEvent("beforeStart", { app: this });
152
+ this._server = await this._createServer();
153
+ this._instance = this._server.listen(port, () => {
154
+ this._emitEvent("start", { app: this });
155
+ this._mountResources();
156
+ this.logger.success(`Starting on port ${port}`);
157
+ this._emitEvent("afterStart", { app: this });
158
+ if (onStart) {
159
+ onStart(config);
160
+ }
161
+ this._emitEvent("afterStartCallback", { app: this });
162
+ });
163
+ return this._instance;
164
+ }
165
+ /**
166
+ * This is an alias of `start`. The idea is for it to be used on serverless platforms,
167
+ * where you don't get to start your app, you just have export it.
168
+ *
169
+ * @param port In case the configuration doesn't already have it,
170
+ * this is the port where the application will use to run. If this
171
+ * parameter is used, the method will overwrite the `port`
172
+ * setting on the configuration service.
173
+ * @param onStart A callback function to be called when the server starts.
174
+ * @returns The server instance.
175
+ */
176
+ async listen(port, onStart) {
177
+ if (port) {
178
+ await this._setupConfig();
179
+ const config = this.getConfig();
180
+ config.set("port", port);
181
+ }
182
+ return this.start(onStart);
183
+ }
184
+ /**
185
+ * Stops the server instance.
186
+ */
187
+ stop() {
188
+ if (!this._instance)
189
+ return;
190
+ this._emitEvent("beforeStop", { app: this });
191
+ this._instance.close();
192
+ this._instance = void 0;
193
+ this._emitEvent("afterStop", { app: this });
194
+ }
195
+ /**
196
+ * Mounts a route controller or a middleware into a server routes.
197
+ *
198
+ * @param route The route for the controller/middleware.
199
+ * @param controller The controller/middleware resource to be mounted.
200
+ */
201
+ mount(route, controller) {
202
+ let useController;
203
+ if ("register" in controller && typeof controller.register === "function" && controller.provider === true) {
204
+ useController = controller.register(this, route);
205
+ } else if ("connect" in controller && typeof controller.connect === "function" && ("middleware" in controller && controller.middleware === true || "controller" in controller && controller.controller === true)) {
206
+ useController = controller;
207
+ } else {
208
+ useController = {
209
+ middleware: true,
210
+ connect: () => controller
211
+ };
212
+ }
213
+ this._mountQueue.push((server) => {
214
+ const connected = useController.connect(this, route);
215
+ if (!connected)
216
+ return;
217
+ const router = this._reduceWithEvent("controllerWillBeMounted", connected, {
218
+ route,
219
+ controller: useController,
220
+ app: this
221
+ });
222
+ server.use(route, router);
223
+ this._emitEvent("routeAdded", { route, app: this });
224
+ this._controlledRoutes.push(route);
225
+ });
226
+ }
227
+ /**
228
+ * Adds a global middleware to the application.
229
+ *
230
+ * @param middleware The middleware resource to be added.
231
+ */
232
+ use(middleware) {
233
+ const useMiddleware = "register" in middleware && typeof middleware.register === "function" ? middleware.register(this) : middleware;
234
+ this._mountQueue.push((server) => {
235
+ if ("connect" in useMiddleware && typeof useMiddleware.connect === "function") {
236
+ const handler = useMiddleware.connect(this);
237
+ if (handler) {
238
+ server.use(
239
+ this._reduceWithEvent("middlewareWillBeUsed", handler, { app: this })
240
+ );
241
+ }
242
+ return;
243
+ }
244
+ server.use(
245
+ this._reduceWithEvent(
246
+ "middlewareWillBeUsed",
247
+ useMiddleware,
248
+ { app: this }
249
+ )
250
+ );
251
+ });
252
+ }
253
+ /**
254
+ * Gets a setting from the configuration, or the configuration itself.
255
+ *
256
+ * @param setting The setting or settings to be retrieved. If is not specified, it
257
+ * will return the entire configuration.
258
+ * @param asArray If `true` and `setting` is an array, it will return the values as
259
+ * an array instead of an object.
260
+ * @template T The type of the setting to be retrieved.
261
+ */
262
+ getConfig(setting, asArray = false) {
263
+ const config = this.try("config");
264
+ if (!config) {
265
+ throw new Error("The config service is not available until the app starts");
266
+ }
267
+ if (typeof setting === "undefined") {
268
+ return config;
269
+ }
270
+ return config.get(setting, asArray);
271
+ }
272
+ /**
273
+ * Creates a new router instance.
274
+ */
275
+ getRouter() {
276
+ return this.get("router");
277
+ }
278
+ /**
279
+ * The logger service.
280
+ */
281
+ get logger() {
282
+ return this.get("logger");
283
+ }
284
+ /**
285
+ * The Express application Jimpex uses under the hood.
286
+ */
287
+ get express() {
288
+ return this._express;
289
+ }
290
+ /**
291
+ * The server instance that gets created when the app is started.
292
+ */
293
+ get instance() {
294
+ return this._instance;
295
+ }
296
+ /**
297
+ * The application customization options.
298
+ */
299
+ get options() {
300
+ return deepAssignWithOverwrite({}, this._options);
301
+ }
302
+ /**
303
+ * Gets the events service.
304
+ */
305
+ get eventsHub() {
306
+ return this.get("events");
307
+ }
308
+ /**
309
+ * A list of the routes that have controllers mounted on them.
310
+ */
311
+ get routes() {
312
+ return this._controlledRoutes.slice();
313
+ }
314
+ /**
315
+ * Adds a listener for an application event.
316
+ *
317
+ * @param eventName The name of the event to listen for.
318
+ * @param listener The listener function.
319
+ * @returns A function to unsubscribe the listener.
320
+ * @template EventName The name of the event, to match the type of the listener
321
+ * function.
322
+ */
323
+ on(eventName, listener) {
324
+ return this.eventsHub.on(eventName, listener);
325
+ }
326
+ /**
327
+ * Adds a listener for an application event that will only be execuded once: the first
328
+ * time the event is triggered.
329
+ *
330
+ * @param eventName The name of the event to listen for.
331
+ * @param listener The listener function.
332
+ * @returns A function to unsubscribe the listener.
333
+ * @template EventName The name of the event, to match the type of the listener
334
+ * function.
335
+ */
336
+ once(eventName, listener) {
337
+ return this.eventsHub.once(eventName, listener);
338
+ }
339
+ /**
340
+ * Based on the application options, it returns wheter the application is healthy or
341
+ * not.
342
+ */
343
+ isHealthy() {
344
+ return this._options.healthCheck(this);
345
+ }
346
+ /**
347
+ * This method is like a "lifecycle method", it gets executed on the constructor right
348
+ * before the "boot step". The idea is for the method to be a helper when the
349
+ * application is defined by subclassing {@link Jimpex}: the application could register
350
+ * all important services here and the routes on boot, then, if the implementation needs
351
+ * to access or overwrite a something, it can send `boot: false`, access/register what
352
+ * it needs, and then call `boot()`. That would be impossible for an application without
353
+ * overwriting the constructor and the boot functionality.
354
+ */
355
+ _init() {
356
+ }
357
+ /**
358
+ * It generates overwrites for the application options when it gets created. This method
359
+ * is a helper for when the application is defined by subclassing {@link Jimpex}: It's
360
+ * highly probable that if the application needs to change the default options, it would
361
+ * want to do it right from the class, instead of having to do it on every
362
+ * implementation. A way to do it would be overwriting the constructor and calling
363
+ * `super` with the custom overwrites, but this method exists so that won't be
364
+ * necessary: when creating the `options`, the constructor will merge the result of this
365
+ * method on top of the default ones.
366
+ */
367
+ _initOptions() {
368
+ return {};
369
+ }
370
+ /**
371
+ * Registers the "core services" on the container: logger, events, utils, etc.
372
+ */
373
+ _setupCoreServices() {
374
+ this.register(
375
+ appLoggerProvider({
376
+ serviceName: "logger"
377
+ })
378
+ );
379
+ this.register(envUtilsProvider);
380
+ this.register(packageInfoProvider);
381
+ this.register(pathUtilsProvider);
382
+ this.register(rootFileProvider);
383
+ const { services: enabledServices } = this._options;
384
+ if (enabledServices.common)
385
+ this.register(commonServicesProvider);
386
+ if (enabledServices.http)
387
+ this.register(httpServicesProvider);
388
+ if (enabledServices.utils)
389
+ this.register(utilsServicesProvider);
390
+ this.set("events", () => new EventsHub());
391
+ this.set("statuses", () => statuses);
392
+ }
393
+ /**
394
+ * Configures the Express application based on the class options.
395
+ */
396
+ _setupExpress() {
397
+ const { statics, filesizeLimit, express: expressOptions } = this._options;
398
+ if (expressOptions.trustProxy) {
399
+ this._express.enable("trust proxy");
400
+ }
401
+ if (expressOptions.disableXPoweredBy) {
402
+ this._express.disable("x-powered-by");
403
+ }
404
+ if (expressOptions.compression) {
405
+ this._express.use(compression());
406
+ }
407
+ if (statics.enabled) {
408
+ this._addStaticsFolder(statics.route, statics.folder, statics.onHome);
409
+ }
410
+ if (expressOptions.bodyParser) {
411
+ this._express.use(
412
+ bodyParser.json({
413
+ limit: filesizeLimit
414
+ })
415
+ );
416
+ this._express.use(
417
+ bodyParser.urlencoded({
418
+ extended: true,
419
+ limit: filesizeLimit
420
+ })
421
+ );
422
+ }
423
+ if (expressOptions.multer) {
424
+ this._express.use(multer().any());
425
+ }
426
+ this.set(
427
+ "router",
428
+ this.factory(() => express.Router())
429
+ );
430
+ }
431
+ /**
432
+ * Adds a static folder to the application.
433
+ *
434
+ * @param route The route to add the folder to.
435
+ * @param folder The path to the folder in the file system. If not defined, it will
436
+ * be use the same value as `route`. The path could be relative to the
437
+ * project root, or where the application executable is located,
438
+ * depending on the value of the `onHome` parameter.
439
+ * @param onHome If `true`, the path to the folder will be relative to the project
440
+ * root. If `false`, it will be relative to where the application
441
+ * executable is located.
442
+ */
443
+ _addStaticsFolder(route, folder = "", onHome = false) {
444
+ const location = onHome ? "home" : "app";
445
+ const staticRoute = route.replace(/^\/+/, "");
446
+ const pathUtils = this.get("pathUtils");
447
+ const staticFolder = pathUtils.joinFrom(location, folder || staticRoute);
448
+ this.mount(`/${staticRoute}`, {
449
+ connect: () => express.static(staticFolder),
450
+ controller: true
451
+ });
452
+ }
453
+ /**
454
+ * This helper method validates the `path` options in order to register the `app`
455
+ * location in the `pathUtils` service. The `app` location should be the path to where
456
+ * the application executable is located, but due to how ESM works, we can't infer it
457
+ * from the `module` object, so we need either recieved as the `appPath` setting, or try
458
+ * to get it from the parent module.
459
+ *
460
+ * @throws If the method should use the path from the parent module, but can't find
461
+ * it.
462
+ */
463
+ _configurePath() {
464
+ const pathUtils = this.get("pathUtils");
465
+ const {
466
+ path: { appPath, useParentPath }
467
+ } = this._options;
468
+ if (appPath) {
469
+ pathUtils.addLocation("app", appPath);
470
+ return;
471
+ }
472
+ let foundPath = false;
473
+ if (useParentPath) {
474
+ const stack = new Error().stack;
475
+ const stackList = stack.split("\n");
476
+ stackList.shift();
477
+ const parentFromStack = stackList.find((line) => !line.includes(__filename));
478
+ if (parentFromStack) {
479
+ const parentFile = parentFromStack.replace(/^.*?\s\(([^\s]+):\d+:\d+\)/, "$1");
480
+ if (parentFile !== parentFromStack) {
481
+ foundPath = true;
482
+ pathUtils.addLocation("app", path.dirname(parentFile));
483
+ }
484
+ }
485
+ }
486
+ if (!foundPath) {
487
+ throw new Error(
488
+ "The app location cannot be determined. Please specify the appPath option."
489
+ );
490
+ }
491
+ }
492
+ /**
493
+ * Setups the configuration service. The new configuration service requires async calls
494
+ * in order to load the configuration files (as it uses `import` instead of `require`),
495
+ * so it can't be instantiated as the other services.
496
+ * This method is called just before starting the application.
497
+ */
498
+ async _setupConfig() {
499
+ if (this._configReady)
500
+ return;
501
+ this._configReady = true;
502
+ const { config: options } = this._options;
503
+ let configsPath = options.path.replace(/\/$/, "");
504
+ if (options.hasFolder) {
505
+ configsPath = `${configsPath}${path.sep}${options.name}${path.sep}`;
506
+ }
507
+ const filenameFormat = options.filenameFormat.replace(/\[app-name\]/gi, options.name).replace(/\[config-name\]/gi, "[name]");
508
+ const defaultConfigFilename = options.defaultConfigFilename.replace(
509
+ /\[app-name\]/gi,
510
+ options.name
511
+ );
512
+ this.register(
513
+ simpleConfigProvider({
514
+ name: options.name,
515
+ defaultConfig: options.default,
516
+ defaultConfigFilename,
517
+ envVarName: options.environmentVariable,
518
+ path: configsPath,
519
+ filenameFormat
520
+ })
521
+ );
522
+ const config = this.getConfig();
523
+ await config.loadFromFile("", true, false);
524
+ if (options.loadFromEnvironment) {
525
+ await config.loadFromEnv();
526
+ }
527
+ }
528
+ /**
529
+ * Processes the resources from the mount queue (added with {@link Jimpex.mount} and
530
+ * {@link Jimpex.use}), and adds them to the Express application.
531
+ */
532
+ _mountResources() {
533
+ this._mountQueue.forEach((mount) => mount(this._express));
534
+ this._mountQueue.length = 0;
535
+ }
536
+ /**
537
+ * Emits an event using the `events` service.
538
+ *
539
+ * @param name The name of the event to emit.
540
+ * @param payload The event payload.
541
+ * @template EventName The literal name of the event, to type the event payload.
542
+ */
543
+ _emitEvent(name, payload) {
544
+ this.eventsHub.emit(name, payload);
545
+ }
546
+ /**
547
+ * Sends a target object to a list of reducer events so they can modify or replace it.
548
+ *
549
+ * @param name The name of the event to use.
550
+ * @param target The object to reduce with the event.
551
+ * @param payload Extra context for the listeners.
552
+ */
553
+ _reduceWithEvent(name, target, payload) {
554
+ return this.eventsHub.reduceSync(name, target, payload);
555
+ }
556
+ /**
557
+ * Loads the contents of a dictionary of credentials files that need to be used to
558
+ * configure HTTPS.
559
+ *
560
+ * @param credentialsInfo The dictionary where the keys are the type of credentials
561
+ * (`ca`, `cert`, `key`) and the values are the paths to the
562
+ * files.
563
+ * @param onHome If this is `true`, the path of the files will be relative
564
+ * to the project root. If it is `false`, it will be relative
565
+ * to where the application executable is located.
566
+ * @returns
567
+ */
568
+ async _loadCredentials(credentialsInfo, onHome = true) {
569
+ const location = onHome ? "home" : "app";
570
+ const pathUtils = this.get("pathUtils");
571
+ const keys = ["ca", "cert", "key"];
572
+ const info = await Promise.all(
573
+ keys.map(async (key) => {
574
+ const filepath = credentialsInfo[key];
575
+ if (!filepath)
576
+ return void 0;
577
+ const file = await fs.readFile(pathUtils.joinFrom(location, filepath), "utf8");
578
+ return {
579
+ key,
580
+ file
581
+ };
582
+ })
583
+ );
584
+ return info.reduce((acc, item) => {
585
+ if (item) {
586
+ acc[item.key] = item.file;
587
+ }
588
+ return acc;
589
+ }, {});
590
+ }
591
+ /**
592
+ * Validates the configuration and chooses the server the application needs to use: If
593
+ * HTTP2 is enabled, it will use Spdy; if HTTPS is enabled but HTTP is not, it will use
594
+ * the native HTTPS server; otherwise, it will be just the Express instance.
595
+ *
596
+ * @returns {Server}
597
+ * @throws {Error} If HTTP2 is enabled but HTTPS is not.
598
+ * @throws {Error} If HTTPS is enabled but there's no `https.credentials` object.
599
+ * @throws {Error} If HTTPS is enabled and no creadentials are found.
600
+ * @access protected
601
+ * @ignore
602
+ */
603
+ async _createServer() {
604
+ const [http2Config = {}, httpsConfig = {}] = this.getConfig(["http2", "https"], true);
605
+ if (!http2Config.enabled && !httpsConfig.enabled) {
606
+ return this._express;
607
+ }
608
+ if (http2Config.enabled && !httpsConfig.enabled) {
609
+ throw new Error("HTTP2 requires for HTTPS to be enabled");
610
+ }
611
+ if (!httpsConfig.credentials) {
612
+ throw new Error("The `credentials` object on the HTTPS settings is missing");
613
+ }
614
+ const credentials = await this._loadCredentials(
615
+ httpsConfig.credentials,
616
+ httpsConfig.credentials.onHome
617
+ );
618
+ if (!Object.keys(credentials).length) {
619
+ throw new Error("No credentials were found for HTTPS");
620
+ }
621
+ if (http2Config.enabled) {
622
+ const serverOptions = {
623
+ ...credentials,
624
+ spdy: http2Config.spdy
625
+ };
626
+ return createSpdyServer(serverOptions, this._express);
627
+ }
628
+ return createHTTPSServer(credentials, this._express);
629
+ }
630
+ }
631
+ const jimpex = (...args) => new Jimpex(...args);
632
+ export {
633
+ Jimpex,
634
+ jimpex
635
+ };
636
+ //# sourceMappingURL=jimpex.js.map