waibu-db 2.28.0 → 2.29.0
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.
- package/index.js +13 -25
- package/lib/crud/export-handler.js +3 -2
- package/package.json +1 -1
- package/wiki/CHANGES.md +5 -0
package/index.js
CHANGED
|
@@ -57,19 +57,19 @@ async function factory (pkgName) {
|
|
|
57
57
|
remove: 'DELETE'
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
this.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
60
|
+
this.bindThis(
|
|
61
|
+
countRecord,
|
|
62
|
+
createAggregate,
|
|
63
|
+
createHistogram,
|
|
64
|
+
createRecord,
|
|
65
|
+
findOneRecord,
|
|
66
|
+
findRecord,
|
|
67
|
+
getSchemaExt,
|
|
68
|
+
getRecord,
|
|
69
|
+
removeRecord,
|
|
70
|
+
updateRecord,
|
|
71
|
+
findAllRecord
|
|
72
|
+
)
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
/**
|
|
@@ -226,18 +226,6 @@ async function factory (pkgName) {
|
|
|
226
226
|
}
|
|
227
227
|
return await this.findAllRecord({ model, req, options })
|
|
228
228
|
}
|
|
229
|
-
|
|
230
|
-
countRecord = countRecord
|
|
231
|
-
createAggregate = createAggregate
|
|
232
|
-
createHistogram = createHistogram
|
|
233
|
-
createRecord = createRecord
|
|
234
|
-
findOneRecord = findOneRecord
|
|
235
|
-
findRecord = findRecord
|
|
236
|
-
findAllRecord = findAllRecord
|
|
237
|
-
getSchemaExt = getSchemaExt
|
|
238
|
-
getRecord = getRecord
|
|
239
|
-
removeRecord = removeRecord
|
|
240
|
-
updateRecord = updateRecord
|
|
241
229
|
}
|
|
242
230
|
|
|
243
231
|
return WaibuDb
|
|
@@ -26,7 +26,7 @@ async function exportHandler (opts = {}) {
|
|
|
26
26
|
req, reply, model, params = {}, templateDisabled = 'waibuDb.template:/disabled.html',
|
|
27
27
|
options = {}
|
|
28
28
|
} = opts
|
|
29
|
-
const { dayjs } = this.app.lib
|
|
29
|
+
// const { dayjs } = this.app.lib
|
|
30
30
|
const { omit, kebabCase, get, merge } = this.app.lib._
|
|
31
31
|
const { pascalCase } = this.app.lib.aneka
|
|
32
32
|
const { getSchemaExt } = this.app.waibuDb
|
|
@@ -42,7 +42,8 @@ async function exportHandler (opts = {}) {
|
|
|
42
42
|
const type = get(data, 'input.ftype', 'json')
|
|
43
43
|
const settings = get(data, 'input.options', '').split(',')
|
|
44
44
|
const ext = settings.includes('zip') ? `${type}.gz` : type
|
|
45
|
-
const file = `${kebabCase(model)}_${dayjs().format('YYYYMMDDhhmmss')}.${ext}`
|
|
45
|
+
// const file = `${kebabCase(model)}_${dayjs().format('YYYYMMDDhhmmss')}.${ext}`
|
|
46
|
+
const file = `${kebabCase(model)}.${ext}`
|
|
46
47
|
if (this.app.masohi && this.app.sumba) {
|
|
47
48
|
await this.app.sumba.pushDownload({ file, type, worker, source, data, req })
|
|
48
49
|
req.flash('notify', req.t('exportInQueue'))
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-07-24
|
|
4
|
+
|
|
5
|
+
- [2.29.0] Change `selfBind` to `bindThis`
|
|
6
|
+
|
|
3
7
|
## 2026-07-13
|
|
4
8
|
|
|
5
9
|
- [2.28.0] Update documentations
|
|
6
10
|
- [2.28.0] Add feature to allow export only if `options.allowExport` is set to true
|
|
11
|
+
- [2.28.1] Bug fix in `export-handler.js`
|
|
7
12
|
|
|
8
13
|
## 2026-07-12
|
|
9
14
|
|