waibu-db 2.21.0 → 2.21.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.
@@ -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.21.0",
3
+ "version": "2.21.2",
4
4
  "description": "DB Helper",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-05-28
4
+
5
+ - [2.21.1] Bug fix in ```get-schema-ext.js```
6
+
3
7
  ## 2026-05-25
4
8
 
5
9
  - [2.21.0] Auto detect theme & iconset