@nest-arch/tui 0.2.1 → 0.2.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/dist/cli.js +1 -1
- package/dist/{constants-LZTzRAoQ.js → constants-DBtqeoTh.js} +1 -1
- package/dist/index.js +59 -59
- package/dist/templates/base/.env.example.hbs +1 -1
- package/dist/templates/base/.env.hbs +1 -1
- package/dist/templates/base/pnpm-workspace.yaml.hbs +3 -0
- package/dist/templates/base/src/app.module.ts.hbs +11 -5
- package/dist/templates/base/src/database/db.module.ts.hbs +2 -4
- package/dist/templates/base/src/main.ts.hbs +6 -0
- package/dist/templates/extras/swagger/create-docs.ts.hbs +13 -1
- package/dist/templates/feature/rest/todo-example/src/api/todo/todo.controller.ts.hbs +14 -189
- package/dist/templates/feature/rest/todo-example/src/api/todo/todo.module.ts.hbs +24 -0
- package/dist/templates/feature/rest/todo-example/src/api/todo/todo.router.ts.hbs +76 -0
- package/dist/templates/feature/rest/todo-example/src/api/todo/todo.service.ts.hbs +145 -0
- package/dist/templates/monorepo/apps/api-gateway/src/app.module.ts.hbs +11 -5
- package/dist/templates/monorepo/apps/api-gateway/src/main.ts.hbs +6 -0
- package/dist/templates/monorepo/root/pnpm-workspace.yaml.hbs +3 -0
- package/dist/templates/single-project/architecture/nest-api/.env.hbs +1 -1
- package/dist/templates/single-project/architecture/nest-api/pnpm-workspace.yaml.hbs +3 -0
- package/dist/templates/single-project/architecture/nest-api/src/main.ts.hbs +6 -0
- package/dist/templates/single-project/architecture/nest-gateway/src/main.ts.hbs +6 -0
- package/dist/templates/single-project/architecture/nest-microservice/src/main.ts.hbs +6 -0
- package/package.json +4 -4
|
@@ -20,17 +20,17 @@ import { AuthTRPCMiddleware } from "./libs/middlewares/auth.trpc.middleware.js";
|
|
|
20
20
|
{{/if}}
|
|
21
21
|
|
|
22
22
|
import { AppController } from "./app.controller.js";
|
|
23
|
-
{{#if (and hasTodoExample hasRest)}}
|
|
24
|
-
import {
|
|
23
|
+
{{#if (and hasTodoExample (or hasRest hasTrpc))}}
|
|
24
|
+
import { TodoModule } from "./api/todo/todo.module.js";
|
|
25
|
+
{{/if}}
|
|
26
|
+
{{#if (and hasTrpc hasTodoExample hasRest)}}
|
|
27
|
+
import { TodoRouter } from "./api/todo/todo.router.js";
|
|
25
28
|
{{/if}}
|
|
26
29
|
import { AppService } from "./app.service.js";
|
|
27
30
|
|
|
28
31
|
@Module({
|
|
29
32
|
controllers: [
|
|
30
33
|
AppController,
|
|
31
|
-
{{#if (and hasTodoExample hasRest)}}
|
|
32
|
-
TodoController,
|
|
33
|
-
{{/if}}
|
|
34
34
|
],
|
|
35
35
|
imports: [
|
|
36
36
|
{{#if (or hasDatabase hasOrm)}}
|
|
@@ -53,6 +53,9 @@ import { AppService } from "./app.service.js";
|
|
|
53
53
|
onError: AppErrorHandler,
|
|
54
54
|
}),
|
|
55
55
|
{{/if}}
|
|
56
|
+
{{#if (and hasTodoExample (or hasRest hasTrpc))}}
|
|
57
|
+
TodoModule,
|
|
58
|
+
{{/if}}
|
|
56
59
|
],
|
|
57
60
|
providers: [
|
|
58
61
|
AppService,
|
|
@@ -63,6 +66,9 @@ import { AppService } from "./app.service.js";
|
|
|
63
66
|
AppContext,
|
|
64
67
|
AppErrorHandler,
|
|
65
68
|
AppRouter,
|
|
69
|
+
{{#if (and hasTrpc hasTodoExample hasRest)}}
|
|
70
|
+
TodoRouter,
|
|
71
|
+
{{/if}}
|
|
66
72
|
{{/if}}
|
|
67
73
|
],
|
|
68
74
|
})
|
|
@@ -86,6 +86,12 @@ async function bootstrap() {
|
|
|
86
86
|
}
|
|
87
87
|
{{/if}}
|
|
88
88
|
await app.listen(env.PORT ?? 3000);
|
|
89
|
+
{{#if hasRest}}
|
|
89
90
|
Logger.log(`Started backend server on http://localhost:${env.PORT ?? 3000}/api`, "Main");
|
|
91
|
+
{{else if hasTrpc}}
|
|
92
|
+
Logger.log(`Started trpc server on http://localhost:${env.PORT ?? 3000}/trpc`, "Main");
|
|
93
|
+
{{else}}
|
|
94
|
+
Logger.log(`Started server on http://localhost:${env.PORT ?? 3000}`, "Main");
|
|
95
|
+
{{/if}}
|
|
90
96
|
}
|
|
91
97
|
await bootstrap();
|
|
@@ -11,7 +11,7 @@ POSTGRES_URL=postgresql://postgres:postgres@localhost:5432/{{projectNameKebab}}_
|
|
|
11
11
|
MYSQL_URL=mysql://root:mysql@localhost:3306/{{projectNameKebab}}_db
|
|
12
12
|
{{/if}}
|
|
13
13
|
{{#if hasSqlite}}
|
|
14
|
-
SQLITE_PATH=
|
|
14
|
+
SQLITE_PATH=file:./src/database/dev.db
|
|
15
15
|
{{/if}}
|
|
16
16
|
{{#if hasMongodb}}
|
|
17
17
|
MONGODB_URL=mongodb://localhost:27017/{{projectNameKebab}}_db
|
|
@@ -92,6 +92,12 @@ async function bootstrap() {
|
|
|
92
92
|
{{/if}}
|
|
93
93
|
|
|
94
94
|
await app.listen(env.PORT ?? 3000);
|
|
95
|
+
{{#if hasRest}}
|
|
95
96
|
Logger.log(`Started backend server on http://localhost:${env.PORT ?? 3000}/api`, "Main");
|
|
97
|
+
{{else if hasTrpc}}
|
|
98
|
+
Logger.log(`Started trpc server on http://localhost:${env.PORT ?? 3000}/trpc`, "Main");
|
|
99
|
+
{{else}}
|
|
100
|
+
Logger.log(`Started server on http://localhost:${env.PORT ?? 3000}`, "Main");
|
|
101
|
+
{{/if}}
|
|
96
102
|
}
|
|
97
103
|
await bootstrap();
|
|
@@ -88,6 +88,12 @@ async function bootstrap() {
|
|
|
88
88
|
{{/if}}
|
|
89
89
|
|
|
90
90
|
await app.listen(env.PORT ?? 3000);
|
|
91
|
+
{{#if hasRest}}
|
|
91
92
|
Logger.log(`Started backend server on http://localhost:${env.PORT ?? 3000}/api`, "Main");
|
|
93
|
+
{{else if hasTrpc}}
|
|
94
|
+
Logger.log(`Started trpc server on http://localhost:${env.PORT ?? 3000}/trpc`, "Main");
|
|
95
|
+
{{else}}
|
|
96
|
+
Logger.log(`Started server on http://localhost:${env.PORT ?? 3000}`, "Main");
|
|
97
|
+
{{/if}}
|
|
92
98
|
}
|
|
93
99
|
await bootstrap();
|
|
@@ -95,6 +95,12 @@ async function bootstrap() {
|
|
|
95
95
|
|
|
96
96
|
await app.startAllMicroservices();
|
|
97
97
|
await app.listen(env.PORT ?? 3000);
|
|
98
|
+
{{#if hasRest}}
|
|
98
99
|
Logger.log(`Started backend server on http://localhost:${env.PORT ?? 3000}/api`, "Main");
|
|
100
|
+
{{else if hasTrpc}}
|
|
101
|
+
Logger.log(`Started trpc server on http://localhost:${env.PORT ?? 3000}/trpc`, "Main");
|
|
102
|
+
{{else}}
|
|
103
|
+
Logger.log(`Started server on http://localhost:${env.PORT ?? 3000}`, "Main");
|
|
104
|
+
{{/if}}
|
|
99
105
|
}
|
|
100
106
|
await bootstrap();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nest-arch/tui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Interactive terminal UI for generating NestJS projects",
|
|
6
6
|
"keywords": [
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"pkgroll": "^2.5.2",
|
|
49
49
|
"tsx": "^4.19.2",
|
|
50
50
|
"vitest": "^4.1.7",
|
|
51
|
-
"@nest-arch/core": "0.2.
|
|
52
|
-
"@nest-arch/
|
|
53
|
-
"@nest-arch/
|
|
51
|
+
"@nest-arch/core": "0.2.2",
|
|
52
|
+
"@nest-arch/shared": "0.0.0",
|
|
53
|
+
"@nest-arch/env": "0.0.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"typescript": "^5"
|