dobo 1.0.20 → 1.0.22
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/bajo/intl/en-US.json
CHANGED
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"featureNotAsync%s": "Feature '%s' should be an async function",
|
|
106
106
|
"unsupportedIndexType%s%s%s%s": "Unsupported index type %s for '%s@%s'. Allowed choices: %s",
|
|
107
107
|
"unknownFeature%s%s": "'Unknown feature '%s@%s'",
|
|
108
|
-
"
|
|
108
|
+
"onlyAcceptFields%s%s": "Only accept array of field names or single string of field name '%s@%s'",
|
|
109
109
|
"invalidFieldName%s%s": "Invalid field name '%s@%s'",
|
|
110
110
|
"error%s": "Error: %s",
|
|
111
111
|
"succeedFailSkip%d%d%d": "Done! Succeded: %d, failed: %s, skipped: %d",
|
package/bajo/intl/id.json
CHANGED
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"featureNotAsync%s": "Feature '%s' should be an async function",
|
|
104
104
|
"unsupportedIndexType%s%s%s%s": "Unsupported index type %s for '%s@%s'. Allowed choices: %s",
|
|
105
105
|
"unknownFeature%s%s": "'Unknown feature '%s@%s'",
|
|
106
|
-
"
|
|
106
|
+
"onlyAcceptFields%s%s": "Only accept array of field names or single string of field name '%s@%s'",
|
|
107
107
|
"invalidFieldName%s%s": "Invalid field name '%s@%s'",
|
|
108
108
|
"error%s": "Error: %s",
|
|
109
109
|
"succeedFailSkip%d%d%d": "Done! Succeded: %d, failed: %s, skipped: %d",
|
|
@@ -2,7 +2,6 @@ import path from 'path'
|
|
|
2
2
|
|
|
3
3
|
async function copyUploaded (name, id, options = {}) {
|
|
4
4
|
const { fs } = this.app.bajo.lib
|
|
5
|
-
const { omit } = this.app.bajo.lib._
|
|
6
5
|
const { req, setField, setFile, mimeType, stats, silent = true } = options
|
|
7
6
|
name = this.attachmentPreCheck(name)
|
|
8
7
|
if (!name) {
|
|
@@ -22,7 +21,6 @@ async function copyUploaded (name, id, options = {}) {
|
|
|
22
21
|
field = setField ?? field
|
|
23
22
|
const file = setFile ?? parts.join('@')
|
|
24
23
|
const opts = { source: f, field, file, mimeType, stats, req }
|
|
25
|
-
console.log(setField, setFile, omit(opts, ['req']))
|
|
26
24
|
const rec = await this.attachmentCreate(name, id, opts)
|
|
27
25
|
delete rec.dir
|
|
28
26
|
result.push(rec)
|
package/lib/sanitize-schema.js
CHANGED
|
@@ -22,7 +22,7 @@ async function sanitizeFeature (item) {
|
|
|
22
22
|
|
|
23
23
|
async function sanitizeIndexes (item) {
|
|
24
24
|
for (const idx of item.indexes) {
|
|
25
|
-
if (!(typeof idx.fields === 'string' || Array.isArray(idx.fields))) this.fatal('
|
|
25
|
+
if (!(typeof idx.fields === 'string' || Array.isArray(idx.fields))) this.fatal('onlyAcceptFields%s%s', 'indexes', item.name)
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
async function beforeResourceMerge (lng, content) {
|
|
2
|
-
const { eachPlugins, readConfig } = this.app.bajo
|
|
3
|
-
const { merge } = this.app.bajo.lib._
|
|
4
|
-
await eachPlugins(async function ({ file, ns }) {
|
|
5
|
-
const item = await readConfig(file, { ns })
|
|
6
|
-
merge(content, item)
|
|
7
|
-
}, { glob: `i18n/${lng}.json`, ns: this.name })
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default beforeResourceMerge
|