claire-framework
TypeScript icon, indicating that this package has built-in type declarations

3.4.2 • Public • Published

Claire v2 là một framework Javascript chuyên dùng cho API server.

  • được viết bằng TypeScript
  • hỗ trợ websocket và HTTP request
  • hỗ trợ CLI để generate base project (claire-cli)

Change Log:

3.4.2 [Breaking change]

  • allow numeric operators (>=, <=, ==, !=) in getAllResource controller

3.3.3 [Breaking change]

  • fix orQueries when queries is empty
  • fix orQueries not push result
  • export bwi (between inclusive)
  • getOne and getMany now support OR operator, receiving each object of query condition as operand
  • add between operator for number

3.2.14

  • add float data type for sql migration
  • @PrimaryKey can be @AutoGen
  • fix convertToDataObjects to avoid getter
  • fix init database adapter
  • fix postgres return string as big int
  • fix order clause in database adapter from 3.2.8 (missing get clean object)
  • fix order clause in database adapter from 3.2.7
  • fix update and create got undefined in field value from 3.2.6
  • fix null value of data object from 3.2.5
  • fix default http resource controller update for getter fields
  • fix default json responder
  • deep json convert for DefaultJsonResponder (AbstractModel aware)
  • introduce NoAccess decorator for http handler

3.2.0 [Breaking change]

  • introduce DefaultAccessConditions

3.1.8

  • Fix IsArray override inner data type
  • DefaultSqlAdapter use Op.in for COMMON_BELONGS operator
  • fix default value function generating
  • fix order in IQuery required other fields
  • DefaultDataValidator check for undefined of number value when using Optional()
  • DefaultSqlAdapter use Op.or for COMMON_BELONGS operator
  • add order in getOne and getMany query

3.0.15

  • add BIGINT support
  • data field should be required by default
  • fix string required check with ''
  • default value accepts function that returns string | number
  • fix missing float data type for sql adapter
  • fix DefaultDataValidator validate default value field
  • fix convertToDataObject of bool value
  • export missing things
  • fix updateOne of database adapters

3.0.0 [Breaking change]

  • introduce dependency injection

2.5.0

  • update and fix Table Mapper bug

2.4.4 [Breaking change]

  • single port for HTTP and Socket
  • unify validator decorators
  • add logic and data field name for model
  • fix some validation logic

2.3.5 [Breaking change]

  • Change DataTable decorator signature
  • Change DataField decorator signature

2.3.4

  • Allow DefaultSqlAdapter to omit migration

2.3.2

  • DefaultEnvProvider parses simple env without env prefix

2.3.1

  • fix DefaultStaticFileController

2.3.0 [Breaking change]

  • fix request upgrader, merge handlers
  • add new controller metadata interface, change HttpHandlerMetadata to ControllerHandlerMetadata

2.2.1

  • fix request handler lost context when calling in lambda function, leads to wrong query, params and body passing

2.2.0 [Breaking change]

  • Fix handler query, params, body async resolve
  • Add @PermissionGroup for controller, modify @Permission for handler
  • Reorder @Validator parameters

2.1.13

  • refactor transaction
  • DefaultHttpResourceController skips skipped field in model when createResource and updateResource
  • fix ModelMetadata dependency sort

2.1.12

  • fix transaction bug in DefaultSqlAdapter, DefaultNoSqlAdapter

2.1.11 [Breaking change]

  • remove env provider from AppContext. We recommend to fully configure the app with env provider before running it.

2.1.10

  • add warning when override controller route
  • fix DefaultEnvProvider parsing boolean
  • add CORS and body parser default implementation
  • add transaction support in database adapter

2.1.9

  • fix DefaultHttpResourceController missing case for array value in getAllResources

2.1.8

  • fix DefaultNoSqlAdapter requires primary key when autoInc with number data type (again, wtf)

2.1.7

  • fix DefaultNoSqlAdapter requires primary key when autoInc with number data type
  • populate autoInc primary key when insert rather than when get

2.1.6

  • fix DefaultSqlAdapter updateMany return 0 when updated value matches found value

2.1.5

  • default HttpResourceController getAllResources has query operator accepts primary key and foreign key query as an array of ids
  • default HttpResourceController getAllResources has query operator accepts string key as regular expression
  • add new regex operator for database adapter

2.1.4

  • fix Boolean converting in DefaultDataValidator, missing data type in DefaultHttpResourceController

2.1 [Breaking change]

  • FileLogMedia rotation by number of day
  • remove using of callback in ClaireBuilder
  • add implementation to almost all abstract classes and provider AppContext in init function
  • fix absolute sequelize-cli call
  • Controller: @OpenAccess decorator to by pass AuthorizationProvider
  • DefaultEnvProvider: add fileNameResolver
  • add SubSet DataValidationRule
  • add query validation for DefaultHttpResourceController
  • add RBAC and IAcccessCondition, ConditionValueType
  • fix DefaultApiDocController exception when getting mount points
  • Modify initable interface to include stop
  • Fix not bootstrap bug
  • Add stoppable to Initable interface

