Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Releases: serhiisol/node-decorators

Server-1.0.0-beta.7

09 Aug 18:34
252a39d
Compare
Choose a tag to compare
  • Updated @decorators/di to 3.1.0 with support of root container
  • Added root container as parent to application container

Server-1.0.0-beta.10

24 Aug 13:18
c651fc3
Compare
Choose a tag to compare
  • Added missing imports in swagger

Di@3.1.0

09 Aug 18:28
c4b739b
Compare
Choose a tag to compare
  • Introduces Injectable options with providedIn='root' option in it to register root provider.
  • RootContainer is exported out of di package.

Server-1.0.0-beta.6

06 Aug 20:39
Compare
Choose a tag to compare
  • updated validation for simple types
  • adapter.IsHeadersSent - returns now boolean

Server-1.0.0-beta.5

06 Aug 20:23
b0d748a
Compare
Choose a tag to compare
  • Added ability to ignore global version to generate url (useful for example for wildcard routes *)
  • Updated param validation
  • Param extraction returns promise

Server-1.0.0-beta.4

06 Aug 11:12
3e7a2ff
Compare
Choose a tag to compare

1.0.0-beta.4 release:

  • Adds custom parameter decorator error handling - pipes will receive error for handling (#174)
  • Adds error handling for render process (#173, #175)

Express-openapi@2.1.0

06 Aug 11:05
966ae34
Compare
Choose a tag to compare
  • Adds ability to mark property as nullable (resolves #179)

Di@3.0.1

03 Aug 22:33
8934dae
Compare
Choose a tag to compare
  • Optional dips will return undefined instead of null so default values can be used

Server@1.0.0-beta.3

28 Jul 22:10
709aa17
Compare
Choose a tag to compare

Fixed missing typeVersions and exports in package.json

Server@1.0.0-beta.1

28 Jul 16:16
6946e4b
Compare
Choose a tag to compare

Features:

  • Adapters
  • Pipes
  • Payload Validation
  • Modules
  • Simplification
  • Custom Decorators

Adapters

Package is router library agnostic so it's possible to use express, fastify or koa.
In this release only ExpressAdapter is included, more to come.

Pipes

Reimagined middleware. Supports both running code before and after main handler.
There are three types of pipes: global, controller and method at the moment.

Order of Execution:

Global => Controller => Method => Route Handler => Method => Controller => Global

Payload Validation

Based on class-validator and class-transformer system supports payload validation. Standard type validation (i.e. string, object, boolean etc.) is also supported.

@Post('', 200)
create(@Body() post: PostType) {
  return post;
}

@Get(':id', 200)
post(@Params('id') id: string) {
  return { id, name: 'hello world' };
}

Modules

Modules keep providers scoped. Resolved via update of @decorators/di@3.0.0 version that supports nesting of containers. With 3.0.0 update is also possible to use multi providers (available through the same injection token).