Update plugin API (fix Utils not being passed arguments)
This commit is contained in:
parent
a3038c46fd
commit
a0f60dddb2
|
@ -62,18 +62,15 @@ export default class PluginApi {
|
||||||
* Logger
|
* Logger
|
||||||
*/
|
*/
|
||||||
|
|
||||||
loggerLog(...message) { Logger.log(this.plugin.name, message) }
|
|
||||||
loggerErr(...message) { Logger.err(this.plugin.name, message) }
|
|
||||||
loggerWarn(...message) { Logger.warn(this.plugin.name, message) }
|
|
||||||
loggerInfo(...message) { Logger.info(this.plugin.name, message) }
|
|
||||||
loggerDbg(...message) { Logger.dbg(this.plugin.name, message) }
|
|
||||||
get Logger() {
|
get Logger() {
|
||||||
return {
|
return {
|
||||||
log: this.loggerLog.bind(this),
|
log: (...message) => Logger.log(this.plugin.name, message),
|
||||||
err: this.loggerErr.bind(this),
|
error: (...message) => Logger.err(this.plugin.name, message),
|
||||||
warn: this.loggerWarn.bind(this),
|
err: (...message) => Logger.err(this.plugin.name, message),
|
||||||
info: this.loggerInfo.bind(this),
|
warn: (...message) => Logger.warn(this.plugin.name, message),
|
||||||
dbg: this.loggerDbg.bind(this)
|
info: (...message) => Logger.info(this.plugin.name, message),
|
||||||
|
debug: (...message) => Logger.dbg(this.plugin.name, message),
|
||||||
|
dbg: (...message) => Logger.dbg(this.plugin.name, message)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,14 +80,15 @@ export default class PluginApi {
|
||||||
|
|
||||||
get Utils() {
|
get Utils() {
|
||||||
return {
|
return {
|
||||||
overload: () => Utils.overload.apply(Utils, arguments),
|
overload: (...args) => Utils.overload.apply(Utils, args),
|
||||||
tryParseJson: () => Utils.tryParseJson.apply(Utils, arguments),
|
tryParseJson: (...args) => Utils.tryParseJson.apply(Utils, args),
|
||||||
toCamelCase: () => Utils.toCamelCase.apply(Utils, arguments),
|
toCamelCase: (...args) => Utils.toCamelCase.apply(Utils, args),
|
||||||
compare: () => Utils.compare.apply(Utils, arguments),
|
compare: (...args) => Utils.compare.apply(Utils, args),
|
||||||
deepclone: () => Utils.deepclone.apply(Utils, arguments),
|
deepclone: (...args) => Utils.deepclone.apply(Utils, args),
|
||||||
deepfreeze: () => Utils.deepfreeze.apply(Utils, arguments),
|
deepfreeze: (...args) => Utils.deepfreeze.apply(Utils, args),
|
||||||
removeFromArray: () => Utils.removeFromArray.apply(Utils, arguments),
|
removeFromArray: (...args) => Utils.removeFromArray.apply(Utils, args),
|
||||||
defineSoftGetter: () => Utils.defineSoftGetter.apply(Utils, arguments)
|
defineSoftGetter: (...args) => Utils.defineSoftGetter.apply(Utils, args),
|
||||||
|
until: (...args) => Utils.until.apply(Utils, args)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue