@adaptivestone/framework 5.0.0-beta.5 → 5.0.0-beta.50

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 (337) hide show
  1. package/CHANGELOG.md +1210 -530
  2. package/LICENCE +1 -1
  3. package/dist/Cli.d.ts +7 -0
  4. package/dist/Cli.js +19 -0
  5. package/dist/Cli.js.map +1 -0
  6. package/dist/cluster.d.ts +1 -0
  7. package/dist/cluster.js +18 -0
  8. package/dist/cluster.js.map +1 -0
  9. package/dist/codegen/appTypes.d.ts +19 -0
  10. package/dist/codegen/appTypes.js +49 -0
  11. package/dist/codegen/appTypes.js.map +1 -0
  12. package/dist/codegen/collectMetadata.d.ts +39 -0
  13. package/dist/codegen/collectMetadata.js +59 -0
  14. package/dist/codegen/collectMetadata.js.map +1 -0
  15. package/dist/codegen/emit.d.ts +29 -0
  16. package/dist/codegen/emit.js +325 -0
  17. package/dist/codegen/emit.js.map +1 -0
  18. package/dist/codegen/index.d.ts +16 -0
  19. package/dist/codegen/index.js +18 -0
  20. package/dist/codegen/index.js.map +1 -0
  21. package/dist/codegen/routeTypes.d.ts +13 -0
  22. package/dist/codegen/routeTypes.js +126 -0
  23. package/dist/codegen/routeTypes.js.map +1 -0
  24. package/dist/commands/CreateUser.d.ts +32 -0
  25. package/dist/commands/CreateUser.js +83 -0
  26. package/dist/commands/CreateUser.js.map +1 -0
  27. package/dist/commands/DropIndex.d.ts +16 -0
  28. package/dist/commands/DropIndex.js +30 -0
  29. package/dist/commands/DropIndex.js.map +1 -0
  30. package/dist/commands/GenerateRandomBytes.d.ts +7 -0
  31. package/dist/commands/GenerateRandomBytes.js +18 -0
  32. package/dist/commands/GenerateRandomBytes.js.map +1 -0
  33. package/dist/commands/GenerateTypes.d.ts +7 -0
  34. package/dist/commands/GenerateTypes.js +14 -0
  35. package/dist/commands/GenerateTypes.js.map +1 -0
  36. package/dist/commands/SyncIndexes.d.ts +6 -0
  37. package/dist/commands/SyncIndexes.js +31 -0
  38. package/dist/commands/SyncIndexes.js.map +1 -0
  39. package/dist/commands/migration/Create.d.ts +18 -0
  40. package/dist/commands/migration/Create.js +57 -0
  41. package/dist/commands/migration/Create.js.map +1 -0
  42. package/dist/commands/migration/Migrate.d.ts +6 -0
  43. package/dist/commands/migration/Migrate.js +43 -0
  44. package/dist/commands/migration/Migrate.js.map +1 -0
  45. package/dist/config/auth.d.ts +6 -0
  46. package/dist/config/auth.js +7 -0
  47. package/dist/config/auth.js.map +1 -0
  48. package/dist/config/http.d.ts +8 -0
  49. package/dist/config/http.js +10 -0
  50. package/dist/config/http.js.map +1 -0
  51. package/dist/config/i18n.d.ts +13 -0
  52. package/dist/config/i18n.js +13 -0
  53. package/dist/config/i18n.js.map +1 -0
  54. package/dist/config/ipDetector.d.ts +5 -0
  55. package/dist/config/ipDetector.js +15 -0
  56. package/dist/config/ipDetector.js.map +1 -0
  57. package/dist/config/log.d.ts +11 -0
  58. package/dist/config/log.js +20 -0
  59. package/dist/config/log.js.map +1 -0
  60. package/dist/config/mongo.d.ts +4 -0
  61. package/dist/config/mongo.js +4 -0
  62. package/dist/config/mongo.js.map +1 -0
  63. package/dist/config/rateLimiter.d.ts +13 -0
  64. package/dist/config/rateLimiter.js +17 -0
  65. package/dist/config/rateLimiter.js.map +1 -0
  66. package/dist/config/redis.d.ts +5 -0
  67. package/dist/config/redis.js +5 -0
  68. package/dist/config/redis.js.map +1 -0
  69. package/dist/config/validate.d.ts +4 -0
  70. package/dist/config/validate.js +4 -0
  71. package/dist/config/validate.js.map +1 -0
  72. package/dist/controllers/Auth.d.ts +74 -0
  73. package/dist/controllers/Auth.js +191 -0
  74. package/dist/controllers/Auth.js.map +1 -0
  75. package/dist/controllers/Auth.routes.gen.d.ts +57 -0
  76. package/dist/controllers/Auth.routes.gen.js +10 -0
  77. package/dist/controllers/Auth.routes.gen.js.map +1 -0
  78. package/dist/controllers/Home.d.ts +15 -0
  79. package/dist/controllers/Home.js +22 -0
  80. package/dist/controllers/Home.js.map +1 -0
  81. package/dist/controllers/Home.routes.gen.d.ts +14 -0
  82. package/dist/controllers/Home.routes.gen.js +10 -0
  83. package/dist/controllers/Home.routes.gen.js.map +1 -0
  84. package/dist/controllers/index.d.ts +36 -0
  85. package/dist/controllers/index.js +416 -0
  86. package/dist/controllers/index.js.map +1 -0
  87. package/dist/folderConfig.d.ts +34 -0
  88. package/dist/folderConfig.js +14 -0
  89. package/dist/folderConfig.js.map +1 -0
  90. package/dist/helpers/appInstance.d.ts +3 -0
  91. package/dist/helpers/appInstance.js +8 -0
  92. package/dist/helpers/appInstance.js.map +1 -0
  93. package/dist/helpers/crypto.d.ts +3 -0
  94. package/dist/helpers/crypto.js +17 -0
  95. package/dist/helpers/crypto.js.map +1 -0
  96. package/dist/helpers/files.d.ts +16 -0
  97. package/dist/helpers/files.js +78 -0
  98. package/dist/helpers/files.js.map +1 -0
  99. package/dist/helpers/logger.d.ts +4 -0
  100. package/dist/helpers/logger.js +20 -0
  101. package/dist/helpers/logger.js.map +1 -0
  102. package/dist/helpers/redis/clearNamespace.d.ts +2 -0
  103. package/dist/helpers/redis/clearNamespace.js +14 -0
  104. package/dist/helpers/redis/clearNamespace.js.map +1 -0
  105. package/dist/helpers/redis/redisConnection.d.ts +6 -0
  106. package/dist/helpers/redis/redisConnection.js +48 -0
  107. package/dist/helpers/redis/redisConnection.js.map +1 -0
  108. package/dist/helpers/yup.d.ts +13 -0
  109. package/{helpers → dist/helpers}/yup.js +9 -9
  110. package/dist/helpers/yup.js.map +1 -0
  111. package/dist/index.d.ts +1 -0
  112. package/dist/index.js +7 -0
  113. package/dist/index.js.map +1 -0
  114. package/dist/models/Lock.d.ts +90 -0
  115. package/dist/models/Lock.js +97 -0
  116. package/dist/models/Lock.js.map +1 -0
  117. package/dist/models/Migration.d.ts +13 -0
  118. package/dist/models/Migration.js +14 -0
  119. package/dist/models/Migration.js.map +1 -0
  120. package/dist/models/Sequence.d.ts +28 -0
  121. package/dist/models/Sequence.js +19 -0
  122. package/dist/models/Sequence.js.map +1 -0
  123. package/dist/models/User.d.ts +729 -0
  124. package/dist/models/User.js +294 -0
  125. package/dist/models/User.js.map +1 -0
  126. package/dist/models/UserOld.d.ts +190 -0
  127. package/dist/models/UserOld.js +230 -0
  128. package/dist/models/UserOld.js.map +1 -0
  129. package/dist/modules/AbstractCommand.d.ts +51 -0
  130. package/dist/modules/AbstractCommand.js +60 -0
  131. package/dist/modules/AbstractCommand.js.map +1 -0
  132. package/dist/modules/AbstractConnector.d.ts +5 -0
  133. package/dist/modules/AbstractConnector.js +8 -0
  134. package/dist/modules/AbstractConnector.js.map +1 -0
  135. package/dist/modules/AbstractController.d.ts +74 -0
  136. package/dist/modules/AbstractController.js +71 -0
  137. package/dist/modules/AbstractController.js.map +1 -0
  138. package/dist/modules/AbstractModel.d.ts +29 -0
  139. package/dist/modules/AbstractModel.js +42 -0
  140. package/dist/modules/AbstractModel.js.map +1 -0
  141. package/dist/modules/Base.d.ts +29 -0
  142. package/dist/modules/Base.js +58 -0
  143. package/dist/modules/Base.js.map +1 -0
  144. package/dist/modules/BaseCli.d.ts +25 -0
  145. package/dist/modules/BaseCli.js +148 -0
  146. package/dist/modules/BaseCli.js.map +1 -0
  147. package/dist/modules/BaseModel.d.ts +57 -0
  148. package/dist/modules/BaseModel.js +37 -0
  149. package/dist/modules/BaseModel.js.map +1 -0
  150. package/dist/server.d.ts +122 -0
  151. package/dist/server.js +478 -0
  152. package/dist/server.js.map +1 -0
  153. package/dist/services/cache/Cache.d.ts +31 -0
  154. package/dist/services/cache/Cache.js +103 -0
  155. package/dist/services/cache/Cache.js.map +1 -0
  156. package/dist/services/http/HttpServer.d.ts +44 -0
  157. package/dist/services/http/HttpServer.js +81 -0
  158. package/dist/services/http/HttpServer.js.map +1 -0
  159. package/dist/services/http/middleware/AbstractMiddleware.d.ts +41 -0
  160. package/dist/services/http/middleware/AbstractMiddleware.js +52 -0
  161. package/dist/services/http/middleware/AbstractMiddleware.js.map +1 -0
  162. package/dist/services/http/middleware/Auth.d.ts +9 -0
  163. package/dist/services/http/middleware/Auth.js +18 -0
  164. package/dist/services/http/middleware/Auth.js.map +1 -0
  165. package/dist/services/http/middleware/Cors.d.ts +12 -0
  166. package/dist/services/http/middleware/Cors.js +36 -0
  167. package/dist/services/http/middleware/Cors.js.map +1 -0
  168. package/dist/services/http/middleware/GetUserByToken.d.ts +36 -0
  169. package/dist/services/http/middleware/GetUserByToken.js +56 -0
  170. package/dist/services/http/middleware/GetUserByToken.js.map +1 -0
  171. package/dist/services/http/middleware/I18n.d.ts +23 -0
  172. package/dist/services/http/middleware/I18n.js +61 -0
  173. package/dist/services/http/middleware/I18n.js.map +1 -0
  174. package/dist/services/http/middleware/IpDetector.d.ts +14 -0
  175. package/dist/services/http/middleware/IpDetector.js +55 -0
  176. package/dist/services/http/middleware/IpDetector.js.map +1 -0
  177. package/dist/services/http/middleware/Pagination.d.ts +28 -0
  178. package/dist/services/http/middleware/Pagination.js +49 -0
  179. package/dist/services/http/middleware/Pagination.js.map +1 -0
  180. package/dist/services/http/middleware/PrepareAppInfo.d.ts +8 -0
  181. package/dist/services/http/middleware/PrepareAppInfo.js +17 -0
  182. package/dist/services/http/middleware/PrepareAppInfo.js.map +1 -0
  183. package/dist/services/http/middleware/RateLimiter.d.ts +26 -0
  184. package/dist/services/http/middleware/RateLimiter.js +102 -0
  185. package/dist/services/http/middleware/RateLimiter.js.map +1 -0
  186. package/dist/services/http/middleware/RequestLogger.d.ts +8 -0
  187. package/dist/services/http/middleware/RequestLogger.js +18 -0
  188. package/dist/services/http/middleware/RequestLogger.js.map +1 -0
  189. package/dist/services/http/middleware/RequestParser.d.ts +8 -0
  190. package/dist/services/http/middleware/RequestParser.js +35 -0
  191. package/dist/services/http/middleware/RequestParser.js.map +1 -0
  192. package/dist/services/http/middleware/Role.d.ts +12 -0
  193. package/dist/services/http/middleware/Role.js +24 -0
  194. package/dist/services/http/middleware/Role.js.map +1 -0
  195. package/dist/services/http/routing/ExpressAdapter.d.ts +12 -0
  196. package/dist/services/http/routing/ExpressAdapter.js +93 -0
  197. package/dist/services/http/routing/ExpressAdapter.js.map +1 -0
  198. package/dist/services/http/routing/RouteNode.d.ts +101 -0
  199. package/dist/services/http/routing/RouteNode.js +21 -0
  200. package/dist/services/http/routing/RouteNode.js.map +1 -0
  201. package/dist/services/http/routing/RouteRegistry.d.ts +37 -0
  202. package/dist/services/http/routing/RouteRegistry.js +201 -0
  203. package/dist/services/http/routing/RouteRegistry.js.map +1 -0
  204. package/dist/services/http/routing/formatTree.d.ts +23 -0
  205. package/dist/services/http/routing/formatTree.js +158 -0
  206. package/dist/services/http/routing/formatTree.js.map +1 -0
  207. package/dist/services/http/routing/match.d.ts +30 -0
  208. package/dist/services/http/routing/match.js +136 -0
  209. package/dist/services/http/routing/match.js.map +1 -0
  210. package/dist/services/http/routing/middlewareNormalization.d.ts +16 -0
  211. package/dist/services/http/routing/middlewareNormalization.js +28 -0
  212. package/dist/services/http/routing/middlewareNormalization.js.map +1 -0
  213. package/dist/services/http/types.d.ts +74 -0
  214. package/dist/services/http/types.js +8 -0
  215. package/dist/services/http/types.js.map +1 -0
  216. package/dist/services/i18n/I18n.d.ts +15 -0
  217. package/dist/services/i18n/I18n.js +58 -0
  218. package/dist/services/i18n/I18n.js.map +1 -0
  219. package/dist/services/logging/SentryTransport.d.ts +13 -0
  220. package/dist/services/logging/SentryTransport.js +121 -0
  221. package/dist/services/logging/SentryTransport.js.map +1 -0
  222. package/dist/services/validate/ValidateService.d.ts +54 -0
  223. package/dist/services/validate/ValidateService.js +122 -0
  224. package/dist/services/validate/ValidateService.js.map +1 -0
  225. package/dist/services/validate/ValidationError.d.ts +35 -0
  226. package/dist/services/validate/ValidationError.js +77 -0
  227. package/dist/services/validate/ValidationError.js.map +1 -0
  228. package/dist/services/validate/drivers/StandardSchemaDriver.d.ts +15 -0
  229. package/dist/services/validate/drivers/StandardSchemaDriver.js +34 -0
  230. package/dist/services/validate/drivers/StandardSchemaDriver.js.map +1 -0
  231. package/dist/services/validate/drivers/YupDriver.d.ts +21 -0
  232. package/dist/services/validate/drivers/YupDriver.js +66 -0
  233. package/dist/services/validate/drivers/YupDriver.js.map +1 -0
  234. package/dist/services/validate/types.d.ts +104 -0
  235. package/dist/services/validate/types.js +11 -0
  236. package/dist/services/validate/types.js.map +1 -0
  237. package/dist/tests/frameworkVitestSetup.d.ts +1 -0
  238. package/dist/tests/frameworkVitestSetup.js +9 -0
  239. package/dist/tests/frameworkVitestSetup.js.map +1 -0
  240. package/dist/tests/globalSetupVitest.d.ts +3 -0
  241. package/dist/tests/globalSetupVitest.js +29 -0
  242. package/dist/tests/globalSetupVitest.js.map +1 -0
  243. package/dist/tests/setupVitest.d.ts +1 -0
  244. package/dist/tests/setupVitest.js +91 -0
  245. package/dist/tests/setupVitest.js.map +1 -0
  246. package/dist/tests/testHelpers.d.ts +361 -0
  247. package/dist/tests/testHelpers.js +48 -0
  248. package/dist/tests/testHelpers.js.map +1 -0
  249. package/package.json +63 -43
  250. package/Cli.js +0 -22
  251. package/cluster.js +0 -25
  252. package/commands/CreateUser.js +0 -75
  253. package/commands/Documentation.js +0 -17
  254. package/commands/DropIndex.js +0 -29
  255. package/commands/GenerateRandomBytes.js +0 -21
  256. package/commands/GetOpenApiJson.js +0 -324
  257. package/commands/SyncIndexes.js +0 -39
  258. package/commands/migration/Create.js +0 -61
  259. package/commands/migration/Migrate.js +0 -55
  260. package/config/auth.js +0 -9
  261. package/config/http.js +0 -9
  262. package/config/i18n.js +0 -12
  263. package/config/ipDetector.js +0 -14
  264. package/config/log.js +0 -22
  265. package/config/mail.js +0 -29
  266. package/config/mongo.js +0 -3
  267. package/config/rateLimiter.js +0 -16
  268. package/config/redis.js +0 -4
  269. package/config/validate.js +0 -3
  270. package/controllers/Auth.js +0 -204
  271. package/controllers/Home.js +0 -28
  272. package/controllers/index.js +0 -60
  273. package/eslint.config.js +0 -44
  274. package/folderConfig.js +0 -14
  275. package/helpers/files.js +0 -76
  276. package/helpers/logger.js +0 -16
  277. package/helpers/redis/clearNamespace.js +0 -14
  278. package/index.js +0 -8
  279. package/jsconfig.json +0 -9
  280. package/locales/en/translation.json +0 -27
  281. package/locales/ru/translation.json +0 -27
  282. package/migrations/.gitkeep +0 -0
  283. package/models/Migration.js +0 -15
  284. package/models/Sequence.js +0 -22
  285. package/models/User.js +0 -261
  286. package/modules/AbstractCommand.js +0 -43
  287. package/modules/AbstractConnector.js +0 -9
  288. package/modules/AbstractController.js +0 -406
  289. package/modules/AbstractModel.d.ts +0 -48
  290. package/modules/AbstractModel.js +0 -92
  291. package/modules/Base.d.ts +0 -37
  292. package/modules/Base.js +0 -63
  293. package/modules/BaseCli.js +0 -94
  294. package/server.d.ts +0 -98
  295. package/server.js +0 -437
  296. package/services/cache/Cache.d.ts +0 -35
  297. package/services/cache/Cache.js +0 -124
  298. package/services/documentation/DocumentationGenerator.js +0 -169
  299. package/services/http/HttpServer.js +0 -95
  300. package/services/http/middleware/AbstractMiddleware.js +0 -51
  301. package/services/http/middleware/Auth.js +0 -20
  302. package/services/http/middleware/Cors.js +0 -46
  303. package/services/http/middleware/GetUserByToken.js +0 -47
  304. package/services/http/middleware/I18n.js +0 -117
  305. package/services/http/middleware/IpDetector.js +0 -59
  306. package/services/http/middleware/Pagination.js +0 -57
  307. package/services/http/middleware/PrepareAppInfo.js +0 -18
  308. package/services/http/middleware/RateLimiter.js +0 -134
  309. package/services/http/middleware/RequestLogger.js +0 -22
  310. package/services/http/middleware/RequestParser.js +0 -40
  311. package/services/http/middleware/Role.js +0 -29
  312. package/services/messaging/email/index.js +0 -217
  313. package/services/messaging/email/resources/.gitkeep +0 -1
  314. package/services/messaging/email/templates/emptyTemplate/html.pug +0 -9
  315. package/services/messaging/email/templates/emptyTemplate/subject.pug +0 -1
  316. package/services/messaging/email/templates/emptyTemplate/text.pug +0 -1
  317. package/services/messaging/email/templates/recovery/html.pug +0 -8
  318. package/services/messaging/email/templates/recovery/subject.pug +0 -2
  319. package/services/messaging/email/templates/recovery/text.pug +0 -3
  320. package/services/messaging/email/templates/verification/html.pug +0 -10
  321. package/services/messaging/email/templates/verification/subject.pug +0 -1
  322. package/services/messaging/email/templates/verification/text.pug +0 -1
  323. package/services/messaging/index.js +0 -3
  324. package/services/validate/ValidateService.js +0 -157
  325. package/services/validate/drivers/AbstractValidator.js +0 -37
  326. package/services/validate/drivers/CustomValidator.js +0 -51
  327. package/services/validate/drivers/YupValidator.js +0 -103
  328. package/tests/globalSetupVitest.js +0 -35
  329. package/tests/setup.js +0 -116
  330. package/tests/setupVitest.js +0 -107
  331. package/types/Expand.d.ts +0 -11
  332. package/types/TFoldersConfig.d.ts +0 -17
  333. package/views/404.pug +0 -3
  334. package/views/home.pug +0 -3
  335. package/views/layouts/base.pug +0 -39
  336. package/vitest.config.js +0 -16
  337. /package/{commands → dist/migrations}/.gitkeep +0 -0
