@dudousxd/nestjs-codegen 0.16.0 → 0.17.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/CHANGELOG.md +37 -0
- package/dist/cli/main.cjs +142 -97
- package/dist/cli/main.cjs.map +1 -1
- package/dist/cli/main.js +83 -38
- package/dist/cli/main.js.map +1 -1
- package/dist/extension/index.cjs.map +1 -1
- package/dist/extension/index.d.cts +1 -1
- package/dist/extension/index.d.ts +1 -1
- package/dist/extension/index.js.map +1 -1
- package/dist/{index-LQNP7Ms3.d.cts → index-DCF9QSPY.d.cts} +24 -0
- package/dist/{index-LQNP7Ms3.d.ts → index-DCF9QSPY.d.ts} +24 -0
- package/dist/index.cjs +105 -60
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -3
- package/dist/index.d.ts +12 -3
- package/dist/index.js +77 -32
- package/dist/index.js.map +1 -1
- package/dist/nest/index.cjs +105 -60
- package/dist/nest/index.cjs.map +1 -1
- package/dist/nest/index.d.cts +1 -1
- package/dist/nest/index.d.ts +1 -1
- package/dist/nest/index.js +77 -32
- package/dist/nest/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# @dudousxd/nestjs-codegen
|
|
2
2
|
|
|
3
|
+
## 0.17.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Support mixin controllers that OVERRIDE an inherited route.
|
|
8
|
+
|
|
9
|
+
Two gaps made the override pattern undiscoverable, so a subclass that customised
|
|
10
|
+
one route silently lost every route it did not override:
|
|
11
|
+
|
|
12
|
+
- **Heritage by identifier.** Discovery required a literal call expression
|
|
13
|
+
(`extends factory(Entity)`). But an override has to name the factory's products
|
|
14
|
+
in its own decorators (e.g. `@ApplyFilter(SomeTable.filter)`) and cannot
|
|
15
|
+
reference itself at decoration time, so the factory call must be bound to a
|
|
16
|
+
const first — `extends SomeTable`. That form now resolves through the const's
|
|
17
|
+
initialiser.
|
|
18
|
+
- **Override deduplication.** The derived class's own method now shadows the
|
|
19
|
+
inherited one of the same name. Emitting both produced two routes with the same
|
|
20
|
+
name (tripping the collision check); dropping the inherited siblings would have
|
|
21
|
+
lost the routes the subclass left alone.
|
|
22
|
+
|
|
23
|
+
An overriding method also keeps the route's mixin binding, so its `filterFields`
|
|
24
|
+
still resolve from the call-site entity.
|
|
25
|
+
|
|
26
|
+
## 0.17.0
|
|
27
|
+
|
|
28
|
+
### Minor Changes
|
|
29
|
+
|
|
30
|
+
- abe5172: Extensions can declare input files the host's globs don't cover, via `ExtensionContext.trackInput`.
|
|
31
|
+
|
|
32
|
+
The skip-when-unchanged hash is built from `contracts.glob`, `forms.watch` and `pages.glob`. An extension that reads outside them therefore produced output that nothing could invalidate: `@dudousxd/nestjs-filter-codegen` resolves each route's `@ApplyFilter(FilterClass)` target and turns its `@Computed` / `@Filterable({ computed })` declarations into `filterFields` entries, but a filter class matches none of those globs — so editing one left the hash untouched and the next run reported "up to date, skipped" while serving stale types. The only way out was deleting `outDir`.
|
|
33
|
+
|
|
34
|
+
Extensions like that cannot declare their inputs up front (they need the discovered routes to know which files to read), so this works like a compiler depfile instead: paths reported during a run are recorded in the manifest as `extraInputs`, and the next run folds their contents into the hash. A file that becomes a dependency for the first time is picked up on the run after it is first read — in practice not a gap, since wiring a new filter class also edits a controller, which the globs already cover.
|
|
35
|
+
|
|
36
|
+
Deleting a tracked file invalidates too (it hashes as a `missing` marker rather than throwing), and a tracked path a glob already covers is hashed once, not twice.
|
|
37
|
+
|
|
38
|
+
Purely additive for existing extensions. `trackInput` is a no-op on the standalone `emitApi` path, which writes no manifest.
|
|
39
|
+
|
|
3
40
|
## 0.16.0
|
|
4
41
|
|
|
5
42
|
### Minor Changes
|