silverbullet/packages/plugos-silverbullet-syscall/system.ts

22 lines
494 B
TypeScript
Raw Normal View History

2022-04-01 23:07:08 +08:00
import { syscall } from "./syscall";
2022-04-05 23:02:17 +08:00
export async function invokeFunction(
env: string,
2022-04-01 23:07:08 +08:00
name: string,
...args: any[]
): Promise<any> {
return syscall("system.invokeFunction", env, name, ...args);
2022-04-01 23:07:08 +08:00
}
2022-04-27 01:04:36 +08:00
2022-07-11 15:08:22 +08:00
export async function invokeCommand(name: string): Promise<any> {
return syscall("system.invokeCommand", name);
}
export async function getVersion(): Promise<string> {
return syscall("system.getVersion");
}
2022-04-27 01:04:36 +08:00
export async function reloadPlugs() {
2022-04-27 02:31:31 +08:00
syscall("system.reloadPlugs");
2022-04-27 01:04:36 +08:00
}