waibu-db 2.26.0 → 2.26.2

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.
@@ -196,11 +196,11 @@ const handler = {
196
196
  async function getSchemaExt (modelName, view, options = {}) {
197
197
  const { readConfig } = this.app.bajo
198
198
  const { defaultsDeep } = this.app.lib.aneka
199
- const { pick, isString, get } = this.app.lib._
199
+ const { pick, isString, get, cloneDeep } = this.app.lib._
200
200
 
201
201
  const model = isString(modelName) ? this.app.dobo.getModel(modelName) : modelName
202
202
  const ns = model.plugin.ns
203
- const schema = pick(model, ['name', 'properties', 'indexes', 'disabled', 'sortables', 'scanables', 'view', 'hidden', 'options'])
203
+ const schema = pick(cloneDeep(model), ['name', 'properties', 'indexes', 'disabled', 'sortables', 'scanables', 'view', 'hidden', 'options'])
204
204
  schema.ns = ns
205
205
  schema.model = model
206
206
  const parserOpts = { args: options.args }
@@ -212,6 +212,8 @@ async function getSchemaExt (modelName, view, options = {}) {
212
212
  if (req && req.routeOptions.config.mainSiteEdit && req.site.alias !== 'default') {
213
213
  schema.disabled = schema.disabled ?? []
214
214
  schema.disabled.push('create', 'update', 'remove')
215
+ schema.view.disabled = schema.view.disabled ?? []
216
+ schema.view.disabled.push(...schema.disabled)
215
217
  }
216
218
  return { schema, ext, model }
217
219
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-db",
3
- "version": "2.26.0",
3
+ "version": "2.26.2",
4
4
  "description": "DB Helper",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-06-19
4
+
5
+ - [2.26.2] Bug fix in ```add-handler.js```
6
+
7
+ ## 2026-06-18
8
+
9
+ - [2.26.1] Bug fix in ```get-schema-ext.js```
10
+
3
11
  ## 2026-06-17
4
12
 
5
13
  - [2.25.2] Bug fix in ```wdb-data-table``` widget