@adaptivestone/framework 5.0.0-beta.21 → 5.0.0-beta.23
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 +953 -609
- package/dist/modules/BaseModel.d.ts +11 -3
- package/dist/modules/BaseModel.js.map +1 -1
- 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 -2
- package/dist/tests/globalSetupVitest.js.map +1 -1
- package/dist/tests/setupVitest.js +35 -43
- package/dist/tests/setupVitest.js.map +1 -1
- package/dist/tests/testHelpers.d.ts +14 -0
- package/dist/tests/testHelpers.js +50 -0
- package/dist/tests/testHelpers.js.map +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,643 +1,866 @@
|
|
|
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]
|
|
2
9
|
|
|
3
10
|
This is a big release that contains a lot of new features and breaking changes.
|
|
4
11
|
Main feature of that release is full TypeScript support insluding mongoose models.
|
|
5
12
|
|
|
6
|
-
|
|
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
|
+
|
|
28
|
+
### Breaking changes (please read carefully)
|
|
29
|
+
|
|
30
|
+
- **[BREAKING]** All models now should be extended from `BaseModel`. This is a potencial breaking change specially for `User` model.
|
|
31
|
+
- **[BREAKING]** Remove jest support for testing.
|
|
32
|
+
- **[BREAKING]** Move email module to separate package `@adaptivestone/framework-module-email`. Please use it if you want to send emails.
|
|
33
|
+
- **[BREAKING]** Remove `VIEWS` folders at all. Should not affect any user as this was not used internally.
|
|
34
|
+
- **[BREAKING]** Removed `noidemailer-sendmail-transport`. Not needed anymore and not recommended to use as well.
|
|
35
|
+
- **[BREAKING]** Remove `minimist` CLI parsing and replace it by `commandArguments` parser.
|
|
36
|
+
- **[BREAKING]** `vitest` v3 <https://vitest.dev/guide/migration.html>.
|
|
37
|
+
- **[BREAKING]** `i18next` v24 <https://www.i18next.com/misc/migration-guide#v23.x.x-to-v24.0.0>.
|
|
38
|
+
- **[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>.
|
|
39
|
+
- **[BREAKING]** As part of express 5 migration `_` in rotes (middlewares) should have perameter. please replace `_` to `*splat`.
|
|
40
|
+
- **[BREAKING]** Default auth responce changed to be unified. `{token, user}` => `{data:{token, user}}`.
|
|
41
|
+
- **[BREAKING]** `RateLimiter` now need to have `IpDetector` middleware before.
|
|
42
|
+
- **[BREAKING]** Removing `staticFiles` middleware as it not used in projects anymore. Docs with nginx config will be provided.
|
|
43
|
+
- **[BREAKING]** Remove default `AUTH_SALT`. It should be provided on a app level now.
|
|
44
|
+
- **[BREAKING]** Minimum node version is 20.12 as for now (`process.loadEnvFile`).
|
|
45
|
+
- **[BREAKING]** ESM only. No more commonJS. That help to fix a lot of bugs with tests and provides better development expirience.
|
|
46
|
+
- **[BREAKING]** Mongoose v8. <https://mongoosejs.com/docs/migrating_to_8.html>.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## [5.0.0-beta.23]
|
|
51
|
+
|
|
52
|
+
- **[BREAKING]** No more global variables for testing and default user will not be created by default
|
|
53
|
+
- **[NEW]** Test helpers getTestServerURL, serverInstance, setDefaultUser, setDefaultAuthToken and createDefaultTestUser.
|
|
54
|
+
- **[DEPRECATION]** global usage in testing is deprecated
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## [5.0.0-beta.22]
|
|
59
|
+
|
|
60
|
+
- **[UPDATE]** Update types.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## [5.0.0-beta.21]
|
|
65
|
+
|
|
66
|
+
- **[FIX]** Fix bug with missed model options.
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## [5.0.0-beta.20]
|
|
71
|
+
|
|
72
|
+
- **[FIX]** Fix bug with `Lock` model index.
|
|
73
|
+
- **[NEW]** `BaseModel` add `Virtuals`.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## [5.0.0-beta.19]
|
|
78
|
+
|
|
79
|
+
- **[NEW]** Introducing new model type. `BaseModel`. Features - simplifie works with typescript. And based on statics.
|
|
80
|
+
- **[BREAKING]** All models now should be extended from `BaseModel`. This is a potencial breaking change specially for `User` model.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## [5.0.0-beta.18]
|
|
85
|
+
|
|
86
|
+
- **[UPDATE]** Move away connection from `mongooseModels` to server itself (preparation for different model types).
|
|
87
|
+
- **[BREAKING]** Potencial. We are removed callback from `mongooseModels` contrctuctor. It was not used in code.
|
|
88
|
+
- **[NEW]** Add `appInstance` helper to access app instance from anywhere without passing it.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## [5.0.0-beta.17]
|
|
93
|
+
|
|
94
|
+
- **[NEW]** Add `GenerateTypes` command.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## [5.0.0-beta.16]
|
|
99
|
+
|
|
100
|
+
- **[UPDATE]** Update deps.
|
|
101
|
+
- **[UPDATE]** New app getter `internalFilesCache`.
|
|
102
|
+
- **[UPDATE]** Command new static props to load `isShouldGetModelPaths`.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## [5.0.0-beta.15]
|
|
107
|
+
|
|
108
|
+
- **[FIX]** Fix missing folder `migrations` in `dist` folder (hope that will be finally).
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## [5.0.0-beta.14]
|
|
113
|
+
|
|
114
|
+
- **[FIX]** Fix missing folder `migrations` in `dist` folder.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## [5.0.0-beta.13]
|
|
119
|
+
|
|
120
|
+
- **[UPDATE]** Only process `.ts` or `.js` files (not `.map` files).
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## [5.0.0-beta.12]
|
|
125
|
+
|
|
126
|
+
- **[BREAKING]** Remove jest support for testing.
|
|
127
|
+
- **[NEW]** Initial move to typescript. Potencially breaking.
|
|
128
|
+
- **[NEW]** Introduce `src` and `dist` folders.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## [5.0.0-beta.11]
|
|
133
|
+
|
|
134
|
+
- **[NEW]** Commands typing.
|
|
135
|
+
- **[NEW]** Commands support TS files.
|
|
136
|
+
- **[UPDATE]** Update deps.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## [5.0.0-beta.9]
|
|
141
|
+
|
|
142
|
+
- **[BREAKING]** Move email module to separate package `@adaptivestone/framework-module-email`. Please use it if you want to send emails.
|
|
143
|
+
- **[NEW]** App now contains `frameworkFolder` folder the framework located. Mostly for modules usage.
|
|
144
|
+
- **[BREAKING]** Remove `VIEWS` folders at all. Should not afffect any user as this was not used internally.
|
|
145
|
+
- **[UPDATE]** Update typing.
|
|
146
|
+
- **[UPDATE]** Change `redis` -> `@redis/client` as we are using only client from pakage.
|
|
147
|
+
- **[BREAKING]** Removed `noidemailer-sendmail-transport`. Not needed anymore and not recommended to use as well.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## [5.0.0-beta.8]
|
|
152
|
+
|
|
153
|
+
- **[UPDATE]** Update deps.
|
|
154
|
+
- **[NEW]** `Lock` model for working locks via mongoDB.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## [5.0.0-beta.7]
|
|
159
|
+
|
|
160
|
+
- **[UPDATE]** Update deps.
|
|
161
|
+
- **[UPDATE]** Change `vitest` shutdown behavior as mongo driver v6.13 change befaviur that affect us (`MongoClient.close` now closes any outstanding cursors).
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## [5.0.0-beta.5]
|
|
166
|
+
|
|
167
|
+
- **[BREAKING]** Remove `minimist` CLI parsing and replace it by `commandArguments` parser.
|
|
168
|
+
- **[UPDATE]** Migrated from `eslint-plugin-import` to `eslint-plugin-import-x`.
|
|
169
|
+
- **[UPDATE]** Migrate to eslint 9 and away from aibnb styles (they are abonded).
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## [5.0.0-beta.4]
|
|
174
|
+
|
|
175
|
+
- **[NEW]** On shutdown event now after timeout we are forcing to shutdown.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## [5.0.0-beta.2]
|
|
180
|
+
|
|
181
|
+
- **[UPDATE]** Update deps.
|
|
182
|
+
- **[NEW]** Add ability to skip mongo model init in CLI env.
|
|
183
|
+
- **[NEW]** Now each mongo connection on CLI have own name and inslude command name there too (`getMongoConnectionName` in command).
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## [5.0.0-beta.1]
|
|
188
|
+
|
|
189
|
+
- **[UPDATE]** Update deps.
|
|
190
|
+
- **[BREAKING]** `vitest` v3 <https://vitest.dev/guide/migration.html>.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## [5.0.0-alpha.26]
|
|
195
|
+
|
|
196
|
+
- **[UPDATE]** Update deps.
|
|
197
|
+
- **[UPDATE]** New commands view in CLI.
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## [5.0.0-alpha.24]
|
|
202
|
+
|
|
203
|
+
- **[UPDATE]** Update deps.
|
|
204
|
+
- **[BREAKING]** `i18next` v24 <https://www.i18next.com/misc/migration-guide#v23.x.x-to-v24.0.0>.
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## [5.0.0-alpha.23]
|
|
209
|
+
|
|
210
|
+
- **[UPDATE]** Update deps.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## [5.0.0-alpha.22]
|
|
215
|
+
|
|
216
|
+
- **[UPDATE]** Update deps.
|
|
217
|
+
- **[FIX]** Fix optional routing parameters.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## [5.0.0-alpha.21]
|
|
222
|
+
|
|
223
|
+
- **[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>.
|
|
224
|
+
- **[BREAKING]** As part of express 5 migration `_` in rotes (middlewares) should have perameter. please replace `_` to `*splat`.
|
|
225
|
+
- **[UPDATE]** Update deps.
|
|
226
|
+
- **[UPDATE]** Mailer uses `await import()` for startup speedup.
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## [5.0.0-alpha.20]
|
|
231
|
+
|
|
232
|
+
- **[UPDATE]** Update deps.
|
|
233
|
+
- **[UPDATE]** `#realLogger` do not throw error in a scecific cases (`model.toJSON({virtual:true})`).
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## [5.0.0-alpha.19]
|
|
238
|
+
|
|
239
|
+
- **[NEW]** Added `modelSchemaOptions` for models.
|
|
7
240
|
|
|
8
|
-
|
|
9
|
-
[NEW] New model type: BaseModel, simplifying work with TypeScript and based on statics.
|
|
10
|
-
[NEW] AppInstance helper to access the app instance from anywhere without passing it.
|
|
11
|
-
[NEW] GenerateTypes command added.
|
|
12
|
-
[NEW] Lock model for working with locks via MongoDB.
|
|
13
|
-
[NEW] FrameworkFolder folder added to the app for module usage.
|
|
14
|
-
[NEW] Ability to skip Mongo model initialization in CLI environments.
|
|
15
|
-
[NEW] Mongo connections in CLI now have unique names, including the command name.
|
|
16
|
-
[NEW] On shutdown event, force shutdown after a timeout.
|
|
17
|
-
[NEW] GenerateRandomBytes command added.
|
|
18
|
-
[NEW] IpDetector middleware for detecting proxies and X-Forwarded-For headers.
|
|
241
|
+
---
|
|
19
242
|
|
|
20
|
-
|
|
243
|
+
## [5.0.0-alpha.18]
|
|
21
244
|
|
|
22
|
-
[BREAKING]
|
|
23
|
-
[
|
|
24
|
-
[BREAKING] move email module to separate package @adaptivestone/framework-module-email. Please use it if you want to send emails
|
|
25
|
-
[BREAKING] remove VIEWS folders at all. Should not afffect any user as this was not used internally
|
|
26
|
-
[BREAKING] removed noidemailer-sendmail-transport. Not needed anymore and not recommended to use as well
|
|
27
|
-
[BREAKING] remove minimist CLI parsing and replace it by commandArguments parser
|
|
28
|
-
[BREAKING] vitest v3 https://vitest.dev/guide/migration.html
|
|
29
|
-
[BREAKING] i18next v24 https://www.i18next.com/misc/migration-guide#v23.x.x-to-v24.0.0
|
|
30
|
-
[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.
|
|
31
|
-
[BREAKING] AS part of express 5 migration _ in rotes (middlewares) should have perameter. please replace _ to \*splat
|
|
32
|
-
[BREAKING] default auth responce changed to be unified. {token, user} = > {data:{token, user}}
|
|
33
|
-
[BREAKING] RateLimiter now need to have IpDetector middleware before
|
|
34
|
-
[BREAKING] removing staticFiles middleware as it not used in projects anymore. Docs with nginx config will be provided
|
|
35
|
-
[BREAKING] remove default AUTH_SALT. It should be provided on a app level now
|
|
36
|
-
[BREAKING] Minimum node version is 20.12 as for now (process.loadEnvFile)
|
|
37
|
-
[BREAKING] ESM only. No more commonJS. That help to fix a lot of bugs with tests and provides better development expirience
|
|
38
|
-
[BREAKING] Mongoose v8. https://mongoosejs.com/docs/migrating_to_8.html
|
|
245
|
+
- **[BREAKING]** Default auth responce changed to be unified. `{token, user}` => `{data:{token, user}}`.
|
|
246
|
+
- **[UPDATE]** `RateLimiter` updae key generation.
|
|
39
247
|
|
|
40
|
-
|
|
248
|
+
---
|
|
41
249
|
|
|
42
|
-
[
|
|
250
|
+
## [5.0.0-alpha.17]
|
|
43
251
|
|
|
44
|
-
|
|
252
|
+
- **[NEW]** `generateRandomBytes` command.
|
|
253
|
+
- **[UPDATE]** Update deps.
|
|
45
254
|
|
|
46
|
-
|
|
47
|
-
[NEW] BaseModel add Virtuals
|
|
255
|
+
---
|
|
48
256
|
|
|
49
|
-
|
|
257
|
+
## [5.0.0-alpha.16]
|
|
50
258
|
|
|
51
|
-
[
|
|
52
|
-
[
|
|
259
|
+
- **[UPDATE]** No warning of direct usage `body` and `query`.
|
|
260
|
+
- **[UPDATE]** Update deps.
|
|
53
261
|
|
|
54
|
-
|
|
262
|
+
---
|
|
55
263
|
|
|
56
|
-
[
|
|
57
|
-
[BREAKING] potencial. We are removed callback from mongooseModels contrctuctor. It was not used in code.
|
|
58
|
-
[NEW] add appInstance helper to access app instance from anywhere without passing it
|
|
264
|
+
## [5.0.0-alpha.15]
|
|
59
265
|
|
|
60
|
-
|
|
266
|
+
- **[BUG]** Fix bug with pagination.
|
|
267
|
+
- **[UPDATE]** Update deps.
|
|
61
268
|
|
|
62
|
-
|
|
269
|
+
---
|
|
63
270
|
|
|
64
|
-
|
|
271
|
+
## [5.0.0-alpha.14]
|
|
65
272
|
|
|
66
|
-
[
|
|
67
|
-
[UPDATE] new app getter internalFilesCache
|
|
68
|
-
[UPDATE] command new static props to load isShouldGetModelPaths
|
|
273
|
+
- **[NEW]** Add types for `Abstract` model (wip).
|
|
69
274
|
|
|
70
|
-
|
|
275
|
+
---
|
|
71
276
|
|
|
72
|
-
[
|
|
277
|
+
## [5.0.0-alpha.13]
|
|
73
278
|
|
|
74
|
-
|
|
279
|
+
- **[UPDATE]** Update deps.
|
|
280
|
+
- **[UPDATE]** Update `i18n` internal implementation.
|
|
281
|
+
- **[CHANGE]** Disable https server view.
|
|
75
282
|
|
|
76
|
-
|
|
283
|
+
---
|
|
77
284
|
|
|
78
|
-
|
|
285
|
+
## [5.0.0-alpha.12]
|
|
79
286
|
|
|
80
|
-
[UPDATE]
|
|
287
|
+
- **[UPDATE]** Update deps.
|
|
81
288
|
|
|
82
|
-
|
|
289
|
+
---
|
|
83
290
|
|
|
84
|
-
[
|
|
85
|
-
[NEW] initial move to typescript. Potencially breaking.
|
|
86
|
-
[NEW] introduce src and dist folders
|
|
291
|
+
## [5.0.0-alpha.11]
|
|
87
292
|
|
|
88
|
-
|
|
293
|
+
- **[UPDATE]** Update deps.
|
|
89
294
|
|
|
90
|
-
|
|
91
|
-
[NEW] commands support TS files
|
|
92
|
-
[UPDATE] update deps
|
|
295
|
+
---
|
|
93
296
|
|
|
94
|
-
|
|
297
|
+
## [5.0.0-alpha.10]
|
|
95
298
|
|
|
96
|
-
[
|
|
97
|
-
[NEW]
|
|
98
|
-
[BREAKING]
|
|
99
|
-
[UPDATE] update typing
|
|
100
|
-
[UPDATE] change redis -> @redis/client as we are using only client from pakage
|
|
101
|
-
[BREAKING] removed noidemailer-sendmail-transport. Not needed anymore and not recommended to use as well
|
|
299
|
+
- **[UPDATE]** Update deps.
|
|
300
|
+
- **[NEW]** `IpDetector` middleware that support detecting proxy and `X-Forwarded-For` header.
|
|
301
|
+
- **[BREAKING]** `RateLimiter` now need to have `IpDetector` middleware before.
|
|
102
302
|
|
|
103
|
-
|
|
303
|
+
---
|
|
104
304
|
|
|
105
|
-
[
|
|
106
|
-
[NEW] Lock model for working locks via mongoDB
|
|
305
|
+
## [5.0.0-alpha.9]
|
|
107
306
|
|
|
108
|
-
|
|
307
|
+
- **[UPDATE]** Update deps.
|
|
308
|
+
- **[BREAKING]** Removing `staticFiles` middleware as it not used in projects anymore. Docs with nginx config will be provided.
|
|
309
|
+
- **[BREAKING]** Remove default `AUTH_SALT`. It should be provided on a app level now.
|
|
310
|
+
- **[BREAKING]** Vitest 2.0.0 <https://vitest.dev/guide/migration.html#migrating-to-vitest-2-0>.
|
|
109
311
|
|
|
110
|
-
|
|
111
|
-
[UPDATE] change vitest shutdown behavior as mongo driver v6.13 change befaviur that affect us (MongoClient.close now closes any outstanding cursors)
|
|
312
|
+
---
|
|
112
313
|
|
|
113
|
-
|
|
314
|
+
## [5.0.0-alpha.8]
|
|
114
315
|
|
|
115
|
-
[
|
|
116
|
-
[UPDATE]
|
|
316
|
+
- **[UPDATE]** Replace `dotenv` with `loadEnvFile`.
|
|
317
|
+
- **[UPDATE]** Replace `nodemon` with `node --watch` (dev only).
|
|
318
|
+
- **[BREAKING]** Minimum node version is 20.12 as for now (`process.loadEnvFile`).
|
|
117
319
|
|
|
118
|
-
|
|
320
|
+
---
|
|
119
321
|
|
|
120
|
-
[
|
|
322
|
+
## [5.0.0-alpha.7]
|
|
121
323
|
|
|
122
|
-
|
|
324
|
+
- **[UPDATE]** Deps update.
|
|
123
325
|
|
|
124
|
-
|
|
326
|
+
---
|
|
125
327
|
|
|
126
|
-
|
|
328
|
+
## [5.0.0-alpha.6]
|
|
127
329
|
|
|
128
|
-
[UPDATE]
|
|
129
|
-
[NEW] add ability to skip mongo model init in CLI env
|
|
130
|
-
[NEW] now each mongo connection on CLI have own name and inslude command name there too (getMongoConnectionName in command)
|
|
330
|
+
- **[UPDATE]** Update internal documentation (`jsdoc`, `d.ts`).
|
|
131
331
|
|
|
132
|
-
|
|
332
|
+
---
|
|
133
333
|
|
|
134
|
-
[
|
|
135
|
-
[BREAKING] vitest v3 https://vitest.dev/guide/migration.html
|
|
334
|
+
## [5.0.0-alpha.5]
|
|
136
335
|
|
|
137
|
-
|
|
336
|
+
- **[UPDATE]** More verbose errors for rapsing body request.
|
|
337
|
+
- **[UPDATE]** Deps update.
|
|
138
338
|
|
|
139
|
-
|
|
140
|
-
[UPDATE] new commands view in CLI
|
|
339
|
+
---
|
|
141
340
|
|
|
142
|
-
|
|
341
|
+
## [5.0.0-alpha.4]
|
|
143
342
|
|
|
144
|
-
[UPDATE]
|
|
145
|
-
[
|
|
343
|
+
- **[UPDATE]** Update `rate-limiter-flexible` to v5.
|
|
344
|
+
- **[CHANGE]** Cache update `redis.setEX` to `redis.set(..,..,{EX:xx})` as `setEX` deprecated.
|
|
146
345
|
|
|
147
|
-
|
|
346
|
+
---
|
|
148
347
|
|
|
149
|
-
[
|
|
348
|
+
## [5.0.0-alpha.3]
|
|
150
349
|
|
|
151
|
-
|
|
350
|
+
- **[UPDATE]** Deps update.
|
|
351
|
+
- **[FIX]** `Migration` commands apply.
|
|
152
352
|
|
|
153
|
-
|
|
154
|
-
[FIX] fix optional routing parameters
|
|
353
|
+
---
|
|
155
354
|
|
|
156
|
-
|
|
355
|
+
## [5.0.0-alpha.2]
|
|
157
356
|
|
|
158
|
-
[
|
|
159
|
-
[BREAKING] AS part of express 5 migration _ in rotes (middlewares) should have perameter. please replace _ to \*splat
|
|
160
|
-
[UPDATE] update deps
|
|
161
|
-
[UPDATE] Mailer uses await import() for startup speedup
|
|
357
|
+
- **[UPDATE]** Deps update.
|
|
162
358
|
|
|
163
|
-
|
|
359
|
+
---
|
|
164
360
|
|
|
165
|
-
[
|
|
166
|
-
[UPDATE] #realLogger do not throw error in a scecific cases (model toJSON({virtual:true}))
|
|
361
|
+
## [5.0.0-alpha.1]
|
|
167
362
|
|
|
168
|
-
|
|
363
|
+
- **[BREAKING]** Vitest 1.0.0 <https://vitest.dev/guide/migration.html#migrating-from-vitest-0-34-6>.
|
|
364
|
+
- **[BREAKING]** ESM only. No more commonJS. That help to fix a lot of bugs with tests and provides better development expirience.
|
|
365
|
+
- **[BREAKING]** Mongoose v8. <https://mongoosejs.com/docs/migrating_to_8.html>.
|
|
169
366
|
|
|
170
|
-
|
|
367
|
+
---
|
|
171
368
|
|
|
172
|
-
|
|
369
|
+
## [4.11.4]
|
|
173
370
|
|
|
174
|
-
[
|
|
175
|
-
[UPDATE] RateLimiter updae key generation
|
|
371
|
+
- **[UPDATE]** Deps update.
|
|
176
372
|
|
|
177
|
-
|
|
373
|
+
---
|
|
178
374
|
|
|
179
|
-
[
|
|
180
|
-
[UPDATE] update deps
|
|
375
|
+
## [4.11.3]
|
|
181
376
|
|
|
182
|
-
|
|
377
|
+
- **[UPDATE]** Deps update.
|
|
183
378
|
|
|
184
|
-
|
|
185
|
-
[UPDATE] update deps
|
|
379
|
+
---
|
|
186
380
|
|
|
187
|
-
|
|
381
|
+
## [4.11.2]
|
|
188
382
|
|
|
189
|
-
[
|
|
190
|
-
[UPDATE] update deps
|
|
383
|
+
- **[FIX]** `Cors` middleware return proper headers on multidomains.
|
|
191
384
|
|
|
192
|
-
|
|
385
|
+
---
|
|
193
386
|
|
|
194
|
-
[
|
|
387
|
+
## [4.11.1]
|
|
195
388
|
|
|
196
|
-
|
|
389
|
+
- **[FIX]** `Cors` middleware return proper status.
|
|
197
390
|
|
|
198
|
-
|
|
199
|
-
[UPDATE] update i18n internal implementation
|
|
200
|
-
[CHANGE] disable https server view
|
|
391
|
+
---
|
|
201
392
|
|
|
202
|
-
|
|
393
|
+
## [4.11.0]
|
|
203
394
|
|
|
204
|
-
[
|
|
395
|
+
- **[NEW]** `Cors` middleware.
|
|
396
|
+
- **[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.
|
|
205
397
|
|
|
206
|
-
|
|
398
|
+
---
|
|
207
399
|
|
|
208
|
-
[
|
|
400
|
+
## [4.10.0]
|
|
209
401
|
|
|
210
|
-
|
|
402
|
+
- **[UPDATE]** Deps update.
|
|
403
|
+
- **[NEW]** Static file middleware.
|
|
404
|
+
- **[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.
|
|
211
405
|
|
|
212
|
-
|
|
213
|
-
[NEW] IpDetector middleware that support detecting proxy and X-Forwarded-For header
|
|
214
|
-
[BREAKING] RateLimiter now need to have IpDetector middleware before
|
|
406
|
+
---
|
|
215
407
|
|
|
216
|
-
|
|
408
|
+
## [4.9.2]
|
|
217
409
|
|
|
218
|
-
[UPDATE] update
|
|
219
|
-
[BREAKING] removing staticFiles middleware as it not used in projects anymore. Docs with nginx config will be provided
|
|
220
|
-
[BREAKING] remove default AUTH_SALT. It should be provided on a app level now
|
|
221
|
-
[BREAKING] Vitest 2.0.0 https://vitest.dev/guide/migration.html#migrating-to-vitest-2-0
|
|
410
|
+
- **[UPDATE]** Deps update.
|
|
222
411
|
|
|
223
|
-
|
|
412
|
+
---
|
|
224
413
|
|
|
225
|
-
[
|
|
226
|
-
[UPDATE] replace nodemon with node --watch (dev only)
|
|
227
|
-
[BREAKING] Minimum node version is 20.12 as for now (process.loadEnvFile)
|
|
414
|
+
## [4.9.1]
|
|
228
415
|
|
|
229
|
-
|
|
416
|
+
- **[UPDATE]** All responces from framework now happens in JSON. Previouls sometime aswers was in plan text.
|
|
230
417
|
|
|
231
|
-
|
|
418
|
+
---
|
|
232
419
|
|
|
233
|
-
|
|
420
|
+
## [4.9.0]
|
|
234
421
|
|
|
235
|
-
[
|
|
422
|
+
- **[BREAKING]** We are separated testsing to setyp and global setup. Global setup now care of mongo to make sure that only on mongodb memoery server is spinned up. If you are using `vitest` please add `"globalSetup": "node_modules/@adaptivestone/framework/tests/globalSetupVitest"` to your vitest config.
|
|
236
423
|
|
|
237
|
-
|
|
424
|
+
---
|
|
238
425
|
|
|
239
|
-
[
|
|
240
|
-
[UPDATE] deps update
|
|
426
|
+
## [4.8.3]
|
|
241
427
|
|
|
242
|
-
|
|
428
|
+
- **[UPDATE]** Fix problme with fat start and closing connections after.
|
|
243
429
|
|
|
244
|
-
|
|
245
|
-
[CHANGE] Cache update redis.setEX to redis.set(..,..,{EX:xx}) as setEX deprecated
|
|
430
|
+
---
|
|
246
431
|
|
|
247
|
-
|
|
432
|
+
## [4.8.2]
|
|
248
433
|
|
|
249
|
-
[UPDATE]
|
|
250
|
-
[FIX] Migration commands apply
|
|
434
|
+
- **[UPDATE]** CLI - disable mongoose index creation.
|
|
251
435
|
|
|
252
|
-
|
|
436
|
+
---
|
|
253
437
|
|
|
254
|
-
[
|
|
438
|
+
## [4.8.1]
|
|
255
439
|
|
|
256
|
-
|
|
440
|
+
- **[UPDATE]** Model inited on server inited.
|
|
441
|
+
- **[NEW]** New options to skip model init `isSkipModelInit`.
|
|
442
|
+
- **[NEW]** New method server method `initAllModels()`.
|
|
257
443
|
|
|
258
|
-
|
|
259
|
-
[BREAKING] ESM only. No more commonJS. That help to fix a lot of bugs with tests and provides better development expirience
|
|
260
|
-
[BREAKING] Mongoose v8. https://mongoosejs.com/docs/migrating_to_8.html
|
|
444
|
+
---
|
|
261
445
|
|
|
262
|
-
|
|
446
|
+
## [4.8.0]
|
|
263
447
|
|
|
264
|
-
[
|
|
448
|
+
- **[BREAKING]** Minimum node js version id 18.17.0 now.
|
|
449
|
+
- **[BREAKING]** Removed `getFileWithExtendingInhirence`. This was internal method and not suppose to use externally.
|
|
450
|
+
- **[UPDATE]** Update `Base.getFilesPathWithInheritance` to use `fs.read` dir resursive option.
|
|
451
|
+
- **[UPDATE]** Update cache (refactor+tets).
|
|
452
|
+
- **[UPDATE]** Update config and model inits.
|
|
265
453
|
|
|
266
|
-
|
|
454
|
+
---
|
|
267
455
|
|
|
268
|
-
[
|
|
456
|
+
## [4.7.0]
|
|
269
457
|
|
|
270
|
-
|
|
458
|
+
- **[UPDATE]** Update logger init (refactor).
|
|
459
|
+
- **[UPDATE]** Updated deps.
|
|
271
460
|
|
|
272
|
-
|
|
461
|
+
---
|
|
273
462
|
|
|
274
|
-
|
|
463
|
+
## [4.6.0]
|
|
275
464
|
|
|
276
|
-
[
|
|
465
|
+
- **[NEW]** Migrated from JEST to `vitest`.
|
|
277
466
|
|
|
278
|
-
|
|
467
|
+
---
|
|
279
468
|
|
|
280
|
-
[
|
|
281
|
-
[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
|
|
469
|
+
## [4.5.0]
|
|
282
470
|
|
|
283
|
-
|
|
471
|
+
- **[NEW]** Now `getSuper()` available as a method on mongoose models.
|
|
472
|
+
- **[UPDATE]** Update `rate-limiter-flexible` to v3.
|
|
473
|
+
- **[UPDATE]** Update test runner to suport ESM. In case problem with test please copy `babel.config.js` from framework to your project directory.
|
|
284
474
|
|
|
285
|
-
|
|
286
|
-
[NEW] Static file middleware
|
|
287
|
-
[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
|
|
475
|
+
---
|
|
288
476
|
|
|
289
|
-
|
|
477
|
+
## [4.4.0]
|
|
290
478
|
|
|
291
|
-
[
|
|
479
|
+
- **[NEW]** New method to grab url of server it testing enviroument `global.server.testingGetUrl("/some/endpoint")`.
|
|
292
480
|
|
|
293
|
-
|
|
481
|
+
---
|
|
294
482
|
|
|
295
|
-
[
|
|
483
|
+
## [4.3.1]
|
|
296
484
|
|
|
297
|
-
|
|
485
|
+
- **[UPDATE]** `Yup` file validator update. As formidable now return all fields as an array.
|
|
298
486
|
|
|
299
|
-
|
|
487
|
+
---
|
|
300
488
|
|
|
301
|
-
|
|
489
|
+
## [4.3.0]
|
|
302
490
|
|
|
303
|
-
[
|
|
491
|
+
- **[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.
|
|
304
492
|
|
|
305
|
-
|
|
493
|
+
---
|
|
306
494
|
|
|
307
|
-
[
|
|
495
|
+
## [4.2.0]
|
|
308
496
|
|
|
309
|
-
|
|
497
|
+
- **[UPDATE]** Updated deps.
|
|
498
|
+
- **[NEW]** `CreateUser` cli command. Ability to update user by email or id.
|
|
310
499
|
|
|
311
|
-
|
|
312
|
-
[NEW] New options to skip model init isSkipModelInit
|
|
313
|
-
[NEW] New method server method initAllModels()
|
|
500
|
+
---
|
|
314
501
|
|
|
315
|
-
|
|
502
|
+
## [4.1.0]
|
|
316
503
|
|
|
317
|
-
[
|
|
318
|
-
[
|
|
319
|
-
[UPDATE] update Base getFilesPathWithInheritance to use fs.read dir resursive option
|
|
320
|
-
[UPDATE] update cache (refactor+tets)
|
|
321
|
-
[UPDATE] update config and model inits
|
|
504
|
+
- **[UPDATE]** Updated deps.
|
|
505
|
+
- **[NEW]** Email - Ability to render templae to string for future usage.
|
|
322
506
|
|
|
323
|
-
|
|
507
|
+
---
|
|
324
508
|
|
|
325
|
-
[
|
|
326
|
-
[UPDATE] updated deps
|
|
509
|
+
## [4.0.0]
|
|
327
510
|
|
|
328
|
-
|
|
511
|
+
- **[BREAKING]** Change `bcrypt` encryption with `scrypt`.
|
|
512
|
+
- **[BREAKING]** Change internal express parser to `formidable` parser. Affect you if external `formidable` is used.
|
|
513
|
+
- **[BREAKING]** Should not affect any user. Changed `email-templates` module to internal implementation. Idea to keep dependensy list smaller.
|
|
514
|
+
- **[BREAKING]** Change `i18n` middleware to internal one. Nothing should be affected.
|
|
515
|
+
- **[BREAKING]** Now validation of request splitted between `request` and `query`.
|
|
516
|
+
- **[BREAKING]** `supportedLngs` option added to `i18n` config.
|
|
517
|
+
- **[BREAKING]** Email inliner now looking for `src/services/messaging/email/resources` folder instead of `build` folder.
|
|
518
|
+
- **[BREAKING]** Mongoose v7. <https://mongoosejs.com/docs/migrating_to_7.html>.
|
|
519
|
+
- **[BREAKING]** `Yup` validation was updated to v1 <https://github.com/jquense/yup/issues/1906>.
|
|
520
|
+
- **[DEPRECATED]** `getExpress` path is deprecated. Renamed to `getHttpPath`.
|
|
521
|
+
- **[NEW]** Pagination middleware.
|
|
522
|
+
- **[NEW]** `requestLogger` middleware. Migrated from core server to be an middleware.
|
|
523
|
+
- **[NEW]** `CreateUser` command.
|
|
524
|
+
- **[NEW]** Custom `yup` validator for validate File requests.
|
|
525
|
+
- **[UPDATE]** Updated deps.
|
|
526
|
+
- **[UPDATE]** `openApi` generator support files.
|
|
527
|
+
- **[UPDATE]** Updated `18n` middleware. Introduced internal cachce. Speed up of request processing up to 100%.
|
|
528
|
+
- **[UPDATE]** Cache drivers to JSON support `BigInt` numbers.
|
|
329
529
|
|
|
330
|
-
|
|
530
|
+
---
|
|
331
531
|
|
|
332
|
-
|
|
532
|
+
## [3.4.3]
|
|
333
533
|
|
|
334
|
-
[
|
|
335
|
-
[
|
|
336
|
-
[
|
|
534
|
+
- **[UPDATE]** Updated deps.
|
|
535
|
+
- **[FIX]** Fix tests for redis.
|
|
536
|
+
- **[FIX]** Support in tests `TEST_FOLDER_EMAILS`.
|
|
337
537
|
|
|
338
|
-
|
|
538
|
+
---
|
|
339
539
|
|
|
340
|
-
[
|
|
540
|
+
## [3.4.2]
|
|
341
541
|
|
|
342
|
-
|
|
542
|
+
- **[UPDATE]** Updated deps.
|
|
543
|
+
- **[FIX]** Fix documentation generation.
|
|
343
544
|
|
|
344
|
-
|
|
545
|
+
---
|
|
345
546
|
|
|
346
|
-
|
|
547
|
+
## [3.4.1]
|
|
347
548
|
|
|
348
|
-
[
|
|
549
|
+
- **[FIX]** Fix documentation generation.
|
|
349
550
|
|
|
350
|
-
|
|
551
|
+
---
|
|
351
552
|
|
|
352
|
-
[
|
|
353
|
-
[NEW] CreateUser cli command. Ability to update user by email or id.
|
|
553
|
+
## [3.4.0]
|
|
354
554
|
|
|
355
|
-
|
|
555
|
+
- **[NEW]** Now we pass `req` to validation and casting as a second parameter. This done mostly for custom validators.
|
|
356
556
|
|
|
357
|
-
|
|
358
|
-
[NEW] email - Ability to render templae to string for future usage
|
|
557
|
+
---
|
|
359
558
|
|
|
360
|
-
|
|
559
|
+
## [3.3.0]
|
|
361
560
|
|
|
362
|
-
[
|
|
363
|
-
[
|
|
364
|
-
[
|
|
365
|
-
[BREAKING] change i18n middleware to internal one. Nothing should be affected
|
|
366
|
-
[BREAKING] now validation of request splitted between request and query
|
|
367
|
-
[BREAKING] supportedLngs option added to i18n config
|
|
368
|
-
[BREAKING] email inliner now looking for src/services/messaging/email/resources folder instead of 'build' folder.
|
|
561
|
+
- **[NEW]** New command `SyncIndexes` to sync indexes for mongodb <https://framework.adaptivestone.com/docs/cli#syncindexes>.
|
|
562
|
+
- **[UPDATE]** Updated deps.
|
|
563
|
+
- **[FIX]** Fix documentation generation.
|
|
369
564
|
|
|
370
|
-
|
|
371
|
-
[BREAKING] Yup validation was updated to v1 https://github.com/jquense/yup/issues/1906
|
|
565
|
+
---
|
|
372
566
|
|
|
373
|
-
[
|
|
567
|
+
## [3.2.2]
|
|
374
568
|
|
|
375
|
-
[
|
|
376
|
-
[
|
|
377
|
-
[NEW] CreateUser command
|
|
378
|
-
[NEW] custom yup validator for validate File requests
|
|
379
|
-
[UPDATE] updated deps
|
|
380
|
-
[UPDATE] openApi generator support files
|
|
381
|
-
[UPDATE] updated 18n middleware. Introduced internal cachce. Speed up of request processing up to 100%
|
|
382
|
-
[UPDATE] cache drivers to JSON support BigInt numbers
|
|
569
|
+
- **[UPDATE]** Add options for `i18n` to config.
|
|
570
|
+
- **[CHANGE]** By default `i18n` not writing missed keys. Can be enabled via config.
|
|
383
571
|
|
|
384
|
-
|
|
572
|
+
---
|
|
385
573
|
|
|
386
|
-
[
|
|
387
|
-
[FIX] fix tests for redis
|
|
388
|
-
[FIX] support in tests TEST_FOLDER_EMAILS
|
|
574
|
+
## [3.2.1]
|
|
389
575
|
|
|
390
|
-
|
|
576
|
+
- **[UPDATE]** Updated deps.
|
|
577
|
+
- **[FIX]** Fix documentation generation.
|
|
391
578
|
|
|
392
|
-
|
|
393
|
-
[FIX] fix documentation generation
|
|
579
|
+
---
|
|
394
580
|
|
|
395
|
-
|
|
581
|
+
## [3.2.0]
|
|
396
582
|
|
|
397
|
-
[
|
|
583
|
+
- **[UPDATE]** Updated deps.
|
|
584
|
+
- **[NEW]** `cache.removeKey(key)` - function to remove key from cache.
|
|
398
585
|
|
|
399
|
-
|
|
586
|
+
---
|
|
400
587
|
|
|
401
|
-
[
|
|
588
|
+
## [3.1.1]
|
|
402
589
|
|
|
403
|
-
|
|
590
|
+
- **[UPDATE]** Updated deps.
|
|
591
|
+
- **[FIX]** Fix cache error handling.
|
|
404
592
|
|
|
405
|
-
|
|
406
|
-
[UPDATE] updated deps
|
|
407
|
-
[FIX] fix documentation generation
|
|
593
|
+
---
|
|
408
594
|
|
|
409
|
-
|
|
595
|
+
## [3.1.0]
|
|
410
596
|
|
|
411
|
-
[
|
|
412
|
-
[
|
|
597
|
+
- **[NEW]** New comand to generate open API documentation (wip).
|
|
598
|
+
- **[NEW]** Coverage report.
|
|
599
|
+
- **[UPDATE]** Updated deps.
|
|
413
600
|
|
|
414
|
-
|
|
601
|
+
---
|
|
415
602
|
|
|
416
|
-
[
|
|
417
|
-
[FIX] fix documentation generation
|
|
603
|
+
## [3.0.23]
|
|
418
604
|
|
|
419
|
-
|
|
605
|
+
- **[UPDATE]** Updated deps.
|
|
606
|
+
- **[FIX]** Fix custom errors.
|
|
420
607
|
|
|
421
|
-
|
|
422
|
-
[NEW] cache.removeKey(key) - function to remove key from cache
|
|
608
|
+
---
|
|
423
609
|
|
|
424
|
-
|
|
610
|
+
## [3.0.22]
|
|
425
611
|
|
|
426
|
-
[UPDATE]
|
|
427
|
-
[
|
|
612
|
+
- **[UPDATE]** Updated deps.
|
|
613
|
+
- **[UPDATE]** Cast function now can be ASYNC too.
|
|
428
614
|
|
|
429
|
-
|
|
615
|
+
---
|
|
430
616
|
|
|
431
|
-
[
|
|
432
|
-
[NEW] coverage report
|
|
433
|
-
[UPDATE] updated deps
|
|
617
|
+
## [3.0.21]
|
|
434
618
|
|
|
435
|
-
|
|
619
|
+
- **[UPDATE]** Updated redis to v4.
|
|
620
|
+
- **[NEW]** Updates tests to have own namespace on redis.
|
|
436
621
|
|
|
437
|
-
|
|
438
|
-
[FIX] fix custom errors
|
|
622
|
+
---
|
|
439
623
|
|
|
440
|
-
|
|
624
|
+
## [3.0.20]
|
|
441
625
|
|
|
442
|
-
[UPDATE]
|
|
443
|
-
[UPDATE] cast function now can be ASYNC too
|
|
626
|
+
- **[UPDATE]** Update deps.
|
|
444
627
|
|
|
445
|
-
|
|
628
|
+
---
|
|
446
629
|
|
|
447
|
-
[
|
|
448
|
-
[NEW] updates tests to have own namespace on redis
|
|
630
|
+
## [3.0.19]
|
|
449
631
|
|
|
450
|
-
|
|
632
|
+
- **[UPDATE]** Update deps.
|
|
451
633
|
|
|
452
|
-
|
|
634
|
+
---
|
|
453
635
|
|
|
454
|
-
|
|
636
|
+
## [3.0.18]
|
|
455
637
|
|
|
456
|
-
[UPDATE]
|
|
638
|
+
- **[UPDATE]** Update deps.
|
|
639
|
+
- **[UPDATE]** Change default branch to `main`.
|
|
457
640
|
|
|
458
|
-
|
|
641
|
+
---
|
|
459
642
|
|
|
460
|
-
[
|
|
461
|
-
[UPDATE] change default branch to 'main'
|
|
643
|
+
## [3.0.17]
|
|
462
644
|
|
|
463
|
-
|
|
645
|
+
- **[UPDATE]** Update deps.
|
|
464
646
|
|
|
465
|
-
|
|
647
|
+
---
|
|
466
648
|
|
|
467
|
-
|
|
649
|
+
## [3.0.16]
|
|
468
650
|
|
|
469
|
-
[UPDATE]
|
|
470
|
-
[FIX]
|
|
651
|
+
- **[UPDATE]** Update deps.
|
|
652
|
+
- **[FIX]** Fix bug with route level middleware.
|
|
471
653
|
|
|
472
|
-
|
|
654
|
+
---
|
|
473
655
|
|
|
474
|
-
[
|
|
475
|
-
[UPDATE] minimum node version 16
|
|
656
|
+
## [3.0.15]
|
|
476
657
|
|
|
477
|
-
|
|
658
|
+
- **[UPDATE]** Update deps.
|
|
659
|
+
- **[UPDATE]** Minimum node version 16.
|
|
478
660
|
|
|
479
|
-
|
|
480
|
-
[UPDATE] update deps
|
|
661
|
+
---
|
|
481
662
|
|
|
482
|
-
|
|
663
|
+
## [3.0.14]
|
|
483
664
|
|
|
484
|
-
[
|
|
665
|
+
- **[NEW]** Now possible to show all errors during validation (default one) by parameter `controllerValidationAbortEarly`.
|
|
666
|
+
- **[UPDATE]** Update deps.
|
|
485
667
|
|
|
486
|
-
|
|
668
|
+
---
|
|
487
669
|
|
|
488
|
-
[
|
|
489
|
-
[UPDATE] update deps
|
|
670
|
+
## [3.0.13]
|
|
490
671
|
|
|
491
|
-
|
|
672
|
+
- **[UPDATE]** Bug fix with "mergeParams".
|
|
492
673
|
|
|
493
|
-
|
|
674
|
+
---
|
|
494
675
|
|
|
495
|
-
|
|
676
|
+
## [3.0.12]
|
|
496
677
|
|
|
497
|
-
[
|
|
498
|
-
[
|
|
499
|
-
[NEW] config for mail now supports "EMAIL_TRANSPORT" env variable. SMTP by default (as was)
|
|
678
|
+
- **[NEW]** Ability to pass "mergeParams" options to express router.
|
|
679
|
+
- **[UPDATE]** Update deps.
|
|
500
680
|
|
|
501
|
-
|
|
681
|
+
---
|
|
502
682
|
|
|
503
|
-
[
|
|
683
|
+
## [3.0.11]
|
|
504
684
|
|
|
505
|
-
|
|
685
|
+
- **[UPDATE]** More verbose email error.
|
|
506
686
|
|
|
507
|
-
|
|
687
|
+
---
|
|
508
688
|
|
|
509
|
-
|
|
689
|
+
## [3.0.10]
|
|
510
690
|
|
|
511
|
-
[UPDATE]
|
|
512
|
-
[CHANGE]
|
|
691
|
+
- **[UPDATE]** Update deps.
|
|
692
|
+
- **[CHANGE]** Tests `afterAll` not using timeout anymore (conflict with jest 28-alpha).
|
|
693
|
+
- **[NEW]** Config for mail now supports "EMAIL_TRANSPORT" env variable. SMTP by default (as was).
|
|
513
694
|
|
|
514
|
-
|
|
695
|
+
---
|
|
515
696
|
|
|
516
|
-
[
|
|
697
|
+
## [3.0.9]
|
|
517
698
|
|
|
518
|
-
|
|
699
|
+
- **[UPDATE]** Update deps.
|
|
519
700
|
|
|
520
|
-
|
|
701
|
+
---
|
|
521
702
|
|
|
522
|
-
|
|
703
|
+
## [3.0.8]
|
|
523
704
|
|
|
524
|
-
[UPDATE]
|
|
705
|
+
- **[UPDATE]** Update deps.
|
|
525
706
|
|
|
526
|
-
|
|
707
|
+
---
|
|
527
708
|
|
|
528
|
-
[
|
|
709
|
+
## [3.0.7]
|
|
529
710
|
|
|
530
|
-
|
|
711
|
+
- **[UPDATE]** Update deps.
|
|
712
|
+
- **[CHANGE]** Change default `getConfig` method.
|
|
531
713
|
|
|
532
|
-
|
|
714
|
+
---
|
|
533
715
|
|
|
534
|
-
|
|
716
|
+
## [3.0.6]
|
|
535
717
|
|
|
536
|
-
[UPDATE]
|
|
537
|
-
[UPDATE] getUserByTokens more logs
|
|
718
|
+
- **[UPDATE]** Update deps.
|
|
538
719
|
|
|
539
|
-
|
|
720
|
+
---
|
|
540
721
|
|
|
541
|
-
|
|
542
|
-
Notable changes from migration
|
|
543
|
-
Removed `execPopulate()`[link](https://mongoosejs.com/docs/migrating_to_6.html#removed-execpopulate)
|
|
722
|
+
## [3.0.5]
|
|
544
723
|
|
|
545
|
-
|
|
546
|
-
// Document#populate() now returns a promise and is now no longer chainable.
|
|
724
|
+
- **[UPDATE]** Update deps.
|
|
547
725
|
|
|
548
|
-
|
|
549
|
-
await doc.populate('path1').populate('path2').execPopulate();
|
|
550
|
-
// with
|
|
551
|
-
await doc.populate(['path1', 'path2']);
|
|
552
|
-
//Replace
|
|
553
|
-
await doc
|
|
554
|
-
.populate('path1', 'select1')
|
|
555
|
-
.populate('path2', 'select2')
|
|
556
|
-
.execPopulate();
|
|
557
|
-
// with
|
|
558
|
-
await doc.populate([
|
|
559
|
-
{ path: 'path1', select: 'select1' },
|
|
560
|
-
{ path: 'path2', select: 'select2' },
|
|
561
|
-
]);
|
|
562
|
-
```
|
|
726
|
+
---
|
|
563
727
|
|
|
564
|
-
[
|
|
565
|
-
[REMOVED] removed deprecated someSecretSalt() on user model (use this.saltSecret instead)
|
|
566
|
-
[REMOVED] removed deprecated validate() on abstract controller and as result validator dependency. Use request validators instead
|
|
567
|
-
[REMOVED] removed deprecated isUseControllerNameForRouting() on abstract controller. Use getExpressPath() instead
|
|
568
|
-
[REMOVED] removed deprecated Base.loadFilesWithInheritance please use getFilesPathWithInheritance that produce almost the same output
|
|
569
|
-
[BREAKING] Removed "success" field on Auth contreoller. Please use http status instead
|
|
570
|
-
[BREAKING] Auth controller - "error" error responce renamed to "message"
|
|
728
|
+
## [3.0.4]
|
|
571
729
|
|
|
572
|
-
|
|
573
|
-
// Before
|
|
574
|
-
{
|
|
575
|
-
error: 'Some error';
|
|
576
|
-
}
|
|
577
|
-
// After
|
|
578
|
-
{
|
|
579
|
-
message: 'Some error';
|
|
580
|
-
}
|
|
581
|
-
```
|
|
730
|
+
- **[UPDATE]** Fix bug with app shutdown.
|
|
582
731
|
|
|
583
|
-
|
|
584
|
-
[UPDATE] winston console transport now using timestapms
|
|
585
|
-
[UPDATE] PrepareAppInfo middleware now a global one. Do not need to include it on every controller
|
|
586
|
-
[NEW] Request also works with req.query, but req.body have bigger priority
|
|
732
|
+
---
|
|
587
733
|
|
|
588
|
-
|
|
734
|
+
## [3.0.3]
|
|
589
735
|
|
|
590
|
-
[UPDATE]
|
|
591
|
-
[UPDATE] replace body-parser with express.json
|
|
592
|
-
[NEW] role middleware
|
|
736
|
+
- **[UPDATE]** Update deps.
|
|
593
737
|
|
|
594
|
-
|
|
738
|
+
---
|
|
595
739
|
|
|
596
|
-
[
|
|
597
|
-
[NEW] new env variable LOGGER_SENTRY_LEVEL (default=info)
|
|
598
|
-
[NEW] new env variable LOGGER_CONSOLE_ENABLE (default=true)
|
|
599
|
-
[BREAKING] on translation we changed i18next. Please convert files if you have plurals inside it https://i18next.github.io/i18next-v4-format-converter-web/
|
|
740
|
+
## [3.0.2]
|
|
600
741
|
|
|
601
|
-
|
|
742
|
+
- **[UPDATE]** Update deps.
|
|
602
743
|
|
|
603
|
-
|
|
604
|
-
[NEW] begin adding type script definitions
|
|
744
|
+
---
|
|
605
745
|
|
|
606
|
-
|
|
746
|
+
## [3.0.1]
|
|
607
747
|
|
|
608
|
-
[UPDATE]
|
|
609
|
-
[UPDATE]
|
|
748
|
+
- **[UPDATE]** Update deps.
|
|
749
|
+
- **[UPDATE]** `getUserByTokens` more logs.
|
|
610
750
|
|
|
611
|
-
|
|
751
|
+
---
|
|
612
752
|
|
|
613
|
-
[
|
|
614
|
-
[NEW] Ability to configure Auth flow with 'isAuthWithVefificationFlow' option.
|
|
615
|
-
[BREAKING] Register not return status 201 instead of 200
|
|
753
|
+
## [3.0.0]
|
|
616
754
|
|
|
617
|
-
|
|
755
|
+
- **[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).
|
|
756
|
+
Notable changes from migration
|
|
757
|
+
Removed `execPopulate()`[link](https://mongoosejs.com/docs/migrating_to_6.html#removed-execpopulate)
|
|
758
|
+
```js
|
|
759
|
+
// Document#populate() now returns a promise and is now no longer chainable.
|
|
760
|
+
//Replace
|
|
761
|
+
await doc.populate('path1').populate('path2').execPopulate();
|
|
762
|
+
// with
|
|
763
|
+
await doc.populate(['path1', 'path2']);
|
|
764
|
+
//Replace
|
|
765
|
+
await doc
|
|
766
|
+
.populate('path1', 'select1')
|
|
767
|
+
.populate('path2', 'select2')
|
|
768
|
+
.execPopulate();
|
|
769
|
+
// with
|
|
770
|
+
await doc.populate([
|
|
771
|
+
{ path: 'path1', select: 'select1' },
|
|
772
|
+
{ path: 'path2', select: 'select2' },
|
|
773
|
+
]);
|
|
774
|
+
```
|
|
775
|
+
- **[REMOVED]** Removed deprecated router handler string not allowed anymore. Use functions by itself.
|
|
776
|
+
- **[REMOVED]** Removed deprecated `someSecretSalt()` on user model (use `this.saltSecret` instead).
|
|
777
|
+
- **[REMOVED]** Removed deprecated `validate()` on abstract controller and as result validator dependency. Use request validators instead.
|
|
778
|
+
- **[REMOVED]** Removed deprecated `isUseControllerNameForRouting()` on abstract controller. Use `getExpressPath()` instead.
|
|
779
|
+
- **[REMOVED]** Removed deprecated `Base.loadFilesWithInheritance` please use `getFilesPathWithInheritance` that produce almost the same output.
|
|
780
|
+
- **[BREAKING]** Removed "success" field on Auth contreoller. Please use http status instead.
|
|
781
|
+
- **[BREAKING]** Auth controller - "error" error responce renamed to "message".
|
|
782
|
+
```js
|
|
783
|
+
// Before
|
|
784
|
+
{
|
|
785
|
+
error: 'Some error';
|
|
786
|
+
}
|
|
787
|
+
// After
|
|
788
|
+
{
|
|
789
|
+
message: 'Some error';
|
|
790
|
+
}
|
|
791
|
+
```
|
|
792
|
+
- **[UPDATE]** Update deps.
|
|
793
|
+
- **[UPDATE]** Winston console transport now using timestapms.
|
|
794
|
+
- **[UPDATE]** `PrepareAppInfo` middleware now a global one. Do not need to include it on every controller.
|
|
795
|
+
- **[NEW]** Request also works with `req.query`, but `req.body` have bigger priority.
|
|
796
|
+
|
|
797
|
+
---
|
|
798
|
+
|
|
799
|
+
## [2.18.0]
|
|
800
|
+
|
|
801
|
+
- **[UPDATE]** Update deps.
|
|
802
|
+
- **[UPDATE]** Replace `body-parser` with `express.json`.
|
|
803
|
+
- **[NEW]** Role middleware.
|
|
804
|
+
|
|
805
|
+
---
|
|
806
|
+
|
|
807
|
+
## [2.17.0]
|
|
808
|
+
|
|
809
|
+
- **[UPDATE]** Update deps.
|
|
810
|
+
- **[NEW]** New env variable `LOGGER_SENTRY_LEVEL` (default=`info`).
|
|
811
|
+
- **[NEW]** New env variable `LOGGER_CONSOLE_ENABLE` (default=`true`).
|
|
812
|
+
- **[BREAKING]** On translation we changed `i18next`. Please convert files if you have plurals inside it <https://i18next.github.io/i18next-v4-format-converter-web/>.
|
|
813
|
+
|
|
814
|
+
---
|
|
815
|
+
|
|
816
|
+
## [2.16.0]
|
|
817
|
+
|
|
818
|
+
- **[UPDATE]** Update deps.
|
|
819
|
+
- **[NEW]** Begin adding type script definitions.
|
|
618
820
|
|
|
619
|
-
|
|
821
|
+
---
|
|
620
822
|
|
|
621
|
-
|
|
622
|
-
const SequenceModel = this.app.getModel('Sequence');
|
|
623
|
-
// will be 1
|
|
624
|
-
const someTypeSequence = await SequenceModel.getSequence('someType');
|
|
625
|
-
// will be 2
|
|
626
|
-
const someTypeSequence2 = await SequenceModel.getSequence('someType');
|
|
627
|
-
// will be 1 as type is another
|
|
628
|
-
const someAnotherTypeSequence =
|
|
629
|
-
await SequenceModel.getSequence('someAnotherType');
|
|
630
|
-
```
|
|
823
|
+
## [2.15.4]
|
|
631
824
|
|
|
632
|
-
|
|
825
|
+
- **[UPDATE]** Update deps.
|
|
826
|
+
- **[UPDATE]** Update tests timeout.
|
|
633
827
|
|
|
634
|
-
|
|
828
|
+
---
|
|
635
829
|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
[
|
|
639
|
-
|
|
640
|
-
|
|
830
|
+
## [2.15.0]
|
|
831
|
+
|
|
832
|
+
- **[UPDATE]** Update deps.
|
|
833
|
+
- **[NEW]** Ability to configure Auth flow with `isAuthWithVefificationFlow` option.
|
|
834
|
+
- **[BREAKING]** Register not return status 201 instead of 200.
|
|
835
|
+
|
|
836
|
+
---
|
|
837
|
+
|
|
838
|
+
## [2.14.0]
|
|
839
|
+
|
|
840
|
+
- **[NEW]** Add `Sequence`. It provide ability to easily generate sequences for given types. It save to use on distributed environments.
|
|
841
|
+
```javascript
|
|
842
|
+
const SequenceModel = this.app.getModel('Sequence');
|
|
843
|
+
// will be 1
|
|
844
|
+
const someTypeSequence = await SequenceModel.getSequence('someType');
|
|
845
|
+
// will be 2
|
|
846
|
+
const someTypeSequence2 = await SequenceModel.getSequence('someType');
|
|
847
|
+
// will be 1 as type is another
|
|
848
|
+
const someAnotherTypeSequence =
|
|
849
|
+
await SequenceModel.getSequence('someAnotherType');
|
|
850
|
+
```
|
|
851
|
+
|
|
852
|
+
---
|
|
853
|
+
|
|
854
|
+
## [2.13.1]
|
|
855
|
+
|
|
856
|
+
- **[FIX]** Fix documentation about not using `req.appInfo.request`, but using `req.body` for `RateLimiter`.
|
|
857
|
+
|
|
858
|
+
---
|
|
859
|
+
|
|
860
|
+
## [2.13.0]
|
|
861
|
+
|
|
862
|
+
- **[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.
|
|
863
|
+
```javascript
|
|
641
864
|
static get middleware() {
|
|
642
865
|
return new Map([
|
|
643
866
|
['POST/login', [
|
|
@@ -647,16 +870,16 @@ const someAnotherTypeSequence =
|
|
|
647
870
|
]]
|
|
648
871
|
]);
|
|
649
872
|
}
|
|
650
|
-
```
|
|
651
|
-
|
|
652
|
-
#### 2.12.0
|
|
873
|
+
```
|
|
653
874
|
|
|
654
|
-
|
|
655
|
-
[NEW] Rate limited middleware
|
|
875
|
+
---
|
|
656
876
|
|
|
657
|
-
|
|
877
|
+
## [2.12.0]
|
|
658
878
|
|
|
659
|
-
|
|
879
|
+
- **[UPDATE]** Update deps.
|
|
880
|
+
- **[NEW]** Rate limited middleware.
|
|
881
|
+
As rate limited we using <https://github.com/animir/node-rate-limiter-flexible>
|
|
882
|
+
```javascript
|
|
660
883
|
static get middleware() {
|
|
661
884
|
return new Map([
|
|
662
885
|
['POST/login', [
|
|
@@ -666,13 +889,10 @@ As rate limited we using https://github.com/animir/node-rate-limiter-flexible
|
|
|
666
889
|
]]
|
|
667
890
|
]);
|
|
668
891
|
}
|
|
669
|
-
```
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
Rate limiter have multiple backends (memory, redis and mongo). Buy default 'memory' backend activated
|
|
674
|
-
|
|
675
|
-
```javascript
|
|
892
|
+
```
|
|
893
|
+
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)
|
|
894
|
+
Rate limiter have multiple backends (memory, redis and mongo). Buy default 'memory' backend activated
|
|
895
|
+
```javascript
|
|
676
896
|
static get middleware() {
|
|
677
897
|
return new Map([
|
|
678
898
|
[
|
|
@@ -691,18 +911,21 @@ Rate limiter have multiple backends (memory, redis and mongo). Buy default 'memo
|
|
|
691
911
|
],
|
|
692
912
|
]);
|
|
693
913
|
}
|
|
694
|
-
```
|
|
914
|
+
```
|
|
695
915
|
|
|
696
|
-
|
|
916
|
+
---
|
|
697
917
|
|
|
698
|
-
[
|
|
918
|
+
## [2.11.0]
|
|
699
919
|
|
|
700
|
-
|
|
920
|
+
- **[NEW]** Added env variable `HTTP_HOST` for configure host to listen.
|
|
701
921
|
|
|
702
|
-
|
|
703
|
-
[NEW] ability to pass parameters to middleware
|
|
922
|
+
---
|
|
704
923
|
|
|
705
|
-
|
|
924
|
+
## [2.10.0]
|
|
925
|
+
|
|
926
|
+
- **[UPDATE]** Update deps.
|
|
927
|
+
- **[NEW]** Ability to pass parameters to middleware.
|
|
928
|
+
```javascript
|
|
706
929
|
static get middleware() {
|
|
707
930
|
return new Map([
|
|
708
931
|
['POST/someUrl', [
|
|
@@ -712,113 +935,150 @@ Rate limiter have multiple backends (memory, redis and mongo). Buy default 'memo
|
|
|
712
935
|
]]
|
|
713
936
|
]);
|
|
714
937
|
}
|
|
715
|
-
```
|
|
938
|
+
```
|
|
939
|
+
All this params goes to constructor as a second paramater.
|
|
940
|
+
|
|
941
|
+
---
|
|
942
|
+
|
|
943
|
+
## [2.9.2]
|
|
944
|
+
|
|
945
|
+
- **[UPDATE]** Update deps.
|
|
946
|
+
- **[FIX]** Fix auth nick.
|
|
947
|
+
|
|
948
|
+
---
|
|
949
|
+
|
|
950
|
+
## [2.9.1]
|
|
951
|
+
|
|
952
|
+
- **[UPDATE]** Update deps.
|
|
953
|
+
|
|
954
|
+
---
|
|
716
955
|
|
|
717
|
-
|
|
956
|
+
## [2.9.0]
|
|
718
957
|
|
|
719
|
-
|
|
958
|
+
- **[BREAKING]** Auth controller update.
|
|
720
959
|
|
|
721
|
-
|
|
722
|
-
[FIX] fix auth nick
|
|
960
|
+
---
|
|
723
961
|
|
|
724
|
-
|
|
962
|
+
## [2.8.3]
|
|
725
963
|
|
|
726
|
-
[
|
|
964
|
+
- **[FIX]** Update recovery email template.
|
|
727
965
|
|
|
728
|
-
|
|
966
|
+
---
|
|
729
967
|
|
|
730
|
-
[
|
|
968
|
+
## [2.8.2]
|
|
731
969
|
|
|
732
|
-
|
|
970
|
+
- **[FIX]** Update AUTH controller.
|
|
733
971
|
|
|
734
|
-
|
|
972
|
+
---
|
|
735
973
|
|
|
736
|
-
|
|
974
|
+
## [2.8.1]
|
|
737
975
|
|
|
738
|
-
[
|
|
976
|
+
- **[UPDATE]** Update deps.
|
|
977
|
+
- **[FIX]** Update AUTH controller.
|
|
739
978
|
|
|
740
|
-
|
|
979
|
+
---
|
|
741
980
|
|
|
742
|
-
[
|
|
743
|
-
[FIX] update AUTH controller
|
|
981
|
+
## [2.8.0]
|
|
744
982
|
|
|
745
|
-
|
|
983
|
+
- **[UPDATE]** Change controllers to reflect latest changes.
|
|
984
|
+
- **[UPDATE]** Add warning when using `req.body` directly.
|
|
985
|
+
- **[BREAKING]** Possible breaking. `AsyncFunction` now required for router handler (it always was but without checking of code).
|
|
986
|
+
- **[DEPRECATE]** Usage of `validator` of controllers.
|
|
987
|
+
- **[DEPRECATE]** Usage of `isUseControllerNameForRouting` of controllers.
|
|
746
988
|
|
|
747
|
-
|
|
748
|
-
[UPDATE] add warning when using 'req.body' directly
|
|
749
|
-
[BREAKING] Possible breaking. AsyncFunction now required for router handler (it always was but without checking of code)
|
|
750
|
-
[DEPRECATE] usage of 'validator' of controllers
|
|
751
|
-
[DEPRECATE] usage of 'isUseControllerNameForRouting' of controllers.
|
|
989
|
+
---
|
|
752
990
|
|
|
753
|
-
|
|
991
|
+
## [2.7.4]
|
|
754
992
|
|
|
755
|
-
[UPDATE]
|
|
993
|
+
- **[UPDATE]** Update deps.
|
|
756
994
|
|
|
757
|
-
|
|
995
|
+
---
|
|
758
996
|
|
|
759
|
-
[
|
|
997
|
+
## [2.7.3]
|
|
760
998
|
|
|
761
|
-
|
|
999
|
+
- **[UPDATE]** Replace `i18next-node-fs-backend` to `i18next-fs-backend` (drop in replacement).
|
|
762
1000
|
|
|
763
|
-
|
|
1001
|
+
---
|
|
764
1002
|
|
|
765
|
-
|
|
1003
|
+
## [2.7.2]
|
|
766
1004
|
|
|
767
|
-
[
|
|
1005
|
+
- **[UPDATE]** Update deps.
|
|
768
1006
|
|
|
769
|
-
|
|
1007
|
+
---
|
|
770
1008
|
|
|
771
|
-
[
|
|
1009
|
+
## [2.7.1]
|
|
772
1010
|
|
|
773
|
-
|
|
1011
|
+
- **[REMOVE]** Remove unused websocket.
|
|
774
1012
|
|
|
775
|
-
|
|
776
|
-
[UPDATE] optimize deps
|
|
1013
|
+
---
|
|
777
1014
|
|
|
778
|
-
|
|
1015
|
+
## [2.7.0]
|
|
779
1016
|
|
|
780
|
-
[UPDATE]
|
|
1017
|
+
- **[UPDATE]** Change winston sentry transport.
|
|
781
1018
|
|
|
782
|
-
|
|
1019
|
+
---
|
|
783
1020
|
|
|
784
|
-
[
|
|
785
|
-
[UPDATE] update handling exceptions loging
|
|
1021
|
+
## [2.6.5]
|
|
786
1022
|
|
|
787
|
-
|
|
1023
|
+
- **[UPDATE]** Update deps.
|
|
1024
|
+
- **[UPDATE]** Optimize deps.
|
|
788
1025
|
|
|
789
|
-
|
|
1026
|
+
---
|
|
790
1027
|
|
|
791
|
-
|
|
1028
|
+
## [2.6.4]
|
|
792
1029
|
|
|
793
|
-
[
|
|
794
|
-
[UPDATE] stripUnknown=true by default on casting
|
|
1030
|
+
- **[UPDATE]** Update deps.
|
|
795
1031
|
|
|
796
|
-
|
|
1032
|
+
---
|
|
797
1033
|
|
|
798
|
-
[
|
|
799
|
-
[NEW]new cache system (alpha, subject of change)
|
|
1034
|
+
## [2.6.3]
|
|
800
1035
|
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
this.app.cache.getSetValue(
|
|
804
|
-
'someKey',
|
|
805
|
-
async () => {
|
|
806
|
-
// function that will execute in case cache value is missed
|
|
807
|
-
},
|
|
808
|
-
cacheTime,
|
|
809
|
-
);
|
|
810
|
-
```
|
|
1036
|
+
- **[UPDATE]** Update deps.
|
|
1037
|
+
- **[UPDATE]** Update handling exceptions loging.
|
|
811
1038
|
|
|
812
|
-
|
|
1039
|
+
---
|
|
813
1040
|
|
|
814
|
-
[
|
|
815
|
-
[FIX] fix error logging on unhadled rejection
|
|
1041
|
+
## [2.6.2]
|
|
816
1042
|
|
|
817
|
-
|
|
1043
|
+
- **[UPDATE]** Normalize auth config.
|
|
818
1044
|
|
|
819
|
-
|
|
1045
|
+
---
|
|
820
1046
|
|
|
821
|
-
|
|
1047
|
+
## [2.6.1]
|
|
1048
|
+
|
|
1049
|
+
- **[FIX]** Fix error on cache system.
|
|
1050
|
+
- **[UPDATE]** `stripUnknown=true` by default on casting.
|
|
1051
|
+
|
|
1052
|
+
---
|
|
1053
|
+
|
|
1054
|
+
## [2.6.0]
|
|
1055
|
+
|
|
1056
|
+
- **[UPDATE]** Deps update.
|
|
1057
|
+
- **[NEW]** New cache system (alpha, subject of change).
|
|
1058
|
+
```javascript
|
|
1059
|
+
const cacheTime = 60 * 5;
|
|
1060
|
+
this.app.cache.getSetValue(
|
|
1061
|
+
'someKey',
|
|
1062
|
+
async () => {
|
|
1063
|
+
// function that will execute in case cache value is missed
|
|
1064
|
+
},
|
|
1065
|
+
cacheTime,
|
|
1066
|
+
);
|
|
1067
|
+
```
|
|
1068
|
+
|
|
1069
|
+
---
|
|
1070
|
+
|
|
1071
|
+
## [2.5.1]
|
|
1072
|
+
|
|
1073
|
+
- **[UPDATE]** Deps update.
|
|
1074
|
+
- **[FIX]** Fix error logging on unhadled rejection.
|
|
1075
|
+
|
|
1076
|
+
---
|
|
1077
|
+
|
|
1078
|
+
## [2.5.0]
|
|
1079
|
+
|
|
1080
|
+
- **[NEW]** New route handler format with request validations and casting (yup based).
|
|
1081
|
+
```javascript
|
|
822
1082
|
get routes() {
|
|
823
1083
|
return {
|
|
824
1084
|
post: {
|
|
@@ -833,217 +1093,301 @@ this.app.cache.getSetValue(
|
|
|
833
1093
|
}
|
|
834
1094
|
// send request with data {count: "5000"}
|
|
835
1095
|
// will produce error with status 400 and {errors: {count:['Text error']}}
|
|
836
|
-
|
|
837
|
-
|
|
838
1096
|
postSample(req,res) =>{
|
|
839
1097
|
// on success validate we pass here.
|
|
840
1098
|
// {count: "5000"}
|
|
841
1099
|
console.log(req.appInfo.request)
|
|
842
1100
|
// {count: 5000} -> casted to number
|
|
843
1101
|
}
|
|
844
|
-
```
|
|
1102
|
+
```
|
|
1103
|
+
|
|
1104
|
+
---
|
|
1105
|
+
|
|
1106
|
+
## [2.4.4]
|
|
845
1107
|
|
|
846
|
-
|
|
1108
|
+
- **[UPDATE]** Deps update.
|
|
1109
|
+
- **[NEW]** Controller unhandled rejection now handled with default error.
|
|
1110
|
+
- **[NEW]** Handle error with wrong model name.
|
|
847
1111
|
|
|
848
|
-
|
|
849
|
-
[NEW] controller unhandled rejection now handled with default error
|
|
850
|
-
[NEW] handle error with wrong model name
|
|
1112
|
+
---
|
|
851
1113
|
|
|
852
|
-
|
|
1114
|
+
## [2.4.3]
|
|
853
1115
|
|
|
854
|
-
[UPDATE]
|
|
1116
|
+
- **[UPDATE]** Deps update.
|
|
855
1117
|
|
|
856
|
-
|
|
1118
|
+
---
|
|
857
1119
|
|
|
858
|
-
[
|
|
859
|
-
[UPDATE] deps update
|
|
1120
|
+
## [2.4.2]
|
|
860
1121
|
|
|
861
|
-
|
|
1122
|
+
- **[FIX]** Abstract controlled middleware.
|
|
1123
|
+
- **[UPDATE]** Deps update.
|
|
862
1124
|
|
|
863
|
-
|
|
1125
|
+
---
|
|
864
1126
|
|
|
865
|
-
|
|
1127
|
+
## [2.4.1]
|
|
866
1128
|
|
|
867
|
-
[
|
|
1129
|
+
- **[FIX]** Updated test because of previous breaking changes.
|
|
868
1130
|
|
|
869
|
-
|
|
1131
|
+
---
|
|
870
1132
|
|
|
871
|
-
|
|
1133
|
+
## [2.4.0]
|
|
1134
|
+
|
|
1135
|
+
- **[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.
|
|
1136
|
+
- **[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).
|
|
1137
|
+
```javascript
|
|
872
1138
|
static get middleware() {
|
|
873
1139
|
return new Map([['GET/*', [PrepareAppInfo, GetUserByToken]]]);
|
|
874
1140
|
}
|
|
875
|
-
```
|
|
1141
|
+
```
|
|
1142
|
+
|
|
1143
|
+
---
|
|
1144
|
+
|
|
1145
|
+
## [2.3.14]
|
|
1146
|
+
|
|
1147
|
+
- **[FIX]** Fix validate controller method for non strings.
|
|
1148
|
+
|
|
1149
|
+
---
|
|
1150
|
+
|
|
1151
|
+
## [2.3.13]
|
|
1152
|
+
|
|
1153
|
+
- **[UPDATE]** Testing now with mongoDB Replica.
|
|
1154
|
+
- **[UPDATE]** Refactor CLI.
|
|
1155
|
+
|
|
1156
|
+
---
|
|
1157
|
+
|
|
1158
|
+
## [2.3.12]
|
|
1159
|
+
|
|
1160
|
+
- **[UPDATE]** Testing update.
|
|
1161
|
+
|
|
1162
|
+
---
|
|
1163
|
+
|
|
1164
|
+
## [2.3.11]
|
|
1165
|
+
|
|
1166
|
+
- **[UPDATE]** Refactor CLI for testing.
|
|
1167
|
+
|
|
1168
|
+
---
|
|
1169
|
+
|
|
1170
|
+
## [2.3.10]
|
|
1171
|
+
|
|
1172
|
+
- **[UPDATE]** Update user model indexes to allow null email and nick.
|
|
1173
|
+
- **[UPDATE]** Deps update.
|
|
1174
|
+
|
|
1175
|
+
---
|
|
1176
|
+
|
|
1177
|
+
## [2.3.9]
|
|
1178
|
+
|
|
1179
|
+
- **[FIX]** Test fix.
|
|
1180
|
+
|
|
1181
|
+
---
|
|
1182
|
+
|
|
1183
|
+
## [2.3.8]
|
|
1184
|
+
|
|
1185
|
+
- **[NEW]** Add `global.testSetup.beforeAll` `global.testSetup.afterAll` functions and `global.testSetup.disableUserCreate` flag for testing testing.
|
|
1186
|
+
|
|
1187
|
+
---
|
|
1188
|
+
|
|
1189
|
+
## [2.3.7]
|
|
1190
|
+
|
|
1191
|
+
- **[UPDATE]** Deps update.
|
|
1192
|
+
- **[NEW]** Add `global.testSetup.userCreate` function for testing.
|
|
1193
|
+
|
|
1194
|
+
---
|
|
1195
|
+
|
|
1196
|
+
## [2.3.6]
|
|
1197
|
+
|
|
1198
|
+
- **[UPDATE]** Deps update.
|
|
1199
|
+
- **[FIX]** Test fix.
|
|
1200
|
+
|
|
1201
|
+
---
|
|
1202
|
+
|
|
1203
|
+
## [2.3.5]
|
|
1204
|
+
|
|
1205
|
+
- **[NEW]** Add command `DropIndex`.
|
|
1206
|
+
- **[UPDATE]** Deps update.
|
|
1207
|
+
|
|
1208
|
+
---
|
|
1209
|
+
|
|
1210
|
+
## [2.3.4]
|
|
1211
|
+
|
|
1212
|
+
- **[NEW]** Add `webResources` option to email service.
|
|
1213
|
+
- **[UPDATE]** Deps update.
|
|
1214
|
+
|
|
1215
|
+
---
|
|
1216
|
+
|
|
1217
|
+
## [2.3.3]
|
|
1218
|
+
|
|
1219
|
+
- **[UPDATE]** Deps update.
|
|
1220
|
+
|
|
1221
|
+
---
|
|
1222
|
+
|
|
1223
|
+
## [2.3.2]
|
|
1224
|
+
|
|
1225
|
+
- **[FIX]** Fix controllers order to load.
|
|
876
1226
|
|
|
877
|
-
|
|
1227
|
+
---
|
|
878
1228
|
|
|
879
|
-
[
|
|
1229
|
+
## [2.3.1]
|
|
880
1230
|
|
|
881
|
-
|
|
1231
|
+
- **[FIX]** Fix parsing token.
|
|
882
1232
|
|
|
883
|
-
|
|
884
|
-
[UPDATE] refactor CLI
|
|
1233
|
+
---
|
|
885
1234
|
|
|
886
|
-
|
|
1235
|
+
## [2.3.0]
|
|
887
1236
|
|
|
888
|
-
[
|
|
1237
|
+
- **[NEW]** `Migration/create` `migration/migrate` commands.
|
|
889
1238
|
|
|
890
|
-
|
|
1239
|
+
---
|
|
891
1240
|
|
|
892
|
-
[
|
|
1241
|
+
## [2.2.6]
|
|
893
1242
|
|
|
894
|
-
|
|
1243
|
+
- **[NEW]** CLI command receiving parsed arguments.
|
|
895
1244
|
|
|
896
|
-
|
|
897
|
-
[UPDATE] deps update
|
|
1245
|
+
---
|
|
898
1246
|
|
|
899
|
-
|
|
1247
|
+
## [2.2.5]
|
|
900
1248
|
|
|
901
|
-
[FIX]
|
|
1249
|
+
- **[FIX]** Fix disconnecting problems with replica set.
|
|
902
1250
|
|
|
903
|
-
|
|
1251
|
+
---
|
|
904
1252
|
|
|
905
|
-
[
|
|
1253
|
+
## [2.2.4]
|
|
906
1254
|
|
|
907
|
-
|
|
1255
|
+
- **[UPDATE]** Internal update for speed up cli init.
|
|
908
1256
|
|
|
909
|
-
|
|
910
|
-
[NEW] add 'global.testSetup.userCreate' function for testing
|
|
1257
|
+
---
|
|
911
1258
|
|
|
912
|
-
|
|
1259
|
+
## [2.2.3]
|
|
913
1260
|
|
|
914
|
-
[
|
|
915
|
-
[FIX] test fix
|
|
1261
|
+
- **[FIX]** Fix language detection.
|
|
916
1262
|
|
|
917
|
-
|
|
1263
|
+
---
|
|
918
1264
|
|
|
919
|
-
[
|
|
920
|
-
[UPDATE] deps update
|
|
1265
|
+
## [2.2.2]
|
|
921
1266
|
|
|
922
|
-
|
|
1267
|
+
- **[FIX]** Fix test as part of docker image update. This just a `mongo-memory-server` problems.
|
|
1268
|
+
- **[NEW]** Add config to configure language detecting order and types.
|
|
923
1269
|
|
|
924
|
-
|
|
925
|
-
[UPDATE] deps update
|
|
1270
|
+
---
|
|
926
1271
|
|
|
927
|
-
|
|
1272
|
+
## [2.2.1]
|
|
928
1273
|
|
|
929
|
-
[UPDATE]
|
|
1274
|
+
- **[UPDATE]** Deps update.
|
|
930
1275
|
|
|
931
|
-
|
|
1276
|
+
---
|
|
932
1277
|
|
|
933
|
-
[
|
|
1278
|
+
## [2.2.0]
|
|
934
1279
|
|
|
935
|
-
|
|
1280
|
+
- **[DEPRECATED]** `Base.loadFilesWithInheritance` please use `getFilesPathWithInheritance` that produce almost the same output.
|
|
1281
|
+
- **[UPDATE]** Deps update.
|
|
1282
|
+
- **[UPDATE]** Https logs now contains request time.
|
|
1283
|
+
- **[NEW]** Ability to put controllers into folders with path inheritance.
|
|
1284
|
+
- **[NEW]** Ability to replace `expressPath` on controller - `getExpressPath()` methos.
|
|
1285
|
+
- **[NEW]** Ability to put commands into folders with path inheritance.
|
|
936
1286
|
|
|
937
|
-
|
|
1287
|
+
---
|
|
938
1288
|
|
|
939
|
-
|
|
1289
|
+
## [2.1.2]
|
|
940
1290
|
|
|
941
|
-
[
|
|
1291
|
+
- **[UPDATE]** Disconnect of mongoose when command was finished.
|
|
942
1292
|
|
|
943
|
-
|
|
1293
|
+
---
|
|
944
1294
|
|
|
945
|
-
[
|
|
1295
|
+
## [2.1.1]
|
|
946
1296
|
|
|
947
|
-
|
|
1297
|
+
- **[UPDATE]** Deps update.
|
|
948
1298
|
|
|
949
|
-
|
|
1299
|
+
---
|
|
950
1300
|
|
|
951
|
-
|
|
1301
|
+
## [2.1.0]
|
|
952
1302
|
|
|
953
|
-
[
|
|
1303
|
+
- **[DEV]** Added codestyle checker.
|
|
1304
|
+
- **[NEW]** Initial CLI module.
|
|
954
1305
|
|
|
955
|
-
|
|
1306
|
+
---
|
|
956
1307
|
|
|
957
|
-
[
|
|
1308
|
+
## [2.0.2]
|
|
958
1309
|
|
|
959
|
-
|
|
1310
|
+
- **[UPDATE]** Socket.io v3.
|
|
1311
|
+
- **[UPDATE]** Deps update.
|
|
960
1312
|
|
|
961
|
-
|
|
962
|
-
[NEW] add config to configure language detecting order and types
|
|
1313
|
+
---
|
|
963
1314
|
|
|
964
|
-
|
|
1315
|
+
## [2.0.1]
|
|
965
1316
|
|
|
966
|
-
[
|
|
1317
|
+
- **[NEW]** Added config to websocket.
|
|
967
1318
|
|
|
968
|
-
|
|
1319
|
+
---
|
|
969
1320
|
|
|
970
|
-
[
|
|
971
|
-
[UPDATE] deps update
|
|
972
|
-
[UPDATE] https logs now contains request time
|
|
973
|
-
[NEW] Ability to put controllers into folders with path inheritance
|
|
974
|
-
[NEW] Ability to replace expressPath on controller - getExpressPath() methos
|
|
975
|
-
[NEW] Ability to put commands into folders with path inheritance
|
|
1321
|
+
## [2.0.0]
|
|
976
1322
|
|
|
977
|
-
|
|
1323
|
+
- **[BREAKING]** Change config format of log config. Now configs can be only objects.
|
|
978
1324
|
|
|
979
|
-
|
|
1325
|
+
---
|
|
980
1326
|
|
|
981
|
-
|
|
1327
|
+
## [1.5.0]
|
|
982
1328
|
|
|
983
|
-
[
|
|
1329
|
+
- **[NEW]** Support for environment configs (`config.js` and `config.{NODE_ENV}.js`) with overwrite.
|
|
1330
|
+
- **[UPDATE]** Deps update.
|
|
984
1331
|
|
|
985
|
-
|
|
1332
|
+
---
|
|
986
1333
|
|
|
987
|
-
[
|
|
988
|
-
[NEW] Initial CLI module
|
|
1334
|
+
## [1.4.0]
|
|
989
1335
|
|
|
990
|
-
|
|
1336
|
+
- **[NEW]** Ability to pass additional parameter to server that will be executed before adding page 404.
|
|
991
1337
|
|
|
992
|
-
|
|
993
|
-
[UPDATE] deps update
|
|
1338
|
+
---
|
|
994
1339
|
|
|
995
|
-
|
|
1340
|
+
## [1.3.0]
|
|
996
1341
|
|
|
997
|
-
[NEW]
|
|
1342
|
+
- **[NEW]** Models now support optional callback that will executed on connection ready. If mongo already connected then callback will be executed immediately.
|
|
998
1343
|
|
|
999
|
-
|
|
1344
|
+
---
|
|
1000
1345
|
|
|
1001
|
-
[
|
|
1346
|
+
## [1.2.9]
|
|
1002
1347
|
|
|
1003
|
-
|
|
1348
|
+
- **[UPDATE]** Update deps.
|
|
1004
1349
|
|
|
1005
|
-
|
|
1006
|
-
[UPDATE] deps update
|
|
1350
|
+
---
|
|
1007
1351
|
|
|
1008
|
-
|
|
1352
|
+
## [1.2.8]
|
|
1009
1353
|
|
|
1010
|
-
|
|
1354
|
+
- **[UPDATE]** Update deps.
|
|
1011
1355
|
|
|
1012
|
-
|
|
1356
|
+
---
|
|
1013
1357
|
|
|
1014
|
-
|
|
1358
|
+
## [1.2.7]
|
|
1015
1359
|
|
|
1016
|
-
|
|
1360
|
+
- **[NEW]** Add abilty to return error from custom validation functions.
|
|
1017
1361
|
|
|
1018
|
-
|
|
1362
|
+
---
|
|
1019
1363
|
|
|
1020
|
-
|
|
1364
|
+
## [1.2.6]
|
|
1021
1365
|
|
|
1022
|
-
|
|
1366
|
+
- **[UPDATE]** Validator documentation (jsdoc) update.
|
|
1367
|
+
- **[UPDATE]** Validator support pass parameters to validator.
|
|
1023
1368
|
|
|
1024
|
-
|
|
1369
|
+
---
|
|
1025
1370
|
|
|
1026
|
-
|
|
1371
|
+
## [1.2.5]
|
|
1027
1372
|
|
|
1028
|
-
|
|
1373
|
+
- **[FIX]** Fix problem with test (user should be global on tests).
|
|
1029
1374
|
|
|
1030
|
-
|
|
1031
|
-
Validator support pass parameters to validator
|
|
1375
|
+
---
|
|
1032
1376
|
|
|
1033
|
-
|
|
1377
|
+
## [1.2.4]
|
|
1034
1378
|
|
|
1035
|
-
|
|
1379
|
+
- **[NEW]** Add eslint.
|
|
1380
|
+
- **[UPDATE]** Code refactor.
|
|
1036
1381
|
|
|
1037
|
-
|
|
1382
|
+
---
|
|
1038
1383
|
|
|
1039
|
-
|
|
1040
|
-
Code refactor
|
|
1384
|
+
## [1.2.3]
|
|
1041
1385
|
|
|
1042
|
-
|
|
1386
|
+
- **[NEW]** Add prettier.
|
|
1387
|
+
- **[UPDATE]** Code reformat.
|
|
1043
1388
|
|
|
1044
|
-
|
|
1045
|
-
Code reformat
|
|
1389
|
+
---
|
|
1046
1390
|
|
|
1047
|
-
|
|
1391
|
+
## [1.2.2]
|
|
1048
1392
|
|
|
1049
|
-
Update deps
|
|
1393
|
+
- **[UPDATE]** Update deps.
|