@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.
- package/CHANGELOG.md +1210 -530
- package/LICENCE +1 -1
- package/dist/Cli.d.ts +7 -0
- package/dist/Cli.js +19 -0
- package/dist/Cli.js.map +1 -0
- package/dist/cluster.d.ts +1 -0
- package/dist/cluster.js +18 -0
- package/dist/cluster.js.map +1 -0
- package/dist/codegen/appTypes.d.ts +19 -0
- package/dist/codegen/appTypes.js +49 -0
- package/dist/codegen/appTypes.js.map +1 -0
- package/dist/codegen/collectMetadata.d.ts +39 -0
- package/dist/codegen/collectMetadata.js +59 -0
- package/dist/codegen/collectMetadata.js.map +1 -0
- package/dist/codegen/emit.d.ts +29 -0
- package/dist/codegen/emit.js +325 -0
- package/dist/codegen/emit.js.map +1 -0
- package/dist/codegen/index.d.ts +16 -0
- package/dist/codegen/index.js +18 -0
- package/dist/codegen/index.js.map +1 -0
- package/dist/codegen/routeTypes.d.ts +13 -0
- package/dist/codegen/routeTypes.js +126 -0
- package/dist/codegen/routeTypes.js.map +1 -0
- package/dist/commands/CreateUser.d.ts +32 -0
- package/dist/commands/CreateUser.js +83 -0
- package/dist/commands/CreateUser.js.map +1 -0
- package/dist/commands/DropIndex.d.ts +16 -0
- package/dist/commands/DropIndex.js +30 -0
- package/dist/commands/DropIndex.js.map +1 -0
- package/dist/commands/GenerateRandomBytes.d.ts +7 -0
- package/dist/commands/GenerateRandomBytes.js +18 -0
- package/dist/commands/GenerateRandomBytes.js.map +1 -0
- package/dist/commands/GenerateTypes.d.ts +7 -0
- package/dist/commands/GenerateTypes.js +14 -0
- package/dist/commands/GenerateTypes.js.map +1 -0
- package/dist/commands/SyncIndexes.d.ts +6 -0
- package/dist/commands/SyncIndexes.js +31 -0
- package/dist/commands/SyncIndexes.js.map +1 -0
- package/dist/commands/migration/Create.d.ts +18 -0
- package/dist/commands/migration/Create.js +57 -0
- package/dist/commands/migration/Create.js.map +1 -0
- package/dist/commands/migration/Migrate.d.ts +6 -0
- package/dist/commands/migration/Migrate.js +43 -0
- package/dist/commands/migration/Migrate.js.map +1 -0
- package/dist/config/auth.d.ts +6 -0
- package/dist/config/auth.js +7 -0
- package/dist/config/auth.js.map +1 -0
- package/dist/config/http.d.ts +8 -0
- package/dist/config/http.js +10 -0
- package/dist/config/http.js.map +1 -0
- package/dist/config/i18n.d.ts +13 -0
- package/dist/config/i18n.js +13 -0
- package/dist/config/i18n.js.map +1 -0
- package/dist/config/ipDetector.d.ts +5 -0
- package/dist/config/ipDetector.js +15 -0
- package/dist/config/ipDetector.js.map +1 -0
- package/dist/config/log.d.ts +11 -0
- package/dist/config/log.js +20 -0
- package/dist/config/log.js.map +1 -0
- package/dist/config/mongo.d.ts +4 -0
- package/dist/config/mongo.js +4 -0
- package/dist/config/mongo.js.map +1 -0
- package/dist/config/rateLimiter.d.ts +13 -0
- package/dist/config/rateLimiter.js +17 -0
- package/dist/config/rateLimiter.js.map +1 -0
- package/dist/config/redis.d.ts +5 -0
- package/dist/config/redis.js +5 -0
- package/dist/config/redis.js.map +1 -0
- package/dist/config/validate.d.ts +4 -0
- package/dist/config/validate.js +4 -0
- package/dist/config/validate.js.map +1 -0
- package/dist/controllers/Auth.d.ts +74 -0
- package/dist/controllers/Auth.js +191 -0
- package/dist/controllers/Auth.js.map +1 -0
- package/dist/controllers/Auth.routes.gen.d.ts +57 -0
- package/dist/controllers/Auth.routes.gen.js +10 -0
- package/dist/controllers/Auth.routes.gen.js.map +1 -0
- package/dist/controllers/Home.d.ts +15 -0
- package/dist/controllers/Home.js +22 -0
- package/dist/controllers/Home.js.map +1 -0
- package/dist/controllers/Home.routes.gen.d.ts +14 -0
- package/dist/controllers/Home.routes.gen.js +10 -0
- package/dist/controllers/Home.routes.gen.js.map +1 -0
- package/dist/controllers/index.d.ts +36 -0
- package/dist/controllers/index.js +416 -0
- package/dist/controllers/index.js.map +1 -0
- package/dist/folderConfig.d.ts +34 -0
- package/dist/folderConfig.js +14 -0
- package/dist/folderConfig.js.map +1 -0
- package/dist/helpers/appInstance.d.ts +3 -0
- package/dist/helpers/appInstance.js +8 -0
- package/dist/helpers/appInstance.js.map +1 -0
- package/dist/helpers/crypto.d.ts +3 -0
- package/dist/helpers/crypto.js +17 -0
- package/dist/helpers/crypto.js.map +1 -0
- package/dist/helpers/files.d.ts +16 -0
- package/dist/helpers/files.js +78 -0
- package/dist/helpers/files.js.map +1 -0
- package/dist/helpers/logger.d.ts +4 -0
- package/dist/helpers/logger.js +20 -0
- package/dist/helpers/logger.js.map +1 -0
- package/dist/helpers/redis/clearNamespace.d.ts +2 -0
- package/dist/helpers/redis/clearNamespace.js +14 -0
- package/dist/helpers/redis/clearNamespace.js.map +1 -0
- package/dist/helpers/redis/redisConnection.d.ts +6 -0
- package/dist/helpers/redis/redisConnection.js +48 -0
- package/dist/helpers/redis/redisConnection.js.map +1 -0
- package/dist/helpers/yup.d.ts +13 -0
- package/{helpers → dist/helpers}/yup.js +9 -9
- package/dist/helpers/yup.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/models/Lock.d.ts +90 -0
- package/dist/models/Lock.js +97 -0
- package/dist/models/Lock.js.map +1 -0
- package/dist/models/Migration.d.ts +13 -0
- package/dist/models/Migration.js +14 -0
- package/dist/models/Migration.js.map +1 -0
- package/dist/models/Sequence.d.ts +28 -0
- package/dist/models/Sequence.js +19 -0
- package/dist/models/Sequence.js.map +1 -0
- package/dist/models/User.d.ts +729 -0
- package/dist/models/User.js +294 -0
- package/dist/models/User.js.map +1 -0
- package/dist/models/UserOld.d.ts +190 -0
- package/dist/models/UserOld.js +230 -0
- package/dist/models/UserOld.js.map +1 -0
- package/dist/modules/AbstractCommand.d.ts +51 -0
- package/dist/modules/AbstractCommand.js +60 -0
- package/dist/modules/AbstractCommand.js.map +1 -0
- package/dist/modules/AbstractConnector.d.ts +5 -0
- package/dist/modules/AbstractConnector.js +8 -0
- package/dist/modules/AbstractConnector.js.map +1 -0
- package/dist/modules/AbstractController.d.ts +74 -0
- package/dist/modules/AbstractController.js +71 -0
- package/dist/modules/AbstractController.js.map +1 -0
- package/dist/modules/AbstractModel.d.ts +29 -0
- package/dist/modules/AbstractModel.js +42 -0
- package/dist/modules/AbstractModel.js.map +1 -0
- package/dist/modules/Base.d.ts +29 -0
- package/dist/modules/Base.js +58 -0
- package/dist/modules/Base.js.map +1 -0
- package/dist/modules/BaseCli.d.ts +25 -0
- package/dist/modules/BaseCli.js +148 -0
- package/dist/modules/BaseCli.js.map +1 -0
- package/dist/modules/BaseModel.d.ts +57 -0
- package/dist/modules/BaseModel.js +37 -0
- package/dist/modules/BaseModel.js.map +1 -0
- package/dist/server.d.ts +122 -0
- package/dist/server.js +478 -0
- package/dist/server.js.map +1 -0
- package/dist/services/cache/Cache.d.ts +31 -0
- package/dist/services/cache/Cache.js +103 -0
- package/dist/services/cache/Cache.js.map +1 -0
- package/dist/services/http/HttpServer.d.ts +44 -0
- package/dist/services/http/HttpServer.js +81 -0
- package/dist/services/http/HttpServer.js.map +1 -0
- package/dist/services/http/middleware/AbstractMiddleware.d.ts +41 -0
- package/dist/services/http/middleware/AbstractMiddleware.js +52 -0
- package/dist/services/http/middleware/AbstractMiddleware.js.map +1 -0
- package/dist/services/http/middleware/Auth.d.ts +9 -0
- package/dist/services/http/middleware/Auth.js +18 -0
- package/dist/services/http/middleware/Auth.js.map +1 -0
- package/dist/services/http/middleware/Cors.d.ts +12 -0
- package/dist/services/http/middleware/Cors.js +36 -0
- package/dist/services/http/middleware/Cors.js.map +1 -0
- package/dist/services/http/middleware/GetUserByToken.d.ts +36 -0
- package/dist/services/http/middleware/GetUserByToken.js +56 -0
- package/dist/services/http/middleware/GetUserByToken.js.map +1 -0
- package/dist/services/http/middleware/I18n.d.ts +23 -0
- package/dist/services/http/middleware/I18n.js +61 -0
- package/dist/services/http/middleware/I18n.js.map +1 -0
- package/dist/services/http/middleware/IpDetector.d.ts +14 -0
- package/dist/services/http/middleware/IpDetector.js +55 -0
- package/dist/services/http/middleware/IpDetector.js.map +1 -0
- package/dist/services/http/middleware/Pagination.d.ts +28 -0
- package/dist/services/http/middleware/Pagination.js +49 -0
- package/dist/services/http/middleware/Pagination.js.map +1 -0
- package/dist/services/http/middleware/PrepareAppInfo.d.ts +8 -0
- package/dist/services/http/middleware/PrepareAppInfo.js +17 -0
- package/dist/services/http/middleware/PrepareAppInfo.js.map +1 -0
- package/dist/services/http/middleware/RateLimiter.d.ts +26 -0
- package/dist/services/http/middleware/RateLimiter.js +102 -0
- package/dist/services/http/middleware/RateLimiter.js.map +1 -0
- package/dist/services/http/middleware/RequestLogger.d.ts +8 -0
- package/dist/services/http/middleware/RequestLogger.js +18 -0
- package/dist/services/http/middleware/RequestLogger.js.map +1 -0
- package/dist/services/http/middleware/RequestParser.d.ts +8 -0
- package/dist/services/http/middleware/RequestParser.js +35 -0
- package/dist/services/http/middleware/RequestParser.js.map +1 -0
- package/dist/services/http/middleware/Role.d.ts +12 -0
- package/dist/services/http/middleware/Role.js +24 -0
- package/dist/services/http/middleware/Role.js.map +1 -0
- package/dist/services/http/routing/ExpressAdapter.d.ts +12 -0
- package/dist/services/http/routing/ExpressAdapter.js +93 -0
- package/dist/services/http/routing/ExpressAdapter.js.map +1 -0
- package/dist/services/http/routing/RouteNode.d.ts +101 -0
- package/dist/services/http/routing/RouteNode.js +21 -0
- package/dist/services/http/routing/RouteNode.js.map +1 -0
- package/dist/services/http/routing/RouteRegistry.d.ts +37 -0
- package/dist/services/http/routing/RouteRegistry.js +201 -0
- package/dist/services/http/routing/RouteRegistry.js.map +1 -0
- package/dist/services/http/routing/formatTree.d.ts +23 -0
- package/dist/services/http/routing/formatTree.js +158 -0
- package/dist/services/http/routing/formatTree.js.map +1 -0
- package/dist/services/http/routing/match.d.ts +30 -0
- package/dist/services/http/routing/match.js +136 -0
- package/dist/services/http/routing/match.js.map +1 -0
- package/dist/services/http/routing/middlewareNormalization.d.ts +16 -0
- package/dist/services/http/routing/middlewareNormalization.js +28 -0
- package/dist/services/http/routing/middlewareNormalization.js.map +1 -0
- package/dist/services/http/types.d.ts +74 -0
- package/dist/services/http/types.js +8 -0
- package/dist/services/http/types.js.map +1 -0
- package/dist/services/i18n/I18n.d.ts +15 -0
- package/dist/services/i18n/I18n.js +58 -0
- package/dist/services/i18n/I18n.js.map +1 -0
- package/dist/services/logging/SentryTransport.d.ts +13 -0
- package/dist/services/logging/SentryTransport.js +121 -0
- package/dist/services/logging/SentryTransport.js.map +1 -0
- package/dist/services/validate/ValidateService.d.ts +54 -0
- package/dist/services/validate/ValidateService.js +122 -0
- package/dist/services/validate/ValidateService.js.map +1 -0
- package/dist/services/validate/ValidationError.d.ts +35 -0
- package/dist/services/validate/ValidationError.js +77 -0
- package/dist/services/validate/ValidationError.js.map +1 -0
- package/dist/services/validate/drivers/StandardSchemaDriver.d.ts +15 -0
- package/dist/services/validate/drivers/StandardSchemaDriver.js +34 -0
- package/dist/services/validate/drivers/StandardSchemaDriver.js.map +1 -0
- package/dist/services/validate/drivers/YupDriver.d.ts +21 -0
- package/dist/services/validate/drivers/YupDriver.js +66 -0
- package/dist/services/validate/drivers/YupDriver.js.map +1 -0
- package/dist/services/validate/types.d.ts +104 -0
- package/dist/services/validate/types.js +11 -0
- package/dist/services/validate/types.js.map +1 -0
- package/dist/tests/frameworkVitestSetup.d.ts +1 -0
- package/dist/tests/frameworkVitestSetup.js +9 -0
- package/dist/tests/frameworkVitestSetup.js.map +1 -0
- package/dist/tests/globalSetupVitest.d.ts +3 -0
- package/dist/tests/globalSetupVitest.js +29 -0
- package/dist/tests/globalSetupVitest.js.map +1 -0
- package/dist/tests/setupVitest.d.ts +1 -0
- package/dist/tests/setupVitest.js +91 -0
- package/dist/tests/setupVitest.js.map +1 -0
- package/dist/tests/testHelpers.d.ts +361 -0
- package/dist/tests/testHelpers.js +48 -0
- package/dist/tests/testHelpers.js.map +1 -0
- package/package.json +63 -43
- package/Cli.js +0 -22
- package/cluster.js +0 -25
- package/commands/CreateUser.js +0 -75
- package/commands/Documentation.js +0 -17
- package/commands/DropIndex.js +0 -29
- package/commands/GenerateRandomBytes.js +0 -21
- package/commands/GetOpenApiJson.js +0 -324
- package/commands/SyncIndexes.js +0 -39
- package/commands/migration/Create.js +0 -61
- package/commands/migration/Migrate.js +0 -55
- package/config/auth.js +0 -9
- package/config/http.js +0 -9
- package/config/i18n.js +0 -12
- package/config/ipDetector.js +0 -14
- package/config/log.js +0 -22
- package/config/mail.js +0 -29
- package/config/mongo.js +0 -3
- package/config/rateLimiter.js +0 -16
- package/config/redis.js +0 -4
- package/config/validate.js +0 -3
- package/controllers/Auth.js +0 -204
- package/controllers/Home.js +0 -28
- package/controllers/index.js +0 -60
- package/eslint.config.js +0 -44
- package/folderConfig.js +0 -14
- package/helpers/files.js +0 -76
- package/helpers/logger.js +0 -16
- package/helpers/redis/clearNamespace.js +0 -14
- package/index.js +0 -8
- package/jsconfig.json +0 -9
- package/locales/en/translation.json +0 -27
- package/locales/ru/translation.json +0 -27
- package/migrations/.gitkeep +0 -0
- package/models/Migration.js +0 -15
- package/models/Sequence.js +0 -22
- package/models/User.js +0 -261
- package/modules/AbstractCommand.js +0 -43
- package/modules/AbstractConnector.js +0 -9
- package/modules/AbstractController.js +0 -406
- package/modules/AbstractModel.d.ts +0 -48
- package/modules/AbstractModel.js +0 -92
- package/modules/Base.d.ts +0 -37
- package/modules/Base.js +0 -63
- package/modules/BaseCli.js +0 -94
- package/server.d.ts +0 -98
- package/server.js +0 -437
- package/services/cache/Cache.d.ts +0 -35
- package/services/cache/Cache.js +0 -124
- package/services/documentation/DocumentationGenerator.js +0 -169
- package/services/http/HttpServer.js +0 -95
- package/services/http/middleware/AbstractMiddleware.js +0 -51
- package/services/http/middleware/Auth.js +0 -20
- package/services/http/middleware/Cors.js +0 -46
- package/services/http/middleware/GetUserByToken.js +0 -47
- package/services/http/middleware/I18n.js +0 -117
- package/services/http/middleware/IpDetector.js +0 -59
- package/services/http/middleware/Pagination.js +0 -57
- package/services/http/middleware/PrepareAppInfo.js +0 -18
- package/services/http/middleware/RateLimiter.js +0 -134
- package/services/http/middleware/RequestLogger.js +0 -22
- package/services/http/middleware/RequestParser.js +0 -40
- package/services/http/middleware/Role.js +0 -29
- package/services/messaging/email/index.js +0 -217
- package/services/messaging/email/resources/.gitkeep +0 -1
- package/services/messaging/email/templates/emptyTemplate/html.pug +0 -9
- package/services/messaging/email/templates/emptyTemplate/subject.pug +0 -1
- package/services/messaging/email/templates/emptyTemplate/text.pug +0 -1
- package/services/messaging/email/templates/recovery/html.pug +0 -8
- package/services/messaging/email/templates/recovery/subject.pug +0 -2
- package/services/messaging/email/templates/recovery/text.pug +0 -3
- package/services/messaging/email/templates/verification/html.pug +0 -10
- package/services/messaging/email/templates/verification/subject.pug +0 -1
- package/services/messaging/email/templates/verification/text.pug +0 -1
- package/services/messaging/index.js +0 -3
- package/services/validate/ValidateService.js +0 -157
- package/services/validate/drivers/AbstractValidator.js +0 -37
- package/services/validate/drivers/CustomValidator.js +0 -51
- package/services/validate/drivers/YupValidator.js +0 -103
- package/tests/globalSetupVitest.js +0 -35
- package/tests/setup.js +0 -116
- package/tests/setupVitest.js +0 -107
- package/types/Expand.d.ts +0 -11
- package/types/TFoldersConfig.d.ts +0 -17
- package/views/404.pug +0 -3
- package/views/home.pug +0 -3
- package/views/layouts/base.pug +0 -39
- package/vitest.config.js +0 -16
- /package/{commands → dist/migrations}/.gitkeep +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,526 +1,1085 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
93
|
+
---
|
|
94
|
+
## [5.0.0-beta.48]
|
|
4
95
|
|
|
5
|
-
|
|
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
|
-
|
|
101
|
+
---
|
|
102
|
+
## [5.0.0-beta.47]
|
|
8
103
|
|
|
9
|
-
|
|
104
|
+
- **[UPDATE]** Tree-based route type generation improvements.
|
|
105
|
+
- **[UPDATE]** Dependencies update.
|
|
10
106
|
|
|
11
|
-
|
|
12
|
-
[
|
|
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
|
-
|
|
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
|
-
|
|
18
|
-
[
|
|
125
|
+
---
|
|
126
|
+
## [5.0.0-beta.45]
|
|
127
|
+
- **[BREAKING]** rate-limiter-flexible v9->v10
|
|
128
|
+
- **[BREAKING]** typecript v5->v6
|
|
19
129
|
|
|
20
|
-
|
|
130
|
+
---
|
|
131
|
+
## [5.0.0-beta.44]
|
|
21
132
|
|
|
22
|
-
[
|
|
23
|
-
[
|
|
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
|
-
|
|
138
|
+
---
|
|
139
|
+
## [5.0.0-beta.43]
|
|
31
140
|
|
|
32
|
-
[
|
|
141
|
+
- **[FIX]** Fix typo in peerDeps
|
|
33
142
|
|
|
34
|
-
### 5.0.0-alpha.22
|
|
35
143
|
|
|
36
|
-
|
|
37
|
-
[
|
|
144
|
+
---
|
|
145
|
+
## [5.0.0-beta.42]
|
|
38
146
|
|
|
39
|
-
|
|
147
|
+
- **[BREAKING]** Mongoose v9. <https://mongoosejs.com/docs/migrating_to_9.html>.
|
|
40
148
|
|
|
41
|
-
|
|
42
|
-
[
|
|
43
|
-
[UPDATE] update deps
|
|
44
|
-
[UPDATE] Mailer uses await import() for startup speedup
|
|
149
|
+
---
|
|
150
|
+
## [5.0.0-beta.41]
|
|
45
151
|
|
|
46
|
-
|
|
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
|
-
|
|
158
|
+
---
|
|
159
|
+
## [5.0.0-beta.40]
|
|
54
160
|
|
|
55
|
-
|
|
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
|
-
|
|
165
|
+
## [5.0.0-beta.39]
|
|
61
166
|
|
|
62
|
-
[
|
|
63
|
-
[UPDATE] update deps
|
|
167
|
+
- **[UPDATE]** rete limiter. Do not create index on mongo if we have "process.env.test === 'true'"
|
|
64
168
|
|
|
65
|
-
|
|
169
|
+
---
|
|
66
170
|
|
|
67
|
-
[
|
|
68
|
-
[UPDATE] update deps
|
|
171
|
+
## [5.0.0-beta.38]
|
|
69
172
|
|
|
70
|
-
|
|
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
|
-
|
|
73
|
-
[UPDATE] update deps
|
|
178
|
+
---
|
|
74
179
|
|
|
75
|
-
|
|
180
|
+
## [5.0.0-beta.36]
|
|
76
181
|
|
|
77
|
-
[
|
|
182
|
+
- **[UPDATE]** i18nService update loading to avoid race conditions
|
|
183
|
+
---
|
|
78
184
|
|
|
79
|
-
|
|
185
|
+
## [5.0.0-beta.36]
|
|
80
186
|
|
|
81
|
-
[UPDATE]
|
|
82
|
-
[UPDATE] update i18n internal implementation
|
|
83
|
-
[CHANGE] disable https server view
|
|
187
|
+
- **[UPDATE]** i18nService update method names
|
|
84
188
|
|
|
85
|
-
|
|
189
|
+
---
|
|
86
190
|
|
|
87
|
-
[
|
|
191
|
+
## [5.0.0-beta.35]
|
|
88
192
|
|
|
89
|
-
|
|
193
|
+
- **[NEW]** Introduce i18nService (ability to user i18n not only inside middleware)
|
|
90
194
|
|
|
91
|
-
|
|
195
|
+
---
|
|
92
196
|
|
|
93
|
-
|
|
197
|
+
## [5.0.0-beta.34]
|
|
94
198
|
|
|
95
|
-
[
|
|
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
|
-
|
|
201
|
+
---
|
|
100
202
|
|
|
101
|
-
[
|
|
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
|
-
|
|
205
|
+
- **[NEW]** consumeResult changed to be more flexible
|
|
107
206
|
|
|
108
|
-
|
|
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
|
-
|
|
209
|
+
## [5.0.0-beta.32]
|
|
113
210
|
|
|
114
|
-
[
|
|
211
|
+
- **[NEW]** Ip detector middleware - add getIpAdressFromIncomingMessage function to allow user middleware as a detector of id adresses without middleware
|
|
115
212
|
|
|
116
|
-
|
|
213
|
+
---
|
|
117
214
|
|
|
118
|
-
[
|
|
215
|
+
## [5.0.0-beta.31]
|
|
119
216
|
|
|
120
|
-
|
|
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
|
-
|
|
220
|
+
---
|
|
126
221
|
|
|
127
|
-
[
|
|
128
|
-
[CHANGE] Cache update redis.setEX to redis.set(..,..,{EX:xx}) as setEX deprecated
|
|
222
|
+
## [5.0.0-beta.30]
|
|
129
223
|
|
|
130
|
-
|
|
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
|
-
|
|
227
|
+
---
|
|
136
228
|
|
|
137
|
-
[
|
|
229
|
+
## [5.0.0-beta.29]
|
|
138
230
|
|
|
139
|
-
|
|
231
|
+
- **[FIX]** Fix CLI mongo app name generation (128 symbols limit)
|
|
140
232
|
|
|
141
|
-
|
|
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
|
-
|
|
235
|
+
## [5.0.0-beta.28]
|
|
146
236
|
|
|
147
|
-
[UPDATE]
|
|
237
|
+
- **[UPDATE]** Inside CLI allow to have a negative values
|
|
238
|
+
- **[UPDATE]** Update deps.
|
|
148
239
|
|
|
149
|
-
|
|
240
|
+
---
|
|
150
241
|
|
|
151
|
-
[
|
|
242
|
+
## [5.0.0-beta.27]
|
|
152
243
|
|
|
153
|
-
|
|
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
|
-
|
|
249
|
+
---
|
|
158
250
|
|
|
159
|
-
[
|
|
251
|
+
## [5.0.0-beta.26]
|
|
160
252
|
|
|
161
|
-
|
|
253
|
+
- **[UPDATE]** Update types.
|
|
254
|
+
- **[UPDATE]** Update tests (more ts).
|
|
162
255
|
|
|
163
|
-
|
|
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
|
-
|
|
258
|
+
## [5.0.0-beta.25]
|
|
167
259
|
|
|
168
|
-
[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
|
-
|
|
262
|
+
---
|
|
173
263
|
|
|
174
|
-
[
|
|
264
|
+
## [5.0.0-beta.24]
|
|
175
265
|
|
|
176
|
-
|
|
266
|
+
- **[UPDATE]** Update types.
|
|
177
267
|
|
|
178
|
-
|
|
268
|
+
---
|
|
179
269
|
|
|
180
|
-
|
|
270
|
+
## [5.0.0-beta.23]
|
|
181
271
|
|
|
182
|
-
[BREAKING]
|
|
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
|
-
|
|
275
|
+
---
|
|
185
276
|
|
|
186
|
-
[
|
|
277
|
+
## [5.0.0-beta.22]
|
|
187
278
|
|
|
188
|
-
|
|
279
|
+
- **[UPDATE]** Update types.
|
|
189
280
|
|
|
190
|
-
|
|
281
|
+
---
|
|
191
282
|
|
|
192
|
-
|
|
283
|
+
## [5.0.0-beta.21]
|
|
193
284
|
|
|
194
|
-
[
|
|
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
|
-
|
|
287
|
+
---
|
|
199
288
|
|
|
200
|
-
[
|
|
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
|
-
|
|
291
|
+
- **[FIX]** Fix bug with `Lock` model index.
|
|
292
|
+
- **[NEW]** `BaseModel` add `Virtuals`.
|
|
207
293
|
|
|
208
|
-
|
|
209
|
-
[UPDATE] updated deps
|
|
294
|
+
---
|
|
210
295
|
|
|
211
|
-
|
|
296
|
+
## [5.0.0-beta.19]
|
|
212
297
|
|
|
213
|
-
[NEW]
|
|
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
|
-
|
|
301
|
+
---
|
|
216
302
|
|
|
217
|
-
[
|
|
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
|
-
|
|
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
|
-
|
|
309
|
+
---
|
|
224
310
|
|
|
225
|
-
|
|
311
|
+
## [5.0.0-beta.17]
|
|
226
312
|
|
|
227
|
-
[
|
|
313
|
+
- **[NEW]** Add `GenerateTypes` command.
|
|
228
314
|
|
|
229
|
-
|
|
315
|
+
---
|
|
230
316
|
|
|
231
|
-
[
|
|
317
|
+
## [5.0.0-beta.16]
|
|
232
318
|
|
|
233
|
-
|
|
319
|
+
- **[UPDATE]** Update deps.
|
|
320
|
+
- **[UPDATE]** New app getter `internalFilesCache`.
|
|
321
|
+
- **[UPDATE]** Command new static props to load `isShouldGetModelPaths`.
|
|
234
322
|
|
|
235
|
-
|
|
236
|
-
[NEW] CreateUser cli command. Ability to update user by email or id.
|
|
323
|
+
---
|
|
237
324
|
|
|
238
|
-
|
|
325
|
+
## [5.0.0-beta.15]
|
|
239
326
|
|
|
240
|
-
[
|
|
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
|
-
|
|
329
|
+
---
|
|
244
330
|
|
|
245
|
-
[
|
|
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
|
-
[
|
|
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
|
-
|
|
335
|
+
---
|
|
257
336
|
|
|
258
|
-
[
|
|
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
|
-
|
|
339
|
+
- **[UPDATE]** Only process `.ts` or `.js` files (not `.map` files).
|
|
268
340
|
|
|
269
|
-
|
|
270
|
-
[FIX] fix tests for redis
|
|
271
|
-
[FIX] support in tests TEST_FOLDER_EMAILS
|
|
341
|
+
---
|
|
272
342
|
|
|
273
|
-
|
|
343
|
+
## [5.0.0-beta.12]
|
|
274
344
|
|
|
275
|
-
[
|
|
276
|
-
[
|
|
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
|
-
|
|
349
|
+
---
|
|
279
350
|
|
|
280
|
-
[
|
|
351
|
+
## [5.0.0-beta.11]
|
|
281
352
|
|
|
282
|
-
|
|
353
|
+
- **[NEW]** Commands typing.
|
|
354
|
+
- **[NEW]** Commands support TS files.
|
|
355
|
+
- **[UPDATE]** Update deps.
|
|
283
356
|
|
|
284
|
-
|
|
357
|
+
---
|
|
285
358
|
|
|
286
|
-
|
|
359
|
+
## [5.0.0-beta.9]
|
|
287
360
|
|
|
288
|
-
[
|
|
289
|
-
[
|
|
290
|
-
[
|
|
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
|
-
|
|
368
|
+
---
|
|
293
369
|
|
|
294
|
-
[
|
|
295
|
-
[CHANGE] by default i18n not writing missed keys. Can be enabled via config
|
|
370
|
+
## [5.0.0-beta.8]
|
|
296
371
|
|
|
297
|
-
|
|
372
|
+
- **[UPDATE]** Update deps.
|
|
373
|
+
- **[NEW]** `Lock` model for working locks via mongoDB.
|
|
298
374
|
|
|
299
|
-
|
|
300
|
-
[FIX] fix documentation generation
|
|
375
|
+
---
|
|
301
376
|
|
|
302
|
-
|
|
377
|
+
## [5.0.0-beta.7]
|
|
303
378
|
|
|
304
|
-
[UPDATE]
|
|
305
|
-
[
|
|
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
|
-
|
|
382
|
+
---
|
|
308
383
|
|
|
309
|
-
[
|
|
310
|
-
[FIX] fix cache error handling.
|
|
384
|
+
## [5.0.0-beta.5]
|
|
311
385
|
|
|
312
|
-
|
|
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
|
-
|
|
315
|
-
[NEW] coverage report
|
|
316
|
-
[UPDATE] updated deps
|
|
390
|
+
---
|
|
317
391
|
|
|
318
|
-
|
|
392
|
+
## [5.0.0-beta.4]
|
|
319
393
|
|
|
320
|
-
[
|
|
321
|
-
[FIX] fix custom errors
|
|
394
|
+
- **[NEW]** On shutdown event now after timeout we are forcing to shutdown.
|
|
322
395
|
|
|
323
|
-
|
|
396
|
+
---
|
|
324
397
|
|
|
325
|
-
[
|
|
326
|
-
[UPDATE] cast function now can be ASYNC too
|
|
398
|
+
## [5.0.0-beta.2]
|
|
327
399
|
|
|
328
|
-
|
|
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
|
-
|
|
331
|
-
[NEW] updates tests to have own namespace on redis
|
|
404
|
+
---
|
|
332
405
|
|
|
333
|
-
|
|
406
|
+
## [5.0.0-beta.1]
|
|
334
407
|
|
|
335
|
-
[UPDATE]
|
|
408
|
+
- **[UPDATE]** Update deps.
|
|
409
|
+
- **[BREAKING]** `vitest` v3 <https://vitest.dev/guide/migration.html>.
|
|
336
410
|
|
|
337
|
-
|
|
411
|
+
---
|
|
338
412
|
|
|
339
|
-
[
|
|
413
|
+
## [5.0.0-alpha.26]
|
|
340
414
|
|
|
341
|
-
|
|
415
|
+
- **[UPDATE]** Update deps.
|
|
416
|
+
- **[UPDATE]** New commands view in CLI.
|
|
342
417
|
|
|
343
|
-
|
|
344
|
-
[UPDATE] change default branch to 'main'
|
|
418
|
+
---
|
|
345
419
|
|
|
346
|
-
|
|
420
|
+
## [5.0.0-alpha.24]
|
|
347
421
|
|
|
348
|
-
[UPDATE]
|
|
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
|
-
|
|
425
|
+
---
|
|
351
426
|
|
|
352
|
-
[
|
|
353
|
-
[FIX] fix bug with route level middleware
|
|
427
|
+
## [5.0.0-alpha.23]
|
|
354
428
|
|
|
355
|
-
|
|
429
|
+
- **[UPDATE]** Update deps.
|
|
356
430
|
|
|
357
|
-
|
|
358
|
-
[UPDATE] minimum node version 16
|
|
431
|
+
---
|
|
359
432
|
|
|
360
|
-
|
|
433
|
+
## [5.0.0-alpha.22]
|
|
361
434
|
|
|
362
|
-
[
|
|
363
|
-
[
|
|
435
|
+
- **[UPDATE]** Update deps.
|
|
436
|
+
- **[FIX]** Fix optional routing parameters.
|
|
364
437
|
|
|
365
|
-
|
|
438
|
+
---
|
|
366
439
|
|
|
367
|
-
[
|
|
440
|
+
## [5.0.0-alpha.21]
|
|
368
441
|
|
|
369
|
-
|
|
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
|
-
|
|
372
|
-
[UPDATE] update deps
|
|
447
|
+
---
|
|
373
448
|
|
|
374
|
-
|
|
449
|
+
## [5.0.0-alpha.20]
|
|
375
450
|
|
|
376
|
-
[UPDATE]
|
|
451
|
+
- **[UPDATE]** Update deps.
|
|
452
|
+
- **[UPDATE]** `#realLogger` do not throw error in a scecific cases (`model.toJSON({virtual:true})`).
|
|
377
453
|
|
|
378
|
-
|
|
454
|
+
---
|
|
379
455
|
|
|
380
|
-
[
|
|
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
|
-
|
|
458
|
+
- **[NEW]** Added `modelSchemaOptions` for models.
|
|
385
459
|
|
|
386
|
-
|
|
460
|
+
---
|
|
387
461
|
|
|
388
|
-
|
|
462
|
+
## [5.0.0-alpha.18]
|
|
389
463
|
|
|
390
|
-
[
|
|
464
|
+
- **[BREAKING]** Default auth responce changed to be unified. `{token, user}` => `{data:{token, user}}`.
|
|
465
|
+
- **[UPDATE]** `RateLimiter` updae key generation.
|
|
391
466
|
|
|
392
|
-
|
|
467
|
+
---
|
|
393
468
|
|
|
394
|
-
[
|
|
395
|
-
[CHANGE] change default getConfig method
|
|
469
|
+
## [5.0.0-alpha.17]
|
|
396
470
|
|
|
397
|
-
|
|
471
|
+
- **[NEW]** `generateRandomBytes` command.
|
|
472
|
+
- **[UPDATE]** Update deps.
|
|
398
473
|
|
|
399
|
-
|
|
474
|
+
---
|
|
400
475
|
|
|
401
|
-
|
|
476
|
+
## [5.0.0-alpha.16]
|
|
402
477
|
|
|
403
|
-
[UPDATE]
|
|
478
|
+
- **[UPDATE]** No warning of direct usage `body` and `query`.
|
|
479
|
+
- **[UPDATE]** Update deps.
|
|
404
480
|
|
|
405
|
-
|
|
481
|
+
---
|
|
406
482
|
|
|
407
|
-
[
|
|
483
|
+
## [5.0.0-alpha.15]
|
|
408
484
|
|
|
409
|
-
|
|
485
|
+
- **[BUG]** Fix bug with pagination.
|
|
486
|
+
- **[UPDATE]** Update deps.
|
|
410
487
|
|
|
411
|
-
|
|
488
|
+
---
|
|
412
489
|
|
|
413
|
-
|
|
490
|
+
## [5.0.0-alpha.14]
|
|
414
491
|
|
|
415
|
-
[
|
|
492
|
+
- **[NEW]** Add types for `Abstract` model (wip).
|
|
416
493
|
|
|
417
|
-
|
|
494
|
+
---
|
|
418
495
|
|
|
419
|
-
[
|
|
420
|
-
[UPDATE] getUserByTokens more logs
|
|
496
|
+
## [5.0.0-alpha.13]
|
|
421
497
|
|
|
422
|
-
|
|
498
|
+
- **[UPDATE]** Update deps.
|
|
499
|
+
- **[UPDATE]** Update `i18n` internal implementation.
|
|
500
|
+
- **[CHANGE]** Disable https server view.
|
|
423
501
|
|
|
424
|
-
|
|
425
|
-
Notable changes from migration
|
|
426
|
-
Removed `execPopulate()`[link](https://mongoosejs.com/docs/migrating_to_6.html#removed-execpopulate)
|
|
502
|
+
---
|
|
427
503
|
|
|
428
|
-
|
|
429
|
-
// Document#populate() now returns a promise and is now no longer chainable.
|
|
504
|
+
## [5.0.0-alpha.12]
|
|
430
505
|
|
|
431
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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]
|
|
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
|
-
|
|
514
|
+
---
|
|
472
515
|
|
|
473
|
-
[
|
|
474
|
-
[UPDATE] replace body-parser with express.json
|
|
475
|
-
[NEW] role middleware
|
|
516
|
+
## [5.0.0-alpha.10]
|
|
476
517
|
|
|
477
|
-
|
|
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
|
-
|
|
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
|
-
|
|
524
|
+
## [5.0.0-alpha.9]
|
|
485
525
|
|
|
486
|
-
[UPDATE]
|
|
487
|
-
[
|
|
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
|
-
|
|
531
|
+
---
|
|
490
532
|
|
|
491
|
-
[
|
|
492
|
-
[UPDATE] update tests timeout
|
|
533
|
+
## [5.0.0-alpha.8]
|
|
493
534
|
|
|
494
|
-
|
|
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
|
-
|
|
497
|
-
[NEW] Ability to configure Auth flow with 'isAuthWithVefificationFlow' option.
|
|
498
|
-
[BREAKING] Register not return status 201 instead of 200
|
|
539
|
+
---
|
|
499
540
|
|
|
500
|
-
|
|
541
|
+
## [5.0.0-alpha.7]
|
|
501
542
|
|
|
502
|
-
[
|
|
543
|
+
- **[UPDATE]** Deps update.
|
|
503
544
|
|
|
504
|
-
|
|
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
|
-
|
|
547
|
+
## [5.0.0-alpha.6]
|
|
516
548
|
|
|
517
|
-
[
|
|
549
|
+
- **[UPDATE]** Update internal documentation (`jsdoc`, `d.ts`).
|
|
518
550
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
[
|
|
522
|
-
|
|
523
|
-
|
|
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
|
-
|
|
538
|
-
[NEW] Rate limited middleware
|
|
1094
|
+
---
|
|
539
1095
|
|
|
540
|
-
|
|
1096
|
+
## [2.12.0]
|
|
541
1097
|
|
|
542
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1141
|
+
---
|
|
584
1142
|
|
|
585
|
-
[
|
|
586
|
-
[NEW] ability to pass parameters to middleware
|
|
1143
|
+
## [2.10.0]
|
|
587
1144
|
|
|
588
|
-
|
|
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
|
-
|
|
1181
|
+
## [2.8.3]
|
|
601
1182
|
|
|
602
|
-
|
|
1183
|
+
- **[FIX]** Update recovery email template.
|
|
603
1184
|
|
|
604
|
-
|
|
605
|
-
[FIX] fix auth nick
|
|
1185
|
+
---
|
|
606
1186
|
|
|
607
|
-
|
|
1187
|
+
## [2.8.2]
|
|
608
1188
|
|
|
609
|
-
[
|
|
1189
|
+
- **[FIX]** Update AUTH controller.
|
|
610
1190
|
|
|
611
|
-
|
|
1191
|
+
---
|
|
612
1192
|
|
|
613
|
-
[
|
|
1193
|
+
## [2.8.1]
|
|
614
1194
|
|
|
615
|
-
|
|
1195
|
+
- **[UPDATE]** Update deps.
|
|
1196
|
+
- **[FIX]** Update AUTH controller.
|
|
616
1197
|
|
|
617
|
-
|
|
1198
|
+
---
|
|
618
1199
|
|
|
619
|
-
|
|
1200
|
+
## [2.8.0]
|
|
620
1201
|
|
|
621
|
-
[
|
|
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
|
-
|
|
1208
|
+
---
|
|
624
1209
|
|
|
625
|
-
[
|
|
626
|
-
[FIX] update AUTH controller
|
|
1210
|
+
## [2.7.4]
|
|
627
1211
|
|
|
628
|
-
|
|
1212
|
+
- **[UPDATE]** Update deps.
|
|
629
1213
|
|
|
630
|
-
|
|
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
|
-
|
|
1216
|
+
## [2.7.3]
|
|
637
1217
|
|
|
638
|
-
[UPDATE]
|
|
1218
|
+
- **[UPDATE]** Replace `i18next-node-fs-backend` to `i18next-fs-backend` (drop in replacement).
|
|
639
1219
|
|
|
640
|
-
|
|
1220
|
+
---
|
|
641
1221
|
|
|
642
|
-
[
|
|
1222
|
+
## [2.7.2]
|
|
643
1223
|
|
|
644
|
-
|
|
1224
|
+
- **[UPDATE]** Update deps.
|
|
645
1225
|
|
|
646
|
-
|
|
1226
|
+
---
|
|
647
1227
|
|
|
648
|
-
|
|
1228
|
+
## [2.7.1]
|
|
649
1229
|
|
|
650
|
-
[REMOVE]
|
|
1230
|
+
- **[REMOVE]** Remove unused websocket.
|
|
651
1231
|
|
|
652
|
-
|
|
1232
|
+
---
|
|
653
1233
|
|
|
654
|
-
[
|
|
1234
|
+
## [2.7.0]
|
|
655
1235
|
|
|
656
|
-
|
|
1236
|
+
- **[UPDATE]** Change winston sentry transport.
|
|
657
1237
|
|
|
658
|
-
|
|
659
|
-
[UPDATE] optimize deps
|
|
1238
|
+
---
|
|
660
1239
|
|
|
661
|
-
|
|
1240
|
+
## [2.6.5]
|
|
662
1241
|
|
|
663
|
-
[UPDATE]
|
|
1242
|
+
- **[UPDATE]** Update deps.
|
|
1243
|
+
- **[UPDATE]** Optimize deps.
|
|
664
1244
|
|
|
665
|
-
|
|
1245
|
+
---
|
|
666
1246
|
|
|
667
|
-
[
|
|
668
|
-
[UPDATE] update handling exceptions loging
|
|
1247
|
+
## [2.6.4]
|
|
669
1248
|
|
|
670
|
-
|
|
1249
|
+
- **[UPDATE]** Update deps.
|
|
671
1250
|
|
|
672
|
-
|
|
1251
|
+
---
|
|
673
1252
|
|
|
674
|
-
|
|
1253
|
+
## [2.6.3]
|
|
675
1254
|
|
|
676
|
-
[
|
|
677
|
-
[UPDATE]
|
|
1255
|
+
- **[UPDATE]** Update deps.
|
|
1256
|
+
- **[UPDATE]** Update handling exceptions loging.
|
|
678
1257
|
|
|
679
|
-
|
|
1258
|
+
---
|
|
680
1259
|
|
|
681
|
-
[
|
|
682
|
-
[NEW]new cache system (alpha, subject of change)
|
|
1260
|
+
## [2.6.2]
|
|
683
1261
|
|
|
684
|
-
|
|
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
|
-
|
|
1264
|
+
---
|
|
696
1265
|
|
|
697
|
-
[
|
|
698
|
-
[FIX] fix error logging on unhadled rejection
|
|
1266
|
+
## [2.6.1]
|
|
699
1267
|
|
|
700
|
-
|
|
1268
|
+
- **[FIX]** Fix error on cache system.
|
|
1269
|
+
- **[UPDATE]** `stripUnknown=true` by default on casting.
|
|
701
1270
|
|
|
702
|
-
|
|
1271
|
+
---
|
|
703
1272
|
|
|
704
|
-
|
|
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
|
-
|
|
1323
|
+
---
|
|
730
1324
|
|
|
731
|
-
[
|
|
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
|
-
|
|
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
|
-
|
|
1331
|
+
---
|
|
738
1332
|
|
|
739
|
-
|
|
1333
|
+
## [2.4.3]
|
|
740
1334
|
|
|
741
|
-
[
|
|
742
|
-
[UPDATE] deps update
|
|
1335
|
+
- **[UPDATE]** Deps update.
|
|
743
1336
|
|
|
744
|
-
|
|
1337
|
+
---
|
|
745
1338
|
|
|
746
|
-
[
|
|
1339
|
+
## [2.4.2]
|
|
747
1340
|
|
|
748
|
-
|
|
1341
|
+
- **[FIX]** Abstract controlled middleware.
|
|
1342
|
+
- **[UPDATE]** Deps update.
|
|
749
1343
|
|
|
750
|
-
|
|
1344
|
+
---
|
|
751
1345
|
|
|
752
|
-
[
|
|
1346
|
+
## [2.4.1]
|
|
753
1347
|
|
|
754
|
-
|
|
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
|
-
|
|
1446
|
+
---
|
|
761
1447
|
|
|
762
|
-
[
|
|
1448
|
+
## [2.3.1]
|
|
763
1449
|
|
|
764
|
-
|
|
1450
|
+
- **[FIX]** Fix parsing token.
|
|
765
1451
|
|
|
766
|
-
|
|
767
|
-
[UPDATE] refactor CLI
|
|
1452
|
+
---
|
|
768
1453
|
|
|
769
|
-
|
|
1454
|
+
## [2.3.0]
|
|
770
1455
|
|
|
771
|
-
[
|
|
1456
|
+
- **[NEW]** `Migration/create` `migration/migrate` commands.
|
|
772
1457
|
|
|
773
|
-
|
|
1458
|
+
---
|
|
774
1459
|
|
|
775
|
-
[
|
|
1460
|
+
## [2.2.6]
|
|
776
1461
|
|
|
777
|
-
|
|
1462
|
+
- **[NEW]** CLI command receiving parsed arguments.
|
|
778
1463
|
|
|
779
|
-
|
|
780
|
-
[UPDATE] deps update
|
|
1464
|
+
---
|
|
781
1465
|
|
|
782
|
-
|
|
1466
|
+
## [2.2.5]
|
|
783
1467
|
|
|
784
|
-
[FIX]
|
|
1468
|
+
- **[FIX]** Fix disconnecting problems with replica set.
|
|
785
1469
|
|
|
786
|
-
|
|
1470
|
+
---
|
|
787
1471
|
|
|
788
|
-
[
|
|
1472
|
+
## [2.2.4]
|
|
789
1473
|
|
|
790
|
-
|
|
1474
|
+
- **[UPDATE]** Internal update for speed up cli init.
|
|
791
1475
|
|
|
792
|
-
|
|
793
|
-
[NEW] add 'global.testSetup.userCreate' function for testing
|
|
1476
|
+
---
|
|
794
1477
|
|
|
795
|
-
|
|
1478
|
+
## [2.2.3]
|
|
796
1479
|
|
|
797
|
-
[
|
|
798
|
-
[FIX] test fix
|
|
1480
|
+
- **[FIX]** Fix language detection.
|
|
799
1481
|
|
|
800
|
-
|
|
1482
|
+
---
|
|
801
1483
|
|
|
802
|
-
[
|
|
803
|
-
[UPDATE] deps update
|
|
1484
|
+
## [2.2.2]
|
|
804
1485
|
|
|
805
|
-
|
|
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
|
-
|
|
808
|
-
[UPDATE] deps update
|
|
1489
|
+
---
|
|
809
1490
|
|
|
810
|
-
|
|
1491
|
+
## [2.2.1]
|
|
811
1492
|
|
|
812
|
-
[UPDATE]
|
|
1493
|
+
- **[UPDATE]** Deps update.
|
|
813
1494
|
|
|
814
|
-
|
|
1495
|
+
---
|
|
815
1496
|
|
|
816
|
-
[
|
|
1497
|
+
## [2.2.0]
|
|
817
1498
|
|
|
818
|
-
|
|
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
|
-
|
|
1506
|
+
---
|
|
821
1507
|
|
|
822
|
-
|
|
1508
|
+
## [2.1.2]
|
|
823
1509
|
|
|
824
|
-
[
|
|
1510
|
+
- **[UPDATE]** Disconnect of mongoose when command was finished.
|
|
825
1511
|
|
|
826
|
-
|
|
1512
|
+
---
|
|
827
1513
|
|
|
828
|
-
[
|
|
1514
|
+
## [2.1.1]
|
|
829
1515
|
|
|
830
|
-
|
|
1516
|
+
- **[UPDATE]** Deps update.
|
|
831
1517
|
|
|
832
|
-
|
|
1518
|
+
---
|
|
833
1519
|
|
|
834
|
-
|
|
1520
|
+
## [2.1.0]
|
|
835
1521
|
|
|
836
|
-
[
|
|
1522
|
+
- **[DEV]** Added codestyle checker.
|
|
1523
|
+
- **[NEW]** Initial CLI module.
|
|
837
1524
|
|
|
838
|
-
|
|
1525
|
+
---
|
|
839
1526
|
|
|
840
|
-
[
|
|
1527
|
+
## [2.0.2]
|
|
841
1528
|
|
|
842
|
-
|
|
1529
|
+
- **[UPDATE]** Socket.io v3.
|
|
1530
|
+
- **[UPDATE]** Deps update.
|
|
843
1531
|
|
|
844
|
-
|
|
845
|
-
[NEW] add config to configure language detecting order and types
|
|
1532
|
+
---
|
|
846
1533
|
|
|
847
|
-
|
|
1534
|
+
## [2.0.1]
|
|
848
1535
|
|
|
849
|
-
[
|
|
1536
|
+
- **[NEW]** Added config to websocket.
|
|
850
1537
|
|
|
851
|
-
|
|
1538
|
+
---
|
|
852
1539
|
|
|
853
|
-
[
|
|
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
|
-
|
|
1542
|
+
- **[BREAKING]** Change config format of log config. Now configs can be only objects.
|
|
861
1543
|
|
|
862
|
-
|
|
1544
|
+
---
|
|
863
1545
|
|
|
864
|
-
|
|
1546
|
+
## [1.5.0]
|
|
865
1547
|
|
|
866
|
-
[
|
|
1548
|
+
- **[NEW]** Support for environment configs (`config.js` and `config.{NODE_ENV}.js`) with overwrite.
|
|
1549
|
+
- **[UPDATE]** Deps update.
|
|
867
1550
|
|
|
868
|
-
|
|
1551
|
+
---
|
|
869
1552
|
|
|
870
|
-
[
|
|
871
|
-
[NEW] Initial CLI module
|
|
1553
|
+
## [1.4.0]
|
|
872
1554
|
|
|
873
|
-
|
|
1555
|
+
- **[NEW]** Ability to pass additional parameter to server that will be executed before adding page 404.
|
|
874
1556
|
|
|
875
|
-
|
|
876
|
-
[UPDATE] deps update
|
|
1557
|
+
---
|
|
877
1558
|
|
|
878
|
-
|
|
1559
|
+
## [1.3.0]
|
|
879
1560
|
|
|
880
|
-
[NEW]
|
|
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
|
-
|
|
1563
|
+
---
|
|
883
1564
|
|
|
884
|
-
[
|
|
1565
|
+
## [1.2.9]
|
|
885
1566
|
|
|
886
|
-
|
|
1567
|
+
- **[UPDATE]** Update deps.
|
|
887
1568
|
|
|
888
|
-
|
|
889
|
-
[UPDATE] deps update
|
|
1569
|
+
---
|
|
890
1570
|
|
|
891
|
-
|
|
1571
|
+
## [1.2.8]
|
|
892
1572
|
|
|
893
|
-
|
|
1573
|
+
- **[UPDATE]** Update deps.
|
|
894
1574
|
|
|
895
|
-
|
|
1575
|
+
---
|
|
896
1576
|
|
|
897
|
-
|
|
1577
|
+
## [1.2.7]
|
|
898
1578
|
|
|
899
|
-
|
|
1579
|
+
- **[NEW]** Add abilty to return error from custom validation functions.
|
|
900
1580
|
|
|
901
|
-
|
|
1581
|
+
---
|
|
902
1582
|
|
|
903
|
-
|
|
1583
|
+
## [1.2.6]
|
|
904
1584
|
|
|
905
|
-
|
|
1585
|
+
- **[UPDATE]** Validator documentation (jsdoc) update.
|
|
1586
|
+
- **[UPDATE]** Validator support pass parameters to validator.
|
|
906
1587
|
|
|
907
|
-
|
|
1588
|
+
---
|
|
908
1589
|
|
|
909
|
-
|
|
1590
|
+
## [1.2.5]
|
|
910
1591
|
|
|
911
|
-
|
|
1592
|
+
- **[FIX]** Fix problem with test (user should be global on tests).
|
|
912
1593
|
|
|
913
|
-
|
|
914
|
-
Validator support pass parameters to validator
|
|
1594
|
+
---
|
|
915
1595
|
|
|
916
|
-
|
|
1596
|
+
## [1.2.4]
|
|
917
1597
|
|
|
918
|
-
|
|
1598
|
+
- **[NEW]** Add eslint.
|
|
1599
|
+
- **[UPDATE]** Code refactor.
|
|
919
1600
|
|
|
920
|
-
|
|
1601
|
+
---
|
|
921
1602
|
|
|
922
|
-
|
|
923
|
-
Code refactor
|
|
1603
|
+
## [1.2.3]
|
|
924
1604
|
|
|
925
|
-
|
|
1605
|
+
- **[NEW]** Add prettier.
|
|
1606
|
+
- **[UPDATE]** Code reformat.
|
|
926
1607
|
|
|
927
|
-
|
|
928
|
-
Code reformat
|
|
1608
|
+
---
|
|
929
1609
|
|
|
930
|
-
|
|
1610
|
+
## [1.2.2]
|
|
931
1611
|
|
|
932
|
-
Update deps
|
|
1612
|
+
- **[UPDATE]** Update deps.
|