diff --git a/packages/plugos-silverbullet-syscall/space.ts b/packages/plugos-silverbullet-syscall/space.ts index 41f23b3c..16d0a685 100644 --- a/packages/plugos-silverbullet-syscall/space.ts +++ b/packages/plugos-silverbullet-syscall/space.ts @@ -5,6 +5,12 @@ export async function listPages(unfiltered = false): Promise { return syscall("space.listPages", unfiltered); } +export async function getPageMeta( + name: string +): Promise<{ text: string; meta: PageMeta }> { + return syscall("space.getPageMeta", name); +} + export async function readPage( name: string ): Promise<{ text: string; meta: PageMeta }> { diff --git a/packages/server/syscalls/space.ts b/packages/server/syscalls/space.ts index 3d93ba04..2ad1178a 100644 --- a/packages/server/syscalls/space.ts +++ b/packages/server/syscalls/space.ts @@ -13,6 +13,9 @@ export default (space: Space): SysCallMapping => { ): Promise<{ text: string; meta: PageMeta }> => { return space.readPage(name); }, + "space.getPageMeta": async (ctx, name: string): Promise => { + return space.getPageMeta(name); + }, "space.writePage": async ( ctx, name: string, diff --git a/packages/web/syscalls/space.ts b/packages/web/syscalls/space.ts index 3a23b760..dc458560 100644 --- a/packages/web/syscalls/space.ts +++ b/packages/web/syscalls/space.ts @@ -13,6 +13,9 @@ export function spaceSyscalls(editor: Editor): SysCallMapping { ): Promise<{ text: string; meta: PageMeta }> => { return await editor.space.readPage(name); }, + "space.getPageMeta": async (ctx, name: string): Promise => { + return await editor.space.getPageMeta(name); + }, "space.writePage": async ( ctx, name: string,