WIP: real-time collab support

This commit is contained in:
Zef Hemel
2022-10-25 18:50:07 +02:00
parent f04f429c29
commit 590440748b
11 changed files with 138 additions and 10 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ export async function readSettings<T extends object>(settings: T): Promise<T> {
const allSettings = (await readYamlPage(SETTINGS_PAGE, ["yaml"])) || {};
// TODO: I'm sure there's a better way to type this than "any"
const collectedSettings: any = {};
for (let [key, defaultVal] of Object.entries(settings)) {
for (const [key, defaultVal] of Object.entries(settings)) {
if (key in allSettings) {
collectedSettings[key] = allSettings[key];
} else {
+9
View File
@@ -0,0 +1,9 @@
import { syscall } from "./syscall.ts";
export function start(serverUrl: string, token: string, username: string) {
return syscall("collab.start", serverUrl, token, username);
}
export function stop() {
return syscall("collab.stop");
}
+1
View File
@@ -5,3 +5,4 @@ export * as markdown from "./markdown.ts";
export * as sandbox from "./sandbox.ts";
export * as space from "./space.ts";
export * as system from "./system.ts";
export * as collab from "./collab.ts";