This commit is contained in:
1-6
2023-07-27 01:02:21 +08:00
parent 615e543845
commit e31cae949b
4 changed files with 70 additions and 7 deletions
+36 -1
View File
@@ -784,4 +784,39 @@ let utils = {
},
};
export { Adapter, Bucket, sender, sleep, utils };
let slog = (type: string, ...args: any[]) => {
};
let console = {
log(...args: any[]) {
const content = args.reduce((acc, arg) => acc + ' ' + arg, '')
client.Console(
new srpc.ConsoleRequest({ type: "log", content, plugin_id }),
(err, resp) => {}
)
},
info(...args: any[]) {
const content = args.reduce((acc, arg) => acc + ' ' + arg, '')
client.Console(
new srpc.ConsoleRequest({ type: "info", content, plugin_id }),
(err, resp) => {}
)
},
error(...args: any[]) {
const content = args.reduce((acc, arg) => acc + ' ' + arg, '')
client.Console(
new srpc.ConsoleRequest({ type: "error", content, plugin_id }),
(err, resp) => {}
)
},
debug(...args: any[]) {
const content = args.reduce((acc, arg) => acc + ' ' + arg, '')
client.Console(
new srpc.ConsoleRequest({ type: "debug", content, plugin_id }),
(err, resp) => {}
)
},
};
export { Adapter, Bucket, sender, sleep, utils, console };