Removed all traces of sockets, real-time collab and other stuff.

This commit is contained in:
Zef Hemel
2022-03-31 14:28:07 +02:00
parent 4525d60964
commit 859657f8b8
41 changed files with 796 additions and 1691 deletions
+6 -10
View File
@@ -1,27 +1,23 @@
import { PageMeta } from "../types";
import { SysCallMapping } from "../../plugos/system";
import { PageApi } from "../page_api";
import { ClientConnection } from "../api_server";
import { Storage } from "../disk_storage";
export default (pageApi: PageApi): SysCallMapping => {
const api = pageApi.api();
// @ts-ignore
const dummyConn = new ClientConnection(null);
export default (storage: Storage): SysCallMapping => {
return {
listPages: (ctx): Promise<PageMeta[]> => {
return api.listPages(dummyConn);
return storage.listPages();
},
readPage: async (
ctx,
name: string
): Promise<{ text: string; meta: PageMeta }> => {
return api.readPage(dummyConn, name);
return storage.readPage(name);
},
writePage: async (ctx, name: string, text: string): Promise<PageMeta> => {
return api.writePage(dummyConn, name, text);
return storage.writePage(name, text);
},
deletePage: async (ctx, name: string) => {
return api.deletePage(dummyConn, name);
return storage.deletePage(name);
},
};
};