waibu-db 2.20.1 → 2.21.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.
@@ -46,9 +46,7 @@ async function btnDelete () {
46
46
  await wbs.confirmation(\`${req.t(msg)}\`, {
47
47
  ok: '${this.params.attr.id}:remove',
48
48
  close: 'y',
49
- opts: selected,
50
- theme: '${get(this, 'component.theme.name', 'default')}',
51
- iconset: '${get(this, 'component.iconset.name', 'default')}'
49
+ opts: selected
52
50
  })
53
51
  `
54
52
  this.params.html = await this.component.buildTag({ tag: 'btn', attr: this.params.attr, html: this.params.html })
@@ -1,5 +1,3 @@
1
- import path from 'path'
2
-
3
1
  const defReadonly = ['id', 'createdAt', 'updatedAt']
4
2
 
5
3
  const defFormatter = {}
@@ -200,9 +198,8 @@ async function getSchemaExt (modelName, view, options = {}) {
200
198
  const ns = model.plugin.ns
201
199
  const schema = pick(model, ['name', 'properties', 'indexes', 'disabled', 'sortables', 'scanables', 'view', 'hidden', 'options'])
202
200
  schema.ns = ns
203
- const base = options.base ?? path.basename(model.options.file, path.extname(model.options.file))
204
201
  const parserOpts = { args: options.args }
205
- let ext = await readConfig(`${ns}:/extend/waibuDb/schema/${base}.*`, { ns, baseNs: 'waibuDb', parserOpts })
202
+ let ext = await readConfig(`${ns}:/extend/waibuDb/schema/${model.baseName}.*`, { ns, baseNs: 'waibuDb', parserOpts })
206
203
  ext = defaultsDeep(options.schema ?? {}, ext)
207
204
  await handler[view].call(this, schema, ext, options)
208
205
  return { schema, ext, model }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu-db",
3
- "version": "2.20.1",
3
+ "version": "2.21.1",
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-05-28
4
+
5
+ - [2.21.1] Bug fix in ```get-schema-ext.js```
6
+
7
+ ## 2026-05-25
8
+
9
+ - [2.21.0] Auto detect theme & iconset
10
+
3
11
  ## 2026-05-22
4
12
 
5
13
  - [2.20.1] Bug fix in admin menu