package/CHANGELOG.md CHANGED
@@ -1,526 +1,1085 @@
1
- ### 5.0.0-beta.5
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [5.0.0-next]
9
+
10
+ This is a big release that contains a lot of new features and breaking changes.
11
+ Main feature of that release is full TypeScript support insluding mongoose models.
12
+
13
+ ### New Features
14
+
15
+ - **[NEW]** Full TypeScript support, including Mongoose models.
16
+ - **[NEW]** New model type: `BaseModel`, simplifying work with TypeScript and based on statics.
17
+ - **[NEW]** `AppInstance` helper to access the app instance from anywhere without passing it.
18
+ - **[NEW]** `GenerateTypes` command added.
19
+ - **[NEW]** `Lock` model for working with locks via MongoDB.
20
+ - **[NEW]** `FrameworkFolder` folder added to the app for module usage.
21
+ - **[NEW]** Ability to skip Mongo model initialization in CLI environments.
22
+ - **[NEW]** Mongo connections in CLI now have unique names, including the command name.
23
+ - **[NEW]** On shutdown event, force shutdown after a timeout.
24
+ - **[NEW]** `GenerateRandomBytes` command added.
25
+ - **[NEW]** `IpDetector` middleware for detecting proxies and `X-Forwarded-For` headers.
26
+ - **[NEW]** Test helpers getTestServerURL and serverInstance.
27
+ - **[NEW]** Rate limiter middleware - add consumeResult function to allow user middleware as a regular rate limiter
28
+ - **[NEW]** Ip detector middleware - add getIpAdressFromIncomingMessage function to allow user middleware as a detector of id adresses without middleware
29
+ - **[NEW]** Introduce i18nService (ability to user i18n not only inside middleware)
30
+ - **[NEW]** [Standard Schema](https://standardschema.dev/) validation. Yup ≥1.7, Zod, Valibot, ArkType supported.
31
+ - **[NEW]** Pluggable `ValidatorDriver` + `ValidateService.register(driver)` for custom validators.
32
+ - **[NEW]** `StandardSchemaV1.InferOutput<typeof schema>` for compile-time handler types.
33
+ - **[NEW]** Framework-owned `ValidationError` with structured `.issues`. Wire-compatible.
34
+ - **[NEW]** Tree-based `RouteRegistry` replaces Express's hidden router internally. Lives on `app.httpServer.routeRegistry`. One global tree, walkable by codegen / OpenAPI / MCP emitters. The Express adapter mounts once (`app.express.use(adapter)`); path matching, parameter extraction, method dispatch, and middleware ordering all live in framework code now. 405 with `Allow` header, 400 on malformed paths, HEAD → GET fallback. Per-segment URL decoding (Spring's `PathPatternParser` model).
35
+ - **[NEW]** `app.controllerManager.registerController(ControllerClass, prefix?)` for explicit/programmatic controller registration. Auto-loading uses the same entry point internally. Register late via `Server.startServer`'s `callbackBefore404` hook so routes mount before the 404 handler.
36
+ - **[NEW]** Per-controller route type generation: `npm run gen` (alias for `npm run cli generatetypes`) emits `<File>.routes.gen.ts` next to each controller plus `genTypes.d.ts` at the project root. Handler signatures use `import type { PostLoginRequest } from './Auth.routes.gen.ts'` instead of hand-written `req: FrameworkRequest & { appInfo: { request: { ... } } }` intersections. Codegen walks `RouteRegistry.flatten()` so resolved middleware chains exactly match what the runtime executes (no parallel matcher). Gen files are gitignored — recommend `**/*.routes.gen.ts` in your `.gitignore` and `npm run gen && tsc --noEmit` in your `check:types` script.
37
+ - **[NEW]** Type contracts in `services/http/types`: `BaseRequestContext`, `BaseAppInfo`, `AppInfoExtensions` (module-augmentation point for app-wide globals), `ProvidesOf<T>`, `UnionAppInfoProvides<MWs>`. Codegen output composes these into per-handler `<MethodName>Request` aliases.
38
+ - **[NEW]** `static get provides()` convention on middlewares — declares what the middleware adds to `req.appInfo` (e.g., `GetUserByToken.provides` returns `{ user?: InstanceType<TUser> }`). Codegen reads this; runtime ignores it. Type-only phantom.
39
+ - **[NEW]** Boot-time route tree log at `verbose` log level. After all controllers register, the framework prints the full route registry: path structure, per-node attached middlewares (with inherited chain marked separately as `pmw:`), per-method handlers with their absolute path, schema flags (`[body]` / `[query]`), and route-level middleware (`[mw: ...]`). HTTP verbs are color-coded (blue GET, green POST, yellow PUT/PATCH, red DELETE, gray OPTIONS); `:param` and `*splat` segments stand out in magenta. ANSI codes are emitted unconditionally — looks right in TTY consoles, raw codes appear in file/Sentry transports for the one-time boot output.
40
+ - **[NEW]** `Server#getLogger()` registers a `shutdown` listener that drains the winston logger (`logger.close()`). Fixes 5s exit stall in CLI commands (`generatetypes`, etc.) caused by winston transport sockets keeping the event loop alive past the shutdown signal. The 5-second force-shutdown safety timer remains as zombie-prevention in production.
41
+ - **[NEW]** Boot-time warnings on misconfigured routes / middleware Maps. Framework now logs at `warn` level when it sees: unknown verb in the `routes` getter (anything other than `get/post/put/patch/delete/head/options`), a route object missing a callable `handler` field, a non-string key in the middleware `Map`, or an unknown method prefix on a `Map` key (e.g., a typo like `'PATC/login'`). Previously these silently produced 404s at request time.
42
+ - **[NEW]** Codegen emits typed `params` for route path segments. `:name` segments and `{*name}` splats are extracted from the path string and emitted as `& { params: { name: string } }` on the generated `<Method>Request` alias. Splats capture multiple segments joined with `/` — typed as `string` (not `string[]`), matching the matcher's behavior. Removes the need for hand-rolled `& { params: { id: string } }` intersections on every handler with a `:param` route.
43
+ - **[NEW]** Codegen emits `appInfo.query: StandardSchemaV1.InferOutput<...>` from route-level `query:` schemas. Mirrors how `request:` schemas are already handled — declares it on the route, handlers read typed `req.appInfo.query.X`.
44
+ - **[NEW]** Codegen deduplicates identical union branches when one handler serves multiple routes with the same resolved chain + path params + schemas. Prevents `Foo = (X & {...}) | (X & {...})` output in `.routes.gen.ts`.
45
+ - **[NEW]** `Pagination` middleware declares `static get provides()` returning `PaginationMiddlewareAppInfo['appInfo']`. Routes with `Pagination` in their chain get `req.appInfo.pagination: { page, limit, skip }` typed automatically.
46
+ - **[FIX]** `setupVitest.ts` no longer imports framework-internal fixtures. The test-fixture controller (`SomeController`) is now registered inside its own test file via late `controllerManager.registerController()` (the adapter reads the registry live, so registration after `startServer` works). Consumer projects can use `@adaptivestone/framework/tests/setupVitest.js` without `Cannot find module './fixtures/...'` errors. `frameworkVitestSetup.*` is now `.npmignore`'d as framework-only.
47
+ - **[FIX]** Codegen now walks the `extends` chain when resolving middleware import paths. A child controller that inherits `static get middleware()` from its parent class no longer has those middlewares filtered out of its generated chain — codegen scans the parent's source file for the import line and emits the right `import type` in the child's `.routes.gen.ts`. Bare-package ancestors (e.g. extending a framework class from `node_modules`) are skipped because their `.ts` source isn't accessible at codegen time; child controllers in that case should either override the middleware Map or add a type-only re-import.
48
+
49
+ ### Breaking changes (please read carefully)
50
+
51
+ - **[BREAKING]** No more global variables for testing and default user will not be created by default
52
+ - **[BREAKING]** All models now should be extended from `BaseModel`. This is a potencial breaking change specially for `User` model.
53
+ - **[BREAKING]** Remove jest support for testing.
54
+ - **[BREAKING]** Move email module to separate package `@adaptivestone/framework-module-email`. Please use it if you want to send emails.
55
+ - **[BREAKING]** Remove `VIEWS` folders at all. Should not affect any user as this was not used internally.
56
+ - **[BREAKING]** Removed `noidemailer-sendmail-transport`. Not needed anymore and not recommended to use as well.
57
+ - **[BREAKING]** Remove `minimist` CLI parsing and replace it by `commandArguments` parser.
58
+ - **[BREAKING]** `vitest` v3 <https://vitest.dev/guide/migration.html>.
59
+ - **[BREAKING]** `i18next` v24 <https://www.i18next.com/misc/migration-guide#v23.x.x-to-v24.0.0>.
60
+ - **[BREAKING]** Possible breaking. Framework start using express 5 instead of express 4. Please follow express migration guide too <https://expressjs.com/en/guide/migrating-5.html>.
61
+ - **[BREAKING]** As part of express 5 migration `_` in rotes (middlewares) should have perameter. please replace `_` to `*splat`.
62
+ - **[BREAKING]** Default auth responce changed to be unified. `{token, user}` => `{data:{token, user}}`.
63
+ - **[BREAKING]** `RateLimiter` now need to have `IpDetector` middleware before.
64
+ - **[BREAKING]** Removing `staticFiles` middleware as it not used in projects anymore. Docs with nginx config will be provided.
65
+ - **[BREAKING]** Remove default `AUTH_SALT`. It should be provided on a app level now.
66
+ - **[BREAKING]** Minimum node version is 20.12 as for now (`process.loadEnvFile`).
67
+ - **[BREAKING]** ESM only. No more commonJS. That help to fix a lot of bugs with tests and provides better development expirience.
68
+ - **[BREAKING]** Mongoose v8. <https://mongoosejs.com/docs/migrating_to_8.html>.
69
+ - **[BREAKING]** Mongoose v9. <https://mongoosejs.com/docs/migrating_to_9.html>.
70
+ - **[BREAKING]** Vitest v4 <https://vitest.dev/guide/migration.html#vitest-4>
71
+ - **[BREAKING]** Yup ≥1.7 required (was ≥1.0). Stays as a direct dep — used by built-in `Auth` controller. Schemas must implement Standard Schema (`~standard`); yup ≥1.7 does this natively.
72
+ - **[BREAKING]** Legacy `{validate, cast}` plain-object validators removed. Wrap as Standard Schema (~10 lines).
73
+ - **[BREAKING]** Yup `req:` context inside `.test()` / `.when()` removed. Use `this.parent` or move logic to handler.
74
+ - **[BREAKING]** Internal driver classes (`AbstractValidator`, `YupValidator`, `CustomValidator`) removed.
75
+ - **[BREAKING]** `ValidateService` surface trimmed to `{constructor, validate, resolve, register}`. Helpers like `validateReqData` removed.
76
+ - **[BREAKING]** `AbstractMiddleware.relatedQueryParameters` / `relatedRequestParameters` defaults changed from `yup.object().shape({})` to `null`. Override with any Standard Schema-conformant schema.
77
+ - **[BREAKING]** `BaseAppInfo.i18n` is now required (was optional in `FrameworkRequest`). Reflects runtime reality: `I18nMiddleware` is part of `HttpServer`'s default chain. If you removed I18n from your global chain, augment `BaseAppInfo` to relax the field.
78
+ - **[BREAKING]** OpenAPI / documentation generation removed: `framework documentation` and `framework getOpenApiJson` CLI commands, `DocumentationGenerator`, and `app.documentation` field deleted. Output was already partial after Standard Schema migration. Will return in later with per-vendor `toJsonSchema` support.
79
+ - **[BREAKING]** Path-pattern syntax narrowed. The new tree-based router supports literal segments, `:name` params (exactly one segment), and `{*name}` splats (zero or more segments to end of path). **Express 5's optional-param `{:name}` and inline regex are NOT supported.** If you had routes like `/fullpath/:paramOne/{:paramTwo}`, split into two explicit routes (`/fullpath/:paramOne` + `/fullpath/:paramOne/:paramTwo`) or restructure. Specificity is structural (static > param > splat); URL decoding is per-segment.
80
+ - **[BREAKING]** `AbstractController` constructor third argument `isExpressMergeParams` removed. The old default Express-router behavior of stripping parent params is gone — all matched params (across the full path, including the controller prefix) are available on `req.params`. If you relied on the merge-params toggle, no action needed in most cases; if you specifically depended on the strip behavior, restructure your handler to filter `req.params` keys.
81
+
82
+ ---
83
+ ## [5.0.0-beta.50]
84
+
85
+ - **[FIX]** Tree-based router: different HTTP methods at the same param position can now use different `:name` segments. Previously, `PUT /:slug` and `POST /:event` on the same controller would either throw at boot ("conflicting param children") or silently use the first-registered name for all methods (`req.params.event` → `undefined`). Each `HandlerEntry` now carries its own `paramNames` array — the tree is structural only, param naming is per-handler.
86
+
87
+ ---
88
+ ## [5.0.0-beta.49]
89
+
90
+ - **[FIX]** Codegen: fix router name resolution in generated route types.
91
+ - **[UPDATE]** Codegen output improvements.
2
92
 
