Lazy plugs (#596)
* Manifest caching and lazy loading of plug workers * Fixes #546 Plug unloading after time out
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -68,7 +68,7 @@ export async function updatePlugsCommand() {
|
||||
|
||||
const allPlugNames = [...builtinPlugNames, ...allCustomPlugNames];
|
||||
// And delete extra ones
|
||||
for (const existingPlug of await space.listPlugs()) {
|
||||
for (const { name: existingPlug } of await space.listPlugs()) {
|
||||
const plugName = existingPlug.substring(
|
||||
"_plug/".length,
|
||||
existingPlug.length - ".plug.js".length,
|
||||
|
||||
Reference in New Issue
Block a user