@nestia/fetcher 5.0.0-dev.20250301 → 5.0.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 CHANGED
@@ -1,91 +1,92 @@
1
- # Nestia
2
- ![Nestia Logo](https://nestia.io/logo.png)
3
-
4
- [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE)
5
- [![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher)
6
- [![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher)
7
- [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)
8
- [![Guide Documents](https://img.shields.io/badge/Guide-Documents-forestgreen)](https://nestia.io/docs/)
9
- [![Gurubase](https://img.shields.io/badge/Gurubase-Document%20Chatbot-006BFF)](https://gurubase.io/g/nestia)
10
- [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)
11
-
12
- Nestia is a set of helper libraries for NestJS, supporting below features:
13
-
14
- - `@nestia/core`:
15
- - Super-fast/easy decorators
16
- - Advanced WebSocket routes
17
- - `@nestia/sdk`:
18
- - Swagger generator, more evolved than ever
19
- - SDK library generator for clients
20
- - Mockup Simulator for client applications
21
- - Automatic E2E test functions generator
22
- - `@nestia/e2e`: Test program utilizing e2e test functions
23
- - `@nestia/benchmark`: Benchmark program using e2e test functions
24
- - `@nestia/editor`: Swagger-UI with Online TypeScript Editor
25
- - `nestia`: Just CLI (command line interface) tool
26
-
27
- > [!NOTE]
28
- >
29
- > - **Only one line** required, with pure TypeScript type
30
- > - Enhance performance **30x** up
31
- > - Runtime validator is **20,000x faster** than `class-validator`
32
- > - JSON serialization is **200x faster** than `class-transformer`
33
- > - Software Development Kit
34
- > - Collection of typed `fetch` functions with DTO structures like [tRPC](https://trpc.io/)
35
- > - Mockup simulator means embedded backend simulator in the SDK
36
- > - similar with [msw](https://mswjs.io/), but fully automated
37
-
38
- ![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)
39
-
40
- > Left is NestJS server code, and right is client (frontend) code utilizing SDK
41
-
42
-
43
-
44
-
45
- ## Sponsors and Backers
46
- Thanks for your support.
47
-
48
- Your donation would encourage `nestia` development.
49
-
50
- [![Backers](https://opencollective.com/nestia/backers.svg?avatarHeight=75&width=600)](https://opencollective.com/nestia)
51
-
52
-
53
-
54
-
55
- ## Guide Documents
56
- Check out the document in the [website](https://nestia.io/docs/):
57
-
58
- ### 🏠 Home
59
- - [Introduction](https://nestia.io/docs/)
60
- - [Setup](https://nestia.io/docs/setup/)
61
- - [Pure TypeScript](https://nestia.io/docs/pure)
62
-
63
- ### 📖 Features
64
- - Core Library
65
- - [`@WebSocketRoute`](https://nestia.io/docs/core/WebSocketRoute)
66
- - [`@TypedRoute`](https://nestia.io/docs/core/TypedRoute/)
67
- - [**`@TypedBody`**](https://nestia.io/docs/core/TypedBody/)
68
- - [`@TypedParam`](https://nestia.io/docs/core/TypedParam/)
69
- - [`@TypedQuery`](https://nestia.io/docs/core/TypedQuery/)
70
- - [`@TypedFormData`](https://nestia.io/docs/core/TypedFormData/)
71
- - [`@TypedHeaders`](https://nestia.io/docs/core/TypedHeaders/)
72
- - [`@TypedException`](https://nestia.io/docs/core/TypedException/)
73
- - Software Development Kit
74
- - [SDK Builder](https://nestia.io/docs/sdk/)
75
- - [Mockup Simulator](https://nestia.io/docs/sdk/simulate/)
76
- - [E2E Test Functions](https://nestia.io/docs/sdk/e2e/)
77
- - [Distribution](https://nestia.io/docs/sdk/distribute/)
78
- - Swagger Document
79
- - [Swagger Builder](https://nestia.io/docs/swagger/)
80
- - [**AI Chatbot Development**](https://nestia.io/docs/swagger/chat/)
81
- - [Cloud Swagger Editor](https://nestia.io/docs/swagger/editor/)
82
- - [Documentation Strategy](https://nestia.io/docs/swagger/strategy/)
83
- - E2E Testing
84
- - [Why E2E Test?](https://nestia.io/docs/e2e/why/)
85
- - [Test Program Development](https://nestia.io/docs/e2e/development/)
86
- - [Performance Benchmark](https://nestia.io/docs/e2e/benchmark/)
87
-
88
- ### 🔗 Appendix
89
- - [API Documents](https://nestia.io/api)
90
- - [ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
91
- - [⇲ `dev.to` Articles](https://dev.to/samchon/series/22751)
1
+ # Nestia
2
+ ![Nestia Logo](https://nestia.io/logo.png)
3
+
4
+ [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/samchon/nestia/blob/master/LICENSE)
5
+ [![npm version](https://img.shields.io/npm/v/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher)
6
+ [![Downloads](https://img.shields.io/npm/dm/@nestia/fetcher.svg)](https://www.npmjs.com/package/@nestia/fetcher)
7
+ [![Build Status](https://github.com/samchon/nestia/workflows/build/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)
8
+ [![Guide Documents](https://img.shields.io/badge/Guide-Documents-forestgreen)](https://nestia.io/docs/)
9
+ [![Gurubase](https://img.shields.io/badge/Gurubase-Document%20Chatbot-006BFF)](https://gurubase.io/g/nestia)
10
+ [![Discord Badge](https://img.shields.io/badge/discord-samchon-d91965?style=flat&labelColor=5866f2&logo=discord&logoColor=white&link=https://discord.gg/E94XhzrUCZ)](https://discord.gg/E94XhzrUCZ)
11
+
12
+ Nestia is a set of helper libraries for NestJS, supporting below features:
13
+
14
+ - `@nestia/core`:
15
+ - Super-fast/easy decorators
16
+ - Advanced WebSocket routes
17
+ - `@nestia/sdk`:
18
+ - Swagger generator, more evolved than ever
19
+ - SDK library generator for clients
20
+ - Mockup Simulator for client applications
21
+ - Automatic E2E test functions generator
22
+ - `@nestia/e2e`: Test program utilizing e2e test functions
23
+ - `@nestia/benchmark`: Benchmark program using e2e test functions
24
+ - `@nestia/editor`: Swagger-UI with Online TypeScript Editor
25
+ - `@agentica`: Agentic AI library specialized in LLM function calling
26
+ - `nestia`: Just CLI (command line interface) tool
27
+
28
+ > [!NOTE]
29
+ >
30
+ > - **Only one line** required, with pure TypeScript type
31
+ > - Enhance performance **30x** up
32
+ > - Runtime validator is **20,000x faster** than `class-validator`
33
+ > - JSON serialization is **200x faster** than `class-transformer`
34
+ > - Software Development Kit
35
+ > - Collection of typed `fetch` functions with DTO structures like [tRPC](https://trpc.io/)
36
+ > - Mockup simulator means embedded backend simulator in the SDK
37
+ > - similar with [msw](https://mswjs.io/), but fully automated
38
+
39
+ ![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)
40
+
41
+ > Left is NestJS server code, and right is client (frontend) code utilizing SDK
42
+
43
+
44
+
45
+
46
+ ## Sponsors and Backers
47
+ Thanks for your support.
48
+
49
+ Your donation would encourage `nestia` development.
50
+
51
+ [![Backers](https://opencollective.com/nestia/backers.svg?avatarHeight=75&width=600)](https://opencollective.com/nestia)
52
+
53
+
54
+
55
+
56
+ ## Guide Documents
57
+ Check out the document in the [website](https://nestia.io/docs/):
58
+
59
+ ### 🏠 Home
60
+ - [Introduction](https://nestia.io/docs/)
61
+ - [Setup](https://nestia.io/docs/setup/)
62
+ - [Pure TypeScript](https://nestia.io/docs/pure)
63
+
64
+ ### 📖 Features
65
+ - Core Library
66
+ - [`@WebSocketRoute`](https://nestia.io/docs/core/WebSocketRoute)
67
+ - [`@TypedRoute`](https://nestia.io/docs/core/TypedRoute/)
68
+ - [**`@TypedBody`**](https://nestia.io/docs/core/TypedBody/)
69
+ - [`@TypedParam`](https://nestia.io/docs/core/TypedParam/)
70
+ - [`@TypedQuery`](https://nestia.io/docs/core/TypedQuery/)
71
+ - [`@TypedFormData`](https://nestia.io/docs/core/TypedFormData/)
72
+ - [`@TypedHeaders`](https://nestia.io/docs/core/TypedHeaders/)
73
+ - [`@TypedException`](https://nestia.io/docs/core/TypedException/)
74
+ - Software Development Kit
75
+ - [SDK Builder](https://nestia.io/docs/sdk/)
76
+ - [Mockup Simulator](https://nestia.io/docs/sdk/simulate/)
77
+ - [E2E Test Functions](https://nestia.io/docs/sdk/e2e/)
78
+ - [Distribution](https://nestia.io/docs/sdk/distribute/)
79
+ - Swagger Document
80
+ - [Swagger Builder](https://nestia.io/docs/swagger/)
81
+ - [**AI Chatbot Development**](https://nestia.io/docs/swagger/chat/)
82
+ - [Cloud Swagger Editor](https://nestia.io/docs/swagger/editor/)
83
+ - [Documentation Strategy](https://nestia.io/docs/swagger/strategy/)
84
+ - E2E Testing
85
+ - [Why E2E Test?](https://nestia.io/docs/e2e/why/)
86
+ - [Test Program Development](https://nestia.io/docs/e2e/development/)
87
+ - [Performance Benchmark](https://nestia.io/docs/e2e/benchmark/)
88
+
89
+ ### 🔗 Appendix
90
+ - [API Documents](https://nestia.io/api)
91
+ - [⇲ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
92
+ - [⇲ `dev.to` Articles](https://dev.to/samchon/series/22751)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestia/fetcher",
3
- "version": "5.0.0-dev.20250301",
3
+ "version": "5.0.0",
4
4
  "description": "Fetcher library of Nestia SDK",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -26,8 +26,8 @@
26
26
  },
27
27
  "homepage": "https://nestia.io",
28
28
  "dependencies": {
29
- "@samchon/openapi": "^3.0.0-dev.20250301",
30
- "typia": "^8.0.0-dev.20250301"
29
+ "@samchon/openapi": "^3.0.0",
30
+ "typia": "^8.0.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "typescript": ">= 4.8.0"
package/src/AesPkcs5.ts CHANGED
@@ -1,50 +1,50 @@
1
- import crypto from "crypto";
2
-
3
- /**
4
- * Utility class for the AES-128/256 encryption.
5
- *
6
- * - AES-128/256
7
- * - CBC mode
8
- * - PKCS#5 Padding
9
- * - Base64 Encoding
10
- *
11
- * @author Jeongho Nam - https://github.com/samchon
12
- */
13
- export namespace AesPkcs5 {
14
- /**
15
- * Encrypt data
16
- *
17
- * @param data Target data
18
- * @param key Key value of the encryption.
19
- * @param iv Initializer Vector for the encryption
20
- * @return Encrypted data
21
- */
22
- export function encrypt(data: string, key: string, iv: string): string {
23
- const bytes: number = key.length * 8;
24
- const cipher: crypto.Cipher = crypto.createCipheriv(
25
- `AES-${bytes}-CBC`,
26
- key,
27
- iv,
28
- );
29
- return cipher.update(data, "utf8", "base64") + cipher.final("base64");
30
- }
31
-
32
- /**
33
- * Decrypt data.
34
- *
35
- * @param data Target data
36
- * @param key Key value of the decryption.
37
- * @param iv Initializer Vector for the decryption
38
- * @return Decrypted data.
39
- */
40
- export function decrypt(data: string, key: string, iv: string): string {
41
- const bytes: number = key.length * 8;
42
- const decipher: crypto.Decipher = crypto.createDecipheriv(
43
- `AES-${bytes}-CBC`,
44
- key,
45
- iv,
46
- );
47
-
48
- return decipher.update(data, "base64", "utf8") + decipher.final("utf8");
49
- }
50
- }
1
+ import crypto from "crypto";
2
+
3
+ /**
4
+ * Utility class for the AES-128/256 encryption.
5
+ *
6
+ * - AES-128/256
7
+ * - CBC mode
8
+ * - PKCS#5 Padding
9
+ * - Base64 Encoding
10
+ *
11
+ * @author Jeongho Nam - https://github.com/samchon
12
+ */
13
+ export namespace AesPkcs5 {
14
+ /**
15
+ * Encrypt data
16
+ *
17
+ * @param data Target data
18
+ * @param key Key value of the encryption.
19
+ * @param iv Initializer Vector for the encryption
20
+ * @return Encrypted data
21
+ */
22
+ export function encrypt(data: string, key: string, iv: string): string {
23
+ const bytes: number = key.length * 8;
24
+ const cipher: crypto.Cipher = crypto.createCipheriv(
25
+ `AES-${bytes}-CBC`,
26
+ key,
27
+ iv,
28
+ );
29
+ return cipher.update(data, "utf8", "base64") + cipher.final("base64");
30
+ }
31
+
32
+ /**
33
+ * Decrypt data.
34
+ *
35
+ * @param data Target data
36
+ * @param key Key value of the decryption.
37
+ * @param iv Initializer Vector for the decryption
38
+ * @return Decrypted data.
39
+ */
40
+ export function decrypt(data: string, key: string, iv: string): string {
41
+ const bytes: number = key.length * 8;
42
+ const decipher: crypto.Decipher = crypto.createDecipheriv(
43
+ `AES-${bytes}-CBC`,
44
+ key,
45
+ iv,
46
+ );
47
+
48
+ return decipher.update(data, "base64", "utf8") + decipher.final("utf8");
49
+ }
50
+ }