3
- [UPDATE] migrate to eslint 9 and away from aibnb styles (they are abonded)
93
+ ---
94
+ ## [5.0.0-beta.48]
4
95
 
5
- ### 5.0.0-beta.4
96
+ - **[NEW]** Codegen emits route metadata (`methodName`, `controllerClass`, `sourceFile`) on `HandlerEntry.meta`.
97
+ - **[NEW]** `Pagination` middleware declares `static get provides()` — routes with `Pagination` in their chain get `req.appInfo.pagination` typed automatically.
98
+ - **[NEW]** Codegen emits `appInfo.query` from route-level `query:` schemas.
99
+ - **[NEW]** Codegen deduplicates identical union branches.
6
100
 
7
- [NEW] on shutdown event now after timeout we are forcing to shutdown
101
+ ---
102
+ ## [5.0.0-beta.47]
8
103
 
9
- ### 5.0.0-beta.2
104
+ - **[UPDATE]** Tree-based route type generation improvements.
105
+ - **[UPDATE]** Dependencies update.
10
106
 
11
- [UPDATE] update deps
12
- [NEW] add ability to skip mongo model init in CLI env
13
- [NEW] now each mongo connection on CLI have own name and inslude command name there too (getMongoConnectionName in command)
107
+ ---
108
+ ## [5.0.0-beta.46]
14
109
 
15
- ### 5.0.0-beta.1
110
+ - **[NEW]** Tree-based `RouteRegistry` replaces Express's hidden router internally. One global tree, walkable by codegen / OpenAPI / MCP emitters.
111
+ - **[NEW]** Per-controller route type generation (`npm run gen` emits `<File>.routes.gen.ts`).
112
+ - **[NEW]** Standard Schema validation (Yup ≥1.7, Zod, Valibot, ArkType supported).
113
+ - **[NEW]** Boot-time route tree log at `verbose` level.
114
+ - **[NEW]** Boot-time warnings on misconfigured routes / middleware Maps.
115
+ - **[NEW]** `app.controllerManager.registerController(ControllerClass, prefix?)` for explicit registration.
116
+ - **[FIX]** `setupVitest.ts` no longer imports framework-internal fixtures.
117
+ - **[FIX]** Codegen walks the `extends` chain when resolving middleware import paths.
118
+ - **[BREAKING]** Path-pattern syntax narrowed (no Express 5 optional-param `{:name}` or inline regex).
119
+ - **[BREAKING]** `AbstractController` constructor third argument `isExpressMergeParams` removed.
120
+ - **[BREAKING]** Legacy `{validate, cast}` plain-object validators removed.
121
+ - **[BREAKING]** Yup ≥1.7 required. Schemas must implement Standard Schema.
122
+ - **[BREAKING]** `ValidateService` surface trimmed. Helpers like `validateReqData` removed.
123
+ - **[BREAKING]** OpenAPI / documentation generation removed (will return later).
16
124
 
17
- [UPDATE] update deps
18
- [BREAKING] vitest v3 https://vitest.dev/guide/migration.html
125
+ ---
126
+ ## [5.0.0-beta.45]
127
+ - **[BREAKING]** rate-limiter-flexible v9->v10
128
+ - **[BREAKING]** typecript v5->v6
19
129
 
20
- ### 5.0.0-alpha.26
130
+ ---
131
+ ## [5.0.0-beta.44]
21
132
 
22
- [UPDATE] update deps
23
- [UPDATE] new commands view in CLI
133
+ - **[NEW]** Logout method
134
+ - **[Update]** set model typing
24
135
 
25
- ### 5.0.0-alpha.24
26
136
 
27
- [UPDATE] update deps
28
- [BREAKING] i18next v24 https://www.i18next.com/misc/migration-guide#v23.x.x-to-v24.0.0
29
137
 
30
- ### 5.0.0-alpha.23
138
+ ---
139
+ ## [5.0.0-beta.43]
31
140
 
32
- [UPDATE] update deps
141
+ - **[FIX]** Fix typo in peerDeps
33
142
 
34
- ### 5.0.0-alpha.22
35
143
 
36
- [UPDATE] update deps
37
- [FIX] fix optional routing parameters
144
+ ---
145
+ ## [5.0.0-beta.42]
38
146
 
39
- ### 5.0.0-alpha.21
147
+ - **[BREAKING]** Mongoose v9. <https://mongoosejs.com/docs/migrating_to_9.html>.
40
148
 
41
- [BREAKING] possible breaking. Framework start using express 5 instead of express 4. Please follow express migration guide too https://expressjs.com/en/guide/migrating-5.html.
42
- [BREAKING] AS part of express 5 migration _ in rotes (middlewares) should have perameter. please replace _ to \*splat
43
- [UPDATE] update deps
44
- [UPDATE] Mailer uses await import() for startup speedup
149
+ ---
150
+ ## [5.0.0-beta.41]
45
151
 
46
- ### 5.0.0-alpha.20
152
+ - **[UPDATE]** Update deps
153
+ - **[NEW]** Bearer scheme support
154
+ - **[NEW]** redisConnection helper
47
155
 
48
- [UPDATE] update deps
49
- [UPDATE] #realLogger do not throw error in a scecific cases (model toJSON({virtual:true}))
50
156
 
51
- ### 5.0.0-alpha.19
52
157
 
53
- [NEW] added modelSchemaOptions for models
158
+ ---
159
+ ## [5.0.0-beta.40]
54
160
 
55
- ### 5.0.0-alpha.18
161
+ - **[UPDATE]** Update `rate-limiter-flexible` to v9.
162
+ - **[UPDATE]** Remove 'winston-transport-sentry' and implementcustom logic based on 'sentry' itself (from v9.14 sentry have native winston support)
56
163
 
57
- [BREAKING] default auth responce changed to be unified. {token, user} = > {data:{token, user}}
58
- [UPDATE] RateLimiter updae key generation
59
164
 
60
- ### 5.0.0-alpha.17
165
+ ## [5.0.0-beta.39]
61
166
 
62
- [NEW] generateRandomBytes command
63
- [UPDATE] update deps
167
+ - **[UPDATE]** rete limiter. Do not create index on mongo if we have "process.env.test === 'true'"
64
168
 
65
- ### 5.0.0-alpha.16
169
+ ---
66
170
 
67
- [UPDATE] no warning of direct usage body and query
68
- [UPDATE] update deps
171
+ ## [5.0.0-beta.38]
69
172
 
70
- ### 5.0.0-alpha.15
173
+ - **[UPDATE]** update dependencies
174
+ - **[UPDATE]** update rate limiter Mongo option to not create an index by default when NODE_ENV=test
175
+ - **[UPDATE]** the default User model now uses roles and permissions with the String type (previously was any, for historical reasons). To avoid changes on Mongoose 8.19 as it affects User model https://github.com/Automattic/mongoose/issues/15699
176
+ - **[BREAKING]** Vitest v4 <https://vitest.dev/guide/migration.html#vitest-4>
71
177
 
72
- [BUG] fix bug with pagination
73
- [UPDATE] update deps
178
+ ---
74
179
 
75
- ### 5.0.0-alpha.14
180
+ ## [5.0.0-beta.36]
76
181
 
77
- [NEW] add types for Abstract model (wip)
182
+ - **[UPDATE]** i18nService update loading to avoid race conditions
183
+ ---
78
184
 
79
- ### 5.0.0-alpha.13
185
+ ## [5.0.0-beta.36]
80
186
 
81
- [UPDATE] update deps
82
- [UPDATE] update i18n internal implementation
83
- [CHANGE] disable https server view
187
+ - **[UPDATE]** i18nService update method names
84
188
 
85
- ### 5.0.0-alpha.12
189
+ ---
86
190
 
87
- [UPDATE] update deps
191
+ ## [5.0.0-beta.35]
88
192
 
89
- ### 5.0.0-alpha.11
193
+ - **[NEW]** Introduce i18nService (ability to user i18n not only inside middleware)
90
194
 
91
- [UPDATE] update deps
195
+ ---
92
196
 
93
- ### 5.0.0-alpha.10
197
+ ## [5.0.0-beta.34]
94
198
 
95
- [UPDATE] update deps
96
- [NEW] IpDetector middleware that support detecting proxy and X-Forwarded-For header
97
- [BREAKING] RateLimiter now need to have IpDetector middleware before
199
+ - **[NEW]** I18nMiddlewareAppInfo type
98
200
 
99
- ### 5.0.0-alpha.9
201
+ ---
100
202
 
