@nest-arch/tui 0.2.8 → 0.4.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 +20 -42
- package/dist/cli.js +1 -1
- package/dist/constants-C3xmDWeK.js +1 -0
- package/dist/index.js +297 -84
- package/dist/templates/base/.env.example.hbs +4 -2
- package/dist/templates/base/.env.hbs +4 -2
- package/dist/templates/base/.gitignore.hbs +2 -1
- package/dist/templates/base/.yarnrc.yml.hbs +0 -5
- package/dist/templates/base/README.md.hbs +33 -5
- package/dist/templates/base/nest-cli.json.hbs +2 -1
- package/dist/templates/base/pnpm-workspace.yaml.hbs +9 -0
- package/dist/templates/base/prisma.config.ts.hbs +32 -6
- package/dist/templates/base/src/app.controller.spec.ts.hbs +3 -11
- package/dist/templates/base/src/app.controller.ts.hbs +2 -2
- package/dist/templates/base/src/app.module.ts.hbs +8 -4
- package/dist/templates/base/src/app.router.ts.hbs +2 -2
- package/dist/templates/base/src/database/adapters/interfaces/db-adapter.interface.ts.hbs +7 -0
- package/dist/templates/base/src/database/adapters/mongo/prisma-mongo.adapter.ts.hbs +25 -1
- package/dist/templates/base/src/database/adapters/mongo/raw-mongo.adapter.ts.hbs +17 -12
- package/dist/templates/base/src/database/adapters/sql/drizzle-sql.adapter.ts.hbs +9 -0
- package/dist/templates/base/src/database/adapters/sql/prisma-sql.adapter.ts.hbs +7 -4
- package/dist/templates/base/src/database/adapters/sql/raw-sql.adapter.ts.hbs +37 -0
- package/dist/templates/base/src/database/adapters/sql/typeorm-sql.adapter.ts.hbs +8 -3
- package/dist/templates/base/src/database/db.module.ts.hbs +32 -35
- package/dist/templates/base/src/database/db.service.ts.hbs +40 -6
- package/dist/templates/base/src/database/entities/todo.entity.ts.hbs +12 -7
- package/dist/templates/base/src/database/index.ts.hbs +1 -0
- package/dist/templates/base/src/database/orm/drizzle/schema.ts.hbs +47 -5
- package/dist/templates/base/src/database/orm/typeorm/data-source.ts.hbs +12 -4
- package/dist/templates/base/src/libs/trpc/error.handler.ts.hbs +1 -1
- package/dist/templates/base/src/main.ts.hbs +21 -6
- package/dist/templates/base/test/app.e2e-spec.ts.hbs +208 -6
- package/dist/templates/base/test/bootstrap.e2e-spec.ts.hbs +74 -0
- package/dist/templates/base/tsconfig.build.json.hbs +2 -0
- package/dist/templates/base/vitest.config.e2e.ts.hbs +4 -3
- package/dist/templates/base/vitest.config.ts.hbs +4 -3
- package/dist/templates/base/yarn.lock.hbs +1 -0
- package/dist/templates/extras/docker/Dockerfile.hbs +4 -1
- package/dist/templates/extras/swagger/create-docs.ts.hbs +4 -19
- package/dist/templates/feature/graphql/src/graphql/graphql.module.ts.hbs +8 -1
- package/dist/templates/feature/graphql/src/graphql/models/todo.model.ts.hbs +4 -0
- package/dist/templates/feature/graphql/src/graphql/orm/drizzle/drizzle-graphql.module.ts.hbs +4 -3
- package/dist/templates/feature/graphql/src/graphql/resolvers/todo.resolver.ts.hbs +51 -0
- package/dist/templates/feature/rest/todo-example/src/api/todo/todo.controller.ts.hbs +3 -1
- package/dist/templates/feature/rest/todo-example/src/api/todo/todo.module.ts.hbs +1 -3
- package/dist/templates/feature/rest/todo-example/src/api/todo/todo.service.ts.hbs +98 -32
- package/dist/templates/monorepo/apps/api-gateway/package.json.hbs +0 -1
- package/dist/templates/monorepo/apps/api-gateway/src/app.controller.spec.ts.hbs +1 -1
- package/dist/templates/monorepo/apps/api-gateway/test/app.e2e-spec.ts.hbs +20 -1
- package/dist/templates/monorepo/apps/api-gateway/tsconfig.build.json.hbs +2 -1
- package/dist/templates/monorepo/apps/api-gateway/vitest.config.e2e.ts.hbs +3 -2
- package/dist/templates/monorepo/apps/api-gateway/vitest.config.ts.hbs +3 -2
- package/dist/templates/monorepo/feature/graphql/src/graphql/resolvers/todo.resolver.ts.hbs +9 -0
- package/dist/templates/monorepo/packages/env/src/api-gateway.ts.hbs +9 -3
- package/dist/templates/monorepo/root/.gitignore.hbs +1 -0
- package/dist/templates/monorepo/root/pnpm-workspace.yaml.hbs +9 -0
- package/dist/templates/monorepo/root/tsconfig.json.hbs +1 -1
- package/dist/templates/monorepo/root/turbo.json.hbs +2 -0
- package/dist/templates/single-project/architecture/nest-api/.env.hbs +3 -1
- package/dist/templates/single-project/architecture/nest-api/package.json.hbs +0 -1
- package/dist/templates/single-project/architecture/nest-api/src/main.ts.hbs +20 -5
- package/dist/templates/single-project/architecture/nest-microservice/.env.hbs +18 -0
- package/dist/templates/single-project/architecture/nest-microservice/proto/app.proto.hbs +13 -0
- package/dist/templates/single-project/architecture/nest-microservice/src/app.controller.ts.hbs +14 -1
- package/dist/templates/single-project/architecture/nest-microservice/src/app.service.ts.hbs +4 -0
- package/dist/templates/single-project/architecture/nest-microservice/src/main.ts.hbs +13 -2
- package/dist/templates/single-project/architecture/nest-microservice/test/microservice.e2e-spec.ts.hbs +64 -0
- package/dist/templates/single-project/shared/config/env.ts.hbs +27 -3
- package/package.json +5 -2
- package/dist/constants-Cgtoxhmd.js +0 -1
package/README.md
CHANGED
|
@@ -1,59 +1,37 @@
|
|
|
1
1
|
# @nest-arch/tui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Ink/React terminal wizard for Nest Arch. It collects project selections and runs the core generation pipeline.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Alpha:** options and generated output may change. See the [validation matrix and limitations](https://github.com/Angel-Mario/nest-arch/blob/main/scripts/README.md).
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Run
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Installation
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
# Run directly with npx
|
|
9
|
+
```sh
|
|
15
10
|
npx @nest-arch/tui
|
|
16
|
-
|
|
17
|
-
# Or install globally
|
|
18
|
-
npm install -g @nest-arch/tui
|
|
19
|
-
nest-arch
|
|
20
11
|
```
|
|
21
12
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- Interactive wizard for project configuration
|
|
25
|
-
- Support for single and monorepo architectures
|
|
26
|
-
- Database, ORM, and API selection
|
|
27
|
-
- Authentication setup (JWT, Passport, Better-Auth)
|
|
28
|
-
- Docker, Swagger, and other extras
|
|
29
|
-
- Module generation for existing projects
|
|
13
|
+
Or install globally:
|
|
30
14
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
npx @nest-arch/tui
|
|
36
|
-
|
|
37
|
-
# Generate a module in an existing project (Headless usage not recommended yet)
|
|
38
|
-
npx @nest-arch/core generate:module --name users --dtos --entity
|
|
15
|
+
```sh
|
|
16
|
+
npm install -g @nest-arch/tui
|
|
17
|
+
nest-arch
|
|
18
|
+
nest-arch --version
|
|
39
19
|
```
|
|
40
20
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
# Install dependencies
|
|
45
|
-
pnpm install
|
|
21
|
+
Use an interactive terminal and a new output directory. The wizard offers architecture, API, database, authentication, formatting, dependency installation and Git options. The npm release can differ from the repository source.
|
|
46
22
|
|
|
47
|
-
|
|
48
|
-
pnpm dev
|
|
23
|
+
## Develop
|
|
49
24
|
|
|
50
|
-
|
|
51
|
-
pnpm test
|
|
25
|
+
From the repository root with Node.js 22 and pnpm 11.8.0:
|
|
52
26
|
|
|
53
|
-
|
|
54
|
-
pnpm
|
|
27
|
+
```sh
|
|
28
|
+
pnpm install --frozen-lockfile
|
|
29
|
+
pnpm --filter @nest-arch/tui dev
|
|
30
|
+
pnpm --filter @nest-arch/tui test
|
|
31
|
+
pnpm --filter @nest-arch/tui check-types
|
|
32
|
+
pnpm --filter @nest-arch/tui build
|
|
55
33
|
```
|
|
56
34
|
|
|
57
|
-
|
|
35
|
+
Tests cover keyboard interaction in selection components and option constraints, not the entire installed CLI journey. When changing an option, verify its context reaches the generator and add an appropriate scenario.
|
|
58
36
|
|
|
59
|
-
MIT
|
|
37
|
+
See [CONTRIBUTING.md](https://github.com/Angel-Mario/nest-arch/blob/main/CONTRIBUTING.md). Licensed under [MIT](https://github.com/Angel-Mario/nest-arch/blob/main/LICENSE).
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const e=new Set(["-v","--v","--version"]);if(process.argv[2]&&e.has(process.argv[2])){const{APP_VERSION:s}=await import("./constants-
|
|
2
|
+
const e=new Set(["-v","--v","--version"]);if(process.argv[2]&&e.has(process.argv[2])){const{APP_VERSION:s}=await import("./constants-C3xmDWeK.js");console.log(`nest-arch/${s.replace(/^v/u,"")}`),process.exit(0)}await import("./index.js");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o="0.4.0",O={version:o};const s="Nest Arch",A=`v${O.version}`,n="Build production-ready NestJS projects.",t="#e54545",c="#A0A0A0",R="#6B6B6B",C="#E5E5E5",E="#61AFEF",_="#3A3A3A",e="#7FD99A",r="#E8C468",L="#e96142ff";export{s as APP_NAME,n as APP_TAGLINE,A as APP_VERSION,E as COLOR_ACCENT,c as COLOR_DIM,R as COLOR_DIMMER,_ as COLOR_DIVIDER,C as COLOR_FG,t as COLOR_RED,e as COLOR_SUCCESS,r as COLOR_WARM,L as COLOR_WARM_SECONDARY};
|