@nestia/core 0.1.7 → 0.1.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  # Nestia Core
2
2
  [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE)
3
3
  [![npm version](https://img.shields.io/npm/v/@nestia/core.svg)](https://www.npmjs.com/package/@nestia/core)
4
- [![Downloads](https://img.shields.io/npm/dm/typia.svg)](https://www.npmjs.com/package/@nestia/core)
4
+ [![Downloads](https://img.shields.io/npm/dm/@nestia/core.svg)](https://www.npmjs.com/package/@nestia/core)
5
5
  [![Build Status](https://github.com/samchon/typia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)
6
6
  [![Guide Documents](https://img.shields.io/badge/wiki-documentation-forestgreen)](https://github.com/samchon/nestia/wiki)
7
7
 
@@ -9,11 +9,13 @@
9
9
  npx nestia setup
10
10
  ```
11
11
 
12
- Super-easy and super-fast validator decorators for NestJS.
12
+ super-fast validation decorators for NestJS.
13
13
 
14
- `@nestia/core` is a transformer library of NestJS, supporing super-easy and super-fast validation decorators, by using [typia](https://github.com/samchon/typia). Comparing validation speed with `class-validator`, `@nestia/core` is maximum **15,000x times faster** and it even supports every TypeScript types.
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.
15
15
 
16
- Furthremore, `@nestia/core` can use pure interface typed DTO with **only one line**. 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 **super-easy** and **super-fast** through with pure TypeScript types.
16
+ Furthermore, `@nestia/core` can use pure interface typed DTO with **only one line**.
17
+
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 **superfast** decorator with pure TypeScript type.
17
19
 
18
20
  ```typescript
19
21
  import { Controller } from "@nestjs/common";
@@ -24,92 +26,59 @@ import { IBbsArticle } from "@bbs-api/structures/IBbsArticle";
24
26
  @Controller("bbs/articles")
25
27
  export class BbsArticlesController {
26
28
  /**
27
- * `TypedRoute.Post()`: safe `JSON.stringify()` with type validation.
28
- *
29
- * Furthermore, its 10x times faster than native `JSON.stringify()` function.
29
+ * Store a new content.
30
+ *
31
+ * @param inupt Content to store
32
+ * @returns Newly archived article
30
33
  */
31
- @TypedRoute.Post()
34
+ @TypedRoute.Post() // 10x faster and safer JSON.stringify()
32
35
  public async store(
33
- /**
34
- * Super-fast request body validator through `TypedBody()`.
35
- *
36
- * It also requires only one line.
37
- */
38
- @TypedBody() input: IBbsArticle.IStore
36
+ @TypedBody() input: IBbsArticle.IStore // supoer-fast validator
39
37
  ): Promise<IBbsArticle>;
40
38
  }
41
39
  ```
42
40
 
43
- ```typescript
44
- /**
45
- * You don't need any extra dedication like:
46
- *
47
- * - `@nestjs/swagger`: JSON schema definition
48
- * - `class-transformer`: class definition with decorator function class
49
- *
50
- * Just enjoy the pure interface type as DTO
51
- */
52
- export interface IBbsArticle {
53
- /**
54
- * @format uuid
55
- */
56
- id: string;
57
- writer: string;
58
- title: string;
59
- content: string;
60
- created_at: string;
61
- }
62
- export namespace IBbsArticle {
63
- export interface IStore {
64
- writer: string;
65
- title: string;
66
- content: string;
67
- }
68
- }
69
- ```
70
-
71
- ![Benchmark](https://github.com/samchon/typia/raw/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz/images/is.svg)
72
-
73
- > Measured on [Intel i5-1135g7, Surface Pro 8](https://github.com/samchon/typia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz#is)
74
- >
75
- > `@nestia/core` is providing super-easy and super-fast validator by wrapping [typia](https://github.com/samchon/typia)
76
41
 
77
42
 
78
43
 
44
+ ## Setup
45
+ ### Boilerplate Project
46
+ ```bash
47
+ npx nestia start <directory>
48
+ ```
79
49
 
50
+ Just run above command, then boilerplate project would be constructed.
80
51
 
81
- ## Setup
82
52
  ### Setup Wizard
83
53
  ```bash
84
54
  # setup both @nestia/core and @nestia/sdk
85
55
  npx nestia setup
86
56
 
87
57
  # setup @nestia/core only
88
- npx nestia setup
58
+ npx @nestia/core setup
89
59
  ```
90
60
 
91
61
  When you run `npx nestia setup` command, all installation and configuration processes would be automatically done. If you want to setup `@nestia/core` only, run `npx @nestia/core setup` command instead.
92
62
 
93
- After the setup has been completed, you can compile your backend server code by using `ttsc` command. If you want to run your TypeScript file directly through `ts-node`, add `-C ttypescript` argument like below:
63
+ After the setup has been fully completed, you can compile your backend server code by using `ttsc` command. If you want to run your TypeScript file directly through `ts-node`, add `-C ttypescript` argument like below:
94
64
 
95
65
  ```bash
96
66
  npx ttsc
97
67
  npx ts-node -C ttypescript src/index.ts
98
68
  ```
99
69
 
100
- > In the automated setup process, you can specialize package manager like `yarn` instead of `npm` by adding `--module yarn` argument. You also can specialize transformation compiler by using [`--module ts-patch`](https://github.com/nonara/ts-patch) argument. Default compiler is [`ttypescrpit`](https://github.com/cevek/ttypescript).
101
- >
102
- > ```bash
103
- > npx nestia setup \
104
- > --compiler (ttypescript|ts-patch)
105
- > --module (npm|pnpm|yarn)
106
- >
107
- > npx nestia setup
108
- > npx nestia setup --module yarn
109
- > npx nestia setup --compiler ts-patch
110
- > ```
111
-
112
- ### NPM Packages
70
+ Also, you can specify package manager by `--manage` argument like below:
71
+
72
+ ```bash
73
+ npx @nestia/core setup --manager npm
74
+ npx @nestia/core setup --manager pnpm
75
+ npx @nestia/core setup --manager yarn
76
+ ```
77
+
78
+ ### Manual Setup
79
+ If you want to install and setup `@nestia/core` manually, read [Guide Documents - Setup](https://github.com/samchon/nestia/wiki/Setup).
80
+
81
+ <!-- ### NPM Packages
113
82
  If you want to install and configure manually, install `@nestia/core` module first.
114
83
 
115
84
  Also, you need additional devDependencies to compile the TypeScript code with transformation. Therefore, install those all libraries `typescript`, `ttypescript` and `ts-node`. Inform that, `ttypescript` is not mis-writing. Do not forget to install the `ttypescript`.
@@ -161,7 +130,7 @@ export function stringify<T>(input: T): string; // unsafe, but very fast
161
130
  export function assertStringify<T>(input: T): string; // assert + stringify
162
131
  export function isStringify<T>(input: T): string | null; // is + stringify
163
132
  export function validateStringify<T>(input: T): IValidation<T>; // validate +
164
- ```
133
+ ``` -->
165
134
 
166
135
 
167
136
 
@@ -176,31 +145,27 @@ import { IBbsArticle } from "@bbs-api/structures/IBbsArticle";
176
145
  @Controller("bbs/articles")
177
146
  export class BbsArticlesController {
178
147
  /**
179
- * `TypedRoute.Post()`: safe `JSON.stringify()` with type validation.
180
- *
181
- * Furthermore, its 10x times faster than native `JSON.stringify()` function.
148
+ * Store a new content.
149
+ *
150
+ * @param inupt Content to store
151
+ * @returns Newly archived article
182
152
  */
183
- @TypedRoute.Post()
153
+ @TypedRoute.Post() // 10x faster and safer JSON.stringify()
184
154
  public async store(
185
- /**
186
- * Super-fast request body validator through `TypedBody()`.
187
- *
188
- * It also requires only one line.
189
- */
190
- @TypedBody() input: IBbsArticle.IStore
155
+ @TypedBody() input: IBbsArticle.IStore // supoer-fast validator
191
156
  ): Promise<IBbsArticle>;
192
157
  }
193
158
  ```
194
159
 
195
160
  ### TypedBody
196
- `TypedBody` is a decorator function for `application/json` typed request body.
161
+ `TypedBody()` is a decorator function of `application/json` typed request body.
197
162
 
198
- Also, it supports super-fast validation pipe, which is 15,000x times faster then ordinary `nest.Body()` decorator using `class-validator`.
163
+ Also, it supports super-fast validation pipe using, which is maximum 15,000x times faster then ordinary `nest.Body()` decorator using `class-validator`.
199
164
 
200
165
  ### TypedRoute
201
- `TypedRoute` is a decorator function for `application/json` typed reponse body.
166
+ `TypedRoute()` is a decorator function of `application/json` typed reponse body.
202
167
 
203
- Also, it supports safe and fast JSON stringify pipe, which is maximum 10x times faster than native `JSON.stringify()` function and it is even type safe.
168
+ 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.
204
169
 
205
170
  ### Encryption
206
171
  `@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.
@@ -210,6 +175,49 @@ Also, it supports safe and fast JSON stringify pipe, which is maximum 10x times
210
175
  - PKCS #5 Padding
211
176
  - Base64 Encoding
212
177
 
178
+ ### Comment Tags
179
+ You can enhance DTO type validation by writing comment tags.
180
+
181
+ If you want to know about it detaily, visit [Guide Documents of typia](https://github.com/samchon/typia/wiki/Runtime-Validators#comment-tags).
182
+
183
+ ```typescript
184
+ export interface IBbsArticle {
185
+ /**
186
+ * @format uuid
187
+ */
188
+ id: string;
189
+
190
+ writer: IBbsArticle.IWriter;
191
+
192
+ /**
193
+ * @minItems 1
194
+ */
195
+ contents: IBbsArticle.IContent[];
196
+ }
197
+ export namespace IBbsArticle {
198
+ export interface IWriter {
199
+ /**
200
+ * @minLength 3
201
+ */
202
+ name: string;
203
+
204
+ /**
205
+ * @format email
206
+ */
207
+ email: string;
208
+
209
+ /**
210
+ * @pattern ^0[0-9]{7,16}
211
+ */
212
+ mobile: string;
213
+
214
+ /**
215
+ * @minimum 18
216
+ */
217
+ age: number;
218
+ }
219
+ }
220
+ ```
213
221
 
214
222
 
215
223
 
@@ -221,9 +229,11 @@ npx nestia swagger
221
229
  npx nestia sdk
222
230
  ```
223
231
 
224
- When you adapt this `@nestia/core`, you can't use `@nestjs/swagger` more. Instead, I support `@nestia/sdk`, which is much more stable and powerful then before. Through this `@nestia/sdk` module, you can generate `swagger.json` and even generating SDK library is possible.
232
+ Automatic *SDK* and *Swagger* generator for `@nestia/core`.
233
+
234
+ With `@nestia/core`, you can boost up validation speed maximum **15,000x times faster**. However, as `@nestjs/swagger` does not support `@nestia/core`, you can't generate swagger documents from `@nestjs/swagger` more.
225
235
 
226
- For reference, SDK (Software Development Kit) library means a library which can be utilized by TypeScript client developer conveniently. When you generate SDK library through `@nestia/sdk`, `@nestia/sdk` will analyze your backend server code and generate codes like below:
236
+ Instead, I provide you `@nestia/sdk` module, which can generate not only swagger documents, but also SDK (Software Development Kit) library.
227
237
 
228
238
  #### `BbsArticlesController.ts`
229
239
  ```typescript
@@ -235,17 +245,13 @@ import { IBbsArticle } from "@bbs-api/structures/IBbsArticle";
235
245
  @Controller("bbs/articles")
236
246
  export class BbsArticlesController {
237
247
  /**
238
- * `TypedRoute.Post()`: safe `JSON.stringify()` with type validation.
239
- *
240
- * Furthermore, its 10x times faster than native `JSON.stringify()` function.
248
+ * Store a new article.
249
+ *
250
+ * @param input content to store
251
+ * @returns new article
241
252
  */
242
253
  @TypedRoute.Post()
243
254
  public async store(
244
- /**
245
- * Super-fast request body validator through `TypedBody()`.
246
- *
247
- * It also requires only one line.
248
- */
249
255
  @TypedBody() input: IBbsArticle.IStore
250
256
  ): Promise<IBbsArticle>;
251
257
  }
@@ -256,6 +262,12 @@ export class BbsArticlesController {
256
262
  import { Fetcher, IConnection } from "@nestia/fetcher";
257
263
  import { IBbsArticle } from "../../../structures/IBbsArticle";
258
264
 
265
+ /**
266
+ * Store a new content.
267
+ *
268
+ * @param input content to store
269
+ * @returns new article
270
+ */
259
271
  export function store(
260
272
  connection: api.IConnection,
261
273
  input: IBbsArticle.IStore
@@ -208,7 +208,10 @@ var CoreSetupWizard;
208
208
  plugins.push({
209
209
  transform: "@nestia/core/lib/transform",
210
210
  });
211
- if (!(typia === undefined)) return [3 /*break*/, 5];
211
+ if (typia === undefined)
212
+ plugins.push({
213
+ transform: "typia/lib/transform",
214
+ });
212
215
  return [4 /*yield*/, fs_1.default.promises.writeFile("tsconfig.json", Comment.stringify(config, null, 2))];
213
216
  case 4:
214
217
  _c.sent();
@@ -1 +1 @@
1
- {"version":3,"file":"CoreSetupWizard.js","sourceRoot":"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;gBAAE,OAAO,CAAC,UAAG,OAAO,cAAI,MAAM,cAAI,MAAM,CAAE,CAAC,CAAC;QACpE,CAAC;IAXD,CAWC;AAZD,CAYC,CAAC;AAEN,IAAM,MAAM,GACR,UAAC,OAAe;IAChB,OAAA,UAAC,MAAc,EAAE,OAAgB;QAC7B,IAAM,MAAM,GACR,OAAO,KAAK,MAAM;YACd,CAAC,CAAC,gBAAS,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAE;YACjC,CAAC,CAAC,oBAAa,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAE,CAAC;QAC3D,OAAO,CAAC,UAAG,OAAO,cAAI,MAAM,cAAI,MAAM,CAAE,CAAC,CAAC;IAC9C,CAAC;AAND,CAMC,CAAC;AAEN,IAAM,IAAI,GACN,UAAC,MAAiB;IAClB,OAAA,UAAC,IAAY;QACT,MAAM,EAAE,CAAC;QACT,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACrB,CAAC;AAJD,CAIC,CAAC;AAEN,SAAS,OAAO,CAAC,OAAe;IAC5B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACrB,uBAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AAC/C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestia/core",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Super-fast validation decorators of NestJS",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -60,6 +60,10 @@
60
60
  "rxjs": "*",
61
61
  "typia": "^3.4.7"
62
62
  },
63
+ "peerDependencies": {
64
+ "ttypescript": ">= 1.5.15",
65
+ "typescript": ">= 4.5.2"
66
+ },
63
67
  "files": [
64
68
  "README.md",
65
69
  "LICENSE",
@@ -128,10 +128,13 @@ export namespace CoreSetupWizard {
128
128
  transform: "@nestia/core/lib/transform",
129
129
  } as any);
130
130
  if (typia === undefined)
131
- await fs.promises.writeFile(
132
- "tsconfig.json",
133
- Comment.stringify(config, null, 2),
134
- );
131
+ plugins.push({
132
+ transform: "typia/lib/transform",
133
+ } as any);
134
+ await fs.promises.writeFile(
135
+ "tsconfig.json",
136
+ Comment.stringify(config, null, 2),
137
+ );
135
138
  }
136
139
  if (temporary === true) remove(manager)("comment-json", false);
137
140
  };