101
- [UPDATE] update deps
102
- [BREAKING] removing staticFiles middleware as it not used in projects anymore. Docs with nginx config will be provided
103
- [BREAKING] remove default AUTH_SALT. It should be provided on a app level now
104
- [BREAKING] Vitest 2.0.0 https://vitest.dev/guide/migration.html#migrating-to-vitest-2-0
203
+ ## [5.0.0-beta.33]
105
204
 
106
- ### 5.0.0-alpha.8
205
+ - **[NEW]** consumeResult changed to be more flexible
107
206
 
108
- [UPDATE] replace dotenv with loadEnvFile
109
- [UPDATE] replace nodemon with node --watch (dev only)
110
- [BREAKING] Minimum node version is 20.12 as for now (process.loadEnvFile)
207
+ ---
111
208
 
112
- ### 5.0.0-alpha.7
209
+ ## [5.0.0-beta.32]
113
210
 
114
- [UPDATE] deps update
211
+ - **[NEW]** Ip detector middleware - add getIpAdressFromIncomingMessage function to allow user middleware as a detector of id adresses without middleware
115
212
 
116
- ### 5.0.0-alpha.6
213
+ ---
117
214
 
118
- [UPDATE] Update internal documentation (jsdoc, d.ts)
215
+ ## [5.0.0-beta.31]
119
216
 
120
- ### 5.0.0-alpha.5
217
+ - **[NEW]** Rate limiter middleware - add consumeResult function to allow user middleware as a regular rate limiter
121
218
 
122
- [UPDATE] More verbose errors for rapsing body request.
123
- [UPDATE] deps update
124
219
 
125
- ### 5.0.0-alpha.4
220
+ ---
126
221
 
127
- [UPDATE] Update rate-limiter-flexible to v5
128
- [CHANGE] Cache update redis.setEX to redis.set(..,..,{EX:xx}) as setEX deprecated
222
+ ## [5.0.0-beta.30]
129
223
 
130
- ### 5.0.0-alpha.3
224
+ - **[FIX]** Fix CLI mongo app name generation (64 symbols limit)
131
225
 
132
- [UPDATE] deps update
133
- [FIX] Migration commands apply
134
226
 
135
- ### 5.0.0-alpha.2
227
+ ---
136
228
 
137
- [UPDATE] deps update
229
+ ## [5.0.0-beta.29]
138
230
 
139
- ### 5.0.0-alpha.1
231
+ - **[FIX]** Fix CLI mongo app name generation (128 symbols limit)
140
232
 
141
- [BREAKING] Vitest 1.0.0 https://vitest.dev/guide/migration.html#migrating-from-vitest-0-34-6
142
- [BREAKING] ESM only. No more commonJS. That help to fix a lot of bugs with tests and provides better development expirience
143
- [BREAKING] Mongoose v8. https://mongoosejs.com/docs/migrating_to_8.html
233
+ ---
144
234
 
145
- ### 4.11.4
235
+ ## [5.0.0-beta.28]
146
236
 
147
- [UPDATE] deps update
237
+ - **[UPDATE]** Inside CLI allow to have a negative values
238
+ - **[UPDATE]** Update deps.
148
239
 
149
- ### 4.11.3
240
+ ---
150
241
 
151
- [UPDATE] deps update
242
+ ## [5.0.0-beta.27]
152
243
 
153
- ### 4.11.2
244
+ - **[UPDATE]** Remove eslint, prettiver and move to biome
245
+ - **[UPDATE]** Update types.
246
+ - **[UPDATE]** Update deps.
154
247
 
155
- [FIX] Cors middleware return proper headers on multidomains
156
248
 
157
- ### 4.11.1
249
+ ---
158
250
 
159
- [FIX] Cors middleware return proper status
251
+ ## [5.0.0-beta.26]
160
252
 
161
- ### 4.11.0
253
+ - **[UPDATE]** Update types.
254
+ - **[UPDATE]** Update tests (more ts).
162
255
 
163
- [NEW] Cors middleware
164
- [BREAKING] This is a potencial breaking change as we switched from cors external package to internal middleware. From API nothing was changed. This is a potencial breaking changes, but it should keep working as it
256
+ ---
165
257
 
166
- ### 4.10.0
258
+ ## [5.0.0-beta.25]
167
259
 
168
- [UPDATE] deps update
169
- [NEW] Static file middleware
170
- [BREAKING] This is a potencial breaking change as we switched from express.static to internal middleware that provide less features but faster. From API nothing was changed
260
+ - **[UPDATE]** Update types.
171
261
 
172
- ### 4.9.2
262
+ ---
173
263
 
174
- [UPDATE] deps update
264
+ ## [5.0.0-beta.24]
175
265
 
176
- ### 4.9.1
266
+ - **[UPDATE]** Update types.
177
267
 
178
- [UPDATE] all responces from framework now happens in JSON. Previouls sometime aswers was in plan text
268
+ ---
179
269
 
180
- ### 4.9.0
270
+ ## [5.0.0-beta.23]
181
271
 
182
- [BREAKING] We are separated testsing to setyp and global setup. Global setup now care of mongo to make sure that only on mongodb memoery server is spinned up. If you are using vitest please add "globalSetup: node_modules/@adaptivestone/framework/tests/globalSetupVitest" to your vitest config
272
+ - **[BREAKING]** No more global variables for testing and default user will not be created by default
273
+ - **[NEW]** Test helpers getTestServerURL, serverInstance, setDefaultUser, setDefaultAuthToken and createDefaultTestUser.
183
274
 
184
- ### 4.8.3
275
+ ---
185
276
 
186
- [UPDATE] Fix problme with fat start and closing connections after
277
+ ## [5.0.0-beta.22]
187
278
 
188
- ### 4.8.2
279
+ - **[UPDATE]** Update types.
189
280
 
190
- [UPDATE] CLI - disable mongoose index creation
281
+ ---
191
282
 
192
- ### 4.8.1
283
+ ## [5.0.0-beta.21]
193
284
 
194
- [UPDATE] Model inited on server inited.
195
- [NEW] New options to skip model init isSkipModelInit
196
- [NEW] New method server method initAllModels()
285
+ - **[FIX]** Fix bug with missed model options.
197
286
 
198
- ### 4.8.0
287
+ ---
199
288
 
200
- [BREAKING] Minimum node js version id 18.17.0 now.
201
- [BREAKING] Removed getFileWithExtendingInhirence. This was internal method and not suppose to use externally
202
- [UPDATE] update Base getFilesPathWithInheritance to use fs.read dir resursive option
203
- [UPDATE] update cache (refactor+tets)
204
- [UPDATE] update config and model inits
289
+ ## [5.0.0-beta.20]
205
290
 
206
- ### 4.7.0
291
+ - **[FIX]** Fix bug with `Lock` model index.
292
+ - **[NEW]** `BaseModel` add `Virtuals`.
207
293
 
208
- [UPDATE] update logger init (refactor)
209
- [UPDATE] updated deps
294
+ ---
210
295
 
211
- ### 4.6.0
296
+ ## [5.0.0-beta.19]
212
297
 
213
- [NEW] migrated from JEST to vitest
298
+ - **[NEW]** Introducing new model type. `BaseModel`. Features - simplifie works with typescript. And based on statics.
299
+ - **[BREAKING]** All models now should be extended from `BaseModel`. This is a potencial breaking change specially for `User` model.
214
300
 
215
- ### 4.5.0
301
+ ---
216
302
 
217
- [NEW] Now getSuper() available as a method on mongoose models
218
- [UPDATE] Update rate-limiter-flexible to v3
219
- [UPDATE] Update test runner to suport ESM. In case problem with test please copy babel.config.js from framework to your project directory
303
+ ## [5.0.0-beta.18]
220
304
 
221
- ### 4.4.0
305
+ - **[UPDATE]** Move away connection from `mongooseModels` to server itself (preparation for different model types).
306
+ - **[BREAKING]** Potencial. We are removed callback from `mongooseModels` contrctuctor. It was not used in code.
307
+ - **[NEW]** Add `appInstance` helper to access app instance from anywhere without passing it.
222
308
 
223
- [NEW] New method to grab url of server it testing enviroument global.server.testingGetUrl("/some/endpoint")
309
+ ---
224
310
 
225
- ### 4.3.1
311
+ ## [5.0.0-beta.17]
226
312
 
227
- [UPDATE] Yup file validator update. As formidable now return all fields as an array
313
+ - **[NEW]** Add `GenerateTypes` command.
228
314
 
229
- ### 4.3.0
315
+ ---
230
316
 
231
- [BREAKING] updated formidable with a new version + tests. Marked as breaking because of a new major version, but this is internal of framework and exernal still the same. Should break nothing
317
+ ## [5.0.0-beta.16]
232
318
 
233
- ### 4.2.0
319
+ - **[UPDATE]** Update deps.
320
+ - **[UPDATE]** New app getter `internalFilesCache`.
321
+ - **[UPDATE]** Command new static props to load `isShouldGetModelPaths`.
234
322
 
235
- [UPDATE] updated deps
236
- [NEW] CreateUser cli command. Ability to update user by email or id.
323
+ ---
237
324
 
238
- ### 4.1.0
325
+ ## [5.0.0-beta.15]
239
326
 
240
- [UPDATE] updated deps
241
- [NEW] email - Ability to render templae to string for future usage
327
+ - **[FIX]** Fix missing folder `migrations` in `dist` folder (hope that will be finally).
242
328
 
243
- ### 4.0.0
329
+ ---
244
330
 
245
- [BREAKING] change bcrypt encryption with scrypt
246
- [BREAKING] change internal express parser to formidable parser. Affect you if external formidable is used
247
- [BREAKING] should not affect any user. Changed email-templates module to internal implementation. Idea to keep dependensy list smaller
248
- [BREAKING] change i18n middleware to internal one. Nothing should be affected
249
- [BREAKING] now validation of request splitted between request and query
250
- [BREAKING] supportedLngs option added to i18n config
251
- [BREAKING] email inliner now looking for src/services/messaging/email/resources folder instead of 'build' folder.
331
+ ## [5.0.0-beta.14]
252
332
 
253
- [BREAKING] Mongoose v7. https://mongoosejs.com/docs/migrating_to_7.html
254
- [BREAKING] Yup validation was updated to v1 https://github.com/jquense/yup/issues/1906
333
+ - **[FIX]** Fix missing folder `migrations` in `dist` folder.
255
334
 
256
- [DEPRECATED] getExpress path is deprecated. Renamed to getHttpPath
335
+ ---
257
336
 
258
- [NEW] pagination middleware
259
- [NEW] requestLogger middleware. Migrated from core server to be an middleware
260
- [NEW] CreateUser command
261
- [NEW] custom yup validator for validate File requests
262
- [UPDATE] updated deps
263
- [UPDATE] openApi generator support files
264
- [UPDATE] updated 18n middleware. Introduced internal cachce. Speed up of request processing up to 100%
265
- [UPDATE] cache drivers to JSON support BigInt numbers
337
+ ## [5.0.0-beta.13]
266
338
 
267
- ### 3.4.3
339
+ - **[UPDATE]** Only process `.ts` or `.js` files (not `.map` files).
268
340
 
269
- [UPDATE] updated deps
270
- [FIX] fix tests for redis
271
- [FIX] support in tests TEST_FOLDER_EMAILS
341
+ ---
272
342
 
273
- ### 3.4.2
343
+ ## [5.0.0-beta.12]
274
344
 
275
- [UPDATE] updated deps
276
- [FIX] fix documentation generation
345
+ - **[BREAKING]** Remove jest support for testing.
346
+ - **[NEW]** Initial move to typescript. Potencially breaking.
347
+ - **[NEW]** Introduce `src` and `dist` folders.
277
348
 
278
- ### 3.4.1
349
+ ---
279
350
 
280
- [FIX] fix documentation generation
351
+ ## [5.0.0-beta.11]
281
352
 
282
- ### 3.4.0
353
+ - **[NEW]** Commands typing.
354
+ - **[NEW]** Commands support TS files.
355
+ - **[UPDATE]** Update deps.
283
356
 
284
- [NEW] now we pass 'req' to validation and casting as a second parameter. This done mostly for custom validators
357
+ ---
285
358
 
286
- ### 3.3.0
359
+ ## [5.0.0-beta.9]
287
360
 
288
- [NEW] new command 'SyncIndexes' to sync indexes for mongodb https://framework.adaptivestone.com/docs/cli#syncindexes
289
- [UPDATE] updated deps
290
- [FIX] fix documentation generation
361
+ - **[BREAKING]** Move email module to separate package `@adaptivestone/framework-module-email`. Please use it if you want to send emails.
362
+ - **[NEW]** App now contains `frameworkFolder` folder the framework located. Mostly for modules usage.
363
+ - **[BREAKING]** Remove `VIEWS` folders at all. Should not afffect any user as this was not used internally.
364
+ - **[UPDATE]** Update typing.
365
+ - **[UPDATE]** Change `redis` -> `@redis/client` as we are using only client from pakage.
366
+ - **[BREAKING]** Removed `noidemailer-sendmail-transport`. Not needed anymore and not recommended to use as well.
291
367
 
292
- ### 3.2.2
368
+ ---
293
369
 
294
- [UPDATE] add options for i18n to config.
295
- [CHANGE] by default i18n not writing missed keys. Can be enabled via config
370
+ ## [5.0.0-beta.8]
296
371
 
297
- ### 3.2.1
372
+ - **[UPDATE]** Update deps.
373
+ - **[NEW]** `Lock` model for working locks via mongoDB.
298
374
 
299
- [UPDATE] updated deps
300
- [FIX] fix documentation generation
375
+ ---
301
376
 
302
- ### 3.2.0
377
+ ## [5.0.0-beta.7]
303
378
 
304
- [UPDATE] updated deps
305
- [NEW] cache.removeKey(key) - function to remove key from cache
379
+ - **[UPDATE]** Update deps.
380
+ - **[UPDATE]** Change `vitest` shutdown behavior as mongo driver v6.13 change befaviur that affect us (`MongoClient.close` now closes any outstanding cursors).
306
381
 
307
- ### 3.1.1
382
+ ---
308
383
 
309
- [UPDATE] updated deps
310
- [FIX] fix cache error handling.
384
+ ## [5.0.0-beta.5]
311
385
 
