@dudousxd/nestjs-codegen 0.17.1 → 0.18.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 CHANGED
@@ -1,5 +1,53 @@
1
1
  # @dudousxd/nestjs-codegen
2
2
 
3
+ ## 0.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 553e503: Resolve the entity of a controller factory called with a single options object.
8
+
9
+ `class X extends createTableController({ entity: Util, dto: UtilDTO })` emitted
10
+ every one of its routes with `body: never` and `filterFields: never` — the typed
11
+ filter builder gone from the client, with `tsc` and codegen both green. Only the
12
+ positional form (`createTableController(Util, { dto })`) worked: discovery
13
+ collected call-site classes by scanning for identifier ARGUMENTS, and an object
14
+ literal is not one, so the entity behind the factory's generated
15
+ `@Filterable({ entity })` was unresolvable. Measured downstream at 22 tables
16
+ losing their filter builder at once.
17
+
18
+ Class-valued properties of an options-object argument are now collected too,
19
+ keyed by property name, and the entity resolver prefers a named `entity` over the
20
+ first positional argument. Both call forms work, so a codebase can migrate table
21
+ by table.
22
+
23
+ `MixinBinding` gains `namedClassArgs: Record<string, { name, filePath }>`
24
+ alongside the unchanged positional `classArgs`. The key is what identifies an
25
+ argument's role once there is no positional order to read it from, and consumers
26
+ want different properties: this package resolves `entity`, while
27
+ `@dudousxd/nestjs-filter-codegen` reads `filter` off the same binding.
28
+
29
+ ## 0.17.2
30
+
31
+ ### Patch Changes
32
+
33
+ - fcf816e: Resolve `@ApplyFilter(<Table>.filter)` on overridden mixin routes.
34
+
35
+ A controller that extends a factory-produced base and overrides one of its
36
+ routes has to re-declare `@ApplyFilter`, and the only handle on the filter the
37
+ factory generated internally is the static it hands back — a property access,
38
+ not an importable identifier. Discovery accepted identifiers only, so it skipped
39
+ the decorator entirely.
40
+
41
+ The failure was silent and total rather than partial: the route emitted with
42
+ `body: never` and `filterFields: never`, dropping the typed filter builder from
43
+ exactly the routes that took the override escape hatch, while `tsc` and codegen
44
+ both stayed green. It only surfaced downstream, as a client call that could no
45
+ longer be typed.
46
+
47
+ Such a property access is now resolved through the factory — const → factory
48
+ call → returned class → static property → the class declared in the factory
49
+ body.
50
+
3
51
  ## 0.17.1
4
52
 
5
53
  ### Patch Changes