@nestia/sdk 1.1.0-dev.20230420 → 1.1.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 +36 -63
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,82 +1,55 @@
|
|
|
1
|
-
# Nestia
|
|
1
|
+
# Nestia
|
|
2
|
+

|
|
3
|
+
|
|
2
4
|
[](https://github.com/samchon/nestia/blob/master/LICENSE)
|
|
3
|
-
[](https://www.npmjs.com/package/@nestia/core)
|
|
6
|
+
[](https://www.npmjs.com/package/nestia)
|
|
7
|
+
[](https://github.com/samchon/nestia/actions?query=workflow%3Abuild)
|
|
8
|
+
[](https://nestia.io/docs/)
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
Nestia is a set of helper libraries for NestJS, supporting below features:
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
- `@nestia/core`: super-fast decorators
|
|
13
|
+
- `@nestia/sdk`: evolved SDK and Swagger generator
|
|
14
|
+
- `nestia`: just CLI (command line interface) tool
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
> **Note**
|
|
17
|
+
>
|
|
18
|
+
> - **Only one line** required, with pure TypeScript type
|
|
19
|
+
> - Runtime validator is **20,000x faster** than `class-validator`
|
|
20
|
+
> - JSON serialization is **200x faster** than `class-transformer`
|
|
21
|
+
> - SDK is similar with [tRPC](https://trpc.io), but much advanced
|
|
13
22
|
|
|
14
23
|

|
|
15
24
|
|
|
25
|
+
> Left is server code, and right is client code utilizing SDK
|
|
16
26
|
|
|
17
27
|
|
|
18
28
|
|
|
19
|
-
## Setup
|
|
20
|
-
### Boilerplate Project
|
|
21
|
-
```bash
|
|
22
|
-
npx nestia start <directory>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Just run above command, then boilerplate project would be constructed.
|
|
26
|
-
|
|
27
|
-
### Setup Wizard
|
|
28
|
-
```bash
|
|
29
|
-
npx nestia setup
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
When you want to use `nestia` in orindary project, just type above command.
|
|
33
|
-
|
|
34
|
-
All installation and configuration processes would be automatically done.
|
|
35
|
-
|
|
36
|
-
Also, you can specify package manager by `--manage` argument like below:
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npx nestia setup --manager npm
|
|
40
|
-
npx nestia setup --manager pnpm
|
|
41
|
-
npx nestia setup --manager yarn
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### Sole Setup
|
|
45
|
-
If you want to install and setup `@nestia/sdk` only, just do it.
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
npm install --save-dev @nestia/sdk
|
|
49
|
-
```
|
|
50
|
-
|
|
51
29
|
|
|
30
|
+
## Sponsors and Backers
|
|
31
|
+
Thanks for your support.
|
|
52
32
|
|
|
33
|
+
Your donation would encourage `nestia` development.
|
|
53
34
|
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
# BASIC COMMAND
|
|
57
|
-
npx nestia <sdk|swagger> <source_directories_or_patterns> \
|
|
58
|
-
--exclude <exclude_directory_or_pattern> \
|
|
59
|
-
--out <output_directory_or_file>
|
|
35
|
+
[](https://opencollective.com/nestia)
|
|
60
36
|
|
|
61
|
-
# EXAMPLES
|
|
62
|
-
npx nestia sdk "src/**/*.controller.ts" --out "src/api"
|
|
63
|
-
npx nestia swagger "src/controllers" --out "dist/swagger.json"
|
|
64
|
-
```
|
|
65
37
|
|
|
66
|
-
You can generate sdk or swagger documents by above commands.
|
|
67
38
|
|
|
68
|
-
If you've configured `nestia.config.ts` file, you can omit all options like below. About the `nestia.config.ts` file, read [Guide Documents -> SDK Generator -> Configuration](https://github.com/samchon/nestia/wiki/SDK-Generator#configuration)
|
|
69
39
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
npx nestia swagger
|
|
73
|
-
```
|
|
40
|
+
## Guide Documents
|
|
41
|
+
Check out the document in the [website](https://nestia.io/docs/):
|
|
74
42
|
|
|
75
|
-
|
|
43
|
+
### 🏠 Home
|
|
44
|
+
- [Introduction](https://nestia.io/docs/)
|
|
45
|
+
- [Setup](https://nestia.io/docs/setup/)
|
|
76
46
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
- [
|
|
80
|
-
|
|
81
|
-
- [
|
|
82
|
-
- [
|
|
47
|
+
### 📖 Features
|
|
48
|
+
- Core Library
|
|
49
|
+
- [TypedRoute](https://nestia.io/docs/core/TypedRoute/)
|
|
50
|
+
- [TypedBody](https://nestia.io/docs/core/TypedBody/)
|
|
51
|
+
- [TypedParam](https://nestia.io/docs/core/TypedParam/)
|
|
52
|
+
- [TypedQuery](https://nestia.io/docs/core/TypedRoute/)
|
|
53
|
+
- SDK/Swagger Generator
|
|
54
|
+
- [SDK Library](https://nestia.io/docs/sdk/sdk/)
|
|
55
|
+
- [Swagger Documents](https://nestia.io/docs/sdk/swagger/)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestia/sdk",
|
|
3
|
-
"version": "1.1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Nestia SDK and Swagger generator",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "rimraf lib && tsc",
|
|
12
|
-
"dev": "rimraf lib &&
|
|
12
|
+
"dev": "rimraf lib && tsc --watch",
|
|
13
13
|
"eslint": "eslint ./**/*.ts",
|
|
14
14
|
"package:latest": "npm run build && npm run test && npm publish --access public",
|
|
15
15
|
"package:next": "npm run package:latest -- --tag next",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"tsconfck": "^2.0.1",
|
|
44
44
|
"tsconfig-paths": "^4.1.1",
|
|
45
45
|
"tstl": "^2.5.13",
|
|
46
|
-
"typia": "^3.8.
|
|
46
|
+
"typia": "^3.8.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@nestjs/common": ">= 7.0.1",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"typescript": ">= 4.5.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@nestia/core": "^1.1.0
|
|
57
|
-
"@nestia/fetcher": "^1.1.
|
|
56
|
+
"@nestia/core": "^1.1.0",
|
|
57
|
+
"@nestia/fetcher": "^1.1.2",
|
|
58
58
|
"@trivago/prettier-plugin-sort-imports": "^4.0.0",
|
|
59
59
|
"@types/cli": "^0.11.21",
|
|
60
60
|
"@types/express": "^4.17.15",
|