@nest-arch/tui 0.5.0 → 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.
Files changed (35) hide show
  1. package/README.md +31 -0
  2. package/dist/cli.js +2 -1
  3. package/dist/{constants-DX5wiqrq.js → constants-CUTbfu9C.js} +1 -1
  4. package/dist/index.js +6 -417
  5. package/dist/nonInteractive-C1KZ0b_6.js +5 -0
  6. package/dist/nonInteractiveOptions-CIaoLAWg.js +24 -0
  7. package/dist/projectGeneratorService-CeWJK-HA.js +420 -0
  8. package/dist/projectName-CcE90t2V.js +1 -0
  9. package/dist/templates/base/.env.example.hbs +23 -0
  10. package/dist/templates/base/prisma.config.ts.hbs +6 -6
  11. package/dist/templates/base/src/app.controller.spec.ts.hbs +6 -0
  12. package/dist/templates/base/src/app.module.ts.hbs +1 -1
  13. package/dist/templates/base/src/database/adapters/interfaces/db-adapter.interface.ts.hbs +5 -5
  14. package/dist/templates/base/src/database/adapters/mongo/raw-mongo.adapter.ts.hbs +2 -2
  15. package/dist/templates/base/src/database/adapters/mongo/typeorm-mongo.adapter.ts.hbs +27 -0
  16. package/dist/templates/base/src/database/db.module.ts.hbs +22 -16
  17. package/dist/templates/base/src/database/db.service.ts.hbs +7 -2
  18. package/dist/templates/base/src/database/entities/todo.entity.ts.hbs +15 -3
  19. package/dist/templates/base/src/database/orm/drizzle/schema.ts.hbs +38 -14
  20. package/dist/templates/base/src/database/orm/typeorm/data-source.ts.hbs +12 -6
  21. package/dist/templates/base/src/libs/middlewares/rate-limit.trpc.middleware.ts.hbs +2 -1
  22. package/dist/templates/base/test/app.e2e-spec.ts.hbs +14 -10
  23. package/dist/templates/extras/docker/Dockerfile.hbs +2 -2
  24. package/dist/templates/extras/health/src/health/health.controller.ts.hbs +5 -0
  25. package/dist/templates/feature/rest/todo-example/src/api/todo/todo.router.ts.hbs +4 -4
  26. package/dist/templates/feature/rest/todo-example/src/api/todo/todo.service.ts.hbs +135 -11
  27. package/dist/templates/single-project/architecture/nest-microservice/.env.hbs +24 -1
  28. package/dist/templates/single-project/architecture/nest-microservice/proto/app.proto.hbs +13 -0
  29. package/dist/templates/single-project/architecture/nest-microservice/src/app.controller.ts.hbs +24 -0
  30. package/dist/templates/single-project/architecture/nest-microservice/src/app.module.ts.hbs +33 -0
  31. package/dist/templates/single-project/architecture/nest-microservice/src/app.service.ts.hbs +16 -4
  32. package/dist/templates/single-project/architecture/nest-microservice/src/main.ts.hbs +25 -6
  33. package/dist/templates/single-project/architecture/nest-microservice/test/microservice.e2e-spec.ts.hbs +7 -122
  34. package/dist/templates/single-project/shared/config/env.ts.hbs +14 -14
  35. package/package.json +2 -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 e=new Set(["-v","--v","--version"]);if(process.argv[2]&&e.has(process.argv[2])){const{APP_VERSION:s}=await import("./constants-DX5wiqrq.js");console.log(`nest-arch/${s.replace(/^v/u,"")}`),process.exit(0)}await import("./index.js");
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}
@@ -1 +1 @@
1
- var O="0.5.0",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};
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};