dobo 2.9.1 → 2.9.3
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.
|
|
54
|
+
this.config.connections.push({
|
|
55
55
|
driver: 'dobo:memory',
|
|
56
56
|
name: 'memory',
|
|
57
57
|
models
|
|
@@ -7,14 +7,14 @@ async function native (filter, options, dataOnly) {
|
|
|
7
7
|
if (dataOnly) options.count = false
|
|
8
8
|
let { noResultSanitizer, noCache } = options
|
|
9
9
|
if (!this.cacheable) noCache = true
|
|
10
|
-
await execHook.call(this, '
|
|
11
|
-
await execModelHook.call(this, '
|
|
12
|
-
await execDynHook.call(this, '
|
|
10
|
+
await execHook.call(this, 'beforeFindRecord', filter, options)
|
|
11
|
+
await execModelHook.call(this, 'beforeFindRecord', filter, options)
|
|
12
|
+
await execDynHook.call(this, 'beforeFindRecord', filter, options)
|
|
13
13
|
if (get && !noCache && !options.record) {
|
|
14
14
|
const cachedResult = await get({ model: this.name, filter, options })
|
|
15
15
|
if (cachedResult) {
|
|
16
16
|
cachedResult.cached = true
|
|
17
|
-
await execModelHook.call(this, '
|
|
17
|
+
await execModelHook.call(this, 'afterFindRecord', filter, cachedResult, options)
|
|
18
18
|
return dataOnly ? cachedResult.data : cachedResult
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -25,9 +25,9 @@ async function native (filter, options, dataOnly) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
if (isSet(options.refs)) await getMultiRefs.call(this, result.data, options)
|
|
28
|
-
await execDynHook.call(this, '
|
|
29
|
-
await execModelHook.call(this, '
|
|
30
|
-
await execHook.call(this, '
|
|
28
|
+
await execDynHook.call(this, 'afterFindRecord', filter, result, options)
|
|
29
|
+
await execModelHook.call(this, 'afterFindRecord', filter, result, options)
|
|
30
|
+
await execHook.call(this, 'afterFindRecord', filter, result, options)
|
|
31
31
|
if (set && !noCache) await set({ model: this.name, filter, options, result })
|
|
32
32
|
return dataOnly ? result.data : result
|
|
33
33
|
}
|
|
@@ -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) {
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-03-09
|
|
4
|
+
|
|
5
|
+
- [2.9.3] Bug fix in ```findAllRecord```
|
|
6
|
+
|
|
7
|
+
## 2026-03-07
|
|
8
|
+
|
|
9
|
+
- [2.9.2] Bug fix in ```model.loadFixtures()```
|
|
10
|
+
- [2.9.2] Bug fix in ```collect-connections.js```
|
|
11
|
+
|
|
3
12
|
## 2026-03-06
|
|
4
13
|
|
|
5
|
-
- [2.9.1] Bug fix
|
|
14
|
+
- [2.9.1] Bug fix in ```model.sanitizeBody()```
|
|
6
15
|
|
|
7
16
|
## 2026-03-05
|
|
8
17
|
|
|
@@ -12,17 +21,17 @@
|
|
|
12
21
|
|
|
13
22
|
## 2026-02-25
|
|
14
23
|
|
|
15
|
-
- [2.8.3] Bug fix
|
|
24
|
+
- [2.8.3] Bug fix in attachment route
|
|
16
25
|
|
|
17
26
|
## 2026-02-24
|
|
18
27
|
|
|
19
|
-
- [2.8.2] Bug fix
|
|
20
|
-
- [2.8.2] Bug fix
|
|
28
|
+
- [2.8.2] Bug fix in field type ```textType```
|
|
29
|
+
- [2.8.2] Bug fix in ```collect-models.js``` when empty model is returned
|
|
21
30
|
|
|
22
31
|
## 2026-02-23
|
|
23
32
|
|
|
24
|
-
- [2.8.1] Bug fix
|
|
25
|
-
- [2.8.1] Bug fix
|
|
33
|
+
- [2.8.1] Bug fix in ```memory._getCursor()```
|
|
34
|
+
- [2.8.1] Bug fix in ```model.upsertRecord()```
|
|
26
35
|
|
|
27
36
|
## 2026-02-22
|
|
28
37
|
|
|
@@ -37,21 +46,21 @@
|
|
|
37
46
|
|
|
38
47
|
## 2026-02-17
|
|
39
48
|
|
|
40
|
-
- [2.6.5] Bug fix
|
|
41
|
-
- [2.6.5] Bug fix
|
|
42
|
-
- [2.6.6] Bug fix
|
|
49
|
+
- [2.6.5] Bug fix in model extender
|
|
50
|
+
- [2.6.5] Bug fix in trace logging
|
|
51
|
+
- [2.6.6] Bug fix in extender indexes
|
|
43
52
|
|
|
44
53
|
## 2026-02-05
|
|
45
54
|
|
|
46
|
-
- [2.6.4] Bug fix
|
|
55
|
+
- [2.6.4] Bug fix in driver options, ```noCheckUnique``` must be perform in ```create```, ```update``` and ```upsert```
|
|
47
56
|
|
|
48
57
|
## 2026-02-03
|
|
49
58
|
|
|
50
|
-
- [2.6.3] Bug fix
|
|
59
|
+
- [2.6.3] Bug fix in ```model.sanitizeRecord()```
|
|
51
60
|
|
|
52
61
|
## 2026-02-02
|
|
53
62
|
|
|
54
|
-
- [2.6.2] Bug fix
|
|
63
|
+
- [2.6.2] Bug fix in query & search resolver: Do not remove old query/search, should always copied to oldQuery/oldSearch
|
|
55
64
|
|
|
56
65
|
## 2026-02-01
|
|
57
66
|
|
|
@@ -64,20 +73,20 @@
|
|
|
64
73
|
- [2.5.0] Add feature to push custom ```options._data```. If provided, this will be used instead of auto generated one.
|
|
65
74
|
- [2.5.0] Remove ```silent``` in ```options``` object
|
|
66
75
|
- [2.5.1] Driver now support ```this.useUtc``` for database that store values in UTC string
|
|
67
|
-
- [2.5.1] Bug fix
|
|
76
|
+
- [2.5.1] Bug fix in ```driver.sanitizeRecord()```
|
|
68
77
|
|
|
69
78
|
## 2026-01-29
|
|
70
79
|
|
|
71
80
|
- [2.4.0] Add ```bulkCreateRecords()``` on model & driver
|
|
72
81
|
- [2.4.0] Add ```execModelHook()```
|
|
73
|
-
- [2.4.0] Bug fix
|
|
82
|
+
- [2.4.0] Bug fix in models collection
|
|
74
83
|
- [2.4.0] Add ```DoboAction``` to the ```app.baseClass```
|
|
75
84
|
- [2.4.0] ```findAllRecord()``` can't be called as action
|
|
76
85
|
|
|
77
86
|
## 2026-01-26
|
|
78
87
|
|
|
79
88
|
- [2.3.1] Bug fix if reference model isn't loaded only yield warning
|
|
80
|
-
- [2.3.1] Bug fix
|
|
89
|
+
- [2.3.1] Bug fix in fetching multi references
|
|
81
90
|
|
|
82
91
|
## 2026-01-24
|
|
83
92
|
|
|
@@ -91,16 +100,16 @@
|
|
|
91
100
|
|
|
92
101
|
## 2026-01-19
|
|
93
102
|
|
|
94
|
-
- [2.2.4] Bug fix
|
|
103
|
+
- [2.2.4] Bug fix in route ```dobo:/attachment/...```
|
|
95
104
|
|
|
96
105
|
## 2026-01-18
|
|
97
106
|
|
|
98
107
|
- [2.2.2] Revert back to ```mingo@6.5.1``` because of bugs in ```skip``` operation
|
|
99
|
-
- [2.2.3] Bug fix
|
|
108
|
+
- [2.2.3] Bug fix in driver's ```sanitizeBody()```
|
|
100
109
|
|
|
101
110
|
## 2026-01-16
|
|
102
111
|
|
|
103
|
-
- [2.2.1] Bug fix
|
|
112
|
+
- [2.2.1] Bug fix in model references
|
|
104
113
|
|
|
105
114
|
## 2026-01-11
|
|
106
115
|
|