@dudousxd/nestjs-codegen 0.11.0 → 0.12.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/CHANGELOG.md +28 -0
- package/dist/cli/main.cjs +204 -88
- package/dist/cli/main.cjs.map +1 -1
- package/dist/cli/main.js +188 -72
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +162 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -3
- package/dist/index.d.ts +29 -3
- package/dist/index.js +149 -33
- package/dist/index.js.map +1 -1
- package/dist/nest/index.cjs +207 -72
- package/dist/nest/index.cjs.map +1 -1
- package/dist/nest/index.d.cts +15 -4
- package/dist/nest/index.d.ts +15 -4
- package/dist/nest/index.js +207 -72
- package/dist/nest/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @dudousxd/nestjs-codegen
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5a2619c: perf(core): make the boot-time watcher production-safe, non-blocking, and idempotent.
|
|
8
|
+
|
|
9
|
+
Three changes to the `NestjsCodegenModule` `onApplicationBootstrap` path so dev-watch
|
|
10
|
+
restarts no longer pay the full codegen cost on time-to-ready:
|
|
11
|
+
|
|
12
|
+
- **Skip in production.** `NODE_ENV` is now normalized (trimmed + lowercased) before the
|
|
13
|
+
production check, and the watcher is skipped with a single concise log line when it is
|
|
14
|
+
`production`. A new `runInProduction?: boolean` option (default `false`) forces it on if
|
|
15
|
+
ever needed; explicit `enabled` still overrides both.
|
|
16
|
+
|
|
17
|
+
- **Non-blocking boot.** The initial discover + generate triggered by
|
|
18
|
+
`onApplicationBootstrap` now runs fire-and-forget (`watch(config, undefined, { deferInitialGenerate: true })`)
|
|
19
|
+
so it no longer blocks `NestFactory.create`. The lock and the chokidar watchers are
|
|
20
|
+
still set up synchronously, lock NO_OP semantics are preserved, and a rejected initial
|
|
21
|
+
generate is caught and logged rather than crashing the process. The one-shot CLI
|
|
22
|
+
(`nestjs-codegen codegen`) stays fully synchronous.
|
|
23
|
+
|
|
24
|
+
- **Skip-when-unchanged.** `generate()` now records a content hash (over all discovered
|
|
25
|
+
controller/DTO/page source files + the serialized resolved config + the lib version) and
|
|
26
|
+
the emitted output file list in `<outDir>/.codegen-manifest.json`. When the hash matches
|
|
27
|
+
and every recorded output still exists, the pass is skipped — stopping HMR from rewriting
|
|
28
|
+
`api.ts` (and churning downstream `tsbuildinfo`) when nothing changed. Any input change,
|
|
29
|
+
a missing output, or a lib upgrade invalidates the manifest and regenerates.
|
|
30
|
+
|
|
3
31
|
## 0.11.0
|
|
4
32
|
|
|
5
33
|
### Minor Changes
|