312
- ### 3.1.0
386
+ - **[BREAKING]** Remove `minimist` CLI parsing and replace it by `commandArguments` parser.
387
+ - **[UPDATE]** Migrated from `eslint-plugin-import` to `eslint-plugin-import-x`.
388
+ - **[UPDATE]** Migrate to eslint 9 and away from aibnb styles (they are abonded).
313
389
 
314
- [NEW] new comand to generate open API documentation (wip)
315
- [NEW] coverage report
316
- [UPDATE] updated deps
390
+ ---
317
391
 
318
- ### 3.0.23
392
+ ## [5.0.0-beta.4]
319
393
 
320
- [UPDATE] updated deps
321
- [FIX] fix custom errors
394
+ - **[NEW]** On shutdown event now after timeout we are forcing to shutdown.
322
395
 
323
- ### 3.0.22
396
+ ---
324
397
 
325
- [UPDATE] updated deps
326
- [UPDATE] cast function now can be ASYNC too
398
+ ## [5.0.0-beta.2]
327
399
 
328
- ### 3.0.21
400
+ - **[UPDATE]** Update deps.
401
+ - **[NEW]** Add ability to skip mongo model init in CLI env.
402
+ - **[NEW]** Now each mongo connection on CLI have own name and inslude command name there too (`getMongoConnectionName` in command).
329
403
 
330
- [UPDATE] updated redis to v4
331
- [NEW] updates tests to have own namespace on redis
404
+ ---
332
405
 
333
- ### 3.0.20
406
+ ## [5.0.0-beta.1]
334
407
 
335
- [UPDATE] update deps
408
+ - **[UPDATE]** Update deps.
409
+ - **[BREAKING]** `vitest` v3 <https://vitest.dev/guide/migration.html>.
336
410
 
337
- ### 3.0.19
411
+ ---
338
412
 
339
- [UPDATE] update deps
413
+ ## [5.0.0-alpha.26]
340
414
 
341
- ### 3.0.18
415
+ - **[UPDATE]** Update deps.
416
+ - **[UPDATE]** New commands view in CLI.
342
417
 
343
- [UPDATE] update deps
344
- [UPDATE] change default branch to 'main'
418
+ ---
345
419
 
346
- ### 3.0.17
420
+ ## [5.0.0-alpha.24]
347
421
 
348
- [UPDATE] update deps
422
+ - **[UPDATE]** Update deps.
423
+ - **[BREAKING]** `i18next` v24 <https://www.i18next.com/misc/migration-guide#v23.x.x-to-v24.0.0>.
349
424
 
350
- ### 3.0.16
425
+ ---
351
426
 
352
- [UPDATE] update deps
353
- [FIX] fix bug with route level middleware
427
+ ## [5.0.0-alpha.23]
354
428
 
355
- ### 3.0.15
429
+ - **[UPDATE]** Update deps.
356
430
 
357
- [UPDATE] update deps
358
- [UPDATE] minimum node version 16
431
+ ---
359
432
 
360
- ### 3.0.14
433
+ ## [5.0.0-alpha.22]
361
434
 
362
- [NEW] now possible to show all errors during validation (default one) by parameter controllerValidationAbortEarly
363
- [UPDATE] update deps
435
+ - **[UPDATE]** Update deps.
436
+ - **[FIX]** Fix optional routing parameters.
364
437
 
365
- ### 3.0.13
438
+ ---
366
439
 
367
- [UPDATE] bug fix with "mergeParams"
440
+ ## [5.0.0-alpha.21]
368
441
 
369
- ### 3.0.12
442
+ - **[BREAKING]** Possible breaking. Framework start using express 5 instead of express 4. Please follow express migration guide too <https://expressjs.com/en/guide/migrating-5.html>.
443
+ - **[BREAKING]** As part of express 5 migration `_` in rotes (middlewares) should have perameter. please replace `_` to `*splat`.
444
+ - **[UPDATE]** Update deps.
445
+ - **[UPDATE]** Mailer uses `await import()` for startup speedup.
370
446
 
371
- [NEW] ability to pass "mergeParams" options to express router
372
- [UPDATE] update deps
447
+ ---
373
448
 
374
- ### 3.0.11
449
+ ## [5.0.0-alpha.20]
375
450
 
376
- [UPDATE] more verbose email error
451
+ - **[UPDATE]** Update deps.
452
+ - **[UPDATE]** `#realLogger` do not throw error in a scecific cases (`model.toJSON({virtual:true})`).
377
453
 
378
- ### 3.0.10
454
+ ---
379
455
 
380
- [UPDATE] update deps
381
- [CHANGE] tests afterAll not using timeout anymore (conflict with jest 28-alpha)
382
- [NEW] config for mail now supports "EMAIL_TRANSPORT" env variable. SMTP by default (as was)
456
+ ## [5.0.0-alpha.19]
383
457
 
384
- ### 3.0.9
458
+ - **[NEW]** Added `modelSchemaOptions` for models.
385
459
 
386
- [UPDATE] update deps
460
+ ---
387
461
 
388
- ### 3.0.8
462
+ ## [5.0.0-alpha.18]
389
463
 
390
- [UPDATE] update deps
464
+ - **[BREAKING]** Default auth responce changed to be unified. `{token, user}` => `{data:{token, user}}`.
465
+ - **[UPDATE]** `RateLimiter` updae key generation.
391
466
 
392
- ### 3.0.7
467
+ ---
393
468
 
394
- [UPDATE] update deps
395
- [CHANGE] change default getConfig method
469
+ ## [5.0.0-alpha.17]
396
470
 
397
- ### 3.0.6
471
+ - **[NEW]** `generateRandomBytes` command.
472
+ - **[UPDATE]** Update deps.
398
473
 
399
- [UPDATE] update deps
474
+ ---
400
475
 
401
- ### 3.0.5
476
+ ## [5.0.0-alpha.16]
402
477
 
403
- [UPDATE] update deps
478
+ - **[UPDATE]** No warning of direct usage `body` and `query`.
479
+ - **[UPDATE]** Update deps.
404
480
 
405
- ### 3.0.4
481
+ ---
406
482
 
407
- [UPDATE] fix bug with app shutdown
483
+ ## [5.0.0-alpha.15]
408
484
 
409
- ### 3.0.3
485
+ - **[BUG]** Fix bug with pagination.
486
+ - **[UPDATE]** Update deps.
410
487
 
411
- [UPDATE] update deps
488
+ ---
412
489
 
413
- ### 3.0.2
490
+ ## [5.0.0-alpha.14]
414
491
 
415
- [UPDATE] update deps
492
+ - **[NEW]** Add types for `Abstract` model (wip).
416
493
 
417
- ### 3.0.1
494
+ ---
418
495
 
419
- [UPDATE] update deps
420
- [UPDATE] getUserByTokens more logs
496
+ ## [5.0.0-alpha.13]
421
497
 
422
- ### 3.0.0
498
+ - **[UPDATE]** Update deps.
499
+ - **[UPDATE]** Update `i18n` internal implementation.
500
+ - **[CHANGE]** Disable https server view.
423
501
 
