dobo 1.0.3 → 1.0.4
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/lib/add-fixtures.js +1 -0
- package/lib/collect-schemas.js +1 -2
- package/package.json +1 -1
package/lib/add-fixtures.js
CHANGED
|
@@ -41,6 +41,7 @@ async function addFixture (name, { spinner } = {}) {
|
|
|
41
41
|
result.success++
|
|
42
42
|
if (spinner) spinner.setText('%s: %d of %d records added', schema.name, result.success, items.length)
|
|
43
43
|
} catch (err) {
|
|
44
|
+
console.log(err)
|
|
44
45
|
err.model = schema.name
|
|
45
46
|
if (this.app.bajo.applet) this.print.fail(this.validationErrorMessage(err))
|
|
46
47
|
// else this.log.error('Add fixture \'%s@%s\' error: %s', schema.name, schema.connection, err.message)
|
package/lib/collect-schemas.js
CHANGED
|
@@ -32,9 +32,8 @@ async function handler ({ file, alias, ns }) {
|
|
|
32
32
|
mod.feature = feats
|
|
33
33
|
if ((mod.properties ?? []).length === 0) this.fatal('Schema \'%s\' doesn\'t have properties at all', mod.name)
|
|
34
34
|
// schema extender
|
|
35
|
-
const me = this
|
|
36
35
|
await eachPlugins(async function (opts) {
|
|
37
|
-
const glob = `${opts.dir}
|
|
36
|
+
const glob = `${opts.dir}/dobo/extend/schema/${mod.name}.*`
|
|
38
37
|
const files = await fastGlob(glob)
|
|
39
38
|
for (const file of files) {
|
|
40
39
|
const extender = await readConfig(file, { ns: opts.ns, ignoreError: true })
|