@clairejs/server 3.10.16 → 3.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/.prettierrc +8 -8
  2. package/README.md +754 -749
  3. package/dist/common/FileOperation.d.ts +5 -5
  4. package/dist/common/ServerModelMetadata.d.ts +10 -10
  5. package/dist/common/auth/AbstractPrincipalResolver.d.ts +4 -4
  6. package/dist/common/auth/IPrincipal.d.ts +4 -4
  7. package/dist/common/constants.d.ts +1 -1
  8. package/dist/common/request/EndpointMetadata.d.ts +40 -40
  9. package/dist/common/request/HttpData.d.ts +1 -1
  10. package/dist/common/request/HttpEndpoint.d.ts +8 -8
  11. package/dist/common/request/JobData.d.ts +1 -1
  12. package/dist/common/request/MountedEndpointInfo.d.ts +6 -6
  13. package/dist/common/request/RequestOptions.d.ts +8 -8
  14. package/dist/common/request/SocketData.d.ts +1 -1
  15. package/dist/common/request/types.d.ts +1 -1
  16. package/dist/controllers/FileManageController.d.ts +13 -0
  17. package/dist/controllers/FileUploadController.d.ts +13 -0
  18. package/dist/controllers/dto/permissions.d.ts +20 -0
  19. package/dist/controllers/dto/system.d.ts +12 -0
  20. package/dist/controllers/dto/upload.d.ts +40 -0
  21. package/dist/controllers/models/SystemSetting.d.ts +5 -0
  22. package/dist/http/auth/AbstractHttpAuthorizationProvider.d.ts +9 -9
  23. package/dist/http/auth/AbstractRbacAuthProvider.d.ts +18 -18
  24. package/dist/http/auth/RedisRbacAuthProvider.d.ts +24 -24
  25. package/dist/http/auth/SocketRbacAuthProvider.d.ts +25 -25
  26. package/dist/http/auth/rbac.d.ts +34 -34
  27. package/dist/http/common/HttpRequest.d.ts +40 -40
  28. package/dist/http/common/HttpResponse.d.ts +34 -34
  29. package/dist/http/controller/AbstractHttpController.d.ts +9 -9
  30. package/dist/http/controller/AbstractHttpMiddleware.d.ts +10 -10
  31. package/dist/http/controller/AbstractHttpRequestHandler.d.ts +18 -18
  32. package/dist/http/controller/ControllerMetadata.d.ts +6 -6
  33. package/dist/http/controller/CrudHttpController.d.ts +41 -41
  34. package/dist/http/controller/DefaultHttpRequestHandler.d.ts +21 -21
  35. package/dist/http/decorators.d.ts +35 -35
  36. package/dist/http/file-upload/AbstractFileUploadHandler.d.ts +6 -6
  37. package/dist/http/file-upload/FileUploadHandler.d.ts +10 -10
  38. package/dist/http/file-upload/types.d.ts +3 -3
  39. package/dist/http/repository/AbstractRepository.d.ts +10 -10
  40. package/dist/http/repository/DtoRepository.d.ts +58 -58
  41. package/dist/http/repository/ICrudRepository.d.ts +27 -27
  42. package/dist/http/repository/ModelRepository.d.ts +37 -37
  43. package/dist/http/security/AbstractAccessCondition.d.ts +7 -7
  44. package/dist/http/security/access-conditions/DtoFieldValidation.d.ts +4 -4
  45. package/dist/http/security/access-conditions/FilterModelFieldAccessCondition.d.ts +4 -4
  46. package/dist/http/security/access-conditions/MaximumQueryLimit.d.ts +8 -8
  47. package/dist/http/security/cors.d.ts +6 -6
  48. package/dist/index.d.ts +71 -57
  49. package/dist/index.js +1 -1
  50. package/dist/job/AbstractJobController.d.ts +4 -4
  51. package/dist/job/AbstractJobRepository.d.ts +17 -17
  52. package/dist/job/AbstractJobScheduler.d.ts +38 -38
  53. package/dist/job/AwsJobScheduler.d.ts +48 -48
  54. package/dist/job/LocalJobScheduler.d.ts +88 -88
  55. package/dist/job/decorators.d.ts +5 -5
  56. package/dist/job/interfaces.d.ts +50 -50
  57. package/dist/logging/FileLogMedium.d.ts +13 -13
  58. package/dist/{service → services}/AbstractCacheService.d.ts +22 -22
  59. package/dist/{service → services}/AbstractFileService.d.ts +11 -11
  60. package/dist/services/AbstractMailService.d.ts +31 -0
  61. package/dist/{service → services}/AbstractService.d.ts +7 -7
  62. package/dist/services/AbstractSmsService.d.ts +25 -0
  63. package/dist/services/LocalFileService.d.ts +17 -0
  64. package/dist/services/ProxyFileService.d.ts +16 -0
  65. package/dist/services/RedisCacheService.d.ts +25 -0
  66. package/dist/services/S3FileService.d.ts +31 -0
  67. package/dist/services/SystemService.d.ts +15 -0
  68. package/dist/socket/AbstractServerSocket.d.ts +18 -18
  69. package/dist/socket/AbstractServerSocketManager.d.ts +46 -46
  70. package/dist/socket/AbstractSocketConnectionHandler.d.ts +6 -6
  71. package/dist/socket/AbstractSocketController.d.ts +14 -14
  72. package/dist/socket/AwsSocketManager.d.ts +30 -30
  73. package/dist/socket/IServerSocket.d.ts +16 -16
  74. package/dist/socket/LocalSocketManager.d.ts +47 -47
  75. package/dist/system/ClaireServer.d.ts +13 -13
  76. package/dist/system/ExpressWrapper.d.ts +19 -19
  77. package/dist/system/LambdaWrapper.d.ts +25 -25
  78. package/dist/system/ServerGlobalStore.d.ts +8 -8
  79. package/dist/system/errors.d.ts +14 -14
  80. package/dist/system/lamba-request-mapper.d.ts +2 -2
  81. package/dist/system/locale/LocaleEntry.d.ts +3 -3
  82. package/dist/system/locale/LocaleTranslation.d.ts +6 -6
  83. package/dist/system/locale/decorators.d.ts +2 -2
  84. package/package.json +66 -62
