feat: complate database & web

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2020-06-20 16:39:03 +08:00
parent 4c0a77ed23
commit 9b5a303c21
15 changed files with 201 additions and 56 deletions

View File

@@ -28,13 +28,16 @@ function mcColor2ANSI(str: string) {
for (const regex in regexMap) {
str = str.replace(regexMap[regex], `\u001b[${regex}m`)
}
return str;
return str
}
export class SpringConsole extends MiaoScriptConsole {
error(...args: any[]) {
this.logger.error(args.join(' '))
}
warn(...args: any[]) {
this.logger.warn(args.join(' '))
}
sender(sender: any, ...args: any[]) {
sender = sender || {
sendMessage: (message: string) => console.console(message)
@@ -46,7 +49,7 @@ export class SpringConsole extends MiaoScriptConsole {
if (Object.prototype.toString.call(args[0]) === '[object Array]') {
args[0].forEach(line => sender.sendMessage(this.prefix + line))
} else {
sender.sendMessage(this.prefix + args.join(' '));
sender.sendMessage(this.prefix + args.join(' '))
}
}
console(...args: string[]): void {