sumba 2.13.0 → 2.13.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/index.js CHANGED
@@ -341,7 +341,6 @@ async function factory (pkgName) {
341
341
 
342
342
  checkPathsByRoute = ({ paths = [], method = 'GET', guards = [] }) => {
343
343
  const { outmatch } = this.app.lib
344
-
345
344
  for (const item of guards) {
346
345
  const matchPath = outmatch(item.path)
347
346
  for (const path of paths) {
package/lib/collect.js CHANGED
@@ -4,7 +4,6 @@ export async function collect ({ type = '', handler, container, file, ns, dir })
4
4
  const { camelCase, find, isString, isEmpty } = this.app.lib._
5
5
  let items = await readConfig(file, { ignoreError: true })
6
6
  if (isEmpty(items)) items = []
7
-
8
7
  for (let item of items) {
9
8
  if (isString(item)) item = { path: item }
10
9
  const routeHandler = item.routeHandler
@@ -14,7 +13,7 @@ export async function collect ({ type = '', handler, container, file, ns, dir })
14
13
  if (!this.app[rns]) continue
15
14
  const isNeg = item.path[0] === '!'
16
15
  if (isNeg) item.path = item.path.slice(1)
17
- item.path = routePath(`${ns}${routeHandler ? ('.' + routeHandler) : ''}:${item.path}`)
16
+ item.path = routePath(`${ns}${routeHandler ? ('.' + routeHandler) : ''}:${item.path}`, { defFormat: false })
18
17
  item.methods = item.methods ?? ['*']
19
18
  if (handler) await handler.call(this, item)
20
19
  const guards = this[camelCase(`${type} ${isNeg ? 'Neg' : ''} ${container}`)]
package/lib/util.js CHANGED
@@ -55,7 +55,8 @@ export function checkNoRouteSetting (req, routes) {
55
55
 
56
56
  export function pathsToCheck (req, withHome) {
57
57
  const { uniq, without } = this.app.lib._
58
- return uniq(without([req.routeOptions.url, req.url], undefined, null))
58
+ const items = [req.routeOptions.url, req.url]
59
+ return uniq(without(items, undefined, null))
59
60
  }
60
61
 
61
62
  export async function checkIconset (req, reply) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sumba",
3
- "version": "2.13.0",
3
+ "version": "2.13.1",
4
4
  "description": "Biz Suite for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -3,6 +3,7 @@
3
3
  ## 2026-03-25
4
4
 
5
5
  - [2.13.0] Add bajo cache handling for ```getUser*()``` and ```getSite()```
6
+ - [2.13.1] Bug fix in ```collect.js```
6
7
 
7
8
  ## 2026-03-22
8
9