@nestia/core 0.1.9 → 0.2.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.
- package/README.md +13 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,17 +5,13 @@
|
|
|
5
5
|
[](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)
|
|
6
6
|
[](https://github.com/samchon/nestia/wiki)
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
npx nestia setup
|
|
10
|
-
```
|
|
8
|
+
Super-fast validation decorators for NestJS.
|
|
11
9
|
|
|
12
|
-
super-fast validation decorators
|
|
13
|
-
|
|
14
|
-
`@nestia/core` is a transformer library of NestJS, supporting super-fast validation decorators, by wrapping [typia](https://github.com/samchon/typia). Comparing validation speed with `class-validator`, `typia` is maximum **15,000x times faster** and it even much safer.
|
|
10
|
+
`@nestia/core` is a transformer library of NestJS, supporting super-fast validation decorators, by wrapping [typia](https://github.com/samchon/typia). Comparing validation speed with `class-validator`, `typia` is maximum **15,000x times faster** and it is even much safer.
|
|
15
11
|
|
|
16
12
|
Furthermore, `@nestia/core` can use pure interface typed DTO with **only one line**.
|
|
17
13
|
|
|
18
|
-
Therefore, it does not require any extra dedication like defining JSON schema (`@nestjs/swagger`) or using class definition with decorator function calls (`class-validator`). Just enjoy the
|
|
14
|
+
Therefore, it does not require any extra dedication like defining JSON schema (`@nestjs/swagger`), or using class definition with decorator function calls (`class-validator`). Just enjoy the superfast decorators with pure TypeScript type.
|
|
19
15
|
|
|
20
16
|
```typescript
|
|
21
17
|
import { Controller } from "@nestjs/common";
|
|
@@ -76,7 +72,7 @@ npx @nestia/core setup --manager yarn
|
|
|
76
72
|
```
|
|
77
73
|
|
|
78
74
|
### Manual Setup
|
|
79
|
-
If you want to install and
|
|
75
|
+
If you want to install and configure `@nestia/core` manually, read [Guide Documents - Setup](https://github.com/samchon/nestia/wiki/Setup).
|
|
80
76
|
|
|
81
77
|
<!-- ### NPM Packages
|
|
82
78
|
If you want to install and configure manually, install `@nestia/core` module first.
|
|
@@ -160,12 +156,18 @@ export class BbsArticlesController {
|
|
|
160
156
|
### TypedBody
|
|
161
157
|
`TypedBody()` is a decorator function of `application/json` typed request body.
|
|
162
158
|
|
|
163
|
-
Also, it supports super-fast validation pipe
|
|
159
|
+
Also, it supports super-fast validation pipe, which is maximum **15,000x times faster** then `nest.Body()` function using `class-validator`.
|
|
164
160
|
|
|
165
161
|
### TypedRoute
|
|
166
|
-
`TypedRoute
|
|
162
|
+
`TypedRoute` is a set of decorator functions for `application/json` typed response body.
|
|
163
|
+
|
|
164
|
+
Also, it supports safe and fast JSON stringify function pipe, which is maximum 10x times faster than native `JSON.stringify()` function. Furthermore, it is **type safe** through validation.
|
|
167
165
|
|
|
168
|
-
|
|
166
|
+
- `TypedRoute.Get()`
|
|
167
|
+
- `TypedRoute.Post()`
|
|
168
|
+
- `TypedRoute.Put()`
|
|
169
|
+
- `TypedRoute.Patch()`
|
|
170
|
+
- `TypedRoute.Delete()`
|
|
169
171
|
|
|
170
172
|
### Encryption
|
|
171
173
|
`@nestia/core` supports special decorator functions `EncryptedBody` and `EncryptedRout`. They're almost same with [TypedBody](#typedbody) and [TypedRoute](#typedroute), but there's only one thing different - it encrypts JSON data through AES-128/256 algorithm.
|