dobo 2.30.7 → 2.31.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/lib/factory/driver.js +3 -0
- package/package.json +1 -1
- package/wiki/CHANGES.md +4 -0
package/lib/factory/driver.js
CHANGED
|
@@ -128,8 +128,11 @@ async function driverFactory () {
|
|
|
128
128
|
|
|
129
129
|
async _attachHook (name, model, ...args) {
|
|
130
130
|
const { ns } = this.app.dobo
|
|
131
|
+
const { kebabCase } = this.app.lib._
|
|
131
132
|
const options = last(args)
|
|
132
133
|
if (!options.noDriverHook) {
|
|
134
|
+
const prefix = kebabCase(name).split('-')[0]
|
|
135
|
+
await runHook(`${ns}.driver:${prefix}Any`, model, options)
|
|
133
136
|
await runHook(`${ns}.driver:${name}`, model, ...args)
|
|
134
137
|
await runHook(`${ns}.driver.${camelCase(model.name)}:${name}`, model, ...args)
|
|
135
138
|
}
|
package/package.json
CHANGED