sumba 2.13.0 → 2.14.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.
@@ -123,6 +123,7 @@
123
123
  "aboutToDeleteSite%s": "You're about to delete a site with alias '%s'. Are you sure?",
124
124
  "aboutToCreateSite%s": "You're about to create a site with alias '%s'. Continue?",
125
125
  "removedFrom%s%s": "Removed from '%s' (%s record(s))",
126
+ "cacheStorage": "Cache Storage",
126
127
  "field": {
127
128
  "currentPassword": "Current Password",
128
129
  "newPassword": "New Password",
@@ -124,6 +124,7 @@
124
124
  "aboutToDeleteSite%s": "Anda akan menghapus sebuah situs dengan alias '%s'. Anda yakin?",
125
125
  "aboutToCreateSite%s": "Anda akan membuat sebuah situs dengan alias '%s'. Lanjutkan?",
126
126
  "removedFrom%s%s": "Dihapus dari '%s' (%s data)",
127
+ "cacheStorage": "Penyimpanan Cache",
127
128
  "field": {
128
129
  "currentPassword": "Kata Sandi Saat Ini",
129
130
  "newPassword": "Kata Sandi Baru",
@@ -0,0 +1,12 @@
1
+ const action = {
2
+ method: ['GET', 'POST'],
3
+ title: 'cacheStorage',
4
+ handler: async function (req, reply) {
5
+ if (!this.app.bajoCache) throw this.error('_notFound')
6
+ const { importModule } = this.app.bajo
7
+ const crudSkel = await importModule('waibuAdmin:/lib/crud-skel.js')
8
+ return await crudSkel.call(this, 'CacheStorage', req, reply)
9
+ }
10
+ }
11
+
12
+ export default action
package/index.js CHANGED
@@ -204,7 +204,8 @@ async function factory (pkgName) {
204
204
  }, {
205
205
  title: 'misc',
206
206
  children: [
207
- { title: 'userSession', href: `waibuAdmin:/${prefix}/session/list` }
207
+ { title: 'userSession', href: `waibuAdmin:/${prefix}/session/list` },
208
+ { title: 'cacheStorage', href: `waibuAdmin:/${prefix}/cache/list` }
208
209
  ]
209
210
  }]
210
211
  }
@@ -341,7 +342,6 @@ async function factory (pkgName) {
341
342
 
342
343
  checkPathsByRoute = ({ paths = [], method = 'GET', guards = [] }) => {
343
344
  const { outmatch } = this.app.lib
344
-
345
345
  for (const item of guards) {
346
346
  const matchPath = outmatch(item.path)
347
347
  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.14.0",
4
4
  "description": "Biz Suite for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,8 +1,13 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-03-27
4
+
5
+ - [2.14.0] Add support for cache storage management
6
+
3
7
  ## 2026-03-25
4
8
 
5
9
  - [2.13.0] Add bajo cache handling for ```getUser*()``` and ```getSite()```
10
+ - [2.13.1] Bug fix in ```collect.js```
6
11
 
7
12
  ## 2026-03-22
8
13