424
- [BREAKING] Mongoose v6. Than a lot of changes:[mongoDB drive changes](https://github.com/mongodb/node-mongodb-native/blob/4.0/docs/CHANGES_4.0.0.md), [Mongoose changes](https://mongoosejs.com/docs/migrating_to_6.html).
425
- Notable changes from migration
426
- Removed `execPopulate()`[link](https://mongoosejs.com/docs/migrating_to_6.html#removed-execpopulate)
502
+ ---
427
503
 
428
- ```js
429
- // Document#populate() now returns a promise and is now no longer chainable.
504
+ ## [5.0.0-alpha.12]
430
505
 
431
- //Replace
432
- await doc.populate('path1').populate('path2').execPopulate();
433
- // with
434
- await doc.populate(['path1', 'path2']);
435
- //Replace
436
- await doc
437
- .populate('path1', 'select1')
438
- .populate('path2', 'select2')
439
- .execPopulate();
440
- // with
441
- await doc.populate([
442
- { path: 'path1', select: 'select1' },
443
- { path: 'path2', select: 'select2' },
444
- ]);
445
- ```
506
+ - **[UPDATE]** Update deps.
446
507
 
447
- [REMOVED] removed deprecated router handler string not allowed anymore. Use functions by itself
448
- [REMOVED] removed deprecated someSecretSalt() on user model (use this.saltSecret instead)
449
- [REMOVED] removed deprecated validate() on abstract controller and as result validator dependency. Use request validators instead
450
- [REMOVED] removed deprecated isUseControllerNameForRouting() on abstract controller. Use getExpressPath() instead
451
- [REMOVED] removed deprecated Base.loadFilesWithInheritance please use getFilesPathWithInheritance that produce almost the same output
452
- [BREAKING] Removed "success" field on Auth contreoller. Please use http status instead
453
- [BREAKING] Auth controller - "error" error responce renamed to "message"
508
+ ---
454
509
 
455
- ```js
456
- // Before
457
- {
458
- error: 'Some error';
459
- }
460
- // After
461
- {
462
- message: 'Some error';
463
- }
464
- ```
510
+ ## [5.0.0-alpha.11]
465
511
 
466
- [UPDATE] update deps
467
- [UPDATE] winston console transport now using timestapms
468
- [UPDATE] PrepareAppInfo middleware now a global one. Do not need to include it on every controller
469
- [NEW] Request anso works with req.query, but req.body have bigger priority
512
+ - **[UPDATE]** Update deps.
470
513
 
471
- ### 2.18.0
514
+ ---
472
515
 
473
- [UPDATE] update deps
474
- [UPDATE] replace body-parser with express.json
475
- [NEW] role middleware
516
+ ## [5.0.0-alpha.10]
476
517
 
477
- ### 2.17.0
518
+ - **[UPDATE]** Update deps.
519
+ - **[NEW]** `IpDetector` middleware that support detecting proxy and `X-Forwarded-For` header.
520
+ - **[BREAKING]** `RateLimiter` now need to have `IpDetector` middleware before.
478
521
 
479
- [UPDATE] update deps
480
- [NEW] new env variable LOGGER_SENTRY_LEVEL (default=info)
481
- [NEW] new env variable LOGGER_CONSOLE_ENABLE (default=true)
482
- [BREAKING] on translation we changed i18next. Please convert files if you have plurals inside it https://i18next.github.io/i18next-v4-format-converter-web/
522
+ ---
483
523
 
484
- #### 2.16.0
524
+ ## [5.0.0-alpha.9]
485
525
 
486
- [UPDATE] update deps
487
- [NEW] begin adding type script definitions
526
+ - **[UPDATE]** Update deps.
527
+ - **[BREAKING]** Removing `staticFiles` middleware as it not used in projects anymore. Docs with nginx config will be provided.
528
+ - **[BREAKING]** Remove default `AUTH_SALT`. It should be provided on a app level now.
529
+ - **[BREAKING]** Vitest 2.0.0 <https://vitest.dev/guide/migration.html#migrating-to-vitest-2-0>.
488
530
 
489
- #### 2.15.4
531
+ ---
490
532
 
491
- [UPDATE] update deps
492
- [UPDATE] update tests timeout
533
+ ## [5.0.0-alpha.8]
493
534
 
494
- #### 2.15.0
535
+ - **[UPDATE]** Replace `dotenv` with `loadEnvFile`.
536
+ - **[UPDATE]** Replace `nodemon` with `node --watch` (dev only).
537
+ - **[BREAKING]** Minimum node version is 20.12 as for now (`process.loadEnvFile`).
495
538
 
496
- [UPDATE] update deps
497
- [NEW] Ability to configure Auth flow with 'isAuthWithVefificationFlow' option.
498
- [BREAKING] Register not return status 201 instead of 200
539
+ ---
499
540
 
500
- #### 2.14.0
541
+ ## [5.0.0-alpha.7]
501
542
 
502
- [NEW] Add Sequence. It provide ability to easily generate sequences for given types. It save to use on distributed environments
543
+ - **[UPDATE]** Deps update.
503
544
 
504
- ```javascript
505
- const SequenceModel = this.app.getModel('Sequence');
506
- // will be 1
507
- const someTypeSequence = await SequenceModel.getSequence('someType');
508
- // will be 2
509
- const someTypeSequence2 = await SequenceModel.getSequence('someType');
510
- // will be 1 as type is another
511
- const someAnotherTypeSequence =
512
- await SequenceModel.getSequence('someAnotherType');
513
- ```
545
+ ---
514
546
 
515
- #### 2.13.1
547
+ ## [5.0.0-alpha.6]
516
548
 
517
- [FIX] fix documentation about not using req.appInfo.request, but using req.body for RateLimiter
549
+ - **[UPDATE]** Update internal documentation (`jsdoc`, `d.ts`).
518
550
 
519
- #### 2.13.0
520
-
521
- [NEW] Rate limited middleware - ability to include request components (req.body) for key generation. Please not that you have no access to req.appInfo.request on this stage
522
-
523
- ```javascript
551
+ ---
552
+
553
+ ## [5.0.0-alpha.5]
554
+
555
+ - **[UPDATE]** More verbose errors for rapsing body request.
556
+ - **[UPDATE]** Deps update.
557
+
558
+ ---
559
+
560
+ ## [5.0.0-alpha.4]
561
+
562
+ - **[UPDATE]** Update `rate-limiter-flexible` to v5.
563
+ - **[CHANGE]** Cache update `redis.setEX` to `redis.set(..,..,{EX:xx})` as `setEX` deprecated.
564
+
565
+ ---
566
+
567
+ ## [5.0.0-alpha.3]
568
+
569
+ - **[UPDATE]** Deps update.
570
+ - **[FIX]** `Migration` commands apply.
571
+
572
+ ---
573
+
574
+ ## [5.0.0-alpha.2]
575
+
576
+ - **[UPDATE]** Deps update.
577
+
578
+ ---
579
+
580
+ ## [5.0.0-alpha.1]
581
+
582
+ - **[BREAKING]** Vitest 1.0.0 <https://vitest.dev/guide/migration.html#migrating-from-vitest-0-34-6>.
583
+ - **[BREAKING]** ESM only. No more commonJS. That help to fix a lot of bugs with tests and provides better development expirience.
584
+ - **[BREAKING]** Mongoose v8. <https://mongoosejs.com/docs/migrating_to_8.html>.
585
+
586
+ ---
587
+
588
+ ## [4.11.4]
589
+
590
+ - **[UPDATE]** Deps update.
591
+
592
+ ---
593
+
594
+ ## [4.11.3]
595
+
596
+ - **[UPDATE]** Deps update.
597
+
598
+ ---
599
+
600
+ ## [4.11.2]
601
+
602
+ - **[FIX]** `Cors` middleware return proper headers on multidomains.
603
+
604
+ ---
605
+
606
+ ## [4.11.1]
607
+
608
+ - **[FIX]** `Cors` middleware return proper status.
609
+
610
+ ---
611
+
612
+ ## [4.11.0]
613
+
614
+ - **[NEW]** `Cors` middleware.
615
+ - **[BREAKING]** This is a potencial breaking change as we switched from `cors` external package to internal middleware. From API nothing was changed. This is a potencial breaking changes, but it should keep working as it.
616
+
617
+ ---
618
+
619
+ ## [4.10.0]
620
+
621
+ - **[UPDATE]** Deps update.
622
+ - **[NEW]** Static file middleware.
623
+ - **[BREAKING]** This is a potencial breaking change as we switched from `express.static` to internal middleware that provide less features but faster. From API nothing was changed.
624
+
625
+ ---
626
+
627
+ ## [4.9.2]
628
+
629
+ - **[UPDATE]** Deps update.
630
+
631
+ ---
632
+
633
+ ## [4.9.1]
634
+
635
+ - **[UPDATE]** All responces from framework now happens in JSON. Previouls sometime aswers was in plan text.
636
+
637
+ ---
638
+
639
+ ## [4.9.0]
640
+
641
+ - **[BREAKING]** We are separated testsing to setyp and global setup. Global setup now care of mongo to make sure that only on mongodb memory server is spinned up. If you are using `vitest` please add `"globalSetup": "node_modules/@adaptivestone/framework/tests/globalSetupVitest"` to your vitest config.
642
+
643
+ ---
644
+
645
+ ## [4.8.3]
646
+
647
+ - **[UPDATE]** Fix problme with fat start and closing connections after.
648
+
649
+ ---
650
+
651
+ ## [4.8.2]
652
+
653
+ - **[UPDATE]** CLI - disable mongoose index creation.
654
+
655
+ ---
656
+
657
+ ## [4.8.1]
658
+
659
+ - **[UPDATE]** Model inited on server inited.
660
+ - **[NEW]** New options to skip model init `isSkipModelInit`.
661
+ - **[NEW]** New method server method `initAllModels()`.
662
+
663
+ ---
664
+
665
+ ## [4.8.0]
666
+
667
+ - **[BREAKING]** Minimum node js version id 18.17.0 now.
668
+ - **[BREAKING]** Removed `getFileWithExtendingInhirence`. This was internal method and not suppose to use externally.
669
+ - **[UPDATE]** Update `Base.getFilesPathWithInheritance` to use `fs.read` dir resursive option.
670
+ - **[UPDATE]** Update cache (refactor+tets).
671
+ - **[UPDATE]** Update config and model inits.
672
+
673
+ ---
674
+
675
+ ## [4.7.0]
676
+
677
+ - **[UPDATE]** Update logger init (refactor).
678
+ - **[UPDATE]** Updated deps.
679
+
680
+ ---
681
+
682
+ ## [4.6.0]
683
+
684
+ - **[NEW]** Migrated from JEST to `vitest`.
685
+
686
+ ---
687
+
688
+ ## [4.5.0]
689
+
690
+ - **[NEW]** Now `getSuper()` available as a method on mongoose models.
691
+ - **[UPDATE]** Update `rate-limiter-flexible` to v3.
692
+ - **[UPDATE]** Update test runner to suport ESM. In case problem with test please copy `babel.config.js` from framework to your project directory.
693
+
694
+ ---
695
+
696
+ ## [4.4.0]
697
+
698
+ - **[NEW]** New method to grab url of server it testing enviroument `global.server.testingGetUrl("/some/endpoint")`.
699
+
700
+ ---
701
+
702
+ ## [4.3.1]
703
+
704
+ - **[UPDATE]** `Yup` file validator update. As formidable now return all fields as an array.
705
+
706
+ ---
707
+
708
+ ## [4.3.0]
709
+
710
+ - **[BREAKING]** Updated `formidable` with a new version + tests. Marked as breaking because of a new major version, but this is internal of framework and exernal still the same. Should break nothing.
711
+
712
+ ---
713
+
714
+ ## [4.2.0]
715
+
716
+ - **[UPDATE]** Updated deps.
717
+ - **[NEW]** `CreateUser` cli command. Ability to update user by email or id.
718
+
719
+ ---
720
+
721
+ ## [4.1.0]
722
+
723
+ - **[UPDATE]** Updated deps.
724
+ - **[NEW]** Email - Ability to render templae to string for future usage.
725
+
726
+ ---
727
+
728
+ ## [4.0.0]
729
+
730
+ - **[BREAKING]** Change `bcrypt` encryption with `scrypt`.
731
+ - **[BREAKING]** Change internal express parser to `formidable` parser. Affect you if external `formidable` is used.
732
+ - **[BREAKING]** Should not affect any user. Changed `email-templates` module to internal implementation. Idea to keep dependensy list smaller.
733
+ - **[BREAKING]** Change `i18n` middleware to internal one. Nothing should be affected.
734
+ - **[BREAKING]** Now validation of request splitted between `request` and `query`.
735
+ - **[BREAKING]** `supportedLngs` option added to `i18n` config.
736
+ - **[BREAKING]** Email inliner now looking for `src/services/messaging/email/resources` folder instead of `build` folder.
737
+ - **[BREAKING]** Mongoose v7. <https://mongoosejs.com/docs/migrating_to_7.html>.
738
+ - **[BREAKING]** `Yup` validation was updated to v1 <https://github.com/jquense/yup/issues/1906>.
739
+ - **[DEPRECATED]** `getExpress` path is deprecated. Renamed to `getHttpPath`.
740
+ - **[NEW]** Pagination middleware.
741
+ - **[NEW]** `requestLogger` middleware. Migrated from core server to be an middleware.
742
+ - **[NEW]** `CreateUser` command.
743
+ - **[NEW]** Custom `yup` validator for validate File requests.
744
+ - **[UPDATE]** Updated deps.
745
+ - **[UPDATE]** `openApi` generator support files.
746
+ - **[UPDATE]** Updated `18n` middleware. Introduced internal cachce. Speed up of request processing up to 100%.
747
+ - **[UPDATE]** Cache drivers to JSON support `BigInt` numbers.
748
+
749
+ ---
750
+
751
+ ## [3.4.3]
752
+
753
+ - **[UPDATE]** Updated deps.
754
+ - **[FIX]** Fix tests for redis.
755
+ - **[FIX]** Support in tests `TEST_FOLDER_EMAILS`.
756
+
757
+ ---
758
+
759
+ ## [3.4.2]
760
+
761
+ - **[UPDATE]** Updated deps.
762
+ - **[FIX]** Fix documentation generation.
763
+
764
+ ---
765
+
766
+ ## [3.4.1]
767
+
768
+ - **[FIX]** Fix documentation generation.
769
+
770
+ ---
771
+
772
+ ## [3.4.0]
773
+
774
+ - **[NEW]** Now we pass `req` to validation and casting as a second parameter. This done mostly for custom validators.
775
+
776
+ ---
777
+
778
+ ## [3.3.0]
779
+
780
+ - **[NEW]** New command `SyncIndexes` to sync indexes for mongodb <https://framework.adaptivestone.com/docs/cli#syncindexes>.
781
+ - **[UPDATE]** Updated deps.
782
+ - **[FIX]** Fix documentation generation.
783
+
784
+ ---
785
+
786
+ ## [3.2.2]
787
+
788
+ - **[UPDATE]** Add options for `i18n` to config.
789
+ - **[CHANGE]** By default `i18n` not writing missed keys. Can be enabled via config.
790
+
791
+ ---
792
+
793
+ ## [3.2.1]
794
+
795
+ - **[UPDATE]** Updated deps.
796
+ - **[FIX]** Fix documentation generation.
797
+
798
+ ---
799
+
800
+ ## [3.2.0]
801
+
802
+ - **[UPDATE]** Updated deps.
803
+ - **[NEW]** `cache.removeKey(key)` - function to remove key from cache.
804
+
805
+ ---
806
+
807
+ ## [3.1.1]
808
+
809
+ - **[UPDATE]** Updated deps.
810
+ - **[FIX]** Fix cache error handling.
811
+
812
+ ---
813
+
814
+ ## [3.1.0]
815
+
816
+ - **[NEW]** New comand to generate open API documentation (wip).
817
+ - **[NEW]** Coverage report.
818
+ - **[UPDATE]** Updated deps.
819
+
820
+ ---
821
+
822
+ ## [3.0.23]
823
+
824
+ - **[UPDATE]** Updated deps.
825
+ - **[FIX]** Fix custom errors.
826
+
827
+ ---
828
+
829
+ ## [3.0.22]
830
+
831
+ - **[UPDATE]** Updated deps.
832
+ - **[UPDATE]** Cast function now can be ASYNC too.
833
+
834
+ ---
835
+
836
+ ## [3.0.21]
837
+
838
+ - **[UPDATE]** Updated redis to v4.
839
+ - **[NEW]** Updates tests to have own namespace on redis.
840
+
841
+ ---
842
+
843
+ ## [3.0.20]
844
+
845
+ - **[UPDATE]** Update deps.
846
+
847
+ ---
848
+
849
+ ## [3.0.19]
850
+
851
+ - **[UPDATE]** Update deps.
852
+
853
+ ---
854
+
855
+ ## [3.0.18]
856
+
857
+ - **[UPDATE]** Update deps.
858
+ - **[UPDATE]** Change default branch to `main`.
859
+
860
+ ---
861
+
862
+ ## [3.0.17]
863
+
864
+ - **[UPDATE]** Update deps.
865
+
866
+ ---
867
+
868
+ ## [3.0.16]
869
+
870
+ - **[UPDATE]** Update deps.
871
+ - **[FIX]** Fix bug with route level middleware.
872
+
873
+ ---
874
+
875
+ ## [3.0.15]
876
+
877
+ - **[UPDATE]** Update deps.
878
+ - **[UPDATE]** Minimum node version 16.
879
+
880
+ ---
881
+
882
+ ## [3.0.14]
883
+
884
+ - **[NEW]** Now possible to show all errors during validation (default one) by parameter `controllerValidationAbortEarly`.
885
+ - **[UPDATE]** Update deps.
886
+
887
+ ---
888
+
889
+ ## [3.0.13]
890
+
891
+ - **[UPDATE]** Bug fix with "mergeParams".
892
+
893
+ ---
894
+
895
+ ## [3.0.12]
896
+
897
+ - **[NEW]** Ability to pass "mergeParams" options to express router.
898
+ - **[UPDATE]** Update deps.
899
+
900
+ ---
901
+
902
+ ## [3.0.11]
903
+
904
+ - **[UPDATE]** More verbose email error.
905
+
906
+ ---
907
+
908
+ ## [3.0.10]
909
+
910
+ - **[UPDATE]** Update deps.
911
+ - **[CHANGE]** Tests `afterAll` not using timeout anymore (conflict with jest 28-alpha).
912
+ - **[NEW]** Config for mail now supports "EMAIL_TRANSPORT" env variable. SMTP by default (as was).
913
+
914
+ ---
915
+
916
+ ## [3.0.9]
917
+
918
+ - **[UPDATE]** Update deps.
919
+
920
+ ---
921
+
922
+ ## [3.0.8]
923
+
924
+ - **[UPDATE]** Update deps.
925
+
926
+ ---
927
+
928
+ ## [3.0.7]
929
+
930
+ - **[UPDATE]** Update deps.
931
+ - **[CHANGE]** Change default `getConfig` method.
932
+
933
+ ---
934
+
935
+ ## [3.0.6]
936
+
937
+ - **[UPDATE]** Update deps.
938
+
939
+ ---
940
+
941
+ ## [3.0.5]
942
+
943
+ - **[UPDATE]** Update deps.
944
+
945
+ ---
946
+
947
+ ## [3.0.4]
948
+
949
+ - **[UPDATE]** Fix bug with app shutdown.
950
+
951
+ ---
952
+
953
+ ## [3.0.3]
954
+
955
+ - **[UPDATE]** Update deps.
956
+
957
+ ---
958
+
959
+ ## [3.0.2]
960
+
961
+ - **[UPDATE]** Update deps.
962
+
963
+ ---
964
+
965
+ ## [3.0.1]
966
+
967
+ - **[UPDATE]** Update deps.
968
+ - **[UPDATE]** `getUserByTokens` more logs.
969
+
970
+ ---
971
+
972
+ ## [3.0.0]
973
+
974
+ - **[BREAKING]** Mongoose v6. Than a lot of changes:[mongoDB drive changes](https://github.com/mongodb/node-mongodb-native/blob/4.0/docs/CHANGES_4.0.0.md), [Mongoose changes](https://mongoosejs.com/docs/migrating_to_6.html).
975
+ Notable changes from migration
976
+ Removed `execPopulate()`[link](https://mongoosejs.com/docs/migrating_to_6.html#removed-execpopulate)
977
+ ```js
978
+ // Document#populate() now returns a promise and is now no longer chainable.
979
+ //Replace
980
+ await doc.populate('path1').populate('path2').execPopulate();
981
+ // with
982
+ await doc.populate(['path1', 'path2']);
983
+ //Replace
984
+ await doc
985
+ .populate('path1', 'select1')
986
+ .populate('path2', 'select2')
987
+ .execPopulate();
988
+ // with
989
+ await doc.populate([
990
+ { path: 'path1', select: 'select1' },
991
+ { path: 'path2', select: 'select2' },
992
+ ]);
993
+ ```
994
+ - **[REMOVED]** Removed deprecated router handler string not allowed anymore. Use functions by itself.
995
+ - **[REMOVED]** Removed deprecated `someSecretSalt()` on user model (use `this.saltSecret` instead).
996
+ - **[REMOVED]** Removed deprecated `validate()` on abstract controller and as result validator dependency. Use request validators instead.
997
+ - **[REMOVED]** Removed deprecated `isUseControllerNameForRouting()` on abstract controller. Use `getExpressPath()` instead.
998
+ - **[REMOVED]** Removed deprecated `Base.loadFilesWithInheritance` please use `getFilesPathWithInheritance` that produce almost the same output.
999
+ - **[BREAKING]** Removed "success" field on Auth contreoller. Please use http status instead.
1000
+ - **[BREAKING]** Auth controller - "error" error responce renamed to "message".
1001
+ ```js
1002
+ // Before
1003
+ {
1004
+ error: 'Some error';
1005
+ }
1006
+ // After
1007
+ {
1008
+ message: 'Some error';
1009
+ }
1010
+ ```
1011
+ - **[UPDATE]** Update deps.
1012
+ - **[UPDATE]** Winston console transport now using timestapms.
1013
+ - **[UPDATE]** `PrepareAppInfo` middleware now a global one. Do not need to include it on every controller.
1014
+ - **[NEW]** Request also works with `req.query`, but `req.body` have bigger priority.
1015
+
1016
+ ---
1017
+
1018
+ ## [2.18.0]
1019
+
1020
+ - **[UPDATE]** Update deps.
1021
+ - **[UPDATE]** Replace `body-parser` with `express.json`.
1022
+ - **[NEW]** Role middleware.
1023
+
1024
+ ---
1025
+
1026
+ ## [2.17.0]
1027
+
1028
+ - **[UPDATE]** Update deps.
1029
+ - **[NEW]** New env variable `LOGGER_SENTRY_LEVEL` (default=`info`).
1030
+ - **[NEW]** New env variable `LOGGER_CONSOLE_ENABLE` (default=`true`).
1031
+ - **[BREAKING]** On translation we changed `i18next`. Please convert files if you have plurals inside it <https://i18next.github.io/i18next-v4-format-converter-web/>.
1032
+
1033
+ ---
1034
+
1035
+ ## [2.16.0]
1036
+
1037
+ - **[UPDATE]** Update deps.
1038
+ - **[NEW]** Begin adding type script definitions.
1039
+
1040
+ ---
1041
+
1042
+ ## [2.15.4]
1043
+
1044
+ - **[UPDATE]** Update deps.
1045
+ - **[UPDATE]** Update tests timeout.
1046
+
1047
+ ---
1048
+
1049
+ ## [2.15.0]
1050
+
1051
+ - **[UPDATE]** Update deps.
1052
+ - **[NEW]** Ability to configure Auth flow with `isAuthWithVefificationFlow` option.
1053
+ - **[BREAKING]** Register not return status 201 instead of 200.
1054
+
1055
+ ---
1056
+
1057
+ ## [2.14.0]
1058
+
1059
+ - **[NEW]** Add `Sequence`. It provide ability to easily generate sequences for given types. It save to use on distributed environments.
1060
+ ```javascript
1061
+ const SequenceModel = this.app.getModel('Sequence');
1062
+ // will be 1
1063
+ const someTypeSequence = await SequenceModel.getSequence('someType');
1064
+ // will be 2
1065
+ const someTypeSequence2 = await SequenceModel.getSequence('someType');
1066
+ // will be 1 as type is another
1067
+ const someAnotherTypeSequence =
1068
+ await SequenceModel.getSequence('someAnotherType');
1069
+ ```
1070
+
1071
+ ---
1072
+
1073
+ ## [2.13.1]
1074
+
1075
+ - **[FIX]** Fix documentation about not using `req.appInfo.request`, but using `req.body` for `RateLimiter`.
1076
+
1077
+ ---
1078
+
1079
+ ## [2.13.0]
1080
+
1081
+ - **[NEW]** Rate limited middleware - ability to include request components (`req.body`) for key generation. Please not that you have no access to `req.appInfo.request` on this stage.
1082
+ ```javascript
524
1083
  static get middleware() {
525
1084
  return new Map([
526
1085
  ['POST/login', [
@@ -530,16 +1089,16 @@ const someAnotherTypeSequence =
530
1089
  ]]
531
1090
  ]);
532
1091
  }
533
- ```
534
-
535
- #### 2.12.0
1092
+ ```
536
1093
 
537
- [UPDATE] update deps
538
- [NEW] Rate limited middleware
1094
+ ---
539
1095
 
540
- As rate limited we using https://github.com/animir/node-rate-limiter-flexible
1096
+ ## [2.12.0]
541
1097
 
542
- ```javascript
1098
+ - **[UPDATE]** Update deps.
1099
+ - **[NEW]** Rate limited middleware.
1100
+ As rate limited we using <https://github.com/animir/node-rate-limiter-flexible>
1101
+ ```javascript
543
1102
  static get middleware() {
544
1103
  return new Map([
545
1104
  ['POST/login', [
@@ -549,13 +1108,10 @@ As rate limited we using https://github.com/animir/node-rate-limiter-flexible
549
1108
  ]]
550
1109
  ]);
551
1110
  }
552
- ```
553
-
554
- Be default rate key generated based on Route, IP and userID. But you can adjust it vie config (global) or via middleware parameters (see v 2.10.0)
555
-
556
- Rate limiter have multiple backends (memory, redis and mongo). Buy default 'memory' backend activated
557
-
558
- ```javascript
1111
+ ```
1112
+ Be default rate key generated based on Route, IP and userID. But you can adjust it vie config (global) or via middleware parameters (see v 2.10.0)
1113
+ Rate limiter have multiple backends (memory, redis and mongo). Buy default 'memory' backend activated
1114
+ ```javascript
559
1115
  static get middleware() {
560
1116
  return new Map([
561
1117
  [
@@ -574,18 +1130,21 @@ Rate limiter have multiple backends (memory, redis and mongo). Buy default 'memo
574
1130
  ],
575
1131
  ]);
576
1132
  }
577
- ```
1133
+ ```
1134
+
1135
+ ---
578
1136
 
579
- #### 2.11.0
1137
+ ## [2.11.0]
580
1138
 
581
- [NEW] Added env variable HTTP_HOST for configure host to listen
1139
+ - **[NEW]** Added env variable `HTTP_HOST` for configure host to listen.
582
1140
 
583
- #### 2.10.0
1141
+ ---
584
1142
 
585
- [UPDATE] update deps
586
- [NEW] ability to pass parameters to middleware
1143
+ ## [2.10.0]
587
1144
 
588
- ```javascript
1145
+ - **[UPDATE]** Update deps.
1146
+ - **[NEW]** Ability to pass parameters to middleware.
1147
+ ```javascript
589
1148
  static get middleware() {
590
1149
  return new Map([
591
1150
  ['POST/someUrl', [
@@ -595,113 +1154,150 @@ Rate limiter have multiple backends (memory, redis and mongo). Buy default 'memo
595
1154
  ]]
596
1155
  ]);
597
1156
  }
598
- ```
1157
+ ```
1158
+ All this params goes to constructor as a second paramater.
1159
+
1160
+ ---
1161
+
1162
+ ## [2.9.2]
1163
+
1164
+ - **[UPDATE]** Update deps.
1165
+ - **[FIX]** Fix auth nick.
1166
+
1167
+ ---
1168
+
1169
+ ## [2.9.1]
1170
+
1171
+ - **[UPDATE]** Update deps.
1172
+
1173
+ ---
1174
+
1175
+ ## [2.9.0]
1176
+
1177
+ - **[BREAKING]** Auth controller update.
1178
+
1179
+ ---
599
1180
 
600
- All this params goes to constructor as a second paramater
1181
+ ## [2.8.3]
601
1182
 
602
- #### 2.9.2
1183
+ - **[FIX]** Update recovery email template.
603
1184
 
604
- [UPDATE] update deps
605
- [FIX] fix auth nick
1185
+ ---
606
1186
 
607
- #### 2.9.1
1187
+ ## [2.8.2]
608
1188
 
609
- [UPDATE] update deps
1189
+ - **[FIX]** Update AUTH controller.
610
1190
 
611
- #### 2.9.0
1191
+ ---
612
1192
 
613
- [BREAKING] Auth controller update
1193
+ ## [2.8.1]
614
1194
 
615
- #### 2.8.3
1195
+ - **[UPDATE]** Update deps.
1196
+ - **[FIX]** Update AUTH controller.
616
1197
 
617
- [FIX] update recovery email template
1198
+ ---
618
1199
 
619
- #### 2.8.2
1200
+ ## [2.8.0]
620
1201
 
621
- [FIX] update AUTH controller
1202
+ - **[UPDATE]** Change controllers to reflect latest changes.
1203
+ - **[UPDATE]** Add warning when using `req.body` directly.
1204
+ - **[BREAKING]** Possible breaking. `AsyncFunction` now required for router handler (it always was but without checking of code).
1205
+ - **[DEPRECATE]** Usage of `validator` of controllers.
1206
+ - **[DEPRECATE]** Usage of `isUseControllerNameForRouting` of controllers.
622
1207
 
623
- #### 2.8.1
1208
+ ---
624
1209
 
625
- [UPDATE] update deps
626
- [FIX] update AUTH controller
1210
+ ## [2.7.4]
627
1211
 
628
- #### 2.8.0
1212
+ - **[UPDATE]** Update deps.
629
1213
 
630
- [UPDATE] change controllers to reflect latest changes
631
- [UPDATE] add warning when using 'req.body' directly
632
- [BREAKING] Possible breaking. AsyncFunction now required for router handler (it always was but without checking of code)
633
- [DEPRECATE] usage of 'validator' of controllers
634
- [DEPRECATE] usage of 'isUseControllerNameForRouting' of controllers.
1214
+ ---
635
1215
 
636
- #### 2.7.4
1216
+ ## [2.7.3]
637
1217
 
638
- [UPDATE] update deps
1218
+ - **[UPDATE]** Replace `i18next-node-fs-backend` to `i18next-fs-backend` (drop in replacement).
639
1219
 
640
- #### 2.7.3
1220
+ ---
641
1221
 
642
- [UPDATE] replace i18next-node-fs-backend to i18next-fs-backend (drop in replacement)
1222
+ ## [2.7.2]
643
1223
 
644
- #### 2.7.2
1224
+ - **[UPDATE]** Update deps.
645
1225
 
646
- [UPDATE] update deps
1226
+ ---
647
1227
 
648
- #### 2.7.1
1228
+ ## [2.7.1]
649
1229
 
650
- [REMOVE] remove unused websocket
1230
+ - **[REMOVE]** Remove unused websocket.
651
1231
 
652
- #### 2.7.0
1232
+ ---
653
1233
 
654
- [UPDATE] change winston sentry transport
1234
+ ## [2.7.0]
655
1235
 
656
- #### 2.6.5
1236
+ - **[UPDATE]** Change winston sentry transport.
657
1237
 
658
- [UPDATE] update deps
659
- [UPDATE] optimize deps
1238
+ ---
660
1239
 
661
- #### 2.6.4
1240
+ ## [2.6.5]
662
1241
 
663
- [UPDATE] update deps
1242
+ - **[UPDATE]** Update deps.
1243
+ - **[UPDATE]** Optimize deps.
664
1244
 
665
- #### 2.6.3
1245
+ ---
666
1246
 
667
- [UPDATE] update deps
668
- [UPDATE] update handling exceptions loging
1247
+ ## [2.6.4]
669
1248
 
670
- #### 2.6.2
1249
+ - **[UPDATE]** Update deps.
671
1250
 
672
- [UPDATE] normalize auth config
1251
+ ---
673
1252
 
674
- #### 2.6.1
1253
+ ## [2.6.3]
675
1254
 
676
- [FIX] fix error on cache system
677
- [UPDATE] stripUnknown=true by default on casting
1255
+ - **[UPDATE]** Update deps.
1256
+ - **[UPDATE]** Update handling exceptions loging.
678
1257
 
679
- #### 2.6.0
1258
+ ---
680
1259
 
681
- [UPDATE] deps update
682
- [NEW]new cache system (alpha, subject of change)
1260
+ ## [2.6.2]
683
1261
 
684
- ```javascript
685
- const cacheTime = 60 * 5;
686
- this.app.cache.getSetValue(
687
- 'someKey',
688
- async () => {
689
- // function that will execute in case cache value is missed
690
- },
691
- cacheTime,
692
- );
693
- ```
1262
+ - **[UPDATE]** Normalize auth config.
694
1263
 
695
- #### 2.5.1
1264
+ ---
696
1265
 
697
- [UPDATE] deps update
698
- [FIX] fix error logging on unhadled rejection
1266
+ ## [2.6.1]
699
1267
 
700
- #### 2.5.0
1268
+ - **[FIX]** Fix error on cache system.
1269
+ - **[UPDATE]** `stripUnknown=true` by default on casting.
701
1270
 
702
- [NEW] new route handler format with request validations and casting (yup based)
1271
+ ---
703
1272
 
704
- ```javascript
1273
+ ## [2.6.0]
1274
+
1275
+ - **[UPDATE]** Deps update.
1276
+ - **[NEW]** New cache system (alpha, subject of change).
1277
+ ```javascript
1278
+ const cacheTime = 60 * 5;
1279
+ this.app.cache.getSetValue(
1280
+ 'someKey',
1281
+ async () => {
1282
+ // function that will execute in case cache value is missed
1283
+ },
1284
+ cacheTime,
1285
+ );
1286
+ ```
1287
+
1288
+ ---
1289
+
1290
+ ## [2.5.1]
1291
+
1292
+ - **[UPDATE]** Deps update.
1293
+ - **[FIX]** Fix error logging on unhadled rejection.
1294
+
1295
+ ---
1296
+
1297
+ ## [2.5.0]
1298
+
1299
+ - **[NEW]** New route handler format with request validations and casting (yup based).
1300
+ ```javascript
705
1301
  get routes() {
706
1302
  return {
707
1303
  post: {
@@ -716,217 +1312,301 @@ this.app.cache.getSetValue(
716
1312
  }
717
1313
  // send request with data {count: "5000"}
718
1314
  // will produce error with status 400 and {errors: {count:['Text error']}}
719
-
720
-
721
1315
  postSample(req,res) =>{
722
1316
  // on success validate we pass here.
723
1317
  // {count: "5000"}
724
1318
  console.log(req.appInfo.request)
725
1319
  // {count: 5000} -> casted to number
726
1320
  }
727
- ```
1321
+ ```
728
1322
 
729
- #### 2.4.4
1323
+ ---
730
1324
 
731
- [UPDATE] deps update
732
- [NEW] controller unhandled rejection now handled with default error
733
- [NEW] handle error with wrong model name
1325
+ ## [2.4.4]
734
1326
 
735
- #### 2.4.3
1327
+ - **[UPDATE]** Deps update.
1328
+ - **[NEW]** Controller unhandled rejection now handled with default error.
1329
+ - **[NEW]** Handle error with wrong model name.
736
1330
 
737
- [UPDATE] deps update
1331
+ ---
738
1332
 
739
- #### 2.4.2
1333
+ ## [2.4.3]
740
1334
 
741
- [FIX] abstract controlled middleware
742
- [UPDATE] deps update
1335
+ - **[UPDATE]** Deps update.
743
1336
 
744
- #### 2.4.1
1337
+ ---
745
1338
 
746
- [FIX] updated test because of previous breaking changes
1339
+ ## [2.4.2]
747
1340
 
748
- #### 2.4.0
1341
+ - **[FIX]** Abstract controlled middleware.
1342
+ - **[UPDATE]** Deps update.
749
1343
 
750
- [BREAKING] possible that bug fix of middleware can affect your code. Previous route middleware was GLOBAL (router.use) now in router level only (route.any). Previous Home controller (/ route be default) middleware affect ANY routes on app. Right now that fixed.
1344
+ ---
751
1345
 
752
- [NEW] Controller middleware now support methods. Previous only ALL was supported. Possible to start router with any method that supported by Express and middleware will be scoped by this method. If middleware route started from "/" then ALL method will be used (like previous bahaviour)
1346
+ ## [2.4.1]
753
1347
 
754
- ```javascript
1348
+ - **[FIX]** Updated test because of previous breaking changes.
1349
+
1350
+ ---
1351
+
1352
+ ## [2.4.0]
1353
+
1354
+ - **[BREAKING]** Possible that bug fix of middleware can affect your code. Previous route middleware was GLOBAL (`router.use`) now in router level only (`route.any`). Previous Home controller (`/` route be default) middleware affect ANY routes on app. Right now that fixed.
1355
+ - **[NEW]** Controller middleware now support methods. Previous only `ALL` was supported. Possible to start router with any method that supported by Express and middleware will be scoped by this method. If middleware route started from "/" then `ALL` method will be used (like previous bahaviour).
1356
+ ```javascript
755
1357
  static get middleware() {
756
1358
  return new Map([['GET/*', [PrepareAppInfo, GetUserByToken]]]);
757
1359
  }
758
- ```
1360
+ ```
1361
+
1362
+ ---
1363
+
1364
+ ## [2.3.14]
1365
+
1366
+ - **[FIX]** Fix validate controller method for non strings.
1367
+
1368
+ ---
1369
+
1370
+ ## [2.3.13]
1371
+
1372
+ - **[UPDATE]** Testing now with mongoDB Replica.
1373
+ - **[UPDATE]** Refactor CLI.
1374
+
1375
+ ---
1376
+
1377
+ ## [2.3.12]
1378
+
1379
+ - **[UPDATE]** Testing update.
1380
+
1381
+ ---
1382
+
1383
+ ## [2.3.11]
1384
+
1385
+ - **[UPDATE]** Refactor CLI for testing.
1386
+
1387
+ ---
1388
+
1389
+ ## [2.3.10]
1390
+
1391
+ - **[UPDATE]** Update user model indexes to allow null email and nick.
1392
+ - **[UPDATE]** Deps update.
1393
+
1394
+ ---
1395
+
1396
+ ## [2.3.9]
1397
+
1398
+ - **[FIX]** Test fix.
1399
+
1400
+ ---
1401
+
1402
+ ## [2.3.8]
1403
+
1404
+ - **[NEW]** Add `global.testSetup.beforeAll` `global.testSetup.afterAll` functions and `global.testSetup.disableUserCreate` flag for testing testing.
1405
+
1406
+ ---
1407
+
1408
+ ## [2.3.7]
1409
+
1410
+ - **[UPDATE]** Deps update.
1411
+ - **[NEW]** Add `global.testSetup.userCreate` function for testing.
1412
+
1413
+ ---
1414
+
1415
+ ## [2.3.6]
1416
+
1417
+ - **[UPDATE]** Deps update.
1418
+ - **[FIX]** Test fix.
1419
+
1420
+ ---
1421
+
1422
+ ## [2.3.5]
1423
+
1424
+ - **[NEW]** Add command `DropIndex`.
1425
+ - **[UPDATE]** Deps update.
1426
+
1427
+ ---
1428
+
1429
+ ## [2.3.4]
1430
+
1431
+ - **[NEW]** Add `webResources` option to email service.
1432
+ - **[UPDATE]** Deps update.
1433
+
1434
+ ---
1435
+
1436
+ ## [2.3.3]
1437
+
1438
+ - **[UPDATE]** Deps update.
1439
+
1440
+ ---
1441
+
1442
+ ## [2.3.2]
1443
+
1444
+ - **[FIX]** Fix controllers order to load.
759
1445
 
760
- #### 2.3.14
1446
+ ---
761
1447
 
762
- [FIX] fix validate controller method for non strings
1448
+ ## [2.3.1]
763
1449
 
764
- #### 2.3.13
1450
+ - **[FIX]** Fix parsing token.
765
1451
 
766
- [UPDATE] testing now with mongoDB Replica
767
- [UPDATE] refactor CLI
1452
+ ---
768
1453
 
769
- #### 2.3.12
1454
+ ## [2.3.0]
770
1455
 
771
- [UPDATE] testing update
1456
+ - **[NEW]** `Migration/create` `migration/migrate` commands.
772
1457
 
773
- #### 2.3.11
1458
+ ---
774
1459
 
775
- [UPDATE] refactor CLI for testing
1460
+ ## [2.2.6]
776
1461
 
777
- #### 2.3.10
1462
+ - **[NEW]** CLI command receiving parsed arguments.
778
1463
 
779
- [UPDATE] update user model indexes to allow null email and nick
780
- [UPDATE] deps update
1464
+ ---
781
1465
 
782
- #### 2.3.9
1466
+ ## [2.2.5]
783
1467
 
784
- [FIX] test fix
1468
+ - **[FIX]** Fix disconnecting problems with replica set.
785
1469
 
786
- #### 2.3.8
1470
+ ---
787
1471
 
788
- [NEW] add 'global.testSetup.beforeAll' 'global.testSetup.afterAll' functions and 'global.testSetup.disableUserCreate' flag for testing testing
1472
+ ## [2.2.4]
789
1473
 
790
- #### 2.3.7
1474
+ - **[UPDATE]** Internal update for speed up cli init.
791
1475
 
792
- [UPDATE] deps update
793
- [NEW] add 'global.testSetup.userCreate' function for testing
1476
+ ---
794
1477
 
795
- #### 2.3.6
1478
+ ## [2.2.3]
796
1479
 
797
- [UPDATE] deps update
798
- [FIX] test fix
1480
+ - **[FIX]** Fix language detection.
799
1481
 
800
- #### 2.3.5
1482
+ ---
801
1483
 
802
- [NEW] Add command DropIndex
803
- [UPDATE] deps update
1484
+ ## [2.2.2]
804
1485
 
805
- #### 2.3.4
1486
+ - **[FIX]** Fix test as part of docker image update. This just a `mongo-memory-server` problems.
1487
+ - **[NEW]** Add config to configure language detecting order and types.
806
1488
 
807
- [NEW] Add webResources option to email service
808
- [UPDATE] deps update
1489
+ ---
809
1490
 
810
- #### 2.3.3
1491
+ ## [2.2.1]
811
1492
 
812
- [UPDATE] deps update
1493
+ - **[UPDATE]** Deps update.
813
1494
 
814
- #### 2.3.2
1495
+ ---
815
1496
 
816
- [FIX] Fix controllers order to load
1497
+ ## [2.2.0]
817
1498
 
818
- #### 2.3.1
1499
+ - **[DEPRECATED]** `Base.loadFilesWithInheritance` please use `getFilesPathWithInheritance` that produce almost the same output.
1500
+ - **[UPDATE]** Deps update.
1501
+ - **[UPDATE]** Https logs now contains request time.
1502
+ - **[NEW]** Ability to put controllers into folders with path inheritance.
1503
+ - **[NEW]** Ability to replace `expressPath` on controller - `getExpressPath()` methos.
1504
+ - **[NEW]** Ability to put commands into folders with path inheritance.
819
1505
 
820
- [FIX] Fix parsing token
1506
+ ---
821
1507
 
822
- #### 2.3.0
1508
+ ## [2.1.2]
823
1509
 
824
- [NEW] Migration/create migration/migrate commands
1510
+ - **[UPDATE]** Disconnect of mongoose when command was finished.
825
1511
 
826
- #### 2.2.6
1512
+ ---
827
1513
 
828
- [NEW] CLI command receiving parsed arguments
1514
+ ## [2.1.1]
829
1515
 
830
- #### 2.2.5
1516
+ - **[UPDATE]** Deps update.
831
1517
 
832
- [FIX] Fix disconnecting problems with replica set
1518
+ ---
833
1519
 
834
- #### 2.2.4
1520
+ ## [2.1.0]
835
1521
 
836
- [UPDATE] Internal update for speed up cli init
1522
+ - **[DEV]** Added codestyle checker.
1523
+ - **[NEW]** Initial CLI module.
837
1524
 
838
- #### 2.2.3
1525
+ ---
839
1526
 
840
- [FIX] fix language detection
1527
+ ## [2.0.2]
841
1528
 
842
- #### 2.2.2
1529
+ - **[UPDATE]** Socket.io v3.
1530
+ - **[UPDATE]** Deps update.
843
1531
 
844
- [FIX] fix test as part of docker image update. This just a mongo-memory-server problems
845
- [NEW] add config to configure language detecting order and types
1532
+ ---
846
1533
 
847
- #### 2.2.1
1534
+ ## [2.0.1]
848
1535
 
849
- [UPDATE] deps update
1536
+ - **[NEW]** Added config to websocket.
850
1537
 
851
- #### 2.2.0
1538
+ ---
852
1539
 
853
- [DEPRECATED] Base.loadFilesWithInheritance please use getFilesPathWithInheritance that produce almost the same output
854
- [UPDATE] deps update
855
- [UPDATE] https logs now contains request time
856
- [NEW] Ability to put controllers into folders with path inheritance
857
- [NEW] Ability to replace expressPath on controller - getExpressPath() methos
858
- [NEW] Ability to put commands into folders with path inheritance
1540
+ ## [2.0.0]
859
1541
 
860
- #### 2.1.2
1542
+ - **[BREAKING]** Change config format of log config. Now configs can be only objects.
861
1543
 
862
- [UPDATE] disconnect of mongoose when command was finished
1544
+ ---
863
1545
 
864
- #### 2.1.1
1546
+ ## [1.5.0]
865
1547
 
866
- [UPDATE] deps update
1548
+ - **[NEW]** Support for environment configs (`config.js` and `config.{NODE_ENV}.js`) with overwrite.
1549
+ - **[UPDATE]** Deps update.
867
1550
 
868
- #### 2.1.0
1551
+ ---
869
1552
 
870
- [DEV] added codestyle checker
871
- [NEW] Initial CLI module
1553
+ ## [1.4.0]
872
1554
 
873
- #### 2.0.2 released
1555
+ - **[NEW]** Ability to pass additional parameter to server that will be executed before adding page 404.
874
1556
 
875
- [UPDATE] socket.io v3
876
- [UPDATE] deps update
1557
+ ---
877
1558
 
878
- #### 2.0.1
1559
+ ## [1.3.0]
879
1560
 
880
- [NEW] Added config to websocket
1561
+ - **[NEW]** Models now support optional callback that will executed on connection ready. If mongo already connected then callback will be executed immediately.
881
1562
 
882
- #### 2.0.0
1563
+ ---
883
1564
 
884
- [BREAKING] Change config format of log config. Now configs can be only objects
1565
+ ## [1.2.9]
885
1566
 
886
- #### 1.5.0
1567
+ - **[UPDATE]** Update deps.
887
1568
 
888
- [NEW] Support for environment configs (config.js and config.{NODE_ENV}.js) with overwrite
889
- [UPDATE] deps update
1569
+ ---
890
1570
 
891
- #### 1.4.0
1571
+ ## [1.2.8]
892
1572
 
893
- Ability to pass additional parameter to server that will be executed before adding page 404
1573
+ - **[UPDATE]** Update deps.
894
1574
 
895
- #### 1.3.0
1575
+ ---
896
1576
 
897
- Models now support optional callback that will executed on connection ready. If mongo already connected then callback will be executed immediately
1577
+ ## [1.2.7]
898
1578
 
899
- #### 1.2.9
1579
+ - **[NEW]** Add abilty to return error from custom validation functions.
900
1580
 
901
- Update deps
1581
+ ---
902
1582
 
903
- #### 1.2.8
1583
+ ## [1.2.6]
904
1584
 
905
- Update deps
1585
+ - **[UPDATE]** Validator documentation (jsdoc) update.
1586
+ - **[UPDATE]** Validator support pass parameters to validator.
906
1587
 
907
- #### 1.2.7
1588
+ ---
908
1589
 
909
- Add abilty to return error from custom validation functions
1590
+ ## [1.2.5]
910
1591
 
911
- #### 1.2.6
1592
+ - **[FIX]** Fix problem with test (user should be global on tests).
912
1593
 
913
- Validator documentation (jsdoc) update
914
- Validator support pass parameters to validator
1594
+ ---
915
1595
 
916
- #### 1.2.5
1596
+ ## [1.2.4]
917
1597
 
918
- Fix problem with test (user should be global on tests)
1598
+ - **[NEW]** Add eslint.
1599
+ - **[UPDATE]** Code refactor.
919
1600
 
920
- #### 1.2.4
1601
+ ---
921
1602
 
922
- Add eslint
923
- Code refactor
1603
+ ## [1.2.3]
924
1604
 
925
- #### 1.2.3
1605
+ - **[NEW]** Add prettier.
1606
+ - **[UPDATE]** Code reformat.
926
1607
 
927
- Add prettier
928
- Code reformat
1608
+ ---
929
1609
 
930
- #### 1.2.2
1610
+ ## [1.2.2]
931
1611
 
932
- Update deps
1612
+ - **[UPDATE]** Update deps.