dobo 2.9.0 → 2.9.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.
@@ -51,7 +51,7 @@ async function collectConnections () {
51
51
  const memIndexes = filterIndex(this.config.connections, current => current.driver === 'dobo:memory' || current.name === 'memory')
52
52
  const models = memIndexes.map(idx => [...(this.config.connections[idx].models ?? [])])
53
53
  pullAt(this.config.connections, memIndexes)
54
- this.config.connections.unshift({
54
+ this.config.connections.push({
55
55
  driver: 'dobo:memory',
56
56
  name: 'memory',
57
57
  models
@@ -40,6 +40,10 @@ async function loadFixtures ({ spinner } = {}) {
40
40
  item[k] = (recs[0] ?? {})[field]
41
41
  }
42
42
  if (v === null) item[k] = undefined
43
+ else {
44
+ const prop = this.properties.find(item => item.name === k)
45
+ if (prop && ['string', 'text'].includes(prop.type)) item[k] += ''
46
+ }
43
47
  }
44
48
  const resp = await this.createRecord(item, { force: true })
45
49
  if (isArray(item._attachments) && item._attachments.length > 0) {
@@ -23,9 +23,9 @@ async function sanitizeBody ({ body = {}, partial, strict, extFields = [], noDef
23
23
  if (onlyTypes.length > 0 && !onlyTypes.includes(type)) return
24
24
  if (['object', 'array'].includes(type)) result[name] = sanitizeObject(result[name])
25
25
  else if (type === 'boolean') result[name] = sanitizeBoolean(result[name])
26
- else if (['float', 'double'].includes(type)) result[name] = sanitizeFloat(result[name], strict)
27
- else if (['integer', 'smallint'].includes(type)) result[name] = sanitizeInt(result[name], strict)
28
- else if (['string', 'text'].includes(type)) result[name] = sanitizeString(result[name], strict)
26
+ else if (['float', 'double'].includes(type)) result[name] = sanitizeFloat(result[name], { strict })
27
+ else if (['integer', 'smallint'].includes(type)) result[name] = sanitizeInt(result[name], { strict })
28
+ else if (['string', 'text'].includes(type)) result[name] = sanitizeString(result[name], { strict })
29
29
  else if (['datetime'].includes(type)) result[name] = sanitizeDate(result[name], { input: 'native' })
30
30
  if (!strict && isNaN(result[name])) result[name] = null
31
31
  if (['updateRecord', 'upsertRecord'].includes(action) && type === 'string' && result[name] === '') result[name] = null
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dobo",
3
- "version": "2.9.0",
3
+ "version": "2.9.2",
4
4
  "description": "DBMS for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/wiki/CHANGES.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changes
2
2
 
3
+ ## 2026-03-07
4
+
5
+ - [2.9.2] Bug fix on ```model.loadFixtures()```
6
+ - [2.9.2] Bug fix on ```collect-connections.js```
7
+
8
+ ## 2026-03-06
9
+
10
+ - [2.9.1] Bug fix on ```model.sanitizeBody()```
11
+
3
12
  ## 2026-03-05
4
13
 
5
14
  - [2.9.0] Add transaction support with ```model.transaction()``` wrapper