@dudousxd/nestjs-codegen 0.17.0 → 0.17.2

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 CHANGED
@@ -1,5 +1,50 @@
1
1
  # @dudousxd/nestjs-codegen
2
2
 
3
+ ## 0.17.2
4
+
5
+ ### Patch Changes
6
+
7
+ - fcf816e: Resolve `@ApplyFilter(<Table>.filter)` on overridden mixin routes.
8
+
9
+ A controller that extends a factory-produced base and overrides one of its
10
+ routes has to re-declare `@ApplyFilter`, and the only handle on the filter the
11
+ factory generated internally is the static it hands back — a property access,
12
+ not an importable identifier. Discovery accepted identifiers only, so it skipped
13
+ the decorator entirely.
14
+
15
+ The failure was silent and total rather than partial: the route emitted with
16
+ `body: never` and `filterFields: never`, dropping the typed filter builder from
17
+ exactly the routes that took the override escape hatch, while `tsc` and codegen
18
+ both stayed green. It only surfaced downstream, as a client call that could no
19
+ longer be typed.
20
+
21
+ Such a property access is now resolved through the factory — const → factory
22
+ call → returned class → static property → the class declared in the factory
23
+ body.
24
+
25
+ ## 0.17.1
26
+
27
+ ### Patch Changes
28
+
29
+ - Support mixin controllers that OVERRIDE an inherited route.
30
+
31
+ Two gaps made the override pattern undiscoverable, so a subclass that customised
32
+ one route silently lost every route it did not override:
33
+
34
+ - **Heritage by identifier.** Discovery required a literal call expression
35
+ (`extends factory(Entity)`). But an override has to name the factory's products
36
+ in its own decorators (e.g. `@ApplyFilter(SomeTable.filter)`) and cannot
37
+ reference itself at decoration time, so the factory call must be bound to a
38
+ const first — `extends SomeTable`. That form now resolves through the const's
39
+ initialiser.
40
+ - **Override deduplication.** The derived class's own method now shadows the
41
+ inherited one of the same name. Emitting both produced two routes with the same
42
+ name (tripping the collision check); dropping the inherited siblings would have
43
+ lost the routes the subclass left alone.
44
+
45
+ An overriding method also keeps the route's mixin binding, so its `filterFields`
46
+ still resolve from the call-site entity.
47
+
3
48
  ## 0.17.0
4
49
 
5
50
  ### Minor Changes