Lazy plugs (#596)

* Manifest caching and lazy loading of plug workers
* Fixes #546 Plug unloading after time out
This commit is contained in:
Zef Hemel
2023-12-06 18:44:48 +01:00
committed by GitHub
parent 8451680c01
commit 8527528af4
16 changed files with 226 additions and 67 deletions
+4 -1
View File
@@ -5,16 +5,19 @@ import { System } from "../../plugos/system.ts";
import { createSandbox } from "../../plugos/environments/deno_sandbox.ts";
import { loadMarkdownExtensions } from "../../common/markdown_parser/markdown_ext.ts";
import { renderMarkdownToHtml } from "./markdown_render.ts";
import { assertEquals } from "../../test_deps.ts";
Deno.test("Markdown render", async () => {
const system = new System<any>("server");
await system.load(
new URL("../../dist_plug_bundle/_plug/editor.plug.js", import.meta.url),
"editor",
0,
createSandbox,
);
await system.load(
new URL("../../dist_plug_bundle/_plug/tasks.plug.js", import.meta.url),
"tasks",
0,
createSandbox,
);
const lang = buildMarkdown(loadMarkdownExtensions(system));