sumba 2.6.0 → 2.7.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.
@@ -1,7 +1,7 @@
1
1
  import checkUserId from '../../../lib/check-user-id.js'
2
2
  import checkTeam from '../../../lib/check-team.js'
3
3
 
4
- const onRequest = {
4
+ const preParsing = {
5
5
  level: 10,
6
6
  handler: async function (req, reply) {
7
7
  await checkUserId.call(this, req, reply, 'waibuRestApi')
@@ -9,4 +9,4 @@ const onRequest = {
9
9
  }
10
10
  }
11
11
 
12
- export default onRequest
12
+ export default preParsing
@@ -1,7 +1,7 @@
1
1
  import checkUserId from '../../../lib/check-user-id.js'
2
2
  import checkTeam from '../../../lib/check-team.js'
3
3
 
4
- const onRequest = {
4
+ const preParsing = {
5
5
  level: 10,
6
6
  handler: async function (req, reply) {
7
7
  await checkUserId.call(this, req, reply, 'waibuStatic')
@@ -9,4 +9,4 @@ const onRequest = {
9
9
  }
10
10
  }
11
11
 
12
- export default onRequest
12
+ export default preParsing
@@ -6,13 +6,16 @@ async function afterAppBoot () {
6
6
  await runHook(`${this.ns}:beforeBoot`)
7
7
  this.log.trace('collectingRouteGuards')
8
8
  await collectRoutes.call(this, 'secure')
9
+ await runHook(`${this.ns}:afterCollectSecureRoutes`, this.secureRoutes, this.secureNegRoutes)
9
10
  this.log.trace('secureRoutes%d', this.secureRoutes.length)
10
11
  this.log.trace('secureNegRoutes%d', this.secureNegRoutes.length)
11
12
  await collectRoutes.call(this, 'anonymous')
13
+ await runHook(`${this.ns}:afterCollectAnonymousRoutes`, this.anonymousRoutes, this.anonymousNegRoutes)
12
14
  this.log.trace('anonRoutes%d', this.anonymousRoutes.length)
13
15
  this.log.trace('anonNegRoutes%d', this.anonymousNegRoutes.length)
14
16
  this.log.trace('collectingTeamGuards')
15
17
  await collectTeam.call(this)
18
+ await runHook(`${this.ns}:afterCollectTeamRoutes`, this.teamRoutes, this.teamNegRoutes)
16
19
  this.log.trace('teamRoutes%d', this.teamRoutes.length)
17
20
  this.log.trace('teamNegRoutes%d', this.teamNegRoutes.length)
18
21
  await runHook(`${this.ns}:afterBoot`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sumba",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "Biz Suite for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -4,6 +4,9 @@
4
4
 
5
5
  - [2.6.0] Update multiple endpoints to support dobo's transaction
6
6
  - [2.6.0] Bug fix on ```profile.edit``` route
7
+ - [2.7.0] Add hook ```sumba:afterCollectSecureRoutes```
8
+ - [2.7.0] Add hook ```sumba:afterCollectAnonymousRoutes```
9
+ - [2.7.0] Add hook ```sumba:afterCollectTeamRoutes```
7
10
 
8
11
  ## 2026-03-02
9
12