bajo 2.2.0 → 2.2.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/class/app.js +3 -3
- package/class/helper/base.js +5 -2
- package/package.json +1 -1
- package/wiki/CHANGES.md +5 -0
package/class/app.js
CHANGED
|
@@ -152,14 +152,14 @@ class App {
|
|
|
152
152
|
this.lib.outmatchNs = outmatchNs.bind(this)
|
|
153
153
|
this.lib.parseObject = (obj, options = {}) => {
|
|
154
154
|
const me = this
|
|
155
|
-
const { ns, lang } = options
|
|
155
|
+
const { ns = 'bajo', lang } = options
|
|
156
156
|
options.translator = {
|
|
157
157
|
lang,
|
|
158
158
|
prefix: 't:',
|
|
159
159
|
handler: val => {
|
|
160
|
-
const scope = ns ? me.app[ns] : me
|
|
161
160
|
const [text, ...args] = val.split('|')
|
|
162
|
-
|
|
161
|
+
args.push({ lang })
|
|
162
|
+
return me[ns].t(text, ...args)
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
return aneka.parseObject(obj, options)
|
package/class/helper/base.js
CHANGED
|
@@ -196,7 +196,10 @@ export async function run () {
|
|
|
196
196
|
* @see module:Helper/Base.run
|
|
197
197
|
*/
|
|
198
198
|
await runHook(`bajo:${camelCase(`after all ${method}`)}`)
|
|
199
|
-
if (me.bajo.config.log.level === 'trace') me.bajo.log.trace('loadedPlugins%s', join(map(me.bajo.app.pluginPkgs, b => camelCase(b))))
|
|
200
|
-
else me.bajo.log.debug('loadedPlugins%s', me.bajo.app.pluginPkgs.length)
|
|
201
199
|
}
|
|
200
|
+
if (me.bajo.config.log.level === 'trace') {
|
|
201
|
+
let text = join(map(me.bajo.app.pluginPkgs, b => camelCase(b)))
|
|
202
|
+
text += ` (${me.bajo.app.pluginPkgs.length})`
|
|
203
|
+
me.bajo.log.trace('loadedPlugins%s', text)
|
|
204
|
+
} else me.bajo.log.debug('loadedPlugins%s', me.bajo.app.pluginPkgs.length)
|
|
202
205
|
}
|
package/package.json
CHANGED
package/wiki/CHANGES.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changes
|
|
2
2
|
|
|
3
|
+
## 2026-01-16
|
|
4
|
+
|
|
5
|
+
- [2.2.1] Bug fix on multiple appearance of loaded plugins info
|
|
6
|
+
- [2.2.1] Bug fix on ```app.lib.parseObject()``` wrapper
|
|
7
|
+
|
|
3
8
|
## 2026-01-11
|
|
4
9
|
|
|
5
10
|
- [2.2.0] Simplify numerous things by putting most of static properties back as normal class properties
|