2.0 [Breaking change]

  • refactor set request handler
  • abstract DefaultMongoDBAdapter to DefaultNoSqlAdapter
  • rename Ws to Socket for all classes
  • add DefaultApiDocController for exposing api document
  • allow undefined in log media, controller and service array

1.9.0 [Breaking change]

  • change HTTP controller decorator to Mapping
  • add request params validation and data type parsing
  • improve log readability
  • fix bug of pre-using model -> injection of models
  • adding log of HTTP method in DefaultHttpErrorHandler
  • fix saveOne/saveMany does not populate default value
  • fix findOne not check for primaryType for auto id

1.8.0 [Breaking change]

  • refactor WsChannelHandler, using Message decorator
  • update dependencies and test

1.7.0 [Breaking change]

  • getEnvProvider.load receive class argument instead of generic argument
  • claire.start return Promise and throw ClaireError
  • fix bug: claire.start does not require argument

1.6 [Breaking change]

  • refactor IQueryProvider and IQuery
  • model does no longer need of constructor at definition

1.5 [Breaking change]

  • remove TableMapper Encoding decorator
  • change in DefaultEnvProvider: now using EnvTemplate decorator and EnvVar decorator
  • remove operatorAliases in sequelize option

1.4 [Breaking change]

  • getOne does no more throw Exception. F*ck you getOne. F*ck me too.

1.3 [Breaking change]

  • Initable init function return Promise
  • add boolean type to QueryOperator

1.2 [Breaking change]

  • remove HttpRouteHandler and getRoutes in AbstractHttpController, using decorator instead
  • remove controller implementation of Initable
  • DefaultStaticController has mount path of "/static"
  • fix HttpRouteHandler not init prototype

1.1

  • remove mandatory of responder, middleware, requestValidator, responseValidator in HttpRouteHandler
  • remove generic from IHttpRequest
  • add string validation for DefaultDataValidator
  • add strictTypeCheck option to check HTTP request params (no-strict) and request body (strict)
  • add projection option to getOne and getMany

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
3.4.21latest

Version History

VersionDownloads (Last 7 Days)Published
3.4.21
3.4.11
3.4.00
3.3.39
3.3.20
3.3.10
3.3.00
3.2.142
3.2.132
3.2.120
3.2.111
3.2.100
3.2.90
3.2.80
3.2.74
3.2.62
3.2.50
3.2.40
3.2.365
3.2.20
3.2.10
3.2.00
3.1.80
3.1.70
3.1.60
3.1.50
3.1.44
3.1.30
3.1.21
3.1.10
3.1.00
3.0.150
3.0.140
3.0.130
3.0.127
3.0.110
3.0.100
3.0.90
3.0.80
3.0.70
3.0.60
3.0.50
3.0.40
3.0.31
3.0.21
3.0.11
3.0.00
2.5.00
2.4.52
2.4.40
2.4.30
2.4.20
2.4.10
2.4.01
2.3.56
2.3.40
2.3.32
2.3.24
2.3.10
2.3.011
2.2.10
2.2.01
2.1.131
2.1.120
2.1.110
2.1.105
2.1.90
2.1.80
2.1.70
2.1.60
2.1.50
2.1.46
2.1.31
2.1.29
2.1.10
2.1.08
2.0.10
2.0.00
1.11.00
1.10.17
1.10.00
1.9.30
1.9.23
1.9.10
1.9.00
1.8.10
1.8.00
1.7.10
1.7.00
1.6.14
1.6.00
1.5.15
1.5.00
1.4.01
1.3.11
1.3.02
1.2.10
1.2.00
1.1.250
1.1.240
1.1.230
1.1.221
1.1.210
1.1.200
1.1.191
1.1.182
1.1.173
1.1.160
1.1.150
1.1.140
1.1.130
1.1.1213
1.1.110
1.1.100
1.1.90
1.1.89
1.1.79
1.1.60
1.1.50
1.1.40
1.1.30
1.1.21
1.1.10
1.1.00
1.0.00
0.3.130
0.2.130
0.2.120
0.2.110
0.2.100
0.1.100
0.1.90
0.1.86
0.1.79
0.1.61
0.1.50
0.1.40
0.1.30
0.1.20
0.1.10
0.1.00

Package Sidebar

Install

npm i claire-framework

Weekly Downloads

237

Version

3.4.2

License

ISC

Unpacked Size

487 kB

Total Files

204

Last publish

Collaborators

  • athongintel