nestia 12.0.0-dev.20260601.1 → 12.0.0-dev.20260612.2

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Jeongho Nam
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Jeongho Nam
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,93 +1,93 @@
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/test/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Atest)
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`](https://github.com/wrtnlabs/agentica): Agentic AI library specialized in LLM function calling
26
- - [`@autobe`](https://github.com/wrtnlabs/autobe): Vibe coding agent generating NestJS application
27
- - `nestia`: Just CLI (command line interface) tool
28
-
29
- > [!NOTE]
30
- >
31
- > - **Only one line** required, with pure TypeScript type
32
- > - Enhance performance **30x** up
33
- > - Runtime validator is **20,000x faster** than `class-validator`
34
- > - JSON serialization is **200x faster** than `class-transformer`
35
- > - Software Development Kit
36
- > - Collection of typed `fetch` functions with DTO structures like [tRPC](https://trpc.io/)
37
- > - Mockup simulator means embedded backend simulator in the SDK
38
- > - similar with [msw](https://mswjs.io/), but fully automated
39
-
40
- ![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)
41
-
42
- > Left is NestJS server code, and right is client (frontend) code utilizing SDK
43
-
44
-
45
-
46
-
47
- ## Sponsors and Backers
48
- Thanks for your support.
49
-
50
- Your donation would encourage `nestia` development.
51
-
52
- [![Backers](https://opencollective.com/nestia/backers.svg?avatarHeight=75&width=600)](https://opencollective.com/nestia)
53
-
54
-
55
-
56
-
57
- ## Guide Documents
58
- Check out the document in the [website](https://nestia.io/docs/):
59
-
60
- ### 🏠 Home
61
- - [Introduction](https://nestia.io/docs/)
62
- - [Setup](https://nestia.io/docs/setup/)
63
- - [Pure TypeScript](https://nestia.io/docs/pure)
64
-
65
- ### 📖 Features
66
- - Core Library
67
- - [`@WebSocketRoute`](https://nestia.io/docs/core/WebSocketRoute)
68
- - [`@TypedRoute`](https://nestia.io/docs/core/TypedRoute/)
69
- - [**`@TypedBody`**](https://nestia.io/docs/core/TypedBody/)
70
- - [`@TypedParam`](https://nestia.io/docs/core/TypedParam/)
71
- - [`@TypedQuery`](https://nestia.io/docs/core/TypedQuery/)
72
- - [`@TypedFormData`](https://nestia.io/docs/core/TypedFormData/)
73
- - [`@TypedHeaders`](https://nestia.io/docs/core/TypedHeaders/)
74
- - [`@TypedException`](https://nestia.io/docs/core/TypedException/)
75
- - Software Development Kit
76
- - [SDK Builder](https://nestia.io/docs/sdk/)
77
- - [Mockup Simulator](https://nestia.io/docs/sdk/simulate/)
78
- - [E2E Test Functions](https://nestia.io/docs/sdk/e2e/)
79
- - [Distribution](https://nestia.io/docs/sdk/distribute/)
80
- - Swagger Document
81
- - [Swagger Builder](https://nestia.io/docs/swagger/)
82
- - [**AI Chatbot Development**](https://nestia.io/docs/swagger/chat/)
83
- - [Cloud Swagger Editor](https://nestia.io/docs/swagger/editor/)
84
- - [Documentation Strategy](https://nestia.io/docs/swagger/strategy/)
85
- - E2E Testing
86
- - [Why E2E Test?](https://nestia.io/docs/e2e/why/)
87
- - [Test Program Development](https://nestia.io/docs/e2e/development/)
88
- - [Performance Benchmark](https://nestia.io/docs/e2e/benchmark/)
89
-
90
- ### 🔗 Appendix
91
- - [API Documents](https://nestia.io/api)
92
- - [⇲ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
93
- - [⇲ `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/test/badge.svg)](https://github.com/samchon/nestia/actions?query=workflow%3Atest)
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`](https://github.com/wrtnlabs/agentica): Agentic AI library specialized in LLM function calling
26
+ - [`@autobe`](https://github.com/wrtnlabs/autobe): Vibe coding agent generating NestJS application
27
+ - `nestia`: Just CLI (command line interface) tool
28
+
29
+ > [!NOTE]
30
+ >
31
+ > - **Only one line** required, with pure TypeScript type
32
+ > - Enhance performance **30x** up
33
+ > - Runtime validator is **20,000x faster** than `class-validator`
34
+ > - JSON serialization is **200x faster** than `class-transformer`
35
+ > - Software Development Kit
36
+ > - Collection of typed `fetch` functions with DTO structures like [tRPC](https://trpc.io/)
37
+ > - Mockup simulator means embedded backend simulator in the SDK
38
+ > - similar with [msw](https://mswjs.io/), but fully automated
39
+
40
+ ![nestia-sdk-demo](https://user-images.githubusercontent.com/13158709/215004990-368c589d-7101-404e-b81b-fbc936382f05.gif)
41
+
42
+ > Left is NestJS server code, and right is client (frontend) code utilizing SDK
43
+
44
+
45
+
46
+
47
+ ## Sponsors and Backers
48
+ Thanks for your support.
49
+
50
+ Your donation would encourage `nestia` development.
51
+
52
+ [![Backers](https://opencollective.com/nestia/backers.svg?avatarHeight=75&width=600)](https://opencollective.com/nestia)
53
+
54
+
55
+
56
+
57
+ ## Guide Documents
58
+ Check out the document in the [website](https://nestia.io/docs/):
59
+
60
+ ### 🏠 Home
61
+ - [Introduction](https://nestia.io/docs/)
62
+ - [Setup](https://nestia.io/docs/setup/)
63
+ - [Pure TypeScript](https://nestia.io/docs/pure)
64
+
65
+ ### 📖 Features
66
+ - Core Library
67
+ - [`@WebSocketRoute`](https://nestia.io/docs/core/WebSocketRoute)
68
+ - [`@TypedRoute`](https://nestia.io/docs/core/TypedRoute/)
69
+ - [**`@TypedBody`**](https://nestia.io/docs/core/TypedBody/)
70
+ - [`@TypedParam`](https://nestia.io/docs/core/TypedParam/)
71
+ - [`@TypedQuery`](https://nestia.io/docs/core/TypedQuery/)
72
+ - [`@TypedFormData`](https://nestia.io/docs/core/TypedFormData/)
73
+ - [`@TypedHeaders`](https://nestia.io/docs/core/TypedHeaders/)
74
+ - [`@TypedException`](https://nestia.io/docs/core/TypedException/)
75
+ - Software Development Kit
76
+ - [SDK Builder](https://nestia.io/docs/sdk/)
77
+ - [Mockup Simulator](https://nestia.io/docs/sdk/simulate/)
78
+ - [E2E Test Functions](https://nestia.io/docs/sdk/e2e/)
79
+ - [Distribution](https://nestia.io/docs/sdk/distribute/)
80
+ - Swagger Document
81
+ - [Swagger Builder](https://nestia.io/docs/swagger/)
82
+ - [**AI Chatbot Development**](https://nestia.io/docs/swagger/chat/)
83
+ - [Cloud Swagger Editor](https://nestia.io/docs/swagger/editor/)
84
+ - [Documentation Strategy](https://nestia.io/docs/swagger/strategy/)
85
+ - E2E Testing
86
+ - [Why E2E Test?](https://nestia.io/docs/e2e/why/)
87
+ - [Test Program Development](https://nestia.io/docs/e2e/development/)
88
+ - [Performance Benchmark](https://nestia.io/docs/e2e/benchmark/)
89
+
90
+ ### 🔗 Appendix
91
+ - [API Documents](https://nestia.io/api)
92
+ - [⇲ Benchmark Result](https://github.com/samchon/nestia/tree/master/benchmark/results/11th%20Gen%20Intel(R)%20Core(TM)%20i5-1135G7%20%40%202.40GHz)
93
+ - [⇲ `dev.to` Articles](https://dev.to/samchon/series/22751)
package/bin/index.js CHANGED
@@ -10,19 +10,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  });
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- const USAGE = `Wrong command has been detected. Use like below:
14
-
15
- npx nestia [command] [options?]
16
-
17
- 1. npx nestia start <directory>
18
- 2. npx nestia template <directory>
19
- 3. npx nestia setup [--manager npm|pnpm|yarn|bun] (also: --manager=value)
20
- 4. npx nestia dependencies
21
- 5. npx nestia init
22
- 6. npx nestia sdk
23
- 7. npx nestia swagger
24
- 8. npx nestia e2e
25
- 9. npx nestia all
13
+ const USAGE = `Wrong command has been detected. Use like below:
14
+
15
+ npx nestia [command] [options?]
16
+
17
+ 1. npx nestia start <directory>
18
+ 2. npx nestia template <directory>
19
+ 3. npx nestia setup [--manager npm|pnpm|yarn|bun] (also: --manager=value)
20
+ 4. npx nestia dependencies
21
+ 5. npx nestia init
22
+ 6. npx nestia sdk
23
+ 7. npx nestia swagger [--watch]
24
+ 8. npx nestia e2e
25
+ 9. npx nestia all
26
26
  `;
27
27
  function halt(desc) {
28
28
  console.error(desc);
package/bin/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,MAAM,KAAK,GAAG;;;;;;;;;;;;;CAab,CAAC;AAEF,SAAS,IAAI,CAAC,IAAY;IACxB,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACnB,CAAC;AAED,SAAe,IAAI;;QACjB,MAAM,IAAI,GAAuB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACjD,MAAM,IAAI,GAAa,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAE7C,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;Y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KAAK,OAAO,EAAE,CAAC;YAC5B,MAAM,CACJ,MAAM,MAAM,CAAC,wBAAwB,CAAC,CACvC,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC;aAAM,IACL,IAAI,KAAK,cAAc;YACvB,IAAI,KAAK,MAAM;YACf,IAAI,KAAK,KAAK;YACd,IAAI,KAAK,SAAS;YAClB,IAAI,KAAK,KAAK;YACd,IAAI,KAAK,KAAK,EACd,CAAC;YACD,MAAM,QAAQ,GAAW,gCAAgC,CAAC;YAC1D,IAAI,CAAC;gBACH,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC5B,CAAC;uBAAO,CAAC;gBACP,IAAI,CACF;oBACE,qCAAqC;oBACrC,oDAAoD;oBACpD,4CAA4C;oBAC5C,eAAe;oBACf,kDAAkD;oBAClD,mBAAmB;iBACpB,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;YACJ,CAAC;YACD,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;QACzB,CAAC;;YAAM,IAAI,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC;CAAA;AACD,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAChE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AACnB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nestia",
3
- "version": "12.0.0-dev.20260601.1",
3
+ "version": "12.0.0-dev.20260612.2",
4
4
  "description": "Nestia CLI tool",
5
5
  "main": "bin/index.js",
6
6
  "bin": {
@@ -35,8 +35,8 @@
35
35
  "devDependencies": {
36
36
  "@types/node": "^25.3.3",
37
37
  "rimraf": "^6.1.3",
38
- "@nestia/core": "^12.0.0-dev.20260601.1",
39
- "@nestia/sdk": "^12.0.0-dev.20260601.1"
38
+ "@nestia/sdk": "^12.0.0-dev.20260612.2",
39
+ "@nestia/core": "^12.0.0-dev.20260612.2"
40
40
  },
41
41
  "files": [
42
42
  "bin",
@@ -1,119 +1,119 @@
1
- import cp from "child_process";
2
- import fs from "fs";
3
-
4
- type Manager = "npm" | "pnpm" | "yarn" | "bun";
5
-
6
- const ADD: Record<Manager, string> = {
7
- npm: "npm install",
8
- pnpm: "pnpm add",
9
- yarn: "yarn add",
10
- bun: "bun add",
11
- };
12
-
13
- const DEV: Record<Manager, string> = {
14
- npm: "-D",
15
- pnpm: "-D",
16
- yarn: "-D",
17
- bun: "-d",
18
- };
19
-
20
- const TAG = "next";
21
-
22
- export namespace NestiaSetupWizard {
23
- export async function setup(argv: string[]): Promise<void> {
24
- if (!fs.existsSync("package.json")) {
25
- console.error(
26
- [
27
- `npx nestia setup must be run inside a directory that owns a package.json.`,
28
- `Either cd into the project root, or create one with "npm init -y" and re-run.`,
29
- ].join("\n"),
30
- );
31
- process.exit(1);
32
- }
33
-
34
- const manager: Manager = pick(argv);
35
-
36
- console.log("----------------------------------------");
37
- console.log(" Nestia Setup Wizard");
38
- console.log("----------------------------------------");
39
- console.log(`package manager : ${manager}`);
40
- console.log("");
41
-
42
- const go = cp.spawnSync("go", ["version"], { stdio: "ignore" });
43
- if (go.status !== 0 && !process.env.TTSC_GO_BINARY) {
44
- console.warn(
45
- [
46
- "Heads up: Go 1.26+ was not found on PATH.",
47
- "Install it (https://go.dev/dl) or set TTSC_GO_BINARY before you run `ttsc`.",
48
- "Continuing with the install — the @nestia/core native transform binary is built on demand the first time `ttsc` compiles your project.",
49
- "",
50
- ].join("\n"),
51
- );
52
- }
53
-
54
- install(manager, true, "ttsc", "@typescript/native-preview");
55
- install(manager, false, tagged("typia"));
56
- install(
57
- manager,
58
- false,
59
- tagged("@nestia/core"),
60
- tagged("@nestia/sdk"),
61
- tagged("@nestia/fetcher"),
62
- );
63
- install(manager, true, tagged("nestia"));
64
-
65
- console.log("----------------------------------------");
66
- console.log(" Nestia setup complete.");
67
- console.log("----------------------------------------");
68
- console.log("Next: see https://nestia.io/docs/setup/tsgo");
69
- console.log("");
70
- }
71
-
72
- function install(
73
- manager: Manager,
74
- dev: boolean,
75
- ...modules: string[]
76
- ): void {
77
- const command: string = [ADD[manager], dev ? DEV[manager] : "", ...modules]
78
- .filter((s) => s.length !== 0)
79
- .join(" ");
80
- console.log(`$ ${command}`);
81
- cp.execSync(command, { stdio: "inherit" });
82
- console.log("");
83
- }
84
-
85
- function tagged(name: string): string {
86
- return `${name}@${TAG}`;
87
- }
88
-
89
- function pick(argv: string[]): Manager {
90
- for (let i = 0; i < argv.length; ++i) {
91
- const token: string | undefined = argv[i];
92
- if (token === undefined) continue;
93
- if (token === "--manager") return ensure(argv[i + 1]);
94
- if (token.startsWith("--manager="))
95
- return ensure(token.slice("--manager=".length));
96
- }
97
- if (fs.existsSync("bun.lockb") || fs.existsSync("bun.lock")) return "bun";
98
- if (fs.existsSync("pnpm-lock.yaml")) return "pnpm";
99
- if (fs.existsSync("yarn.lock")) return "yarn";
100
- return "npm";
101
- }
102
-
103
- function ensure(value: string | undefined): Manager {
104
- if (
105
- value === "npm" ||
106
- value === "pnpm" ||
107
- value === "yarn" ||
108
- value === "bun"
109
- )
110
- return value;
111
- console.error(
112
- [
113
- `--manager requires one of: npm | pnpm | yarn | bun.`,
114
- `Use either "--manager <name>" or "--manager=<name>".`,
115
- ].join("\n"),
116
- );
117
- process.exit(1);
118
- }
119
- }
1
+ import cp from "child_process";
2
+ import fs from "fs";
3
+
4
+ type Manager = "npm" | "pnpm" | "yarn" | "bun";
5
+
6
+ const ADD: Record<Manager, string> = {
7
+ npm: "npm install",
8
+ pnpm: "pnpm add",
9
+ yarn: "yarn add",
10
+ bun: "bun add",
11
+ };
12
+
13
+ const DEV: Record<Manager, string> = {
14
+ npm: "-D",
15
+ pnpm: "-D",
16
+ yarn: "-D",
17
+ bun: "-d",
18
+ };
19
+
20
+ const TAG = "next";
21
+
22
+ export namespace NestiaSetupWizard {
23
+ export async function setup(argv: string[]): Promise<void> {
24
+ if (!fs.existsSync("package.json")) {
25
+ console.error(
26
+ [
27
+ `npx nestia setup must be run inside a directory that owns a package.json.`,
28
+ `Either cd into the project root, or create one with "npm init -y" and re-run.`,
29
+ ].join("\n"),
30
+ );
31
+ process.exit(1);
32
+ }
33
+
34
+ const manager: Manager = pick(argv);
35
+
36
+ console.log("----------------------------------------");
37
+ console.log(" Nestia Setup Wizard");
38
+ console.log("----------------------------------------");
39
+ console.log(`package manager : ${manager}`);
40
+ console.log("");
41
+
42
+ const go = cp.spawnSync("go", ["version"], { stdio: "ignore" });
43
+ if (go.status !== 0 && !process.env.TTSC_GO_BINARY) {
44
+ console.warn(
45
+ [
46
+ "Heads up: Go 1.26+ was not found on PATH.",
47
+ "Install it (https://go.dev/dl) or set TTSC_GO_BINARY before you run `ttsc`.",
48
+ "Continuing with the install — the @nestia/core native transform binary is built on demand the first time `ttsc` compiles your project.",
49
+ "",
50
+ ].join("\n"),
51
+ );
52
+ }
53
+
54
+ install(manager, true, "ttsc", "@typescript/native-preview");
55
+ install(manager, false, tagged("typia"));
56
+ install(
57
+ manager,
58
+ false,
59
+ tagged("@nestia/core"),
60
+ tagged("@nestia/sdk"),
61
+ tagged("@nestia/fetcher"),
62
+ );
63
+ install(manager, true, tagged("nestia"));
64
+
65
+ console.log("----------------------------------------");
66
+ console.log(" Nestia setup complete.");
67
+ console.log("----------------------------------------");
68
+ console.log("Next: see https://nestia.io/docs/setup/tsgo");
69
+ console.log("");
70
+ }
71
+
72
+ function install(
73
+ manager: Manager,
74
+ dev: boolean,
75
+ ...modules: string[]
76
+ ): void {
77
+ const command: string = [ADD[manager], dev ? DEV[manager] : "", ...modules]
78
+ .filter((s) => s.length !== 0)
79
+ .join(" ");
80
+ console.log(`$ ${command}`);
81
+ cp.execSync(command, { stdio: "inherit" });
82
+ console.log("");
83
+ }
84
+
85
+ function tagged(name: string): string {
86
+ return `${name}@${TAG}`;
87
+ }
88
+
89
+ function pick(argv: string[]): Manager {
90
+ for (let i = 0; i < argv.length; ++i) {
91
+ const token: string | undefined = argv[i];
92
+ if (token === undefined) continue;
93
+ if (token === "--manager") return ensure(argv[i + 1]);
94
+ if (token.startsWith("--manager="))
95
+ return ensure(token.slice("--manager=".length));
96
+ }
97
+ if (fs.existsSync("bun.lockb") || fs.existsSync("bun.lock")) return "bun";
98
+ if (fs.existsSync("pnpm-lock.yaml")) return "pnpm";
99
+ if (fs.existsSync("yarn.lock")) return "yarn";
100
+ return "npm";
101
+ }
102
+
103
+ function ensure(value: string | undefined): Manager {
104
+ if (
105
+ value === "npm" ||
106
+ value === "pnpm" ||
107
+ value === "yarn" ||
108
+ value === "bun"
109
+ )
110
+ return value;
111
+ console.error(
112
+ [
113
+ `--manager requires one of: npm | pnpm | yarn | bun.`,
114
+ `Use either "--manager <name>" or "--manager=<name>".`,
115
+ ].join("\n"),
116
+ );
117
+ process.exit(1);
118
+ }
119
+ }
@@ -1,41 +1,41 @@
1
- import cp from "child_process";
2
- import fs from "fs";
3
-
4
- export namespace NestiaStarter {
5
- export const clone =
6
- (halter: (msg?: string) => never) =>
7
- async (argv: string[]): Promise<void> => {
8
- // VALIDATION
9
- const dest: string | undefined = argv[0];
10
- if (dest === undefined) halter();
11
- else if (fs.existsSync(dest) === true)
12
- halter("The target directory already exists.");
13
-
14
- console.log("-----------------------------------------");
15
- console.log(" Nestia Starter Kit");
16
- console.log("-----------------------------------------");
17
-
18
- // COPY PROJECTS
19
- execute(`git clone https://github.com/samchon/nestia-template ${dest}`);
20
- console.log(`cd "${dest}"`);
21
- process.chdir(dest);
22
-
23
- // INSTALL DEPENDENCIES
24
- execute("npm install");
25
-
26
- // BUILD TYPESCRIPT
27
- execute("npm run build");
28
-
29
- // DO TEST
30
- execute("npm run test");
31
-
32
- // REMOVE .GIT DIRECTORY
33
- cp.execSync("npx rimraf .git");
34
- cp.execSync("npx rimraf .github/dependabot.yml");
35
- };
36
-
37
- function execute(command: string): void {
38
- console.log(`\n$ ${command}`);
39
- cp.execSync(command, { stdio: "inherit" });
40
- }
41
- }
1
+ import cp from "child_process";
2
+ import fs from "fs";
3
+
4
+ export namespace NestiaStarter {
5
+ export const clone =
6
+ (halter: (msg?: string) => never) =>
7
+ async (argv: string[]): Promise<void> => {
8
+ // VALIDATION
9
+ const dest: string | undefined = argv[0];
10
+ if (dest === undefined) halter();
11
+ else if (fs.existsSync(dest) === true)
12
+ halter("The target directory already exists.");
13
+
14
+ console.log("-----------------------------------------");
15
+ console.log(" Nestia Starter Kit");
16
+ console.log("-----------------------------------------");
17
+
18
+ // COPY PROJECTS
19
+ execute(`git clone https://github.com/samchon/nestia-template ${dest}`);
20
+ console.log(`cd "${dest}"`);
21
+ process.chdir(dest);
22
+
23
+ // INSTALL DEPENDENCIES
24
+ execute("npm install");
25
+
26
+ // BUILD TYPESCRIPT
27
+ execute("npm run build");
28
+
29
+ // DO TEST
30
+ execute("npm run test");
31
+
32
+ // REMOVE .GIT DIRECTORY
33
+ cp.execSync("npx rimraf .git");
34
+ cp.execSync("npx rimraf .github/dependabot.yml");
35
+ };
36
+
37
+ function execute(command: string): void {
38
+ console.log(`\n$ ${command}`);
39
+ cp.execSync(command, { stdio: "inherit" });
40
+ }
41
+ }
@@ -1,37 +1,37 @@
1
- import cp from "child_process";
2
- import fs from "fs";
3
-
4
- export namespace NestiaTemplate {
5
- export const clone =
6
- (halter: (msg?: string) => never) =>
7
- async (argv: string[]): Promise<void> => {
8
- // VALIDATION
9
- const dest: string | undefined = argv[0];
10
- if (dest === undefined) halter();
11
- else if (fs.existsSync(dest) === true)
12
- halter("The target directory already exists.");
13
-
14
- console.log("-----------------------------------------");
15
- console.log(" Nestia Template Kit");
16
- console.log("-----------------------------------------");
17
-
18
- // COPY PROJECTS
19
- execute(`git clone https://github.com/samchon/backend ${dest}`);
20
- console.log(`cd "${dest}"`);
21
- process.chdir(dest);
22
-
23
- // INSTALL DEPENDENCIES
24
- execute("npm install");
25
-
26
- // BUILD TYPESCRIPT
27
- execute("npm run build");
28
-
29
- // REMOVE .GIT DIRECTORY
30
- cp.execSync("npx rimraf .git");
31
- };
32
-
33
- function execute(command: string): void {
34
- console.log(`\n$ ${command}`);
35
- cp.execSync(command, { stdio: "inherit" });
36
- }
37
- }
1
+ import cp from "child_process";
2
+ import fs from "fs";
3
+
4
+ export namespace NestiaTemplate {
5
+ export const clone =
6
+ (halter: (msg?: string) => never) =>
7
+ async (argv: string[]): Promise<void> => {
8
+ // VALIDATION
9
+ const dest: string | undefined = argv[0];
10
+ if (dest === undefined) halter();
11
+ else if (fs.existsSync(dest) === true)
12
+ halter("The target directory already exists.");
13
+
14
+ console.log("-----------------------------------------");
15
+ console.log(" Nestia Template Kit");
16
+ console.log("-----------------------------------------");
17
+
18
+ // COPY PROJECTS
19
+ execute(`git clone https://github.com/samchon/backend ${dest}`);
20
+ console.log(`cd "${dest}"`);
21
+ process.chdir(dest);
22
+
23
+ // INSTALL DEPENDENCIES
24
+ execute("npm install");
25
+
26
+ // BUILD TYPESCRIPT
27
+ execute("npm run build");
28
+
29
+ // REMOVE .GIT DIRECTORY
30
+ cp.execSync("npx rimraf .git");
31
+ };
32
+
33
+ function execute(command: string): void {
34
+ console.log(`\n$ ${command}`);
35
+ cp.execSync(command, { stdio: "inherit" });
36
+ }
37
+ }
package/src/index.ts CHANGED
@@ -1,67 +1,67 @@
1
- #!/usr/bin/env node
2
- const USAGE = `Wrong command has been detected. Use like below:
3
-
4
- npx nestia [command] [options?]
5
-
6
- 1. npx nestia start <directory>
7
- 2. npx nestia template <directory>
8
- 3. npx nestia setup [--manager npm|pnpm|yarn|bun] (also: --manager=value)
9
- 4. npx nestia dependencies
10
- 5. npx nestia init
11
- 6. npx nestia sdk
12
- 7. npx nestia swagger
13
- 8. npx nestia e2e
14
- 9. npx nestia all
15
- `;
16
-
17
- function halt(desc: string): never {
18
- console.error(desc);
19
- process.exit(-1);
20
- }
21
-
22
- async function main(): Promise<void> {
23
- const type: string | undefined = process.argv[2];
24
- const argv: string[] = process.argv.slice(3);
25
-
26
- if (type === "start") {
27
- await (
28
- await import("./NestiaStarter.js")
29
- ).NestiaStarter.clone((msg) => halt(msg ?? USAGE))(argv);
30
- } else if (type === "template") {
31
- await (
32
- await import("./NestiaTemplate.js")
33
- ).NestiaTemplate.clone((msg) => halt(msg ?? USAGE))(argv);
34
- } else if (type === "setup") {
35
- await (await import("./NestiaSetupWizard.js")).NestiaSetupWizard.setup(
36
- argv,
37
- );
38
- } else if (
39
- type === "dependencies" ||
40
- type === "init" ||
41
- type === "sdk" ||
42
- type === "swagger" ||
43
- type === "e2e" ||
44
- type === "all"
45
- ) {
46
- const location: string = "@nestia/sdk/lib/executable/sdk";
47
- try {
48
- require.resolve(location);
49
- } catch {
50
- halt(
51
- [
52
- `@nestia/sdk has not been installed.`,
53
- `Run "npx nestia setup" first, or install manually:`,
54
- ` npm i -D ttsc @typescript/native-preview`,
55
- ` npm i typia`,
56
- ` npm i @nestia/core @nestia/sdk @nestia/fetcher`,
57
- ` npm i -D nestia`,
58
- ].join("\n"),
59
- );
60
- }
61
- await import(location);
62
- } else halt(USAGE);
63
- }
64
- main().catch((exp) => {
65
- console.error(exp instanceof Error ? exp.message : String(exp));
66
- process.exit(-1);
67
- });
1
+ #!/usr/bin/env node
2
+ const USAGE = `Wrong command has been detected. Use like below:
3
+
4
+ npx nestia [command] [options?]
5
+
6
+ 1. npx nestia start <directory>
7
+ 2. npx nestia template <directory>
8
+ 3. npx nestia setup [--manager npm|pnpm|yarn|bun] (also: --manager=value)
9
+ 4. npx nestia dependencies
10
+ 5. npx nestia init
11
+ 6. npx nestia sdk
12
+ 7. npx nestia swagger [--watch]
13
+ 8. npx nestia e2e
14
+ 9. npx nestia all
15
+ `;
16
+
17
+ function halt(desc: string): never {
18
+ console.error(desc);
19
+ process.exit(-1);
20
+ }
21
+
22
+ async function main(): Promise<void> {
23
+ const type: string | undefined = process.argv[2];
24
+ const argv: string[] = process.argv.slice(3);
25
+
26
+ if (type === "start") {
27
+ await (
28
+ await import("./NestiaStarter.js")
29
+ ).NestiaStarter.clone((msg) => halt(msg ?? USAGE))(argv);
30
+ } else if (type === "template") {
31
+ await (
32
+ await import("./NestiaTemplate.js")
33
+ ).NestiaTemplate.clone((msg) => halt(msg ?? USAGE))(argv);
34
+ } else if (type === "setup") {
35
+ await (
36
+ await import("./NestiaSetupWizard.js")
37
+ ).NestiaSetupWizard.setup(argv);
38
+ } else if (
39
+ type === "dependencies" ||
40
+ type === "init" ||
41
+ type === "sdk" ||
42
+ type === "swagger" ||
43
+ type === "e2e" ||
44
+ type === "all"
45
+ ) {
46
+ const location: string = "@nestia/sdk/lib/executable/sdk";
47
+ try {
48
+ require.resolve(location);
49
+ } catch {
50
+ halt(
51
+ [
52
+ `@nestia/sdk has not been installed.`,
53
+ `Run "npx nestia setup" first, or install manually:`,
54
+ ` npm i -D ttsc @typescript/native-preview`,
55
+ ` npm i typia`,
56
+ ` npm i @nestia/core @nestia/sdk @nestia/fetcher`,
57
+ ` npm i -D nestia`,
58
+ ].join("\n"),
59
+ );
60
+ }
61
+ await import(location);
62
+ } else halt(USAGE);
63
+ }
64
+ main().catch((exp) => {
65
+ console.error(exp instanceof Error ? exp.message : String(exp));
66
+ process.exit(-1);
67
+ });