waibu-rest-api 2.1.1 → 2.2.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.
@@ -39,7 +39,7 @@ async function routeByModelBuilder ({ file, ctx, dir, pathPrefix, ns, parent })
39
39
  if (isSet(headers['x-count'])) count = headers['x-count']
40
40
  if (isSet(headers['x-refs'])) refs = headers['x-refs']
41
41
  if (typeof refs === 'string' && !['*', 'all'].includes(refs)) refs = [refs]
42
- const options = { fields, count, refs }
42
+ const options = { fields, count, refs, dynHooks: builder.hooks ?? [] }
43
43
  options.hidden = builder.hidden ?? []
44
44
  options.queryHandler = builder.queryHandler
45
45
  if (method === 'replace') options.partial = false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-rest-api",
3
- "version": "2.1.1",
3
+ "version": "2.2.0",
4
4
  "description": "REST API for Waibu",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Changes
2
2
 
3
- ## 2026-12-16
3
+ ## 2026-01-24
4
+
5
+ - [2.2.0] Add ```hooks``` property to model builder that will be considered as dynamic hoooks by models
6
+
7
+ ## 2026-01-16
4
8
 
5
9
  - [2.1.1] Bug fix on model references
6
10