dobo 1.0.8 → 1.0.9
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 -2
- package/lib/collect-schemas.js +1 -1
- package/package.json +1 -1
package/lib/add-fixtures.js
CHANGED
|
@@ -18,9 +18,8 @@ async function addFixture (name, { spinner } = {}) {
|
|
|
18
18
|
const overrides = await readConfig(`${getPluginDataDir(this.name)}/override/fixture/${schema.name}.*`, { ns: this.name, ignoreError: true })
|
|
19
19
|
if (isArray(overrides) && !isEmpty(overrides)) items = overrides
|
|
20
20
|
// extend
|
|
21
|
-
const me = this
|
|
22
21
|
await eachPlugins(async function ({ dir, ns }) {
|
|
23
|
-
const extend = await readConfig(`${dir}/${
|
|
22
|
+
const extend = await readConfig(`${dir}/dobo/extend/${schema.ns}/fixture/${base}.*`, { ns, ignoreError: true })
|
|
24
23
|
if (isArray(extend) && !isEmpty(extend)) items.push(...extend)
|
|
25
24
|
})
|
|
26
25
|
if (isEmpty(items)) return result
|
package/lib/collect-schemas.js
CHANGED
|
@@ -33,7 +33,7 @@ async function handler ({ file, alias, ns }) {
|
|
|
33
33
|
if ((mod.properties ?? []).length === 0) this.fatal('Schema \'%s\' doesn\'t have properties at all', mod.name)
|
|
34
34
|
// schema extender
|
|
35
35
|
await eachPlugins(async function (opts) {
|
|
36
|
-
const glob = `${opts.dir}/dobo/extend
|
|
36
|
+
const glob = `${opts.dir}/dobo/extend/${mod.ns}/schema/${base}.*`
|
|
37
37
|
const files = await fastGlob(glob)
|
|
38
38
|
for (const file of files) {
|
|
39
39
|
const extender = await readConfig(file, { ns: opts.ns, ignoreError: true })
|