Auto reindexing on version upgrades
This commit is contained in:
@@ -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();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user