Auto reindexing on version upgrades

This commit is contained in:
Zef Hemel
2022-07-11 09:08:22 +02:00
parent ca86f75e16
commit c557253ad1
9 changed files with 75 additions and 5 deletions
+7
View File
@@ -1,5 +1,6 @@
import { SysCallMapping } from "@plugos/plugos/system";
import type { Editor } from "../editor";
import { version } from "../package.json";
export function systemSyscalls(editor: Editor): SysCallMapping {
return {
@@ -19,6 +20,12 @@ export function systemSyscalls(editor: Editor): SysCallMapping {
return editor.space.invokeFunction(ctx.plug, env, name, args);
},
"system.invokeCommand": async (ctx, name: string) => {
return editor.runCommandByName(name);
},
"system.getVersion": async () => {
return version;
},
"system.reloadPlugs": async () => {
return editor.reloadPlugs();
},