waibu-db 2.29.0 → 2.29.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.
- package/index.js +4 -3
- package/package.json +1 -1
- package/wiki/CHANGES.md +4 -0
package/index.js
CHANGED
|
@@ -100,15 +100,16 @@ async function factory (pkgName) {
|
|
|
100
100
|
}
|
|
101
101
|
options.filter.sort = 'id:1' // TODO: make this configurable
|
|
102
102
|
if (!this.app.sumba || !id) {
|
|
103
|
-
await exportTo(model, dest, options)
|
|
104
|
-
return
|
|
103
|
+
const result = await exportTo(model, dest, options)
|
|
104
|
+
return result.file
|
|
105
105
|
}
|
|
106
106
|
const { downloadDir } = this.app.sumba
|
|
107
107
|
dest = `${downloadDir}/${file}`
|
|
108
108
|
const dmodel = this.app.dobo.getModel('SumbaDownload')
|
|
109
109
|
try {
|
|
110
110
|
await dmodel.updateRecord(id, { status: 'PROCESSING' })
|
|
111
|
-
await exportTo(model, dest, options)
|
|
111
|
+
const result = await exportTo(model, dest, options)
|
|
112
|
+
dest = result.file
|
|
112
113
|
const { size } = fs.statSync(dest)
|
|
113
114
|
await dmodel.updateRecord(id, { size, status: 'COMPLETE' })
|
|
114
115
|
} catch (err) {
|
package/package.json
CHANGED