package/README.md CHANGED
@@ -1,749 +1,754 @@
1
- ## Change Log
2
-
3
- #### 3.10.16
4
-
5
- - move cors config to AbstractHttpRequestHandler
6
-
7
- #### 3.10.15
8
-
9
- - add / adjust cors setting
10
- - add cookie parser
11
- - fix set cookie with options
12
- - fix express & lambda wrapper to return cookies
13
-
14
- #### 3.10.7
15
-
16
- - add random to order option in model repository
17
- - socket_read -> disable_write, socket_write -> disable_read
18
-
19
- #### 3.10.5
20
-
21
- - AbstractJobScheduler run job with spread params
22
- - use setTimeout for local scheduler at timestamp
23
- - fix AwsJobScheduler cron expression
24
- - breaking change update to AbstractFileService
25
-
26
- #### 3.9.2
27
-
28
- - moving and using crud dto factory from claire core
29
- - add expire param to AbstractCacheService set
30
-
31
- #### 3.9.0
32
-
33
- - fix AbstractHttpMiddleware to accept response as second param and return boolean as result
34
-
35
- #### 3.8.8
36
-
37
- - update core package, reduce db calls in ModelRepository
38
- - allow nested update HasMany / HasOne field in ModelRepository
39
-
40
- #### 3.8.6
41
-
42
- - fix auto fill of post/put default value (no more auto fill, because of access condition check)
43
- - fix getMany projection in ModelRepository
44
- - fix hasMany fields in CRUD projection
45
-
46
- #### 3.8.3
47
-
48
- - RedisRbacAuthProvider service id resolver
49
-
50
- #### 3.8.1
51
-
52
- - fix @CurrentUser does no more require Identifiable class
53
- - fix default locale reading empty object properties in ModelRepository
54
-
55
- #### 3.8.0
56
-
57
- - add @LocaleOf decorator
58
- - handle multi-locale for ModelRepository & CrudHtppController
59
-
60
- #### 3.7.12
61
-
62
- - handle gcd of interval to reduce step function trigger rate
63
- - handle cron event for lambda wrapper
64
- - fix remove cron job for AwsJobScheduler
65
- - fix cron expression
66
- - fix rate 1 minute without 's'
67
- - add more debug log
68
- - fix cron expression validation
69
- - remove job executor
70
- - implement AwsJobScheduler (EventBridge + Step Function)
71
- - fix LocalJobScheduler interface
72
- - allow persist LocalJobScheduler job info & multi instance support
73
-
74
- #### 3.6.23
75
-
76
- - unify handle not found error
77
- - fix create many does not return mime field in CrudHttpController
78
- - fix local socket manager buffer message while socket is creating
79
- - fix async handling in lambda socket manager
80
- - handling READY socket message
81
- - fix AwsSocketManager does not remove socket from redis when disconnect
82
- - handle default "" or "/" endpoint correctly
83
- - fix CrudHttpController filter by boolean field
84
- - fix AwsSocketManager not remove socket from channel after disconnection
85
- - support @HasOne for Crud controller
86
- - fix nested queries for ModelRepository
87
-
88
- #### 3.6.3
89
-
90
- - fix onChannelConnected cannot send back data to socket (because socket was not yet added to channel and old instance was used)
91
- - add READY socket message
92
-
93
- #### 3.6.0
94
-
95
- - move database to @clairejs/orm package. Bye bye...
96
-
97
- #### 3.5.4
98
-
99
- - fix aws get socket by id
100
- - send error when close socket
101
- - remove constructor dependency of socket connection handler in socket managers
102
-
103
- #### 3.5.0
104
-
105
- - use ioredis instead of redis (for redlock to work)
106
- - update job interfaces
107
- - adapt socket managers to use ioredis
108
-
109
- #### 3.4.0
110
-
111
- - add job related classes
112
-
113
- #### 3.3.27
114
-
115
- - add random order
116
- - add \_nin operator
117
-
118
- #### 3.3.26
119
-
120
- - remove socket if authentication failed for aws socket manager
121
- - fix lambda request mapper
122
- - fix Express parse Api gateway query for socket connection
123
- - add debug log
124
- - refactor principal data resolver for socket manager
125
-
126
- #### 3.3.19
127
-
128
- - ExpressWrapper don't send response for gateway socket integration (except for connection request)
129
- - fix ExpressWrapper handle APi gateway socket message data
130
- - fix LocalSocketManager get socket by id
131
- - fix auth resolver typing
132
- - fix socket data parsing problem
133
- - fix local socket manager subscribe
134
- - update redis client to v4
135
-
136
- #### 3.3.10
137
-
138
- - fix LambdaWrapper receive ClaireApp factory
139
- - socket pong return original data
140
- - fix ModelRepository getNestedQueries
141
- - add ops to ICrudRepository
142
-
143
- #### 3.3.5
144
-
145
- - fix socket auth provider
146
- - add getSocketsByChannels
147
- - fix express server exit close connection
148
- - update socket manager to support multiple instances
149
-
150
- #### 3.2.8
151
-
152
- - fix CrudHttpController condition check for update body
153
-
154
- #### 3.2.6
155
-
156
- - add cache to RedisRbacAuthProvider
157
-
158
- #### 3.2.5
159
-
160
- - add TfaRequired() decorator and hasTfa to IPrincipal
161
- - abstract DefaultHttpRequestHandler accessControl
162
-
163
- #### 3.2.4
164
-
165
- - IPrincipal id to be any
166
-
167
- #### 3.2.3
168
-
169
- - simplify dto dissolver interface
170
- - introduce DtoRepository
171
-
172
- #### 3.2.0
173
-
174
- - introduce ICrudRepository
175
- - CrudHttpController now requires param of ICrudRepository
176
-
177
- #### 3.1.16
178
-
179
- - fix uri mapper in CRUD update request
180
-
181
- #### 3.1.15
182
-
183
- - re-implement @CurrentUser decorator
184
-
185
- #### 3.1.14
186
-
187
- - fix UriMapper & UriMapperHandler types
188
-
189
- #### 3.1.13
190
-
191
- - provide IQueryProvider to uriMapper, move uriMapper to server logic
192
- - provide tmpUri to uriMapper in ModelRepository
193
-
194
- #### 3.1.11
195
-
196
- - fix CrudHttpController missing description
197
- - fix projection query data type
198
-
199
- #### 3.1.9
200
-
201
- - strip response data if responseDto is present
202
-
203
- #### 3.1.8
204
-
205
- - return 401 http code if not auth throw
206
-
207
- #### 3.1.7
208
-
209
- - fix CrudHtppController merge wrong endpoint
210
-
211
- #### 3.1.5
212
-
213
- - fix aws socket manager parse null redis
214
-
215
- #### 3.1.4
216
-
217
- - abstract file service and cache service does not extends AbstractService anymore
218
- - fix abstract file service
219
-
220
- #### 3.1.2
221
-
222
- - fix server socket sending incorrect plain message
223
-
224
- #### 3.1.1
225
-
226
- - fix server socket
227
- - add permission conditions to CrudHttpController
228
- - add abstract services
229
- - add FileUploadHandler
230
- - add Abstract RbacAuthProvider, Redis & Cache Rbac Auth Provider
231
- - add rbac dto
232
- - add MaximumQueryLimit & DtoFieldValidation conditions
233
-
234
- #### 3.0.36
235
-
236
- - fix crud controller metadata
237
-
238
- #### 3.0.33
239
-
240
- - add @ApiDescription
241
- - add CrudHttpController metadata description
242
-
243
- #### 3.0.30
244
-
245
- - fix objectTypeConstructor
246
-
247
- #### 3.0.29:
248
-
249
- - @Socket -> @Message
250
- - use @Socket to get socket injection in controller method
251
-
252
- #### 3.0.26:
253
-
254
- - add error log in http request handler
255
-
256
- #### 3.0.25:
257
-
258
- - add null search in vector
259
- - support array search for isSymbol field
260
-
261
- #### 3.0.22:
262
-
263
- - fix timestamp field
264
-
265
- #### 3.0.19:
266
-
267
- - fix error throw in transactional
268
-
269
- #### 3.0.18:
270
-
271
- - fix not escape search value
272
- - fix accent & sensitive search in Mysql and Postgres
273
-
274
- #### 3.0.15:
275
-
276
- - require injection of database adapter in AbstractSerivce & AbstractHttpController
277
-
278
- #### 3.0.14:
279
-
280
- - add getById and getByIds to IQuery
281
-
282
- #### 3.0.12:
283
-
284
- - fix error return
285
-
286
- #### 3.0.10:
287
-
288
- - remove count query when getOne
289
-
290
- #### 3.0.8:
291
-
292
- - freeze table name in join clause
293
-
294
- #### 3.0.6:
295
-
296
- - fix index export
297
- - fix AbstractAccessCondition signature
298
-
299
- #### 3.0.5:
300
-
301
- - tested on Postgres & MySql
302
- - add join ability to IQuery, awesome!!
303
-
304
- #### 3.0.3: http method decorator return type check
305
-
306
- - add @ApiResponse decorator to store response body validator
307
- - add TypedPropertyDescriptor in HTTP method decorator to validate function return type (Promise<HttpResponse<any>>>)
308
-
309
- #### 3.0.2: improve http response
310
-
311
- - add binary response
312
-
313
- #### 3.0.0:
314
-
315
- - update claire core 3.0
316
- - controller function param decorators
317
- - ResponseBuilder
318
- - remove ops in getMany
319
-
320
- #### 2.3.13:
321
-
322
- - update raw query function signature
323
-
324
- #### 2.3.12:
325
-
326
- - fix & export CrudService
327
-
328
- #### 2.3.10:
329
-
330
- - Array & Object model field persist & parse
331
-
332
- #### 2.3.9:
333
-
334
- - @TextField will default to Sequelize.TEXT if length is not specified
335
-
336
- #### 2.3.6:
337
-
338
- - fix missing beforeCreate call when update nesting
339
-
340
- #### 2.3.1:
341
-
342
- - fix returning nested uris
343
-
344
- #### 2.3.0:
345
-
346
- - introduce CrudService
347
- - CrudHttpController support @HasMany
348
-
349
- #### 2.2.12:
350
-
351
- - fix isIntegral default
352
-
353
- #### 2.2.10:
354
-
355
- - update `CrudHttpController` Update and Delete to return `Partial<T>`
356
-
357
- #### 2.2.2:
358
-
359
- - fix `@CurrentUser` decorator
360
- - implement `@CurrentUser` decorator
361
-
362
- #### 2.2.0:
363
-
364
- - add `AbstractFileUploadHandler` and handle file upload in `CrudHttpController`
365
- - fix migration contraint remove order
366
-
367
- #### 2.1.20:
368
-
369
- - extends IPrincipal
370
-
371
- #### 2.1.19:
372
-
373
- - fix crud http controller not init database adapter
374
-
375
- #### 2.1.18:
376
-
377
- - downgrade webpack
378
-
379
- #### 2.1.16:
380
-
381
- - add pg-hstore
382
-
383
- #### 2.1.15:
384
-
385
- - add optional injection for socket manager
386
-
387
- #### 2.1.14:
388
-
389
- - AwsSocketManger needs always to be fed by JSON object
390
-
391
- #### 2.1.13:
392
-
393
- - correct json parsing when hanling aws socket message
394
-
395
- #### 2.1.11:
396
-
397
- - adjust getMany and getRecords to return Pick type based on projection
398
- - add getRecords for IQuery to return just the records
399
-
400
- #### 2.1.9:
401
-
402
- - fix CrudHttpController updateMany FilterField condition check
403
-
404
- #### 2.1.8:
405
-
406
- - fix server socket remove not delete its redis info
407
- - add socket created timestamp info
408
- - add get all alive sockets to remove stale sockets in server
409
-
410
- #### 2.1.5:
411
-
412
- - support model defualt value in db migrator & adapter
413
-
414
- #### 2.1.3:
415
-
416
- - add test for cascade delete
417
-
418
- #### 2.1.2:
419
-
420
- - update claire core
421
- - fix converting QueryCondition use "and" as default operator
422
-
423
- #### 2.1.1:
424
-
425
- - update claire core
426
- - update implementation of FileLogMedium
427
-
428
- #### 2.0.26:
429
-
430
- - parse client socket data
431
- - add more debug log
432
- - fix ExpressWrapper AWS GW socket http integration
433
-
434
- #### 2.0.17:
435
-
436
- - add AWS API GW socket request parser for express
437
-
438
- #### 2.0.16:
439
-
440
- - add log to http request handler
441
- - refactor to allow AwsSocketManager to be used with ExpressWrapper
442
-
443
- #### 2.0.14:
444
-
445
- - fix express socket unique id
446
-
447
- #### 2.0.13:
448
-
449
- - update error code from claire core
450
-
451
- #### 2.0.12:
452
-
453
- - export Get, Post, Put, Del decorators
454
-
455
- #### 2.0.11:
456
-
457
- - add log in http request handler
458
- - fix AbstractAccessCondition signature
459
-
460
- #### 2.0.9:
461
-
462
- - fix AccessCondition (to use injection)
463
- - fix ExpressWrapper & LambdaWrapper to resolve AbstractServerSocketManager
464
- - remove getMountedEndpointInfo from AbstractHttpRequestHandler, move to ServerGlobalStore
465
- - fix property assignment in isolated transactional object
466
- - add log for AwsSocketManager, fix connection problem to redis
467
-
468
- #### 2.0.1:
469
-
470
- - fix some import redundancies
471
-
472
- #### 2.0.0:
473
-
474
- - Upgrade with claire core 2.0.0
475
-
476
- #### 1.6.4:
477
-
478
- - Add pong socket response
479
-
480
- #### 1.6.3:
481
-
482
- - AbstractDatabaseMigrator: supply migration directory to migrate and rollback functions
483
- - fix migrator cli path
484
-
485
- #### 1.6.1:
486
-
487
- - AbstractPrincipal -> IPrincipal (for serialization)
488
-
489
- #### 1.5.51:
490
-
491
- - fix AwsSocketManager not release redis connection, add more log
492
- - fix ExpressWrapper unhandled socket promise exception
493
-
494
- #### 1.5.39 (Breaking change):
495
-
496
- - fix properties null check
497
- - socket multiplex
498
-
499
- #### 1.5.28:
500
-
501
- - fix server socket authId => authInfo
502
-
503
- #### 1.5.26:
504
-
505
- - add OwnedResourceAccessCondition
506
-
507
- #### 1.5.24:
508
-
509
- - replace HttpRequest.getPrincipalId by HttpRequest.getAuthInfo
510
-
511
- #### 1.5.23:
512
-
513
- - fix ServerSocket
514
- - fix not remove disconnect socket from socket manager
515
-
516
- #### 1.5.15 (Breaking change):
517
-
518
- - remove getValue / setValue in HttpRequest
519
- - add setPrincipalId / getPrincipalId in HttpRequest
520
- - adjust Socket Server
521
-
522
- #### 1.5.12:
523
-
524
- - handle socket in lambda wrapper
525
-
526
- #### 1.5.11:
527
-
528
- - fix ServerSocket
529
-
530
- #### 1.5.6:
531
-
532
- - update claire core
533
- - fix ServerSocket
534
-
535
- #### 1.5.4:
536
-
537
- - run middleware before socket authentication
538
-
539
- #### 1.5.2:
540
-
541
- - add websocket support in ExpressWrapper
542
-
543
- #### 1.5.1:
544
-
545
- - update claire core
546
-
547
- #### 1.5.0:
548
-
549
- - revert back to 1.3.38
550
-
551
- #### 1.3.38:
552
-
553
- - export QueryCondition
554
-
555
- #### 1.3.37:
556
-
557
- - return error name instead of TRANSACTION_ERROR
558
- - update claire core
559
-
560
- #### 1.3.36:
561
-
562
- - fix missing down script of unique constraint in database migrator
563
- - add rollback to database migrator
564
-
565
- #### 1.3.34:
566
-
567
- - export AbstractDatabaseMigrator
568
- - fix DefaultSqlDatabaseMigrator not generate new unique constraints for new field
569
-
570
- #### 1.3.32:
571
-
572
- - fix DefaultSqlDatabaseMigrator missing foreign constraint check when add/remove fields
573
-
574
- #### 1.3.31:
575
-
576
- - update server modify
577
-
578
- #### 1.3.30:
579
-
580
- - adjust body raw parser in ExpressWrapper
581
-
582
- #### 1.3.28:
583
-
584
- - fix not supply HttpResponse in Http handler
585
-
586
- #### 1.3.27:
587
-
588
- - add body parser raw middleware
589
-
590
- #### 1.3.26:
591
-
592
- - modify express wrapper send result
593
-
594
- #### 1.3.25:
595
-
596
- - add request options mapper in LambdaWrapper
597
-
598
- #### 1.3.24:
599
-
600
- - add LambdaWrapper
601
-
602
- #### 1.3.23:
603
-
604
- - add ExpressWrapper
605
-
606
- #### 1.3.22:
607
-
608
- - merge accessConditions in CrudHttpController
609
-
610
- #### 1.3.21:
611
-
612
- - DefaultSqlDatabaseMigrator will no longer generate remove table query.
613
-
614
- #### 1.3.20:
615
-
616
- - add permissionGroup and displayName metadata for EndpointMetadata
617
-
618
- #### 1.3.16:
619
-
620
- - update claire core
621
- - allow empty records for CrudHttpController createMany
622
-
623
- #### 1.3.15:
624
-
625
- - fix incorrect parse Http params
626
-
627
- #### 1.3.13:
628
-
629
- - update claire core
630
-
631
- #### 1.3.12:
632
-
633
- - re-introduce terser plugin
634
- - update claire core
635
-
636
- #### 1.3.10:
637
-
638
- - emit source map
639
-
640
- #### 1.3.9:
641
-
642
- - update claire core
643
-
644
- #### 1.3.8:
645
-
646
- - fix missing HttpResponse export
647
-
648
- #### 1.3.7:
649
-
650
- - upgrade Clairejs/core
651
-
652
- #### 1.3.6:
653
-
654
- - upgrade Clairejs/core
655
-
656
- - interpret @ServerTime and @Timestamp
657
-
658
- #### 1.3.2 (Breaking change):
659
-
660
- - re-introduce http response to controller
661
-
662
- #### 1.2.6:
663
-
664
- - add unaccent operators (uSUBSTR, iuSUBSTR)
665
-
666
- #### 1.2.5:
667
-
668
- - allow multiple calls to boot
669
-
670
- #### 1.2.4:
671
-
672
- - fix http request handler parse get and delete request body
673
-
674
- #### 1.2.2:
675
-
676
- - split database migrator
677
- - rework of ClaireServer to be request handler
678
- - remove dependency of expressjs and its middleware
679
-
680
- #### 1.1.9:
681
-
682
- - revert 1.1.8
683
-
684
- #### 1.1.8:
685
-
686
- - init app when getExpressApp
687
-
688
- #### 1.1.7:
689
-
690
- - add pg-hstore as dependency
691
-
692
- #### 1.1.6:
693
-
694
- - fix autoCommit in @Transactional
695
-
696
- #### 1.1.5:
697
-
698
- - use AbstractModel id field for primary key query
699
-
700
- #### 1.1.3:
701
-
702
- - fix returning ids for updateMany and deleteMany
703
-
704
- #### 1.1.2:
705
-
706
- - fix not auto generate migration when changing cascade of @FK
707
- - set build target es6
708
-
709
- #### 1.1.0:
710
-
711
- - fix foreign key cascase delete
712
- - fix auto commit of crud http controller
713
- - return array of ids when updateMany or deleteMany
714
-
715
- #### 1.0.22:
716
-
717
- - CrudHttpController exposes static validators
718
-
719
- #### 1.0.21:
720
-
721
- - update Clairejs Core
722
-
723
- #### 1.0.20:
724
-
725
- - update CrudHttpController for query change
726
-
727
- #### 1.0.17:
728
-
729
- - perform json parsing for fields of request params and queries
730
-
731
- #### 1.0.15:
732
-
733
- - fix @Searchable in CrudHttpController
734
-
735
- #### 1.0.13:
736
-
737
- - add iSUBSTR operator to search for case insensitive string
738
-
739
- #### 1.0.9:
740
-
741
- - fix CrudHttpController endpoint naming
742
-
743
- #### 1.0.8:
744
-
745
- - fix DefaultHttpRequestHandler upgrade Http
746
-
747
- #### 1.0.6:
748
-
749
- - fix DefaultHttpRequestHandler cannot return request body when no validator is provided
1
+ ## Change Log
2
+
3
+ #### 3.11.0
4
+
5
+ - merge with @clairejs/base-server
6
+
7
+ #### 3.10.17
8
+
9
+ - fix lambda request mapper parsing cookies
10
+ - move cors config to AbstractHttpRequestHandler
11
+
12
+ #### 3.10.15
13
+
14
+ - add / adjust cors setting
15
+ - add cookie parser
16
+ - fix set cookie with options
17
+ - fix express & lambda wrapper to return cookies
18
+
19
+ #### 3.10.7
20
+
21
+ - add random to order option in model repository
22
+ - socket_read -> disable_write, socket_write -> disable_read
23
+
24
+ #### 3.10.5
25
+
26
+ - AbstractJobScheduler run job with spread params
27
+ - use setTimeout for local scheduler at timestamp
28
+ - fix AwsJobScheduler cron expression
29
+ - breaking change update to AbstractFileService
30
+
31
+ #### 3.9.2
32
+
33
+ - moving and using crud dto factory from claire core
34
+ - add expire param to AbstractCacheService set
35
+
36
+ #### 3.9.0
37
+
38
+ - fix AbstractHttpMiddleware to accept response as second param and return boolean as result
39
+
40
+ #### 3.8.8
41
+
42
+ - update core package, reduce db calls in ModelRepository
43
+ - allow nested update HasMany / HasOne field in ModelRepository
44
+
45
+ #### 3.8.6
46
+
47
+ - fix auto fill of post/put default value (no more auto fill, because of access condition check)
48
+ - fix getMany projection in ModelRepository
49
+ - fix hasMany fields in CRUD projection
50
+
51
+ #### 3.8.3
52
+
53
+ - RedisRbacAuthProvider service id resolver
54
+
55
+ #### 3.8.1
56
+
57
+ - fix @CurrentUser does no more require Identifiable class
58
+ - fix default locale reading empty object properties in ModelRepository
59
+
60
+ #### 3.8.0
61
+
62
+ - add @LocaleOf decorator
63
+ - handle multi-locale for ModelRepository & CrudHtppController
64
+
65
+ #### 3.7.12
66
+
67
+ - handle gcd of interval to reduce step function trigger rate
68
+ - handle cron event for lambda wrapper
69
+ - fix remove cron job for AwsJobScheduler
70
+ - fix cron expression
71
+ - fix rate 1 minute without 's'
72
+ - add more debug log
73
+ - fix cron expression validation
74
+ - remove job executor
75
+ - implement AwsJobScheduler (EventBridge + Step Function)
76
+ - fix LocalJobScheduler interface
77
+ - allow persist LocalJobScheduler job info & multi instance support
78
+
79
+ #### 3.6.23
80
+
81
+ - unify handle not found error
82
+ - fix create many does not return mime field in CrudHttpController
83
+ - fix local socket manager buffer message while socket is creating
84
+ - fix async handling in lambda socket manager
85
+ - handling READY socket message
86
+ - fix AwsSocketManager does not remove socket from redis when disconnect
87
+ - handle default "" or "/" endpoint correctly
88
+ - fix CrudHttpController filter by boolean field
89
+ - fix AwsSocketManager not remove socket from channel after disconnection
90
+ - support @HasOne for Crud controller
91
+ - fix nested queries for ModelRepository
92
+
93
+ #### 3.6.3
94
+
95
+ - fix onChannelConnected cannot send back data to socket (because socket was not yet added to channel and old instance was used)
96
+ - add READY socket message
97
+
98
+ #### 3.6.0
99
+
100
+ - move database to @clairejs/orm package. Bye bye...
101
+
102
+ #### 3.5.4
103
+
104
+ - fix aws get socket by id
105
+ - send error when close socket
106
+ - remove constructor dependency of socket connection handler in socket managers
107
+
108
+ #### 3.5.0
109
+
110
+ - use ioredis instead of redis (for redlock to work)
111
+ - update job interfaces
112
+ - adapt socket managers to use ioredis
113
+
114
+ #### 3.4.0
115
+
116
+ - add job related classes
117
+
118
+ #### 3.3.27
119
+
120
+ - add random order
121
+ - add \_nin operator
122
+
123
+ #### 3.3.26
124
+
125
+ - remove socket if authentication failed for aws socket manager
126
+ - fix lambda request mapper
127
+ - fix Express parse Api gateway query for socket connection
128
+ - add debug log
129
+ - refactor principal data resolver for socket manager
130
+
131
+ #### 3.3.19
132
+
133
+ - ExpressWrapper don't send response for gateway socket integration (except for connection request)
134
+ - fix ExpressWrapper handle APi gateway socket message data
135
+ - fix LocalSocketManager get socket by id
136
+ - fix auth resolver typing
137
+ - fix socket data parsing problem
138
+ - fix local socket manager subscribe
139
+ - update redis client to v4
140
+
141
+ #### 3.3.10
142
+
143
+ - fix LambdaWrapper receive ClaireApp factory
144
+ - socket pong return original data
145
+ - fix ModelRepository getNestedQueries
146
+ - add ops to ICrudRepository
147
+
148
+ #### 3.3.5
149
+
150
+ - fix socket auth provider
151
+ - add getSocketsByChannels
152
+ - fix express server exit close connection
153
+ - update socket manager to support multiple instances
154
+
155
+ #### 3.2.8
156
+
157
+ - fix CrudHttpController condition check for update body
158
+
159
+ #### 3.2.6
160
+
161
+ - add cache to RedisRbacAuthProvider
162
+
163
+ #### 3.2.5
164
+
165
+ - add TfaRequired() decorator and hasTfa to IPrincipal
166
+ - abstract DefaultHttpRequestHandler accessControl
167
+
168
+ #### 3.2.4
169
+
170
+ - IPrincipal id to be any
171
+
172
+ #### 3.2.3
173
+
174
+ - simplify dto dissolver interface
175
+ - introduce DtoRepository
176
+
177
+ #### 3.2.0
178
+
179
+ - introduce ICrudRepository
180
+ - CrudHttpController now requires param of ICrudRepository
181
+
182
+ #### 3.1.16
183
+
184
+ - fix uri mapper in CRUD update request
185
+
186
+ #### 3.1.15
187
+
188
+ - re-implement @CurrentUser decorator
189
+
190
+ #### 3.1.14
191
+
192
+ - fix UriMapper & UriMapperHandler types
193
+
194
+ #### 3.1.13
195
+
196
+ - provide IQueryProvider to uriMapper, move uriMapper to server logic
197
+ - provide tmpUri to uriMapper in ModelRepository
198
+
199
+ #### 3.1.11
200
+
201
+ - fix CrudHttpController missing description
202
+ - fix projection query data type
203
+
204
+ #### 3.1.9
205
+
206
+ - strip response data if responseDto is present
207
+
208
+ #### 3.1.8
209
+
210
+ - return 401 http code if not auth throw
211
+
212
+ #### 3.1.7
213
+
214
+ - fix CrudHtppController merge wrong endpoint
215
+
216
+ #### 3.1.5
217
+
218
+ - fix aws socket manager parse null redis
219
+
220
+ #### 3.1.4
221
+
222
+ - abstract file service and cache service does not extends AbstractService anymore
223
+ - fix abstract file service
224
+
225
+ #### 3.1.2
226
+
227
+ - fix server socket sending incorrect plain message
228
+
229
+ #### 3.1.1
230
+
231
+ - fix server socket
232
+ - add permission conditions to CrudHttpController
233
+ - add abstract services
234
+ - add FileUploadHandler
235
+ - add Abstract RbacAuthProvider, Redis & Cache Rbac Auth Provider
236
+ - add rbac dto
237
+ - add MaximumQueryLimit & DtoFieldValidation conditions
238
+
239
+ #### 3.0.36
240
+
241
+ - fix crud controller metadata
242
+
243
+ #### 3.0.33
244
+
245
+ - add @ApiDescription
246
+ - add CrudHttpController metadata description
247
+
248
+ #### 3.0.30
249
+
250
+ - fix objectTypeConstructor
251
+
252
+ #### 3.0.29:
253
+
254
+ - @Socket -> @Message
255
+ - use @Socket to get socket injection in controller method
256
+
257
+ #### 3.0.26:
258
+
259
+ - add error log in http request handler
260
+
261
+ #### 3.0.25:
262
+
263
+ - add null search in vector
264
+ - support array search for isSymbol field
265
+
266
+ #### 3.0.22:
267
+
268
+ - fix timestamp field
269
+
270
+ #### 3.0.19:
271
+
272
+ - fix error throw in transactional
273
+
274
+ #### 3.0.18:
275
+
276
+ - fix not escape search value
277
+ - fix accent & sensitive search in Mysql and Postgres
278
+
279
+ #### 3.0.15:
280
+
281
+ - require injection of database adapter in AbstractSerivce & AbstractHttpController
282
+
283
+ #### 3.0.14:
284
+
285
+ - add getById and getByIds to IQuery
286
+
287
+ #### 3.0.12:
288
+
289
+ - fix error return
290
+
291
+ #### 3.0.10:
292
+
293
+ - remove count query when getOne
294
+
295
+ #### 3.0.8:
296
+
297
+ - freeze table name in join clause
298
+
299
+ #### 3.0.6:
300
+
301
+ - fix index export
302
+ - fix AbstractAccessCondition signature
303
+
304
+ #### 3.0.5:
305
+
306
+ - tested on Postgres & MySql
307
+ - add join ability to IQuery, awesome!!
308
+
309
+ #### 3.0.3: http method decorator return type check
310
+
311
+ - add @ApiResponse decorator to store response body validator
312
+ - add TypedPropertyDescriptor in HTTP method decorator to validate function return type (Promise<HttpResponse<any>>>)
313
+
314
+ #### 3.0.2: improve http response
315
+
316
+ - add binary response
317
+
318
+ #### 3.0.0:
319
+
320
+ - update claire core 3.0
321
+ - controller function param decorators
322
+ - ResponseBuilder
323
+ - remove ops in getMany
324
+
325
+ #### 2.3.13:
326
+
327
+ - update raw query function signature
328
+
329
+ #### 2.3.12:
330
+
331
+ - fix & export CrudService
332
+
333
+ #### 2.3.10:
334
+
335
+ - Array & Object model field persist & parse
336
+
337
+ #### 2.3.9:
338
+
339
+ - @TextField will default to Sequelize.TEXT if length is not specified
340
+
341
+ #### 2.3.6:
342
+
343
+ - fix missing beforeCreate call when update nesting
344
+
345
+ #### 2.3.1:
346
+
347
+ - fix returning nested uris
348
+
349
+ #### 2.3.0:
350
+
351
+ - introduce CrudService
352
+ - CrudHttpController support @HasMany
353
+
354
+ #### 2.2.12:
355
+
356
+ - fix isIntegral default
357
+
358
+ #### 2.2.10:
359
+
360
+ - update `CrudHttpController` Update and Delete to return `Partial<T>`
361
+
362
+ #### 2.2.2:
363
+
364
+ - fix `@CurrentUser` decorator
365
+ - implement `@CurrentUser` decorator
366
+
367
+ #### 2.2.0:
368
+
369
+ - add `AbstractFileUploadHandler` and handle file upload in `CrudHttpController`
370
+ - fix migration contraint remove order
371
+
372
+ #### 2.1.20:
373
+
374
+ - extends IPrincipal
375
+
376
+ #### 2.1.19:
377
+
378
+ - fix crud http controller not init database adapter
379
+
380
+ #### 2.1.18:
381
+
382
+ - downgrade webpack
383
+
384
+ #### 2.1.16:
385
+
386
+ - add pg-hstore
387
+
388
+ #### 2.1.15:
389
+
390
+ - add optional injection for socket manager
391
+
392
+ #### 2.1.14:
393
+
394
+ - AwsSocketManger needs always to be fed by JSON object
395
+
396
+ #### 2.1.13:
397
+
398
+ - correct json parsing when hanling aws socket message
399
+
400
+ #### 2.1.11:
401
+
402
+ - adjust getMany and getRecords to return Pick type based on projection
403
+ - add getRecords for IQuery to return just the records
404
+
405
+ #### 2.1.9:
406
+
407
+ - fix CrudHttpController updateMany FilterField condition check
408
+
409
+ #### 2.1.8:
410
+
411
+ - fix server socket remove not delete its redis info
412
+ - add socket created timestamp info
413
+ - add get all alive sockets to remove stale sockets in server
414
+
415
+ #### 2.1.5:
416
+
417
+ - support model defualt value in db migrator & adapter
418
+
419
+ #### 2.1.3:
420
+
421
+ - add test for cascade delete
422
+
423
+ #### 2.1.2:
424
+
425
+ - update claire core
426
+ - fix converting QueryCondition use "and" as default operator
427
+
428
+ #### 2.1.1:
429
+
430
+ - update claire core
431
+ - update implementation of FileLogMedium
432
+
433
+ #### 2.0.26:
434
+
435
+ - parse client socket data
436
+ - add more debug log
437
+ - fix ExpressWrapper AWS GW socket http integration
438
+
439
+ #### 2.0.17:
440
+
441
+ - add AWS API GW socket request parser for express
442
+
443
+ #### 2.0.16:
444
+
445
+ - add log to http request handler
446
+ - refactor to allow AwsSocketManager to be used with ExpressWrapper
447
+
448
+ #### 2.0.14:
449
+
450
+ - fix express socket unique id
451
+
452
+ #### 2.0.13:
453
+
454
+ - update error code from claire core
455
+
456
+ #### 2.0.12:
457
+
458
+ - export Get, Post, Put, Del decorators
459
+
460
+ #### 2.0.11:
461
+
462
+ - add log in http request handler
463
+ - fix AbstractAccessCondition signature
464
+
465
+ #### 2.0.9:
466
+
467
+ - fix AccessCondition (to use injection)
468
+ - fix ExpressWrapper & LambdaWrapper to resolve AbstractServerSocketManager
469
+ - remove getMountedEndpointInfo from AbstractHttpRequestHandler, move to ServerGlobalStore
470
+ - fix property assignment in isolated transactional object
471
+ - add log for AwsSocketManager, fix connection problem to redis
472
+
473
+ #### 2.0.1:
474
+
475
+ - fix some import redundancies
476
+
477
+ #### 2.0.0:
478
+
479
+ - Upgrade with claire core 2.0.0
480
+
481
+ #### 1.6.4:
482
+
483
+ - Add pong socket response
484
+
485
+ #### 1.6.3:
486
+
487
+ - AbstractDatabaseMigrator: supply migration directory to migrate and rollback functions
488
+ - fix migrator cli path
489
+
490
+ #### 1.6.1:
491
+
492
+ - AbstractPrincipal -> IPrincipal (for serialization)
493
+
494
+ #### 1.5.51:
495
+
496
+ - fix AwsSocketManager not release redis connection, add more log
497
+ - fix ExpressWrapper unhandled socket promise exception
498
+
499
+ #### 1.5.39 (Breaking change):
500
+
501
+ - fix properties null check
502
+ - socket multiplex
503
+
504
+ #### 1.5.28:
505
+
506
+ - fix server socket authId => authInfo
507
+
508
+ #### 1.5.26:
509
+
510
+ - add OwnedResourceAccessCondition
511
+
512
+ #### 1.5.24:
513
+
514
+ - replace HttpRequest.getPrincipalId by HttpRequest.getAuthInfo
515
+
516
+ #### 1.5.23:
517
+
518
+ - fix ServerSocket
519
+ - fix not remove disconnect socket from socket manager
520
+
521
+ #### 1.5.15 (Breaking change):
522
+
523
+ - remove getValue / setValue in HttpRequest
524
+ - add setPrincipalId / getPrincipalId in HttpRequest
525
+ - adjust Socket Server
526
+
527
+ #### 1.5.12:
528
+
529
+ - handle socket in lambda wrapper
530
+
531
+ #### 1.5.11:
532
+
533
+ - fix ServerSocket
534
+
535
+ #### 1.5.6:
536
+
537
+ - update claire core
538
+ - fix ServerSocket
539
+
540
+ #### 1.5.4:
541
+
542
+ - run middleware before socket authentication
543
+
544
+ #### 1.5.2:
545
+
546
+ - add websocket support in ExpressWrapper
547
+
548
+ #### 1.5.1:
549
+
550
+ - update claire core
551
+
552
+ #### 1.5.0:
553
+
554
+ - revert back to 1.3.38
555
+
556
+ #### 1.3.38:
557
+
558
+ - export QueryCondition
559
+
560
+ #### 1.3.37:
561
+
562
+ - return error name instead of TRANSACTION_ERROR
563
+ - update claire core
564
+
565
+ #### 1.3.36:
566
+
567
+ - fix missing down script of unique constraint in database migrator
568
+ - add rollback to database migrator
569
+
570
+ #### 1.3.34:
571
+
572
+ - export AbstractDatabaseMigrator
573
+ - fix DefaultSqlDatabaseMigrator not generate new unique constraints for new field
574
+
575
+ #### 1.3.32:
576
+
577
+ - fix DefaultSqlDatabaseMigrator missing foreign constraint check when add/remove fields
578
+
579
+ #### 1.3.31:
580
+
581
+ - update server modify
582
+
583
+ #### 1.3.30:
584
+
585
+ - adjust body raw parser in ExpressWrapper
586
+
587
+ #### 1.3.28:
588
+
589
+ - fix not supply HttpResponse in Http handler
590
+
591
+ #### 1.3.27:
592
+
593
+ - add body parser raw middleware
594
+
595
+ #### 1.3.26:
596
+
597
+ - modify express wrapper send result
598
+
599
+ #### 1.3.25:
600
+
601
+ - add request options mapper in LambdaWrapper
602
+
603
+ #### 1.3.24:
604
+
605
+ - add LambdaWrapper
606
+
607
+ #### 1.3.23:
608
+
609
+ - add ExpressWrapper
610
+
611
+ #### 1.3.22:
612
+
613
+ - merge accessConditions in CrudHttpController
614
+
615
+ #### 1.3.21:
616
+
617
+ - DefaultSqlDatabaseMigrator will no longer generate remove table query.
618
+
619
+ #### 1.3.20:
620
+
621
+ - add permissionGroup and displayName metadata for EndpointMetadata
622
+
623
+ #### 1.3.16:
624
+
625
+ - update claire core
626
+ - allow empty records for CrudHttpController createMany
627
+
628
+ #### 1.3.15:
629
+
630
+ - fix incorrect parse Http params
631
+
632
+ #### 1.3.13:
633
+
634
+ - update claire core
635
+
636
+ #### 1.3.12:
637
+
638
+ - re-introduce terser plugin
639
+ - update claire core
640
+
641
+ #### 1.3.10:
642
+
643
+ - emit source map
644
+
645
+ #### 1.3.9:
646
+
647
+ - update claire core
648
+
649
+ #### 1.3.8:
650
+
651
+ - fix missing HttpResponse export
652
+
653
+ #### 1.3.7:
654
+
655
+ - upgrade Clairejs/core
656
+
657
+ #### 1.3.6:
658
+
659
+ - upgrade Clairejs/core
660
+
661
+ - interpret @ServerTime and @Timestamp
662
+
663
+ #### 1.3.2 (Breaking change):
664
+
665
+ - re-introduce http response to controller
666
+
667
+ #### 1.2.6:
668
+
669
+ - add unaccent operators (uSUBSTR, iuSUBSTR)
670
+
671
+ #### 1.2.5:
672
+
673
+ - allow multiple calls to boot
674
+
675
+ #### 1.2.4:
676
+
677
+ - fix http request handler parse get and delete request body
678
+
679
+ #### 1.2.2:
680
+
681
+ - split database migrator
682
+ - rework of ClaireServer to be request handler
683
+ - remove dependency of expressjs and its middleware
684
+
685
+ #### 1.1.9:
686
+
687
+ - revert 1.1.8
688
+
689
+ #### 1.1.8:
690
+
691
+ - init app when getExpressApp
692
+
693
+ #### 1.1.7:
694
+
695
+ - add pg-hstore as dependency
696
+
697
+ #### 1.1.6:
698
+
699
+ - fix autoCommit in @Transactional
700
+
701
+ #### 1.1.5:
702
+
703
+ - use AbstractModel id field for primary key query
704
+
705
+ #### 1.1.3:
706
+
707
+ - fix returning ids for updateMany and deleteMany
708
+
709
+ #### 1.1.2:
710
+
711
+ - fix not auto generate migration when changing cascade of @FK
712
+ - set build target es6
713
+
714
+ #### 1.1.0:
715
+
716
+ - fix foreign key cascase delete
717
+ - fix auto commit of crud http controller
718
+ - return array of ids when updateMany or deleteMany
719
+
720
+ #### 1.0.22:
721
+
722
+ - CrudHttpController exposes static validators
723
+
724
+ #### 1.0.21:
725
+
726
+ - update Clairejs Core
727
+
728
+ #### 1.0.20:
729
+
730
+ - update CrudHttpController for query change
731
+
732
+ #### 1.0.17:
733
+
734
+ - perform json parsing for fields of request params and queries
735
+
736
+ #### 1.0.15:
737
+
738
+ - fix @Searchable in CrudHttpController
739
+
740
+ #### 1.0.13:
741
+
742
+ - add iSUBSTR operator to search for case insensitive string
743
+
744
+ #### 1.0.9:
745
+
746
+ - fix CrudHttpController endpoint naming
747
+
748
+ #### 1.0.8:
749
+
750
+ - fix DefaultHttpRequestHandler upgrade Http
751
+
752
+ #### 1.0.6:
753
+
754
+ - fix DefaultHttpRequestHandler cannot return request body when no validator is provided