@nest-arch/tui 0.4.6 → 0.5.1
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 +31 -0
- package/dist/cli.js +2 -1
- package/dist/constants-CUTbfu9C.js +1 -0
- package/dist/index.js +6 -405
- package/dist/nonInteractive-C1KZ0b_6.js +5 -0
- package/dist/nonInteractiveOptions-CIaoLAWg.js +24 -0
- package/dist/projectGeneratorService-CeWJK-HA.js +420 -0
- package/dist/projectName-CcE90t2V.js +1 -0
- package/dist/templates/addons/husky/pre-commit.hbs +1 -1
- package/dist/templates/base/.env.example.hbs +30 -2
- package/dist/templates/base/.env.hbs +7 -2
- package/dist/templates/base/README.md.hbs +11 -2
- package/dist/templates/base/pnpm-workspace.yaml.hbs +9 -4
- package/dist/templates/base/prisma.config.ts.hbs +6 -1
- package/dist/templates/base/src/app.controller.spec.ts.hbs +6 -0
- package/dist/templates/base/src/app.module.ts.hbs +6 -23
- package/dist/templates/base/src/database/adapters/interfaces/db-adapter.interface.ts.hbs +5 -5
- package/dist/templates/base/src/database/adapters/mongo/raw-mongo.adapter.ts.hbs +6 -4
- package/dist/templates/base/src/database/adapters/mongo/typeorm-mongo.adapter.ts.hbs +27 -0
- package/dist/templates/base/src/database/db.module.ts.hbs +33 -13
- package/dist/templates/base/src/database/db.service.ts.hbs +12 -4
- package/dist/templates/base/src/database/entities/todo.entity.ts.hbs +17 -5
- package/dist/templates/base/src/database/index.ts.hbs +2 -0
- package/dist/templates/base/src/database/orm/drizzle/schema.ts.hbs +80 -20
- package/dist/templates/base/src/database/orm/typeorm/data-source.ts.hbs +34 -12
- package/dist/templates/base/src/libs/middlewares/graphql-throttler.guard.ts.hbs +22 -0
- package/dist/templates/base/src/libs/middlewares/rate-limit.trpc.middleware.ts.hbs +2 -1
- package/dist/templates/base/src/libs/trpc/inner.context.ts.hbs +2 -2
- package/dist/templates/base/src/main.ts.hbs +2 -2
- package/dist/templates/base/test/app.e2e-spec.ts.hbs +378 -202
- package/dist/templates/extras/docker/Dockerfile.hbs +9 -2
- package/dist/templates/extras/health/src/health/health.controller.ts.hbs +12 -1
- package/dist/templates/extras/swagger/create-docs.ts.hbs +6 -1
- package/dist/templates/feature/graphql/src/graphql/models/todo.model.ts.hbs +1 -1
- package/dist/templates/feature/graphql/src/graphql/resolvers/todo.resolver.ts.hbs +1 -1
- package/dist/templates/feature/rest/todo-example/src/api/todo/todo.controller.ts.hbs +80 -7
- package/dist/templates/feature/rest/todo-example/src/api/todo/todo.router.ts.hbs +4 -4
- package/dist/templates/feature/rest/todo-example/src/api/todo/todo.service.ts.hbs +314 -34
- package/dist/templates/monorepo/apps/api-gateway/src/main.ts.hbs +2 -2
- package/dist/templates/monorepo/root/README.md.hbs +8 -13
- package/dist/templates/single-project/architecture/nest-api/.env.hbs +6 -2
- package/dist/templates/single-project/architecture/nest-api/pnpm-workspace.yaml.hbs +6 -0
- package/dist/templates/single-project/architecture/nest-api/src/main.ts.hbs +2 -2
- package/dist/templates/single-project/architecture/nest-gateway/src/main.ts.hbs +2 -2
- package/dist/templates/single-project/architecture/nest-microservice/.env.hbs +30 -1
- 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 +26 -2
- package/dist/templates/single-project/architecture/nest-microservice/src/app.module.ts.hbs +61 -1
- package/dist/templates/single-project/architecture/nest-microservice/src/app.service.ts.hbs +16 -4
- package/dist/templates/single-project/architecture/nest-microservice/src/http-throttler.guard.ts.hbs +13 -0
- package/dist/templates/single-project/architecture/nest-microservice/src/main.ts.hbs +26 -7
- package/dist/templates/single-project/architecture/nest-microservice/test/microservice.e2e-spec.ts.hbs +7 -87
- package/dist/templates/single-project/shared/config/env.ts.hbs +14 -14
- package/package.json +6 -5
- package/dist/constants-DVhgS48N.js +0 -1
package/README.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @nest-arch/tui
|
|
2
2
|
|
|
3
|
+
Generate without the interactive wizard:
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pnpm dlx @nest-arch/tui my-api --package-manager pnpm --architecture nest-api --api rest --install-dependencies yes --git
|
|
7
|
+
pnpm dlx @nest-arch/tui --config ./previous-project/nest-arch.jsonc
|
|
8
|
+
pnpm dlx @nest-arch/tui --config ./previous-project/nest-arch.jsonc --output-dir ./recreated-project --install-dependencies no --no-git
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
A project name or `--config` selects noninteractive generation. No arguments or
|
|
12
|
+
`--ui` opens the wizard. `--help` lists all flags. Lists accept space-separated
|
|
13
|
+
values; use `none` to clear a list. CLI flags override configuration fields.
|
|
14
|
+
Without explicit options, generation uses a single Express/REST application,
|
|
15
|
+
pnpm, no formatter, no database or authentication, and skips installation and Git.
|
|
16
|
+
Nonempty destination directories are rejected. `--output-dir` is the exact
|
|
17
|
+
destination, rather than a parent directory.
|
|
18
|
+
|
|
19
|
+
Each generated `nest-arch.jsonc` records a `reproducibleCommand` pinned to the CLI
|
|
20
|
+
version that generated it, including the description, Prisma version and
|
|
21
|
+
Ultracite options. Descriptions in recorded commands use `--description-base64`
|
|
22
|
+
to preserve quotes and Unicode across native shell argument handling; when writing
|
|
23
|
+
commands yourself, use `--description "My application"`.
|
|
24
|
+
Commands generated on Windows use PowerShell quoting; commands
|
|
25
|
+
generated elsewhere use POSIX shell quoting. To move configurations between
|
|
26
|
+
platforms, use `--config`. Existing JSONC files are supported even if their recorded
|
|
27
|
+
command points to `create-nest-arch`; the command field is never executed.
|
|
28
|
+
|
|
29
|
+
The recorded version must be published before its command can be downloaded.
|
|
30
|
+
Version pinning preserves generator options and templates; exact dependency
|
|
31
|
+
versions require keeping the generated lockfile too. Timestamps, Git history and
|
|
32
|
+
installed artifacts are not expected to be identical.
|
|
33
|
+
|
|
3
34
|
The Ink/React terminal wizard for Nest Arch. It collects project selections and runs the core generation pipeline.
|
|
4
35
|
|
|
5
36
|
**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).
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
2
|
+
const r=new Set(["-v","--v","--version"]);if(process.argv.length===3&&process.argv[2]&&r.has(process.argv[2])){const{APP_VERSION:e}=await import("./constants-CUTbfu9C.js");console.log(`nest-arch/${e.replace(/^v/u,"")}`),process.exit(0)}const s=process.argv.slice(2);if(s.length===0||s.length===1&&s[0]==="--ui")await import("./index.js");else if(s.length===1&&(s[0]==="--help"||s[0]==="-h")){const{CLI_HELP:e}=await import("./nonInteractiveOptions-CIaoLAWg.js");process.stdout.write(e)}else try{const{runNonInteractive:e}=await import("./nonInteractive-C1KZ0b_6.js");await e(s)}catch(e){process.stderr.write(`nest-arch: ${e instanceof Error?e.message:String(e)}
|
|
3
|
+
`),process.exitCode=1}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var O="0.5.1",s={version:O};const n="Nest Arch",o=s.version,t=`v${o}`,A="Build production-ready NestJS projects.",c="#e54545",R="#A0A0A0",C="#6B6B6B",E="#E5E5E5",_="#61AFEF",e="#3A3A3A",L="#7FD99A",r="#E8C468",I="#e96142ff";export{n as APP_NAME,A as APP_TAGLINE,t as APP_VERSION,o as CLI_VERSION,_ as COLOR_ACCENT,R as COLOR_DIM,C as COLOR_DIMMER,e as COLOR_DIVIDER,E as COLOR_FG,c as COLOR_RED,L as COLOR_SUCCESS,r as COLOR_WARM,I as COLOR_WARM_SECONDARY};
|